diff options
author | mattkae <mattkae@protonmail.com> | 2022-05-17 07:07:37 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-05-17 07:07:37 -0400 |
commit | becff06c71d277647eda4378203d03ab36e141eb (patch) | |
tree | a1f73bba3676f34e0faf76764f5de963321f5576 /elpa | |
parent | 3f4a0d5370ae6c34afe180df96add3b8522f4af1 (diff) |
Evil mode and latex support
Diffstat (limited to 'elpa')
754 files changed, 171703 insertions, 249 deletions
diff --git a/elpa/archives/gnu/archive-contents b/elpa/archives/gnu/archive-contents index 9bc5840..f566e07 100644 --- a/elpa/archives/gnu/archive-contents +++ b/elpa/archives/gnu/archive-contents @@ -239,30 +239,31 @@ ("Serghei Iakovlev" . "egrep@protonmail.ch")) (:keywords "languages"))]) (boxy . - [(1 0 5) + [(1 1 0) ((emacs (26 1))) "A boxy layout framework" tar - ((:url . "https://gitlab.com/tygrdev/boxy.el") + ((:url . "https://gitlab.com/tygrdev/boxy") (:keywords "tools") (:maintainer "Tyler Grinn" . "tylergrinn@gmail.com") (:authors ("Tyler Grinn" . "tylergrinn@gmail.com")) - (:commit . "3a949d5b14349f33f27bc5041178445a0fedcc6c"))]) + (:commit . "68b1c6db7bb585e5942ab2e12765cf80cfcfb619"))]) (boxy-headings . - [(2 1 2) + [(2 1 3) ((emacs (26 1)) (boxy (1 0)) (org - (9 3))) + (9 4))) "View org files in a boxy diagram" tar ((:url . "https://gitlab.com/tygrdev/boxy-headings") (:keywords "tools") (:maintainer "Tyler Grinn" . "tylergrinn@gmail.com") (:authors - ("Tyler Grinn" . "tylergrinn@gmail.com")))]) + ("Tyler Grinn" . "tylergrinn@gmail.com")) + (:commit . "66fc9e50f02d6dee546fa6923ca28f1f64db9065"))]) (brief . [(5 87) nil "Brief Editor Emulator (Brief Mode)" tar @@ -510,7 +511,7 @@ ("Jackson Ray Hamilton" . "jackson@jacksonrayhamilton.com")) (:keywords "convenience" "faces" "tools"))]) (corfu . - [(0 23) + [(0 24) ((emacs (27 1))) "Completion Overlay Region FUnction" tar @@ -518,7 +519,7 @@ (:maintainer "Daniel Mendler" . "mail@daniel-mendler.de") (:authors ("Daniel Mendler" . "mail@daniel-mendler.de")) - (:commit . "bf9bb725f70fb3165e2831c5926217bd6a8bc68d"))]) + (:commit . "dc4623b45947dc4fa270a9fcf8ba998e70b36c1b"))]) (coterm . [(1 5) ((emacs @@ -555,14 +556,14 @@ (:keywords "files") (:url . "http://elpa.gnu.org/packages/cpio-mode.html"))]) (cpupower . - [(1 0 4) + [(1 0 5) nil "cpupower command interface" tar ((:url . "https://gitlab.com/steve-emacs-stuff/cpupower-el") (:keywords "hardware" "cpupower" "cpu" "frequency-scaling") (:maintainer "Stephen Meister" . "pallagun@gmail.com") (:authors ("Stephen Meister" . "pallagun@gmail.com")) - (:commit . "36520f1fa7bbfdbfd525a4c729b3fd067f7a05f1"))]) + (:commit . "fa979dfafa1beb374bf42e937f0b5b99ed06222e"))]) (crdt . [(0 2 7) nil "Collaborative editing using Conflict-free Replicated Data Types" tar @@ -590,9 +591,9 @@ (:authors ("Theodor Thornhill" . "theo@thornhill.no")))]) (csv-mode . - [(1 19) + [(1 20) ((emacs - (24 1)) + (27 1)) (cl-lib (0 5))) "Major mode for editing comma/char separated values" tar @@ -601,7 +602,7 @@ (:authors ("\"Francis J. Wright\"" . "F.J.Wright@qmul.ac.uk")) (:url . "https://elpa.gnu.org/packages/csv-mode.html") - (:commit . "5c19624398bfd6b976cc9876db582e3e23611601"))]) + (:commit . "51580d5bf7095eff429029cd8d4b79214faf6b48"))]) (cursory . [(0 1 4) ((emacs @@ -1002,7 +1003,7 @@ ("Jorgen Schäfer" . "forcer@forcix.cx")) (:commit . "6afe1b26d679357586380ecd69c9795985231013"))]) (engrave-faces . - [(0 3 0) + [(0 3 1) ((emacs (27 1))) "Convert font-lock faces to other formats" tar @@ -1011,7 +1012,7 @@ (:maintainer "TEC" . "tec@tecosaur.com") (:authors ("TEC <https://github/tecosaur>")) - (:commit . "3739d9f690412beb5bf717b11bc828fe39ade231"))]) + (:commit . "fe29d9b593a0f7ada4df3f52dfb9f7f8c1bdaaa7"))]) (enwc . [(2 0) ((emacs @@ -1147,7 +1148,7 @@ (:authors ("Manuel Uberti" . "manuel.uberti@inventati.org")))]) (fontaine . - [(0 2 0) + [(0 2 2) ((emacs (27 1))) "Set font configurations using presets" tar @@ -1155,7 +1156,7 @@ (:maintainer "Protesilaos Stavrou" . "info@protesilaos.com") (:authors ("Protesilaos Stavrou" . "info@protesilaos.com")) - (:commit . "a8e7f2e9b8ec6c4eaa75eb55acbc74702c96d438"))]) + (:commit . "7cf7cd0ed264f427a9824ad31dae8aa781574083"))]) (frame-tabs . [(1 1) nil "show buffer tabs in side window" single @@ -1936,14 +1937,14 @@ (:keywords "convenience" "org-mode" "org-agenda") (:maintainer "Nicolas P. Rougier" . "Nicolas.Rougier@inria.fr"))]) (nano-modeline . - [(0 6) + [(0 7) ((emacs (27 1))) "N Λ N O modeline" tar ((:url . "https://github.com/rougier/nano-modeline") (:keywords "convenience" "mode-line" "header-line") (:maintainer "Nicolas P. Rougier" . "Nicolas.Rougier@inria.fr") - (:commit . "1c743a9dbe72a1bdc2196ad43a217060e163c929"))]) + (:commit . "960ff4f01aa1273b4395d9985b5bda2d96af0cab"))]) (nano-theme . [(0 3 1) ((emacs @@ -2092,7 +2093,7 @@ ("Daniel Mendler" . "mail@daniel-mendler.de")) (:commit . "64fa67a3e4cc7af4084bb879bd8a0e5380333bcf"))]) (org-real . - [(1 0 4) + [(1 0 5) ((emacs (26 1)) (boxy @@ -2104,9 +2105,10 @@ (:keywords "tools") (:maintainer "Tyler Grinn" . "tylergrinn@gmail.com") (:authors - ("Tyler Grinn" . "tylergrinn@gmail.com")))]) + ("Tyler Grinn" . "tylergrinn@gmail.com")) + (:commit . "435f6361207cf98bb1c5f4c8e8a987005ba21d41"))]) (org-remark . - [(1 0 4) + [(1 0 5) ((emacs (27 1)) (org @@ -2117,7 +2119,7 @@ (:maintainer "Noboru Ota" . "me@nobiot.com") (:authors ("Noboru Ota" . "me@nobiot.com")) - (:commit . "e78cdff25edffc74bfe4c65f3a02777d454f6d96"))]) + (:commit . "576e5680682bfb80a50b057b8752e0674d766f8d"))]) (org-transclusion . [(1 2 0) ((emacs @@ -2162,7 +2164,7 @@ (:keywords "comm" "processes" "multimedia") (:url . "https://elpa.gnu.org/packages/osc.html"))]) (osm . - [(0 7) + [(0 8) ((emacs (27 1))) "OpenStreetMap viewer" tar @@ -2170,7 +2172,7 @@ (:maintainer "Daniel Mendler" . "mail@daniel-mendler.de") (:authors ("Daniel Mendler" . "mail@daniel-mendler.de")) - (:commit . "e3ea969ce1bf84343f357efa2de97e1dd857f481"))]) + (:commit . "563d9646b1f8df37cefcec5d51d20249eba407da"))]) (other-frame-window . [(1 0 6) ((emacs @@ -2213,7 +2215,7 @@ ("Junpeng Qiu" . "qjpchmail@gmail.com")) (:keywords "extensions"))]) (parser-generator . - [(0 1 5) + [(0 1 6) ((emacs (26))) "Parser Generator library" tar @@ -2222,7 +2224,7 @@ (:maintainer "Christian Johansson" . "christian@cvj.se") (:authors ("Christian Johansson" . "christian@cvj.se")) - (:commit . "bf7229332f7040d49fdac56e54da13d73752395d"))]) + (:commit . "db91a5f203ac39bcdfcd5276d3488394361c7f90"))]) (path-iterator . [(1 0) ((emacs @@ -2267,6 +2269,17 @@ (:authors ("Daiki Ueno" . "ueno@gnu.org")) (:maintainer "Daiki Ueno" . "ueno@gnu.org"))]) + (plz . + [(0 1) + ((emacs + (26 3))) + "HTTP library" tar + ((:url . "https://github.com/alphapapa/plz.el") + (:keywords "comm" "network" "http") + (:maintainer "Adam Porter" . "adam@alphapapa.net") + (:authors + ("Adam Porter" . "adam@alphapapa.net")) + (:commit . "9156de9c59c1836139db1b600f4056454b42dfd2"))]) (poker . [(0 2) nil "Texas hold 'em poker" single @@ -2808,13 +2821,14 @@ ("Artur Malabarba" . "emacs@endlessparentheses.com")) (:keywords "processes" "mode-line"))]) (sql-beeline . - [(0 1) + [(0 2) nil "Beeline support for sql.el" tar - ((:keywords "sql" "hive" "beeline" "hiveserver2") + ((:keywords "sql" "hive" "beeline" "hiveserver2" "impala") (:maintainer "Filipp Gunbin" . "fgunbin@fastmail.fm") (:authors ("Filipp Gunbin" . "fgunbin@fastmail.fm")) - (:url . "https://elpa.gnu.org/packages/sql-beeline.html"))]) + (:url . "https://elpa.gnu.org/packages/sql-beeline.html") + (:commit . "b7ffff9404d93f569e3c2bc59db1be6e848c894f"))]) (sql-cassandra . [(0 2 1) ((emacs @@ -3016,7 +3030,7 @@ ("Protesilaos Stavrou" . "info@protesilaos.com")) (:commit . "7157ec61c451e3b97ba6117688d0de52bf294bea"))]) (tomelr . - [(0 3 0) + [(0 4 3) ((emacs (26 3)) (map @@ -3029,7 +3043,7 @@ (:maintainer "Kaushal Modi" . "kaushal.modi@gmail.com") (:authors ("Kaushal Modi" . "kaushal.modi@gmail.com")) - (:commit . "ede27810243a3bf0872d4d30bb02a51ba9e8166f"))]) + (:commit . "670e0a08f625175fd80137cf69e799619bf8a381"))]) (tramp . [(2 5 2 4) ((emacs diff --git a/elpa/archives/gnu/archive-contents.signed b/elpa/archives/gnu/archive-contents.signed index 2667276..67669dd 100644 --- a/elpa/archives/gnu/archive-contents.signed +++ b/elpa/archives/gnu/archive-contents.signed @@ -1 +1 @@ -Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-05-09T17:05:03-0400 using RSA
\ No newline at end of file +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-05-16T17:05:03-0400 using RSA
\ No newline at end of file diff --git a/elpa/archives/melpa/archive-contents b/elpa/archives/melpa/archive-contents index 1db4d99..971994a 100644 --- a/elpa/archives/melpa/archive-contents +++ b/elpa/archives/melpa/archive-contents @@ -102,7 +102,7 @@ (all-the-icons-gnus . [(20180511 654) ((emacs (24 4)) (dash (2 12 0)) (all-the-icons (3 1 0))) "Shows icons for in Gnus" single ((:commit . "27f78996da0725943bcfb2d18038e6f7bddfa9c7") (:authors ("Nicolas Lamirault" . "nicolas.lamirault@gmail.com")) (:maintainer "Nicolas Lamirault" . "nicolas.lamirault@gmail.com") (:keywords "mail" "tools"))]) (all-the-icons-ibuffer . [(20220424 1027) ((emacs (24 4)) (all-the-icons (2 2 0))) "Display icons for all buffers in ibuffer" single ((:commit . "0fcb43eb440e18078c8faf67c27a2189bbb45dfb") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "convenience" "icons" "ibuffer") (:url . "https://github.com/seagle0128/all-the-icons-ibuffer"))]) (all-the-icons-ivy . [(20190508 1803) ((emacs (24 4)) (all-the-icons (2 4 0)) (ivy (0 8 0))) "Shows icons while using ivy and counsel" single ((:commit . "a70cbfa1effe36efc946a823a580cec686d5e88d") (:authors ("asok")) (:maintainer "asok") (:keywords "faces"))]) - (all-the-icons-ivy-rich . [(20220505 834) ((emacs (25 1)) (ivy-rich (0 1 0)) (all-the-icons (2 2 0))) "Better experience with icons for ivy" single ((:commit . "7c9db258ba7dd0a8c90eb7cebd335961cc45e031") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "convenience" "icons" "ivy") (:url . "https://github.com/seagle0128/all-the-icons-ivy-rich"))]) + (all-the-icons-ivy-rich . [(20220510 752) ((emacs (25 1)) (ivy-rich (0 1 0)) (all-the-icons (2 2 0))) "Better experience with icons for ivy" single ((:commit . "7c382ccbc8b1b2d0e18d280b24ee2029dca070d8") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "convenience" "icons" "ivy") (:url . "https://github.com/seagle0128/all-the-icons-ivy-rich"))]) (almost-mono-themes . [(20220422 1714) ((emacs (24))) "Almost monochromatic color themes" tar ((:commit . "0641bf565c113caef8d5c2a93f38cff32ebb62b7") (:authors ("John Olsson" . "john@cryon.se")) (:maintainer "John Olsson" . "john@cryon.se") (:keywords "faces") (:url . "https://github.com/cryon/almost-mono-themes"))]) (alsamixer . [(20191002 1133) nil "Functions to call out to amixer." single ((:commit . "1bdb99e433acd38685f05408562746cfbf2bc820") (:authors ("R.W. van 't Veer")) (:maintainer "R.W. van 't Veer") (:keywords "convenience") (:url . "https://github.com/remvee/alsamixer-el"))]) (alt-codes . [(20220212 1526) ((emacs (26 1))) "Insert alt codes using meta key" single ((:commit . "45deed4b9aadcd5e2a5482b0fe5110bb78ba1dd6") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/alt-codes"))]) @@ -130,7 +130,7 @@ (annalist . [(20190929 207) ((emacs (24 4)) (cl-lib (0 5))) "Record and display information such as keybindings" tar ((:commit . "134fa3f0fb91a636a1c005c483516d4b64905a6d") (:authors ("Fox Kiester" . "noct@posteo.net")) (:maintainer "Fox Kiester" . "noct@posteo.net") (:keywords "convenience" "tools" "keybindings" "org") (:url . "https://github.com/noctuid/annalist.el"))]) (annotate . [(20220428 1339) nil "annotate files without changing them" single ((:commit . "e982a7b74a681a8c2c823d8dcaafd185ab5f719e") (:authors ("Bastian Bechtold")) (:maintainer "Bastian Bechtold <bastibe.dev@mailbox.org>, cage" . "cage-dev@twistfold.it") (:url . "https://github.com/bastibe/annotate.el"))]) (annotate-depth . [(20160520 2040) nil "Annotate buffer if indentation depth is beyond threshold." single ((:commit . "fcb24fa36287250e40d195590c4ca4a8a696277b") (:authors ("Morten Slot Kristensen <msk AT nullpointer DOT dk>")) (:maintainer "Morten Slot Kristensen <msk AT nullpointer DOT dk>") (:keywords "convenience") (:url . "https://github.com/netromdk/annotate-depth"))]) - (annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "9a5f2b4a8cd14edbde9d16dcdfcb8db2a91be0d8") (:url . "https://github.com/agda/agda"))]) + (annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "9c6b0520529b8aabada5af7e0e1510fee3f2c44d") (:url . "https://github.com/agda/agda"))]) (annoying-arrows-mode . [(20161024 646) ((cl-lib (0 5))) "Ring the bell if using arrows too much" single ((:commit . "3c42e9807d7696da2da2a21b63beebf9cdb3f5dc") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com"))]) (ansi . [(20211104 1420) ((emacs (24 1)) (cl-lib (0 6))) "Turn string into ansi strings" single ((:commit . "2367fba7b3b2340364a30cd6de7f3eb6bb9898a3") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "terminals" "color" "ansi") (:url . "http://github.com/rejeep/ansi"))]) (ansible . [(20220114 45) ((s (1 9 0)) (f (0 16 2))) "Ansible minor mode" tar ((:commit . "d89ac0ee57742cca0f0e0a3453d9dcc521575690") (:authors ("k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>")) (:maintainer "k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>") (:url . "https://github.com/k1LoW/emacs-ansible"))]) @@ -146,7 +146,7 @@ (apache-mode . [(20210519 1931) nil "Major mode for editing Apache httpd configuration files" single ((:commit . "f2c11aac2f5fc598123e04f4604bea248689a117") (:authors ("Karl Chen" . "quarl@nospam.quarl.org")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "languages" "faces") (:url . "https://github.com/emacs-php/apache-mode"))]) (apdl-mode . [(20211023 1831) ((emacs (25 1))) "Major mode for the APDL programming language." tar ((:commit . "c55c6468526100ba0da00bff05cfb17cdf8839cf") (:authors ("H. Dieter Wilhelm" . "dieter@duenenhof-wilhelm.de")) (:maintainer "H. Dieter Wilhelm") (:keywords "languages" "convenience" "tools" "ansys" "apdl") (:url . "https://github.com/dieter-wilhelm/apdl-mode"))]) (apel . [(20220427 1121) ((emacs (24 5))) "A Portable Emacs Library provides support for portable Emacs Lisp programs" tar ((:commit . "6947dc4605ebbb87762edf7051a78a3f7b5f17c5"))]) - (apheleia . [(20220509 2258) ((emacs (26))) "Reformat buffer stably" single ((:commit . "a0737fd69591f4186a626eb72ccd9488a6da437c") (:authors ("Radian LLC" . "contact+apheleia@radian.codes")) (:maintainer "Radian LLC" . "contact+apheleia@radian.codes") (:keywords "tools") (:url . "https://github.com/raxod502/apheleia"))]) + (apheleia . [(20220516 436) ((emacs (26))) "Reformat buffer stably" single ((:commit . "cececba08fa7cb39a24d0f2c97aebf3dfd70a2cf") (:authors ("Radian LLC" . "contact+apheleia@radian.codes")) (:maintainer "Radian LLC" . "contact+apheleia@radian.codes") (:keywords "tools") (:url . "https://github.com/raxod502/apheleia"))]) (apib-mode . [(20200101 1017) ((markdown-mode (2 1))) "Major mode for API Blueprint files" single ((:commit . "c6dd05201f6eb9295736d8668a79a7510d11159e") (:authors ("Vilibald Wanča" . "vilibald@wvi.cz")) (:maintainer "Vilibald Wanča" . "vilibald@wvi.cz") (:keywords "tools" "api-blueprint") (:url . "http://github.com/w-vi/apib-mode"))]) (apiwrap . [(20180602 2231) ((emacs (25))) "api-wrapping macros" single ((:commit . "a4fb21d96027369307b22439a4a6c765ee272f44") (:authors ("Sean Allred" . "code@seanallred.com")) (:maintainer "Sean Allred" . "code@seanallred.com") (:keywords "tools" "maint" "convenience") (:url . "https://github.com/vermiculus/apiwrap.el"))]) (apparmor-mode . [(20220411 648) ((emacs (24 4))) "Major mode for editing AppArmor policy files" single ((:commit . "abc2a6adf563b89daee9f8fa07a71d78957defdb") (:authors ("Alex Murray" . "murray.alex@gmail.com")) (:maintainer "Alex Murray" . "murray.alex@gmail.com") (:url . "https://github.com/alexmurray/apparmor-mode"))]) @@ -167,6 +167,7 @@ (arjen-grey-theme . [(20170522 2047) nil "A soothing dark grey theme" single ((:commit . "4cd0be72b65d42390e2105cfdaa408a1ead8d8d1") (:authors ("Arjen Wiersma" . "arjen@wiersma.org")) (:maintainer "Arjen Wiersma" . "arjen@wiersma.org") (:keywords "faces") (:url . "https://github.com/credmp/arjen-grey"))]) (artbollocks-mode . [(20170524 422) nil "Improve your writing (especially about art)" single ((:commit . "33a41ca4f8206f57e5498a526d3b0ea18d08bb93") (:authors ("Rob Myers <rob@robmyers.org>, Sacha Chua" . "sacha@sachachua.com")) (:maintainer "Rob Myers <rob@robmyers.org>, Sacha Chua" . "sacha@sachachua.com") (:url . "https://github.com/sachac/artbollocks-mode"))]) (arview . [(20160419 2109) nil "extract and view archives in the temporary directory" single ((:commit . "5437b4221b64b238c273a651d4792c577dba6d45") (:authors ("Andrey Fainer" . "fandrey@gmx.com")) (:maintainer "Andrey Fainer" . "fandrey@gmx.com") (:keywords "files") (:url . "https://github.com/afainer/arview"))]) + (arxiv-citation . [(20220510 1137) ((emacs (25 1)) (dash (2 19 1)) (s (1 12 0))) "Utility functions for dealing with arXiv papers" single ((:commit . "bb3ed9fd3dbce2a943edf65aa23686a3c4f7f62f") (:authors ("Tony Zorman" . "soliditsallgood@mailbox.org")) (:maintainer "Tony Zorman" . "soliditsallgood@mailbox.org") (:keywords "convenience") (:url . "https://gitlab.com/slotThe/arXiv-citation"))]) (arxiv-mode . [(20220128 920) ((emacs (27 1)) (hydra (0))) "Read and search for articles on arXiv.org" tar ((:commit . "f550583d2da8bd9600bd26bb4028fe22a9744da2") (:authors ("Alex Chen (fizban007)" . "fizban007@gmail.com") ("Simon Lin (Simon-Lin)" . "n.sibetz@gmail.com")) (:maintainer "Alex Chen (fizban007)" . "fizban007@gmail.com") (:keywords "bib" "convenience" "hypermedia") (:url . "https://github.com/fizban007/arxiv-mode"))]) (ascii-table . [(20201019 700) ((emacs (24 3)) (cl-lib (0 5))) "Interactive ASCII table" single ((:commit . "4f68ad0b36c365c0652756691ab1703d0d46b4b4") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "help" "tools") (:url . "https://github.com/lassik/emacs-ascii-table"))]) (asilea . [(20150105 1525) ((emacs (24)) (cl-lib (0 5))) "Find best compiler options using simulated annealing" single ((:commit . "2aab1cc63b64ef08d12e84fd7ba5c94065f6039f") (:authors ("Fanael Linithien" . "fanael4@gmail.com")) (:maintainer "Fanael Linithien" . "fanael4@gmail.com") (:url . "https://github.com/Fanael/asilea"))]) @@ -239,7 +240,7 @@ (avandu . [(20170101 1903) nil "Gateway to Tiny Tiny RSS" tar ((:commit . "f44588d8e747fa880411cb4542cc39962252b90a") (:authors ("Tom Willemse" . "tom@ryuslash.org")) (:maintainer "Tom Willemse" . "tom@ryuslash.org") (:keywords "net"))]) (avk-emacs-themes . [(20210521 1051) nil "Collection of avk themes" tar ((:commit . "7b9b6517873c4d4d73e6e34ca56c54062db60759") (:authors ("Alex V. Koval" . "alex@koval.kharkov.ua")) (:maintainer "Alex V. Koval" . "alex@koval.kharkov.ua") (:keywords "theme") (:url . "https://github.com/avkoval/avk-emacs-themes"))]) (avy . [(20220102 805) ((emacs (24 1)) (cl-lib (0 5))) "Jump to arbitrary positions in visible text and select text quickly." single ((:commit . "ba5f035be33693d1a136a5cbeedb24327f551a92") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "point" "location") (:url . "https://github.com/abo-abo/avy"))]) - (avy-embark-collect . [(20220221 1638) ((emacs (25 1)) (embark (0 9)) (avy (0 5))) "Use avy to jump to Embark Collect entries" single ((:commit . "81c7f751be1de33dee9f7523fd3429ee3fe9a0d1") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) + (avy-embark-collect . [(20220221 1638) ((emacs (25 1)) (embark (0 9)) (avy (0 5))) "Use avy to jump to Embark Collect entries" single ((:commit . "5bb0e3aa40d6177a4b377af6da296b33b7ad404a") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) (avy-flycheck . [(20160720 1500) ((emacs (24 1)) (flycheck (0 14)) (seq (1 11)) (avy (0 4 0))) "Jump to and fix syntax errors using `flycheck' with `avy' interface" single ((:commit . "5522f3bbbed1801d9278ed696ec0cbba38352985") (:authors ("Xu Ma" . "magicdirac@gmail.com")) (:maintainer "Xu Ma" . "magicdirac@gmail.com") (:keywords "tools" "convenience" "avy" "flycheck") (:url . "https://github.com/magicdirac/avy-flycheck"))]) (avy-menu . [(20210321 1732) ((emacs (24 3)) (avy (0 4 0))) "Library providing avy-powered popup menu" single ((:commit . "18bb320f395b7e412f7e377cf4c46d205d4b4e1a") (:authors ("Mark Karpov" . "markkarpov92@gmail.com")) (:maintainer "Mark Karpov" . "markkarpov92@gmail.com") (:keywords "popup" "menu") (:url . "https://github.com/mrkkrp/avy-menu"))]) (avy-migemo . [(20180716 1455) ((emacs (24 4)) (avy (0 4 0)) (migemo (1 9))) "avy with migemo" tar ((:commit . "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7") (:authors ("momomo5717")) (:maintainer "momomo5717") (:keywords "avy" "migemo") (:url . "https://github.com/momomo5717/avy-migemo"))]) @@ -248,7 +249,7 @@ (aws-snippets . [(20191203 1553) ((yasnippet (0 8 0))) "Yasnippets for AWS" tar ((:commit . "557d19a0bc486e0fddb597b2be5087769d9bd47e") (:keywords "snippets"))]) (awscli-capf . [(20190930 1517) ((emacs (26))) "Completion at point function for the AWS CLI" single ((:commit . "eadfb26b35802ae8164565581e4a9c4d0280a7b5") (:authors ("Sebastian Monia" . "smonia@outlook.com")) (:maintainer "Sebastian Monia" . "smonia@outlook.com") (:keywords "tools" "convenience" "abbrev") (:url . "https://github.com/sebasmonia/awscli-capf.git"))]) (axe . [(20210816 1530) ((emacs (25 1)) (hmac (0 0)) (request (0 3 2)) (s (1 12 0)) (xmlgen (0 5)) (dash (2 17 0)) (mimetypes (1 0))) "AWS Extensions" tar ((:commit . "eb4a5b3b06c3cbed521e2c0e0985941c367f4e74") (:authors ("Craig Niles <niles.c at gmail.com>")) (:maintainer "Craig Niles <niles.c at gmail.com>") (:url . "https://github.com/cniles/axe"))]) - (axiom-environment . [(20211120 1646) ((emacs (24 2))) "An environment for using Axiom/OpenAxiom/FriCAS" tar ((:commit . "e60de5ed107ffeb530a56d24d04f38988124d12b") (:authors ("Paul Onions" . "paul.onions@acm.org")) (:maintainer "Paul Onions" . "paul.onions@acm.org") (:keywords "axiom" "openaxiom" "fricas"))]) + (axiom-environment . [(20220512 1931) ((emacs (24 2))) "An environment for using Axiom/OpenAxiom/FriCAS" tar ((:commit . "847cc6e728b692ad3fdaec28d0c8c49ec0378a56") (:authors ("Paul Onions" . "paul.onions@acm.org")) (:maintainer "Paul Onions" . "paul.onions@acm.org") (:keywords "axiom" "openaxiom" "fricas"))]) (ayu-theme . [(20200521 1157) ((emacs (24 1))) "Ayu theme" tar ((:commit . "ed98a9f41d9f0e08458ee71cc1038f66c50e1979") (:authors ("Tran Anh Vu")) (:maintainer "Tran Anh Vu") (:keywords "lisp" "theme" "emacs") (:url . "https://github.com/vutran1710/Ayu-Theme-Emacs"))]) (babel . [(20210612 640) nil "interface to web translation services such as Babelfish" single ((:commit . "946e69c61188bc41793402ac48466d8967ddb43d") (:authors ("Juergen Hoetzel" . "juergen@hoetzel.info") ("Eric Marsden" . "emarsden@laas.fr")) (:maintainer "Juergen Hoetzel" . "juergen@hoetzel.info") (:keywords "translation" "web") (:url . "http://github.com/juergenhoetzel/babel"))]) (babel-repl . [(20160504 2201) ((emacs (24))) "Run babel REPL" single ((:commit . "e619c16e349a1ee7bd0ee0d7f3650d33bff73fc3") (:authors ("Hung Phan")) (:maintainer "Hung Phan") (:keywords "babel" "javascript" "es6") (:url . "https://github.com/hung-phan/babel-repl/"))]) @@ -300,11 +301,11 @@ (better-shell . [(20191025 1737) ((emacs (24 4))) "Better shell management" single ((:commit . "70c787b981caeef8c5f8012b170eb7b9f167cd13") (:authors ("Russell Black" . "killdash9@github")) (:maintainer "Russell Black" . "killdash9@github") (:keywords "convenience") (:url . "https://github.com/killdash9/better-shell"))]) (bf-mode . [(20130403 1442) nil "Browse file persistently on dired" single ((:commit . "7cc4d09aed64d9db6be95646f5f5067de68f8895") (:authors ("isojin")) (:maintainer "myuhe <yuhei.maeda_at_gmail.com>") (:keywords "convenience") (:url . "https://github.com/emacs-jp/bf-mode"))]) (bfbuilder . [(20210228 1740) ((cl-lib (0 3)) (emacs (24 4))) "A brainfuck development environment with interactive debugger" single ((:commit . "689f320a9a1326cdeff43b8538e0d739f8519c4b") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://zk-phi.gitub.io/"))]) - (bibclean-format . [(20190302 2017) ((emacs (24 3)) (reformatter (0 3))) "Reformat BibTeX and Scribe using bibclean" single ((:commit . "b4003950a925d1c659bc359ab5e88e4441775d77") (:authors ("Peter W. V. Tran-Jørgensen" . "peter.w.v.jorgensen@gmail.com")) (:maintainer "Peter W. V. Tran-Jørgensen" . "peter.w.v.jorgensen@gmail.com") (:keywords "languages") (:url . "https://github.com/peterwvj/bibclean-format"))]) + (bibclean-format . [(20190302 2017) ((emacs (24 3)) (reformatter (0 3))) "Reformat BibTeX and Scribe using bibclean" single ((:commit . "94bc804220248b43b68c073545858692816d307a") (:authors ("Peter W. V. Tran-Jørgensen" . "peter.w.v.jorgensen@gmail.com")) (:maintainer "Peter W. V. Tran-Jørgensen" . "peter.w.v.jorgensen@gmail.com") (:keywords "languages") (:url . "https://github.com/peterwvj/bibclean-format"))]) (biblio . [(20210418 406) ((emacs (24 3)) (biblio-core (0 2))) "Browse and import bibliographic references from CrossRef, arXiv, DBLP, HAL, Dissemin, and doi.org" tar ((:commit . "517ec18f00f91b61481214b178f7ae0b8fbc499b") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "bib" "tex" "convenience" "hypermedia") (:url . "https://github.com/cpitclaudel/biblio.el"))]) (biblio-bibsonomy . [(20190105 1200) ((emacs (24 4)) (biblio-core (0 2))) "Lookup bibliographic entries from Bibsonomy" single ((:commit . "778cc944db3c6dababe2e7fec5877fba42e8c00d") (:authors ("Andreas Jansson and contributors")) (:maintainer "Andreas Jansson and contributors") (:keywords "bib" "tex" "bibsonomy") (:url . "http://github.com/andreasjansson/biblio-bibsonomy/"))]) (biblio-core . [(20210418 406) ((emacs (24 3)) (let-alist (1 0 4)) (seq (1 11)) (dash (2 12 1))) "A framework for looking up and displaying bibliographic entries" single ((:commit . "517ec18f00f91b61481214b178f7ae0b8fbc499b") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "bib" "tex" "convenience" "hypermedia") (:url . "https://github.com/cpitclaudel/biblio.el"))]) - (bibliothek . [(20190124 1828) ((emacs (24 4)) (pdf-tools (0 70)) (a (0 1 0 -3 4))) "Managing a digital library of PDFs" single ((:commit . "350af0e5d53307c900e4f8b2617f3852f51a74d2") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "tools") (:url . "https://dev.gkayaalp.com/elisp/index.html#bibliothek-el"))]) + (bibliothek . [(20190124 1828) ((emacs (24 4)) (pdf-tools (0 70)) (a (0 1 0 -3 4))) "Managing a digital library of PDFs" single ((:commit . "d7dd4fb11178fc4404e52621d451f794a84e46ae") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "tools") (:url . "https://dev.gkayaalp.com/elisp/index.html#bibliothek-el"))]) (bibretrieve . [(20191124 1855) ((auctex (11 87)) (emacs (24 3))) "Retrieve BibTeX entries from the internet" tar ((:commit . "81dc8e0db3629cc180eafb2bc34b60dcd8980316") (:authors ("Antonio Sartori")) (:maintainer "Pavel Zorin-Kranich" . "pzorin@uni-bonn.de") (:keywords "bibtex" "bibliography" "mathscinet" "arxiv" "zbmath") (:url . "https://github.com/pzorin/bibretrieve"))]) (bibslurp . [(20151202 2346) ((s (1 6 0)) (dash (1 5 0))) "retrieve BibTeX entries from NASA ADS" single ((:commit . "0116bbb04840d20a6b087e6d9c921bb1c2489a8f") (:keywords "bibliography" "nasa ads") (:url . "https://github.com/mkmcc/bibslurp"))]) (bibtex-completion . [(20220404 1608) ((parsebib (1 0)) (s (1 9 0)) (dash (2 6 0)) (f (0 16 2)) (cl-lib (0 5)) (biblio (0 2)) (emacs (26 1))) "A BibTeX backend for completion frameworks" single ((:commit . "ce8c17690ddad73d01531084b282f221f8eb6669") (:authors ("Titus von der Malsburg" . "malsburg@posteo.de") ("Justin Burkett" . "justin@burkett.cc")) (:maintainer "Titus von der Malsburg" . "malsburg@posteo.de") (:url . "https://github.com/tmalsburg/helm-bibtex"))]) @@ -350,7 +351,7 @@ (bookmark-view . [(20220403 2204) ((emacs (27 1))) "Bookmark views" single ((:commit . "0d40ac67f53b7fa75fe65c38a5ef65701ce4c3da") (:authors ("Daniel Mendler")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/bookmark-view"))]) (bool-flip . [(20161215 1539) ((emacs (24 3))) "flip the boolean under the point" single ((:commit . "f58a9a7b9ab875bcfbd57c8262697ae404eb4485") (:authors ("Michael Brandt" . "michaelbrandt5@gmail.com")) (:maintainer "Michael Brandt" . "michaelbrandt5@gmail.com") (:keywords "boolean" "convenience" "usability") (:url . "http://github.com/michaeljb/bool-flip/"))]) (boon . [(20220502 1850) ((emacs (26 1)) (dash (2 12 0)) (expand-region (0 10 0)) (multiple-cursors (1 3 0))) "Ergonomic Command Mode for Emacs." tar ((:commit . "db7b6083d390e3febf82f9af5782e1a36d30093c"))]) - (borg . [(20220509 2044) ((emacs (26)) (epkg (3 3 3)) (magit (3 3 0))) "Assimilate Emacs packages as Git submodules" tar ((:commit . "492e0e44bfa0576a8227be21635c6ef0a853ad38") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/borg"))]) + (borg . [(20220514 1916) ((emacs (26)) (epkg (3 3 3)) (magit (3 3 0))) "Assimilate Emacs packages as Git submodules" tar ((:commit . "04df5cac8c3ba8981833feabd15a87af319f734b") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/borg"))]) (borland-blue-theme . [(20160117 1321) ((emacs (24 1))) "Blue/yellow theme based on old DOS Borland/Turbo C IDE" single ((:commit . "db74eefebbc89d3c62575f8f50b319e87b4a3470") (:authors ("Alexey Veretennikov <alexey dot veretennikov at gmail dot com>")) (:maintainer "Alexey Veretennikov <alexey dot veretennikov at gmail dot com>") (:keywords "themes") (:url . "http://github.com/fourier/borland-blue-theme"))]) (boron-theme . [(20170808 1308) ((emacs (24 0))) "an Emacs 24 theme based on Boron (tmTheme)" single ((:commit . "87ae1a765e07429fec25d2f29b004f84b52d2e0a") (:authors ("Jason Milkins")) (:maintainer "Jason Milkins") (:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) (boxquote . [(20220105 1515) ((cl-lib (0 5))) "Quote text with a semi-box." single ((:commit . "67775ce80886b776efedceb31cdbacec1e26678e") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "quoting") (:url . "https://github.com/davep/boxquote.el"))]) @@ -374,10 +375,10 @@ (bubbleberry-theme . [(20141017 944) ((emacs (24 1))) "A theme based on LightTable for Emacs24" single ((:commit . "22e9adf4586414024e4592972022ec297321b320") (:authors ("Jason Milkins" . "jasonm23@gmail.com") ("Gaurav Giri github.com/grvgr")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com") (:url . "https://github.com/jasonm23/emacs-bubbleberry-theme"))]) (buckwalter . [(20191119 1950) nil "Write arabic using Buckwalter transliteration" single ((:commit . "b8c0c2170c7113b515477b1bb39c58d22aad67e1") (:authors ("Joe HAKIM RAHME" . "joehakimrahme@gmail.com")) (:maintainer "Joe HAKIM RAHME" . "joehakimrahme@gmail.com") (:keywords "arabic" "transliteration" "i18n") (:url . "https://github.com/joehakimrahme/buckwalter-arabic"))]) (buffer-buttons . [(20150106 1439) nil "Define, save, and load code-safe buttons in files for emacs" single ((:commit . "2feb8494fa7863b98256bc85da670d74a3a8a975") (:authors ("Ryan Pavlik" . "rpavlik@gmail.com")) (:maintainer "Ryan Pavlik" . "rpavlik@gmail.com") (:url . "https://github.com/rpav/buffer-buttons"))]) - (buffer-env . [(20220506 1506) ((emacs (27 1))) "Buffer-local process environments" single ((:commit . "7b7e5c2a79ad3b31b465387df0ccc18a5809f9d1") (:authors ("Augusto Stoffel" . "arstoffel@gmail.com")) (:maintainer "Augusto Stoffel" . "arstoffel@gmail.com") (:keywords "processes" "tools") (:url . "https://github.com/astoff/buffer-env"))]) + (buffer-env . [(20220513 1501) ((emacs (27 1))) "Buffer-local process environments" single ((:commit . "c76e282125779ea8de522dce899b974b5b343441") (:authors ("Augusto Stoffel" . "arstoffel@gmail.com")) (:maintainer "Augusto Stoffel" . "arstoffel@gmail.com") (:keywords "processes" "tools") (:url . "https://github.com/astoff/buffer-env"))]) (buffer-flip . [(20180307 2251) nil "Cycle through buffers like Alt-Tab in Windows" single ((:commit . "b8ecbf0251a59c351a3e44607ee502af343da64b") (:authors ("Russell Black" . "killdash9@github")) (:maintainer "Russell Black" . "killdash9@github") (:keywords "convenience") (:url . "https://github.com/killdash9/buffer-flip.el"))]) (buffer-manage . [(20211122 1957) ((emacs (26 1)) (choice-program (0 13)) (dash (2 17 0))) "Manage buffers" tar ((:commit . "819bbfd9ae2f028361f484bc3b60d751623a2df5") (:authors ("Paul Landes")) (:maintainer "Paul Landes") (:keywords "internal" "maint") (:url . "https://github.com/plandes/buffer-manage"))]) - (buffer-move . [(20160615 1803) nil "easily swap buffers" single ((:commit . "cb517ecf8409b5fdcda472d7190c6021f0c49751") (:keywords "lisp" "convenience") (:url . "https://github.com/lukhas/buffer-move"))]) + (buffer-move . [(20220512 755) ((emacs (24 1))) "easily swap buffers" single ((:commit . "e7800b3ab1bd76ee475ef35507ec51ecd5a3f065") (:keywords "convenience") (:url . "https://github.com/lukhas/buffer-move/"))]) (buffer-ring . [(20220120 124) ((emacs (25 1)) (dynaring (0 3)) (s (1 12 0)) (ht (2 0))) "Rings and tori for buffer navigation" single ((:commit . "177d67238c4d126a0270585e21c0f03ae750ca2a") (:authors ("Mike Mattie" . "codermattie@gmail.com") ("Sid Kasivajhula" . "sid@countvajhula.com")) (:maintainer "Sid Kasivajhula" . "sid@countvajhula.com") (:url . "https://github.com/countvajhula/buffer-ring"))]) (buffer-sets . [(20170718 340) ((cl-lib (0 5))) "Sets of Buffers for Buffer Management" single ((:commit . "bc84c2f79a33609cccf3c996101125859b2e26ab") (:authors ("Samuel W. Flint" . "swflint@flintfam.org")) (:maintainer "Samuel W. Flint" . "swflint@flintfam.org") (:keywords "buffer-management") (:url . "http://github.com/swflint/buffer-sets"))]) (buffer-utils . [(20140512 1400) nil "Buffer-manipulation utility functions" single ((:commit . "685b13457e3a2085b7584e41365d2aa0779a1b6f") (:authors ("Roland Walker" . "walker@pobox.com")) (:maintainer "Roland Walker" . "walker@pobox.com") (:keywords "extensions") (:url . "http://github.com/rolandwalker/buffer-utils"))]) @@ -422,14 +423,14 @@ (calfw-howm . [(20170704 4) nil "calendar view for howm" single ((:commit . "03abce97620a4a7f7ec5f911e669da9031ab9088") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "calendar"))]) (calfw-ical . [(20150703 819) nil "calendar view for ical format" single ((:commit . "03abce97620a4a7f7ec5f911e669da9031ab9088") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "calendar"))]) (calfw-org . [(20160303 258) nil "calendar view for org-agenda" single ((:commit . "03abce97620a4a7f7ec5f911e669da9031ab9088") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "calendar" "org"))]) - (calibredb . [(20220504 516) ((emacs (25 1)) (org (9 3)) (transient (0 1 0)) (s (1 12 0)) (dash (2 17 0)) (request (0 3 3)) (esxml (0 3 7))) "Yet another calibre client" tar ((:commit . "a59e8ab65601e30073fa55bef76e95c964c678d8") (:authors ("Damon Chan" . "elecming@gmail.com")) (:maintainer "Damon Chan" . "elecming@gmail.com") (:keywords "tools") (:url . "https://github.com/chenyanming/calibredb.el"))]) + (calibredb . [(20220511 1104) ((emacs (25 1)) (org (9 3)) (transient (0 1 0)) (s (1 12 0)) (dash (2 17 0)) (request (0 3 3)) (esxml (0 3 7))) "Yet another calibre client" tar ((:commit . "232fa1cf3af08200af439d1cbb5a131f38286183") (:authors ("Damon Chan" . "elecming@gmail.com")) (:maintainer "Damon Chan" . "elecming@gmail.com") (:keywords "tools") (:url . "https://github.com/chenyanming/calibredb.el"))]) (call-graph . [(20220506 1214) ((emacs (25 1)) (hierarchy (0 7 0)) (tree-mode (1 0 0)) (ivy (0 10 0))) "Generate call graph for c/c++ functions" tar ((:commit . "42023e5d1781c75f425e8c72b63b28e53dae6e9c") (:authors ("Huming Chen" . "chenhuming@gmail.com")) (:maintainer "Huming Chen" . "chenhuming@gmail.com") (:keywords "programming" "convenience") (:url . "https://github.com/beacoder/call-graph"))]) (calmer-forest-theme . [(20130926 510) nil "Darkish theme with green/orange tint" single ((:commit . "87ba7bae389084d13fe3bc34e0c923017eda6ba0") (:authors ("Artur Hefczyc, created 2003-04-18") ("David Caldwell" . "david@porkrind.org")) (:maintainer "Artur Hefczyc, created 2003-04-18") (:url . "https://github.com/caldwell/calmer-forest-theme"))]) (camcorder . [(20190317 2138) ((emacs (24)) (names (20150000)) (cl-lib (0 5))) "Record screencasts in gif or other formats." single ((:commit . "b11ca61491a27681bb3131b72b51c105fd996bed") (:authors ("Artur Malabarba" . "bruce.connor.am@gmail.com")) (:maintainer "Artur Malabarba" . "bruce.connor.am@gmail.com") (:keywords "multimedia" "screencast") (:url . "http://github.com/Bruce-Connor/camcorder.el"))]) (caml . [(20220503 1742) ((emacs (24 3))) "Caml mode for GNU Emacs" tar ((:commit . "f2f170f46b758341d96385986e8a93b9b4d248f1") (:authors ("Jacques Garrigue" . "garrigue@kurims.kyoto-u.ac.jp") ("Ian T Zimmerman" . "itz@rahul.net") ("Damien Doligez" . "damien.doligez@inria.fr")) (:maintainer "Christophe Troestler" . "Christophe.Troestler@umons.ac.be") (:keywords "ocaml") (:url . "https://github.com/ocaml/caml-mode"))]) (cangjie . [(20211201 2307) ((emacs (24 4)) (s (1 12 0)) (dash (2 14 1)) (f (0 2 0))) "Retrieve cangjie code for han characters" tar ((:commit . "87408d79b73a69194842a8848de6d7708e98c3a4") (:keywords "convenience" "writing") (:url . "https://github.com/kisaragi-hiu/cangjie.el"))]) (cape . [(20220506 1814) ((emacs (27 1))) "Completion At Point Extensions" tar ((:commit . "e72edf2d6357beb64798ef1894cc807190f80901") (:authors ("Daniel Mendler" . "mail@daniel-mendler.de")) (:maintainer "Daniel Mendler" . "mail@daniel-mendler.de") (:url . "https://github.com/minad/cape"))]) - (capnp-mode . [(20210707 2310) nil "Major mode for editing Capn' Proto Files" single ((:commit . "02dc92c900babbd232fbcdd14f7ccf44d234ee77") (:authors ("Brian Taylor" . "el.wubo@gmail.com")) (:maintainer "Brian Taylor" . "el.wubo@gmail.com") (:url . "https://github.com/capnproto/capnproto"))]) + (capnp-mode . [(20210707 2310) nil "Major mode for editing Capn' Proto Files" single ((:commit . "e9d72d361fd1247218433938d2c61b6e9ae98928") (:authors ("Brian Taylor" . "el.wubo@gmail.com")) (:maintainer "Brian Taylor" . "el.wubo@gmail.com") (:url . "https://github.com/capnproto/capnproto"))]) (capture . [(20130828 1644) nil "screencasting with \"avconv\" or \"ffmpeg\"" tar ((:commit . "1bb26060311da76767f70096218313fc93b0c806") (:authors ("Sergey Pashinin <sergey at pashinin dot com>")) (:maintainer "Sergey Pashinin <sergey at pashinin dot com>"))]) (carbon-now-sh . [(20201028 950) ((emacs (24 4))) "https://carbon.now.sh integration." single ((:commit . "6444a77a6065803cf97c3321f811bd34a8063d76") (:authors ("Vitalii Elenhaupt")) (:maintainer "Vitalii Elenhaupt") (:keywords "convenience") (:url . "https://github.com/veelenga/carbon-now-sh.el"))]) (cargo . [(20220311 827) ((emacs (24 3)) (markdown-mode (2 4))) "Emacs Minor Mode for Cargo, Rust's Package Manager." tar ((:commit . "8335b5577dfa526c645f7c1839c473f99b9ad1a8") (:authors ("Kevin W. van Rooijen")) (:maintainer "Kevin W. van Rooijen") (:keywords "tools"))]) @@ -442,11 +443,11 @@ (cask-package-toolset . [(20170921 2256) ((emacs (24)) (cl-lib (0 3)) (s (1 6 1)) (dash (1 8 0)) (f (0 10 0)) (commander (0 2 0)) (ansi (0 1 0)) (shut-up (0 1 0))) "Toolsettize your package" tar ((:commit . "2c74cd827e88c7f8360581a841e45f0b794510e7") (:authors ("Adrien Becchis" . "adriean.khisbe@live.fr")) (:maintainer "Adrien Becchis" . "adriean.khisbe@live.fr") (:keywords "convenience" "tools") (:url . "http://github.com/AdrieanKhisbe/cask-package-toolset.el"))]) (caskxy . [(20140513 1539) ((log4e (0 2 0)) (yaxception (0 1))) "Control Cask in Emacs" single ((:commit . "dc18dcab7ed526070ab76de071c9c5272e6ac40e") (:authors ("Hiroaki Otsu" . "ootsuhiroaki@gmail.com")) (:maintainer "Hiroaki Otsu" . "ootsuhiroaki@gmail.com") (:keywords "convenience") (:url . "https://github.com/aki2o/caskxy"))]) (catmacs . [(20170826 1157) ((emacs (24))) "Simple CAT interface for Yaesu Transceivers." single ((:commit . "65d3e0563abe6ff9577202cf2278074d4130fbdd") (:authors ("Frank Singleton" . "b17flyboy@gmail.com")) (:maintainer "Frank Singleton" . "b17flyboy@gmail.com") (:keywords "comm" "hardware") (:url . "https://bitbucket.org/pymaximus/catmacs"))]) - (catppuccin-theme . [(20220330 1021) ((emacs (25 1))) "Catppuccin Theme" single ((:commit . "352ebf62099e95cb4a71060a7d4a228f00358b97") (:authors ("pspiagicw")) (:maintainer "pspiagicw" . "pspiagicw@gmail.com") (:url . "https://github.com/catppuccin/emacs"))]) + (catppuccin-theme . [(20220515 435) ((emacs (25 1))) "Catppuccin Theme" single ((:commit . "9dcbe770d38f6ea417dc614caa4ab197bfa896a7") (:authors ("pspiagicw")) (:maintainer "pspiagicw" . "pspiagicw@gmail.com") (:url . "https://github.com/catppuccin/emacs"))]) (cbm . [(20171116 1240) ((cl-lib (0 5))) "Switch to similar buffers." single ((:commit . "5b41c936ba9f6d170309a85ffebc9939c1050b31") (:authors ("Lukas Fürmetz" . "fuermetz@mailbox.org")) (:maintainer "Lukas Fürmetz" . "fuermetz@mailbox.org") (:keywords "buffers") (:url . "http://github.com/akermu/cbm.el"))]) (cc-cedict . [(20210814 819) ((emacs (26 1))) "Interface to CC-CEDICT (a Chinese-English dictionary)" single ((:commit . "03fbe7d1589d36f627ef9fe7b86f9fe6f623cbb3") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:url . "https://github.com/xuchunyang/cc-cedict.el"))]) (ccc . [(20210501 820) nil "buffer local cursor color control library" single ((:commit . "c664b26d0861621ac86b5b5f47835dd84f06dc93") (:authors ("Masatake YAMATO" . "masata-y@is.aist-nara.ac.jp")) (:maintainer "SKK Development Team") (:keywords "cursor") (:url . "https://github.com/skk-dev/ddskk"))]) - (ccls . [(20200820 308) ((emacs (25 1)) (lsp-mode (6 3 1)) (dash (2 14 1))) "ccls client for lsp-mode" tar ((:commit . "675a5704c14a27931e835a431beea3631d92e8e6") (:authors ("Tobias Pisani, Fangrui Song")) (:maintainer "Tobias Pisani, Fangrui Song") (:keywords "languages" "lsp" "c++") (:url . "https://github.com/MaskRay/emacs-ccls"))]) + (ccls . [(20200820 308) ((emacs (25 1)) (lsp-mode (6 3 1)) (dash (2 14 1))) "ccls client for lsp-mode" tar ((:commit . "ae74a39303457a5e6976dd1c6816cde97d357a0d") (:authors ("Tobias Pisani, Fangrui Song")) (:maintainer "Tobias Pisani, Fangrui Song") (:keywords "languages" "lsp" "c++") (:url . "https://github.com/MaskRay/emacs-ccls"))]) (cd-compile . [(20141108 1957) nil "run compile in a specific directory" single ((:commit . "10284ccae86afda4a37b09ba90acd1e2efedec9f") (:authors ("Jamie Nicol" . "jamie@thenicols.net")) (:maintainer "Jamie Nicol" . "jamie@thenicols.net"))]) (cdb . [(20200904 1431) nil "constant database (cdb) reader for Emacs Lisp" single ((:commit . "c664b26d0861621ac86b5b5f47835dd84f06dc93") (:authors ("Yusuke Shinyama <yusuke at cs . nyu . edu>")) (:maintainer "SKK Development Team") (:keywords "cdb") (:url . "https://github.com/skk-dev/ddskk"))]) (cdlatex . [(20210804 452) nil "Fast input methods for LaTeX environments and math" single ((:commit . "8e963c68531f75e459e8ebe7a34fd3ba9d3729a0") (:authors ("Carsten Dominik" . "carsten.dominik@gmail.com")) (:maintainer "Carsten Dominik" . "carsten.dominik@gmail.com") (:keywords "tex"))]) @@ -466,7 +467,7 @@ (cfn-mode . [(20220221 1029) ((emacs (26 0)) (f (0 20 0)) (s (1 12 0)) (yaml-mode (0 0 13))) "AWS cloudformation mode" tar ((:commit . "4cf56affe3035fda364109836e26499431095185") (:authors ("William Orr" . "will@worrbase.com")) (:maintainer "William Orr" . "will@worrbase.com") (:keywords "convenience" "languages" "tools") (:url . "https://gitlab.com/worr/cfn-mode"))]) (cframe . [(20201222 1930) ((emacs (26)) (buffer-manage (0 11)) (dash (2 17 0))) "Customize a frame and fast switch size and positions" single ((:commit . "38544521e82befc06e397123a118dd96dda2c6b6") (:authors ("Paul Landes")) (:maintainer "Paul Landes") (:keywords "frames") (:url . "https://github.com/plandes/cframe"))]) (cfrs . [(20220129 1149) ((emacs (26 1)) (dash (2 11 0)) (s (1 10 0)) (posframe (0 6 0))) "Child-frame based read-string" single ((:commit . "f3a21f237b2a54e6b9f8a420a9da42b4f0a63121") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/cfrs"))]) - (cg . [(20220318 1007) ((emacs (26 1))) "Major mode for editing Constraint Grammar files" single ((:commit . "06011b53bf64d671c74a79757332b9ef13f47f2b") (:authors ("Kevin Brubeck Unhammer" . "unhammer@fsfe.org")) (:maintainer "Kevin Brubeck Unhammer" . "unhammer@fsfe.org") (:keywords "languages") (:url . "https://visl.sdu.dk/constraint_grammar.html"))]) + (cg . [(20220318 1007) ((emacs (26 1))) "Major mode for editing Constraint Grammar files" single ((:commit . "0a526709f55f8074f8846f8e7b9090431f1d6a47") (:authors ("Kevin Brubeck Unhammer" . "unhammer@fsfe.org")) (:maintainer "Kevin Brubeck Unhammer" . "unhammer@fsfe.org") (:keywords "languages") (:url . "https://visl.sdu.dk/constraint_grammar.html"))]) (challenger-deep-theme . [(20210120 941) ((emacs (24))) "challenger-deep Theme" single ((:commit . "2a799259406a8b96a688873093ffab6630a3ad3b") (:authors ("MaxSt")) (:maintainer "MaxSt") (:url . "https://github.com/challenger-deep-theme/emacs"))]) (change-inner . [(20210126 1456) ((expand-region (0 7))) "Change contents based on semantic units" single ((:commit . "42cad58aed2caec260f8e8ff61f78a7d3db72d1b") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "convenience" "extensions"))]) (chapel-mode . [(20210513 457) ((emacs (25 1)) (hydra (0 15 0))) "A major mode for the Chapel programming language" single ((:commit . "39fd24bb7cf44808200354ac0496be4fc4fddd9a") (:keywords "chapel" "chpl" "programming" "languages") (:url . "https://github.com/damon-kwok/chapel-mode"))]) @@ -491,14 +492,14 @@ (chocolate-theme . [(20210128 1647) ((emacs (24 1)) (autothemer (0 2))) "A dark chocolaty theme" single ((:commit . "ccc05f7ad96d3d1332727689bf6250443adc7ec0") (:url . "http://github.com/SavchenkoValeriy/emacs-chocolate-theme"))]) (choice-program . [(20201217 1751) ((emacs (26)) (dash (2 17 0))) "Parameter based program" tar ((:commit . "b8b1b6c5568f8778783454d5747912487c8e69b8") (:authors ("Paul Landes")) (:maintainer "Paul Landes") (:keywords "execution" "processes" "unix" "lisp") (:url . "https://github.com/plandes/choice-program"))]) (chronometer . [(20190304 1528) ((emacs (24))) "a [not so] simple chronometer" single ((:commit . "8457b296ef87be339cbe47730b922757d60bdcd5") (:authors ("Marcelo Toledo" . "marcelo@marcelotoledo.com")) (:maintainer "Marcelo Toledo" . "marcelo@marcelotoledo.com") (:keywords "tools" "convenience") (:url . "https://github.com/marcelotoledo/chronometer"))]) - (chronometrist . [(20220415 1213) ((emacs (27 1)) (dash (2 16 0)) (seq (2 20)) (ts (0 2))) "Friendly and powerful personal time tracker and analyzer" tar ((:commit . "f7b2defceed8bafb87da704ce3e7774f53abf1c4") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) + (chronometrist . [(20220415 1213) ((emacs (27 1)) (dash (2 16 0)) (seq (2 20)) (ts (0 2))) "Friendly and powerful personal time tracker and analyzer" tar ((:commit . "5da2a39a794577c3b703c711843a5153f657bbe6") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) (chronometrist-goal . [(20210510 1831) ((emacs (25 1)) (alert (1 2)) (chronometrist (0 7 0))) "Adds support for time goals to Chronometrist" single ((:commit . "6cb939d160f5d5966d7853aa23f3ed7c7ef9df44") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabber.fr")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabber.fr") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist-goal"))]) - (chronometrist-key-values . [(20220414 726) ((chronometrist (0 7 0))) "add key-values to Chronometrist data" tar ((:commit . "f7b2defceed8bafb87da704ce3e7774f53abf1c4") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) - (chronometrist-spark . [(20220321 349) ((emacs (25 1)) (chronometrist (0 7 0)) (spark (0 1))) "Show sparklines in Chronometrist buffers" tar ((:commit . "f7b2defceed8bafb87da704ce3e7774f53abf1c4") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) + (chronometrist-key-values . [(20220414 726) ((chronometrist (0 7 0))) "add key-values to Chronometrist data" tar ((:commit . "5da2a39a794577c3b703c711843a5153f657bbe6") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) + (chronometrist-spark . [(20220321 349) ((emacs (25 1)) (chronometrist (0 7 0)) (spark (0 1))) "Show sparklines in Chronometrist buffers" tar ((:commit . "5da2a39a794577c3b703c711843a5153f657bbe6") (:authors ("contrapunctus" . "xmpp:contrapunctus@jabjab.de")) (:maintainer "contrapunctus" . "xmpp:contrapunctus@jabjab.de") (:keywords "calendar") (:url . "https://tildegit.org/contrapunctus/chronometrist"))]) (chronos . [(20150602 1529) nil "multiple simultaneous countdown / countup timers" tar ((:commit . "b360d9dae57aa553cf2a14ffa0756a51ad71de09") (:authors ("David Knight" . "dxknight@opmbx.org")) (:maintainer "David Knight" . "dxknight@opmbx.org") (:keywords "calendar") (:url . "http://github.com/dxknight/chronos"))]) (chruby . [(20180114 1652) ((cl-lib (0 5))) "Emacs integration for chruby" single ((:commit . "42bc6d521f832eca8e2ba210f30d03ad5529788f") (:authors ("Arne Brasseur" . "arne@arnebrasseur.net")) (:maintainer "Arne Brasseur" . "arne@arnebrasseur.net") (:keywords "languages") (:url . "https://github.com/plexus/chruby.el"))]) (chyla-theme . [(20180302 1658) nil "chyla.org - green color theme." single ((:commit . "ae5e7ecace2ab474151eb0ac5ef07fba2dc32f8a") (:authors ("Adam Chyła" . "adam@chyla.org")) (:maintainer "Adam Chyła" . "adam@chyla.org") (:url . "https://github.com/chyla/ChylaThemeForEmacs"))]) - (cider . [(20220507 1357) ((emacs (26)) (clojure-mode (5 14)) (parseedn (1 0 6)) (queue (0 2)) (spinner (1 7)) (seq (2 22)) (sesman (0 3 2))) "Clojure Interactive Development Environment that Rocks" tar ((:commit . "69d374818bd0af1489ee8828b258c689ccc24a66") (:authors ("Tim King" . "kingtim@gmail.com") ("Phil Hagelberg" . "technomancy@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.dev") ("Artur Malabarba" . "bruce.connor.am@gmail.com") ("Hugo Duncan" . "hugo@hugoduncan.org") ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.dev") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider"))]) + (cider . [(20220515 1458) ((emacs (26)) (clojure-mode (5 14)) (parseedn (1 0 6)) (queue (0 2)) (spinner (1 7)) (seq (2 22)) (sesman (0 3 2))) "Clojure Interactive Development Environment that Rocks" tar ((:commit . "0d2ba20c029b12582e5fa318f046f2feddc1b270") (:authors ("Tim King" . "kingtim@gmail.com") ("Phil Hagelberg" . "technomancy@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.dev") ("Artur Malabarba" . "bruce.connor.am@gmail.com") ("Hugo Duncan" . "hugo@hugoduncan.org") ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.dev") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider"))]) (cider-decompile . [(20151122 537) ((cider (0 3 0)) (javap-mode (9))) "decompilation extension for cider" single ((:commit . "5d87035f3c3c14025e8f01c0c53d0ce2c8f56651") (:authors ("Dmitry Bushenko")) (:maintainer "Dmitry Bushenko") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider-decompile"))]) (cider-eval-sexp-fu . [(20190311 2152) ((emacs (24)) (eval-sexp-fu (0 5 0))) "Briefly highlights an evaluated sexp." single ((:commit . "7fd229f1441356866aedba611fd0cf4e89b50921") (:authors ("Sylvain Benner" . "sylvain.benner@gmail.com")) (:maintainer "Sylvain Benner" . "sylvain.benner@gmail.com") (:keywords "languages" "clojure" "cider"))]) (cider-hydra . [(20190816 1121) ((cider (0 22 0)) (hydra (0 13 0))) "Hydras for CIDER." single ((:commit . "c3b8a15d72dddfbc390ab6a454bd7e4c765a2c95") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/clojure-emacs/cider-hydra"))]) @@ -510,7 +511,7 @@ (circe . [(20220421 1956) ((emacs (24 5)) (cl-lib (0 5))) "Client for IRC in Emacs" tar ((:commit . "710f057fedae6e9b820cce9336fef24b7d057e4c") (:authors ("Jorgen Schaefer" . "forcer@forcix.cx")) (:maintainer "Jorgen Schaefer" . "forcer@forcix.cx") (:keywords "irc" "chat" "comm") (:url . "https://github.com/emacs-circe/circe"))]) (circe-notifications . [(20180102 2318) ((emacs (24 4)) (circe (2 3)) (alert (1 2))) "Add desktop notifications to Circe." single ((:commit . "291149ac12877bbd062da993479d3533a26862b0") (:authors ("Ruben Maher" . "r@rkm.id.au")) (:maintainer "Ruben Maher" . "r@rkm.id.au") (:url . "https://github.com/eqyiel/circe-notifications"))]) (circleci-api . [(20210227 1607) ((emacs (27)) (request (0 3 2))) "Bindings for the CircleCI API" single ((:commit . "2e39c5896819bb2063f9d7795c4299f419cf5542") (:authors ("Robin Schroer")) (:maintainer "Robin Schroer") (:url . "https://github.com/sulami/circleci-api"))]) - (citar . [(20220509 2336) ((emacs (27 1)) (parsebib (3 0)) (org (9 5)) (citeproc (0 9))) "Citation-related commands for org, latex, markdown" tar ((:commit . "9a6fc6da11ad2b475244cc4cbd51c77615e9aad3") (:authors ("Bruce D'Arcus <https://github.com/bdarcus>")) (:maintainer "Bruce D'Arcus <https://github.com/bdarcus>") (:url . "https://github.com/bdarcus/citar"))]) + (citar . [(20220515 1726) ((emacs (27 1)) (parsebib (3 0)) (org (9 5)) (citeproc (0 9))) "Citation-related commands for org, latex, markdown" tar ((:commit . "a2d7a9975a1535a8cc587ca1ed8847e743203da6") (:authors ("Bruce D'Arcus <https://github.com/bdarcus>")) (:maintainer "Bruce D'Arcus <https://github.com/bdarcus>") (:url . "https://github.com/bdarcus/citar"))]) (citeproc . [(20220124 721) ((emacs (25)) (dash (2 13 0)) (s (1 12 0)) (f (0 18 0)) (queue (0 2)) (string-inflection (1 0)) (org (9)) (parsebib (2 4))) "A CSL 1.0.2 Citation Processor" tar ((:commit . "ba49516265fa24b138346c4918d39d19b4de8a62") (:authors ("András Simonyi" . "andras.simonyi@gmail.com")) (:maintainer "András Simonyi" . "andras.simonyi@gmail.com") (:keywords "bib") (:url . "https://github.com/andras-simonyi/citeproc-el"))]) (citeproc-org . [(20200915 2009) ((emacs (25 1)) (dash (2 12 0)) (org (9)) (f (0 18 0)) (citeproc (0 1)) (org-ref (1 1 1))) "Render org-mode references in CSL styles" tar ((:commit . "20cd7e817420a3f6e7b82faea901a3c67c6d4d9f") (:authors ("András Simonyi" . "andras.simonyi@gmail.com")) (:maintainer "András Simonyi" . "andras.simonyi@gmail.com") (:keywords "org-ref" "org-mode" "cite" "bib") (:url . "https://github.com/andras-simonyi/citeproc-org"))]) (citre . [(20220427 1203) ((emacs (26 1))) "Ctags IDE on the True Editor" tar ((:commit . "87e2cbf3b2ae6d59ec919a2dcb38e56ccfa5ec14") (:authors ("Hao Wang" . "amaikinono@gmail.com")) (:maintainer "Hao Wang" . "amaikinono@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/universal-ctags/citre"))]) @@ -556,7 +557,7 @@ (cm-mode . [(20170203 2107) ((cl-lib (0 5))) "Minor mode for CriticMarkup" single ((:commit . "276d49c859822265070ae5dfbb403fd7d8d06436") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "markdown"))]) (cmake-font-lock . [(20211224 2006) ((cmake-mode (0 0))) "Advanced, type aware, highlight support for CMake" single ((:commit . "0d6111b36a66013aa9b452e664c93308df3b07e1") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "faces" "languages") (:url . "https://github.com/Lindydancer/cmake-font-lock"))]) (cmake-ide . [(20210610 1525) ((emacs (24 4)) (cl-lib (0 5)) (seq (1 11)) (levenshtein (0)) (s (1 11 0))) "Calls CMake to find out include paths and other compiler flags" single ((:commit . "28dc4ab5bd01d99553901b4efeb7234280928b18") (:authors ("Atila Neves" . "atila.neves@gmail.com")) (:maintainer "Atila Neves" . "atila.neves@gmail.com") (:keywords "languages") (:url . "http://github.com/atilaneves/cmake-ide"))]) - (cmake-mode . [(20220322 1258) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "02b4cd9827b7f2354350bef4e44cb3514edb5c26"))]) + (cmake-mode . [(20220322 1258) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "943210856ae433708a7e12866e94f6dcaacc3248"))]) (cmake-project . [(20171121 1115) nil "Integrates CMake build process with Emacs" single ((:commit . "a7cf9e4c01c4683e14b6942cc5cc5e8cddc98721") (:authors ("Alexander Lamaison" . "alexander.lamaison@gmail")) (:maintainer "Alexander Lamaison" . "alexander.lamaison@gmail") (:keywords "c" "cmake" "languages" "tools") (:url . "http://github.com/alamaison/emacs-cmake-project"))]) (cmd-to-echo . [(20161203 2133) ((emacs (24 4)) (s (1 11 0)) (shell-split-string (20151224 208))) "Show the output of long-running commands in the echo area" single ((:commit . "e0e874fc0e1ad6d291e39ed76023445297ad438a") (:authors ("Tijs Mallaerts" . "tijs.mallaerts@gmail.com")) (:maintainer "Tijs Mallaerts" . "tijs.mallaerts@gmail.com"))]) (cmm-mode . [(20150225 746) nil "Major mode for C-- source code" single ((:commit . "c3ad514dff3eb30434f6b20d953276d4c00de1ee"))]) @@ -608,7 +609,7 @@ (company-ansible . [(20200306 1441) ((emacs (24 4)) (company (0 8 12))) "A company back-end for ansible" tar ((:commit . "79dd421b161efa49fbdffad57fa40edb41f484a3") (:authors ("Krzysztof Magosa" . "krzysztof@magosa.pl")) (:maintainer "Krzysztof Magosa" . "krzysztof@magosa.pl") (:keywords "ansible") (:url . "https://github.com/krzysztof-magosa/company-ansible"))]) (company-arduino . [(20160306 1739) ((emacs (24 1)) (company (0 8 0)) (irony (0 1 0)) (cl-lib (0 5)) (company-irony (0 1 0)) (company-c-headers (20140930)) (arduino-mode (1 0))) "company-mode for Arduino" single ((:commit . "d7e369702b8eee63e6dfdeba645ce28b6dc66fb1") (:authors ("Yuta Yamada" . "sleepboy.zzz@gmail.com")) (:maintainer "Yuta Yamada" . "sleepboy.zzz@gmail.com") (:keywords "convenience" "development" "company") (:url . "https://github.com/yuutayamada/company-arduino"))]) (company-auctex . [(20200529 1835) ((yasnippet (0 8 0)) (company (0 8 0)) (auctex (11 87))) "Company-mode auto-completion for AUCTeX" single ((:commit . "9400a2ec7459dde8cbf1a5d50dfee4e300ed7e18") (:authors ("Christopher Monsanto <chris@monsan.to>, Alexey Romanov" . "alexey.v.romanov@gmail.com")) (:maintainer "Christopher Monsanto <chris@monsan.to>, Alexey Romanov" . "alexey.v.romanov@gmail.com") (:url . "https://github.com/alexeyr/company-auctex/"))]) - (company-axiom . [(20191027 1928) ((emacs (24)) (company (0 9)) (axiom-environment (20171021))) "A company-mode backend for the axiom-environment system" single ((:commit . "e60de5ed107ffeb530a56d24d04f38988124d12b") (:authors ("Paul Onions" . "paul.onions@acm.org")) (:maintainer "Paul Onions" . "paul.onions@acm.org") (:keywords "axiom" "openaxiom" "fricas" "axiom-environment"))]) + (company-axiom . [(20191027 1928) ((emacs (24)) (company (0 9)) (axiom-environment (20171021))) "A company-mode backend for the axiom-environment system" single ((:commit . "847cc6e728b692ad3fdaec28d0c8c49ec0378a56") (:authors ("Paul Onions" . "paul.onions@acm.org")) (:maintainer "Paul Onions" . "paul.onions@acm.org") (:keywords "axiom" "openaxiom" "fricas" "axiom-environment"))]) (company-bibtex . [(20171105 644) ((company (0 9 0)) (cl-lib (0 5)) (parsebib (1 0))) "Company completion for bibtex keys" single ((:commit . "da67faf3a6faba8e7f1b222dedfc5521b02c7655") (:authors ("GB Gardner" . "gbgar@users.noreply.github.com")) (:maintainer "GB Gardner" . "gbgar@users.noreply.github.com") (:keywords "company-mode" "bibtex") (:url . "https://github.com/gbgar/company-bibtex"))]) (company-box . [(20211020 2007) ((emacs (26 0 91)) (dash (2 19 0)) (company (0 9 6)) (frame-local (0 0 1))) "Company front-end with icons" tar ((:commit . "f9cbbc7df8efbb56a8d31a5b422d158660d9109e") (:authors ("Sebastien Chapuis" . "sebastien@chapu.is")) (:maintainer "Sebastien Chapuis" . "sebastien@chapu.is") (:keywords "company" "completion" "front-end" "convenience") (:url . "https://github.com/sebastiencs/company-box"))]) (company-c-headers . [(20190825 1631) ((emacs (24 1)) (company (0 8))) "Company mode backend for C/C++ header files" single ((:commit . "9d384571b1190e99d0a789e5296176d69a3d0771") (:authors ("Alastair Rankine" . "alastair@girtby.net")) (:maintainer "Alastair Rankine" . "alastair@girtby.net") (:keywords "development" "company"))]) @@ -697,10 +698,10 @@ (consult-ghq . [(20210606 2047) ((emacs (26 1)) (consult (0 8)) (affe (0 1))) "Ghq interface using consult" single ((:commit . "c8619d66bd8f8728e43ed15096078b89eb4d2083") (:authors ("Tomoya Otake" . "tomoya.ton@gmail.com")) (:maintainer "Tomoya Otake" . "tomoya.ton@gmail.com") (:keywords "convenience" "usability" "consult" "ghq") (:url . "https://github.com/tomoya/consult-ghq"))]) (consult-ls-git . [(20220501 1823) ((emacs (27 1)) (consult (0 16))) "Consult integration for git" single ((:commit . "f2398b354994e583ad22af324a129cf94d06009e") (:authors ("Robin Joy")) (:maintainer "Robin Joy") (:keywords "convenience") (:url . "https://github.com/rcj/consult-ls-git"))]) (consult-lsp . [(20220507 856) ((emacs (27 1)) (lsp-mode (5 0)) (consult (0 16)) (f (0 20 0))) "LSP-mode Consult integration" single ((:commit . "19606a03cf854e1b0930c4526ed92c4560dccdc2") (:authors ("Gerry Agbobada")) (:maintainer "Gerry Agbobada") (:keywords "tools" "completion" "lsp") (:url . "https://github.com/gagbo/consult-lsp"))]) - (consult-notmuch . [(20220421 717) ((emacs (26 1)) (consult (0 9)) (notmuch (0 31))) "Notmuch search using consult" single ((:commit . "16eb2c100ca144140f07014c32e99487c6a73e18") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "mail") (:url . "https://codeberg.org/jao/consult-notmuch"))]) + (consult-notmuch . [(20220513 1647) ((emacs (26 1)) (consult (0 9)) (notmuch (0 31))) "Notmuch search using consult" single ((:commit . "4138855cddee0ef126cff6a5fc5ca9c49fd2682d") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "mail") (:url . "https://codeberg.org/jao/consult-notmuch"))]) (consult-org-roam . [(20220508 1232) ((emacs (27 1)) (org-roam (2 2 0)) (consult (0 16))) "Consult integration for org-roam" single ((:commit . "05cec288f931a1f3cd5984b88a79f1339110e4b9") (:authors ("jgru <https://github.com/jgru>")) (:maintainer "jgru <https://github.com/jgru>") (:url . "https://github.com/jgru/consult-org-roam"))]) (consult-project-extra . [(20220424 1815) ((emacs (27 1)) (consult (0 17)) (project (0 8 1))) "Consult integration for project.el" single ((:commit . "fa882a0bf9b697ebb59d0dfa2ffd81ea6daabf41") (:authors ("Enrique Kessler Martínez")) (:maintainer "Enrique Kessler Martínez") (:keywords "convenience" "project" "management") (:url . "https://github.com/Qkessler/consult-project-extra"))]) - (consult-projectile . [(20220505 1139) ((emacs (25 1)) (consult (0 12)) (projectile (2 5 0))) "Consult integration for projectile" single ((:commit . "8e618bc62405e345cc59e891f82d8ee45691010a") (:authors ("Marco Pawłowski")) (:maintainer "Marco Pawłowski") (:keywords "convenience") (:url . "https://gitlab.com/OlMon/consult-projectile"))]) + (consult-projectile . [(20220511 2103) ((emacs (25 1)) (consult (0 12)) (projectile (2 5 0))) "Consult integration for projectile" single ((:commit . "130ba9d3879bc293d81b1aa9fbfd0dffae3b5579") (:authors ("Marco Pawłowski")) (:maintainer "Marco Pawłowski") (:keywords "convenience") (:url . "https://gitlab.com/OlMon/consult-projectile"))]) (consult-recoll . [(20220227 2050) ((emacs (26 1)) (consult (0 9))) "Recoll queries using consult" single ((:commit . "228306eeda8c57db45609ca068f60ee433367c17") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "docs" "convenience") (:url . "https://codeberg.org/jao/consult-recoll"))]) (consult-spotify . [(20211114 2258) ((emacs (26 1)) (consult (0 8)) (espotify (0 1))) "Spotify queries using consult" single ((:commit . "ea6d6021e5acc550560325db2f09198839ee702f") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "multimedia") (:url . "https://codeberg.org/jao/espotify"))]) (consult-yasnippet . [(20220409 1209) ((emacs (27 1)) (yasnippet (0 14)) (consult (0 16))) "A consulting-read interface for yasnippet" single ((:commit . "cdb256d2c50e4f8473c6052e1009441b65b8f8ab") (:authors ("mohsin kaleem" . "mohkale@kisara.moe")) (:maintainer "mohsin kaleem" . "mohkale@kisara.moe") (:url . "https://github.com/mohkale/consult-yasnippet"))]) @@ -714,21 +715,21 @@ (copyit . [(20190919 1258) ((emacs (24 3)) (s (1 9 0))) "Copy it, yank anything!" single ((:commit . "c4f2c28e5b6270e8e3364341619f1154bb4e682e") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "convenience" "yank" "clipboard") (:url . "https://github.com/zonuexe/emacs-copyit"))]) (copyit-pandoc . [(20190919 1258) ((emacs (24 3)) (copyit (0 1 0)) (pandoc (0 0 1))) "Copy it, yank anything!" single ((:commit . "c4f2c28e5b6270e8e3364341619f1154bb4e682e") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "convenience" "yank" "clipboard") (:url . "https://github.com/zonuexe/emacs-copyit"))]) (coq-commenter . [(20170822 2309) ((dash (2 13 0)) (s (1 11 0)) (cl-lib (0 5))) "Coq commenting minor mode for proof" single ((:commit . "7fe9a2cc0ebdb0b1e54a24eb7971d757fb588ac3") (:authors ("Junyoung Clare Jang" . "jjc9310@gmail.com")) (:maintainer "Junyoung Clare Jang" . "jjc9310@gmail.com") (:keywords "comment" "coq" "proof") (:url . "http://github.com/ailrun/coq-commenter"))]) - (corfu-doc . [(20220429 1348) ((emacs (26 0)) (corfu (0 16 0))) "Documentation popup for Corfu" single ((:commit . "5a6f4f879de6dc2ca6e22789878d416e88e85905") (:authors ("Yuwei Tian" . "ibluefocus@NOSPAM.gmail.com")) (:maintainer "Yuwei Tian" . "ibluefocus@NOSPAM.gmail.com") (:keywords "corfu" "popup" "documentation" "convenience") (:url . "https://github.com/galeo/corfu-doc"))]) + (corfu-doc . [(20220513 1155) ((emacs (26 0)) (corfu (0 16 0))) "Documentation popup for Corfu" single ((:commit . "96b5de8cced0f2c2069748305bb72cf2db77200e") (:authors ("Yuwei Tian" . "ibluefocus@NOSPAM.gmail.com")) (:maintainer "Yuwei Tian" . "ibluefocus@NOSPAM.gmail.com") (:keywords "corfu" "popup" "documentation" "convenience") (:url . "https://github.com/galeo/corfu-doc"))]) (corral . [(20160502 701) nil "Quickly surround text with delimiters" single ((:commit . "e7ab6aa118e46b93d4933d1364bc273f57cd6911") (:authors ("Kevin Liu" . "mail@nivekuil.com")) (:maintainer "Kevin Liu" . "mail@nivekuil.com") (:url . "http://github.com/nivekuil/corral"))]) (cort . [(20211020 18) ((emacs (24 1)) (ansi (0 4)) (cl-lib (0 6))) "Simplify extended unit test framework" single ((:commit . "3f64a7b03a4c5b768ec21fd5987acd0d62d16c7b") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "test" "lisp") (:url . "https://github.com/conao3/cort.el"))]) (cosmo . [(20170922 744) ((emacs (24 4))) "Cosmological Calculator" single ((:commit . "dd83b09a49a2843606b28279b674b2207040b36b") (:authors ("Francesco Montanari" . "fmnt@fmnt.info")) (:maintainer "Francesco Montanari" . "fmnt@fmnt.info") (:keywords "tools") (:url . "https://gitlab.com/montanari/cosmo-el"))]) (counsel . [(20220402 953) ((emacs (24 5)) (ivy (0 13 4)) (swiper (0 13 4))) "Various completion functions using Ivy" single ((:commit . "8bf8027e4bd8c093bddb76a813952d2a0dcbf21d") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "convenience" "matching" "tools") (:url . "https://github.com/abo-abo/swiper"))]) (counsel-ag-popup . [(20210121 805) ((emacs (26 1)) (counsel (0 13 0)) (transient (0 3 0))) "Interactive search with counsel-ag" single ((:commit . "41d85fe36edd72da68f5009ad9cf9013cd19960d") (:authors ("Eder Elorriaga" . "gexplorer8@gmail.com")) (:maintainer "Eder Elorriaga" . "gexplorer8@gmail.com") (:keywords "convenience" "matching" "tools") (:url . "https://github.com/gexplorer/counsel-ag-popup"))]) - (counsel-at-point . [(20220507 1118) ((emacs (26 2)) (counsel (0 13 0))) "Context sensitive project search" single ((:commit . "f618411fc8f607e4c93b5efa98584fd461c53ac6") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:keywords "convenience") (:url . "https://codeberg.com/ideasman42/emacs-counsel-at-point"))]) + (counsel-at-point . [(20220507 1118) ((emacs (26 2)) (counsel (0 13 0))) "Context sensitive project search" single ((:commit . "3e731889dd4519d16c38d5ad20f4ecdea0c95475") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:keywords "convenience") (:url . "https://codeberg.com/ideasman42/emacs-counsel-at-point"))]) (counsel-bbdb . [(20181128 1320) ((ivy (0 8 0)) (emacs (24 3))) "Quick search&input email from BBDB based on ivy" single ((:commit . "df2890deb73b09f8055243bd91942ea887d9b7a1") (:authors ("Chen Bin <chenbin.sh AT gmail>")) (:maintainer "Chen Bin <chenbin.sh AT gmail>") (:keywords "mail" "abbrev" "convenience" "matching") (:url . "https://github.com/redguard/counsel-bbdb"))]) (counsel-chrome-bm . [(20211022 1427) ((emacs (25 1)) (counsel (0 13 0))) "Browse Chrom(e/ium) bookmarks with Ivy" single ((:commit . "72b31889581f20f4037c0361f5259ff3633bc128") (:authors ("BlueBoxWare" . "BlueBoxWare@users.noreply.github.com")) (:maintainer "BlueBoxWare" . "BlueBoxWare@users.noreply.github.com") (:keywords "hypermedia") (:url . "https://github.com/BlueBoxWare/counsel-chrome-bm"))]) (counsel-codesearch . [(20180925 803) ((codesearch (1)) (counsel (0 10 0)) (emacs (24)) (ivy (0 10 0))) "Counsel interface for codesearch.el" single ((:commit . "b7989fad3e06f301c31d5e896c42b6cc549a0e0c") (:authors ("Austin Bingham" . "austin.bingham@gmail.com")) (:maintainer "Austin Bingham" . "austin.bingham@gmail.com") (:keywords "tools") (:url . "https://github.com/abingham/emacs-counsel-codesearch"))]) (counsel-css . [(20211115 1755) ((emacs (24 4)) (counsel (0 7 0)) (cl-lib (0 5))) "stylesheet-selector-aware swiper" single ((:commit . "8e9c0515fc952452eee786d8ebb43d48ea86c9f8") (:authors ("Henrik Lissner <http://github/hlissner>")) (:maintainer "Henrik Lissner" . "contact@henrik.io") (:keywords "convenience" "tools" "counsel" "swiper" "selector" "css" "less" "scss") (:url . "https://github.com/hlissner/emacs-counsel-css"))]) (counsel-dash . [(20200103 1411) ((emacs (24 4)) (dash-docs (1 4 0)) (counsel (0 8 0)) (cl-lib (0 5))) "Browse dash docsets using Ivy" single ((:commit . "370d5f6f14b5294d0eb717f7b2a6a8e93df1ed24") (:authors ("Nathan Kot" . "nk@nathankot.com")) (:maintainer "Nathan Kot" . "nk@nathankot.com") (:keywords "dash" "ivy" "counsel") (:url . "https://github.com/nathankot/counsel-dash"))]) (counsel-edit-mode . [(20210824 1504) ((emacs (26 1)) (ht (2 3)) (s (1 12 0)) (counsel (0 10 0))) "Edit results of counsel commands in-place" single ((:commit . "378803ac0040c04762ff001ab1aca7d4325ecf22") (:authors ("Tyler Dodge")) (:maintainer "Tyler Dodge") (:keywords "convenience" "matching") (:url . "https://github.com/tyler-dodge/counsel-edit-mode"))]) - (counsel-etags . [(20220405 510) ((emacs (25 1)) (counsel (0 13 4))) "Fast and complete Ctags/Etags solution using ivy" single ((:commit . "c74ae94297c4a2dc0b6878c2e9460a4f386158d4") (:authors ("Chen Bin <chenbin dot sh AT gmail dot com>")) (:maintainer "Chen Bin <chenbin dot sh AT gmail dot com>") (:keywords "tools" "convenience") (:url . "http://github.com/redguardtoo/counsel-etags"))]) - (counsel-fd . [(20210606 1724) ((counsel (0 12 0))) "counsel interface for fd" single ((:commit . "e9513a3c7f6cdbdf038f951e828e631c0455e7d4") (:keywords "tools") (:url . "https://github.com/CsBigDataHub/counsel-fd"))]) + (counsel-etags . [(20220516 1309) ((emacs (25 1)) (counsel (0 13 4))) "Fast and complete Ctags/Etags solution using ivy" single ((:commit . "3541edc21ab67ef4c51d8081418e699c956d0e90") (:authors ("Chen Bin <chenbin dot sh AT gmail dot com>")) (:maintainer "Chen Bin <chenbin dot sh AT gmail dot com>") (:keywords "tools" "convenience") (:url . "http://github.com/redguardtoo/counsel-etags"))]) + (counsel-fd . [(20220514 2227) ((counsel (0 12 0))) "counsel interface for fd" single ((:commit . "c1ba2e36fe69111e7f6f42ea1b0e3b7a45d96de0") (:keywords "tools") (:url . "https://github.com/CsBigDataHub/counsel-fd"))]) (counsel-ffdata . [(20191017 1237) ((emacs (25 1)) (counsel (0 11 0)) (emacsql (3 0 0))) "Use ivy to access firefox data" single ((:commit . "88c2348c4039d9e562bd3d9a364708b01037c283") (:authors ("Zhu Zihao" . "all_but_last@163.com")) (:maintainer "Zhu Zihao" . "all_but_last@163.com") (:keywords "convenience" "tools" "matching") (:url . "https://github.com/cireu/counsel-ffdata"))]) (counsel-gtags . [(20210222 1803) ((emacs (25 1)) (counsel (0 8 0)) (seq (1 0))) "ivy for GNU global" single ((:commit . "1d52eaeffeb60266434d4f7416a108ca058fde91") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com") ("Felipe Lema" . "felipelema@mortemale.org") ("Jimmy Aguilar Mena" . "spacibba@aol.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/FelipeLema/emacs-counsel-gtags"))]) (counsel-jq . [(20210329 749) ((swiper (0 12 0)) (ivy (0 12 0)) (emacs (24 1))) "Live preview of \"jq\" queries using counsel" single ((:commit . "8cadd2e96470402ede4881b4e955872976443689") (:authors ("Alain M. Lafon" . "alain@200ok.ch")) (:maintainer "Alain M. Lafon" . "alain@200ok.ch") (:keywords "convenience" "data" "matching") (:url . "https://github.com/200ok-ch/counsel-jq"))]) @@ -757,7 +758,7 @@ (cql-mode . [(20190315 225) ((emacs (24))) "Major mode for editting CQLs" single ((:commit . "d400c046850d3cf404778b2c47d6be4ff84ca04b") (:authors ("Yuki Inoue <inouetakahiroki at gmail.com>")) (:maintainer "Yuki Inoue <inouetakahiroki at gmail.com>") (:keywords "cql" "cassandra") (:url . "https://github.com/Yuki-Inoue/cql-mode"))]) (cquery . [(20190118 542) ((emacs (25 1)) (lsp-mode (3 4)) (dash (0 13))) "cquery client for lsp-mode" tar ((:commit . "555e50984ebda177421fdcdc8c76cb29235d9694") (:authors ("Tobias Pisani")) (:maintainer "Tobias Pisani") (:keywords "languages" "lsp" "c++") (:url . "https://github.com/jacobdufault/cquery"))]) (crappy-jsp-mode . [(20140311 931) nil "A pretty crappy major-mode for jsp." single ((:commit . "6c45ab92b452411cc0fab9bcee2f456276b4fc40") (:keywords "jsp" "major" "mode"))]) - (creamsody-theme . [(20170222 1058) ((autothemer (0 2))) "Straight from the soda fountain." single ((:commit . "32fa3f4e461da92700523b1b20e7b28974c19a26") (:url . "http://github.com/emacsfodder/emacs-theme-creamsody"))]) + (creamsody-theme . [(20220516 1515) ((autothemer (0 2))) "Straight from the soda fountain." single ((:commit . "fdf66a8e47ebd71f7bb6509d4ad6044bc0ac02db") (:url . "http://github.com/emacsfodder/emacs-theme-creamsody"))]) (create-link . [(20211014 1617) ((emacs (25 1))) "Smart format link generator" single ((:commit . "e765b1067ced891a90ba0478af7fe675cff9b713") (:authors ("Kijima Daigo" . "norimaking777@gmail.com")) (:maintainer "Kijima Daigo" . "norimaking777@gmail.com") (:keywords "link" "format" "browser" "convenience") (:url . "https://github.com/kijimaD/create-link"))]) (creds . [(20140510 1706) ((s (1 9 0)) (dash (2 5 0))) "A parser credentials file library (not limited to credentials entries)" tar ((:commit . "b059397a7d59481f05fbb1bb9c8d3c2c69226482") (:authors ("Antoine R. Dumont <eniotna.t AT gmail.com>")) (:maintainer "Antoine R. Dumont <eniotna.t AT gmail.com>") (:keywords "credentials") (:url . "https://github.com/ardumont/emacs-creds"))]) (creole . [(20140924 1500) ((noflet (0 0 3)) (kv (0 0 17))) "A parser for the Creole Wiki language" single ((:commit . "7d5cffe93857f6c75ca09ac79c0e47b8d4410e53") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "lisp" "creole" "wiki"))]) @@ -779,7 +780,7 @@ (css-eldoc . [(20220415 1629) nil "an eldoc-mode plugin for CSS source code" tar ((:commit . "73ebf9757a043b56b7d3b5befec5a38e6754b9e5") (:authors ("Zeno Zeng" . "zenoes@qq.com")) (:maintainer "Zeno Zeng" . "zenoes@qq.com"))]) (cssh . [(20150810 1709) nil "clusterssh implementation for emacs" single ((:commit . "2fe2754235225a59b63f08b130cfd4352e2e1c3f") (:authors ("Dimitri Fontaine" . "dim@tapoueh.org")) (:maintainer "Dimitri Fontaine" . "dim@tapoueh.org") (:keywords "clusterssh" "ssh" "cssh") (:url . "http://tapoueh.org/emacs/cssh.html"))]) (csv . [(20161113 1510) nil "Functions for reading and parsing CSV files." single ((:commit . "aa1dfa1263565d5fac3879c21d8ddf5f8915e411") (:authors ("Ulf Jasper" . "ulf.jasper@web.de")) (:maintainer "Ulf Jasper" . "ulf.jasper@web.de") (:keywords "extensions" "data" "csv"))]) - (ct . [(20210219 1344) ((emacs (26 1)) (dash (2 18 0)) (hsluv (1 0 0))) "Color Tools - a color api" single ((:commit . "c302ee94feee0c5efc511e8f9fd8cb2f6dfe3490") (:authors ("neeasade")) (:maintainer "neeasade") (:keywords "convenience" "color" "theming" "rgb" "hsv" "hsl" "cie-lab" "background") (:url . "https://github.com/neeasade/ct.el"))]) + (ct . [(20220514 2027) ((emacs (26 1)) (dash (2 18 0)) (hsluv (1 0 0))) "Color Tools - a color api" single ((:commit . "6bc55d01780fa921ced0e648d04497e27e23fe54") (:authors ("neeasade")) (:maintainer "neeasade") (:keywords "convenience" "color" "theming" "rgb" "hsv" "hsl" "cie-lab" "background") (:url . "https://github.com/neeasade/ct.el"))]) (ctable . [(20210128 629) ((emacs (24 3)) (cl-lib (0 5))) "Table component for Emacs Lisp" single ((:commit . "48b73742757a3ae5736d825fe49e00034cc453b5") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "table") (:url . "https://github.com/kiwanami/emacs-ctable"))]) (ctags-update . [(20190609 613) nil "(auto) update TAGS in parent directory using exuberant-ctags" single ((:commit . "67faf248b92388442958a069263c62a345425a1b") (:authors (nil . "Joseph(纪秀峰) jixiuf@gmail.com")) (:maintainer nil . "Joseph(纪秀峰) jixiuf@gmail.com") (:keywords "exuberant-ctags" "etags") (:url . "https://github.com/jixiuf/ctags-update"))]) (ctl-mode . [(20151202 1006) nil "Major mode for editing GrADS script files" single ((:commit . "1a13051db21b999c7682a015b33a03096ff9d891") (:authors ("Joe Wielgosz" . "joew@cola.iges.org")) (:maintainer "Joe Wielgosz" . "joew@cola.iges.org") (:keywords "grads" "script" "major-mode"))]) @@ -791,7 +792,7 @@ (cubicle-mode . [(20171009 1957) nil "Major mode for the Cubicle model checker" single ((:commit . "00f09bb2d4bb496549775e770d7ada08bc1e4866") (:authors ("Alain Mebsout")) (:maintainer "Alain Mebsout"))]) (cucumber-goto-step . [(20131210 519) ((pcre2el (1 5))) "Jump to cucumber step definition" single ((:commit . "f2713ffb26ebe1b757d1f2ea80e900b55e5895aa") (:authors ("Glen Stampoultzis" . "gstamp@gmail.com")) (:maintainer "Glen Stampoultzis" . "gstamp@gmail.com") (:url . "http://orthogonal.me"))]) (cuda-mode . [(20201013 2230) nil "NVIDIA CUDA Major Mode" single ((:commit . "7f593518fd135fc6af994024bcb47986dfa502d2") (:authors ("Jack Morrison" . "jackmorrison1@gmail.com")) (:maintainer "Jack Morrison" . "jackmorrison1@gmail.com") (:keywords "c" "languages"))]) - (cue-mode . [(20220507 1728) ((emacs (25 1))) "Major mode for CUE language files" single ((:commit . "598c9b33b888e067e7472710a5f159cee98a0307") (:authors ("Russell Sim" . "russell.sim@gmail.com")) (:maintainer "Russell Sim" . "russell.sim@gmail.com") (:keywords "data" "languages") (:url . "https://github.com/russell/cue-mode"))]) + (cue-mode . [(20220512 2104) ((emacs (25 1))) "Major mode for CUE language files" single ((:commit . "f98b9f9088fcb66c97f9200f6c8a0cd16c11caae") (:authors ("Russell Sim" . "russell.sim@gmail.com")) (:maintainer "Russell Sim" . "russell.sim@gmail.com") (:keywords "data" "languages") (:url . "https://github.com/russell/cue-mode"))]) (curl-to-elisp . [(20201124 1012) ((emacs (25 1))) "Convert cURL command to Emacs Lisp code" single ((:commit . "63d8d9c6d5efb8af8aa88042bfc0690ba699ef64") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "lisp") (:url . "https://github.com/xuchunyang/curl-to-elisp"))]) (currency-convert . [(20210427 2032) ((emacs (24 4))) "Currency converter" single ((:commit . "12805ea66aa8421de5eedda39d23f709de634460") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "comm" "convenience" "i18n") (:url . "https://github.com/lassik/emacs-currency-convert"))]) (current-word-highlight . [(20210323 1401) nil "Highlight the current word minor mode" single ((:commit . "d860f4e170ffa4cef840da93647f458cc409d554") (:authors ("Kijima Daigo" . "norimaking777@gmail.com")) (:maintainer "Kijima Daigo" . "norimaking777@gmail.com") (:keywords "highlight" "face" "convenience" "word") (:url . "https://github.com/kijimaD/current-word-highlight"))]) @@ -807,7 +808,7 @@ (cycle-themes . [(20150403 309) ((cl-lib (0 5))) "A global minor mode to make switching themes easier" single ((:commit . "6e125d11fdbc6b78fc9f219eb2609a5e29815898") (:keywords "themes" "utility" "global minor mode") (:url . "http://github.com/toroidal-code/cycle-themes.el"))]) (cyphejor . [(20210816 1607) ((emacs (24 4))) "Shorten major mode names using user-defined rules" single ((:commit . "576d237a46be79449a22e3a7912a3464d7b0c233") (:authors ("Mark Karpov" . "markkarpov92@gmail.com")) (:maintainer "Mark Karpov" . "markkarpov92@gmail.com") (:keywords "mode-line" "major-mode") (:url . "https://github.com/mrkkrp/cyphejor"))]) (cypher-mode . [(20151110 1142) nil "major mode for editing cypher scripts" single ((:commit . "ce8543d7877c736c574a17b49874c9dcdc7a06d6") (:authors ("François-Xavier Bois <fxbois AT Google Mail Service>")) (:maintainer "François-Xavier Bois") (:keywords "cypher" "graph") (:url . "http://github.com/fxbois/cypher-mode"))]) - (cython-mode . [(20211111 1407) nil "Major mode for editing Cython files" single ((:commit . "812585935131125f8988c38417bb73bfd5a81c05"))]) + (cython-mode . [(20211111 1407) nil "Major mode for editing Cython files" single ((:commit . "bbade72623c04933c348cd68fa273d3db6798446"))]) (czech-holidays . [(20160113 1752) nil "Adds a list of Czech public holidays to Emacs calendar" single ((:commit . "d136fa09a152b3cd80db6d55c7b4ddfe07b90fbf") (:authors ("David Chkhikvadze" . "david.chk@outlook.com")) (:maintainer "David Chkhikvadze" . "david.chk@outlook.com") (:keywords "calendar"))]) (d-mode . [(20210119 1853) ((emacs (25 1))) "D Programming Language major mode for (X)Emacs" single ((:commit . "199743df55c6bfce3cdb08405bd8519768c8dfa9") (:authors ("William Baxter")) (:maintainer "Russel Winder" . "russel@winder.org.uk") (:keywords "d" "programming" "language" "emacs" "cc-mode"))]) (dactyl-mode . [(20140906 1725) nil "Major mode for editing Pentadactyl config files" single ((:commit . "cc55fe6b987271d9647492b8df4c812d884f661f") (:keywords "languages" "vim") (:url . "https://github.com/luxbock/dactyl-mode"))]) @@ -817,7 +818,7 @@ (dakrone-theme . [(20170801 1933) nil "dakrone's custom dark theme" single ((:commit . "232ad1be5f3572dcbdf528f1655109aa355a6937") (:authors ("Lee Hinman <lee _AT_ writequit.org>")) (:maintainer "Lee Hinman <lee _AT_ writequit.org>") (:keywords "color" "themes") (:url . "https://github.com/dakrone/dakrone-theme"))]) (danneskjold-theme . [(20220316 1101) nil "Beautiful high-contrast Emacs theme." tar ((:commit . "054c0b9bc9cefb53a4065096e66707d20885c461") (:authors ("Dmitry Akatov" . "akatovda@yandex.com")) (:maintainer "Dmitry Akatov" . "akatovda@yandex.com") (:url . "https://github.com/rails-to-cosmos/"))]) (dante . [(20220429 1454) ((dash (2 12 0)) (emacs (25 1)) (f (0 19 0)) (flycheck (0 30)) (company (0 9)) (haskell-mode (13 14)) (s (1 11 0)) (lcr (1 0))) "Development mode for Haskell" single ((:commit . "b81081c2eb8dcbd7e67e05cf5e1991df6cf3e57c") (:authors ("Jean-Philippe Bernardy" . "jeanphilippe.bernardy@gmail.com")) (:maintainer "Jean-Philippe Bernardy" . "jeanphilippe.bernardy@gmail.com") (:keywords "haskell" "tools") (:url . "https://github.com/jyp/dante"))]) - (dap-mode . [(20220509 1638) ((emacs (26 1)) (dash (2 18 0)) (lsp-mode (6 0)) (bui (1 1 0)) (f (0 20 0)) (s (1 12 0)) (lsp-treemacs (0 1)) (posframe (0 7 0)) (ht (2 3))) "Debug Adapter Protocol mode" tar ((:commit . "61b5938d9a61882c2e76c58ca7f70e9337ddba00") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "languages" "debug") (:url . "https://github.com/emacs-lsp/dap-mode"))]) + (dap-mode . [(20220516 615) ((emacs (26 1)) (dash (2 18 0)) (lsp-mode (6 0)) (bui (1 1 0)) (f (0 20 0)) (s (1 12 0)) (lsp-treemacs (0 1)) (posframe (0 7 0)) (ht (2 3))) "Debug Adapter Protocol mode" tar ((:commit . "4fee7a5c38d6fb733b289902243e28a736aa1eb7") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "languages" "debug") (:url . "https://github.com/emacs-lsp/dap-mode"))]) (darcsum . [(20190316 2215) nil "a pcl-cvs like interface for managing darcs patches" single ((:commit . "6a8b690539d133c5e3d17cb23fe4365fbb6fb493") (:authors ("John Wiegley" . "johnw@gnu.org")) (:maintainer "John Wiegley" . "johnw@gnu.org") (:keywords "completion" "convenience" "tools" "vc"))]) (darcula-theme . [(20171227 1845) nil "Inspired by IntelliJ's Darcula theme" single ((:commit . "d9b82b58ded9014985be6658f4ab17e26ed9e93e") (:authors ("Sam Halliday" . "Sam.Halliday@gmail.com")) (:maintainer "Sam Halliday" . "Sam.Halliday@gmail.com") (:keywords "faces") (:url . "https://gitlab.com/fommil/emacs-darcula-theme"))]) (dark-krystal-theme . [(20170808 1300) ((emacs (24 0))) "an Emacs 24 theme based on Dark Krystal (tmTheme)" single ((:commit . "79084b99665dc9ffb0ec62cc092349a5ecebebbc") (:authors ("Jason Milkins")) (:maintainer "Jason Milkins") (:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) @@ -829,13 +830,13 @@ (darktooth-theme . [(20201215 822) ((autothemer (0 2))) "From the darkness... it watches" single ((:commit . "ec03b30ee7f43f89ca4c382bb3fe4ee560c028a8") (:url . "http://github.com/emacsfodder/emacs-theme-darktooth"))]) (dart-mode . [(20220401 0) ((emacs (24 3))) "Major mode for editing Dart files" single ((:commit . "9c846769abd37f7fdc7ba8388d1f3a2b844b75e3") (:authors ("https://github.com/bradyt/dart-mode/issues")) (:maintainer "https://github.com/bradyt/dart-mode/issues") (:keywords "languages") (:url . "https://github.com/bradyt/dart-mode"))]) (dart-server . [(20210501 1445) ((emacs (24 5)) (cl-lib (0 5)) (dash (2 10 0)) (flycheck (0 23)) (s (1 10))) "Minor mode for editing Dart files" single ((:commit . "75562baf9a89b7e314bc2f795f6ecdc5d1f2cc8c") (:authors ("Natalie Weizenbaum") ("Brady Trainor" . "mail@bradyt.com")) (:maintainer "Brady Trainor" . "mail@bradyt.com") (:keywords "languages") (:url . "https://github.com/bradyt/dart-server"))]) - (dash . [(20220417 2250) ((emacs (24))) "A modern list library for Emacs" tar ((:commit . "7fd71338dce041b352f84e7939f6966f4d379459") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "extensions" "lisp") (:url . "https://github.com/magnars/dash.el"))]) + (dash . [(20220516 2220) ((emacs (24))) "A modern list library for Emacs" tar ((:commit . "759682332a0ebd737802d9fa0a80ceedf05088b6") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "extensions" "lisp") (:url . "https://github.com/magnars/dash.el"))]) (dash-alfred . [(20191024 450) ((emacs (25 1))) "Search Dash documentation via Dash-Alfred-Workflow" single ((:commit . "fcd21bd6c7eb5cd31377be970406ff3d2454bd5c") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "docs") (:url . "https://github.com/xuchunyang/dash-alfred.el"))]) (dash-at-point . [(20211023 104) nil "Search the word at point with Dash" single ((:commit . "fba1a6f42ea51d05110e12c62bdced664059eb55") (:authors ("Shinji Tanaka" . "shinji.tanaka@gmail.com")) (:maintainer "Shinji Tanaka" . "shinji.tanaka@gmail.com") (:url . "https://github.com/stanaka/dash-at-point"))]) (dash-docs . [(20210830 926) ((emacs (24 4)) (cl-lib (0 5)) (async (1 9 3))) "Offline documentation browser using Dash docsets." tar ((:commit . "29848b6b347ac520f7646c200ed2ec36cea3feda") (:authors ("Raimon Grau" . "raimonster@gmail.com") ("Toni Reina " . "areina0@gmail.com") ("Bryan Gilbert" . "bryan@bryan.sh")) (:maintainer "Raimon Grau" . "raimonster@gmail.com") (:keywords "docs") (:url . "http://github.com/areina/helm-dash"))]) - (dash-functional . [(20210210 1449) ((dash (2 18 0))) "Collection of useful combinators for Emacs Lisp" single ((:commit . "7fd71338dce041b352f84e7939f6966f4d379459") (:authors ("Matus Goljer" . "matus.goljer@gmail.com") ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "extensions" "lisp") (:url . "https://github.com/magnars/dash.el"))]) - (dashboard . [(20220409 620) ((emacs (26 1))) "A startup screen extracted from Spacemacs" tar ((:commit . "0a86c0eabe6bb5e188e6ae915d971103248a3d26") (:authors ("Rakan Al-Hneiti" . "rakan.alhneiti@gmail.com")) (:maintainer "Jesús Martínez" . "jesusmartinez93@gmail.com") (:keywords "startup" "screen" "tools" "dashboard") (:url . "https://github.com/emacs-dashboard/emacs-dashboard"))]) - (dashboard-hackernews . [(20190109 205) ((emacs (24)) (dashboard (1 2 5)) (request (0 3 0))) "Display Hacker News on dashboard" single ((:commit . "b71814716d8f78181b9d1990f06072460de0797e") (:authors ("Hayato KAJIYAMA" . "kaji1216@gmail.com")) (:maintainer "Hayato KAJIYAMA" . "kaji1216@gmail.com") (:url . "https://github.com/hyakt/emacs-dashboard-hackernews"))]) + (dash-functional . [(20210210 1449) ((dash (2 18 0))) "Collection of useful combinators for Emacs Lisp" single ((:commit . "759682332a0ebd737802d9fa0a80ceedf05088b6") (:authors ("Matus Goljer" . "matus.goljer@gmail.com") ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "extensions" "lisp") (:url . "https://github.com/magnars/dash.el"))]) + (dashboard . [(20220516 456) ((emacs (26 1))) "A startup screen extracted from Spacemacs" tar ((:commit . "a4eb09778f7b685b6ff652212bf1fa2e6e1305d7") (:authors ("Rakan Al-Hneiti" . "rakan.alhneiti@gmail.com")) (:maintainer "Jesús Martínez" . "jesusmartinez93@gmail.com") (:keywords "startup" "screen" "tools" "dashboard") (:url . "https://github.com/emacs-dashboard/emacs-dashboard"))]) + (dashboard-hackernews . [(20220516 1809) ((emacs (24)) (dashboard (1 2 5)) (request (0 3 0))) "Display Hacker News on dashboard" single ((:commit . "dd5f8ec998d7b7bf162b4eb72474b683b8aa0a14") (:authors ("Hayato KAJIYAMA" . "kaji1216@gmail.com")) (:maintainer "Hayato KAJIYAMA" . "kaji1216@gmail.com") (:url . "https://github.com/hyakt/emacs-dashboard-hackernews"))]) (dashboard-ls . [(20220326 628) ((emacs (24 3)) (dashboard (1 2 5))) "Display files/directories in current directory on Dashboard" single ((:commit . "f9e199a20c654c3d1d8f405fdec9acb294afc004") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/emacs-dashboard/dashboard-ls"))]) (dashboard-project-status . [(20190202 1354) ((emacs (24)) (git (0 1 1)) (dashboard (1 2 5))) "Display a git project status in a dashboard widget." single ((:commit . "7675c138e9df8fe2c626e7ba9bbb8b6717671a41") (:authors ("Jason Duncan" . "jasond496@msn.com")) (:maintainer "Jason Duncan" . "jasond496@msn.com") (:url . "https://github.com/functionreturnfunction/dashboard-project-status"))]) (date-at-point . [(20150308 1243) nil "Add `date' to `thing-at-point' function" single ((:commit . "38df823d05df08ec0748a4185113fae5f99090e9") (:authors ("Alex Kost" . "alezost@gmail.com")) (:maintainer "Alex Kost" . "alezost@gmail.com") (:keywords "convenience") (:url . "https://github.com/alezost/date-at-point.el"))]) @@ -891,7 +892,7 @@ (didyoumean . [(20200905 1843) ((emacs (24 4))) "Did you mean to open another file?" single ((:commit . "ce5edcce160b86e7f6480f0381be785d43f97e19") (:keywords "convenience") (:url . "https://gitlab.com/kisaragi-hiu/didyoumean.el"))]) (diff-ansi . [(20220507 1118) ((emacs (27 1))) "Display diff's using alternative diffing tools" single ((:commit . "bfcce7f609a95b4b5e11c384c75fef8c7c972b95") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-diff-ansi"))]) (diff-at-point . [(20220507 1118) ((emacs (26 2))) "Diff navigation" single ((:commit . "aabb96b2b59f0e0d94d7b6889fa30016927ea03d") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-diff-at-point"))]) - (diff-hl . [(20220506 2102) ((cl-lib (0 2)) (emacs (25 1))) "Highlight uncommitted changes using VC" tar ((:commit . "14f2db367e8023ab0027713315a38ecd703afdbf") (:authors ("Dmitry Gutov" . "dgutov@yandex.ru")) (:maintainer "Dmitry Gutov" . "dgutov@yandex.ru") (:keywords "vc" "diff") (:url . "https://github.com/dgutov/diff-hl"))]) + (diff-hl . [(20220515 1714) ((cl-lib (0 2)) (emacs (25 1))) "Highlight uncommitted changes using VC" tar ((:commit . "e84209e959a17c7b96148e099e391daa29a4835e") (:authors ("Dmitry Gutov" . "dgutov@yandex.ru")) (:maintainer "Dmitry Gutov" . "dgutov@yandex.ru") (:keywords "vc" "diff") (:url . "https://github.com/dgutov/diff-hl"))]) (difflib . [(20210224 2242) ((emacs (24 4)) (cl-generic (0 3)) (ht (2 2)) (s (1 12 0))) "Helpers for computing deltas between sequences." single ((:commit . "646fc4388274fe765bbf4661e17a24e4d081250c") (:authors ("Diego A. Mundo" . "dieggsy@pm.me")) (:maintainer "Diego A. Mundo" . "dieggsy@pm.me") (:keywords "matching" "tools" "string") (:url . "http://github.com/dieggsy/difflib.el"))]) (diffpdf . [(20210626 1447) ((emacs (25 1)) (transient (0 3 0))) "Transient diffpdf" single ((:commit . "a5b203b549e373cb9b0ef3f00c0010bd34dd644a") (:authors ("Shuguang Sun" . "shuguang79@qq.com")) (:maintainer "Shuguang Sun" . "shuguang79@qq.com") (:keywords "tools") (:url . "https://github.com/ShuguangSun/diffpdf.el"))]) (diffscuss-mode . [(20141014 2357) nil "Major mode for diffscuss files." single ((:commit . "53f2d001bd3a5cb80c6ada16b4e570afd1989a09") (:authors ("Edmund Jorgensen" . "edmund@hut8labs.com")) (:maintainer "Edmund Jorgensen" . "edmund@hut8labs.com") (:keywords "tools"))]) @@ -947,12 +948,12 @@ (diredc . [(20220113 332) ((emacs (26 1)) (key-assist (1 0))) "Extensions for dired" single ((:commit . "7ee68f6b1c87f8ab86cf23416472747e88860717") (:keywords "files") (:url . "https://github.com/Boruch-Baum/emacs-diredc"))]) (diredfl . [(20220508 805) ((emacs (24))) "Extra font lock rules for a more colourful dired" single ((:commit . "62b559e1d6b69834a56a57eb1832ac6ad4d2e5d0") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "faces") (:url . "https://github.com/purcell/diredfl"))]) (diredful . [(20160529 2017) nil "colorful file names in dired buffers" single ((:commit . "ad328a15c5deffc1021af9b3f19a745dcd8f4415") (:authors ("Thamer Mahmoud" . "thamer.mahmoud@gmail.com")) (:maintainer "Thamer Mahmoud" . "thamer.mahmoud@gmail.com") (:keywords "dired" "colors" "extension" "widget") (:url . "https://github.com/thamer/diredful"))]) - (direnv . [(20220103 1342) ((emacs (25 1)) (dash (2 12 0))) "direnv integration" single ((:commit . "d71ceb415732c3b76a2948147fa3559622aceba2") (:authors ("wouter bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "wouter bolsterlee" . "wouter@bolsterl.ee") (:keywords "direnv" "environment" "processes" "unix" "tools") (:url . "https://github.com/wbolster/emacs-direnv"))]) + (direnv . [(20220513 656) ((emacs (25 1)) (dash (2 12 0))) "direnv integration" single ((:commit . "416ed17efa93503b37eba196a14f967e0899bce4") (:authors ("wouter bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "wouter bolsterlee" . "wouter@bolsterl.ee") (:keywords "direnv" "environment" "processes" "unix" "tools") (:url . "https://github.com/wbolster/emacs-direnv"))]) (direx . [(20170422 1327) nil "Simple Directory Explorer" tar ((:commit . "a79bfdb5980cf6ed7bfb3b41ddc471a7b6c0ede4") (:authors ("Tomohiro Matsuyama" . "m2ym.pub@gmail.com")) (:maintainer "Tomohiro Matsuyama" . "m2ym.pub@gmail.com") (:keywords "convenience"))]) (direx-grep . [(20140515 1506) ((direx (0 1 -3))) "Grep node of direx.el using incremental search like anything.el/helm.el" single ((:commit . "1109a512a80b2673a70b18b8568514049017faad") (:authors ("Hiroaki Otsu" . "ootsuhiroaki@gmail.com")) (:maintainer "Hiroaki Otsu" . "ootsuhiroaki@gmail.com") (:keywords "convenience") (:url . "https://github.com/aki2o/direx-grep"))]) (dirtree . [(20140129 832) ((tree-mode (1 1 1 1)) (windata (0))) "Directory tree views" single ((:commit . "ba55f1e716e386fdd37cb8e7f48616e405dc7251") (:authors ("Ye Wenbin" . "wenbinye@gmail.com")) (:maintainer "Ye Wenbin" . "wenbinye@gmail.com"))]) (dirtree-prosjekt . [(20140129 904) ((prosjekt (0 3)) (dirtree (0 1))) "dirtree integration for prosjekt." single ((:commit . "a864a8be5842223043702395f311e3350c28e9db") (:authors ("Austin Bingham" . "austin.bingham@gmail.com")) (:maintainer "Austin Bingham" . "austin.bingham@gmail.com") (:url . "https://github.com/abingham/prosjekt"))]) - (dirvish . [(20220508 1705) ((emacs (27 1))) "A modern file manager based on dired mode" tar ((:commit . "75d5abb62670dac0dce3e43e8dbe2e42b7abe6ab") (:authors ("Alex Lu <https://github.com/alexluigit>")) (:maintainer "Alex Lu <https://github.com/alexluigit>") (:keywords "files" "convenience") (:url . "https://github.com/alexluigit/dirvish"))]) + (dirvish . [(20220517 731) ((emacs (27 1))) "A modern file manager based on dired mode" tar ((:commit . "e7ec4f3c90cd4abeb8a4be83c0194a4979b5c92d") (:authors ("Alex Lu <https://github.com/alexluigit>")) (:maintainer "Alex Lu <https://github.com/alexluigit>") (:keywords "files" "convenience") (:url . "https://github.com/alexluigit/dirvish"))]) (disable-mouse . [(20210512 2114) ((emacs (24 1))) "Disable mouse commands globally" single ((:commit . "cae3be9dd012727b40ad3b511731191f79cebe42") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "mouse") (:url . "https://github.com/purcell/disable-mouse"))]) (disaster . [(20171016 2152) nil "Disassemble C/C++ code under cursor in Emacs" single ((:commit . "10a785facc60d89d78e0d5177985ab1af1741bb4") (:authors ("Justine Tunney" . "jtunney@gmail.com")) (:maintainer "Justine Tunney" . "jtunney@gmail.com") (:keywords "tools") (:url . "https://github.com/jart/disaster"))]) (discourse . [(20160911 819) ((cl-lib (0 5)) (request (0 2)) (s (1 11 0))) "discourse api" single ((:commit . "a86c7e608851e186fe12e892a573994f08c8e65e") (:authors ("DarkSun" . "lujun9972@gmail.com")) (:maintainer "DarkSun" . "lujun9972@gmail.com") (:keywords "lisp" "discourse") (:url . "https://github.com/lujun9972/discourse-api"))]) @@ -1004,7 +1005,7 @@ (dollaro . [(20151123 1302) ((s (1 6 0))) "simple text templates" single ((:commit . "500127f0172ac7a1eec627e026b59136580a74ac") (:authors ("Alessandro Piras" . "laynor@gmail.com")) (:maintainer "Alessandro Piras" . "laynor@gmail.com") (:keywords "tools" "convenience"))]) (doneburn-theme . [(20181110 1857) nil "A light theme based on Bozhidar Batsov's Zenburn" single ((:commit . "da4fa915a2a659001eea04498d790cdd8cac1fce") (:authors ("Manuel Uberti" . "manuel.uberti@inventati.org")) (:maintainer "Manuel Uberti" . "manuel.uberti@inventati.org") (:keywords "faces" "themes") (:url . "http://github.com/manuel-uberti/doneburn-emacs"))]) (doom . [(20180301 2308) ((cl-lib (0 5))) "DOM implementation and manipulation library" single ((:commit . "e59040aefc92dd9b3134eb623624307fb9e4327b") (:authors ("Alex Schroeder" . "alex@gnu.org") ("Henrik.Motakef" . "elisp@henrik-motakef.de") ("Katherine Whitlock" . "toroidal-code@gmail.com") ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Alex Schroeder") (:keywords "xml" "dom") (:url . "http://www.github.com/kensanata/doom.el/"))]) - (doom-modeline . [(20220412 853) ((emacs (25 1)) (all-the-icons (2 2 0)) (shrink-path (0 2 0)) (dash (2 11 0))) "A minimal and modern mode-line" tar ((:commit . "85bdd9ed8674710f6b9815e9a1c41ad4b5a45ace") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "faces" "mode-line") (:url . "https://github.com/seagle0128/doom-modeline"))]) + (doom-modeline . [(20220517 354) ((emacs (25 1)) (shrink-path (0 2 0)) (dash (2 11 0))) "A minimal and modern mode-line" tar ((:commit . "8c5ca7f28050d8a56c6289c7660d9c0b04a3288b") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "faces" "mode-line") (:url . "https://github.com/seagle0128/doom-modeline"))]) (doom-modeline-now-playing . [(20210831 1442) ((emacs (24 4)) (doom-modeline (3 0 0)) (async (1 9 3))) "Segment for Doom Modeline to show playerctl information" single ((:commit . "ef9158dfdf32e8eb789b69e7394d0bddaa68f42c") (:authors ("Ellis Kenyő" . "me@elken.dev")) (:maintainer "Ellis Kenyő" . "me@elken.dev") (:url . "https://github.com/elken/doom-modeline-now-playing"))]) (doom-themes . [(20220504 1557) ((emacs (25 1)) (cl-lib (0 5))) "an opinionated pack of modern color-themes" tar ((:commit . "e9bdd137116fa2037ed60037b8421cf68c64888d") (:authors ("Henrik Lissner" . "contact@henrik.io")) (:maintainer "Henrik Lissner" . "contact@henrik.io") (:keywords "themes" "faces") (:url . "https://github.com/doomemacs/themes"))]) (dot-mode . [(20180312 2300) ((emacs (24 3))) "minor mode to repeat typing or commands" single ((:commit . "6ca22b73bcdae2363ee9641b822a60685df16a3e") (:authors ("Robert Wyrick" . "rob@wyrick.org")) (:maintainer "Robert Wyrick" . "rob@wyrick.org") (:keywords "convenience") (:url . "https://github.com/wyrickre/dot-mode"))]) @@ -1029,7 +1030,7 @@ (drupal-mode . [(20220125 1044) ((php-mode (1 5 0))) "Advanced minor mode for Drupal development" tar ((:commit . "17927723adc5921e8058f7c29e5e50e88b975639") (:authors ("Arne Jørgensen" . "arne@arnested.dk")) (:maintainer "Arne Jørgensen" . "arne@arnested.dk") (:keywords "programming" "php" "drupal") (:url . "https://github.com/arnested/drupal-mode"))]) (drupal-spell . [(20130520 1655) nil "Aspell extra dictionary for Drupal" tar ((:commit . "4087c28c89a884ee050961c57166e6b09085f59d") (:authors ("Arne Jørgensen" . "arne@arnested.dk")) (:maintainer "Arne Jørgensen" . "arne@arnested.dk") (:keywords "wp") (:url . "https://github.com/arnested/drupal-spell"))]) (dsvn . [(20190316 2201) nil "Subversion interface" single ((:commit . "c37d2412ba92aad647bcf5aeb151e620e8069f8d") (:authors ("David Kågedal" . "davidk@lysator.liu.se") (" Mattias Engdegård" . "mattiase@acm.org")) (:maintainer "Mattias Engdegård" . "mattiase@acm.org") (:keywords "docs"))]) - (dtache . [(20220501 931) ((emacs (27 1))) "Run and interact with detached shell commands" tar ((:commit . "9becf3a921a0fde3a6e5d6f30379cf3d9826d565") (:authors ("Niklas Eklund" . "niklas.eklund@posteo.net")) (:maintainer "Niklas Eklund" . "niklas.eklund@posteo.net") (:keywords "convenience" "processes") (:url . "https://www.gitlab.com/niklaseklund/dtache.git"))]) + (dtache . [(20220513 2050) ((emacs (27 1))) "Run and interact with detached shell commands" tar ((:commit . "08310ca70b935d82fab146c7135d19a2c784f160") (:authors ("Niklas Eklund" . "niklas.eklund@posteo.net")) (:maintainer "Niklas Eklund" . "niklas.eklund@posteo.net") (:keywords "convenience" "processes") (:url . "https://www.gitlab.com/niklaseklund/dtache.git"))]) (dtb-mode . [(20210105 1132) ((emacs (25))) "Show device tree souce in dtbs" single ((:commit . "7f66de945a0be2be5a26b4619cae097288fb55cd") (:authors ("Schspa Shi" . "schspa@gmail.com")) (:maintainer "Schspa Shi" . "schspa@gmail.com") (:keywords "dtb" "dts" "convenience") (:url . "https://github.com/schspa/dtb-mode"))]) (dtk . [(20220309 759) ((emacs (24 4)) (cl-lib (0 6 1)) (dash (2 12 0)) (seq (1 9)) (s (1 9))) "access SWORD content via diatheke" single ((:commit . "56b339bc76926defa775c406113e306ec6d31b36") (:authors ("David Thompson")) (:maintainer "David Thompson") (:keywords "hypermedia") (:url . "https://github.com/dtk01/dtk.el"))]) (dtrace-script-mode . [(20150214 623) nil "DTrace code editing commands for Emacs" single ((:commit . "801af1ef16075d31a19830ebb8404bbf3a322f10"))]) @@ -1039,7 +1040,7 @@ (dumb-diff . [(20171211 2122) ((emacs (24 3))) "fast arbitrary diffs" single ((:commit . "1a2331d283049b71a07c1b06b1e0627a950d55f4") (:authors ("jack angers")) (:maintainer "jack angers") (:keywords "programming" "diff"))]) (dumb-jump . [(20211018 1545) ((emacs (24 3)) (s (1 11 0)) (dash (2 9 0)) (popup (0 5 3))) "Jump to definition for 50+ languages without configuration" single ((:commit . "dbb915441a2b66f2fbb954ff5de2723c5a4771d4") (:authors ("jack angers and contributors")) (:maintainer "jack angers and contributors") (:keywords "programming") (:url . "https://github.com/jacktasia/dumb-jump"))]) (dummyparens . [(20141009 1024) nil "parenthesis auto-pairing and wrapping" single ((:commit . "9798ef1d0eaa24e4fe66f8aa6022a8c62714cc89") (:authors ("Sergei Nosov <sergei.nosov [at] gmail.com>")) (:maintainer "Sergei Nosov <sergei.nosov [at] gmail.com>") (:keywords "dummyparens" "auto-pair" "wrapping") (:url . "https://github.com/snosov1/dummyparens"))]) - (dune . [(20210909 1010) nil "Integration with the dune build system" tar ((:commit . "4633b71e64abe3e8a737a45e181daef43f7db48d") (:url . "https://github.com/ocaml/dune"))]) + (dune . [(20210909 1010) nil "Integration with the dune build system" tar ((:commit . "43af00f79e41ce9101d42b36dab13e1f68d49a7a") (:url . "https://github.com/ocaml/dune"))]) (dune-format . [(20210505 108) ((reformatter (0 6)) (emacs (24 1))) "Reformat OCaml's dune files automatically" single ((:commit . "196f16a01f4c855de7becddbc4cfed2f6788693a") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "languages") (:url . "https://github.com/purcell/emacs-dune-format"))]) (duplicate-thing . [(20181031 1500) nil "Duplicate current line & selection" single ((:commit . "9d8fd05e3e5caa35d3f2a0c0032c92f0c0908e21") (:authors ("ongaeshi")) (:maintainer "ongaeshi") (:keywords "convenience" "command" "duplicate" "line" "selection") (:url . "https://github.com/ongaeshi/duplicate-thing"))]) (dut-mode . [(20170729 2111) ((emacs (24))) "Major mode for the Dut programming language" single ((:commit . "9235c7acaa6690942e9de8b7acd1e4be0c859dc1") (:authors ("The dut-mode Authors")) (:maintainer "The dut-mode Authors") (:keywords "languages" "gut") (:url . "https://github.com/dut-lang/dut-mode"))]) @@ -1067,7 +1068,7 @@ (easy-escape . [(20210917 1254) nil "Improve readability of escape characters in regular expressions" single ((:commit . "938497a21e65ba6b3ff8ec90e93a6d0ab18dc9b4") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "lisp" "tools") (:url . "https://github.com/cpitclaudel/easy-escape"))]) (easy-hugo . [(20211017 1248) ((emacs (25 1)) (popup (0 5 3)) (request (0 3 0)) (transient (0 3 6))) "Write blogs made with hugo by markdown or org-mode" tar ((:commit . "baead14d7f2fa86e108269932a94bf376de9c2e5") (:authors ("Masashi Miyaura")) (:maintainer "Masashi Miyaura") (:url . "https://github.com/masasam/emacs-easy-hugo"))]) (easy-jekyll . [(20211217 2311) ((emacs (25 1)) (request (0 3 0))) "Major mode managing jekyll blogs" single ((:commit . "7f19af310162464956f2bc4c38c6b7e95cb20321") (:authors ("Masashi Miyaura")) (:maintainer "Masashi Miyaura") (:url . "https://github.com/masasam/emacs-easy-jekyll"))]) - (easy-kill . [(20220311 1506) ((emacs (25)) (cl-lib (0 5))) "kill & mark things easily" single ((:commit . "f9b450a87c41e5ef616df565ed158cb236aa5189") (:authors ("Leo Liu" . "sdl.web@gmail.com")) (:maintainer "Leo Liu" . "sdl.web@gmail.com") (:keywords "killing" "convenience") (:url . "https://github.com/leoliu/easy-kill"))]) + (easy-kill . [(20220511 557) ((emacs (25)) (cl-lib (0 5))) "kill & mark things easily" single ((:commit . "de7d66c3c864a4722a973ee9bc228a14be49ba0c") (:authors ("Leo Liu" . "sdl.web@gmail.com")) (:maintainer "Leo Liu" . "sdl.web@gmail.com") (:keywords "killing" "convenience") (:url . "https://github.com/leoliu/easy-kill"))]) (easy-kill-extras . [(20210529 945) ((easy-kill (0 9 4))) "Extra functions for easy-kill." tar ((:commit . "74e9d0fcafc38d5f24e6209671a552bc1ba5a867") (:authors ("Akinori MUSHA" . "knu@iDaemons.org")) (:maintainer "Akinori MUSHA" . "knu@iDaemons.org") (:keywords "killing" "convenience") (:url . "https://github.com/knu/easy-kill-extras.el"))]) (easy-repeat . [(20150516 848) ((emacs (24 4))) "Repeat easily" single ((:commit . "060f0e6801c82c40c06961dc0528a00e18947a8c") (:authors ("Chunyang Xu" . "xuchunyang56@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang56@gmail.com") (:keywords "repeat" "convenience") (:url . "https://github.com/xuchunyang/easy-repeat.el"))]) (ebf . [(20210225 1211) ((dash (2 18 0)) (cl-lib (0 5))) "brainfuck language transpiler to Emacs Lisp" tar ((:commit . "6cbeb4d62416f4cfd5be8906667342af8ecc44a6") (:authors ("Alexey Kutepov" . "reximkut@gmail.com")) (:maintainer "Alexey Kutepov" . "reximkut@gmail.com") (:url . "http://github.com/rexim/ebf"))]) @@ -1089,7 +1090,7 @@ (edit-at-point . [(20191013 1218) nil "edit(copy,cut..) current things(word,symbol..) under cursor" single ((:commit . "28c85a65c9c61f2aff50bc5e93f61cde26a5d9c0") (:authors (nil . "<e.enoson@gmail.com>")) (:maintainer nil . "<e.enoson@gmail.com>") (:url . "http://github.com/enoson/edit-at-point.el"))]) (edit-chrome-textarea . [(20200324 1513) ((emacs (25 1)) (websocket (1 4))) "Edit Chrome Textarea" single ((:commit . "e9ef6a72bdc6b58f932c51aa161869cee11b4bc9") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "tools") (:url . "https://github.com/xuchunyang/edit-chrome-textarea.el"))]) (edit-color-stamp . [(20130529 1733) ((es-lib (0 2)) (cl-lib (1 0))) "Edit a hex color stamp, using a QT or the internal color picker" tar ((:commit . "32dc1ca5bcf3dcf83fad5e39b55dc5b77becb3d3") (:authors ("sabof")) (:maintainer "sabof") (:url . "https://github.com/sabof/edit-color-stamp"))]) - (edit-indirect . [(20220216 1812) ((emacs (24 3))) "Edit regions in separate buffers" single ((:commit . "e3d86416bcf8ddca951d7d112e57ad30c5f9a081") (:authors ("Fanael Linithien" . "fanael4@gmail.com")) (:maintainer "Fanael Linithien" . "fanael4@gmail.com") (:url . "https://github.com/Fanael/edit-indirect"))]) + (edit-indirect . [(20220511 1124) ((emacs (24 3))) "Edit regions in separate buffers" single ((:commit . "f80f63822ffae78de38dbe72cacaeb1aaa96c732") (:authors ("Fanael Linithien" . "fanael4@gmail.com")) (:maintainer "Fanael Linithien" . "fanael4@gmail.com") (:url . "https://github.com/Fanael/edit-indirect"))]) (edit-indirect-region-latex . [(20161129 645) ((emacs (24 3)) (ht (2 2)) (edit-indirect (0 1 4))) "Edit LaTeX regions in separate buffers, e.g. for English grammar checks" single ((:commit . "05043f2c0c9838947d3ca4b51b695deb7c47612e") (:authors ("Hirotaka Niitsuma" . "hirotaka.niitsuma@gmail.com")) (:maintainer "Hirotaka Niitsuma" . "hirotaka.niitsuma@gmail.com") (:url . "https://github.com/niitsuma/edit-indirect-region-latex"))]) (edit-list . [(20100930 1443) nil "edit a single list" single ((:commit . "f460d3f9e208a4e606fe6ded307f1b011916ca71") (:authors ("Michael Olson" . "mwolson@gnu.org")) (:maintainer "Michael Olson" . "mwolson@gnu.org") (:url . "http://mwolson.org/static/dist/elisp/edit-list.el"))]) (edit-server . [(20181016 1125) nil "server that responds to edit requests from Chrome" single ((:commit . "65a8e434547dcbe1df89dc3fd7aee075f8b06366") (:authors ("Alex Bennée" . "alex@bennee.com")) (:maintainer "Alex Bennée" . "alex@bennee.com") (:url . "https://github.com/stsquad/emacs_chrome"))]) @@ -1103,28 +1104,28 @@ (ednc . [(20220404 2105) ((emacs (26 1))) "Emacs Desktop Notification Center" single ((:commit . "d1a3c37235dd87e0bce6ffc75f5568218d6d83b4") (:authors ("Simon Nicolussi" . "sinic@sinic.name")) (:maintainer "Simon Nicolussi" . "sinic@sinic.name") (:keywords "unix") (:url . "https://github.com/sinic/ednc"))]) (edts . [(20220415 1722) ((auto-complete (20201213 1255)) (auto-highlight-symbol (20211106 638)) (dash (20210609 1330)) (emacs (24 3)) (erlang (20210315 1640)) (f (20191110 1357)) (popup (20210317 138)) (s (20210603 736))) "Erlang Development Tool Suite" tar ((:commit . "5c096ecdf9462b125f2eb4092899ff63636cfc40"))]) (edwina . [(20200113 1714) ((emacs (25))) "Dynamic window manager" tar ((:commit . "c5368716a504c93407fd8cb4ef925a8d8eb62698") (:authors ("Alex Griffin" . "a@ajgrf.com")) (:maintainer "Alex Griffin" . "a@ajgrf.com") (:keywords "convenience") (:url . "https://github.com/ajgrf/edwina"))]) - (efar . [(20211122 1943) ((emacs (26 1))) "FAR-like file manager" single ((:commit . "49dc9b89a8b9bf2523c202ac8830d1245768f3f4") (:authors ("\"Vladimir Suntsov\"" . "vladimir@suntsov.online")) (:maintainer nil . "vladimir@suntsov.online") (:keywords "files") (:url . "https://github.com/suntsov/efar"))]) + (efar . [(20220516 1145) ((emacs (26 1))) "FAR-like file manager" single ((:commit . "4f7b0c6345829bb6fc27aa3eca30f2b67fea9f2c") (:authors ("\"Vladimir Suntsov\"" . "vladimir@suntsov.online")) (:maintainer nil . "vladimir@suntsov.online") (:keywords "files") (:url . "https://github.com/suntsov/efar"))]) (efire . [(20151009 2031) ((circe (1 2))) "Use campfire from Emacs" single ((:commit . "91a644662afb352475efad0b377713656f131e5c") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/capitaomorte/efire"))]) (eg . [(20170830 815) ((cl-lib (0 5)) (emacs (24 3))) "Norton Guide reader" single ((:commit . "1c7f1613d2aaae728ef540305f6ba030616f86bd") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "docs") (:url . "https://github.com/davep/eg.el"))]) (egalgo . [(20211105 1657) ((emacs (24 3))) "Genetic algorithm" single ((:commit . "a56a86591351d53ca2add7c651757bfb0064fb22") (:authors ("ROCKTAKEY" . "rocktakey@gmail.com")) (:maintainer "ROCKTAKEY" . "rocktakey@gmail.com") (:keywords "data") (:url . "https://github.com/ROCKTAKEY/egalgo"))]) (egg . [(20181126 500) nil "Emacs Got Git - Emacs interface to Git" tar ((:commit . "00e768a78ac3d25f457eed667d02cac568480bf9") (:authors ("Bogolisk" . "bogolisk@gmail.com")) (:maintainer "Bogolisk" . "bogolisk@gmail.com") (:keywords "git" "version control" "release management"))]) (egg-timer . [(20200217 1650) ((emacs (25 1))) "Commonly used intervals for setting timers while working" single ((:commit . "e3542aeb80905956b94373a222a9cbac04e6497e") (:authors ("William Carroll" . "wpcarro@gmail.com")) (:maintainer "William Carroll" . "wpcarro@gmail.com") (:url . "https://github.com/wpcarro/egg-timer.el"))]) (egison-mode . [(20200107 2333) nil "Egison editing mode" tar ((:commit . "dbb395b41a4e4eb69f3f045cbfbe95a1575ac45b") (:authors ("Satoshi Egi" . "egisatoshi@gmail.com")) (:maintainer "Satoshi Egi" . "egisatoshi@gmail.com") (:url . "https://github.com/egisatoshi/egison3/blob/master/elisp/egison-mode.el"))]) - (eglot . [(20220509 1904) ((emacs (26 1)) (jsonrpc (1 0 14)) (flymake (1 2 1)) (project (0 3 0)) (xref (1 0 1)) (eldoc (1 11 0)) (seq (2 23))) "Client for Language Server Protocol (LSP) servers" single ((:commit . "ba618d2cee55c8c339d46621b7e721957cc30a72") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience" "languages") (:url . "https://github.com/joaotavora/eglot"))]) + (eglot . [(20220509 1904) ((emacs (26 1)) (jsonrpc (1 0 14)) (flymake (1 2 1)) (project (0 3 0)) (xref (1 0 1)) (eldoc (1 11 0)) (seq (2 23))) "Client for Language Server Protocol (LSP) servers" single ((:commit . "d5e335f299216bdf3fe4b0d71fb6e24596a35a6a") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience" "languages") (:url . "https://github.com/joaotavora/eglot"))]) (eglot-fsharp . [(20220409 1811) ((emacs (27 1)) (eglot (1 4)) (fsharp-mode (1 10)) (jsonrpc (1 0 14))) "fsharp-mode eglot integration" single ((:commit . "5208b54098c7534f4768b87c5f4c8a01b638737b") (:authors ("Jürgen Hötzel" . "juergen@archlinux.org")) (:maintainer "Jürgen Hötzel" . "juergen@archlinux.org") (:keywords "languages") (:url . "https://github.com/fsharp/emacs-fsharp-mode"))]) (eglot-java . [(20220403 1815) ((emacs (26 1)) (eglot (1 0)) (jsonrpc (1 0 0))) "Java extension for the eglot LSP client" single ((:commit . "da76eb69b3f86992d62302649a987f157b7b7371") (:authors ("Yves Zoundi" . "yves_zoundi@hotmail.com")) (:maintainer "Yves Zoundi" . "yves_zoundi@hotmail.com") (:keywords "convenience" "languages") (:url . "https://github.com/yveszoundi/eglot-java"))]) (eglot-jl . [(20211208 359) ((emacs (25 1)) (eglot (1 4)) (julia-mode (0 3))) "Julia support for eglot" tar ((:commit . "2e35cf9768d97a0429a72deddbe30d6d7722d454") (:authors ("Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz")) (:maintainer "Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") (:keywords "convenience" "languages") (:url . "https://github.com/non-Jedi/eglot-jl"))]) (ego . [(20200803 1101) ((emacs (24 5)) (ht (1 5)) (mustache (0 22)) (htmlize (1 47)) (org (8 0)) (dash (2 0 0))) "a static site generator based on org mode, forked from org-page." tar ((:commit . "211c4cb2af2582849d9df984fb2346deecaf79be") (:authors ("Feng Shu <tumashu AT 163.com>") ("Kelvin Hu <ini DOT kelvin AT gmail DOT com>") ("Kuangdash <kuangdash AT 163.com>")) (:maintainer "Feng Shu <tumashu AT 163.com>") (:keywords "org-mode" "convenience" "beautify") (:url . "https://github.com/emacs-china/EGO"))]) (eide . [(20220316 619) nil "IDE interface" tar ((:commit . "23c78f4850f44d18eef66c694e7e05882d841ba6") (:authors ("Cédric Marie" . "cedric@hjuvi.fr.eu.org")) (:maintainer "Cédric Marie" . "cedric@hjuvi.fr.eu.org") (:url . "https://forge.chapril.org/hjuvi/eide"))]) (eimp . [(20120826 2039) nil "Emacs Image Manipulation Package" single ((:commit . "2e7536fe6d8f7faf1bad7a8ae37faba0162c3b4f") (:authors ("Matthew P. Hodges" . "MPHodges@member.fsf.org")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "files" "frames"))]) - (ein . [(20220419 735) ((emacs (25)) (websocket (1 12)) (anaphora (1 0 4)) (request (0 3 3)) (deferred (0 5)) (polymode (0 2 2)) (dash (2 13 0)) (with-editor (0 -1))) "Emacs IPython Notebook" tar ((:commit . "388c8f753cfb99b4f82acbdff26bbe27189d2299") (:keywords "jupyter" "literate programming" "reproducible research") (:url . "https://github.com/dickmao/emacs-ipython-notebook"))]) + (ein . [(20220513 1959) ((emacs (25)) (websocket (1 12)) (anaphora (1 0 4)) (request (0 3 3)) (deferred (0 5)) (polymode (0 2 2)) (dash (2 13 0)) (with-editor (0 -1))) "Emacs IPython Notebook" tar ((:commit . "c629877ce3a6a14f00468c0025919080c85a2163") (:keywords "jupyter" "literate programming" "reproducible research") (:url . "https://github.com/dickmao/emacs-ipython-notebook"))]) (eink-theme . [(20190219 858) nil "E Ink color theme" single ((:commit . "326b07523dcb076d6209cdbc7fdbb73df296dbdb") (:authors ("Marian Schubert" . "marian.schubert@gmail.com")) (:maintainer "Marian Schubert" . "marian.schubert@gmail.com") (:url . "http://github.com/maio/eink-emacs"))]) - (ejc-sql . [(20220414 1329) ((emacs (26 3)) (clomacs (0 0 5)) (dash (2 16 0)) (spinner (1 7 3)) (direx (1 0 0))) "Emacs SQL client uses Clojure JDBC." tar ((:commit . "5c6341c751da9c7dbed43eafc8e99f456c1de0d2") (:authors ("Kostafey" . "kostafey@gmail.com")) (:maintainer "Kostafey" . "kostafey@gmail.com") (:keywords "sql" "jdbc") (:url . "https://github.com/kostafey/ejc-sql"))]) + (ejc-sql . [(20220511 1619) ((emacs (26 3)) (clomacs (0 0 5)) (dash (2 16 0)) (spinner (1 7 3)) (direx (1 0 0))) "Emacs SQL client uses Clojure JDBC." tar ((:commit . "900cf3ff0a8cffeeb0155ca131fa2e425ca9137d") (:authors ("Kostafey" . "kostafey@gmail.com")) (:maintainer "Kostafey" . "kostafey@gmail.com") (:keywords "sql" "jdbc") (:url . "https://github.com/kostafey/ejc-sql"))]) (ejson-mode . [(20190720 2138) ((emacs (25))) "Major mode for editing ejson files." single ((:commit . "9630dfac9549779711dbe89e621f516bb4b3a354") (:authors ("Dante Catalfamo")) (:maintainer "Dante Catalfamo") (:keywords "convenience" "languages" "tools") (:url . "https://github.com/dantecatalfamo/ejson-mode"))]) (el-autoyas . [(20120918 1317) nil "Automatically create Emacs-Lisp Yasnippets" tar ((:commit . "bde0251ecb504f585dfa27c205c8e312655310cc") (:authors ("Matthew L. Fidler")) (:maintainer "Matthew L. Fidler") (:keywords "emacs" "lisp" "mode" "yasnippet") (:url . "https://github.com/mlf176f2/el-autoyas.el"))]) - (el-fetch . [(20220509 1439) ((emacs (25 1))) "Show system information in Neofetch-like style (eg CPU, RAM)" single ((:commit . "7fdb153ea2a40955ae3a9551da63d173fb59cb39") (:authors ("Maciej Barć" . "xgqt@riseup.net")) (:maintainer "Maciej Barć" . "xgqt@riseup.net") (:url . "https://gitlab.com/xgqt/emacs-el-fetch"))]) + (el-fetch . [(20220510 1536) ((emacs (25 1))) "Show system information in Neofetch-like style (eg CPU, RAM)" single ((:commit . "3aa9594e807cb03af228c13224b381ecdd7ba2e3") (:authors ("Maciej Barć" . "xgqt@riseup.net")) (:maintainer "Maciej Barć" . "xgqt@riseup.net") (:url . "https://gitlab.com/xgqt/emacs-el-fetch"))]) (el-fly-indent-mode . [(20180422 243) ((emacs (25))) "Indent Emacs Lisp on the fly" single ((:commit . "39738c88c01a3a035edffe63400d434edb1e3003") (:authors ("Jiahao Li" . "jiahaowork@gmail.com")) (:maintainer "Jiahao Li" . "jiahaowork@gmail.com") (:keywords "lisp" "languages") (:url . "https://github.com/jiahaowork/el-fly-indent-mode.el"))]) - (el-get . [(20211224 959) nil "Manage the external elisp bits and pieces you depend upon" tar ((:commit . "9353309744e4f8a7c9b1adf22ec99536fb2146b0") (:authors ("Dimitri Fontaine" . "dim@tapoueh.org")) (:maintainer "Dimitri Fontaine" . "dim@tapoueh.org") (:keywords "emacs" "package" "elisp" "install" "elpa" "git" "git-svn" "bzr" "cvs" "svn" "darcs" "hg" "apt-get" "fink" "pacman" "http" "http-tar" "emacswiki") (:url . "http://www.emacswiki.org/emacs/el-get"))]) + (el-get . [(20211224 959) nil "Manage the external elisp bits and pieces you depend upon" tar ((:commit . "91352ca0f895d099f608644c8e9ad8e844b5c520") (:authors ("Dimitri Fontaine" . "dim@tapoueh.org")) (:maintainer "Dimitri Fontaine" . "dim@tapoueh.org") (:keywords "emacs" "package" "elisp" "install" "elpa" "git" "git-svn" "bzr" "cvs" "svn" "darcs" "hg" "apt-get" "fink" "pacman" "http" "http-tar" "emacswiki") (:url . "http://www.emacswiki.org/emacs/el-get"))]) (el-init . [(20150728 920) ((emacs (24)) (cl-lib (0 5)) (anaphora (1 0 0))) "A loader inspired by init-loader" single ((:commit . "7538e1511ff7ceea2ba65ed4783c57e2f9176ee6") (:authors ("Hiroki YAMAKAWA" . "s06139@gmail.com")) (:maintainer "Hiroki YAMAKAWA" . "s06139@gmail.com") (:url . "https://github.com/HKey/el-init"))]) (el-init-viewer . [(20150303 828) ((emacs (24)) (cl-lib (0 5)) (ctable (0 1 2)) (dash (2 10 0)) (anaphora (1 0 0)) (el-init (0 1 4))) "Record viewer for el-init" single ((:commit . "7c0169d356d6c007317e253e5776e1e48a60d6ad") (:authors ("Hiroki YAMAKAWA" . "s06139@gmail.com")) (:maintainer "Hiroki YAMAKAWA" . "s06139@gmail.com") (:url . "https://github.com/HKey/el-init-viewer"))]) (el-mock . [(20170824 1954) nil "Tiny Mock and Stub framework in Emacs Lisp" single ((:commit . "6ebfe64410d54b4cf76f655e416d49935d5e2ceb") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "lisp" "testing" "unittest") (:url . "http://github.com/rejeep/el-mock.el"))]) @@ -1144,7 +1145,7 @@ (elcontext . [(20210109 1238) ((ht (2 3)) (hydra (0 14 0)) (emacs (24 3)) (f (0 20 0)) (osx-location (0 4)) (uuidgen (0 3))) "Create context specific actions" tar ((:commit . "2efd3dd8c5176c4f071bb048be6cb069b05d6e9e") (:authors ("Thomas Sojka")) (:maintainer "Thomas Sojka") (:keywords "calendar" "convenience") (:url . "https://github.com/rollacaster/elcontext"))]) (elcord . [(20220305 1234) ((emacs (25 1))) "Allows you to integrate Rich Presence from Discord" tar ((:commit . "70fd716e673b724b30b921f4cfa0033f9c02d0f2") (:authors ("heatingdevice") ("Wilfredo Velázquez-Rodríguez" . "zulu.inuoe@gmail.com")) (:maintainer "heatingdevice") (:keywords "games") (:url . "https://github.com/Mstrodl/elcord"))]) (elcouch . [(20201108 955) ((emacs (25 1)) (json-mode (1 0 0)) (libelcouch (0 11 0)) (navigel (0 3 0))) "View and manipulate CouchDB databases" single ((:commit . "3d162dda14411349e12509029d2b621c5d1edea2") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "data" "tools") (:url . "https://gitlab.petton.fr/DamienCassou/elcouch"))]) - (eldev . [(20220501 1128) ((emacs (24 4))) "Elisp Development Tool" tar ((:commit . "7275089749779599d87bee878e5103921ea919f9") (:authors ("Paul Pogonyshev" . "pogonyshev@gmail.com")) (:maintainer "Paul Pogonyshev" . "pogonyshev@gmail.com") (:keywords "maint" "tools") (:url . "https://github.com/doublep/eldev"))]) + (eldev . [(20220516 2055) ((emacs (24 4))) "Elisp Development Tool" tar ((:commit . "a17357a24cf8fd2f6b16b50266a6ae8b842a9ec7") (:authors ("Paul Pogonyshev" . "pogonyshev@gmail.com")) (:maintainer "Paul Pogonyshev" . "pogonyshev@gmail.com") (:keywords "maint" "tools") (:url . "https://github.com/doublep/eldev"))]) (eldoc-box . [(20220506 28) ((emacs (27 1))) "Display documentation in childframe" single ((:commit . "8d523f4fddbd8986340cf76f349ab18c0b3d5581") (:authors ("Sebastien Chapuis" . "sebastien@chapu.is")) (:maintainer "Yuan Fu" . "casouri@gmail.com") (:url . "https://github.com/casouri/eldoc-box"))]) (eldoc-cmake . [(20190419 2244) ((emacs (25 1))) "Eldoc support for CMake" single ((:commit . "4453c03b5c95ff32842f13db2fc317fb0fe2f79e") (:authors ("Kirill Ignatiev")) (:maintainer "Kirill Ignatiev") (:url . "https://github.com/ikirill/eldoc-cmake"))]) (eldoc-eval . [(20220106 1951) nil "Enable eldoc support when minibuffer is in use." single ((:commit . "e91800503c90cb75dc70abe42f1d6ae499346cc1") (:authors ("Thierry Volpiatto" . "thievol@posteo.net")) (:maintainer "Thierry Volpiatto" . "thievol@posteo.net"))]) @@ -1172,7 +1173,7 @@ (elgrep . [(20211221 852) ((emacs (26 2)) (async (1 5))) "Searching files for regular expressions" single ((:commit . "f8124c699b6a4abfb471269bc26afbcc8136f476") (:authors ("Tobias Zawada" . "i@tn-home.de")) (:maintainer "Tobias Zawada" . "i@tn-home.de") (:keywords "tools" "matching" "files" "unix") (:url . "https://github.com/TobiasZawada/elgrep"))]) (elhome . [(20161025 2042) ((initsplit (20120630))) "A framework for a \"home\" Emacs configuration" tar ((:commit . "e789e806469af3e9705f72298683c21f6c3a516d") (:authors ("Dave Abrahams" . "dave@boostpro.com")) (:maintainer "Demyan Rogozhin" . "demyan.rogozhin@gmail.com") (:keywords "lisp") (:url . "http://github.com/demyanrogozhin/elhome"))]) (elisp-def . [(20210126 750) ((dash (2 12 0)) (f (0 19 0)) (s (1 11 0)) (emacs (24 3))) "macro-aware go-to-definition for elisp" single ((:commit . "dfca043ec0cbead67bd9c526cb009daf771d0fa2") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:keywords "lisp"))]) - (elisp-demos . [(20210312 542) ((emacs (24 4))) "Elisp API Demos" tar ((:commit . "924b07d28e4f5b82f0e1377bcde800068f0a6d9d") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "lisp" "docs") (:url . "https://github.com/xuchunyang/elisp-demos"))]) + (elisp-demos . [(20220513 1626) ((emacs (24 4))) "Elisp API Demos" tar ((:commit . "01c301b516e9949d0239d20f6834afbc9acf0abb") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "lisp" "docs") (:url . "https://github.com/xuchunyang/elisp-demos"))]) (elisp-depend . [(20190325 1114) nil "Parse depend libraries of elisp file." single ((:commit . "6679da9a6be5a845bb4804224c8394a9bc62168f"))]) (elisp-depmap . [(20220223 1131) ((emacs (26 1)) (dash (2 17 0))) "Generate an elisp dependency map in graphviz" tar ((:commit . "15909462e3f7daf445d3cecf402ee16c7e3263ed") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://gitlab.com/mtekman/elisp-depmap.el"))]) (elisp-docstring-mode . [(20170304 1615) nil "Major mode for editing elisp docstrings." single ((:commit . "f512e509dd690f65133e55563ebbfd2dede5034f") (:authors ("Matúš Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matúš Goljer" . "matus.goljer@gmail.com") (:keywords "languages"))]) @@ -1214,7 +1215,7 @@ (elvish-mode . [(20180809 1612) ((emacs (24 3))) "Defines a major mode for Elvish" single ((:commit . "a13fcaf209d803e2e450ca2bf80dea94b40a0141") (:authors ("Adam Schwalm" . "adamschwalm@gmail.com")) (:maintainer "Adam Schwalm" . "adamschwalm@gmail.com") (:url . "https://github.com/ALSchwalm/elvish-mode"))]) (elwm . [(20150817 1007) ((dash (1 1 0))) "Minimalistic window manager for emacs" single ((:commit . "c33b183f006ad476c3a44dab316f580f8b369930") (:authors ("Matus Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "docs") (:url . "https://github.com/Fuco1/elwm"))]) (elx . [(20220331 2252) ((emacs (25 1))) "extract information from Emacs Lisp libraries" single ((:commit . "ea0b10340b22e8dd0454fe37ba84ff2157fada4f") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "docs" "libraries" "packages") (:url . "https://github.com/emacscollective/elx"))]) - (emacs-everywhere . [(20220407 329) ((emacs (26 3))) "System-wide popup windows for quick edits" single ((:commit . "54b9ba1ac0d7f8b644354fd6d27c9e3aff111dcc") (:authors ("TEC <https://github.com/tecosaur>")) (:maintainer "TEC" . "tec@tecosaur.com") (:keywords "conenience" "frames") (:url . "https://github.com/tecosaur/emacs-everywhere"))]) + (emacs-everywhere . [(20220515 346) ((emacs (26 3))) "System-wide popup windows for quick edits" single ((:commit . "516f30f38cf9616e810df4e5ee4939004c375baa") (:authors ("TEC <https://github.com/tecosaur>")) (:maintainer "TEC" . "tec@tecosaur.com") (:keywords "conenience" "frames") (:url . "https://github.com/tecosaur/emacs-everywhere"))]) (emacsc . [(20220420 1042) nil "helper for emacsc(1)" tar ((:commit . "199c08147ebe98da1004c478c92ba8866950b637") (:authors ("Akinori MUSHA" . "knu@iDaemons.org")) (:maintainer "Akinori MUSHA" . "knu@iDaemons.org") (:keywords "tools") (:url . "https://github.com/knu/emacsc"))]) (emacsist-view . [(20160426 1223) nil "Mode for viewing emacsist.com" single ((:commit . "f67761259ed779a9bc95c9a4e0474522990c5c6b") (:authors ("DarkSun" . "lujun9972@gmail.com")) (:maintainer "DarkSun" . "lujun9972@gmail.com") (:keywords "convenience" "usability") (:url . "https://github.com/lujun9972/emacsist-view"))]) (emacsql . [(20220408 1614) ((emacs (25 1))) "high-level SQL database front-end" tar ((:commit . "373975cbccf7776af771e23f86043b236a330702") (:authors ("Christopher Wellons" . "wellons@nullprogram.com")) (:maintainer "Christopher Wellons" . "wellons@nullprogram.com") (:url . "https://github.com/skeeto/emacsql"))]) @@ -1228,8 +1229,8 @@ (emamux . [(20200315 1220) ((emacs (24 3))) "Interact with tmux" single ((:commit . "6172131d78038f0b1490e24bac60534bf4ad3b30") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-emamux"))]) (emamux-ruby-test . [(20130812 1639) ((emamux (0 1)) (projectile (0 9 1))) "Ruby test with emamux" single ((:commit . "23b73c650573b340351a919da3da416acfc2ac84") (:url . "https://github.com/syohex/emamux-ruby-test"))]) (emaps . [(20200508 1759) ((dash (2 17 0)) (emacs (24))) "Utilities for working with keymaps" single ((:commit . "7c561f3ded2015ed3774e5784059d6601082743e") (:authors ("Ben Moon" . "software@guiltydolphin.com")) (:maintainer "Ben Moon" . "software@guiltydolphin.com") (:keywords "convenience" "keyboard" "keymap" "utility") (:url . "https://github.com/GuiltyDolphin/emaps"))]) - (embark . [(20220509 2259) ((emacs (26 1))) "Conveniently act on minibuffer completions" tar ((:commit . "81c7f751be1de33dee9f7523fd3429ee3fe9a0d1") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) - (embark-consult . [(20220507 143) ((emacs (27 1)) (embark (0 12)) (consult (0 10))) "Consult integration for Embark" single ((:commit . "81c7f751be1de33dee9f7523fd3429ee3fe9a0d1") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) + (embark . [(20220509 2259) ((emacs (26 1))) "Conveniently act on minibuffer completions" tar ((:commit . "5bb0e3aa40d6177a4b377af6da296b33b7ad404a") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) + (embark-consult . [(20220507 143) ((emacs (27 1)) (embark (0 12)) (consult (0 10))) "Consult integration for Embark" single ((:commit . "5bb0e3aa40d6177a4b377af6da296b33b7ad404a") (:authors ("Omar Antolín Camarena" . "omar@matem.unam.mx")) (:maintainer "Omar Antolín Camarena" . "omar@matem.unam.mx") (:keywords "convenience") (:url . "https://github.com/oantolin/embark"))]) (ember-mode . [(20200208 1423) ((cl-lib (0 5))) "Ember navigation mode for emacs" single ((:commit . "a587c423041b2fcb065fd5b6a03b2899b764e462") (:authors ("Aad Versteden" . "madnificent@gmail.com")) (:maintainer "Aad Versteden" . "madnificent@gmail.com") (:keywords "ember" "ember.js" "emberjs"))]) (ember-yasnippets . [(20160526 1658) ((yasnippet (0 8 0))) "Snippets for Ember.js development" tar ((:commit . "3b5bd01569646237bf1b540d097e12f9118b67f4") (:authors ("Ron White" . "ronco@costite.com")) (:maintainer "Ron White" . "ronco@costite.com") (:keywords "tools" "abbrev" "languages"))]) (embrace . [(20171031 1833) ((cl-lib (0 5)) (expand-region (0 10 0))) "Add/Change/Delete pairs based on `expand-region'" single ((:commit . "dd5da196e5bcc5e6d87e1937eca0c21da4334ef2") (:authors ("Junpeng Qiu" . "qjpchmail@gmail.com")) (:maintainer "Junpeng Qiu" . "qjpchmail@gmail.com") (:keywords "extensions"))]) @@ -1266,8 +1267,8 @@ (epc . [(20140610 534) ((concurrent (0 3 1)) (ctable (0 1 2))) "A RPC stack for the Emacs Lisp" tar ((:commit . "e1bfa5ca163273859336e3cc89b4b6460f7f8cda") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "lisp" "rpc") (:url . "https://github.com/kiwanami/emacs-epc"))]) (epic . [(20170210 23) ((htmlize (1 47))) "Evernote Picker for Cocoa Emacs" single ((:commit . "a41826c330eb0ea061d58a08cc861b0c4ac8ec4e") (:authors ("Yoshinari Nomura" . "nom@quickhack.net")) (:maintainer "Yoshinari Nomura" . "nom@quickhack.net") (:keywords "evernote" "applescript") (:url . "https://github.com/yoshinari-nomura/epic"))]) (eping . [(20201027 2149) ((emacs (25 1))) "Ping websites to check internet connectivity" tar ((:commit . "99d3a4b6973d5b09864e0af7425a61f99c19b90a") (:authors ("Sean Hutchings" . "seanhut@yandex.com")) (:maintainer "Sean Hutchings" . "seanhut@yandex.com") (:keywords "comm" "processes" "terminals" "unix") (:url . "https://github.com/sean-hut/eping"))]) - (epkg . [(20220503 1115) ((emacs (25 1)) (compat (28 1 1 0)) (closql (20210927))) "Browse the Emacsmirror package database" tar ((:commit . "fb86b5edd910b2571fc21477d0dac90be97a8f61") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/epkg"))]) - (epkg-marginalia . [(20220424 2211) ((emacs (26)) (compat (28 1 1 0)) (epkg (3 3 1)) (marginalia (0 12))) "Show Epkg information in completion annotations" single ((:commit . "ac43d5797300ac478e8dc862ec572b67ae4d5d86") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/epkg-marginalia"))]) + (epkg . [(20220510 2036) ((emacs (25 1)) (compat (28 1 1 0)) (closql (20210927))) "Browse the Emacsmirror package database" tar ((:commit . "4524f9a8f19717c4afb84a184db7841b4ffcbf56") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/epkg"))]) + (epkg-marginalia . [(20220511 1942) ((emacs (27 1)) (compat (28 1 1 0)) (epkg (3 3 1)) (marginalia (0 12))) "Show Epkg information in completion annotations" single ((:commit . "ee784211346c7c374accec2bda78788cc68fa641") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/epkg-marginalia"))]) (epl . [(20180205 2049) ((cl-lib (0 3))) "Emacs Package Library" single ((:commit . "78ab7a85c08222cd15582a298a364774e3282ce6") (:authors ("Sebastian Wiesner" . "swiesner@lunaryorn.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "convenience") (:url . "http://github.com/cask/epl"))]) (epm . [(20190509 443) ((emacs (24 3)) (epl (0 8))) "Emacs Package Manager" tar ((:commit . "6375ddbf93c5f25647f6ebb25b54045b3c93a5be") (:authors ("Chunyang Xu" . "xuchunyang.me@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang.me@gmail.com") (:url . "https://github.com/xuchunyang/epm"))]) (epresent . [(20160411 201) ((org (8)) (cl-lib (0 5))) "Simple presentation mode for Emacs Org-mode" single ((:commit . "6c8abedcf46ff08091fa2bba52eb905c6290057d") (:keywords "gui") (:url . "https://github.com/dakrone/epresent"))]) @@ -1296,15 +1297,15 @@ (erefactor . [(20200513 1252) ((cl-lib (0 3))) "Emacs-Lisp refactoring utilities" single ((:commit . "bfe27a1b8c7cac0fe054e76113e941efa3775fe8") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "extensions" "tools" "maint") (:url . "https://github.com/mhayashi1120/Emacs-erefactor"))]) (ergoemacs-mode . [(20220411 338) ((emacs (24 1)) (cl-lib (0 5))) "Emacs mode based on common modern interface and ergonomics." tar ((:commit . "9cd89eef490f6c9f4af273bb3dd2c68d5ed2de61") (:authors ("Xah Lee" . "xah@xahlee.org") ("David Capello" . "davidcapello@gmail.com") ("Matthew L. Fidler" . "matthew.fidler@gmail.com") ("Kim F. Storm" . "storm@cua.dk")) (:maintainer "Matthew L. Fidler" . "matthew.fidler@gmail.com") (:keywords "convenience") (:url . "https://github.com/ergoemacs/ergoemacs-mode"))]) (ergoemacs-status . [(20160318 538) ((powerline (2 3)) (mode-icons (0 1 0))) "Adaptive Status Bar / Mode Line" single ((:commit . "d952cc2361adf6eb4d6af60950ad4ab699c81320") (:authors ("Matthew Fidler")) (:maintainer "Matthew Fidler"))]) - (eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "9a5f2b4a8cd14edbde9d16dcdfcb8db2a91be0d8") (:url . "https://github.com/agda/agda"))]) - (erlang . [(20220215 1844) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "9962287133b7107c34931f91d11aea6bea8fa4d1") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))]) + (eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "9c6b0520529b8aabada5af7e0e1510fee3f2c44d") (:url . "https://github.com/agda/agda"))]) + (erlang . [(20220215 1844) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "f6a2314f4825f08bb7cea09caebcb9de54dfc719") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))]) (erlstack-mode . [(20210419 1917) ((emacs (25 1)) (dash (2 12 0))) "Minor mode for analysing Erlang stacktraces" single ((:commit . "ca264bca24cdaa8b2bac57882716f03f633e42b0") (:authors ("k32")) (:maintainer "k32") (:keywords "tools" "erlang") (:url . "https://github.com/k32/erlstack-mode"))]) (eros . [(20180415 618) ((emacs (24 4))) "Evaluation Result OverlayS for Emacs Lisp" single ((:commit . "dd8910279226259e100dab798b073a52f9b4233a") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "convenience" "lisp") (:url . "https://github.com/xiongtx/eros"))]) (ert-async . [(20200105 1031) ((emacs (24 1))) "Async support for ERT" single ((:commit . "948cf2faa10e085bda3739034ca5ea1912893433") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "lisp" "test") (:url . "http://github.com/rejeep/ert-async.el"))]) (ert-expectations . [(20121009 734) nil "The simplest unit test framework in the world" single ((:commit . "aed70e002c4305b66aed7f6d0d48e9addd2dc1e6") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "test" "unittest" "ert" "expectations") (:url . "http://www.emacswiki.org/emacs/download/ert-expectations.el"))]) (ert-junit . [(20190802 2232) ((ert (0)) (emacs (23 4))) "JUnit XML reports from ert results" single ((:commit . "65f91c35b088b87943dbbbe7e1ce354bc9bc0992") (:authors ("Ola Nilsson" . "ola.nilsson@gmail.com")) (:maintainer "Ola Nilsson" . "ola.nilsson@gmail.com") (:keywords "tools" "test" "unittest" "ert") (:url . "http://bitbucket.org/olanilsson/ert-junit"))]) (ert-modeline . [(20140115 1015) ((s (1 3 1)) (dash (1 2 0)) (emacs (24 1)) (projectile (0 9 1))) "displays ert test results in the modeline." single ((:commit . "e7be2b81191afb437b70368a819770f8f750e4af") (:authors ("Chris Barrett" . "chris.d.barrett@me.com")) (:maintainer "Chris Barrett" . "chris.d.barrett@me.com") (:keywords "tools" "tests" "convenience"))]) - (ert-runner . [(20201005 2336) ((s (1 6 1)) (dash (1 8 0)) (f (0 10 0)) (commander (0 2 0)) (ansi (0 1 0)) (shut-up (0 1 0))) "Opinionated Ert testing workflow" tar ((:commit . "80cf4f60ec8c1f04f58054ed8ad2dcfacc17d8b5") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "test") (:url . "http://github.com/rejeep/ert-runner.el"))]) + (ert-runner . [(20220513 1142) ((s (1 6 1)) (dash (1 8 0)) (f (0 10 0)) (commander (0 2 0)) (ansi (0 1 0)) (shut-up (0 1 0))) "Opinionated Ert testing workflow" tar ((:commit . "69d66b934223d5f1801ba3a4c8dbfb3453f2a041") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "test") (:url . "http://github.com/rejeep/ert-runner.el"))]) (es-lib . [(20141111 1830) ((cl-lib (0 3))) "A collection of emacs utilities" tar ((:commit . "753b27363e39c10edc9e4e452bdbbbe4d190df4a") (:authors ("sabof")) (:maintainer "sabof") (:url . "https://github.com/sabof/es-lib"))]) (es-mode . [(20201125 2059) ((dash (2 11 0)) (cl-lib (0 5)) (spark (1 0)) (s (1 11 0)) (request (0 3 0))) "A major mode for editing and executing Elasticsearch queries" tar ((:commit . "cde5cafcbbbd57db6d38ae7452de626305bba68d") (:authors ("Lee Hinman" . "lee@writequit.org")) (:maintainer "Lee Hinman" . "lee@writequit.org") (:keywords "elasticsearch") (:url . "http://www.github.com/dakrone/es-mode"))]) (es-windows . [(20140211 904) ((cl-lib (0 3)) (emacs (24))) "Window-management utilities" single ((:commit . "239e30408cb1adb4bc8bd63e2df34711fa910b4f") (:authors ("sabof")) (:maintainer "sabof") (:url . "https://github.com/sabof/es-windows"))]) @@ -1318,7 +1319,7 @@ (eshell-fixed-prompt . [(20220104 1535) ((emacs (25)) (s (1 11 0))) "Restrict eshell to a single fixed prompt" single ((:commit . "302c241b42764bd6b4ed6d3c6ea360b5a2292fbc") (:authors ("Tijs Mallaerts" . "tijs.mallaerts@gmail.com")) (:maintainer "Tijs Mallaerts" . "tijs.mallaerts@gmail.com"))]) (eshell-fringe-status . [(20170117 2316) nil "Show last status in fringe" single ((:commit . "adc6997c68e39c0d52a2af1b2fd5cf2057783797") (:authors ("Tom Willemse" . "tom@ryuslash.org")) (:maintainer "Tom Willemse" . "tom@ryuslash.org") (:url . "http://projects.ryuslash.org/eshell-fringe-status/"))]) (eshell-git-prompt . [(20220206 458) ((emacs (24 1)) (cl-lib (0 5)) (dash (2 11 0))) "Some Eshell prompt for Git users" single ((:commit . "1eb1fd56649f291cac482fbf06dd43ef867873bc") (:authors ("Chunyang Xu" . "mail@xuchunyang.me")) (:maintainer "Chunyang Xu" . "mail@xuchunyang.me") (:keywords "eshell" "git") (:url . "https://github.com/xuchunyang/eshell-git-prompt"))]) - (eshell-info-banner . [(20220402 1721) ((emacs (25 1)) (s (1))) "System information as your Eshell banner" single ((:commit . "53fc69b8712b9869cee49468a6e418d64d2c3ab9") (:authors ("Lucien Cartier-Tilet" . "lucien@phundrak.com")) (:maintainer "Lucien Cartier-Tilet" . "lucien@phundrak.com") (:url . "https://github.com/Phundrak/eshell-info-banner.el"))]) + (eshell-info-banner . [(20220516 1714) ((emacs (25 1)) (s (1))) "System information as your Eshell banner" single ((:commit . "8e57add6c71568af151c8f965e968677f2a70c56") (:authors ("Lucien Cartier-Tilet" . "lucien@phundrak.com")) (:maintainer "Lucien Cartier-Tilet" . "lucien@phundrak.com") (:url . "https://github.com/Phundrak/eshell-info-banner.el"))]) (eshell-outline . [(20201121 620) ((emacs (25 1))) "Enhanced outline-mode for Eshell" single ((:commit . "6f917afa5b3d36764d76d7864589094647d8c3b4") (:authors ("Jamie Beardslee" . "jdb@jamzattack.xyz")) (:maintainer "Jamie Beardslee" . "jdb@jamzattack.xyz") (:keywords "unix" "eshell" "outline" "convenience") (:url . "https://git.jamzattack.xyz/eshell-outline"))]) (eshell-prompt-extras . [(20210925 110) ((emacs (25))) "Display extra information for your eshell prompt." single ((:commit . "c2078093323206b91a1b1f5786d79faa00b76be7") (:authors ("zwild" . "judezhao@outlook.com")) (:maintainer "Chunyang Xu" . "mail@xuchunyang.me") (:keywords "eshell" "prompt") (:url . "https://github.com/zwild/eshell-prompt-extras"))]) (eshell-syntax-highlighting . [(20210429 413) ((emacs (25 1))) "Highlight eshell commands" single ((:commit . "8e3a685fc6d97af79e1046e5b24385786d8e92f6") (:authors ("Alex Kreisher" . "akreisher18@gmail.com")) (:maintainer "Alex Kreisher" . "akreisher18@gmail.com") (:keywords "convenience") (:url . "https://github.com/akreisher/eshell-syntax-highlighting"))]) @@ -1361,7 +1362,7 @@ (evalator-clojure . [(20160208 2148) ((cider (0 10 0)) (evalator (1 0 0))) "Clojure evaluation context for evalator via CIDER." tar ((:commit . "caa4e0a137bdfada86593128a654e16aa617ad50") (:authors ("Sean Irby")) (:maintainer "Sean Irby" . "sean.t.irby@gmail.com") (:keywords "languages" "clojure" "cider" "helm") (:url . "http://www.github.com/seanirby/evalator-clojure"))]) (eve-mode . [(20170822 2231) ((emacs (25)) (polymode (1 0)) (markdown-mode (2 0))) "Major mode for editing Eve documents." single ((:commit . "a4661114d9c18725691b76321d72167ca5a9070a") (:authors ("Joshua Cole" . "joshuafcole@gmail.com")) (:maintainer "Joshua Cole" . "joshuafcole@gmail.com") (:keywords "languages" "wp" "tools") (:url . "https://github.com/witheve/emacs-eve-mode"))]) (everlasting-scratch . [(20220412 921) ((emacs (25 1))) "The *scratch* that lasts forever" single ((:commit . "8706c55f3b7c267c15b8f10170ecec9998b3cc3d") (:authors ("Huming Chen" . "chenhuming@gmail.com")) (:maintainer "Huming Chen" . "chenhuming@gmail.com") (:keywords "convenience" "tool") (:url . "https://github.com/beacoder/everlasting-scratch"))]) - (evil . [(20220509 2023) ((emacs (24 1)) (goto-chg (1 6)) (cl-lib (0 5))) "Extensible Vi layer for Emacs." tar ((:commit . "b32e00179538af9685ab7c31d46eea6dc40595d4") (:maintainer "Tom Dalziel" . "tom.dalziel@gmail.com") (:keywords "emulation" "vim") (:url . "https://github.com/emacs-evil/evil"))]) + (evil . [(20220510 2302) ((emacs (24 1)) (goto-chg (1 6)) (cl-lib (0 5))) "Extensible Vi layer for Emacs." tar ((:commit . "5a9cfbc443219c4063b17853b7828ec0a00d2736") (:maintainer "Tom Dalziel" . "tom.dalziel@gmail.com") (:keywords "emulation" "vim") (:url . "https://github.com/emacs-evil/evil"))]) (evil-anzu . [(20200514 1902) ((evil (1 0 0)) (anzu (0 46))) "anzu for evil-mode" single ((:commit . "d3f6ed4773b48767bd5f4708c7f083336a8a8a86") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com") ("Fredrik Bergroth" . "fbergroth@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-evil-anzu"))]) (evil-args . [(20220125 1626) ((evil (1 0 8))) "Motions and text objects for delimited arguments in Evil." single ((:commit . "2671071a4a57eaee7cc8c27b9e4b6fc60fd2ccd3") (:authors ("Connor Smith" . "wconnorsmith@gmail.com")) (:maintainer "Connor Smith" . "wconnorsmith@gmail.com") (:keywords "evil" "vim-emulation") (:url . "http://github.com/wcsmith/evil-args"))]) (evil-avy . [(20150908 748) ((emacs (24 1)) (cl-lib (0 5)) (avy (0 3 0)) (evil (1 2 3))) "set-based completion" single ((:commit . "2dd955cc3ecaa7ddeb67b295298abdc6d16dd3a5") (:authors ("Yufan Lou" . "loganlyf@gmail.com")) (:maintainer "Yufan Lou" . "loganlyf@gmail.com") (:keywords "point" "location" "evil" "vim") (:url . "https://github.com/louy2/evil-avy"))]) @@ -1369,7 +1370,7 @@ (evil-cleverparens . [(20170718 413) ((evil (1 0)) (paredit (1)) (smartparens (1 6 1)) (emacs (24 4)) (dash (2 12 0))) "Evil friendly minor-mode for editing lisp." tar ((:commit . "8c45879d49bfa6d4e414b6c1df700a4a51cbb869") (:authors ("Olli Piepponen" . "opieppo@gmail.com")) (:maintainer "Olli Piepponen" . "opieppo@gmail.com") (:keywords "cleverparens" "parentheses" "evil" "paredit" "smartparens") (:url . "https://github.com/luxbock/evil-cleverparens"))]) (evil-colemak-basics . [(20220222 1856) ((emacs (24 3)) (evil (1 2 12)) (evil-snipe (2 0 3))) "Basic Colemak key bindings for evil-mode" single ((:commit . "66648de206a7368013f28c0d053b1b32c3efe6c6") (:authors ("Wouter Bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "Wouter Bolsterlee" . "wouter@bolsterl.ee") (:keywords "convenience" "emulations" "colemak" "evil") (:url . "https://github.com/wbolster/evil-colemak-basics"))]) (evil-colemak-minimal . [(20171006 1317) ((emacs (24)) (evil (1 2 12))) "Minimal Colemak key bindings for evil-mode" single ((:commit . "6d98b6da60f414524a0d718f76024c26dce742b3") (:authors ("Bryan Allred" . "bryan@revolvingcow.com")) (:maintainer "Bryan Allred" . "bryan@revolvingcow.com") (:keywords "colemak" "evil") (:url . "https://github.com/bmallred/evil-colemak-minimal"))]) - (evil-collection . [(20220505 619) ((emacs (25 1)) (evil (1 2 13)) (annalist (1 0))) "A set of keybindings for Evil mode" tar ((:commit . "9707efcae4fc76fa204b1c29565aae35b99b865a") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "evil" "tools") (:url . "https://github.com/emacs-evil/evil-collection"))]) + (evil-collection . [(20220516 1554) ((emacs (25 1)) (evil (1 2 13)) (annalist (1 0))) "A set of keybindings for Evil mode" tar ((:commit . "11cfad9b3c01feb7848f13d5c3f5cc1787ab6eb6") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "evil" "tools") (:url . "https://github.com/emacs-evil/evil-collection"))]) (evil-commentary . [(20210210 1702) ((evil (1 0 0))) "Comment stuff out. A port of vim-commentary." tar ((:commit . "2dab6ac34d1617971768ad219d73af48f7473fec") (:authors ("Quang Linh LE" . "linktohack@gmail.com")) (:maintainer "Quang Linh LE" . "linktohack@gmail.com") (:keywords "evil" "comment" "commentary" "evil-commentary") (:url . "http://github.com/linktohack/evil-commentary"))]) (evil-dvorak . [(20160416 1841) ((evil (1 0 8))) "evil keybindings for that work with dvorak mode" tar ((:commit . "824f7c56980d72a0ff04c662223540cd66f13754") (:authors ("Joshua Branson")) (:maintainer "Joshua Branson") (:keywords "dvorak" "evil" "vim"))]) (evil-easymotion . [(20200424 135) ((emacs (24)) (avy (0 3 0)) (cl-lib (0 5))) "A port of vim's easymotion to emacs" single ((:commit . "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9") (:authors ("PythonNut" . "pythonnut@pythonnut.com")) (:maintainer "PythonNut" . "pythonnut@pythonnut.com") (:keywords "convenience" "evil") (:url . "https://github.com/pythonnut/evil-easymotion"))]) @@ -1394,7 +1395,7 @@ (evil-lisp-state . [(20160404 248) ((evil (1 0 9)) (bind-map (0)) (smartparens (1 6 1))) "An evil state to edit Lisp code" single ((:commit . "3c65fecd9917a41eaf6460f22187e2323821f3ce") (:authors ("Sylvain Benner" . "sylvain.benner@gmail.com")) (:maintainer "Sylvain Benner" . "sylvain.benner@gmail.com") (:keywords "convenience" "editing" "evil" "smartparens" "lisp" "mnemonic") (:url . "https://github.com/syl20bnr/evil-lisp-state"))]) (evil-lispy . [(20190502 739) ((lispy (0 26 0)) (evil (1 2 12)) (hydra (0 13 5))) "precision Lisp editing with Evil and Lispy" tar ((:commit . "ed317f7fccbdbeea8aa04a91b1b1f48a0e2ddc4e") (:authors ("Brandon Carrell <brandoncarrell@gmail.com>, Mika Vilpas" . "mika.vilpas@gmail.com")) (:maintainer "Brandon Carrell <brandoncarrell@gmail.com>, Mika Vilpas" . "mika.vilpas@gmail.com") (:keywords "lisp") (:url . "https://github.com/sp3ctum/evil-lispy"))]) (evil-mark-replace . [(20200630 940) ((evil (1 14 0))) "replace the thing in marked area" single ((:commit . "d4fec7b10e93cca149163324cd2b2b2dcc211047") (:authors ("Chen Bin <chenbin DOT sh AT gmail DOT com>")) (:maintainer "Chen Bin <chenbin DOT sh AT gmail DOT com>") (:keywords "convenience") (:url . "http://github.com/redguardtoo/evil-mark-replace"))]) - (evil-matchit . [(20220414 1316) ((evil (1 14 0)) (emacs (25 1))) "Vim matchit ported to Evil" tar ((:commit . "b314e816bacfc01bb7df9b19a06b18638af5cdbe") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "matchit" "vim" "evil") (:url . "http://github.com/redguardtoo/evil-matchit"))]) + (evil-matchit . [(20220515 349) ((emacs (25 1))) "Vim matchit ported to Evil" tar ((:commit . "7a2a7384b6e752a805d6fbb78cf9425e54c2b18b") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "matchit" "vim" "evil") (:url . "http://github.com/redguardtoo/evil-matchit"))]) (evil-mc . [(20220118 122) ((emacs (24 3)) (evil (1 2 14)) (cl-lib (0 5))) "Multiple cursors for evil-mode" tar ((:commit . "63fd2fe0c213a4cc31c464d246f92931c4cb720f") (:authors ("Gabriel Adomnicai" . "gabesoft@gmail.com")) (:maintainer "Gabriel Adomnicai" . "gabesoft@gmail.com") (:keywords "evil" "editing" "multiple-cursors" "vim" "evil-multiple-cursors" "evil-mc" "evil-mc") (:url . "https://github.com/gabesoft/evil-mc"))]) (evil-mc-extras . [(20170202 1649) ((emacs (24 3)) (evil (1 2 12)) (cl-lib (0 5)) (evil-mc (0 0 2)) (evil-numbers (0 4))) "Extra functionality for evil-mc" tar ((:commit . "8c1af3232dd1e15b2ea38360b8cd1e857e11c416") (:authors ("Gabriel Adomnicai" . "gabesoft@gmail.com")) (:maintainer "Gabriel Adomnicai" . "gabesoft@gmail.com") (:keywords "evil" "editing" "multiple-cursors" "vim" "evil-multiple-cursors" "evil-mc" "evil-mc-extras") (:url . "https://github.com/gabesoft/evil-mc-extras"))]) (evil-mu4e . [(20180613 1039) ((emacs (24 4)) (evil (1 2 10))) "evil-based key bindings for mu4e" single ((:commit . "5b22c1e30246318f233264506272d770f63897ca") (:authors ("Joris Engbers" . "info@jorisengbers.nl")) (:maintainer "Joris Engbers" . "info@jorisengbers.nl") (:url . "https://github.com/JorisE/evil-mu4e"))]) @@ -1422,8 +1423,8 @@ (evil-surround . [(20220504 802) ((evil (1 2 12))) "emulate surround.vim from Vim" single ((:commit . "c9e1449bf3f740b5e9b99e7820df4eca7fc7cf02") (:authors ("Tim Harper <timcharper at gmail dot com>") ("Vegard Øye <vegard_oye at hotmail dot com>")) (:maintainer "Tim Harper <timcharper at gmail dot com>") (:keywords "emulation" "vi" "evil"))]) (evil-swap-keys . [(20191105 1426) ((emacs (24 4))) "Intelligently swap keys on text input with evil" single ((:commit . "b5ef105499f998b5667da40da30c073229a213ea") (:authors ("Wouter Bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "Wouter Bolsterlee" . "wouter@bolsterl.ee") (:keywords "convenience" "data" "languages" "tools") (:url . "https://github.com/wbolster/evil-swap-keys"))]) (evil-tabs . [(20160217 1520) ((evil (0 0 0)) (elscreen (0 0 0))) "Integrating Vim-style tabs for Evil mode users." single ((:commit . "53d3314a810017b6056ab6796aef671f5ea1c063") (:authors ("Kris Jenkins" . "krisajenkins@gmail.com")) (:maintainer "Kris Jenkins" . "krisajenkins@gmail.com") (:keywords "evil" "tab" "tabs" "vim") (:url . "https://github.com/krisajenkins/evil-tabs"))]) - (evil-terminal-cursor-changer . [(20220422 255) ((evil (1 0 8))) "Change cursor shape and color by evil state in terminal" single ((:commit . "69d562932f9ab9869ab1ed923e9789cbfa0ff14c") (:authors ("7696122")) (:maintainer "7696122") (:keywords "evil" "terminal" "cursor") (:url . "https://github.com/7696122/evil-terminal-cursor-changer"))]) - (evil-test-helpers . [(20220425 2132) ((evil (1 15 0))) "unit test helpers for Evil" single ((:commit . "b32e00179538af9685ab7c31d46eea6dc40595d4") (:authors ("Vegard Øye <vegard_oye at hotmail.com>")) (:maintainer "Vegard Øye <vegard_oye at hotmail.com>"))]) + (evil-terminal-cursor-changer . [(20220514 258) nil "Change cursor shape and color by evil state in terminal" single ((:commit . "81ede5cfa5d8944aa4777987c846a27e28457266") (:authors ("7696122")) (:maintainer "7696122") (:keywords "evil" "terminal" "cursor") (:url . "https://github.com/7696122/evil-terminal-cursor-changer"))]) + (evil-test-helpers . [(20220425 2132) ((evil (1 15 0))) "unit test helpers for Evil" single ((:commit . "5a9cfbc443219c4063b17853b7828ec0a00d2736") (:authors ("Vegard Øye <vegard_oye at hotmail.com>")) (:maintainer "Vegard Øye <vegard_oye at hotmail.com>"))]) (evil-tex . [(20220415 842) ((emacs (26 1)) (evil (1 0)) (auctex (11 88))) "Useful features for editing LaTeX in evil-mode" single ((:commit . "26035ec9a09f8b38ce0d495ff788e83ec8b195d5") (:keywords "tex" "emulation" "vi" "evil" "wp") (:url . "https://github.com/iyefrat/evil-tex"))]) (evil-text-object-python . [(20191010 1328) ((emacs (25)) (evil (1 2 14)) (dash (2 16 0))) "Python specific evil text objects" single ((:commit . "39d22fc524f0413763f291267eaab7f4e7984318") (:authors ("Wouter Bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "Wouter Bolsterlee" . "wouter@bolsterl.ee") (:keywords "convenience" "languages" "tools") (:url . "https://github.com/wbolster/evil-text-object-python"))]) (evil-textobj-anyblock . [(20170905 1907) ((cl-lib (0 5)) (evil (1 1 0))) "Textobject for the closest user-defined blocks." single ((:commit . "ff00980f0634f95bf2ad9956b615a155ea8743be") (:authors ("Fox Kiester" . "noct@openmailbox.org")) (:maintainer "Fox Kiester" . "noct@openmailbox.org") (:keywords "evil") (:url . "https://github.com/noctuid/evil-textobj-anyblock"))]) @@ -1474,14 +1475,14 @@ (eyuml . [(20141028 2227) ((request (0 2 0)) (s (1 8 0))) "Write textual uml diagram from emacs using yuml.me" single ((:commit . "eb29c37316e44a14741f16e894fbcfcb7537dc80") (:authors ("Anthony HAMON" . "hamon.anth@gmail.com")) (:maintainer "Anthony HAMON" . "hamon.anth@gmail.com") (:keywords "uml") (:url . "http://github.com/antham/eyuml"))]) (ez-query-replace . [(20210724 2247) ((dash (1 2 0)) (s (1 11 0))) "a smarter context-sensitive query-replace that can be reapplied" single ((:commit . "2b68472f4007a73908c3b242e83ac5a7587967ff") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk"))]) (eziam-theme . [(20200327 1810) nil "A mostly monochrome theme, inspired by Tao and Leuven, with dark and light versions." tar ((:commit . "d7e517f8e626035df3b63ec6fc07b85d48a996c5"))]) - (f . [(20220405 1534) ((s (1 7 0)) (dash (2 2 0))) "Modern API for working with files and directories" single ((:commit . "b5cb884b3b4372a6f3d1d4428cf092ca1e5c8044") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "files" "directories") (:url . "http://github.com/rejeep/f.el"))]) + (f . [(20220516 1809) ((s (1 7 0)) (dash (2 2 0))) "Modern API for working with files and directories" single ((:commit . "e0dc429f9c20322c7af735a828fe2404bb416715") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "files" "directories") (:url . "http://github.com/rejeep/f.el"))]) (f3 . [(20180130 1158) ((emacs (24 3)) (helm (2 8 8)) (cl-lib (0 5))) "a helm interface to find" tar ((:commit . "000009ce4adf7a57eae80512f29c4ec2a1391ce5") (:authors ("Danny McClanahan")) (:maintainer "Danny McClanahan") (:keywords "find" "file" "files" "helm" "fast" "finder") (:url . "https://github.com/cosmicexplorer/f3"))]) (fabric . [(20171116 656) nil "Launch Fabric using Emacs" tar ((:commit . "df79be341d0b34ed23850f9894136092fa5fea8c") (:authors ("Nicolas Lamirault" . "nicolas.lamirault@chmouel.com")) (:maintainer "Nicolas Lamirault" . "nicolas.lamirault@chmouel.com") (:keywords "python" "fabric") (:url . "https://github.com/nlamirault/fabric.el"))]) (face-explorer . [(20190517 1857) nil "Library and tools for faces and text properties" single ((:commit . "ad1300e13e5643e4c246cabfd91f833d39113052") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "faces") (:url . "https://github.com/Lindydancer/face-explorer"))]) (face-shift . [(20210725 2146) ((emacs (24 1))) "Shift the colour of certain faces" single ((:commit . "14dce79fc42116c49eb4c8a4ab7ca3c4bd7cbf6f") (:authors ("Philip Kaludercic" . "philipk@posteo.net")) (:maintainer "Philip Kaludercic" . "philipk@posteo.net") (:keywords "faces") (:url . "https://git.sr.ht/~pkal/face-shift"))]) (faceup . [(20170925 1946) nil "Markup language for faces and font-lock regression testing" single ((:commit . "6c92dad56a133e14e7b27831e1bcf9b3a71ff154") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "faces" "languages") (:url . "https://github.com/Lindydancer/faceup"))]) (factlog . [(20130210 140) ((deferred (0 3 1))) "File activity logger" single ((:commit . "6503d77ea882c995b051d22e72db336fb28770fc") (:authors ("Takafumi Arakaki <aka.tkf at gmail.com>")) (:maintainer "Takafumi Arakaki <aka.tkf at gmail.com>") (:url . "https://github.com/tkf/factlog"))]) - (faff-theme . [(20220407 145) nil "Light Emacs color theme on cornsilk3 background" single ((:commit . "f824c3f55ea42d65e0b632879c6948d3eb43b2f3") (:authors ("James Ferguson <(concat \"wjcferguson\" at-sign \"gmail.com\")>")) (:maintainer "James Ferguson <(concat \"wjcferguson\" at-sign \"gmail.com\")>") (:keywords "color" "theme") (:url . "https://github.com/WJCFerguson/emacs-faff-theme"))]) + (faff-theme . [(20220512 21) nil "Light Emacs color theme on cornsilk3 background" single ((:commit . "33b3344848ae17d45c19d222e53b368ea6867e7e") (:authors ("James Ferguson <(concat \"wjcferguson\" at-sign \"gmail.com\")>")) (:maintainer "James Ferguson <(concat \"wjcferguson\" at-sign \"gmail.com\")>") (:keywords "color" "theme") (:url . "https://github.com/WJCFerguson/emacs-faff-theme"))]) (fakir . [(20140729 1652) ((noflet (0 0 8)) (dash (1 3 2)) (kv (0 0 19))) "fakeing bits of Emacs" single ((:commit . "1fca406ad7de80fece6319ff75d4230b648534b0") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "lisp" "tools") (:url . "http://github.com/nicferrier/emacs-fakir"))]) (fancy-battery . [(20150101 1204) ((emacs (24 1))) "Fancy battery display" single ((:commit . "9b88ae77a01aa3edc529840338bcb2db7f445822") (:authors ("Sebastian Wiesner" . "swiesner@lunaryorn.com")) (:maintainer "Sebastian Wiesner" . "swiesner@lunaryorn.com") (:keywords "convenience" "tools" "hardware") (:url . "https://github.com/lunaryorn/fancy-battery.el"))]) (fancy-dabbrev . [(20220211 633) ((emacs (25 1)) (popup (0 5 3))) "Like dabbrev-expand with preview and popup menu" single ((:commit . "cf4a2f7e3e43e07ab9aa9db16532a21010e9fc8c") (:authors ("Joel Rosdahl" . "joel@rosdahl.net")) (:maintainer "Joel Rosdahl" . "joel@rosdahl.net") (:url . "https://github.com/jrosdahl/fancy-dabbrev"))]) @@ -1568,7 +1569,7 @@ (flx . [(20211101 146) ((cl-lib (0 3))) "fuzzy matching with good sorting" single ((:commit . "e3b3f0533e44c5250ce73d728b59a7e96c692b5d") (:authors ("Le Wang")) (:maintainer "Le Wang") (:url . "https://github.com/lewang/flx"))]) (flx-ido . [(20180117 1519) ((flx (0 1)) (cl-lib (0 3))) "flx integration for ido" single ((:commit . "e3b3f0533e44c5250ce73d728b59a7e96c692b5d") (:authors ("Le Wang")) (:maintainer "Le Wang") (:url . "https://github.com/lewang/flx"))]) (flx-isearch . [(20191119 515) ((emacs (24)) (flx (20140821)) (cl-lib (0 5))) "Fuzzy incremental searching for emacs" single ((:commit . "a44097fb8f539a193c2f09a37ea52a68f2c51839") (:authors ("PythonNut" . "pythonnut@pythonnut.com")) (:maintainer "PythonNut" . "pythonnut@pythonnut.com") (:keywords "convenience" "search" "flx") (:url . "https://github.com/pythonnut/flx-isearch"))]) - (flycheck . [(20220504 830) ((dash (2 12 1)) (pkg-info (0 4)) (let-alist (1 0 4)) (seq (1 11)) (emacs (24 3))) "On-the-fly syntax checking" tar ((:commit . "1d7c1b20782ccbaa6f97e37f5e1d0cee3d5eda8a") (:authors ("Sebastian Wiesner" . "swiesner@lunaryorn.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages" "tools") (:url . "http://www.flycheck.org"))]) + (flycheck . [(20220514 1743) ((dash (2 12 1)) (pkg-info (0 4)) (let-alist (1 0 4)) (seq (1 11)) (emacs (24 3))) "On-the-fly syntax checking" tar ((:commit . "66a973afca1d03b8284baaa7590eb2b8615a1e6a") (:authors ("Sebastian Wiesner" . "swiesner@lunaryorn.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages" "tools") (:url . "http://www.flycheck.org"))]) (flycheck-ameba . [(20191226 1011) ((emacs (24 4)) (flycheck (30))) "Add support for Ameba to Flycheck" single ((:commit . "0c4925ae0e998818326adcb47ed27ddf9761c7dc") (:keywords "tools" "crystal" "ameba") (:url . "https://github.com/crystal-ameba/ameba.el"))]) (flycheck-apertium . [(20181211 1038) ((flycheck (0 25))) "Apertium checkers in flycheck" tar ((:commit . "22b60a17836477ac1edd15dc85b14f88ca871ba9") (:authors ("Kevin Brubeck Unhammer" . "unhammer+apertium@mm.st")) (:maintainer "Kevin Brubeck Unhammer" . "unhammer+apertium@mm.st") (:keywords "convenience" "tools" "xml") (:url . "http://wiki.apertium.org/wiki/Emacs"))]) (flycheck-aspell . [(20220411 826) ((flycheck (28 0)) (emacs (25 1))) "Aspell checker for flycheck" single ((:commit . "dcf7e6543e4d94d58375e00e4a10db615ef06941") (:authors ("Leo Gaskin" . "leo.gaskin@le0.gs")) (:maintainer "Leo Gaskin" . "leo.gaskin@le0.gs") (:keywords "wp" "flycheck" "spell" "aspell") (:url . "https://github.com/leotaku/flycheck-aspell"))]) @@ -1699,7 +1700,7 @@ (flymake-json . [(20180511 911) ((flymake-easy (0 1))) "A flymake handler for json using jsonlint" single ((:commit . "03b4e5e7ad11938781257a783e717ab95fe65952") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:url . "https://github.com/purcell/flymake-json"))]) (flymake-kondor . [(20211026 501) ((emacs (26 1))) "Linter with clj-kondo" single ((:commit . "784e57f36812a37e323409b90b935ef3c6920a22") (:authors ("https://turbocafe.keybase.pub")) (:maintainer "https://turbocafe.keybase.pub") (:url . "https://github.com/turbo-cafe/flymake-kondor"))]) (flymake-ktlint . [(20180831 346) ((emacs (26 1))) "Flymake extension for Ktlint." single ((:commit . "56aab6f2d22061999050783dbc3166cdb456d0bb") (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "languages" "ktlint") (:url . "https://github.com/jojojames/flymake-ktlint"))]) - (flymake-languagetool . [(20220414 429) ((emacs (27 1)) (s (1 9 0))) "Flymake support for LanguageTool" single ((:commit . "a61bafdda1c9bb684a98216598df95a33cbb9549") (:url . "https://github.com/emacs-languagetool/flymake-languagetool"))]) + (flymake-languagetool . [(20220512 2355) ((emacs (27 1)) (s (1 9 0))) "Flymake support for LanguageTool" single ((:commit . "c24339b50a4b42cc2bd7e8e167c77a75d8227774") (:url . "https://github.com/emacs-languagetool/flymake-languagetool"))]) (flymake-less . [(20151111 738) ((less-css-mode (0 15)) (flymake-easy (0 1))) "Flymake handler for LESS stylesheets (lesscss.org)" single ((:commit . "32d3c28a9a5c52b82d1741ff9d715013b6498421") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "languages"))]) (flymake-lua . [(20170129 154) nil "Flymake for Lua" single ((:commit . "84589f20066921a5b79cf3a1f914a223a2552d2a") (:authors (nil . "Sébastien Roccaserra (format \"<%s%s@%s.%s>\" \"s\" \"roccaserra\" \"yahoo\" \"com\")")) (:maintainer nil . "Sébastien Roccaserra (format \"<%s%s@%s.%s>\" \"s\" \"roccaserra\" \"yahoo\" \"com\")") (:keywords "lua"))]) (flymake-markdownlint . [(20220320 1208) ((emacs (27 1))) "Markdown linter with markdownlint" single ((:commit . "59e3520668d9394c573e07b7980a2d48d9f6086c") (:authors ("Martin Kjær Jørgensen" . "mkj@gotu.dk")) (:maintainer "Martin Kjær Jørgensen" . "mkj@gotu.dk") (:url . "https://github.com/shaohme/flymake-markdownlint"))]) @@ -1748,13 +1749,13 @@ (fontawesome . [(20170305 1356) ((emacs (24 4))) "fontawesome utility" tar ((:commit . "a5fafe89d4032fd1f0c21b7b04708ef2cce2517b") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-fontawesome"))]) (fontify-face . [(20210503 1956) ((emacs (24))) "Fontify symbols representing faces with that face." single ((:commit . "d1386c88ccc77ccfb40b888ff90d6181325d14f8") (:authors ("Matúš Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matúš Goljer" . "matus.goljer@gmail.com") (:keywords "faces") (:url . "https://github.com/Fuco1/fontify-face"))]) (fontsloth . [(20211118 2018) ((f (0 20 0)) (logito (0 1)) (pcache (0 5)) (stream (2 2 5)) (emacs (28 0))) "Elisp otf/ttf font loader/renderer" tar ((:commit . "5572a44e14d6c00a628f58cc695c735ef64e0ebd") (:authors ("Jo Gay" . "jo.gay@mailfence.com")) (:maintainer "Jo Gay" . "jo.gay@mailfence.com") (:keywords "data" "font" "rasterization" "ttf" "otf") (:url . "https://github.com/jollm/fontsloth"))]) - (forecast . [(20191004 1850) ((emacs (24 4))) "Weather forecasts" single ((:commit . "350af0e5d53307c900e4f8b2617f3852f51a74d2") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "weather" "forecast") (:url . "https://dev.gkayaalp.com/elisp/index.html#forecast-el"))]) + (forecast . [(20191004 1850) ((emacs (24 4))) "Weather forecasts" single ((:commit . "d7dd4fb11178fc4404e52621d451f794a84e46ae") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "weather" "forecast") (:url . "https://dev.gkayaalp.com/elisp/index.html#forecast-el"))]) (foreign-regexp . [(20200325 50) nil "search and replace by foreign regexp." tar ((:commit . "e2dd47f2160cadc194eb156e7c76c3c869e6706e") (:authors ("K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>")) (:maintainer "K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>") (:keywords "convenience" "emulations" "matching" "tools" "unix" "wp"))]) (foreman-mode . [(20170725 1422) ((s (1 9 0)) (dash (2 10 0)) (dash-functional (1 2 0)) (f (0 17 2)) (emacs (24))) "View and manage Procfile-based applications" single ((:commit . "22b3bb13134b617870ed1e888af739f4818be929") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "foreman") (:url . "http://github.com/zweifisch/foreman-mode"))]) (forest-blue-theme . [(20160627 842) ((emacs (24))) "Emacs theme with a dark background." single ((:commit . "58096ce1a25615d2bae806c3775bae3e2775019d") (:authors ("olkinn")) (:maintainer "olkinn"))]) (forge . [(20220506 420) ((emacs (25 1)) (compat (28 1 1 0)) (closql (1 2 0)) (dash (2 19 1)) (emacsql-sqlite (3 0 0)) (ghub (3 5 4)) (let-alist (1 0 6)) (magit (3 3 0)) (markdown-mode (2 4)) (transient (0 3 6)) (yaml (0 3 4))) "Access Git forges from Magit." tar ((:commit . "05babf69068de7a982bd2e8ad888f37dc7319003") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/forge"))]) (form-feed . [(20210508 1627) ((emacs (24 1))) "Display ^L glyphs as horizontal lines" single ((:commit . "ac1f0ef30a11979f5dfe12d8c05a666739e486ff") (:authors ("Vasilij Schneidermann" . "mail@vasilij.de")) (:maintainer "Vasilij Schneidermann" . "mail@vasilij.de") (:keywords "faces") (:url . "https://depp.brause.cc/form-feed"))]) - (format-all . [(20220412 1141) ((emacs (24 4)) (inheritenv (0 1)) (language-id (0 19))) "Auto-format C, C++, JS, Python, Ruby and 50 other languages" single ((:commit . "a07bf109ce8e27458a40420508943f53856549fc") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-format-all-the-code"))]) + (format-all . [(20220510 2108) ((emacs (24 4)) (inheritenv (0 1)) (language-id (0 19))) "Auto-format C, C++, JS, Python, Ruby and 50 other languages" single ((:commit . "828280eaf3b46112e17746a7d03235570a633425") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-format-all-the-code"))]) (format-sql . [(20150422 1333) nil "Use format-sql to make your SQL readable in directly Emacs." single ((:commit . "97f475c245cd6c81a72a265678e2087cee66ac7b") (:authors ("Friedrich Paetzke" . "paetzke@fastmail.fm")) (:maintainer "Friedrich Paetzke" . "paetzke@fastmail.fm") (:url . "https://github.com/paetzke/format-sql.el"))]) (format-table . [(20181223 1616) ((emacs (25)) (dash (2 14 1))) "Parse and reformat tabular data." single ((:commit . "dfcae3a867e574577fc09a43b045889ff155b58f") (:authors ("Jason Duncan" . "jasond496@msn.com")) (:maintainer "Jason Duncan" . "jasond496@msn.com") (:keywords "data") (:url . "https://github.com/functionreturnfunction/format-table"))]) (forth-mode . [(20220402 2103) nil "Programming language mode for Forth" tar ((:commit . "122a9916c1ad1f1e3f4888951e1ad92a2fc10804") (:authors ("Lars Brinkhoff" . "lars@nocrew.org")) (:maintainer "Lars Brinkhoff" . "lars@nocrew.org") (:keywords "languages" "forth") (:url . "http://github.com/larsbrinkhoff/forth-mode"))]) @@ -1785,7 +1786,7 @@ (fsbot-data-browser . [(20160921 1533) nil "browse the fsbot database using tabulated-list-mode" single ((:commit . "6bca4f7de63e31839d2542f6c678b79931dec344") (:authors ("Benaiah Mischenko")) (:maintainer "Benaiah Mischenko") (:keywords "fsbot" "irc" "tabulated-list-mode") (:url . "http://github.com/benaiah/fsbot-data-browser"))]) (fsharp-mode . [(20220429 1847) ((emacs (25))) "Support for the F# programming language" tar ((:commit . "5208b54098c7534f4768b87c5f4c8a01b638737b") (:authors ("1993-1997 Xavier Leroy, Jacques Garrigue and Ian T Zimmerman") ("2010-2011 Laurent Le Brun" . "laurent@le-brun.eu") ("2012-2014 Robin Neatherway" . "robin.neatherway@gmail.com") ("2017-2022 Jürgen Hötzel")) (:maintainer "Jürgen Hötzel") (:keywords "languages"))]) (fstar-mode . [(20220106 2256) ((emacs (24 3)) (dash (2 11)) (company (0 8 12)) (quick-peek (1 0)) (yasnippet (0 11 0)) (flycheck (30 0)) (company-quickhelp (2 2 0))) "Support for F* programming" tar ((:commit . "c95c2a61a6c42a1fa8bab9a8eb812a41be3e6f69") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages") (:url . "https://github.com/FStarLang/fstar-mode.el"))]) - (fuel . [(20211221 2127) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "b90d529eacb643421991f94288151e72ed573b55"))]) + (fuel . [(20211221 2127) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "041430cda31c73fd51d7c16e736dcf08db13eb11"))]) (fuff . [(20170202 1503) ((seq (2 3))) "Find files with findutils, recursively" single ((:commit . "278e849913df87bd8756c59382282d87474802c3") (:authors ("Joel Moberg")) (:maintainer "Joel Moberg") (:keywords "files" "project" "convenience") (:url . "https://github.com/joelmo/fuff"))]) (full-ack . [(20140223 1732) nil "a front-end for ack" single ((:commit . "761d846e105b150f8e6d13d7a8983f0248313a45") (:authors ("Nikolaj Schumacher <bugs * nschum de>")) (:maintainer "Nikolaj Schumacher <bugs * nschum de>") (:keywords "tools" "matching") (:url . "http://nschum.de/src/emacs/full-ack/"))]) (fullframe . [(20210226 1057) ((cl-lib (0 5))) "Generalized automatic execution in a single frame" single ((:commit . "886b831c001b44ec95aec4ff36e8bc1b3003c786") (:authors ("Tom Regner" . "tom@goochesa.de")) (:maintainer "Tom Regner" . "tom@goochesa.de") (:keywords "fullscreen"))]) @@ -1803,13 +1804,13 @@ (fzf . [(20211228 2005) ((emacs (24 4))) "A front-end for fzf." single ((:commit . "d61cecbdb60b0f10cecd50ff2ae115aeb77f9fdc") (:authors ("Bailey Ling")) (:maintainer "Bailey Ling") (:keywords "fzf" "fuzzy" "search") (:url . "https://github.com/bling/fzf.el"))]) (gameoflife . [(20200614 1814) nil "Screensaver running Conway's Game of Life" single ((:commit . "2483f3d98dbcf7f1633f551cc3691f5659b4b942") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "games") (:url . "https://github.com/Lindydancer/gameoflife"))]) (gams-ac . [(20180423 926) ((emacs (24)) (auto-complete (1 0)) (gams-mode (4 0))) "auto-complete source file for GAMS mode" single ((:commit . "66d04ff36033f54205c19bc1d893e926d4dbf02e") (:authors ("Shiro Takeda")) (:maintainer "Shiro Takeda") (:keywords "languages" "tools" "gams-mode" "auto-complete") (:url . "https://github.com/ShiroTakeda/gams-ac"))]) - (gams-mode . [(20220501 1507) ((emacs (24 3))) "Major mode for General Algebraic Modeling System (GAMS)" tar ((:commit . "1964d9a52693f3aa9279eed8864bc317ee5c6dc4") (:authors ("Shiro Takeda")) (:maintainer "Shiro Takeda") (:keywords "languages" "tools" "gams") (:url . "http://shirotakeda.org/en/gams/gams-mode/"))]) + (gams-mode . [(20220512 222) ((emacs (24 3))) "Major mode for General Algebraic Modeling System (GAMS)" tar ((:commit . "d7f5bb688e569c7c517e4c3af32a5319c492362b") (:authors ("Shiro Takeda")) (:maintainer "Shiro Takeda") (:keywords "languages" "tools" "gams") (:url . "http://shirotakeda.org/en/gams/gams-mode/"))]) (gandalf-theme . [(20130809 947) nil "Gandalf color theme" single ((:commit . "4e472fc851431458537d458d09c1f5895e338536") (:authors ("Peter Vasil" . "mail@petervasil.net")) (:maintainer "Peter Vasil" . "mail@petervasil.net") (:keywords "color" "theme"))]) (gap-mode . [(20220503 1555) nil "Major mode for editing files in the GAP programing language." tar ((:commit . "99237f714c28981142674e8cfeb155863c834858") (:authors ("Michael Smith" . "smith@pell.anu.edu.au") ("Gary Zablackis") ("Goetz Pfeiffer") ("Ivan Andrus" . "darthandrus@gmail.com")) (:maintainer "Ivan Andrus" . "darthandrus@gmail.com") (:keywords "gap") (:url . "https://gitlab.com/gvol/gap-mode"))]) (gather . [(20141230 1338) nil "Gather string in buffer." single ((:commit . "50809fbc22d70a1c724c2dd99ac5a1f818ffeb6b") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "matching" "convenience" "tools") (:url . "https://github.com/mhayashi1120/Emacs-gather/raw/master/gather.el"))]) (gcmh . [(20201116 2251) ((emacs (24))) "the Garbage Collector Magic Hack" single ((:commit . "0089f9c3a6d4e9a310d0791cf6fa8f35642ecfd9") (:authors ("Andrea Corallo" . "akrl@sdf.org")) (:maintainer nil . "akrl@sdf.org") (:keywords "internal") (:url . "https://gitlab.com/koral/gcmh"))]) (gcode-mode . [(20210522 1025) ((emacs (24 4))) "Simple G-Code major mode" tar ((:commit . "1f83845af4102efc5e5856b55bd5ad165b2f0cdd") (:authors ("Yuri D'Elia" . "wavexx@thregr.org")) (:maintainer "Yuri D'Elia" . "wavexx@thregr.org") (:keywords "gcode" "languages" "highlight" "syntax") (:url . "https://gitlab.com/wavexx/gcode-mode.el"))]) - (gdscript-mode . [(20210328 2037) ((emacs (26 3))) "Major mode for Godot's GDScript language" tar ((:commit . "4badcf6a0c951daba4d7259db3913b78254c0423") (:authors ("Nathan Lovato <nathan@gdquest.com>, Fabián E. Gallina" . "fgallina@gnu.org")) (:maintainer nil . "nathan@gdquest.com") (:keywords "languages") (:url . "https://github.com/godotengine/emacs-gdscript-mode/"))]) + (gdscript-mode . [(20220510 944) ((emacs (26 3))) "Major mode for Godot's GDScript language" tar ((:commit . "d9e1f7f766c73115de8ce2815bc249069636c3db") (:authors ("Nathan Lovato <nathan@gdquest.com>, Fabián E. Gallina" . "fgallina@gnu.org")) (:maintainer nil . "nathan@gdquest.com") (:keywords "languages") (:url . "https://github.com/godotengine/emacs-gdscript-mode/"))]) (geben . [(20210830 422) ((emacs (24 3)) (cl-lib (0 5))) "DBGp protocol frontend, a script debugger" tar ((:commit . "d3706387ed25b3037338572f3968b4cc2d8825a0") (:authors ("Matthew Carter" . "m@ahungry.com")) (:maintainer "Matthew Carter" . "m@ahungry.com") (:keywords "c" "comm" "tools") (:url . "https://github.com/ahungry/geben"))]) (geben-helm-projectile . [(20160611 59) ((emacs (24)) (geben (0 26)) (helm-projectile (0 13 0))) "Integrate helm-projectile with geben" single ((:commit . "31ce0faca5dcc71924884f03fd5a7a25d00ccd9b") (:authors ("Matthew Carter" . "m@ahungry.com")) (:maintainer "Matthew Carter" . "m@ahungry.com") (:keywords "ahungry" "emacs" "geben" "helm" "projectile" "debug") (:url . "https://github.com/ahungry/geben-helm-projectile"))]) (geeknote . [(20220213 612) ((emacs (24))) "Use Evernote in Emacs through geeknote" single ((:commit . "ce2738aebeeda35f9d31027e9b7bad0813b975c3") (:authors ("Evan Dale Aromin")) (:maintainer "Evan Dale Aromin") (:keywords "evernote" "geeknote" "note" "emacs-evernote" "evernote-mode") (:url . "http://github.com/avendael/emacs-geeknote"))]) @@ -1836,7 +1837,7 @@ (gerrit-download . [(20150714 1408) ((emacs (24 0)) (magit (2 1 0))) "Show gerrit reviews in a diff buffer." single ((:commit . "d568acc7c5935188c9bc19ba72719a6092d9f6fd") (:authors ("Chmouel Boudjnah" . "chmouel@chmouel.com")) (:maintainer "Chmouel Boudjnah" . "chmouel@chmouel.com") (:keywords "tools" "gerrit" "git") (:url . "https://github.com/chmouel/gerrit-download.el"))]) (gf . [(20181028 1542) ((s (1 0)) (ht (2 0))) "Major mode for editing GF code" single ((:commit . "30b3127f229e0db522c7752f6957ca01b2ea2821") (:authors ("Johan Bockgård" . "bojohan+mail@dd.chalmers.se")) (:maintainer "bruno cuconato" . "bcclaro+emacs@gmail.com") (:keywords "languages") (:url . "https://github.com/GrammaticalFramework/gf-emacs-mode"))]) (ggo-mode . [(20210310 1345) nil "Gengetopt major mode" single ((:commit . "6a7617b5af3d13029e4d680a375e8107c40d0fac") (:authors ("Matthew K. Junker" . "junker@alum.mit.edu")) (:maintainer "Matthew K. Junker" . "junker@alum.mit.edu") (:keywords "extensions" "convenience" "local"))]) - (ggtags . [(20220420 1610) ((emacs (25))) "emacs frontend to GNU Global source code tagging system" single ((:commit . "22d3a3a951cb605d29138f1acee191ef674a4518") (:authors ("Leo Liu" . "sdl.web@gmail.com")) (:maintainer "Leo Liu" . "sdl.web@gmail.com") (:keywords "tools" "convenience") (:url . "https://github.com/leoliu/ggtags"))]) + (ggtags . [(20220511 610) ((emacs (25))) "emacs frontend to GNU Global source code tagging system" single ((:commit . "40635a1effd3a9c2adef63c4760010c9468a7a4d") (:authors ("Leo Liu" . "sdl.web@gmail.com")) (:maintainer "Leo Liu" . "sdl.web@gmail.com") (:keywords "tools" "convenience") (:url . "https://github.com/leoliu/ggtags"))]) (gh . [(20220302 549) ((emacs (25 1)) (pcache (0 4 2)) (logito (0 1)) (marshal (0 9 0)) (cl-lib (0 3))) "A GitHub library for Emacs" tar ((:commit . "27ccc892e94f7e747e5b879eec71119965d9ed6e") (:authors ("Yann Hodique" . "yhodique@gmail.com")) (:maintainer "Yann Hodique" . "yhodique@gmail.com") (:url . "https://github.com/sigma/gh.el"))]) (gh-md . [(20220316 1432) ((emacs (24 3))) "Render markdown using the Github api" single ((:commit . "e721fd5e41e682f47f2dd4ce26ef2ba28c7fa0b5") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience") (:url . "https://github.com/emacs-pe/gh-md.el"))]) (gh-notify . [(20211126 638) ((emacs (27 1)) (magit (3 0 0)) (forge (0 2 0))) "A veneer for Magit/Forge GitHub notifications" single ((:commit . "aa4d8bc0c56366d437e7c126e7eedc5938109342") (:authors ("Bas Alberts" . "bas@anti.computer") ("xristos" . "xristos@sdf.org")) (:maintainer "Bas Alberts" . "bas@anti.computer") (:keywords "comm") (:url . "https://github.com/anticomputer/gh-notify"))]) @@ -1860,7 +1861,7 @@ (git-backup-ivy . [(20220412 1914) ((ivy (0 12 0)) (git-backup (0 0 1)) (emacs (25 1))) "An ivy interface to git-backup" single ((:commit . "c53e1bc800963c0d826226c37c22e36f2353c70d") (:authors ("Sebastian Wålinder" . "s.walinder@gmail.com")) (:maintainer "Sebastian Wålinder" . "s.walinder@gmail.com") (:keywords "backup" "convenience" "files" "tools" "vc") (:url . "https://github.com/walseb/git-backup-ivy"))]) (git-blamed . [(20161028 1926) nil "Minor mode for incremental blame for Git" single ((:commit . "cef196abf398e2dd11f775d1e6cd8690567408aa") (:keywords "git" "version control" "release management"))]) (git-command . [(20191028 333) ((term-run (0 1 4)) (with-editor (2 3 1))) "A Git Command-Line interface" single ((:commit . "a773d40da39dfb1c6ecf2b0758aa370ddea8f06d") (:authors ("10sr <8slashes+el [at] gmail [dot] com>")) (:maintainer "10sr <8slashes+el [at] gmail [dot] com>") (:keywords "utility" "git") (:url . "https://github.com/10sr/git-command-el"))]) - (git-commit . [(20220506 1936) ((emacs (25 1)) (compat (28 1 1 0)) (transient (20210920)) (with-editor (20211001))) "Edit Git commit messages." tar ((:commit . "125a8d5e417dda4438ce41d71a821d8a936fa5ea") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li") ("Sebastian Wiesner" . "lunaryorn@gmail.com") ("Florian Ragwitz" . "rafl@debian.org") ("Marius Vollmer" . "marius.vollmer@gmail.com")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) + (git-commit . [(20220506 1936) ((emacs (25 1)) (compat (28 1 1 0)) (transient (20210920)) (with-editor (20211001))) "Edit Git commit messages." tar ((:commit . "5a7519fd3d56522b1c6a1601a12ae0f4717c26a7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li") ("Sebastian Wiesner" . "lunaryorn@gmail.com") ("Florian Ragwitz" . "rafl@debian.org") ("Marius Vollmer" . "marius.vollmer@gmail.com")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) (git-commit-insert-issue . [(20210107 2018) ((emacs (25)) (projectile (0)) (s (0)) (ghub (0)) (bitbucket (0))) "Get issues list when typing \"Fixes #\"" single ((:commit . "6cfb8b4b5b23ae881cf3d005da4d7f60d91cd2cd") (:authors ("Vindarel")) (:maintainer "Vindarel") (:keywords "tools" "vc" "github" "gitlab" "bitbucket" "commit" "issues") (:url . "https://gitlab.com/emacs-stuff/git-commit-insert-issue/"))]) (git-dwim . [(20170126 1214) nil "Context-aware git commands such as branch handling" single ((:commit . "485c732130686c2f28a026e385366006435394b9") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "git" "tools" "convenience") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/git-dwim.el"))]) (git-grep . [(20200920 1751) ((projectile (0 10 0))) "Search tools using git grep" single ((:commit . "12ff6045e9b6aa42f98abd4ddc44d670268a0849") (:authors ("Sam Kleinman")) (:maintainer "tychoish" . "garen@tychoish.com") (:keywords "matching" "files" "grep" "search" "using" "git-grep") (:url . "https://github.com/tychoish/git-grep.el"))]) @@ -1918,7 +1919,7 @@ (gnomenm . [(20150316 1918) ((s (1 9 0)) (dash (2 3 0)) (kv (0 0 19))) "Emacs interface to Gnome nmcli command" single ((:commit . "9065cda44ffc9e06239b8189a0154d31314c3b4d") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "processes" "hardware") (:url . "http://github.com/nicferrier/emacs-nm"))]) (gntp . [(20141025 250) nil "Growl Notification Protocol for Emacs" single ((:commit . "767571135e2c0985944017dc59b0be79af222ef5") (:authors ("Engelke Eschner" . "tekai@gmx.li")) (:maintainer "Engelke Eschner" . "tekai@gmx.li"))]) (gnu-apl-mode . [(20220404 341) ((emacs (27))) "Integrate GNU APL with Emacs" tar ((:commit . "c8695b0d55b5167263a843252ffd21a589018427") (:authors ("Elias Mårtenson" . "lokedhs@gmail.com")) (:maintainer "Elias Mårtenson" . "lokedhs@gmail.com") (:keywords "languages") (:url . "http://www.gnu.org/software/apl/"))]) - (gnu-indent . [(20220330 422) ((emacs (27 2))) "Indent your code with GNU Indent" single ((:commit . "cd5dc79ac65c24e9e775bd2582ad620e316f2182") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "c") (:url . "https://codeberg.org/akib/emacs-gnu-indent"))]) + (gnu-indent . [(20220515 1719) ((emacs (25 1))) "Indent your code with GNU Indent" single ((:commit . "ff3e10edbdf9b919747ec2ba3434d5858f5cc9fa") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "c") (:url . "https://codeberg.org/akib/emacs-gnu-indent"))]) (gnuplot . [(20220102 1637) ((emacs (24 3))) "Major-mode and interactive frontend for gnuplot" tar ((:commit . "57be3c7addec31e226a5a27aa553e996f9c684e3") (:authors ("Jon Oddie") ("Bruce Ravel") ("Phil Type")) (:maintainer "Bruce Ravel" . "bruceravel1@gmail.com") (:keywords "data" "gnuplot" "plotting") (:url . "https://github.com/emacsorphanage/gnuplot"))]) (gnuplot-mode . [(20171013 1616) nil "Major mode for editing gnuplot scripts" single ((:commit . "601f6392986f0cba332c87678d31ae0d0a496ce7") (:keywords "gnuplot" "plotting") (:url . "https://github.com/mkmcc/gnuplot-mode"))]) (gnus-alias . [(20150316 42) nil "an alternative to gnus-posting-styles" single ((:commit . "9447d3ccb4c0e75d0468899cccff7aa249657bac") (:authors ("Joe Casadonte" . "emacs@northbound-train.com")) (:maintainer "Mark A. Hershberger" . "mah@everybody.org") (:keywords "personality" "identity" "news" "mail" "gnus"))]) @@ -1955,7 +1956,7 @@ (go-snippets . [(20180113 611) ((yasnippet (0 8 0))) "Yasnippets for go" tar ((:commit . "d437df148879566ffe7f2e503a3cf2602aa9fb28") (:keywords "snippets"))]) (go-stacktracer . [(20150430 2142) nil "parse Go stack traces" single ((:commit . "a2ac6d801b389f80ca4e2fcc1ab44513a9e55976") (:authors ("Samer Masterson" . "samer@samertm.com")) (:maintainer "Samer Masterson" . "samer@samertm.com") (:keywords "tools") (:url . "https://github.com/samertm/go-stacktracer.el"))]) (go-tag . [(20180227 411) ((emacs (24 0)) (go-mode (1 5 0))) "Edit Golang struct field tag" single ((:commit . "59b243f2fa079d9de9d56f6e2d94397e9560310a") (:authors ("Brantou" . "brantou89@gmail.com")) (:maintainer "Brantou" . "brantou89@gmail.com") (:keywords "tools") (:url . "https://github.com/brantou/emacs-go-tag"))]) - (go-translate . [(20220404 1240) ((emacs (27 1))) "Translation framework supports multiple engines such as Google/Bing/DeepL" tar ((:commit . "b0898e6cd647e38e6f70e6cd121b789610573237") (:authors ("lorniu" . "lorniu@gmail.com")) (:maintainer "lorniu" . "lorniu@gmail.com") (:keywords "convenience") (:url . "https://github.com/lorniu/go-translate"))]) + (go-translate . [(20220514 1046) ((emacs (27 1))) "Translation framework supports multiple engines such as Google/Bing/DeepL" tar ((:commit . "3b48787f5e91b9480ef5066bf3657f67306524ca") (:authors ("lorniu" . "lorniu@gmail.com")) (:maintainer "lorniu" . "lorniu@gmail.com") (:keywords "convenience") (:url . "https://github.com/lorniu/go-translate"))]) (gobgen . [(20161020 1523) ((emacs (24 4))) "Generate GObject descendants using a detailed form" single ((:commit . "ed2c2b0d217deae293096f3cf14aa492791ddd4f") (:authors ("Gergely Polonkai" . "gergely@polonkai.eu")) (:maintainer "Gergely Polonkai" . "gergely@polonkai.eu") (:keywords "gobject" "glib" "gtk" "helper" "utilities"))]) (god-mode . [(20210102 515) ((emacs (25 1))) "Minor mode for God-like command entering" tar ((:commit . "fac7d26ecde1be5b0bf6bd6e0ec5b4895be13906") (:authors ("Chris Done" . "chrisdone@gmail.com")) (:maintainer "Chris Done" . "chrisdone@gmail.com") (:url . "https://github.com/emacsorphanage/god-mode"))]) (godoctor . [(20180710 2152) nil "Frontend for godoctor" single ((:commit . "4b45ff3d0572f0e84056e4c3ba91fcc178199859") (:authors ("Sangho Na" . "microamp@protonmail.com")) (:maintainer "Sangho Na" . "microamp@protonmail.com") (:keywords "go" "golang" "refactoring") (:url . "https://github.com/microamp/godoctor.el"))]) @@ -1984,7 +1985,7 @@ (goto-last-change . [(20150109 1823) nil "Move point through buffer-undo-list positions" single ((:commit . "58b0928bc255b47aad318cd183a5dce8f62199cc") (:authors ("Kevin Rodgers" . "ihs_4664@yahoo.com")) (:maintainer "Kevin Rodgers" . "ihs_4664@yahoo.com") (:keywords "convenience") (:url . "https://github.com/camdez/goto-last-change.el"))]) (goto-last-point . [(20190525 1855) ((emacs (24 3))) "Record and jump to the last point in the buffer." single ((:commit . "7ea191df18ff4774cf1dc568e1726143dd54ea02") (:authors ("Manuel Uberti" . "manuel.uberti@inventati.org")) (:maintainer "Manuel Uberti" . "manuel.uberti@inventati.org") (:keywords "convenience") (:url . "https://github.com/manuel-uberti/goto-last-point"))]) (goto-line-preview . [(20210323 422) ((emacs (25))) "Preview line when executing `goto-line` command" single ((:commit . "d4db955860de830ebc067b065cba16a776717e76") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/goto-line-preview"))]) - (govc . [(20220509 1455) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "72c2000c01b73c884f1f94df52765762e187b1de") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))]) + (govc . [(20220509 1455) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "ecf7a0b39da94459b88f6c8b0b3aa33349087f5d") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))]) (govet . [(20170808 1724) nil "linter/problem finder for the Go source code" single ((:commit . "1c05817cf8b96589076c7ac4e52ee58a860a0cbf") (:url . "https://godoc.org/golang.org/x/tools/cmd/vet"))]) (gpastel . [(20181229 1404) ((emacs (25 1))) "Integrates GPaste with the kill-ring" single ((:commit . "d5fc55bc825203f998537c5834718e665bb87c29") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "tools") (:url . "https://gitlab.petton.fr/DamienCassou/desktop-environment"))]) (grab-mac-link . [(20210511 1303) ((emacs (24))) "Grab link from Mac Apps and insert it into Emacs" single ((:commit . "2c722016ca01bd4265d57c4a7d55712c94cf4ea5") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "mac" "hyperlink") (:url . "https://github.com/xuchunyang/grab-mac-link.el"))]) @@ -2057,11 +2058,11 @@ (haskell-emacs . [(20160904 2026) nil "Write emacs extensions in haskell" tar ((:commit . "a2c6a079175904689eed7c6c200754bfa85d1ed9") (:authors ("Florian Knupfer")) (:maintainer "Florian Knupfer") (:keywords "haskell" "emacs" "ffi") (:url . "https://github.com/knupfer/haskell-emacs"))]) (haskell-emacs-base . [(20150714 1559) ((haskell-emacs (2 4 0))) "Haskell functions from Prelude" tar ((:commit . "a2c6a079175904689eed7c6c200754bfa85d1ed9") (:authors ("Florian Knupfer")) (:maintainer "Florian Knupfer") (:keywords "haskell" "emacs" "ffi") (:url . "https://github.com/knupfer/haskell-emacs/modules/base"))]) (haskell-emacs-text . [(20150713 1416) ((haskell-emacs (2 4 0))) "Haskell functions from Data.Text" tar ((:commit . "a2c6a079175904689eed7c6c200754bfa85d1ed9") (:authors ("Florian Knupfer")) (:maintainer "Florian Knupfer") (:keywords "haskell" "emacs" "ffi") (:url . "https://github.com/knupfer/haskell-emacs/modules/text"))]) - (haskell-mode . [(20220331 1645) ((emacs (25 1))) "A Haskell editing mode" tar ((:commit . "4ec2aa32b1772e629a6a2b47b84048e1990d6728") (:authors ("1992 Simon Marlow") ("1997-1998 Graeme E Moss" . "gem@cs.york.ac.uk") ("Tommy Thorn" . "thorn@irisa.fr") ("2001-2002 Reuben Thomas (>=v1.4)") ("2003 Dave Love" . "fx@gnu.org") ("2016 Arthur Fayzrakhmanov")) (:maintainer "1992 Simon Marlow") (:keywords "faces" "files" "haskell") (:url . "https://github.com/haskell/haskell-mode"))]) + (haskell-mode . [(20220513 1126) ((emacs (25 1))) "A Haskell editing mode" tar ((:commit . "fe3a8046aa1e1767ddc11a74e3d45bd9c614e655") (:authors ("1992 Simon Marlow") ("1997-1998 Graeme E Moss" . "gem@cs.york.ac.uk") ("Tommy Thorn" . "thorn@irisa.fr") ("2001-2002 Reuben Thomas (>=v1.4)") ("2003 Dave Love" . "fx@gnu.org") ("2016 Arthur Fayzrakhmanov")) (:maintainer "1992 Simon Marlow") (:keywords "faces" "files" "haskell") (:url . "https://github.com/haskell/haskell-mode"))]) (haskell-snippets . [(20210228 344) ((cl-lib (0 5)) (yasnippet (0 8 0))) "Yasnippets for Haskell" tar ((:commit . "1c29c4a68ce89848b8d371c6510d1de3b586c8b3") (:authors ("Luke Hoersten" . "luke@hoersten.org")) (:maintainer "Luke Hoersten" . "luke@hoersten.org") (:keywords "snippets" "haskell") (:url . "https://github.com/haskell/haskell-snippets"))]) (haskell-tab-indent . [(20200513 1950) nil "tab-based indentation for haskell-mode" single ((:commit . "3239e814d6999f31ad845cc58df53395ad299059") (:authors ("Sean Whitton" . "spwhitton@spwhitton.name")) (:maintainer "Sean Whitton" . "spwhitton@spwhitton.name") (:keywords "indentation" "haskell") (:url . "https://spwhitton.name/tech/code/haskell-tab-indent/"))]) (hasklig-mode . [(20211017 1730) ((emacs (25))) "Hasklig ligatures" single ((:commit . "d708937592f9e2d28ae5622086b9c24d60cd8ac2") (:authors ("Daniel Mendler")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/hasklig-mode"))]) - (hass . [(20220402 1326) ((emacs (25 1)) (request (0 3 3))) "Interact with Home Assistant" tar ((:commit . "c6bded14ae4b68194bd9e35428e9973ca144569b") (:authors ("Ben Whitley")) (:maintainer "Ben Whitley") (:url . "https://github.com/purplg/hass"))]) + (hass . [(20220517 39) ((emacs (25 1)) (request (0 3 3))) "Interact with Home Assistant" tar ((:commit . "da313bfc5d6c14c445d2de393bf63d0ace612ae0") (:authors ("Ben Whitley")) (:maintainer "Ben Whitley") (:url . "https://github.com/purplg/hass"))]) (haste . [(20141030 2034) ((json (1 2))) "Emacs client for hastebin (http://hastebin.com/about.md)" single ((:commit . "22d05aacc3296ab50a7361222ab139fb4d447c25") (:authors ("Ric Lister")) (:maintainer "Ric Lister") (:url . "http://github.com/rlister/emacs-haste-client"))]) (haxe-imports . [(20170330 2304) ((emacs (24 4)) (s (1 10 0)) (pcache (0 3 1))) "Code for dealing with Haxe imports" single ((:commit . "f104a641f3dfe698359d9aca1f28d9383cf43e04") (:authors ("Juan Karlo Licudine" . "karlo@accidentalrebel.com")) (:maintainer "Juan Karlo Licudine" . "karlo@accidentalrebel.com") (:keywords "haxe") (:url . "http://www.github.com/accidentalrebel/emacs-haxe-imports"))]) (haxe-mode . [(20210108 1835) nil "Major mode for editing Haxe files" single ((:commit . "6641a0d7c00ce633887baf3f8c594d9a8a504e9b") (:authors ("Jens Peter Secher (original)")) (:maintainer "Jen-Chieh Shen" . "jcs090218@gmail.com") (:url . "https://github.com/emacsorphanage/haxe-mode"))]) @@ -2071,7 +2072,7 @@ (hcl-mode . [(20200315 2129) ((emacs (24 3))) "Major mode for Hashicorp" single ((:commit . "e4d9eef631e8a386341ae8f94f7c2579586e65b5") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:url . "https://github.com/purcell/emacs-hcl-mode"))]) (headlong . [(20150417 1526) nil "reckless completion" single ((:commit . "f6830f87f236eee88263cb6976125f72422abe72") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "completion") (:url . "https://github.com/abo-abo/headlong"))]) (heaven-and-hell . [(20190713 1830) ((emacs (24 4))) "easy toggle light/dark themes" single ((:commit . "e1febfd60d060c110a1e43c5f093cd8537251308") (:authors ("Valentin Ignatev" . "valentignatev@gmail.com")) (:maintainer "Valentin Ignatev" . "valentignatev@gmail.com") (:keywords "faces") (:url . "https://github.com/valignatev/heaven-and-hell"))]) - (helm . [(20220509 1011) ((helm-core (3 8 4)) (popup (0 5 3))) "Helm is an Emacs incremental and narrowing framework" tar ((:commit . "ec76b7d0ffaa77bae47be5b9ee9069601a463d5b") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://emacs-helm.github.io/helm/"))]) + (helm . [(20220513 1002) ((helm-core (3 8 4)) (popup (0 5 3))) "Helm is an Emacs incremental and narrowing framework" tar ((:commit . "4489fec779eb4c2f54db06218c83d431a88716b5") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://emacs-helm.github.io/helm/"))]) (helm-R . [(20120820 14) ((helm (20120517)) (ess (20120509))) "helm-sources and some utilities for GNU R." single ((:commit . "b0eb9d5f6a483a9dbe6eb6cf1f2024d4f5938bc2") (:authors ("myuhe <yuhei.maeda_at_gmail.com>")) (:maintainer "myuhe") (:keywords "convenience") (:url . "https://github.com/myuhe/helm-R.el"))]) (helm-ack . [(20141030 1226) ((helm (1 0)) (cl-lib (0 5))) "Ack command with helm interface" single ((:commit . "889bc225318d14c6e3be80e73b1d9d6fb30e48c3") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-helm-ack"))]) (helm-ad . [(20151209 1015) ((dash (2 8 0)) (helm (1 6 2))) "helm source for Active Directory" single ((:commit . "8ac044705d8620ee354a9cfa8cc1b865e83c0d55") (:authors ("Takahiro Noda" . "takahiro.noda+github@gmail.com")) (:maintainer "Takahiro Noda" . "takahiro.noda+github@gmail.com") (:keywords "comm"))]) @@ -2106,14 +2107,14 @@ (helm-codesearch . [(20190412 1153) ((emacs (25 1)) (s (1 11 0)) (dash (2 12 0)) (helm (1 7 7)) (cl-lib (0 5))) "helm interface for codesearch" single ((:commit . "72f1d1de746115ab7e861178b49fa3c0b6b58d90") (:authors ("Youngjoo Lee" . "youngker@gmail.com")) (:maintainer "Youngjoo Lee" . "youngker@gmail.com") (:keywords "tools"))]) (helm-commandlinefu . [(20150611 545) ((emacs (24 1)) (helm (1 7 0)) (json (1 3)) (let-alist (1 0 3))) "Search and browse commandlinefu.com from helm" single ((:commit . "9ee7e018c5db23ae9c8d1c8fa969876f15b7280d") (:authors ("Chunyang Xu" . "xuchunyang56@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang56@gmail.com") (:keywords "commandlinefu.com") (:url . "https://github.com/xuchunyang/helm-commandlinefu"))]) (helm-company . [(20190812 1429) ((helm (1 5 9)) (company (0 6 13))) "Helm interface for company-mode" single ((:commit . "6eb5c2d730a60e394e005b47c1db018697094dde") (:authors ("Yasuyuki Oka" . "yasuyk@gmail.com")) (:maintainer "Daniel Ralston" . "Sodel-the-Vociferous@users.noreply.github.com") (:url . "https://github.com/Sodel-the-Vociferous/helm-company"))]) - (helm-core . [(20220503 622) ((emacs (25 1)) (async (1 9 4))) "Development files for Helm" tar ((:commit . "ec76b7d0ffaa77bae47be5b9ee9069601a463d5b") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://emacs-helm.github.io/helm/"))]) + (helm-core . [(20220514 725) ((emacs (25 1)) (async (1 9 4))) "Development files for Helm" tar ((:commit . "4489fec779eb4c2f54db06218c83d431a88716b5") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://emacs-helm.github.io/helm/"))]) (helm-cscope . [(20190615 41) ((xcscope (1 0)) (helm (1 6 7)) (cl-lib (0 5)) (emacs (24 1))) "Helm interface for xcscope.el." single ((:commit . "af1d9e7f4460a88d7400b5a74d5da68084089ac1") (:authors ("alpha22jp" . "alpha22jp@gmail.com")) (:maintainer "alpha22jp" . "alpha22jp@gmail.com") (:keywords "cscope" "helm") (:url . "https://github.com/alpha22jp/helm-cscope.el"))]) (helm-css-scss . [(20191230 1549) ((emacs (24 3)) (helm (1 0))) "CSS/SCSS/LESS Selectors with helm interface" single ((:commit . "48b996f73af1fef8d6e88a1c545d98f8c50b0cf3") (:authors ("Shingo Fukuyama - http://fukuyama.co")) (:maintainer "Shingo Fukuyama - http://fukuyama.co") (:keywords "convenience" "scss" "css" "less" "selector" "helm") (:url . "https://github.com/ShingoFukuyama/helm-css-scss"))]) (helm-ctest . [(20191031 1435) ((s (1 9 0)) (dash (2 11 0)) (helm-core (1 7 4))) "Run ctest from within emacs" single ((:commit . "2a29cfb4ec583da247fa2ae7bac88790b1223e40") (:authors ("Dan LaManna" . "me@danlamanna.com")) (:maintainer "Dan LaManna" . "me@danlamanna.com") (:keywords "helm" "ctest"))]) (helm-dash . [(20190527 1118) ((emacs (24 4)) (dash-docs (1 4 0)) (helm (1 9 2)) (cl-lib (0 5))) "Offline documentation browser for +150 APIs using Dash docsets." single ((:commit . "7f853bd34da666f0e9a883011c80f451b06f6c59") (:authors ("Raimon Grau" . "raimonster@gmail.com") ("Toni Reina " . "areina0@gmail.com") ("Bryan Gilbert" . "bryan@bryan.sh")) (:maintainer "Raimon Grau" . "raimonster@gmail.com") (:keywords "docs") (:url . "https://github.com/dash-docs-el/helm-dash"))]) (helm-descbinds . [(20190501 935) ((helm (1 5))) "A convenient `describe-bindings' with `helm'" single ((:commit . "b72515982396b6e336ad7beb6767e95a80fca192") (:authors ("Taiki SUGAWARA" . "buzz.taiki@gmail.com")) (:maintainer "Taiki SUGAWARA" . "buzz.taiki@gmail.com") (:keywords "helm" "help") (:url . "https://github.com/emacs-helm/helm-descbinds"))]) (helm-describe-modes . [(20160212 518) ((helm (1 9)) (cl-lib (0 5)) (emacs (24 1))) "Helm interface to major and minor modes." single ((:commit . "11fb36af119b784539d31c6160002de1957408aa") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "docs" "convenience") (:url . "https://github.com/emacs-helm/helm-describe-modes"))]) - (helm-dictionary . [(20220319 955) ((helm (1 5 5))) "Helm source for looking up dictionaries" single ((:commit . "69f1e5bf03d67c9e5cb0065e702e8c311ac9d3db") (:authors ("Titus von der Malsburg" . "malsburg@posteo.de") ("Michael Heerdegen" . "michael_heerdegen@web.de")) (:maintainer "Titus von der Malsburg" . "malsburg@posteo.de") (:url . "https://github.com/emacs-helm/helm-dictionary"))]) + (helm-dictionary . [(20220514 714) ((helm (1 5 5))) "Helm source for looking up dictionaries" single ((:commit . "65fdf36e9a5c6dd8dffa71dfb6c65bc03879abe2") (:authors ("Titus von der Malsburg" . "malsburg@posteo.de") ("Michael Heerdegen" . "michael_heerdegen@web.de")) (:maintainer "Titus von der Malsburg" . "malsburg@posteo.de") (:url . "https://github.com/emacs-helm/helm-dictionary"))]) (helm-directory . [(20170706 402) ((emacs (24 4)) (helm (2 0))) "selecting directory before select the file" single ((:commit . "51bd7cd6e40a84a7efda894283ec76a0107830ad") (:authors ("Masashı Mıyaura")) (:maintainer "Masashı Mıyaura") (:url . "https://github.com/masasam/emacs-helm-directory"))]) (helm-dired-history . [(20170524 1046) ((helm (1 9 8)) (cl-lib (0 5))) "Show dired history with helm.el support." single ((:commit . "06654656d3ad502742056d9030dd59e0da984764") (:authors ("Joseph(纪秀峰)" . "jixiuf@gmail.com")) (:maintainer "Joseph(纪秀峰)" . "jixiuf@gmail.com") (:keywords "helm" "dired history") (:url . "https://github.com/jixiuf/helm-dired-history"))]) (helm-dired-recent-dirs . [(20131228 1414) ((helm (1 0))) "Show recent dirs with helm.el support." single ((:commit . "3bcd125b44f5a707588ae3868777d91192351523") (:authors ("Akisute" . "akisute3@gmail.com")) (:maintainer "Akisute" . "akisute3@gmail.com") (:keywords "helm" "dired" "zsh"))]) @@ -2238,7 +2239,7 @@ (helm-switch-shell . [(20210713 1440) ((emacs (25 1)) (helm (2 8 8))) "A Helm source for switching between shell buffers" single ((:commit . "8d7ba1d99ff12a8f1d6ce3b9684ae8aebf494cf3") (:authors ("James N. V. Cash" . "james.cash@occasionallycogent.com")) (:maintainer "James N. V. Cash" . "james.cash@occasionallycogent.com") (:keywords "matching" "processes" "terminals" "tools") (:url . "https://github.com/jamesnvc/helm-switch-shell"))]) (helm-switch-to-repl . [(20210206 844) ((emacs (26 1)) (helm (3))) "Helm action to switch directory in REPLs" single ((:commit . "f0e732e7217fc0373b0805245fa15920cf676619") (:authors ("Pierre Neidhardt" . "mail@ambrevar.xyz")) (:maintainer "Pierre Neidhardt" . "mail@ambrevar.xyz") (:url . "https://github.com/emacs-helm/helm-switch-to-repl"))]) (helm-swoop . [(20210426 547) ((emacs (25 1)) (helm (3 6))) "Efficiently hopping squeezed lines powered by helm interface" single ((:commit . "1b3285791f1dc1fde548fe67aec07214d698fd57") (:authors ("Shingo Fukuyama - http://fukuyama.co")) (:maintainer "Shingo Fukuyama - http://fukuyama.co") (:keywords "convenience" "helm" "swoop" "inner" "buffer" "search") (:url . "https://github.com/emacsorphanage/helm-swoop"))]) - (helm-system-packages . [(20210628 1727) ((emacs (24 4)) (helm (2 8 7)) (seq (1 8))) "Helm UI wrapper for system package managers." tar ((:commit . "a16bb1c3708416984106a98353700d456414b6a1") (:authors ("Pierre Neidhardt" . "mail@ambrevar.xyz")) (:maintainer "Pierre Neidhardt" . "mail@ambrevar.xyz") (:keywords "helm" "packages") (:url . "https://github.com/emacs-helm/helm-system-packages"))]) + (helm-system-packages . [(20220515 812) ((emacs (24 4)) (helm (2 8 7)) (seq (1 8))) "Helm UI wrapper for system package managers." tar ((:commit . "e93f4aeaa77b73c6e529141c3fa0ac49b40b6306") (:authors ("Pierre Neidhardt" . "mail@ambrevar.xyz")) (:maintainer "Pierre Neidhardt" . "mail@ambrevar.xyz") (:keywords "helm" "packages") (:url . "https://github.com/emacs-helm/helm-system-packages"))]) (helm-systemd . [(20210105 542) ((emacs (24 4)) (helm (1 9 2)) (with-editor (2 5 0))) "helm's systemd interface" single ((:commit . "8b26ab2d3a5b08c1e03c9312818512d7492bbc9a") (:authors (nil . "<lompik@oriontabArch>")) (:maintainer nil . "<lompik@oriontabArch>") (:keywords "convenience"))]) (helm-tail . [(20181124 439) ((emacs (25 1)) (helm (2 7 0))) "Read recent output from various sources" single ((:commit . "1f5a6355aa3bdb00b9b0bc93db29c17f0d6701e3") (:authors ("Akira Komamura" . "akira.komamura@gmail.com")) (:maintainer "Akira Komamura" . "akira.komamura@gmail.com") (:keywords "maint" "tools") (:url . "https://github.com/akirak/helm-tail"))]) (helm-taskswitch . [(20190304 1414) ((emacs (24)) (helm (3 0))) "Use helm to switch windows and buffers" single ((:commit . "59f7cb99defa6e6bf6e7d599559fa8d5786cf8a9") (:authors ("Brian Caruso" . "briancaruso@gmail.com")) (:maintainer "Brian Caruso" . "briancaruso@gmail.com") (:keywords "frames") (:url . "https://github.com/bdc34/helm-taskswitch"))]) @@ -2256,9 +2257,9 @@ (helm-youtube . [(20190101 1733) ((request (0 2 0)) (helm (2 3 1)) (cl-lib (0 5))) "Query YouTube and play videos in your browser" single ((:commit . "e7272f1648c7fa836ea5ac1a61770b4931ab4709") (:authors ("Maximilian Roquemore" . "maximus12793@gmail.com")) (:maintainer "Maximilian Roquemore" . "maximus12793@gmail.com") (:keywords "youtube" "multimedia") (:url . "https://github.com/maximus12793/helm-youtube"))]) (helm-z . [(20171204 325) ((helm (1 0))) "Show z directory list with helm.el support." single ((:commit . "37212220bebea8b9c238cb1bbacd8332b7f26c03") (:authors ("yynozk" . "yynozk@gmail.com")) (:maintainer "yynozk" . "yynozk@gmail.com") (:url . "https://github.com/yynozk/helm-z"))]) (helm-zhihu-daily . [(20160625 1145) ((helm (1 0)) (cl-lib (0 5)) (emacs (24 4))) "Helm interface for 知乎日报 (http://daily.zhihu.com)" single ((:commit . "be27dcc6be1eb97663b65581a9a5c0fc81cfaba7") (:authors ("Chunyang Xu" . "xuchunyang56@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang56@gmail.com") (:url . "https://github.com/xuchunyang/helm-zhihu-daily"))]) - (help-find . [(20210826 928) ((emacs (25 2)) (dash (2 12))) "Additional help functions for working with keymaps" single ((:commit . "576d6505b9e42f50f121b1a6a675f17f03a04406") (:authors ("Duncan Burke" . "duncankburke@gmail.com")) (:maintainer "Duncan Burke" . "duncankburke@gmail.com") (:keywords "help") (:url . "https://github.com/duncanburke/help-find"))]) + (help-find . [(20220513 1028) ((emacs (25 2)) (dash (2 12))) "Additional help functions for working with keymaps" single ((:commit . "6dd61bbb6290e06e30c002c011da71e348ac045f") (:authors ("Duncan Burke" . "duncankburke@gmail.com")) (:maintainer "Duncan Burke" . "duncankburke@gmail.com") (:keywords "help") (:url . "https://github.com/duncanburke/help-find"))]) (help-find-org-mode . [(20181204 234) ((emacs (24 4))) "Advise help to find org source over tangled code" single ((:commit . "aeda7f92c086dab9d8dfcd580fe80b332887a548") (:authors ("Eric Crosson" . "eric.s.crosson@utexas.com")) (:maintainer "Eric Crosson" . "eric.s.crosson@utexas.com") (:keywords "convenience") (:url . "https://github.com/EricCrosson/help-find-org-mode"))]) - (helpful . [(20220412 421) ((emacs (25)) (dash (2 18 0)) (s (1 11 0)) (f (0 20 0)) (elisp-refs (1 2))) "A better *help* buffer" single ((:commit . "c2729a236a84a1fbd3d184c163fbd10e0fd62077") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:keywords "help" "lisp") (:url . "https://github.com/Wilfred/helpful"))]) + (helpful . [(20220513 302) ((emacs (25)) (dash (2 18 0)) (s (1 11 0)) (f (0 20 0)) (elisp-refs (1 2))) "A better *help* buffer" single ((:commit . "2f91e7992dae078a9cbc0d7f8e603e02d0abfcb0") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:keywords "help" "lisp") (:url . "https://github.com/Wilfred/helpful"))]) (hemera-theme . [(20180916 924) ((emacs (24))) "Light theme" single ((:commit . "b67c902b210b37b00cac68726822404543147ba8") (:authors ("Guido Schmidt")) (:maintainer "Guido Schmidt" . "guido.schmidt.2912@gmail.com") (:keywords "themes" "light-theme") (:url . "https://github.com/GuidoSchmidt/emacs-hemera-theme"))]) (hemisu-theme . [(20130508 1844) nil "Hemisu for Emacs." tar ((:commit . "5c206561aa2c844ecdf3e3b672c3235e559ddd7f") (:authors ("Andrzej Sliwa")) (:maintainer "Andrzej Sliwa") (:url . "http://github/anrzejsliwa/django-theme"))]) (hercules . [(20200420 747) ((emacs (24 4)) (which-key (3 3 2))) "An auto-magical, which-key-based hydra banisher." single ((:commit . "557da39878d0637395fdded91243b340c37eff7b") (:authors ("Uros Perisic")) (:maintainer "Uros Perisic") (:keywords "convenience") (:url . "https://gitlab.com/jjzmajic/hercules"))]) @@ -2311,7 +2312,7 @@ (hl-prog-extra . [(20220507 1118) ((emacs (26 2))) "Customizable highlighting for source-code" tar ((:commit . "a8e2ee5d43ce70c59e57d2ab90b39a6cf9e7b851") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:keywords "convenience") (:url . "https://codeberg.com/ideasman42/emacs-hl-prog-extra"))]) (hl-sentence . [(20171018 1519) nil "highlight a sentence based on customizable face" single ((:commit . "86ae38d3103bd20da5485cbdd59dfbd396c45ee4") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:keywords "highlighting") (:url . "http://github.com/milkypostman/hl-sentence"))]) (hl-todo . [(20220422 1611) ((emacs (25 1)) (compat (28 1 1 0))) "Highlight TODO and similar keywords" single ((:commit . "2337eac8cab0d4b73a96fb3936d2ac87600e3c91") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "convenience") (:url . "https://github.com/tarsius/hl-todo"))]) - (hledger-mode . [(20210706 1225) ((emacs (24 4)) (popup (0 5 3)) (async (1 9)) (htmlize (1 47))) "A mode for writing journal entries for hledger." tar ((:commit . "9ac07ff0adbce6a402c17e789b1750f9da0d22f4") (:authors ("Narendra Joshi" . "narendraj9@gmail.com")) (:maintainer "Narendra Joshi" . "narendraj9@gmail.com") (:keywords "data") (:url . "https://github.com/narendraj9/hledger-mode.git"))]) + (hledger-mode . [(20220515 1225) ((emacs (24 4)) (popup (0 5 3)) (async (1 9)) (htmlize (1 47))) "A mode for writing journal entries for hledger." tar ((:commit . "400bde42a8d2712af80cd7c773c9cdfbb63a515a") (:authors ("Narendra Joshi" . "narendraj9@gmail.com")) (:maintainer "Narendra Joshi" . "narendraj9@gmail.com") (:keywords "data") (:url . "https://github.com/narendraj9/hledger-mode.git"))]) (hlint-refactor . [(20190115 900) nil "Apply HLint suggestions" single ((:commit . "c4307f86aad6d02e32e9b30cb6edc115584c791c") (:keywords "haskell" "refactor") (:url . "https://github.com/mpickering/hlint-refactor-mode"))]) (hlinum . [(20180422 412) ((cl-lib (0 2))) "Extension for linum.el to highlight current line number" single ((:commit . "5646d9c0b9e7598b20b2004eab5439fdc6dbeda5") (:authors ("Tomoya Tanjo" . "ttanjo@gmail.com")) (:maintainer "Tomoya Tanjo" . "ttanjo@gmail.com") (:keywords "convenience" "extensions") (:url . "https://github.com/tom-tan/hlinum-mode/"))]) (hmac . [(20201004 1819) ((emacs (25 1))) "Hash-based message authentication code" single ((:commit . "f2b99a9a10becfff207cf9418c6dce78364b1a4b") (:authors ("Sean McAfee")) (:maintainer "Sean McAfee") (:url . "https://github.com/grimnebulin/emacs-hmac"))]) @@ -2426,7 +2427,7 @@ (impatient-showdown . [(20200914 221) ((emacs (24 3)) (impatient-mode (1 1))) "Preview markdown buffer live over HTTP using showdown" tar ((:commit . "6825147ebacb1d738b1c96baf0534a5ed3e6b289") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/impatient-showdown"))]) (import-js . [(20220215 1948) ((grizzl (0 1 0)) (emacs (24))) "Import Javascript dependencies" single ((:commit . "d2bbb53f96395415f9f01de4fa88d82c1f59ba63") (:authors ("Kevin Kehl" . "kevin.kehl@gmail.com")) (:maintainer "Kevin Kehl" . "kevin.kehl@gmail.com") (:keywords "javascript") (:url . "http://github.com/Galooshi/emacs-import-js/"))]) (import-popwin . [(20170218 1407) ((emacs (24 3)) (popwin (0 6))) "popwin buffer near by import statements with popwin" single ((:commit . "bb05a9e226f8c63fe7b18a3e92010357049ab5ba") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-import-popwin"))]) - (importmagic . [(20180520 303) ((f (0 11 0)) (epc (0 1 0)) (emacs (24 3))) "Fix Python imports using importmagic." tar ((:commit . "701dfcca5f3ab42be0f26a8d381d7116c79be850") (:authors ("Nicolás Salas V." . "nikosalas@gmail.com")) (:maintainer "Nicolás Salas V." . "nikosalas@gmail.com") (:keywords "languages" "convenience") (:url . "https://github.com/anachronic/importmagic.el"))]) + (importmagic . [(20180520 303) ((f (0 11 0)) (epc (0 1 0)) (emacs (24 3))) "Fix Python imports using importmagic." tar ((:commit . "570fb4f519d5e84dd681f932447cb995e8460840") (:authors ("Nicolás Salas V." . "nikosalas@gmail.com")) (:maintainer "Nicolás Salas V." . "nikosalas@gmail.com") (:keywords "languages" "convenience") (:url . "https://github.com/anachronic/importmagic.el"))]) (impostman . [(20220102 1856) ((emacs (27 1))) "Import Postman collections" single ((:commit . "5b122f3d5a3421aa2d89bdc9dc4aafaf19cf85d4") (:authors ("Sébastien Helleu" . "flashcode@flashtux.org")) (:maintainer "Sébastien Helleu" . "flashcode@flashtux.org") (:keywords "tools") (:url . "https://github.com/flashcode/impostman"))]) (indent-control . [(20220227 653) ((emacs (26 1))) "Management for indentation level" single ((:commit . "6fb6c9326077105febe2cd9c77b683b7c310cf03") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/indent-control"))]) (indent-guide . [(20210115 400) nil "show vertical lines to guide indentation" single ((:commit . "d388c3387781a370ca13233ff445d03f3c5cf12f") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://hins11.yu-yake.com/"))]) @@ -2614,8 +2615,8 @@ (julia-mode . [(20220418 809) ((emacs (24 3))) "Major mode for editing Julia source code" tar ((:commit . "adf4029be778c5983c436873b8a78bc72a6b09f8") (:keywords "languages") (:url . "https://github.com/JuliaEditorSupport/julia-emacs"))]) (julia-repl . [(20220428 541) ((emacs (25 1)) (s (1 12))) "A minor mode for a Julia REPL" single ((:commit . "2342003662071cf7b256f0a7cd8f545bcffaf22a") (:authors ("Tamas Papp" . "tkpapp@gmail.com")) (:maintainer "Tamas Papp" . "tkpapp@gmail.com") (:keywords "languages") (:url . "https://github.com/tpapp/julia-repl"))]) (julia-shell . [(20161125 1910) ((julia-mode (0 3))) "Major mode for an inferior Julia shell" tar ((:commit . "583a0b2ca20461ab4356929fd0f2212c22341b69") (:authors ("Dennis Ogbe" . "dogbe@purdue.edu")) (:maintainer "Dennis Ogbe" . "dogbe@purdue.edu"))]) - (julia-snail . [(20220508 456) ((emacs (26 2)) (dash (2 16 0)) (julia-mode (0 3)) (s (1 12 0)) (spinner (1 7 3)) (vterm (0 0 1)) (popup (0 5 9))) "Julia Snail" tar ((:commit . "47cfc8cc0c5b383b0647c91e657f1ffeaf73cce8") (:url . "https://github.com/gcv/julia-snail"))]) - (julia-vterm . [(20220503 7) ((emacs (25 1)) (vterm (0 0 1))) "A mode for Julia REPL using vterm" single ((:commit . "443924f6eb77d64a20b4b34a99d3c7d2d54f73a8") (:authors ("Shigeaki Nishina")) (:maintainer "Shigeaki Nishina") (:keywords "languages" "julia") (:url . "https://github.com/shg/julia-vterm.el"))]) + (julia-snail . [(20220512 539) ((emacs (26 2)) (dash (2 16 0)) (julia-mode (0 3)) (s (1 12 0)) (spinner (1 7 3)) (vterm (0 0 1)) (popup (0 5 9))) "Julia Snail" tar ((:commit . "88ce4fadc065736e154506538d365a8f1dd643e1") (:url . "https://github.com/gcv/julia-snail"))]) + (julia-vterm . [(20220510 2259) ((emacs (25 1)) (vterm (0 0 1))) "A mode for Julia REPL using vterm" single ((:commit . "5374776991232de966efca245f9ce24c59728588") (:authors ("Shigeaki Nishina")) (:maintainer "Shigeaki Nishina") (:keywords "languages" "julia") (:url . "https://github.com/shg/julia-vterm.el"))]) (jumblr . [(20170727 2043) ((s (1 8 0)) (dash (2 2 0))) "an anagram game for emacs" tar ((:commit . "34533dfb9db8538c005f4eaffafeff7ed193729f") (:keywords "anagram" "word game" "games") (:url . "https://github.com/mkmcc/jumblr"))]) (jump . [(20161127 128) ((findr (0 7)) (inflections (2 4)) (cl-lib (0 5))) "build functions which contextually jump between files" single ((:commit . "55caa66a7cc6e0b1a76143fd40eff38416928941") (:authors ("Eric Schulte")) (:maintainer "Eric Schulte") (:keywords "project" "convenience" "navigation") (:url . "http://github.com/eschulte/jump.el"))]) (jump-char . [(20180601 1348) nil "navigation by char" single ((:commit . "1e31a3c687f2b3c71bbfab881c6d75915534bb9e") (:authors ("Le Wang")) (:maintainer "Le Wang") (:url . "https://github.com/lewang/jump-char"))]) @@ -2699,7 +2700,7 @@ (kubernetes-evil . [(20211225 300) ((kubernetes (0 17 0)) (evil (1 2 12))) "Kubernetes keybindings for evil-mode." single ((:commit . "e0d0cd6b949802fe63ff8940cc743cc7efedb089") (:authors ("Chris Barrett" . "chris+emacs@walrus.cool")) (:maintainer "Chris Barrett" . "chris+emacs@walrus.cool"))]) (kubernetes-helm . [(20210902 2232) ((yaml-mode (0 0 13)) (emacs (25 3))) "extension for helm, the package manager for kubernetes" single ((:commit . "95cf92600436f67bd7bfe650763e68635f5ecc8e") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "kubernetes" "helm" "k8s" "tools" "processes") (:url . "https://github.com/abrochard/kubernetes-helm"))]) (kubernetes-tramp . [(20181228 922) ((emacs (24)) (cl-lib (0 5))) "TRAMP integration for kubernetes containers" single ((:commit . "8713571b66940f8f3f496b55baa23cdf1df7a869") (:authors ("Giovanni Ruggiero" . "giovanni.ruggiero+github@gmail.com")) (:maintainer "Giovanni Ruggiero" . "giovanni.ruggiero+github@gmail.com") (:keywords "kubernetes" "convenience") (:url . "https://github.com/gruggiero/kubernetes-tramp"))]) - (kurecolor . [(20220508 929) ((emacs (24 1)) (s (1 0))) "color editing goodies for Emacs" single ((:commit . "1c80df0f2c542f54920f18aa4eb837f0a51c7676") (:authors ("Jason Milkins" . "jasonm23@gmail.com")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com"))]) + (kurecolor . [(20220508 929) ((emacs (24 1)) (s (1 0))) "color editing goodies for Emacs" single ((:commit . "61d7211469ea3e2c429937869c5a29584103361a") (:authors ("Jason Milkins" . "jasonm23@gmail.com")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com"))]) (kuronami-theme . [(20220309 604) ((emacs (24 1))) "A deep blue theme with cool autumnal colors" single ((:commit . "910e8fa56a0cfe89dae888522f9fec4045d017fb") (:authors ("Eric Chung <>")) (:maintainer "Eric Chung <>") (:url . "https://github.com/super3ggo/kuronami"))]) (kv . [(20140108 1534) nil "key/value data structure functions" single ((:commit . "721148475bce38a70e0b678ba8aa923652e8900e") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "lisp"))]) (kwin . [(20220120 2125) nil "communicatewith the KWin window manager" single ((:commit . "20fac6508e5535a26df783ba05f04d1800b7382c") (:authors ("Simon Hafner")) (:maintainer "Simon Hafner") (:url . "http://github.com/reactormonk/kwin-minor-mode"))]) @@ -2710,7 +2711,7 @@ (lacquer . [(20220321 720) ((emacs (25 2))) "Switch theme/font by selecting from a cache" tar ((:commit . "0d7d09f7fe22fb0241e91228ce44568ed3e3e798") (:authors ("dingansich_kum0" . "zy.hua1122@outlook.com")) (:maintainer "dingansich_kum0" . "zy.hua1122@outlook.com") (:keywords "tools") (:url . "https://github.com/dingansichKum0/lacquer"))]) (laguna-theme . [(20220419 1459) nil "An updated blue-green Laguna Theme." single ((:commit . "48d14ffad6f0ffb4bd60c341e618c47ddbb7a2d8") (:authors ("Henry Newcomer" . "a.cliche.email@gmail.com")) (:maintainer "Henry Newcomer" . "a.cliche.email@gmail.com") (:url . "https://github.com/HenryNewcomer/laguna-theme"))]) (lakota-input . [(20200823 2146) nil "Input modes for Lakota language orthographies" single ((:commit . "b74b9de284a0404a120bb15340def4dd2f9a4779") (:authors ("Grant Shangreaux" . "shshoshin@protonmail.com")) (:maintainer "Grant Shangreaux" . "shshoshin@protonmail.com") (:url . "https://git.sr.ht/~shoshin/lakota-input.git"))]) - (lambdapi-mode . [(20220106 1308) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "a205bd0e8ba492a3a784ddd7a97c5167fce50675") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))]) + (lambdapi-mode . [(20220106 1308) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "67ae434d6ce2073e9c914817d21269f5c6a2a66f") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))]) (lammps-mode . [(20180801 1319) ((emacs (24 4))) "basic syntax highlighting for LAMMPS files" single ((:commit . "a5b68d7a59975770b56ee8f6e66fa4f703a72ffe") (:authors ("Aidan Thompson <athomps at sandia.gov>")) (:maintainer "Rohit Goswami <r95g10 at gmail.com>") (:keywords "languages" "faces") (:url . "https://github.com/lammps/lammps/tree/master/tools/emacs"))]) (lang-refactor-perl . [(20131122 2127) nil "Simple refactorings, primarily for Perl" single ((:commit . "691bd69639de6b7af357e3b7143563ececd9c497") (:authors (nil . "Johan Lindstrom <buzzwordninja not_this_bit@googlemail.com>")) (:maintainer nil . "Johan Lindstrom <buzzwordninja not_this_bit@googlemail.com>") (:keywords "languages" "refactoring" "perl") (:url . "https://github.com/jplindstrom/emacs-lang-refactor-perl"))]) (langdoc . [(20150218 645) ((cl-lib (0 2))) "Help to define help document mode for various languages" single ((:commit . "2c7223bacb116992d700ecb19a60df5c09c63424") (:authors ("Tomoya Tanjo" . "ttanjo@gmail.com")) (:maintainer "Tomoya Tanjo" . "ttanjo@gmail.com") (:keywords "convenience" "eldoc") (:url . "https://github.com/tom-tan/langdoc/"))]) @@ -2718,7 +2719,7 @@ (langtool-ignore-fonts . [(20210526 2340) ((emacs (25 1)) (langtool (2 2 1))) "Force langtool to ignore certain fonts" single ((:commit . "c3291c85b733b9047653cbb1f525655394610bdb") (:authors ("Christopher Lloyd" . "cjl8zf@virginia.edu")) (:maintainer "Christopher Lloyd" . "cjl8zf@virginia.edu") (:url . "https://github.com/cjl8zf/langtool-ignore-fonts"))]) (language-detection . [(20161123 1813) ((emacs (24)) (cl-lib (0 5))) "Automatic language detection from code snippets" single ((:commit . "54a6ecf55304fba7d215ef38a4ec96daff2f35a4") (:authors ("Andreas Jansson" . "andreas@jansson.me.uk")) (:maintainer "Andreas Jansson" . "andreas@jansson.me.uk") (:url . "https://github.com/andreasjansson/language-detection.el"))]) (language-id . [(20220411 1932) ((emacs (24 3))) "Library to work with programming language identifiers" single ((:commit . "5325af36d9cd726de47a698ac159fce59f3fd6d9") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-language-id"))]) - (languagetool . [(20220127 2215) ((emacs (27 0)) (request (0 3 2))) "LanguageTool integration for grammar and spell check" tar ((:commit . "ea50c120ee3418489b43d51ed750288791d6eb95") (:authors ("Joar Buitrago" . "jebuitragoc@unal.edu.co")) (:maintainer "Joar Buitrago" . "jebuitragoc@unal.edu.co") (:keywords "grammar" "text" "docs" "tools" "convenience" "checker") (:url . "https://github.com/PillFall/Emacs-LanguageTool.el"))]) + (languagetool . [(20220514 309) ((emacs (27 0)) (request (0 3 2))) "LanguageTool integration for grammar and spell check" tar ((:commit . "503d18bd3c074fe8f495cfa6a34ccca1ef6961ce") (:authors ("Joar Buitrago" . "jebuitragoc@unal.edu.co")) (:maintainer "Joar Buitrago" . "jebuitragoc@unal.edu.co") (:keywords "grammar" "text" "docs" "tools" "convenience" "checker") (:url . "https://github.com/PillFall/Emacs-LanguageTool.el"))]) (lastfm . [(20211018 838) ((emacs (26 1)) (request (0 3 0)) (anaphora (1 0 4)) (memoize (1 1)) (elquery (0 1 0)) (s (1 12 0))) "Last.fm API for Emacs Lisp" single ((:commit . "b4b19f0aadc5087febeeb3f59944a89c4cdcf325") (:authors ("Mihai Olteanu" . "mihai_olteanu@fastmail.fm")) (:maintainer "Mihai Olteanu" . "mihai_olteanu@fastmail.fm") (:keywords "multimedia" "api") (:url . "https://github.com/mihaiolteanu/lastfm.el/"))]) (lastpass . [(20201229 2109) ((emacs (24 4)) (seq (1 9)) (cl-lib (0 5))) "LastPass command wrapper" single ((:commit . "2366de7824b6c5f8e9ec6811d219dc06794e8630") (:authors ("Petter Storvik")) (:maintainer "Petter Storvik") (:keywords "extensions" "processes" "lpass" "lastpass") (:url . "https://github.com/storvik/emacs-lastpass"))]) (latex-extra . [(20170817 147) ((auctex (11 86 1)) (cl-lib (0 5))) "Adds several useful functionalities to LaTeX-mode." single ((:commit . "82d99b8b0c2db20e5270749582e03bcc2443ffb5") (:authors ("Artur Malabarba" . "artur@endlessparentheses.com")) (:maintainer "Artur Malabarba" . "artur@endlessparentheses.com") (:keywords "tex") (:url . "http://github.com/Malabarba/latex-extra"))]) @@ -2734,7 +2735,7 @@ (lavenderless-theme . [(20201222 1627) ((colorless-themes (0 2))) "A mostly colorless version of lavender-theme" single ((:commit . "c1ed1e12541cf05cc6c558d23c089c07e10b54d7") (:authors ("Thomas Letan" . "lthms@soap.coffee")) (:maintainer "Thomas Letan" . "lthms@soap.coffee") (:keywords "faces" "theme") (:url . "https://git.sr.ht/~lthms/colorless-themes.el"))]) (lcb-mode . [(20160816 540) ((emacs (24))) "LiveCode Builder major mode" single ((:commit . "be0768e9aa6f9b8e76f2230f4f7f4d152a766b9a") (:authors ("Peter TB Brett" . "peter@peter-b.co.uk")) (:maintainer "Peter TB Brett" . "peter@peter-b.co.uk") (:keywords "languages") (:url . "https://github.com/peter-b/lcb-mode"))]) (lcr . [(20210102 853) ((dash (2 12 0)) (emacs (25 1))) "lightweight coroutines" single ((:commit . "493424dab9f374c5521dca8714481b70cb3c3cfd") (:authors ("Jean-Philippe Bernardy" . "jeanphilippe.bernardy@gmail.com")) (:maintainer "Jean-Philippe Bernardy" . "jeanphilippe.bernardy@gmail.com") (:keywords "tools") (:url . "https://github.com/jyp/lcr"))]) - (le-thesaurus . [(20220509 2120) ((request (0 3 2)) (emacs (24 4))) "Query thesaurus.com for synonyms of a given word" single ((:commit . "2af1ab37097cdd17044ab217e9aa6839add98626") (:url . "https://github.com/AnselmC/le-thesaurus"))]) + (le-thesaurus . [(20220516 840) ((request (0 3 2)) (emacs (24 4))) "Query thesaurus.com for synonyms of a given word" single ((:commit . "185ba932b3bc4aaa4318d3fad571d90830eb2bb2") (:url . "https://github.com/AnselmC/le-thesaurus"))]) (leaf . [(20211226 1633) ((emacs (24 1))) "Simplify your init.el configuration, extended use-package" single ((:commit . "9eb18e8c9c375aa0158fbd06ea906bfbf54408fe") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "lisp" "settings") (:url . "https://github.com/conao3/leaf.el"))]) (leaf-convert . [(20210816 1103) ((emacs (26 1)) (leaf (3 6 0)) (leaf-keywords (1 1 0)) (ppp (2 1))) "Convert many format to leaf format" single ((:commit . "da86654f1021445cc42c1a5a9195f15097352209") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "tools") (:url . "https://github.com/conao3/leaf-convert.el"))]) (leaf-defaults . [(20210301 118) ((emacs (26 1)) (leaf (4 1)) (leaf-keywords (1 1))) "Awesome leaf config collections" tar ((:commit . "96ce39d4f16736f1e654e24eac16a2603976c724") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/leaf-defaults.el"))]) @@ -2774,7 +2775,7 @@ (license-snippets . [(20201117 1619) ((emacs (26)) (yasnippet (0 8 0))) "LICENSE templates for yasnippet" tar ((:commit . "a729748b7d7f38a916fe61f23db6e7446c0a5e8f") (:authors ("Seong Yong-ju" . "sei40kr@gmail.com")) (:maintainer "Seong Yong-ju" . "sei40kr@gmail.com") (:keywords "tools") (:url . "https://github.com/sei40kr/license-snippets"))]) (license-templates . [(20200906 2047) ((emacs (24 3)) (request (0 3 0))) "Create LICENSE using GitHub API" single ((:commit . "e03f4a30c4abf354fb961babe4dce1dfa733aa82") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/license-templates"))]) (light-soap-theme . [(20150607 1445) ((emacs (24))) "Emacs 24 theme with a light background." single ((:commit . "76a787bd40c6b567ae68ced7f5d9f9f10725e00d"))]) - (ligo-mode . [(20220209 755) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "4e334c2092a8560ca0bb75670026d1d938575bc7") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))]) + (ligo-mode . [(20220209 755) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "dffa1d83c133fceb25fc754f42fd0fb589191995") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))]) (line-reminder . [(20220502 1210) ((emacs (25 1)) (indicators (0 0 4)) (fringe-helper (1 0 1)) (ov (1 0 6)) (ht (2 0))) "Line annotation for changed and saved lines" single ((:commit . "c0cebef629a98556f5696f78436f4d8428ce8135") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/emacs-vs/line-reminder"))]) (line-up-words . [(20180219 1024) nil "Align words in an intelligent way" single ((:commit . "254ee815eb3fe77edea7c9da6f6f3839163735f3") (:url . "https://github.com/janestreet/line-up-words"))]) (lines-at-once . [(20180422 247) ((emacs (25))) "Insert and edit multiple lines at once" single ((:commit . "31bce4b79fe16251b7cf118f0d343b0b46f72360") (:authors ("Jiahao Li" . "jiahaowork@gmail.com")) (:maintainer "Jiahao Li" . "jiahaowork@gmail.com") (:keywords "abbrev" "tools") (:url . "https://github.com/jiahaowork/lines-at-once.el"))]) @@ -2812,13 +2813,13 @@ (litex-mode . [(20220415 1704) ((cl-lib (0 5)) (emacs (24 1))) "Minor mode for converting lisp to LaTeX" tar ((:commit . "5d5750af2990c050c8d36baa4b8e7a45850d5a6a") (:authors ("Gaurav Atreya" . "allmanpride@gmail.com")) (:maintainer "Gaurav Atreya" . "allmanpride@gmail.com") (:keywords "calculator" "lisp" "latex") (:url . "https://github.com/Atreyagaurav/litex-mode"))]) (live-code-talks . [(20180907 1647) ((emacs (24)) (cl-lib (0 5)) (narrowed-page-navigation (0 1))) "Support for slides with live code in them" single ((:commit . "97f16a9ee4e6ff3e0f9291eaead772c66e3e12ae") (:authors ("David Raymond Christiansen" . "david@davidchristiansen.dk")) (:maintainer "David Raymond Christiansen" . "david@davidchristiansen.dk") (:keywords "docs" "multimedia"))]) (live-preview . [(20201010 1948) ((emacs (24 4))) "Live preview by any shell command while editing" single ((:commit . "603a4a1759fbec92e7a1cabc249517c78e59ce7e") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-live-preview"))]) - (live-py-mode . [(20220404 0) ((emacs (24 3))) "Live Coding in Python" tar ((:commit . "b466460b6783caacf1ea3fcfa28752cb73fd0805") (:authors ("Don Kirkby http://donkirkby.github.io")) (:maintainer "Don Kirkby http://donkirkby.github.io") (:keywords "live" "coding") (:url . "http://donkirkby.github.io/live-py-plugin/"))]) + (live-py-mode . [(20220512 34) ((emacs (24 3))) "Live Coding in Python" tar ((:commit . "9dee1cd6e885f2e5d3763b7527c50dc6c85ca5f3") (:authors ("Don Kirkby http://donkirkby.github.io")) (:maintainer "Don Kirkby http://donkirkby.github.io") (:keywords "live" "coding") (:url . "http://donkirkby.github.io/live-py-plugin/"))]) (lively . [(20171005 754) nil "interactively updating text" single ((:commit . "348675828c6a81bfa1ac311ca465aad813542c1b") (:authors ("Luke Gorrie" . "luke@bup.co.nz")) (:maintainer "Steve Purcell" . "steve@sanityinc.com"))]) (livereload . [(20170629 650) ((emacs (25)) (websocket (1 8))) "Livereload server" tar ((:commit . "1e501d7e46dbd476c2c7cc9d20b5ac9d41fb1955") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience"))]) (livescript-mode . [(20140613 421) nil "Major mode for editing LiveScript files" single ((:commit . "90a918d9686e256e6d4d439cc20f24dad8d3b804") (:authors ("Hisamatsu Yasuyuki" . "yas@null.net")) (:maintainer "Hisamatsu Yasuyuki" . "yas@null.net") (:keywords "languages" "livescript") (:url . "https://github.com/yhisamatsu/livescript-mode"))]) (livid-mode . [(20131116 1344) ((skewer-mode (1 5 3)) (s (1 8 0))) "Live browser eval of JavaScript every time a buffer changes" single ((:commit . "dfe5212fa64738bc4138bfebf349fbc8bc237c26") (:authors ("Murphy McMahon")) (:maintainer "Murphy McMahon") (:url . "https://github.com/pandeiro/livid-mode"))]) (ll-debug . [(20211002 1031) ((emacs (24 3))) "Low level debug tools" single ((:commit . "a2cfeab46e5100c348b35987fae34f9ea76d7c0b") (:authors ("Claus Brunzema" . "mail@cbrunzema.de")) (:maintainer "Claus Brunzema" . "mail@cbrunzema.de") (:keywords "abbrev" "convenience" "tools" "c" "lisp") (:url . "https://github.com/replrep/ll-debug"))]) - (llama . [(20220428 1405) ((seq (2 20))) "Anonymous function literals" single ((:commit . "adc5d169fad53d6d11000a72dc95f8489a8c7534") (:keywords "extensions") (:url . "https://git.sr.ht/~tarsius/llama"))]) + (llama . [(20220428 1405) ((seq (2 20))) "Anonymous function literals" single ((:commit . "3dd1d99ebc99aa39b165569b3d02a87368d4849a") (:keywords "extensions") (:url . "https://git.sr.ht/~tarsius/llama"))]) (lms . [(20210820 2200) ((emacs (25 1))) "Squeezebox / Logitech Media Server frontend" single ((:commit . "05c8fd16ff94590393b6b0a9cb193ec9572a9c97") (:authors ("Iñigo Serna" . "inigoserna@gmx.com")) (:maintainer "Iñigo Serna" . "inigoserna@gmx.com") (:keywords "multimedia") (:url . "https://hg.serna.eu/emacs/lms"))]) (load-bash-alias . [(20220108 2103) ((emacs (24 1)) (seq (2 16))) "Convert bash aliases into eshell ones" single ((:commit . "968f037eff48ceca15fd135738051c48ab14cfd6") (:authors ("Davide Restivo" . "davide.restivo@yahoo.it")) (:maintainer "Davide Restivo" . "davide.restivo@yahoo.it") (:keywords "emacs" "bash" "eshell" "alias") (:url . "https://github.com/daviderestivo/load-bash-alias"))]) (load-env-vars . [(20180511 2210) ((emacs (24))) "Load environment variables from files" single ((:commit . "3808520efaf9492033f6e11a9bffd68eabf02a0f") (:authors ("Jorge Dias" . "jorge@mrdias.com")) (:maintainer "Jorge Dias" . "jorge@mrdias.com") (:keywords "lisp") (:url . "https://github.com/diasjorge/emacs-load-env-vars"))]) @@ -2850,9 +2851,9 @@ (lox-mode . [(20200619 1700) ((emacs (24 3))) "Major mode for the Lox programming language" single ((:commit . "b6935b3f5b131d2c1c7685cf6464274f7cd64943") (:authors ("Timmy Jose" . "zoltan.jose@gmail.com")) (:maintainer "Timmy Jose" . "zoltan.jose@gmail.com") (:keywords "languages" "lox") (:url . "https://github.com/timmyjose-projects/lox-mode"))]) (lpy . [(20201027 1425) ((emacs (25 1)) (lispy (0 27 0))) "A lispy interface to Python" tar ((:commit . "076ce9acb68f6ac1b39127b634a91ffd865d13d8") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "python" "lisp") (:url . "https://github.com/abo-abo/lpy"))]) (lsp-dart . [(20220430 1535) ((emacs (26 3)) (lsp-treemacs (0 3)) (lsp-mode (7 0 1)) (dap-mode (0 6)) (f (0 20 0)) (dash (2 14 1)) (dart-mode (1 0 5))) "Dart support lsp-mode" tar ((:commit . "7ca60ce9a703ad7a950dcd5ec36ef4251f57d207") (:keywords "languages" "extensions") (:url . "https://emacs-lsp.github.io/lsp-dart"))]) - (lsp-docker . [(20220501 1056) ((emacs (26 1)) (dash (2 14 1)) (lsp-mode (6 2 1)) (f (0 20 0)) (yaml (0 2 0)) (ht (2 0))) "LSP Docker integration" single ((:commit . "c57863609abfb93fccabf81dc3112ac38f93c4a2") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "languages" "langserver") (:url . "https://github.com/emacs-lsp/lsp-docker"))]) + (lsp-docker . [(20220513 1434) ((emacs (26 1)) (dash (2 14 1)) (lsp-mode (6 2 1)) (f (0 20 0)) (yaml (0 2 0)) (ht (2 0))) "LSP Docker integration" single ((:commit . "a0d7cbf80652429c0be4dc7d39e1887ba4691ec7") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "languages" "langserver") (:url . "https://github.com/emacs-lsp/lsp-docker"))]) (lsp-focus . [(20200906 1917) ((emacs (26 1)) (focus (0 1 1)) (lsp-mode (6 1))) "focus.el support for lsp-mode" single ((:commit . "d01f0af156e4e78dcb9fa8e080a652cf8f221d30") (:authors ("Vibhav Pant")) (:maintainer "Vibhav Pant") (:keywords "languages" "lsp-mode") (:url . "https://github.com/emacs-lsp/lsp-focus"))]) - (lsp-grammarly . [(20220509 823) ((emacs (27 1)) (lsp-mode (6 1)) (grammarly (0 3 0)) (request (0 3 0)) (s (1 12 0)) (ht (2 3))) "LSP Clients for Grammarly" single ((:commit . "3fe46f0cc7c757582e7ba14c1d29e084cc0d5357") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/emacs-grammarly/lsp-grammarly"))]) + (lsp-grammarly . [(20220515 833) ((emacs (27 1)) (lsp-mode (6 1)) (grammarly (0 3 0)) (request (0 3 0)) (s (1 12 0)) (ht (2 3))) "LSP Clients for Grammarly" single ((:commit . "450fea02cdf0b6f765271cc22e1f0031716868e0") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/emacs-grammarly/lsp-grammarly"))]) (lsp-haskell . [(20220307 2312) ((emacs (24 3)) (lsp-mode (3 0))) "Haskell support for lsp-mode" single ((:commit . "daa51072e1718ca075987901fccbbc2357bca1fc") (:keywords "haskell") (:url . "https://github.com/emacs-lsp/lsp-haskell"))]) (lsp-intellij . [(20180831 2051) ((emacs (25 1)) (lsp-mode (4 1))) "intellij lsp client" single ((:commit . "cf30f0ac63bd0140e758840b8ab070e8313697b2") (:authors ("Ruin0x11" . "ipickering2@gmail.com")) (:maintainer "Ruin0x11" . "ipickering2@gmail.com") (:keywords "languages" "processes" "tools") (:url . "https://github.com/Ruin0x11/lsp-intellij"))]) (lsp-ivy . [(20210904 2043) ((emacs (25 1)) (dash (2 14 1)) (lsp-mode (6 2 1)) (ivy (0 13 0))) "LSP ivy integration" single ((:commit . "3e87441a625d65ced5a208a0b0442d573596ffa3") (:keywords "languages" "debug") (:url . "https://github.com/emacs-lsp/lsp-ivy"))]) @@ -2862,8 +2863,8 @@ (lsp-julia . [(20211229 1534) ((emacs (25 1)) (lsp-mode (6 3)) (julia-mode (0 3))) "Julia support for lsp-mode" tar ((:commit . "d6688bb131ff4a5a0201f6d3826ef0b018265389") (:authors ("Martin Wolke" . "vibhavp@gmail.com") ("Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") ("Guido Kraemer" . "gdkrmr@users.noreply.github.com")) (:maintainer "Guido Kraemer" . "gdkrmr@users.noreply.github.com") (:keywords "languages" "tools") (:url . "https://github.com/gdkrmr/lsp-julia"))]) (lsp-latex . [(20210815 1426) ((emacs (25 1)) (lsp-mode (6 0))) "LSP-mode client for LaTeX, on texlab" single ((:commit . "3f6b2ac9585682828eef81f895757f74cfba7309") (:authors ("ROCKTAKEY" . "rocktakey@gmail.com")) (:maintainer "ROCKTAKEY" . "rocktakey@gmail.com") (:keywords "languages" "tex") (:url . "https://github.com/ROCKTAKEY/lsp-latex"))]) (lsp-ltex . [(20220508 533) ((emacs (26 1)) (lsp-mode (6 1))) "LSP Clients for LTEX" single ((:commit . "8c2ba735ed1e21777408167f6a7c7d9681d9e7bc") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/emacs-languagetool/lsp-ltex"))]) - (lsp-metals . [(20220330 1958) ((emacs (26 1)) (scala-mode (1 1)) (lsp-mode (7 0)) (lsp-treemacs (0 2)) (dap-mode (0 3)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5))) "Scala Client settings" tar ((:commit . "b7f77de69431786c54e9a57845e4f2d75fbee053") (:authors ("Ross A. Baker" . "ross@rossabaker.com") ("Evgeny Kurnevsky" . "kurnevsky@gmail.com")) (:maintainer "Ross A. Baker" . "ross@rossabaker.com") (:keywords "languages" "extensions") (:url . "https://github.com/emacs-lsp/lsp-metals"))]) - (lsp-mode . [(20220505 630) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "6327359f3b5e19aeaa1c9ee6bd9b80b51f95f843") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))]) + (lsp-metals . [(20220510 1457) ((emacs (26 1)) (scala-mode (1 1)) (lsp-mode (7 0)) (lsp-treemacs (0 2)) (dap-mode (0 3)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5))) "Scala Client settings" tar ((:commit . "6980fb902c3c7b43ff0d4056a6cd7d8b4709866e") (:authors ("Ross A. Baker" . "ross@rossabaker.com") ("Evgeny Kurnevsky" . "kurnevsky@gmail.com")) (:maintainer "Ross A. Baker" . "ross@rossabaker.com") (:keywords "languages" "extensions") (:url . "https://github.com/emacs-lsp/lsp-metals"))]) + (lsp-mode . [(20220517 602) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "9131ab7a8c83a027f42c4cb4a209aeb36c2217dd") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))]) (lsp-mssql . [(20191204 1150) ((emacs (25 1)) (lsp-mode (6 2)) (dash (2 14 1)) (f (0 20 0)) (ht (2 0)) (lsp-treemacs (0 1))) "MSSQL LSP bindings" tar ((:commit . "8d5d4d4a7f72b4cae89a48ea8618f3ef28bcb121") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "data" "languages") (:url . "https://github.com/emacs-lsp/lsp-mssql"))]) (lsp-origami . [(20211016 1045) ((origami (1 0)) (lsp-mode (6 1))) "origami.el support for lsp-mode" single ((:commit . "7df9c91a309aa4229bec41f109920b37c4197618") (:authors ("Vibhav Pant")) (:maintainer "Vibhav Pant") (:keywords "languages" "lsp-mode") (:url . "https://github.com/emacs-lsp/lsp-origami"))]) (lsp-p4 . [(20190127 1049) ((lsp-mode (3 0))) "P4 support for lsp-mode" tar ((:commit . "669460d93b87fb876df11b2b68229677e7ad1a26") (:authors ("Dmitri Makarov")) (:maintainer "Dmitri Makarov") (:keywords "lsp" "p4") (:url . "https://github.com/dmakarov/p4ls"))]) @@ -2872,11 +2873,11 @@ (lsp-pyright . [(20220411 1753) ((emacs (26 1)) (lsp-mode (7 0)) (dash (2 18 0)) (ht (2 0))) "Python LSP client using Pyright" single ((:commit . "ab7369d96f4d7d058d0e06e743f86fda8ecc191c") (:authors ("Arif Rezai, Vincent Zhang, Andrew Christianson")) (:maintainer "Arif Rezai, Vincent Zhang, Andrew Christianson") (:keywords "languages" "tools" "lsp") (:url . "https://github.com/emacs-lsp/lsp-pyright"))]) (lsp-python-ms . [(20211204 1209) ((emacs (25 1)) (lsp-mode (6 1))) "The lsp-mode client for Microsoft python-language-server" single ((:commit . "f8e7c4bcaefbc3fd96e1ca53d17589be0403b828") (:authors ("Charl Botha")) (:maintainer "Andrew Christianson, Vincent Zhang") (:keywords "languages" "tools") (:url . "https://github.com/emacs-lsp/lsp-python-ms"))]) (lsp-rescript . [(20220314 1957) ((lsp-mode (7 0 1)) (emacs (25 1)) (rescript-mode (0 1))) "LSP client configuration for lsp-mode and rescript-vscode" single ((:commit . "7baf9adf10234cf964feefae99050268e9bc5681") (:authors ("John Lee")) (:maintainer "John Lee") (:keywords "languages") (:url . "https://github.com/jjlee/lsp-rescript"))]) - (lsp-sonarlint . [(20210820 2044) ((emacs (25)) (dash (2 12 0)) (lsp-mode (6 3)) (ht (2 3))) "Emacs Sonarlint lsp client" tar ((:commit . "3af97828f9c08d782fb2086e3a73bda5759e6788") (:authors ("Fermin MF" . "fmfs@posteo.net")) (:maintainer "Fermin MF" . "fmfs@posteo.net") (:keywords "languages" "tools" "php" "javascript" "xml" "ruby" "html" "scala" "java" "python") (:url . "https://github.com/emacs-lsp/lsp-sonarlint"))]) - (lsp-sourcekit . [(20210905 2017) ((emacs (25 1)) (lsp-mode (5))) "sourcekit-lsp client for lsp-mode" single ((:commit . "97ff36b228a61e69734c7180f33cc6951b1a600f") (:authors ("Daniel Martín")) (:maintainer "Daniel Martín") (:keywords "languages" "lsp" "swift" "objective-c" "c++") (:url . "https://github.com/emacs-lsp/lsp-sourcekit"))]) + (lsp-sonarlint . [(20210820 2044) ((emacs (25)) (dash (2 12 0)) (lsp-mode (6 3)) (ht (2 3))) "Emacs Sonarlint lsp client" tar ((:commit . "a429be2aea7797369a3c751ef54e3554733117be") (:authors ("Fermin MF" . "fmfs@posteo.net")) (:maintainer "Fermin MF" . "fmfs@posteo.net") (:keywords "languages" "tools" "php" "javascript" "xml" "ruby" "html" "scala" "java" "python") (:url . "https://github.com/emacs-lsp/lsp-sonarlint"))]) + (lsp-sourcekit . [(20210905 2017) ((emacs (25 1)) (lsp-mode (5))) "sourcekit-lsp client for lsp-mode" single ((:commit . "f877659babd3b5f8ec09a8ad7d08193d95b6822e") (:authors ("Daniel Martín")) (:maintainer "Daniel Martín") (:keywords "languages" "lsp" "swift" "objective-c" "c++") (:url . "https://github.com/emacs-lsp/lsp-sourcekit"))]) (lsp-tailwindcss . [(20211211 248) ((lsp-mode (7 1)) (emacs (26 1))) "A lsp-mode client for tailwindcss" single ((:commit . "8c04fc4ac6f5eb8053ecdaaedffa35e0f7a5b865") (:authors ("A.I." . "merrick@luois.me")) (:maintainer "A.I." . "merrick@luois.me") (:keywords "language" "tools") (:url . "https://github.com/merrickluo/lsp-tailwindcss"))]) (lsp-treemacs . [(20220502 459) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5)) (lsp-mode (6 0))) "LSP treemacs" tar ((:commit . "9859326df6b8e8c954a3c227e53b6878e54aaae8") (:authors ("Ivan Yonchovski")) (:maintainer "Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-treemacs"))]) - (lsp-ui . [(20220510 627) ((emacs (26 1)) (dash (2 18 0)) (lsp-mode (6 0)) (markdown-mode (2 3))) "UI modules for lsp-mode" tar ((:commit . "eba9c4eaa255a14e2facd658e7122674c05390f8") (:authors ("Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me")) (:maintainer "Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me") (:keywords "languages" "tools") (:url . "https://github.com/emacs-lsp/lsp-ui"))]) + (lsp-ui . [(20220514 2010) ((emacs (26 1)) (dash (2 18 0)) (lsp-mode (6 0)) (markdown-mode (2 3))) "UI modules for lsp-mode" tar ((:commit . "370022b6785e5c1906cf23fe92d658f10623f3ba") (:authors ("Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me")) (:maintainer "Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me") (:keywords "languages" "tools") (:url . "https://github.com/emacs-lsp/lsp-ui"))]) (lua-mode . [(20210809 1320) ((emacs (24 3))) "a major-mode for editing Lua scripts" single ((:commit . "5a9bee8d5fc978dc64fcb677167417010321ba65") (:authors ("2011-2013 immerrr" . "immerrr+lua@gmail.com") ("2010-2011 Reuben Thomas" . "rrt@sc3d.org") ("2006 Juergen Hoetzel" . "juergen@hoetzel.info") ("2004 various (support for Lua 5 and byte compilation)") ("2001 Christian Vogler" . "cvogler@gradient.cis.upenn.edu") ("1997 Bret Mogilefsky" . "mogul-lua@gelatinous.com") ("tcl-mode by Gregor Schmid" . "schmid@fb3-s7.math.tu-berlin.de") ("with tons of assistance from") ("Paul Du Bois" . "pld-lua@gelatinous.com") ("Aaron Smith" . "aaron-lua@gelatinous.com")) (:maintainer "2011-2013 immerrr" . "immerrr+lua@gmail.com") (:keywords "languages" "processes" "tools") (:url . "https://immerrr.github.io/lua-mode"))]) (luarocks . [(20170430 2305) ((emacs (24)) (cl-lib (0 5))) "luarocks tools" single ((:commit . "cee27ba0716edf338077387969883226dd2b7484") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience") (:url . "https://github.com/emacs-pe/luarocks.el"))]) (lush-theme . [(20180816 2200) ((emacs (24))) "A dark theme with lush colors" single ((:commit . "645e1959143532df8f7ef90e1184e9556df18af7") (:authors ("Andre Richter" . "andre.o.richter@gmail.com")) (:maintainer "Andre Richter" . "andre.o.richter@gmail.com") (:keywords "theme" "dark" "strong colors") (:url . "https://github.com/andre-richter/emacs-lush-theme"))]) @@ -2891,7 +2892,7 @@ (m-buffer . [(20170407 2141) ((seq (2 14))) "List-Oriented, Functional Buffer Manipulation" tar ((:commit . "8681342aaffa187e5c54945ab91b812965a96d19") (:authors ("Phillip Lord" . "phillip.lord@russet.org.uk")) (:maintainer "Phillip Lord" . "phillip.lord@russet.rg.uk"))]) (mac-pseudo-daemon . [(20200215 513) ((cl-lib (0 1))) "Daemon mode that plays nice with Mac OS." single ((:commit . "94240ebb716f11af8427b6295c3f44c0c43419d3") (:authors ("Ryan C. Thompson")) (:maintainer "Ryan C. Thompson") (:keywords "convenience" "osx" "mac") (:url . "https://github.com/DarwinAwardWinner/osx-pseudo-daemon"))]) (maces-game . [(20170903 1551) ((dash (2 12 0)) (cl-lib (0 5)) (emacs (24))) "another anagram game." tar ((:commit . "c0fb795f5642467ea528d2f04d904547e8a77ecd") (:authors ("Pawel Bokota" . "pawelb.lnx@gmail.com")) (:maintainer "Pawel Bokota" . "pawelb.lnx@gmail.com") (:keywords "games" "word games" "anagram") (:url . "https://github.com/pawelbx/anagram-game"))]) - (macports . [(20220509 1326) ((emacs (25 1)) (transient (0 1 0))) "A porcelain for MacPorts" tar ((:commit . "114fc87055a27a4f21901397b4418c018f293e1d") (:authors ("Aaron Madlon-Kay")) (:maintainer "Aaron Madlon-Kay") (:keywords "convenience") (:url . "https://github.com/amake/macports.el"))]) + (macports . [(20220512 1330) ((emacs (25 1)) (transient (0 1 0))) "A porcelain for MacPorts" tar ((:commit . "36f0702ea22c929ab84ef40a3364a6b635762008") (:authors ("Aaron Madlon-Kay")) (:maintainer "Aaron Madlon-Kay") (:keywords "convenience") (:url . "https://github.com/amake/macports.el"))]) (macro-math . [(20130328 1604) nil "in-buffer mathematical operations" single ((:commit . "216e59371e9ee39c34117ba79b9acd78bb415750") (:authors ("Nikolaj Schumacher <bugs * nschum de>")) (:maintainer "Nikolaj Schumacher <bugs * nschum de>") (:keywords "convenience") (:url . "http://nschum.de/src/emacs/macro-math/"))]) (macrostep . [(20161120 2106) ((cl-lib (0 5))) "interactive macro expander" tar ((:commit . "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267") (:authors ("joddie" . "j.j.oddie@gmail.com")) (:maintainer "joddie" . "j.j.oddie@gmail.com") (:keywords "lisp" "languages" "macro" "debugging") (:url . "https://github.com/joddie/macrostep"))]) (macrostep-geiser . [(20210717 801) ((emacs (24 4)) (macrostep (0 9)) (geiser (0 12))) "Macrostep for `geiser'" single ((:commit . "f6a2d5bb96ade4f23df557649af87ebd0cc45125") (:authors ("Nikita Bloshchanevich")) (:maintainer "Nikita Bloshchanevich") (:keywords "languages" "scheme") (:url . "https://github.com/nbfalcon/macrostep-geiser"))]) @@ -2900,10 +2901,10 @@ (magic-filetype . [(20180219 1552) ((emacs (24)) (s (1 9 0))) "Enhance filetype major mode" single ((:commit . "019494add5ff02dd36cb3f500142fc51125522cc") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "emulations" "vim" "ft" "file" "magic-mode") (:url . "https://github.com/zonuexe/magic-filetype.el"))]) (magic-latex-buffer . [(20210306 422) ((cl-lib (0 5)) (emacs (25 1))) "Magically enhance LaTeX-mode font-locking for semi-WYSIWYG editing" single ((:commit . "903ec91872760e47c0e5715795f8465173615098") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://zk-phi.github.io/"))]) (magik-mode . [(20220422 837) nil "mode for editing Magik + some utils." tar ((:commit . "af1b83786c95d448dcb4df5406eb1cdba975abf5") (:keywords "languages") (:url . "http://github.com/roadrunner1776/magik"))]) - (magit . [(20220508 1841) ((emacs (25 1)) (compat (28 1 1 0)) (dash (20210826)) (git-commit (20220222)) (magit-section (20220325)) (transient (20220325)) (with-editor (20220318))) "A Git porcelain inside Emacs." tar ((:commit . "125a8d5e417dda4438ce41d71a821d8a936fa5ea") (:authors ("Marius Vollmer" . "marius.vollmer@gmail.com") ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) + (magit . [(20220516 2019) ((emacs (25 1)) (compat (28 1 1 0)) (dash (20210826)) (git-commit (20220222)) (magit-section (20220325)) (transient (20220325)) (with-editor (20220318))) "A Git porcelain inside Emacs." tar ((:commit . "5a7519fd3d56522b1c6a1601a12ae0f4717c26a7") (:authors ("Marius Vollmer" . "marius.vollmer@gmail.com") ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) (magit-annex . [(20220302 1725) ((cl-lib (0 3)) (magit (3 0 0))) "Control git-annex from Magit" single ((:commit . "efe484644666c6b7c544b0fb7b87e30703fa9425") (:authors ("Kyle Meyer" . "kyle@kyleam.com") ("Rémi Vanicat" . "vanicat@debian.org")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-annex"))]) (magit-circleci . [(20191209 2113) ((dash (2 16 0)) (transient (0 1 0)) (magit (2 90 0)) (emacs (25 3))) "CircleCI integration for Magit" single ((:commit . "2d4bdacf498ed3ff7d2c3574d346b2d24cbb12da") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "circleci" "continuous" "integration" "magit" "vc" "tools") (:url . "https://github.com/abrochard/magit-circleci"))]) - (magit-commit-mark . [(20220507 1118) ((emacs (28 1)) (magit (3 3 0))) "Support marking commits as read" single ((:commit . "bea29dc0419122b5dbc68b6b56cb0fbe97729e2d") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-magit-commit-mark"))]) + (magit-commit-mark . [(20220511 2341) ((emacs (28 1)) (magit (3 3 0))) "Support marking commits as read" single ((:commit . "ce2cd6daeb46eaea597a3b2c9d9ead80da9f0d09") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-magit-commit-mark"))]) (magit-delta . [(20220125 50) ((emacs (25 1)) (magit (20200426)) (xterm-color (2 0))) "Use Delta when displaying diffs in Magit" single ((:commit . "5fc7dbddcfacfe46d3fd876172ad02a9ab6ac616") (:authors ("Dan Davison" . "dandavison7@gmail.com")) (:maintainer "Dan Davison" . "dandavison7@gmail.com") (:url . "https://github.com/dandavison/magit-delta"))]) (magit-diff-flycheck . [(20190524 551) ((magit (2)) (flycheck (31)) (seq (2)) (emacs (25 1))) "Report errors in diffs" single ((:commit . "28acf74f59e385865746cccf4b1e4c4025ae9433") (:authors ("Alex Ragone" . "ragonedk@gmail.com")) (:maintainer "Alex Ragone" . "ragonedk@gmail.com") (:keywords "convenience" "matching") (:url . "https://github.com/ragone/magit-diff-flycheck"))]) (magit-filenotify . [(20151116 2340) ((magit (1 3 0)) (emacs (24 4))) "Refresh status buffer when git tree changes" single ((:commit . "c0865b3c41af20b6cd89de23d3b0beb54c8401a4") (:authors ("Rüdiger Sonderfeld" . "ruediger@c-plusplus.de")) (:maintainer "Rüdiger Sonderfeld" . "ruediger@c-plusplus.de") (:keywords "tools"))]) @@ -2913,13 +2914,13 @@ (magit-gitflow . [(20170929 824) ((magit (2 1 0)) (magit-popup (2 2 0))) "gitflow extension for magit" single ((:commit . "cc41b561ec6eea947fe9a176349fb4f771ed865b") (:authors ("Jan Tatarik" . "Jan.Tatarik@gmail.com")) (:maintainer "Jan Tatarik" . "Jan.Tatarik@gmail.com") (:keywords "vc" "tools") (:url . "https://github.com/jtatarik/magit-gitflow"))]) (magit-imerge . [(20220306 2311) ((emacs (25 1)) (magit (3 0 0))) "Magit extension for git-imerge" single ((:commit . "37bca48218dc32cad964e01e0f9936a90f634fba") (:authors ("Kyle Meyer" . "kyle@kyleam.com")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-imerge"))]) (magit-lfs . [(20220314 1957) ((emacs (24 4)) (magit (2 10 3)) (dash (2 13 0))) "Magit plugin for Git LFS" single ((:commit . "8ebe246f20f4ab5c9f191c38137833c7f01a0432") (:authors ("Junyoung/Clare Jang" . "jjc9310@gmail.com")) (:maintainer "Junyoung/Clare Jang" . "jjc9310@gmail.com") (:keywords "magit" "git" "lfs" "tools" "vc") (:url . "https://github.com/ailrun/magit-lfs"))]) - (magit-libgit . [(20220429 1720) ((emacs (25 1)) (compat (28 1 1 0)) (libgit (0)) (magit (20211004))) "(POC) Teach Magit to use Libgit2." tar ((:commit . "125a8d5e417dda4438ce41d71a821d8a936fa5ea") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) + (magit-libgit . [(20220429 1720) ((emacs (25 1)) (compat (28 1 1 0)) (libgit (0)) (magit (20211004))) "(POC) Teach Magit to use Libgit2." tar ((:commit . "5a7519fd3d56522b1c6a1601a12ae0f4717c26a7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))]) (magit-org-todos . [(20180709 1950) ((magit (2 0 0)) (emacs (24))) "Add local todo items to the magit status buffer" single ((:commit . "9ffa3efb098434d837cab4bacd1601fdfc6fe999") (:authors ("Daniel Ma")) (:maintainer "Daniel Ma") (:keywords "org-mode" "magit" "tools") (:url . "http://github.com/danielma/magit-org-todos"))]) (magit-patch-changelog . [(20220313 1229) ((emacs (25 1)) (magit (3 3 0))) "Generate a patch according to emacs-mirror/CONTRIBUTE" single ((:commit . "96936d2bd92c8bbf87f65bc293f3246014bc2764") (:keywords "git" "tools" "vc") (:url . "https://github.com/dickmao/magit-patch-changelog"))]) (magit-popup . [(20200719 1015) ((emacs (24 4)) (dash (2 13 0))) "Define prefix-infix-suffix command combos" tar ((:commit . "d8585fa39f88956963d877b921322530257ba9f5") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "bindings") (:url . "https://github.com/magit/magit-popup"))]) (magit-rbr . [(20181009 2016) ((magit (2 13 0)) (emacs (24 3))) "Support for git rbr in Magit" single ((:commit . "029203b3e48537205052a058e964f058cd802c3c") (:authors ("Anatoly Fayngelerin" . "fanatoly+magitrbr@gmail.com")) (:maintainer "Anatoly Fayngelerin" . "fanatoly+magitrbr@gmail.com") (:keywords "git" "magit" "rbr" "tools") (:url . "https://github.com/fanatoly/magit-rbr"))]) (magit-reviewboard . [(20200727 1748) ((emacs (25 2)) (magit (2 13 0)) (s (1 12 0)) (request (0 3 0))) "Show open Reviewboard reviews in Magit" single ((:commit . "aceedff88921f1dfef8a6b2fb18fe316fb7223a8") (:authors ("Jules Tamagnan" . "jtamagnan@gmail.com")) (:maintainer "Jules Tamagnan" . "jtamagnan@gmail.com") (:keywords "magit" "vc") (:url . "http://github.com/jtamagnan/magit-reviewboard"))]) - (magit-section . [(20220506 1936) ((emacs (25 1)) (compat (28 1 1 0)) (dash (20210826))) "Sections for read-only buffers." tar ((:commit . "125a8d5e417dda4438ce41d71a821d8a936fa5ea") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/magit/magit"))]) + (magit-section . [(20220513 1429) ((emacs (25 1)) (compat (28 1 1 0)) (dash (20210826))) "Sections for read-only buffers." tar ((:commit . "5a7519fd3d56522b1c6a1601a12ae0f4717c26a7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/magit/magit"))]) (magit-svn . [(20210426 2114) ((emacs (25 1)) (magit (2 90 1)) (transient (0 3 2))) "Git-Svn extension for Magit" single ((:commit . "350493217afdb7637564e089f475909adecd9208") (:authors ("Phil Jackson" . "phil@shellarchive.co.uk")) (:maintainer "Phil Jackson" . "phil@shellarchive.co.uk") (:keywords "vc" "tools"))]) (magit-tbdiff . [(20220306 2311) ((emacs (25 1)) (magit (3 0 0))) "Magit extension for range diffs" single ((:commit . "ae9345d867539a4c5c635be04df2e26468444da8") (:authors ("Kyle Meyer" . "kyle@kyleam.com")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-tbdiff"))]) (magit-todos . [(20220326 519) ((emacs (25 2)) (async (1 9 2)) (dash (2 13 0)) (f (0 17 2)) (hl-todo (1 9 0)) (magit (2 13 0)) (pcre2el (1 8)) (s (1 12 0)) (transient (0 2 0))) "Show source file TODOs in Magit" single ((:commit . "67fd80c2f10aec4d5b2a24b5d3d53c08cc1f05dc") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "magit" "vc") (:url . "http://github.com/alphapapa/magit-todos"))]) @@ -2954,7 +2955,7 @@ (mark-thing-at . [(20201219 231) ((emacs (26)) (choice-program (0 13))) "Mark a pattern at the current point" single ((:commit . "a622d128afc8d2d67de897666a1e2eccba8d7818") (:authors ("Paul Landes")) (:maintainer "Paul Landes") (:keywords "mark" "point" "lisp") (:url . "https://github.com/plandes/mark-thing-at"))]) (mark-tools . [(20130614 1025) nil "Some simple tools to access the mark-ring in Emacs" single ((:commit . "a11b61effa90bd0abc876d12573674d36fc17f0c") (:authors ("Alex Bennée" . "alex@bennee.com")) (:maintainer "Alex Bennée" . "alex@bennee.com") (:url . "https://github.com/stsquad/emacs-mark-tools"))]) (markdown-changelog . [(20200120 2253) ((emacs (26)) (dash (2 13 0))) "Maintain changelog entries" single ((:commit . "1a2c3a4c3e4196f2b5dbb145b01b4bc435a93a96") (:authors ("Paul Landes")) (:maintainer "Paul Landes") (:keywords "markdown" "changelog" "files") (:url . "https://github.com/plandes/markdown-changelog"))]) - (markdown-mode . [(20220508 1219) ((emacs (26 1))) "Major mode for Markdown-formatted text" single ((:commit . "5b6e660c13ca3f4d15dbc1aa3d7ab2f228491ef9") (:authors ("Jason R. Blevins" . "jblevins@xbeta.org")) (:maintainer "Jason R. Blevins" . "jblevins@xbeta.org") (:keywords "markdown" "github flavored markdown" "itex") (:url . "https://jblevins.org/projects/markdown-mode/"))]) + (markdown-mode . [(20220513 1453) ((emacs (26 1))) "Major mode for Markdown-formatted text" single ((:commit . "4477f381de0068a04b55e198c32614793f67b38a") (:authors ("Jason R. Blevins" . "jblevins@xbeta.org")) (:maintainer "Jason R. Blevins" . "jblevins@xbeta.org") (:keywords "markdown" "github flavored markdown" "itex") (:url . "https://jblevins.org/projects/markdown-mode/"))]) (markdown-preview-eww . [(20160111 1502) ((emacs (24 4))) "Realtime preview by eww" single ((:commit . "5853f836425c877c8a956501f0adda137ef1d3b7") (:authors ("niku" . "niku@niku.name")) (:maintainer "niku" . "niku@niku.name") (:url . "https://github.com/niku/markdown-preview-eww"))]) (markdown-preview-mode . [(20210516 936) ((emacs (24 4)) (websocket (1 6)) (markdown-mode (2 0)) (cl-lib (0 5)) (web-server (0 1 1))) "markdown realtime preview minor mode." tar ((:commit . "dde87b96de9e81dd01d174da67ef68687b3a5eb5") (:authors ("Igor Shymko" . "igor.shimko@gmail.com")) (:maintainer "Igor Shymko" . "igor.shimko@gmail.com") (:keywords "markdown" "gfm" "convenience") (:url . "https://github.com/ancane/markdown-preview-mode"))]) (markdown-toc . [(20210905 738) ((s (1 9 0)) (dash (2 11 0)) (markdown-mode (2 1))) "A simple TOC generator for markdown file" tar ((:commit . "3d724e518a897343b5ede0b976d6fb46c46bcc01") (:authors (nil . "Antoine R. Dumont (@ardumont)")) (:maintainer nil . "Antoine R. Dumont (@ardumont)") (:keywords "markdown" "toc" "tools") (:url . "http://github.com/ardumont/markdown-toc"))]) @@ -2967,9 +2968,9 @@ (marshal . [(20201223 1853) ((emacs (25 1)) (ht (2 0))) "eieio extension for automatic (un)marshalling" single ((:commit . "490496d974d03906f784707ecc2e0ac36ed84b96") (:authors ("Yann Hodique" . "yann.hodique@gmail.com")) (:maintainer "Yann Hodique" . "yann.hodique@gmail.com") (:keywords "extensions") (:url . "https://github.com/sigma/marshal.el"))]) (maruo-macro-mode . [(20160616 1349) ((emacs (24 3))) "Major mode for editing Hidemaru/Maruo macro script" single ((:commit . "8fc9a38ad051eafa8eb94038711acc52c5d1d8d5") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "programming" "editor" "macro"))]) (masm-mode . [(20200308 1450) ((emacs (25 1))) "MASM x86 and x64 assembly major mode" single ((:commit . "626b9255c2bb967a53d1d50be0b98a1bcae3250c") (:authors ("YiGeeker" . "zyfchinese@yeah.net")) (:maintainer "YiGeeker" . "zyfchinese@yeah.net") (:keywords "languages") (:url . "https://github.com/YiGeeker/masm-mode"))]) - (mastodon . [(20220405 1531) ((emacs (27 1)) (request (0 3 2)) (seq (1 0))) "Client for Mastodon" tar ((:commit . "e5ff349d23c71a521db41dcdb1ac9765bac5388f") (:authors ("Johnson Denen" . "johnson.denen@gmail.com")) (:maintainer "Marty Hiatt" . "martianhiatus@riseup.net") (:url . "https://codeberg.org/martianh/mastodon.el"))]) + (mastodon . [(20220513 1124) ((emacs (27 1)) (request (0 3 2)) (seq (1 0))) "Client for Mastodon" tar ((:commit . "4ab5a4bb8d603b189a99cc4a4eea4c42e8f97cf0") (:authors ("Johnson Denen" . "johnson.denen@gmail.com")) (:maintainer "Marty Hiatt" . "martianhiatus@riseup.net") (:url . "https://codeberg.org/martianh/mastodon.el"))]) (material-theme . [(20210904 1226) ((emacs (24 1))) "A Theme based on the colors of the Google Material Design" tar ((:commit . "6823009bc92f82aa3a90e27e1009f7da8e87b648") (:authors ("Christoph Paulik" . "cpaulik@gmail.com")) (:maintainer "Christoph Paulik" . "cpaulik@gmail.com") (:keywords "themes") (:url . "http://github.com/cpaulik/emacs-material-theme"))]) - (math-preview . [(20211221 1611) ((emacs (26 1)) (dash (2 18 0)) (s (1 12 0))) "Preview TeX math equations inline" single ((:commit . "75dd44ad8dcfa12fe03f8e65babe0ea04e1a7d1a") (:authors ("Matsievskiy S.V.")) (:maintainer "Matsievskiy S.V.") (:keywords "convenience") (:url . "https://gitlab.com/matsievskiysv/math-preview"))]) + (math-preview . [(20220512 1853) ((emacs (26 1)) (json (1 5)) (dash (2 18 0)) (s (1 12 0))) "Preview TeX math equations inline" single ((:commit . "0f0b2315d23e5d18b627c9faa8f231f175b728a0") (:authors ("Matsievskiy S.V.")) (:maintainer "Matsievskiy S.V.") (:keywords "convenience") (:url . "https://gitlab.com/matsievskiysv/math-preview"))]) (math-symbol-lists . [(20200131 2338) nil "Lists of Unicode math symbols and latex commands" tar ((:commit . "590d9f09f8ad9aab747b97f077396a2035dcf50f") (:authors ("Vitalie Spinu" . "spinuvit@gmail.com")) (:maintainer "Vitalie Spinu" . "spinuvit@gmail.com") (:keywords "unicode" "symbols" "mathematics") (:url . "https://github.com/vspinu/math-symbol-lists"))]) (math-symbols . [(20201005 2313) nil "Math Symbol Input methods and conversion tools" tar ((:commit . "091b81cb40ceaff97614999ffe85b572ace182f0") (:authors ("KAWABATA, Taichi <kawabata.taichi_at_gmail.com>")) (:maintainer "KAWABATA, Taichi <kawabata.taichi_at_gmail.com>") (:keywords "i18n" "languages" "tex") (:url . "https://github.com/kawabata/math-symbols"))]) (matlab-mode . [(20220412 913) nil "Major mode for MATLAB(R) dot-m files" tar ((:commit . "5069e3ca0034e0da64eb9b3cd426f52992938d06"))]) @@ -2993,12 +2994,12 @@ (memoize . [(20200103 2036) nil "Memoization functions" single ((:commit . "51b075935ca7070f62fae1d69fe0ff7d8fa56fdd") (:authors ("Christopher Wellons" . "mosquitopsu@gmail.com")) (:maintainer "Christopher Wellons" . "mosquitopsu@gmail.com") (:url . "https://github.com/skeeto/emacs-memoize"))]) (memolist . [(20150804 1721) ((markdown-mode (22 0)) (ag (0 45))) "memolist.el is Emacs port of memolist.vim." single ((:commit . "c437a32d3955f859d9bbcbadf0911bbe27d877ff") (:authors ("mikanfactory <k952i4j14x17_at_gmail.com>")) (:maintainer "mikanfactory") (:keywords "markdown" "memo") (:url . "http://github.com/mikanfactory/emacs-memolist"))]) (mentor . [(20220113 2136) ((emacs (25 1)) (xml-rpc (1 6 15)) (seq (1 11)) (async (1 9 3))) "Frontend for the rTorrent bittorrent client" tar ((:commit . "afab3a14a4bfb5117f8e25417fdf151611b3df0b") (:authors ("Stefan Kangas" . "stefankangas@gmail.com")) (:maintainer "Stefan Kangas" . "stefankangas@gmail.com") (:keywords "comm" "processes" "bittorrent") (:url . "https://github.com/skangas/mentor"))]) - (meow . [(20220501 1918) ((emacs (27 1))) "Yet Another modal editing" tar ((:commit . "72d6ff36b62a57aa9c9dbfbd44cdb3002a0e940a") (:authors ("Shi Tianshu")) (:maintainer "Shi Tianshu") (:keywords "convenience" "modal-editing") (:url . "https://www.github.com/DogLooksGood/meow"))]) - (merlin . [(20220502 811) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "49324b4fdc14987164ed7a3a8c3681df5b4866ee") (:authors ("Frédéric Bour <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))]) - (merlin-ac . [(20210615 1208) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "49324b4fdc14987164ed7a3a8c3681df5b4866ee") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) - (merlin-company . [(20210615 1208) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "49324b4fdc14987164ed7a3a8c3681df5b4866ee") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (meow . [(20220515 2054) ((emacs (27 1))) "Yet Another modal editing" tar ((:commit . "b6db7f35d4a664e1e175318e96982fa3688f8264") (:authors ("Shi Tianshu")) (:maintainer "Shi Tianshu") (:keywords "convenience" "modal-editing") (:url . "https://www.github.com/DogLooksGood/meow"))]) + (merlin . [(20220502 811) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "3fb8e7df31e63918e7e230a8142b720c035e86d9") (:authors ("Frédéric Bour <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))]) + (merlin-ac . [(20210615 1208) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "3fb8e7df31e63918e7e230a8142b720c035e86d9") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (merlin-company . [(20210615 1208) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "3fb8e7df31e63918e7e230a8142b720c035e86d9") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) (merlin-eldoc . [(20190830 517) ((emacs (24 4)) (merlin (3 0))) "eldoc for OCaml and Reason" single ((:commit . "db7fab1eddfe34781b7e79694f8923b285698032") (:authors ("Louis Roché" . "louis@louisroche.net")) (:maintainer "Louis Roché" . "louis@louisroche.net") (:keywords "merlin" "ocaml" "languages" "eldoc") (:url . "https://github.com/khady/merlin-eldoc"))]) - (merlin-iedit . [(20220330 1736) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "49324b4fdc14987164ed7a3a8c3681df5b4866ee") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) + (merlin-iedit . [(20220330 1736) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "3fb8e7df31e63918e7e230a8142b720c035e86d9") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))]) (mermaid-mode . [(20220426 1631) ((f (0 20 0)) (emacs (25 3))) "major mode for working with mermaid graphs" single ((:commit . "1a6526bc68561b7da6a612152b842a41ffb0aa09") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "mermaid" "graphs" "tools" "processes") (:url . "https://github.com/abrochard/mermaid-mode"))]) (meson-mode . [(20210820 905) ((emacs (26 1))) "Major mode for the Meson build system files" tar ((:commit . "1a2e2abb098c9288c2cdb3affbad76edd98abf59") (:authors ("Michal Sojka" . "sojkam1@fel.cvut.cz")) (:maintainer "Michal Sojka" . "sojkam1@fel.cvut.cz") (:keywords "languages" "tools") (:url . "https://github.com/wentasah/meson-mode"))]) (message-attachment-reminder . [(20200428 124) ((emacs (24 1))) "Remind if missing attachment" single ((:commit . "ce506b27b15cc39a47c58ff795026eaea8632e2f") (:authors ("Alex Murray" . "murray.alex@gmail.com")) (:maintainer "Alex Murray" . "murray.alex@gmail.com") (:url . "https://github.com/alexmurray/message-attachment-reminder"))]) @@ -3016,7 +3017,7 @@ (mew . [(20210625 240) nil "Messaging in the Emacs World" tar ((:commit . "fc4bca6d95d8b8d5e169ecf1433d968c2eec299d") (:authors ("Kazu Yamamoto" . "Kazu@Mew.org")) (:maintainer "Kazu Yamamoto" . "Kazu@Mew.org"))]) (mexican-holidays . [(20210604 1421) nil "Mexico holidays for Emacs calendar." single ((:commit . "8e28907ea69f2c0ed9aad9f3b99664ca147379d0") (:authors ("Saúl Gutiérrez" . "me@sggc.me")) (:maintainer "Saúl Gutiérrez" . "me@sggc.me") (:keywords "calendar") (:url . "https://github.com/sggutier/mexican-holidays"))]) (meyvn . [(20211025 106) ((emacs (25 1)) (cider (0 23)) (projectile (2 1)) (s (1 12)) (dash (2 17)) (parseedn (0 1 0)) (geiser (0 12))) "Meyvn client" single ((:commit . "80ece19a6ce6fd3dac374911edb9734286978450") (:authors ("Daniel Szmulewicz" . "daniel.szmulewicz@gmail.com")) (:maintainer "Daniel Szmulewicz" . "daniel.szmulewicz@gmail.com") (:url . "https://github.com/danielsz/meyvn-el"))]) - (mgmtconfig-mode . [(20210131 2152) ((emacs (24 3))) "mgmt configuration management language" single ((:commit . "b26f842de19a31c36fb5149f292b9117dbf4bed7") (:authors ("Peter Oliver" . "mgmtconfig@mavit.org.uk")) (:maintainer "Mgmt contributors <https://github.com/purpleidea/mgmt>") (:keywords "languages") (:url . "https://github.com/purpleidea/mgmt/misc/emacs"))]) + (mgmtconfig-mode . [(20210131 2152) ((emacs (24 3))) "mgmt configuration management language" single ((:commit . "00f6045b1292d23a0579208521a470d685bdc59f") (:authors ("Peter Oliver" . "mgmtconfig@mavit.org.uk")) (:maintainer "Mgmt contributors <https://github.com/purpleidea/mgmt>") (:keywords "languages") (:url . "https://github.com/purpleidea/mgmt/misc/emacs"))]) (mhc . [(20201227 406) ((calfw (20150703))) "Message Harmonized Calendaring system." tar ((:commit . "67f9596dcd43b7ece3ab6e7a6ce8dc18a4851fe8") (:authors ("Yoshinari Nomura" . "nom@quickhack.net")) (:maintainer "Yoshinari Nomura" . "nom@quickhack.net") (:keywords "calendar") (:url . "http://www.quickhack.net/mhc"))]) (mic-paren . [(20170731 1907) nil "advanced highlighting of matching parentheses" single ((:commit . "d0410c7d805c9aaf51a1bcefaaef092bed5824c4") (:authors ("Mikael Sjödin" . "mic@docs.uu.se") ("Klaus Berndl " . "berndl@sdm.de") ("Jonathan Kotta" . "jpkotta@gmail.com")) (:maintainer "ttn") (:keywords "languages" "faces" "parenthesis" "matching"))]) (micgoline . [(20160415 326) ((emacs (24 3)) (powerline (2 3))) "powerline mode, color schemes from microsoft and google's logo." single ((:commit . "837504263bb1711203b0f7efecd6b7b5f272fae0") (:authors ("yzprofile" . "yzprofiles@gmail.com")) (:maintainer "yzprofile" . "yzprofiles@gmail.com") (:keywords "mode-line" "powerline" "theme") (:url . "https://github.com/yzprofile/micgoline"))]) @@ -3066,7 +3067,7 @@ (modern-sh . [(20211101 1001) ((emacs (25 1)) (hydra (0 15 0)) (eval-in-repl (0 9 7))) "Minor mode for editing shell script" single ((:commit . "8ebebe77304aa8170f7af809e7564c79d3bd45da") (:keywords "languages" "programming") (:url . "https://github.com/damon-kwok/modern-sh"))]) (modtime-skip-mode . [(20140128 2201) nil "Minor mode for disabling modtime and supersession checks on files." single ((:commit . "c0e49523aa26b2263a8693691ac775988015f592") (:authors ("Jordon Biondo" . "biondoj@mail.gvsu.edu")) (:maintainer "Jordon Biondo" . "biondoj@mail.gvsu.edu") (:url . "http://www.github.com/jordonbiondo/modtime-skip-mode"))]) (modular-config . [(20210726 1614) ((emacs (25 1))) "Organize your config into small and loadable modules" single ((:commit . "2bd77193fa3a7ec0541db284b4034821a8f59fea") (:authors ("Sidharth Arya" . "sidhartharya10@gmail.com")) (:maintainer "Sidharth Arya" . "sidhartharya10@gmail.com") (:keywords "startup" "lisp" "tools") (:url . "https://github.com/SidharthArya/modular-config.el"))]) - (modus-themes . [(20220510 332) ((emacs (27 1))) "Elegant, highly legible and customizable themes" tar ((:commit . "6117ec171bdfb3df5e5d43e8995bdbbd23267ae3") (:authors ("Protesilaos Stavrou" . "info@protesilaos.com")) (:maintainer "Protesilaos Stavrou" . "info@protesilaos.com") (:keywords "faces" "theme" "accessibility") (:url . "https://git.sr.ht/~protesilaos/modus-themes"))]) + (modus-themes . [(20220512 1808) ((emacs (27 1))) "Elegant, highly legible and customizable themes" tar ((:commit . "b6285162d80fe438b4ac99acff74d33b5f901c35") (:authors ("Protesilaos Stavrou" . "info@protesilaos.com")) (:maintainer "Protesilaos Stavrou" . "info@protesilaos.com") (:keywords "faces" "theme" "accessibility") (:url . "https://git.sr.ht/~protesilaos/modus-themes"))]) (moe-theme . [(20220111 1220) nil "A colorful eye-candy theme. Moe, moe, kyun!" tar ((:commit . "edf3fe47fb986e283e3b04cba443dcb39fe8720e") (:authors ("kuanyui" . "azazabc123@gmail.com")) (:maintainer "kuanyui" . "azazabc123@gmail.com") (:keywords "themes") (:url . "https://github.com/kuanyui/moe-theme.el"))]) (molar-mass . [(20210519 1342) ((emacs (24 3))) "Calculates molar mass of a molecule" single ((:commit . "838db1486a2dc5a3774eb195d62fbcdef71a63f7") (:authors ("Sergi Ruiz Trepat")) (:maintainer "Sergi Ruiz Trepat") (:keywords "convenience" "chemistry") (:url . "https://github.com/sergiruiztrepat/molar-mass.el"))]) (molecule . [(20180527 743) ((emacs (25 1))) "Simple wrapper for molecule" single ((:commit . "2ef72b81d9aa24ea782b71a061a3abdad6cae162") (:authors (": drymer <drymer [ AT ] autistici.org>")) (:maintainer ": drymer <drymer [ AT ] autistici.org>") (:keywords ":" "languages" "terminals") (:url . "https://git.daemons.it/drymer/molecule.el"))]) @@ -3097,7 +3098,7 @@ (move-dup . [(20210127 1938) ((emacs (25 1))) "Eclipse-like moving and duplicating lines or rectangles" single ((:commit . "5906503e0b9b832b1d5062c9cd27cf72a2ce4817") (:authors ("Jimmy Yuen Ho Wong" . "wyuenho@gmail.com")) (:maintainer "Jimmy Yuen Ho Wong" . "wyuenho@gmail.com") (:keywords "convenience" "text" "edit") (:url . "https://github.com/wyuenho/move-dup"))]) (move-text . [(20170909 330) nil "Move current line or region with M-up or M-down." single ((:commit . "bfc255110ad05732a43cf25d6a0e3b4a6710b58c") (:authors ("Jason Milkins" . "jasonm23@gmail.com")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com") (:keywords "edit") (:url . "https://github.com/emacsfodder/move-text"))]) (mowedline . [(20161122 235) nil "elisp utilities for using mowedline" single ((:commit . "6121b7d4aacd18f7b24da226e61dbae054e50a7c") (:authors ("John Foerch" . "jjfoerch@earthlink.net")) (:maintainer "John Foerch" . "jjfoerch@earthlink.net"))]) - (mozc . [(20210306 1053) nil "minor mode to input Japanese with Mozc" single ((:commit . "247db142f7251062978ade3fd27c815259eaa05b") (:keywords "mule" "multilingual" "input method"))]) + (mozc . [(20210306 1053) nil "minor mode to input Japanese with Mozc" single ((:commit . "88448f4cd39e2c6aeff9b13caf6d01af1230d61a") (:keywords "mule" "multilingual" "input method"))]) (mozc-cand-posframe . [(20200208 750) ((emacs (26 1)) (posframe (0 5 0)) (mozc (20180101 800)) (s (1 12))) "Posframe frontend for mozc.el" single ((:commit . "1d07d5055381008ccbb29b97315d140e09a7ee95") (:authors ("Akira Komamura" . "akira.komamura@gmail.com")) (:maintainer "Akira Komamura" . "akira.komamura@gmail.com") (:keywords "i18n" "tooltip") (:url . "https://github.com/akirak/mozc-posframe"))]) (mozc-im . [(20160412 22) ((mozc (0))) "Mozc with input-method-function interface." single ((:commit . "df614a1076c28a11551fb3e822868bae47e855a5") (:authors ("Daisuke Kobayashi" . "d5884jp@gmail.com")) (:maintainer "Daisuke Kobayashi" . "d5884jp@gmail.com") (:keywords "i18n" "extentions"))]) (mozc-popup . [(20150224 34) ((popup (0 5 2)) (mozc (0))) "Mozc with popup" single ((:commit . "f0684b875a7427ec08f8df13939a486e5d5cf420") (:authors ("Daisuke Kobayashi" . "d5884jp@gmail.com")) (:maintainer "Daisuke Kobayashi" . "d5884jp@gmail.com") (:keywords "i18n" "extentions"))]) @@ -3184,7 +3185,7 @@ (ncl-mode . [(20180129 703) ((emacs (24))) "Major Mode for editing NCL scripts and other goodies" tar ((:commit . "602292712a9e6b7e7c25155978999e77d06b7338") (:authors ("Yagnesh Raghava Yakkala" . "hi@yagnesh.org")) (:maintainer "Yagnesh Raghava Yakkala" . "hi@yagnesh.org") (:keywords "ncl" "major mode" "ncl-mode" "atmospheric science.") (:url . "https://github.com/yyr/ncl-mode"))]) (nclip . [(20130617 2015) nil "Network (HTTP) Clipboard" tar ((:commit . "af88e38b1f04be02bf2e57affc662dbd0f828e67") (:authors ("Marian Schubert" . "marian.schubert@gmail.com")) (:maintainer "Marian Schubert" . "marian.schubert@gmail.com") (:keywords "nclip" "clipboard" "network") (:url . "http://www.github.com/maio/nclip.el"))]) (neato-graph-bar . [(20181130 1649) ((emacs (24 3))) "Neat-o graph bars CPU/memory etc." single ((:commit . "a7ae35afd67911e8924f36e646bce0d3e3c1bbe6") (:authors ("Robert Cochran" . "robert-git@cochranmail.com")) (:maintainer "Robert Cochran" . "robert-git@cochranmail.com") (:url . "https://gitlab.com/RobertCochran/neato-graph-bar"))]) - (neil . [(20220501 2053) ((emacs (27 1))) "companion for Babashka Neil" single ((:commit . "239c16655431b27ee558bf250bece4f4b10a0e83") (:authors ("Ag Ibragimov" . "agzam.ibragimov@gmail.com")) (:maintainer "Ag Ibragimov" . "agzam.ibragimov@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/babashka/neil"))]) + (neil . [(20220514 2039) ((emacs (27 1))) "companion for Babashka Neil" single ((:commit . "17ed64da0782a3f469853464901dba2316759ab1") (:authors ("Ag Ibragimov" . "agzam.ibragimov@gmail.com")) (:maintainer "Ag Ibragimov" . "agzam.ibragimov@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/babashka/neil"))]) (nemerle . [(20161029 2023) nil "major mode for editing nemerle programs" single ((:commit . "db4bc9078f1b6238da32df1519c1957e74b6834a") (:authors ("Jacek Sliwerski (rzyjontko)" . "rzyj@o2.pl")) (:maintainer "Jacek Sliwerski (rzyjontko)" . "rzyj@o2.pl") (:keywords "nemerle" "mode" "languages"))]) (neon-mode . [(20180406 1156) nil "Simple major mode for editing neon files" single ((:commit . "99d15e46beaf1e7d71e39a00cce810df1f33229d") (:authors ("Matúš Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matúš Goljer" . "matus.goljer@gmail.com") (:keywords "conf"))]) (neotree . [(20200324 1946) ((cl-lib (0 5))) "A tree plugin like NerdTree for Vim" tar ((:commit . "98fe21334affaffe2334bf7c987edaf1980d2d0b") (:authors ("jaypei" . "jaypei97159@gmail.com")) (:maintainer "jaypei" . "jaypei97159@gmail.com") (:url . "https://github.com/jaypei/emacs-neotree"))]) @@ -3207,8 +3208,8 @@ (nikki . [(20210227 1707) ((emacs (24 3))) "A simple diary mode" single ((:commit . "b2ea20d04a061df88d72bd8dd0412a6e7876458d") (:authors ("Taiki Harada" . "thdev994@gmail.com")) (:maintainer "Taiki Harada" . "thdev994@gmail.com") (:keywords "convenience") (:url . "https://github.com/th994/nikki"))]) (nikola . [(20170703 2021) ((async (1 5)) (emacs (24 3))) "Simple wrapper for nikola" single ((:commit . "964715ac30943c9d6976999cad208dc60d09def0") (:authors (": drymer <drymer [ AT ] autistici.org>")) (:maintainer ": drymer <drymer [ AT ] autistici.org>") (:keywords ":" "nikola") (:url . ": https://git.daemons.it/drymer/nikola.el"))]) (nim-mode . [(20211102 917) ((emacs (24 4)) (epc (0 1 1)) (let-alist (1 0 1)) (commenter (0 5 1)) (flycheck-nimsuggest (0 8 1))) "A major mode for the Nim programming language" tar ((:commit . "744e076f0bea1c5ddc49f92397d9aa98ffa7eff8") (:authors ("Simon Hafner")) (:maintainer "Simon Hafner" . "hafnersimon@gmail.com") (:keywords "nim" "languages"))]) - (nimbus-theme . [(20220106 2017) ((emacs (24 1))) "An awesome dark theme" single ((:commit . "f9bcec4ce0f6cd656a56034ace7811dea769a7bb") (:authors ("Marcin Swieczkowski" . "marcin.swieczkowski@gmail.com") ("See README.md for full list of contributors.")) (:maintainer "Marcin Swieczkowski" . "marcin.swieczkowski@gmail.com") (:keywords "faces") (:url . "https://github.com/m-cat/nimbus-theme"))]) - (ninja-mode . [(20181024 1439) ((emacs (24))) "Major mode for editing .ninja files" single ((:commit . "7905dee5ac62f7a1e0dfec4d936b97d96c7566d7"))]) + (nimbus-theme . [(20220513 240) ((emacs (24 1))) "An awesome dark theme" single ((:commit . "958a92a979c88bee909d03a78b2faf6726d0069b") (:authors ("Marcin Swieczkowski" . "marcin.swieczkowski@gmail.com") ("See README.md for full list of contributors.")) (:maintainer "Marcin Swieczkowski" . "marcin.swieczkowski@gmail.com") (:keywords "faces") (:url . "https://github.com/m-cat/nimbus-theme"))]) + (ninja-mode . [(20181024 1439) ((emacs (24))) "Major mode for editing .ninja files" single ((:commit . "99c1bc7442ff3109c8b91fb98b4a252045623296"))]) (nix-buffer . [(20180212 1518) ((f (0 17 3)) (emacs (24 4))) "Set up buffer environments with nix" single ((:commit . "db57cda36e7477bdc7ef5a136357b971b1d4d099") (:authors ("Shea Levy")) (:maintainer "Shea Levy") (:url . "https://github.com/shlevy/nix-buffer/tree/master/"))]) (nix-env-install . [(20200812 1305) ((emacs (25 1))) "Install packages using nix-env" single ((:commit . "79c34bc117ba1cebeb67fab32c364951d2ec37a0") (:authors ("Akira Komamura" . "akira.komamura@gmail.com")) (:maintainer "Akira Komamura" . "akira.komamura@gmail.com") (:keywords "processes" "tools") (:url . "https://github.com/akirak/nix-env-install"))]) (nix-haskell-mode . [(20190615 135) ((emacs (25)) (haskell-mode (16 0)) (nix-mode (1 3 0))) "haskell-mode integrations for Nix" single ((:commit . "68efbcbf949a706ecca6409506968ed2ef928a20") (:authors ("Matthew Bauer" . "mjbauer95@gmail.com")) (:maintainer "Matthew Bauer" . "mjbauer95@gmail.com") (:keywords "nix" "haskell" "languages" "processes") (:url . "https://github.com/matthewbauer/nix-haskell"))]) @@ -3228,7 +3229,7 @@ (no-emoji . [(20180515 1837) ((emacs (24))) "Show :emoji-name: instead of emoji characters" single ((:commit . "ebceeab50dbfe4d60235180a57633745dbc18c77") (:authors ("Peter" . "craven@gmx.net")) (:maintainer "Peter" . "craven@gmx.net") (:keywords "extensions") (:url . "https://github.com/ecraven/no-emoji"))]) (no-littering . [(20220509 1733) ((emacs (25 1)) (compat (28 1 1 0))) "Help keeping ~/.emacs.d clean" single ((:commit . "fed46eb7060aca624bfe1a18f13b73f94e70f013") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "convenience") (:url . "https://github.com/emacscollective/no-littering"))]) (no-spam . [(20190724 1854) ((emacs (25 1))) "Add repeat delays to commands" single ((:commit . "860860e4a0d59bd15c8e092dc42f5f7f769a428e") (:authors ("Daniel Phan" . "daniel.phan36@gmail.com")) (:maintainer "Daniel Phan" . "daniel.phan36@gmail.com") (:keywords "keyboard" "tools") (:url . "https://github.com/mamapanda/no-spam"))]) - (noaa . [(20220509 1600) ((emacs (27 1)) (request (0 2 0)) (dash (2 14 1))) "Get NOAA weather data" single ((:commit . "507831164b09a2d769bd68d5a45608fc0de626dd") (:authors ("David Thompson")) (:maintainer "David Thompson") (:keywords "calendar") (:url . "https://github.com/thomp/noaa"))]) + (noaa . [(20220515 2359) ((emacs (27 1)) (request (0 2 0))) "Get NOAA weather data" single ((:commit . "1ebacdfbaa996319adf88a49258814c28ba49b1b") (:authors ("David Thompson")) (:maintainer "David Thompson") (:keywords "calendar") (:url . "https://github.com/thomp/noaa"))]) (noccur . [(20191015 719) nil "Run multi-occur on project/dired files" single ((:commit . "fa91647a305e89561d3dbe53da002fff49abe0bb") (:authors ("Nicolas Petton" . "petton.nicolas@gmail.com")) (:maintainer "Nicolas Petton" . "petton.nicolas@gmail.com") (:keywords "convenience"))]) (nocomments-mode . [(20170213 2037) nil "Minor mode that makes comments invisible." single ((:commit . "5a41a20cc44dfe4a9ea584354ed6dbc15dd92f46") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:url . "https://github.com/Lindydancer/nocomments-mode"))]) (noctilux-theme . [(20161113 1442) ((emacs (24))) "Dark theme inspired by LightTable" single ((:commit . "a3265a1be7f4d73f44acce6d968ca6f7add1f2ca") (:authors ("Simon Manning" . "simon@ecksdee.org")) (:maintainer "Simon Manning" . "simon@ecksdee.org") (:url . "https://github.com/sjrmanning/noctilux-theme"))]) @@ -3243,7 +3244,7 @@ (northcode-theme . [(20180423 1649) ((emacs (24))) "A dark theme focused on blue and orange colors." single ((:commit . "4d3750461ba25ec45321318b5f1af4e8fdf16147") (:authors ("Andreas Larsen" . "andreas@northcode.no")) (:maintainer "Andreas Larsen" . "andreas@northcode.no") (:url . "https://github.com/Northcode/northcode-theme.el"))]) (nothing-theme . [(20200504 402) ((emacs (24 1))) "Monochrome theme" single ((:commit . "d2514bb9707f66dda0d60f40f465e79914c50946") (:authors ("Jared Gorski," . "jaredgorski6@gmail.com")) (:maintainer "Jared Gorski," . "jaredgorski6@gmail.com") (:url . "https://github.com/jaredgorski/nothing.el"))]) (notink-theme . [(20220114 1955) ((emacs (26 1))) "A custom theme inspired by e-ink displays" single ((:commit . "6115857fe75c1adbbce4165a2b77a11a271aaf31") (:authors ("MetroWind" . "chris.corsair@gmail.com")) (:maintainer "MetroWind" . "chris.corsair@gmail.com") (:keywords "faces") (:url . "https://github.com/MetroWind/notink-theme"))]) - (notmuch . [(20220226 1200) nil "run notmuch within emacs" tar ((:commit . "37492858b61907e4728b2e68e67238c68e9a0d49") (:url . "https://notmuchmail.org"))]) + (notmuch . [(20220516 1012) nil "run notmuch within emacs" tar ((:commit . "90a7c1af368a527700dcde9b0dcbd760afc7bd92") (:url . "https://notmuchmail.org"))]) (notmuch-addr . [(20220422 1618) ((emacs (27 1)) (compat (28 1 1 0)) (notmuch (0 32))) "An alternative to notmuch-address.el" single ((:commit . "dd852b09415e755cef6a345a2ee454a6cf1e1d06") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "mail") (:url . "https://git.sr.ht/~tarsius/notmuch-addr"))]) (notmuch-bookmarks . [(20200322 1925) ((seq (2 20)) (emacs (26 1)) (notmuch (0 29 3))) "Add bookmark handling for notmuch buffers" single ((:commit . "ec8edfdbd1ac475530591d73a570ded5c18ed86a") (:authors ("Jörg Volbers" . "joerg@joergvolbers.de")) (:maintainer "Jörg Volbers" . "joerg@joergvolbers.de") (:keywords "mail") (:url . "https://github.com/publicimageltd/notmuch-bookmarks"))]) (notmuch-labeler . [(20131230 1719) ((notmuch (0))) "Improve notmuch way of displaying labels" tar ((:commit . "d65d1129555d368243df4770ecc1e7ccb88efc58") (:authors ("Damien Cassou" . "damien.cassou@gmail.com")) (:maintainer "Damien Cassou" . "damien.cassou@gmail.com") (:keywords "emacs" "package" "elisp" "notmuch" "emails") (:url . "https://github.com/DamienCassou/notmuch-labeler"))]) @@ -3275,10 +3276,10 @@ (nz-holidays . [(20190415 703) nil "New Zealand public holidays for calendar." single ((:commit . "afc875cf40789fa45a4a811685b0a7c4f239392f") (:authors ("Sod Oscarfono" . "sod@oscarfono.com")) (:maintainer "Sod Oscarfono" . "sod@oscarfono.com") (:keywords "calendar") (:url . "https://github.com/techquila/nz-holidays"))]) (oauth . [(20130128 151) nil "Oauth library." tar ((:commit . "ee4744ad76a1560281b0c4944575a3bd598c6458") (:authors ("Peter Sanford <peter AT petersdanceparty.com>")) (:maintainer "Peter Sanford <peter AT petersdanceparty.com>") (:keywords "comm"))]) (oauth2-request . [(20210215 657) ((emacs (26 1)) (oauth2 (0 14)) (request (0 3))) "OAuth2 request package interface" single ((:commit . "86ff048635e002b00e23d6bed2ec6f36c17bca8e") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/oauth2-request.el"))]) - (ob-ada-spark . [(20220401 926) ((emacs (26 1)) (f (0 20 0))) "Babel functions for Ada & SPARK" single ((:commit . "1213b877bc893ac5990a20052ea2bf2d8f086260") (:authors ("Francesc Rocher")) (:maintainer "Francesc Rocher") (:keywords "languages" "tools" "outlines") (:url . "https://github.com/rocher/ob-ada-spark"))]) + (ob-ada-spark . [(20220515 2014) ((emacs (26 1)) (f (0 20 0))) "Babel functions for Ada & SPARK" single ((:commit . "b4f16b255947240e458127e5c737d793ac894ac1") (:authors ("Francesc Rocher")) (:maintainer "Francesc Rocher") (:keywords "languages" "tools" "outlines") (:url . "https://github.com/rocher/ob-ada-spark"))]) (ob-applescript . [(20190709 1607) nil "Org-babel functions for AppleScript" single ((:commit . "2b07b77b75bd02f2102f62e6d52ffdd0f921439a") (:authors ("Stig Brautaset")) (:maintainer "Stig Brautaset") (:keywords "literate programming" "reproducible research" "mac") (:url . "http://github.com/stig/ob-applescript.el"))]) (ob-async . [(20210428 2052) ((async (1 9)) (org (9 0 1)) (emacs (24 4)) (dash (2 14 1))) "Asynchronous org-babel src block execution" single ((:commit . "9aac486073f5c356ada20e716571be33a350a982") (:authors ("Andrew Stahlman" . "andrewstahlman@gmail.com")) (:maintainer "Andrew Stahlman" . "andrewstahlman@gmail.com") (:keywords "tools") (:url . "https://github.com/astahlman/ob-async"))]) - (ob-axiom . [(20190623 2052) ((emacs (24 2)) (axiom-environment (20171021))) "An org-babel backend for the axiom-environment system" single ((:commit . "e60de5ed107ffeb530a56d24d04f38988124d12b") (:authors ("Paul Onions")) (:maintainer "Paul Onions") (:keywords "axiom" "openaxiom" "fricas"))]) + (ob-axiom . [(20190623 2052) ((emacs (24 2)) (axiom-environment (20171021))) "An org-babel backend for the axiom-environment system" single ((:commit . "847cc6e728b692ad3fdaec28d0c8c49ec0378a56") (:authors ("Paul Onions")) (:maintainer "Paul Onions") (:keywords "axiom" "openaxiom" "fricas"))]) (ob-bitfield . [(20220401 600) ((emacs (24 4))) "Babel Functions for bitfield" single ((:commit . "28e01448ee66b8b6858294cad1b7dae0b9a85e6a") (:authors ("Gulshan Singh")) (:maintainer "Gulshan Singh") (:url . "https://github.com/gsingh93/ob-bitfield"))]) (ob-blockdiag . [(20210412 1541) nil "org-babel functions for blockdiag evaluation" single ((:commit . "c3794bf7bdb8fdb3db90db41619dda4e7d3dd7b9") (:authors ("Dmitry Moskowski")) (:maintainer "Dmitry Moskowski") (:keywords "tools" "convenience") (:url . "https://github.com/corpix/ob-blockdiag.el"))]) (ob-browser . [(20170720 1918) ((org (8))) "Render HTML in org-mode blocks." tar ((:commit . "a347d9df1c87b7eb660be8723982c7ad2563631a") (:authors ("Kris Jenkins" . "krisajenkins@gmail.com")) (:maintainer "Kris Jenkins" . "krisajenkins@gmail.com") (:keywords "org" "babel" "browser" "phantomjs") (:url . "https://github.com/krisajenkins/ob-browser"))]) @@ -3305,7 +3306,7 @@ (ob-http . [(20180707 1448) ((s (1 9 0)) (cl-lib (0 5))) "http request in org-mode babel" tar ((:commit . "b1428ea2a63bcb510e7382a1bf5fe82b19c104a7") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:url . "http://github.com/zweifisch/ob-http"))]) (ob-hy . [(20180702 540) ((emacs (24 4))) "org-babel functions for Hy-lang evaluation" tar ((:commit . "a42ecaf440adc03e279afe43ee5ef6093ddd542a") (:authors ("Brantou" . "brantou89@gmail.com")) (:maintainer "Brantou" . "brantou89@gmail.com") (:keywords "hy" "literate programming" "reproducible research") (:url . "https://github.com/brantou/ob-hy"))]) (ob-ipython . [(20180224 953) ((s (1 9 0)) (dash (2 10 0)) (dash-functional (1 2 0)) (f (0 17 2)) (emacs (24))) "org-babel functions for IPython evaluation" tar ((:commit . "7147455230841744fb5b95dcbe03320313a77124") (:authors ("Greg Sexton" . "gregsexton@gmail.com")) (:maintainer "Greg Sexton" . "gregsexton@gmail.com") (:keywords "literate programming" "reproducible research") (:url . "http://www.gregsexton.org"))]) - (ob-julia-vterm . [(20210418 2306) ((emacs (26 1)) (julia-vterm (0 10))) "Babel Functions for Julia in VTerm" single ((:commit . "e04ee53d67cbd715c2d84fe5bc367526edfadc74") (:authors ("Shigeaki Nishina")) (:maintainer "Shigeaki Nishina") (:keywords "julia" "org" "outlines" "literate programming" "reproducible research") (:url . "https://github.com/shg/ob-julia-vterm.el"))]) + (ob-julia-vterm . [(20220512 820) ((emacs (26 1)) (julia-vterm (0 16)) (queue (0 2))) "Babel Functions for Julia in VTerm" single ((:commit . "448b1d0d2edf908c13a99a2424fec20de636f5a3") (:authors ("Shigeaki Nishina")) (:maintainer "Shigeaki Nishina") (:keywords "julia" "org" "outlines" "literate programming" "reproducible research") (:url . "https://github.com/shg/ob-julia-vterm.el"))]) (ob-kotlin . [(20180823 1321) ((org (8))) "org-babel functions for kotlin evaluation" single ((:commit . "96e420cbd2e9ea8a77043e5dcaebdfc6da17492a") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "org" "babel" "kotlin") (:url . "http://github.com/zweifisch/ob-kotlin"))]) (ob-latex-as-png . [(20200629 1013) ((emacs (26 1)) (org (9 1))) "Org-babel functions for latex-as-png evaluation" single ((:commit . "a20e3fedbac4034de4ab01436673a0f8845de1df") (:authors ("Musa Al-hassy" . "alhassy@gmail.com")) (:maintainer "Musa Al-hassy" . "alhassy@gmail.com") (:keywords "literate programming" "reproducible research" "org" "convenience") (:url . "https://github.com/alhassy/ob-latex-as-png"))]) (ob-lfe . [(20170725 1420) ((org (8))) "org-babel functions for lfe evaluation" single ((:commit . "f7780f58e650b4d29dfd834c662b1d354b620a8e") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "org" "babel" "lfe" "lisp" "erlang") (:url . "http://github.com/zweifisch/ob-lfe"))]) @@ -3350,7 +3351,7 @@ (octicons . [(20151101 340) ((cl-lib (0 5))) "octicons utility" tar ((:commit . "a61e561966ffd8faa3b48ce5b3a4eec10c59708b") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-octicons"))]) (octo-mode . [(20161008 1229) ((emacs (24))) "Major mode for Octo assembly language" single ((:commit . "bd4db7e5e3275b24c74e6a23c11d04f54e9feca5") (:authors ("John Olsson" . "john@cryon.se")) (:maintainer "John Olsson" . "john@cryon.se") (:keywords "languages") (:url . "https://github.com/cryon/octo-mode"))]) (octopress . [(20190123 107) nil "A lightweight wrapper for Jekyll and Octopress." tar ((:commit . "f2c92d5420f14fc9167c7de1873836510e652de2") (:authors ("Aaron Bieber" . "aaron@aaronbieber.com")) (:maintainer "Aaron Bieber" . "aaron@aaronbieber.com") (:keywords "octopress" "blog") (:url . "https://github.com/aaronbieber/octopress.el"))]) - (oer-reveal . [(20220402 1505) ((emacs (24 4)) (org-re-reveal (3 1 0))) "OER with reveal.js, plugins, and org-re-reveal" tar ((:commit . "df7180a8d75dedb2fd8878843a3d3cc654be508d") (:authors ("Jens Lechtenbörger")) (:maintainer "Jens Lechtenbörger") (:keywords "hypermedia" "tools" "slideshow" "presentation" "oer") (:url . "https://gitlab.com/oer/oer-reveal"))]) + (oer-reveal . [(20220516 924) ((emacs (24 4)) (org-re-reveal (3 1 0))) "OER with reveal.js, plugins, and org-re-reveal" tar ((:commit . "fccf92f222654c6e442bb38a0ca1cef9a6fa31f4") (:authors ("Jens Lechtenbörger")) (:maintainer "Jens Lechtenbörger") (:keywords "hypermedia" "tools" "slideshow" "presentation" "oer") (:url . "https://gitlab.com/oer/oer-reveal"))]) (offlineimap . [(20150916 1158) nil "Run OfflineIMAP from Emacs" single ((:commit . "cc3e067e6237a1eb7b21c575a41683b1febb47f1") (:authors ("Julien Danjou" . "julien@danjou.info")) (:maintainer "Julien Danjou" . "julien@danjou.info") (:url . "http://julien.danjou.info/offlineimap-el.html"))]) (oj . [(20200811 517) ((emacs (26 1)) (quickrun (2 2))) "Competitive programming tools client for AtCoder, Codeforces" single ((:commit . "2dd65324ac9833e07eaed5fb04acebafc6d5cbd2") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/oj.el"))]) (ol-notmuch . [(20220428 1337) ((emacs (25 1)) (compat (28 1 1 0)) (notmuch (0 32)) (org (9 4 5))) "Links to notmuch messages" single ((:commit . "1a53d6c707514784cabf33d865b577bf77f45913") (:authors ("Matthieu Lemerre" . "racin@free.fr")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "hypermedia" "mail") (:url . "https://git.sr.ht/~tarsius/ol-notmuch"))]) @@ -3394,7 +3395,7 @@ (org-arbeitszeit . [(20220328 1951) ((emacs (27 1))) "Calculate your worktime" single ((:commit . "60e6adfe457bcc4ee47e3e5805b6b40544f98ee0") (:authors ("Benjamin Kästner" . "benjamin.kaestner@gmail.com")) (:maintainer "Benjamin Kästner" . "benjamin.kaestner@gmail.com") (:keywords "tools" "org" "calendar" "convenience") (:url . "https://github.com/bkaestner/org-arbeitszeit"))]) (org-attach-screenshot . [(20210221 1336) ((emacs (24 3))) "Screenshots integrated with org attachment dirs" single ((:commit . "55fa23e69c8ac4c40f8600300301a9cdc5c6732f") (:authors ("Derek Feichtinger" . "derek.feichtinger@psi.ch")) (:maintainer "Derek Feichtinger" . "derek.feichtinger@psi.ch") (:keywords "org" "multimedia") (:url . "https://github.com/dfeich/org-screenshot"))]) (org-auto-expand . [(20210923 243) ((emacs (26 1))) "Automatically expand certain headings" single ((:commit . "edc27b155befab5626dcf6ceec7938126f7e31d4") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "convenience" "outlines" "org") (:url . "https://github.com/alphapapa/org-auto-expand"))]) - (org-auto-tangle . [(20211115 543) ((emacs (24 1)) (async (1 9 3))) "Automatically and Asynchronously tangles org files on save" single ((:commit . "5d9f2734c96166722c5057f3a2641ff8e08184cc") (:authors ("Yilkal Argaw")) (:maintainer "Yilkal Argaw") (:keywords "outlines") (:url . "https://github.com/yilkalargaw/org-auto-tangle"))]) + (org-auto-tangle . [(20211115 543) ((emacs (24 1)) (async (1 9 3))) "Automatically and Asynchronously tangles org files on save" single ((:commit . "c3cbde261fd66b747374b667cb715ca9ee8c52ba") (:authors ("Yilkal Argaw")) (:maintainer "Yilkal Argaw") (:keywords "outlines") (:url . "https://github.com/yilkalargaw/org-auto-tangle"))]) (org-autolist . [(20211225 658) nil "Improved list management in org-mode" single ((:commit . "48666001f9ae1fdf9e295410d5a494e79284e2f7") (:authors ("Calvin Young")) (:maintainer "Calvin Young") (:keywords "lists" "checklists" "org-mode") (:url . "https://github.com/calvinwyoung/org-autolist"))]) (org-babel-eval-in-repl . [(20201206 1540) ((eval-in-repl (0 9 2)) (matlab-mode (3 3 6)) (ess (16 10)) (emacs (24))) "Eval org-mode babel code blocks in various REPLs." tar ((:commit . "3591f062873de2d64cc6f83b3555d030506e6ee7") (:authors ("Takeshi Teshima" . "diadochos.developer@gmail.com")) (:maintainer "Takeshi Teshima" . "diadochos.developer@gmail.com") (:keywords "literate programming" "reproducible research" "async execution") (:url . "https://github.com/diadochos/org-babel-eval-in-repl"))]) (org-beautify-theme . [(20170908 2218) nil "A sub-theme to make org-mode more beautiful." single ((:commit . "df6a1114fda313e1689363e196c8284fbe2a2738") (:authors ("Jonathan Arkell" . "jonnay@jonnay.net")) (:maintainer "Jonathan Arkell" . "jonnay@jonnay.net") (:keywords "org" "theme"))]) @@ -3408,7 +3409,7 @@ (org-category-capture . [(20220114 730) ((org (9 0 0)) (emacs (24))) "Contextualy capture of org-mode TODOs." single ((:commit . "642b39c698db00bc535c1c2335f425fb9f4855a9") (:authors ("Ivan Malison" . "IvanMalison@gmail.com")) (:maintainer "Ivan Malison" . "IvanMalison@gmail.com") (:keywords "org-mode" "todo" "tools" "outlines") (:url . "https://github.com/IvanMalison/org-projectile"))]) (org-chef . [(20220422 300) ((org (0)) (emacs (24))) "Cookbook and recipe management with org-mode." tar ((:commit . "6a786e77e67a715b3cd4f5128b59d501614928af") (:authors ("Calvin Beck" . "hobbes@ualberta.ca")) (:maintainer "Calvin Beck" . "hobbes@ualberta.ca") (:keywords "convenience" "abbrev" "outlines" "org" "food" "recipes" "cooking") (:url . "https://github.com/Chobbes/org-chef"))]) (org-cliplink . [(20201126 1020) ((emacs (24 4))) "insert org-mode links from the clipboard" tar ((:commit . "13e0940b65d22bec34e2de4bc8cba1412a7abfbc") (:authors ("Alexey Kutepov" . "reximkut@gmail.com")) (:maintainer "Alexey Kutepov" . "reximkut@gmail.com") (:url . "http://github.com/rexim/org-cliplink"))]) - (org-clock-convenience . [(20220503 530) ((org (8)) (emacs (24 3))) "Convenience functions for org time tracking" single ((:commit . "988d4e3c9f0ae6df098b0ab1985b79eed2c5b808") (:authors ("Derek Feichtinger <dfeich.gmail.com>")) (:maintainer "Derek Feichtinger <dfeich.gmail.com>") (:keywords "convenience") (:url . "https://github.com/dfeich/org-clock-convenience"))]) + (org-clock-convenience . [(20220515 849) ((org (8)) (emacs (24 3))) "Convenience functions for org time tracking" single ((:commit . "9201db80862d144459f1316d571842f5389a47eb") (:authors ("Derek Feichtinger <dfeich.gmail.com>")) (:maintainer "Derek Feichtinger <dfeich.gmail.com>") (:keywords "convenience") (:url . "https://github.com/dfeich/org-clock-convenience"))]) (org-clock-csv . [(20201222 1506) ((org (8 3)) (s (1 0))) "Export `org-mode' clock entries to CSV format." single ((:commit . "af94b58c2e179a5bcc938f339e93de0eee3da99c") (:authors ("Aaron Jacobs" . "atheriel@gmail.com")) (:maintainer "Aaron Jacobs" . "atheriel@gmail.com") (:keywords "calendar" "data" "org") (:url . "https://github.com/atheriel/org-clock-csv"))]) (org-clock-reminder . [(20211010 2139) ((emacs (26 1))) "Notifications that remind you about clocked-in tasks" tar ((:commit . "9f9b88348ffbc6628f2286dcb4c064b520d0a638") (:authors ("Nikolay Brovko" . "i@nickey.ru")) (:maintainer "Nikolay Brovko" . "i@nickey.ru") (:keywords "calendar" "convenience") (:url . "https://github.com/inickey/org-clock-reminder"))]) (org-clock-split . [(20200331 526) ((emacs (24))) "Split clock entries" single ((:commit . "39e1d2912a7a7223e2356a5fc4dff03507ae084d") (:authors ("Justin Taft <https://github.com/justintaft>")) (:maintainer "Justin Taft <https://github.com/justintaft>") (:keywords "calendar") (:url . "https://github.com/justintaft/emacs-org-clock-split"))]) @@ -3426,6 +3427,7 @@ (org-drill-table . [(20180115 1009) ((s (1 7 0)) (dash (2 2 0)) (cl-lib (0 3)) (org (8 2)) (emacs (24 1))) "Generate drill cards from org tables" single ((:commit . "2729aaa42c1e2720d9bf7bcc125e92dcf48b7f7d") (:authors ("Chris Barrett" . "chris.d.barrett@me.com")) (:maintainer "Chris Barrett" . "chris.d.barrett@me.com"))]) (org-dropbox . [(20150114 509) ((dash (2 2)) (names (20150000)) (emacs (24))) "move Dropbox notes from phone into org-mode datetree" single ((:commit . "75dab6d6f0438a7a8a18ccf3a5d55f50bf531f6e") (:authors ("Heikki Lehvaslaiho" . "heikki.lehvaslaiho@gmail.com")) (:maintainer "Heikki Lehvaslaiho" . "heikki.lehvaslaiho@gmail.com") (:keywords "dropbox" "android" "notes" "org-mode") (:url . "https://github.com/heikkil/org-dropbox"))]) (org-easy-img-insert . [(20160915 2008) ((emacs (24 4))) "An easier way to add images from the web in org mode" single ((:commit . "9f8aaa7f68ff1f0d8d7b1e9b618abb15002f971e") (:authors ("Tashrif Sanil" . "tashrifsanil@kloke-source.com")) (:maintainer "Tashrif Sanil" . "tashrifsanil@kloke-source.com") (:keywords "convenience" "hypermedia" "files") (:url . "https://github.com/tashrifsanil/org-easy-img-insert"))]) + (org-edit-indirect . [(20220508 2141) ((emacs (25 1)) (edit-indirect (0 1 6)) (org (9 0))) "Edit anything, not just source blocks" single ((:commit . "f146d1b406308298b4004a28aaa11124b02d015b") (:authors ("Ag Ibragimomv <https://github.com/agzam>")) (:maintainer "Ag Ibragimomv" . "agzam.ibragimov@gmail.com") (:keywords "convenience" "extensions" "outlines") (:url . "https://github.com/agzam/org-edit-indirect.el"))]) (org-edit-latex . [(20170908 1522) ((emacs (24 4)) (auctex (11 90))) "Edit embedded LaTeX in a dedicated buffer" single ((:commit . "1f228310ef2f3f2959a527f6d99e42ce977384c8") (:authors ("James Wong" . "jianwang.academic@gmail.com")) (:maintainer "James Wong" . "jianwang.academic@gmail.com") (:keywords "org" "latex") (:url . "https://github.com/et2010/org-edit-latex"))]) (org-ehtml . [(20220216 2054) ((web-server (20140109 2200)) (emacs (24 3))) "Export Org-mode files as editable web pages" tar ((:commit . "419932d6dbce193b0d90b1ccf9bf643169d21f52") (:authors ("Eric Schulte" . "schulte.eric@gmail.com")) (:maintainer "Eric Schulte" . "schulte.eric@gmail.com") (:keywords "org" "web-server" "javascript" "html"))]) (org-elisp-help . [(20161122 55) ((cl-lib (0 5)) (org (9 0))) "org links to emacs-lisp documentation" single ((:commit . "3e33ab1a2933dd7f2782ef91d667a37f12d633ab") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "org" "remember" "lisp") (:url . "https://github.com/tarsius/org-elisp-help"))]) @@ -3450,15 +3452,15 @@ (org-journal . [(20220408 629) ((emacs (25 1)) (org (9 1))) "a simple org-mode based journaling mode" single ((:commit . "839a2e19865a03bec30ef32431f981f33880a754") (:authors ("Bastian Bechtold") ("Christian Schwarzgruber")) (:maintainer "Bastian Bechtold") (:url . "http://github.com/bastibe/org-journal"))]) (org-journal-list . [(20190221 2052) ((emacs (25))) "Org mode Journal List" single ((:commit . "2b26d00181bb49bff64b31ad020490acd1b6ae02") (:authors ("Huy Tran" . "huytd189@gmail.com")) (:maintainer "Huy Tran" . "huytd189@gmail.com") (:url . "https://github.com/huytd/org-journal-list"))]) (org-journal-tags . [(20220416 1507) ((emacs (27 1)) (org-journal (2 1 2)) (magit-section (3 3 0)) (transient (0 3 7))) "Tagging and querying system of org-journal" single ((:commit . "ca6327161f4994ea0e98d7c6c3f662222e2650bf") (:authors ("Korytov Pavel" . "thexcloud@gmail.com")) (:maintainer "Korytov Pavel" . "thexcloud@gmail.com") (:url . "https://github.com/SqrtMinusOne/org-journal-tags"))]) - (org-kanban . [(20220218 1845) ((s (0)) (dash (2 17 0)) (emacs (24 4)) (org (9 1))) "kanban dynamic block for org-mode." single ((:commit . "5310e208d151f460f9b7e3961b4796842e91a3ae") (:authors ("Christian Köstlin" . "christian.koestlin@gmail.com")) (:maintainer "Christian Köstlin" . "christian.koestlin@gmail.com") (:keywords "org-mode" "org" "kanban" "tools") (:url . "http://github.com/gizmomogwai/org-kanban"))]) + (org-kanban . [(20220510 2150) ((s (0)) (dash (2 17 0)) (emacs (24 4)) (org (9 1))) "kanban dynamic block for org-mode." single ((:commit . "1d3234359fa52fce5ac1006e2c51f14c760d275e") (:authors ("Christian Köstlin" . "christian.koestlin@gmail.com")) (:maintainer "Christian Köstlin" . "christian.koestlin@gmail.com") (:keywords "org-mode" "org" "kanban" "tools") (:url . "http://github.com/gizmomogwai/org-kanban"))]) (org-kindle . [(20220210 1408) ((emacs (25)) (cl-lib (0 5)) (seq (2 20))) "Send org link file to ebook reader." single ((:commit . "fadcfd62e254d0c45e87d63128a82a08ae21869a") (:keywords "org" "link" "ebook" "kindle" "epub" "azw3" "mobi") (:url . "https://repo.or.cz/org-kindle.git"))]) (org-latex-impatient . [(20210409 2251) ((emacs (26)) (s (1 8 0)) (posframe (0 8 0)) (org (9 3)) (dash (2 17 0))) "Preview org-latex Fragments Instantly via MathJax" single ((:commit . "832bbb9bbdee8b58170c984ead487f3ad612820c") (:authors ("Sheng Yang" . "styang@fastmail.com")) (:maintainer "Sheng Yang" . "styang@fastmail.com") (:keywords "tex" "tools") (:url . "https://github.com/yangsheng6810/org-latex-instant-preview"))]) (org-link-beautify . [(20220503 458) ((emacs (27 1)) (all-the-icons (4 0 0))) "Beautify Org Links" single ((:commit . "b20e296b497360de12d5d973aa273cab70c77126") (:keywords "hypermedia") (:url . "https://repo.or.cz/org-link-beautify.git"))]) (org-link-travis . [(20140405 2327) ((org (7))) "Insert/Export the link of Travis CI on org-mode" single ((:commit . "596615ad8373d9090bd4138da683524f0ad0bda5") (:authors ("Hiroaki Otsu" . "ootsuhiroaki@gmail.com")) (:maintainer "Hiroaki Otsu" . "ootsuhiroaki@gmail.com") (:keywords "org") (:url . "https://github.com/aki2o/org-link-travis"))]) (org-linkotron . [(20200112 2235) ((emacs (26 1)) (org (9 3))) "Org-mode link selector" tar ((:commit . "d0adc5247b205bc73d2f1a83d4a512d2be541eb5") (:authors ("Per Weijnitz" . "per.weijnitz@gmail.com")) (:maintainer "Per Weijnitz" . "per.weijnitz@gmail.com") (:keywords "hypermedia" "org") (:url . "https://gitlab.com/perweij/org-linkotron"))]) - (org-listcruncher . [(20210706 1741) ((seq (2 3)) (emacs (26 1))) "Planning tool - Parse Org mode lists into table" single ((:commit . "075e0e6d36eb50406a608bc8a2f0dd359ec63938") (:authors ("Derek Feichtinger" . "dfeich@gmail.com")) (:maintainer "Derek Feichtinger" . "dfeich@gmail.com") (:keywords "convenience") (:url . "https://github.com/dfeich/org-listcruncher"))]) + (org-listcruncher . [(20210706 1741) ((seq (2 3)) (emacs (26 1))) "Planning tool - Parse Org mode lists into table" single ((:commit . "d2f4b9e8f1c7c9b495f71deeaa77e4f6f47bc7bf") (:authors ("Derek Feichtinger" . "dfeich@gmail.com")) (:maintainer "Derek Feichtinger" . "dfeich@gmail.com") (:keywords "convenience") (:url . "https://github.com/dfeich/org-listcruncher"))]) (org-make-toc . [(20200409 1436) ((emacs (26 1)) (dash (2 12)) (s (1 10 0)) (org (9 0))) "Automatic tables of contents for Org files" single ((:commit . "26fbd6a7e1e7f8e473fe3a5f74faec715c3a05aa") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "org" "convenience") (:url . "http://github.com/alphapapa/org-make-toc"))]) - (org-mime . [(20220204 42) ((emacs (25 1))) "org html export for text/html MIME emails" single ((:commit . "98504d043c8421ac390b7358b146733c7c0b4479") (:authors ("Eric Schulte")) (:maintainer "Chen Bin (redguardtoo)") (:keywords "mime" "mail" "email" "html") (:url . "http://github.com/org-mime/org-mime"))]) + (org-mime . [(20220515 736) ((emacs (25 1))) "org html export for text/html MIME emails" single ((:commit . "1fc8edbf15d0c34baa34fd566dce4a96f3575bb6") (:authors ("Eric Schulte")) (:maintainer "Chen Bin (redguardtoo)") (:keywords "mime" "mail" "email" "html") (:url . "http://github.com/org-mime/org-mime"))]) (org-mind-map . [(20180826 2340) ((emacs (24)) (dash (1 8 0)) (org (8 2 10))) "Creates a directed graph from org-mode files" single ((:commit . "95347b2f9291f5c5eb6ebac8e726c03634c61de3") (:authors ("Ted Wiles" . "theodore.wiles@gmail.com")) (:maintainer "Ted Wiles" . "theodore.wiles@gmail.com") (:keywords "orgmode" "extensions" "graphviz" "dot") (:url . "https://github.com/theodorewiles/org-mind-map"))]) (org-ml . [(20211231 700) ((emacs (26 1)) (org (9 3)) (dash (2 17)) (s (1 12))) "Functional Org Mode API" tar ((:commit . "3974435bbf72722801f7ed78855381d77a773162") (:authors ("Nathan Dwarshuis" . "ndwar@yavin4.ch")) (:maintainer "Nathan Dwarshuis" . "ndwar@yavin4.ch") (:keywords "org-mode" "outlines") (:url . "https://github.com/ndwarshuis/org-ml"))]) (org-mobile-sync . [(20180606 524) ((emacs (24 3 50)) (org (8 0))) "automatically sync org-mobile on changes" single ((:commit . "06764b943a528827df1e2acc6bc7806cc2c1351f") (:authors ("steckerhalter")) (:maintainer "steckerhalter") (:keywords "org-mode" "org" "mobile" "sync" "todo") (:url . "https://framagit.org/steckerhalter/org-mobile-sync"))]) @@ -3504,13 +3506,13 @@ (org-reverse-datetree . [(20220310 1646) ((emacs (26 1)) (dash (2 12)) (org (9 3))) "Create reverse date trees in org-mode" single ((:commit . "9ebd42b521e7adf26a35cbb17144113a83f73264") (:authors ("Akira Komamura" . "akira.komamura@gmail.com")) (:maintainer "Akira Komamura" . "akira.komamura@gmail.com") (:keywords "outlines") (:url . "https://github.com/akirak/org-reverse-datetree"))]) (org-review . [(20220411 1205) nil "schedule reviews for Org entries" single ((:commit . "466f7d8f183f226f1e665cf806cb094471903d9c") (:authors ("Alan Schmitt" . "alan.schmitt@polytechnique.org")) (:maintainer "Alan Schmitt" . "alan.schmitt@polytechnique.org") (:keywords "org" "review") (:url . "https://github.com/brabalan/org-review"))]) (org-rich-yank . [(20220227 2154) ((emacs (24 4))) "Paste with org-mode markup and link to source" single ((:commit . "4bcd030f0d736d77c647955739b61fae541417e9") (:authors ("Kevin Brubeck Unhammer" . "unhammer@fsfe.org")) (:maintainer "Kevin Brubeck Unhammer" . "unhammer@fsfe.org") (:keywords "convenience" "hypermedia" "org") (:url . "https://github.com/unhammer/org-rich-yank"))]) - (org-roam . [(20220508 19) ((emacs (26 1)) (dash (2 13)) (org (9 4)) (emacsql (3 0 0)) (emacsql-sqlite (1 0 0)) (magit-section (3 0 0))) "A database abstraction layer for Org-mode" tar ((:commit . "c0871c42bec9fa836e1b2a8c7691f06694f99714") (:authors ("Jethro Kuan" . "jethrokuan95@gmail.com")) (:maintainer "Jethro Kuan" . "jethrokuan95@gmail.com") (:keywords "org-mode" "roam" "convenience") (:url . "https://github.com/org-roam/org-roam"))]) + (org-roam . [(20220516 1640) ((emacs (26 1)) (dash (2 13)) (org (9 4)) (emacsql (3 0 0)) (emacsql-sqlite (1 0 0)) (magit-section (3 0 0))) "A database abstraction layer for Org-mode" tar ((:commit . "01843a648650a92f35f4dce6693f7b640c79b0c8") (:authors ("Jethro Kuan" . "jethrokuan95@gmail.com")) (:maintainer "Jethro Kuan" . "jethrokuan95@gmail.com") (:keywords "org-mode" "roam" "convenience") (:url . "https://github.com/org-roam/org-roam"))]) (org-roam-bibtex . [(20220213 1609) ((emacs (27 1)) (org-roam (2 2 0)) (bibtex-completion (2 0 0))) "Org Roam meets BibTeX" tar ((:commit . "efdac6fe4134c33f50b06a0a6d192003d0e5094c") (:authors ("Mykhailo Shevchuk" . "mail@mshevchuk.com") ("Leo Vivier" . "leo.vivier+dev@gmail.com")) (:maintainer "Mykhailo Shevchuk" . "mail@mshevchuk.com") (:keywords "bib" "hypermedia" "outlines" "wp") (:url . "https://github.com/org-roam/org-roam-bibtex"))]) (org-roam-timestamps . [(20220111 1755) ((emacs (26 1)) (org-roam (2 0 0))) "Keep track of modification times for org-roam" single ((:commit . "604fdad0feb61419751d3d6b828cc443a99f418f") (:authors ("Thomas F. K. Jorna <https://github.com/thomas>")) (:maintainer "Thomas F. K. Jorna" . "jorna@jtrialerror.com") (:keywords "calendar" "outlines" "files") (:url . "https://github.com/ThomasFKJorna/org-roam-timestamps/"))]) (org-roam-ui . [(20220225 2151) ((emacs (27 1)) (org-roam (2 0 0)) (simple-httpd (20191103 1446)) (websocket (1 13))) "User Interface for Org-roam" tar ((:commit . "9474a254390b1e42488a1801fed5826b32a8030b") (:authors ("Kirill Rogovoy, Thomas Jorna")) (:maintainer "Kirill Rogovoy, Thomas Jorna") (:keywords "files" "outlines") (:url . "https://github.com/org-roam/org-roam-ui"))]) (org-ros . [(20220320 1705) ((emacs (24 1))) "Rahul's Org-Mode Screenshot" single ((:commit . "70e0f33ee027ca1dce68351ad14a9e47a452fc17") (:authors ("Rahul Martim Juliato" . "rahul.juliato@gmail.com")) (:maintainer "Rahul Martim Juliato" . "rahul.juliato@gmail.com") (:url . "https://github.com/LionyxML/ros"))]) (org-rtm . [(20160214 1236) ((rtm (0 1))) "Simple import/export from rememberthemilk to org-mode" single ((:commit . "adc42ad1fbe92ab447ccc9553780f4456f2508d2") (:authors ("Philipp Middendorf" . "pmidden@secure.mailbox.org")) (:maintainer "Philipp Middendorf" . "pmidden@secure.mailbox.org") (:keywords "outlines" "data") (:url . "https://github.com/pmiddend/org-rtm"))]) - (org-runbook . [(20220107 451) nil "Org mode for runbooks" tar ((:commit . "dd11d253d3ee94b70f0d2cc74c6e85c6f5ac189d") (:authors ("Tyler Dodge")) (:maintainer "Tyler Dodge") (:keywords "convenience" "processes" "terminals" "files") (:url . "https://github.com/tyler-dodge/org-runbook"))]) + (org-runbook . [(20220512 1927) nil "Org mode for runbooks" tar ((:commit . "ec8b933c1269804546c356fe379169d1f0fce9ea") (:authors ("Tyler Dodge")) (:maintainer "Tyler Dodge") (:keywords "convenience" "processes" "terminals" "files") (:url . "https://github.com/tyler-dodge/org-runbook"))]) (org-scrum . [(20200131 1129) ((emacs (24 5)) (org (8 2)) (seq (2 3)) (cl-lib (1 0))) "org mode extensions for scrum planning and reporting" single ((:commit . "f7a46bc4bc85305f0c2b72565170ea0e007c42fd") (:authors ("Ian Martins" . "ianxm@jhu.edu")) (:maintainer "Ian Martins" . "ianxm@jhu.edu") (:url . "https://github.com/ianxm/emacs-scrum"))]) (org-seek . [(20161217 502) ((emacs (24 3)) (ag (0 48))) "Searching Org-mode files with search tools." single ((:commit . "1f51e6634e3b9a6a29d335d0d14370a6ffef2265") (:authors ("stardiviner" . "numbchild@gmail.com")) (:maintainer "stardiviner" . "numbchild@gmail.com") (:keywords "org" "search" "ag" "pt") (:url . "https://github.com/stardiviner/org-seek.el"))]) (org-shoplist . [(20210629 2157) ((emacs (25))) "Eat the world" single ((:commit . "71ea7643e66c97d21df49fb8b600578ca0464f83") (:authors ("lordnik22")) (:maintainer "lordnik22") (:keywords "extensions" "matching") (:url . "https://github.com/lordnik22"))]) @@ -3543,7 +3545,7 @@ (org-treescope . [(20200503 1609) ((emacs (24 3)) (org (9 2 3)) (org-ql (0 5 -1)) (dash (2 17 0))) "Time scoping sparse trees within org" tar ((:commit . "905029a9e2ce6ed325bb8e10f59dc589c181d148") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://github.com/mtekman/org-treescope.el"))]) (org-treeusage . [(20200418 1904) ((emacs (26 1)) (dash (2 17 0)) (org (9 1 6))) "Examine the usage of org headings in a tree-like manner" tar ((:commit . "fe4323bc500e2d949848c75e8f59340971b35562") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://github.com/mtekman/org-treeusage.el"))]) (org-trello . [(20210314 1901) ((emacs (24 3)) (request-deferred (0 2 0)) (deferred (0 4 0)) (s (1 11 0)) (dash (2 18 0))) "Minor mode to synchronize org-mode buffer and trello board" tar ((:commit . "fc63ed580101e6160edfb6f43215fb3200ce1ea7") (:authors ("Antoine R. Dumont (@ardumont)" . "antoine.romain.dumont@gmail.com")) (:maintainer "Antoine R. Dumont (@ardumont)" . "antoine.romain.dumont@gmail.com") (:keywords "org-mode" "trello" "sync" "org-trello") (:url . "https://github.com/org-trello/org-trello"))]) - (org-variable-pitch . [(20220220 1757) ((emacs (25))) "Minor mode for variable pitch text in org mode." single ((:commit . "350af0e5d53307c900e4f8b2617f3852f51a74d2") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "faces") (:url . "https://dev.gkayaalp.com/elisp/index.html#ovp"))]) + (org-variable-pitch . [(20220220 1757) ((emacs (25))) "Minor mode for variable pitch text in org mode." single ((:commit . "d7dd4fb11178fc4404e52621d451f794a84e46ae") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "faces") (:url . "https://dev.gkayaalp.com/elisp/index.html#ovp"))]) (org-vcard . [(20220206 1209) nil "org-mode support for vCard export and import." tar ((:commit . "bdaebcb4ef44c155a92d9c89a21a1d29019ee026") (:authors ("Alexis" . "flexibeast@gmail.com") ("Will Dey" . "will123dey@gmail.com")) (:maintainer "Alexis" . "flexibeast@gmail.com") (:keywords "outlines" "org" "vcard") (:url . "https://github.com/flexibeast/org-vcard"))]) (org-view-mode . [(20220218 2106) ((emacs (25 1))) "Read-only viewer with less markup clutter in org mode files" single ((:commit . "88321917b095a8cbabfa8327c915bd46eb741750") (:authors ("Arthur Miller" . "arthur.miller@live.com")) (:maintainer "Arthur Miller" . "arthur.miller@live.com") (:keywords "convenience" "outlines" "tools") (:url . "https://github.com/amno1/org-view-mode"))]) (org-visibility . [(20220404 1502) ((emacs (27 1))) "Persistent org tree visibility" single ((:commit . "a3aef6573d23309f9a6f340b41fa103cca3c79a6") (:authors ("Kyle W T Sherman" . "kylewsherman@gmail.com")) (:maintainer "Kyle W T Sherman" . "kylewsherman@gmail.com") (:keywords "outlines" "convenience") (:url . "https://github.com/nullman/emacs-org-visibility"))]) @@ -3578,7 +3580,7 @@ (orthodox-christian-new-calendar-holidays . [(20210830 1657) nil "Feasts (NS)" single ((:commit . "6869024ecd45eefd0ec648979c6a59d7c79770e0") (:authors ("Carson Chittom" . "carson@wistly.net")) (:maintainer "Carson Chittom" . "carson@wistly.net") (:keywords "calendar") (:url . "https://github.com/cmchittom/orthodox-christian-new-calendar-holidays"))]) (osa . [(20200522 2103) ((emacs (25 1))) "OSA (JavaScript / AppleScript) bridge" tar ((:commit . "615ca9eef4131a23d9971691fa0d0f20fe59d01b") (:authors ("xristos" . "xristos@sdf.org")) (:maintainer "xristos" . "xristos@sdf.org") (:keywords "extensions") (:url . "https://github.com/atomontage/osa"))]) (osa-chrome . [(20201122 1639) ((emacs (25 1)) (osa (1 0))) "Google Chrome remote tab control" tar ((:commit . "9148e21cf2e91b357f5ea3a349975e8b89c8d5e4") (:authors ("xristos" . "xristos@sdf.org")) (:maintainer "xristos" . "xristos@sdf.org") (:keywords "comm") (:url . "https://github.com/atomontage/osa-chrome"))]) - (osm . [(20220509 1109) ((emacs (27 1))) "OpenStreetMap viewer" tar ((:commit . "86610105769729eda4c2609b4b724903bcdabb88") (:authors ("Daniel Mendler" . "mail@daniel-mendler.de")) (:maintainer "Daniel Mendler" . "mail@daniel-mendler.de") (:url . "https://github.com/minad/osm"))]) + (osm . [(20220513 1002) ((emacs (27 1))) "OpenStreetMap viewer" tar ((:commit . "563d9646b1f8df37cefcec5d51d20249eba407da") (:authors ("Daniel Mendler" . "mail@daniel-mendler.de")) (:maintainer "Daniel Mendler" . "mail@daniel-mendler.de") (:url . "https://github.com/minad/osm"))]) (osx-browse . [(20140508 2041) ((string-utils (0 3 2)) (browse-url-dwim (0 6 6))) "Web browsing helpers for OS X" single ((:commit . "44ded7cc3a7ee426c1c3257fae534c121f7e752e") (:authors ("Roland Walker" . "walker@pobox.com")) (:maintainer "Roland Walker" . "walker@pobox.com") (:keywords "hypermedia" "external") (:url . "http://github.com/rolandwalker/osx-browse"))]) (osx-clipboard . [(20141012 717) nil "Use the OS X clipboard from terminal Emacs" single ((:commit . "e46dd31327a3f92f77b013b4c9b1e5fdd0e5c73d") (:authors ("Jon Oddie <jonxfield at gmail.com>")) (:maintainer "Jon Oddie <jonxfield at gmail.com>") (:url . "https://github.com/joddie/osx-clipboard-mode"))]) (osx-dictionary . [(20210703 1152) ((cl-lib (0 5))) "Interface for OSX Dictionary.app" tar ((:commit . "1a4479d9f44ef1e6e5f7643c172c32f6fe6cce21") (:authors ("Chunyang Xu" . "mail@xuchunyang.me")) (:maintainer "Chunyang Xu" . "mail@xuchunyang.me") (:keywords "mac" "dictionary") (:url . "https://github.com/xuchunyang/osx-dictionary.el"))]) @@ -3614,7 +3616,7 @@ (ox-gist . [(20220410 2034) ((emacs (26 1)) (gist (1 4 0)) (s (1 12 0))) "Export Org mode buffers and subtrees to GitHub gists" single ((:commit . "e9f1f11af0e97fee30c2b15b56c236b1f4e1f400") (:authors ("Puneeth Chaganti" . "punchagan+emacs@muse-amuse.in")) (:maintainer "Puneeth Chaganti" . "punchagan+emacs@muse-amuse.in") (:keywords "org" "lisp" "gist" "github") (:url . "https://github.com/punchagan/org2gist/"))]) (ox-haunt . [(20200202 229) ((emacs (24 3)) (org (9 0))) "Haunt-flavored HTML backend for the Org export engine" single ((:commit . "f3c8fda6fee78f45a259e5d218a519dfd11c00c7") (:authors ("Jakob L. Kreuze" . "zerodaysfordays@sdf.lonestar.org")) (:maintainer "Jakob L. Kreuze" . "zerodaysfordays@sdf.lonestar.org") (:keywords "convenience" "hypermedia" "wp") (:url . "https://git.sr.ht/~jakob/ox-haunt"))]) (ox-html5slide . [(20131228 606) ((org (8 0))) "Export org-mode to HTML5 slide." single ((:commit . "4703dfbd9d79161509def673d2c1e118d722a58f") (:authors ("coldnew" . "coldnew.tw@gmail.com")) (:maintainer "coldnew" . "coldnew.tw@gmail.com") (:keywords "html" "presentation") (:url . "http://github.com/coldnew/org-html5slide"))]) - (ox-hugo . [(20220509 1259) ((emacs (26 3)) (tomelr (0 3 0))) "Hugo Markdown Back-End for Org Export Engine" tar ((:commit . "059f2b822cb95e1b9e84cbd37c266bccacdf56f4") (:authors ("Kaushal Modi" . "kaushal.modi@gmail.com") ("Matt Price" . "moptop99@gmail.com")) (:maintainer "Kaushal Modi" . "kaushal.modi@gmail.com") (:keywords "org" "markdown" "docs") (:url . "https://ox-hugo.scripter.co"))]) + (ox-hugo . [(20220512 1805) ((emacs (26 3)) (tomelr (0 4 3))) "Hugo Markdown Back-End for Org Export Engine" tar ((:commit . "2b169e5e83d608e80f4faee9d681b98d87041f58") (:authors ("Kaushal Modi" . "kaushal.modi@gmail.com") ("Matt Price" . "moptop99@gmail.com")) (:maintainer "Kaushal Modi" . "kaushal.modi@gmail.com") (:keywords "org" "markdown" "docs") (:url . "https://ox-hugo.scripter.co"))]) (ox-impress-js . [(20150412 1716) ((org (8))) "impress.js Back-End for Org Export Engine" tar ((:commit . "91c6d2af6af308ade352a03355c4fb551b238c6b") (:authors ("Takumi Kinjo <takumi dot kinjo at gmail dot org>")) (:maintainer "Takumi Kinjo <takumi dot kinjo at gmail dot org>") (:keywords "outlines" "hypermedia" "calendar" "wp") (:url . "https://github.com/kinjo/org-impress-js.el"))]) (ox-ioslide . [(20161015 1338) ((emacs (24 1)) (org (8 0)) (cl-lib (0 5)) (f (0 17 2)) (makey (0 3))) "Export org-mode to Google I/O HTML5 slide." tar ((:commit . "6555680be5364c8ddd2bf446865cb1a82adb6b9e") (:authors ("coldnew" . "coldnew.tw@gmail.com")) (:maintainer "coldnew" . "coldnew.tw@gmail.com") (:keywords "html" "presentation") (:url . "http://github.com/coldnew/org-ioslide"))]) (ox-jekyll-md . [(20211222 1718) nil "Export Jekyll on Markdown articles using org-mode." single ((:commit . "26edb3f4575bcb0f1a2aed56237cd89694284449") (:authors ("Elsa Gonsiorowski" . "gonsie@me.com")) (:maintainer "Elsa Gonsiorowski" . "gonsie@me.com") (:keywords "org" "jekyll"))]) @@ -3652,7 +3654,7 @@ (pacfiles-mode . [(20200915 1815) ((emacs (26)) (cl-lib (0 5))) "pacnew and pacsave merging tool" tar ((:commit . "8d06f64abc98c3f3338560c8d6eb47719e034069") (:authors ("Carlos G. Cordero <http://github/UndeadKernel>")) (:maintainer "Carlos G. Cordero" . "pacfiles@binarycharly.com") (:keywords "files" "pacman" "arch" "pacnew" "pacsave" "update" "linux") (:url . "https://github.com/UndeadKernel/pacfiles-mode"))]) (pack . [(20191017 456) ((emacs (24)) (cl-lib (0 5))) "Pack and unpack archive files" single ((:commit . "85cd856fdc00a2365e88b50373b99f1b3d2227be") (:authors ("10sr" . "8.slashes@gmail.com")) (:maintainer "10sr" . "8.slashes@gmail.com") (:keywords "files" "dired") (:url . "https://github.com/10sr/pack-el"))]) (package+ . [(20210124 640) ((emacs (24 3))) "Extensions for the package library." tar ((:commit . "079da78f3be8364e964f5861a5f433ad61b6f654") (:authors ("Ryan Davis" . "ryand-ruby@zenspider.com")) (:maintainer "Ryan Davis" . "ryand-ruby@zenspider.com") (:keywords "extensions" "tools") (:url . "https://github.com/zenspider/package"))]) - (package-build . [(20220210 1334) ((cl-lib (0 5)) (emacs (25 1))) "Tools for assembling a package archive" tar ((:commit . "032e9bd086029b2fdff09c3c2e606e29682e1fb1") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:keywords "tools") (:url . "https://github.com/melpa/package-build"))]) + (package-build . [(20220516 1125) ((emacs (25 1))) "Tools for assembling a package archive" tar ((:commit . "32a66832e376cfc918b63bd9a67b1c8cae23662a") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net") ("Steve Purcell" . "steve@sanityinc.com") ("Jonas Bernoulli" . "jonas@bernoul.li") ("Phil Hagelberg" . "technomancy@gmail.com")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:keywords "maint" "tools") (:url . "https://github.com/melpa/package-build"))]) (package-filter . [(20161122 719) nil "package archive whitelist and blacklist" single ((:commit . "bc73b41aea1d65ca44ef1593ca13126df9bbb39e") (:authors ("Donald Ephraim Curtis" . "dcurtis@milkbox.net")) (:maintainer "Donald Ephraim Curtis" . "dcurtis@milkbox.net") (:url . "https://github.com/milkypostman/package-filter"))]) (package-lint . [(20220412 1648) ((cl-lib (0 5)) (emacs (24 1)) (let-alist (1 0 6))) "A linting library for elisp package authors" tar ((:commit . "80a9d9815ab2919c992ad29ae4846443dec43a35") (:authors ("Steve Purcell" . "steve@sanityinc.com") ("Fanael Linithien" . "fanael4@gmail.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "lisp") (:url . "https://github.com/purcell/package-lint"))]) (package-lint-flymake . [(20210530 319) ((emacs (26 1)) (package-lint (0 5))) "A package-lint Flymake backend" single ((:commit . "80a9d9815ab2919c992ad29ae4846443dec43a35") (:url . "https://github.com/purcell/package-lint"))]) @@ -3676,7 +3678,7 @@ (pandoc . [(20161128 1157) ((emacs (24 4))) "Pandoc interface" single ((:commit . "198d262d09e30448f1672338b0b5a81cf75e1eaa") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "hypermedia" "documentation" "markup" "converter") (:url . "https://github.com/zonuexe/pandoc.el"))]) (pandoc-mode . [(20211208 2229) ((hydra (0 10 0)) (dash (2 10 0))) "Minor mode for interacting with Pandoc" tar ((:commit . "c1429887287b7ee9601196e26f97c908b6e4f5c0") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "pandoc") (:url . "http://joostkremers.github.io/pandoc-mode/"))]) (pangu-spacing . [(20190823 401) nil "Minor-mode to add space between Chinese and English characters." single ((:commit . "f92898949ba3bf991fd229416f3bbb54e9c6c223") (:authors ("coldnew" . "coldnew.tw@gmail.com")) (:maintainer "coldnew" . "coldnew.tw@gmail.com") (:url . "http://github.com/coldnew/pangu-spacing"))]) - (paper-theme . [(20200510 5) ((emacs (24))) "A minimal Emacs colour theme." single ((:commit . "350af0e5d53307c900e4f8b2617f3852f51a74d2") (:authors ("Göktuğ Kayaalp")) (:maintainer "Göktuğ Kayaalp") (:keywords "theme" "paper") (:url . "https://dev.gkayaalp.com/elisp/index.html#paper"))]) + (paper-theme . [(20200510 5) ((emacs (24))) "A minimal Emacs colour theme." single ((:commit . "d7dd4fb11178fc4404e52621d451f794a84e46ae") (:authors ("Göktuğ Kayaalp")) (:maintainer "Göktuğ Kayaalp") (:keywords "theme" "paper") (:url . "https://dev.gkayaalp.com/elisp/index.html#paper"))]) (paperless . [(20201130 1241) ((emacs (24 4)) (f (0 11 0)) (s (1 10 0)) (cl-lib (0 6 1))) "A major mode for sorting and filing PDF documents." tar ((:commit . "2db39586a2914f78f345379511d0e8cea4c96b86") (:authors ("Anthony Green" . "green@moxielogic.com")) (:maintainer "Anthony Green" . "green@moxielogic.com") (:keywords "pdf" "convenience") (:url . "http://github.com/atgreen/paperless"))]) (paradox . [(20191011 1111) ((emacs (24 4)) (seq (1 7)) (let-alist (1 0 3)) (spinner (1 7 3)) (hydra (0 13 2))) "A modern Packages Menu. Colored, with package ratings, and customizable." tar ((:commit . "339fe3518d1d102b2295670340e75caf4f01a29a") (:authors ("Artur Malabarba" . "emacs@endlessparentheses.com")) (:maintainer "Artur Malabarba" . "emacs@endlessparentheses.com") (:keywords "package" "packages") (:url . "https://github.com/Malabarba/paradox"))]) (parchment-theme . [(20200910 2310) ((autothemer (0 2))) "Light theme inspired by Acme and Leuven" single ((:commit . "95e8248edbdb01fedc7db4472bcce90d2d872106") (:authors ("Alex Griffin" . "a@ajgrf.com")) (:maintainer "Alex Griffin" . "a@ajgrf.com") (:url . "https://github.com/ajgrf/parchment"))]) @@ -3693,7 +3695,7 @@ (parsebib . [(20220426 2049) ((emacs (25 1))) "A library for parsing bib files" single ((:commit . "dd4c5540fa6c2cd990cba324741d7abbc8ed2f23") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "bibtex") (:url . "https://github.com/joostkremers/parsebib"))]) (parsec . [(20180730 16) ((emacs (24)) (cl-lib (0 5))) "Parser combinator library" single ((:commit . "2cbbbc2254aa7bcaa4fb5e07c8c1bf2f381dba26") (:authors ("Junpeng Qiu" . "qjpchmail@gmail.com")) (:maintainer "Junpeng Qiu" . "qjpchmail@gmail.com") (:keywords "extensions") (:url . "https://github.com/cute-jumper/parsec.el"))]) (parseclj . [(20220422 936) ((emacs (25))) "Clojure/EDN parser" tar ((:commit . "4d0e780e00f1828b00c43099e6eebc6582998f72") (:authors ("Arne Brasseur" . "arne@arnebrasseur.net")) (:maintainer "Arne Brasseur" . "arne@arnebrasseur.net") (:keywords "lisp" "clojure" "edn" "parser"))]) - (parseedn . [(20220422 936) ((emacs (26)) (parseclj (1 1 0)) (map (2))) "Clojure/EDN parser" single ((:commit . "dce2eed418ad21acf3d2d6d75c37dfa679b22359") (:authors ("Arne Brasseur" . "arne@arnebrasseur.net")) (:maintainer "Arne Brasseur" . "arne@arnebrasseur.net") (:keywords "lisp" "clojure" "edn" "parser"))]) + (parseedn . [(20220512 1328) ((emacs (26)) (parseclj (1 1 0)) (map (2))) "Clojure/EDN parser" single ((:commit . "35e9f3173a6cca60b6851dddace470b29654ac77") (:authors ("Arne Brasseur" . "arne@arnebrasseur.net")) (:maintainer "Arne Brasseur" . "arne@arnebrasseur.net") (:keywords "lisp" "clojure" "edn" "parser"))]) (pasp-mode . [(20180404 1700) ((emacs (24 3))) "- A major mode for editing Answer Set Programs." single ((:commit . "59385eb0e8ebcfc8c11dd811fb145d4b0fa3cc92") (:authors ("Henrik Jürges" . "juerges.henrik@gmail.com")) (:maintainer "Henrik Jürges" . "juerges.henrik@gmail.com") (:keywords "asp" "pasp" "answer set programs" "potassco answer set programs" "major mode" "languages") (:url . "https://github.com/santifa/pasp-mode"))]) (pass . [(20210203 810) ((emacs (25)) (password-store (2 1 0)) (password-store-otp (0 1 5)) (f (0 17))) "Major mode for password-store.el" single ((:commit . "5651da53137db9adcb125b4897c2fe27eeb4368d") (:authors ("Nicolas Petton" . "petton.nicolas@gmail.com") ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Nicolas Petton" . "petton.nicolas@gmail.com") (:keywords "password-store" "password" "keychain"))]) (passmm . [(20210109 8) ((emacs (24 4)) (password-store (0))) "A minor mode for pass (Password Store)." single ((:commit . "d78d1bf4f397180d2256248df589f33aafb4c8b4") (:authors ("Peter Jones" . "pjones@devalot.com")) (:maintainer "Peter Jones" . "pjones@devalot.com") (:url . "https://github.com/pjones/passmm"))]) @@ -3715,7 +3717,7 @@ (pc-bufsw . [(20201011 1918) nil "PC style quick buffer switcher" single ((:commit . "a7295e4813d636d5a20605d134acd42e4e4fe8fa") (:authors ("Igor Bukanov" . "igor@mir2.org")) (:maintainer "Igor Bukanov" . "igor@mir2.org") (:keywords "buffer") (:url . "https://github.com/ibukanov/pc-bufsw"))]) (pcache . [(20201226 634) ((emacs (25 1))) "persistent caching for Emacs." single ((:commit . "893d2a637423bae2cc5e72c559e3a9d1518797c9") (:authors ("Yann Hodique" . "yann.hodique@gmail.com")) (:maintainer "Yann Hodique" . "yann.hodique@gmail.com") (:keywords "extensions"))]) (pcap-mode . [(20161025 1448) ((emacs (24 3))) "Major mode for working with PCAP files" single ((:commit . "52780669af0ade136f84d73f21b4dbb7ab655416") (:authors ("Aaron Conole" . "aconole@bytheb.org")) (:maintainer "Aaron Conole" . "aconole@bytheb.org") (:keywords "pcap" "packets" "tcpdump" "wireshark" "tshark"))]) - (pcmpl-args . [(20220131 2316) ((emacs (25 1))) "Enhanced shell command completion" single ((:commit . "94a19b693a226aa11b15627e01f9f4c9af752bab") (:authors ("Jonathan Waltman" . "jonathan.waltman@gmail.com")) (:maintainer "Jonathan Waltman" . "jonathan.waltman@gmail.com") (:keywords "abbrev" "completion" "convenience" "processes" "terminals" "unix") (:url . "https://github.com/JonWaltman/pcmpl-args.el"))]) + (pcmpl-args . [(20220510 2056) ((emacs (25 1))) "Enhanced shell command completion" single ((:commit . "43229e1096f89c277190f09a3d794781f8fa0015") (:authors ("Jonathan Waltman" . "jonathan.waltman@gmail.com")) (:maintainer "Jonathan Waltman" . "jonathan.waltman@gmail.com") (:keywords "abbrev" "completion" "convenience" "processes" "terminals" "unix") (:url . "https://github.com/JonWaltman/pcmpl-args.el"))]) (pcmpl-git . [(20170121 59) nil "pcomplete for git" tar ((:commit . "9472ac70baeda025ef7becd1cf141d72aec93f32") (:authors ("Leo Liu" . "sdl.web@gmail.com")) (:maintainer "Leo Liu" . "sdl.web@gmail.com") (:keywords "tools"))]) (pcmpl-homebrew . [(20200911 742) nil "pcomplete for homebrew" single ((:commit . "a2044042dd498abad1dc06162a8ee0d70314ca40") (:authors ("zwild" . "judezhao@outlook.com")) (:maintainer "zwild" . "judezhao@outlook.com") (:keywords "pcomplete" "homebrew" "tools" "cask" "services"))]) (pcmpl-pip . [(20181229 1420) ((s (1 12 0)) (f (0 19 0)) (seq (2 15))) "pcomplete for pip" single ((:commit . "bc79228674ad5c1bc458c90dd8839790fb0a09e8") (:authors ("zwild" . "judezhao@outlook.com")) (:maintainer "zwild" . "judezhao@outlook.com") (:keywords "pcomplete" "pip" "python" "tools"))]) @@ -3724,7 +3726,7 @@ (pcsv . [(20150220 1131) nil "Parser of csv" single ((:commit . "798e0933f8d0818beb17aebf3b1056bbf74e03d0") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data") (:url . "https://github.com/mhayashi1120/Emacs-pcsv/raw/master/pcsv.el"))]) (pdb-capf . [(20200419 1237) ((emacs (25 1))) "Completion-at-point function for python debugger" single ((:commit . "2f4099aa1330f87df4e9cd526de057ee9b71de6c") (:authors ("Andrii Kolomoiets" . "andreyk.mad@gmail.com")) (:maintainer "Andrii Kolomoiets" . "andreyk.mad@gmail.com") (:keywords "languages" "abbrev" "convenience") (:url . "https://github.com/muffinmad/emacs-pdb-capf"))]) (pdb-mode . [(20150128 1751) nil "Major mode for editing Protein Data Bank files" single ((:commit . "855fb18ebb73b5df30c8d7677c2bcd0f361b138a") (:authors (nil . "charles.bond@uwa.edu.au")) (:maintainer nil . "aix.bing@gmail.com") (:keywords "data" "pdb") (:url . "http://bondxray.org/software/pdb-mode/"))]) - (pdf-tools . [(20220510 110) ((emacs (24 3)) (nadvice (0 3)) (tablist (1 0)) (let-alist (1 0 4))) "Support library for PDF documents" tar ((:commit . "ab61b0472980200f52e2e23782bc07255baebe72") (:authors ("Andreas Politz" . "mail@andreas-politz.de")) (:maintainer "Vedang Manerikar" . "vedang.manerikar@gmail.com") (:keywords "files" "multimedia") (:url . "http://github.com/vedang/pdf-tools/"))]) + (pdf-tools . [(20220512 145) ((emacs (24 3)) (nadvice (0 3)) (tablist (1 0)) (let-alist (1 0 4))) "Support library for PDF documents" tar ((:commit . "fedd930a09a497c03df3ce5204ccbd80da724662") (:authors ("Andreas Politz" . "mail@andreas-politz.de")) (:maintainer "Vedang Manerikar" . "vedang.manerikar@gmail.com") (:keywords "files" "multimedia") (:url . "http://github.com/vedang/pdf-tools/"))]) (pdf-view-restore . [(20190904 1708) ((pdf-tools (0 90)) (emacs (26 0))) "Support for opening last known pdf position in pdfview mode" single ((:commit . "5a1947c01a3edecc9e0fe7629041a2f53e0610c9") (:authors ("Kevin Kim" . "kevinkim1991@gmail.com")) (:maintainer "Kevin Kim" . "kevinkim1991@gmail.com") (:keywords "files" "convenience") (:url . "https://github.com/007kevin/pdf-view-restore"))]) (pdfgrep . [(20210203 1730) ((emacs (24 4))) "run `pdfgrep' and display the results." single ((:commit . "a4ca0a1e6521de93f28bb6736a5344b4974d144c") (:authors ("Jérémy Compostella" . "jeremy.compostella@gmail.com")) (:maintainer "Jérémy Compostella" . "jeremy.compostella@gmail.com") (:keywords "extensions" "mail" "pdf" "grep") (:url . "https://github.com/jeremy-compostella/pdfgrep"))]) (peacock-theme . [(20170808 1320) ((emacs (24 0))) "an Emacs 24 theme based on Peacock (tmTheme)" single ((:commit . "9e46fbfb562b6e26c6e3d6d618b044b3694da4c8") (:authors ("Jason Milkins")) (:maintainer "Jason Milkins") (:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))]) @@ -3764,7 +3766,7 @@ (phoenix-dark-pink-theme . [(20190821 48) nil "Originally a port of the Sublime Text 2 theme" single ((:commit . "ddd98a45775be105984ec598384e68df3d3e8046") (:authors ("J Irving" . "j@lollyshouse.ca")) (:maintainer "J Irving" . "j@lollyshouse.ca") (:url . "http://github.com/j0ni/phoenix-dark-pink"))]) (php-boris . [(20130527 821) nil "Run boris php REPL" single ((:commit . "f2faebf610c917f7091f7ec0cd97645629c4f819") (:authors ("Tom Regner")) (:maintainer "Tom Regner" . "tom@goochesa.de") (:keywords "php" "commint" "repl" "boris"))]) (php-boris-minor-mode . [(20140209 1835) ((php-boris (0 0 1)) (highlight (0))) "a minor mode to evaluate PHP code in the Boris repl" single ((:commit . "c70e176dd6545f2d42ca3427e87b469635616d8a") (:authors ("steckerhalter")) (:maintainer "steckerhalter") (:keywords "php" "repl" "eval") (:url . "https://github.com/steckerhalter/php-boris-minor-mode"))]) - (php-cs-fixer . [(20210923 718) ((cl-lib (0 5))) "php-cs-fixer wrapper." single ((:commit . "7e12a1af5d65cd8a801eeb5564c6268a4e190c0c") (:authors ("Philippe Ivaldi for OVYA")) (:maintainer "Philippe Ivaldi for OVYA") (:keywords "languages" "php") (:url . "https://github.com/OVYA/php-cs-fixer"))]) + (php-cs-fixer . [(20220516 1008) ((cl-lib (0 5))) "php-cs-fixer wrapper." single ((:commit . "efe4368d891f1eec6311363cfd6be3e9eadb5e0a") (:authors ("Philippe Ivaldi for OVYA")) (:maintainer "Philippe Ivaldi for OVYA") (:keywords "languages" "php") (:url . "https://github.com/OVYA/php-cs-fixer"))]) (php-eldoc . [(20140202 1941) nil "eldoc backend for php" tar ((:commit . "df05064146b884d9081e10657e32dc480f070cfe") (:authors ("sabof")) (:maintainer "sabof") (:url . "https://github.com/sabof/php-eldoc"))]) (php-mode . [(20220120 1959) ((emacs (25 2))) "Major mode for editing PHP code" tar ((:commit . "4503672471b8fdaaea6c454344817a119c87fcc6") (:authors ("Eric James Michael Ritz")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "languages" "php") (:url . "https://github.com/emacs-php/php-mode"))]) (php-quickhelp . [(20210819 2025) ((emacs (25 1))) "Quickhelp at point for php" single ((:commit . "d5e11b7a6bad64550521e8822139a33218b8c9bb") (:authors ("Vincenzo Pupillo")) (:maintainer "Vincenzo Pupillo") (:url . "https://github.com/vpxyz/php-quickhelp"))]) @@ -3791,7 +3793,7 @@ (pinyin-search . [(20160515 358) ((pinyinlib (0 1 0))) "Search Chinese by Pinyin" single ((:commit . "2e877a76851009d41bde66eb33182a03a7f04262") (:authors ("Chunyang Xu" . "xuchunyang56@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang56@gmail.com") (:keywords "chinese" "search") (:url . "https://github.com/xuchunyang/pinyin-search.el"))]) (pinyinlib . [(20200911 1723) nil "Convert first letter of Pinyin to Simplified/Traditional Chinese characters" single ((:commit . "1772c79b6f319b26b6a394a8dda065be3ea4498d") (:authors ("Junpeng Qiu" . "qjpchmail@gmail.com")) (:maintainer "Junpeng Qiu" . "qjpchmail@gmail.com") (:keywords "extensions"))]) (pip-requirements . [(20181027 1629) ((dash (2 8 0))) "A major mode for editing pip requirements files." single ((:commit . "216cd1690f80cc965d4ae47b8753fc185f778ff6") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk"))]) - (pipenv . [(20210127 1444) ((emacs (25 1)) (s (1 12 0)) (pyvenv (1 20))) "A Pipenv porcelain" single ((:commit . "8f50c68d415307a2cbc65cc4df20df18e1776e9b") (:authors ("Paul Walsh" . "paulywalsh@gmail.com")) (:maintainer "Paul Walsh" . "paulywalsh@gmail.com") (:url . "https://github.com/pwalsh/pipenv.el"))]) + (pipenv . [(20220514 123) ((emacs (25 1)) (s (1 12 0)) (pyvenv (1 20)) (load-env-vars (0 0 2))) "A Pipenv porcelain" single ((:commit . "3af159749824c03f59176aff7f66ddd6a5785a10") (:authors ("Paul Walsh" . "paulywalsh@gmail.com")) (:maintainer "Paul Walsh" . "paulywalsh@gmail.com") (:url . "https://github.com/pwalsh/pipenv.el"))]) (pippel . [(20220416 1743) ((emacs (25 1)) (s (1 11 0)) (dash (2 12 0))) "Frontend to python package manager pip" tar ((:commit . "cb194952ee150e77601d3233dabdb521b976ee79") (:authors ("Fritz Stelzer" . "brotzeitmacher@gmail.com")) (:maintainer "Arif Er" . "arifer612@protonmail.me") (:url . "https://github.com/arifer612/pippel"))]) (pixie-mode . [(20180626 541) ((clojure-mode (3 0 1)) (inf-clojure (1 0 0))) "Major mode for Pixie-lang" single ((:commit . "a40c2632cfbe948852a5cdcfd44e6a65db11834d") (:authors ("John Walker" . "john.lou.walker@gmail.com")) (:maintainer "John Walker" . "john.lou.walker@gmail.com") (:url . "https://github.com/johnwalker/pixie-mode"))]) (pixiv-novel-mode . [(20160220 1421) nil "Major mode for pixiv novel" single ((:commit . "0d1ca524d92b91f20a7105402a773bc21779b434") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "novel" "pixiv"))]) @@ -3911,7 +3913,7 @@ (project-mode-line-tag . [(20211013 1954) ((emacs (25 1))) "Display a buffer's project in its mode line" single ((:commit . "69d44e5495185587ee8577f8b9d616063d6bd7f8") (:authors ("Fritz Grabo" . "hello@fritzgrabo.com")) (:maintainer "Fritz Grabo" . "hello@fritzgrabo.com") (:keywords "convenience") (:url . "https://github.com/fritzgrabo/project-mode-line-tag"))]) (project-persist . [(20180906 1302) nil "A minor mode to allow loading and saving of project settings." tar ((:commit . "26d9435bef44da2a1b0892eba822f9f487b98eec") (:authors ("Robert Dallas Gray")) (:maintainer "Robert Dallas Gray") (:keywords "project" "persistence") (:url . "https://github.com/rdallasgray/project-persist"))]) (project-persist-drawer . [(20151108 1222) ((project-persist (0 3))) "Use a project drawer with project-persist." tar ((:commit . "35bbe132a4fab6a0fec15ce6c0fd2fe6a4aa9626") (:authors ("Robert Dallas Gray" . "mail@robertdallasgray.com")) (:maintainer "Robert Dallas Gray" . "mail@robertdallasgray.com") (:keywords "defaults") (:url . "https://github.com/rdallasgray/project-persist-drawer.git"))]) - (project-rootfile . [(20220509 1552) ((emacs (27 1))) "Extension of project.el to detect project with root file" single ((:commit . "fe2c8442ec501b0a0ef2f723bcbc41b2103011be") (:authors ("Taiki Sugawara" . "buzz.taiki@gmail.com")) (:maintainer "Taiki Sugawara" . "buzz.taiki@gmail.com") (:url . "https://github.com/buzztaiki/project-rootfile.el"))]) + (project-rootfile . [(20220516 1419) ((emacs (27 1))) "Extension of project.el to detect project with root file" single ((:commit . "ec33877552a5dabebca4ab272677a7fbaf98864f") (:authors ("Taiki Sugawara" . "buzz.taiki@gmail.com")) (:maintainer "Taiki Sugawara" . "buzz.taiki@gmail.com") (:url . "https://github.com/buzztaiki/project-rootfile.el"))]) (project-shells . [(20210625 647) ((emacs (24 3)) (seq (2 19))) "Manage the shell buffers of each project" single ((:commit . "900369828f1a213c60a2207a71d46bc43fd5405c") (:authors ("\"Huang, Ying\"" . "huang.ying.caritas@gmail.com")) (:maintainer "\"Huang, Ying\"" . "huang.ying.caritas@gmail.com") (:keywords "processes" "terminals") (:url . "https://github.com/hying-caritas/project-shells"))]) (project-tab-groups . [(20220331 918) ((emacs (28))) "Support a \"one tab group per project\" workflow" single ((:commit . "837267a23fa57199599b96af94c2db2e80a859d3") (:authors ("Fritz Grabo" . "hello@fritzgrabo.com")) (:maintainer "Fritz Grabo" . "hello@fritzgrabo.com") (:keywords "convenience") (:url . "https://github.com/fritzgrabo/project-tab-groups"))]) (projectile . [(20220430 800) ((emacs (25 1))) "Manage and navigate projects in Emacs easily" single ((:commit . "a4f86f981c84a546530d5904253fa266431ef806") (:authors ("Bozhidar Batsov" . "bozhidar@batsov.dev")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.dev") (:keywords "project" "convenience") (:url . "https://github.com/bbatsov/projectile"))]) @@ -3935,7 +3937,7 @@ (propfont-mixed . [(20150113 2211) ((emacs (24)) (cl-lib (0 5))) "Use proportional fonts with space-based indentation." single ((:commit . "0b461ef4754a469610dba71874a34b6da42176bf") (:authors ("Kirill Ignatiev <github.com/ikirill>")) (:maintainer "Kirill Ignatiev <github.com/ikirill>") (:keywords "faces") (:url . "https://github.com/ikirill/propfont-mixed"))]) (proportional . [(20200309 1556) ((emacs (25 1))) "use a proportional font everywhere" single ((:commit . "0e4537af7ba2bc9dbb449c38350bce012b382f51") (:authors ("Johannes Goslar")) (:maintainer "Johannes Goslar") (:keywords "faces") (:url . "https://github.com/ksjogo/proportional"))]) (prosjekt . [(20151127 1416) ((dash (2 8 0))) "a software project tool for emacs" tar ((:commit . "a864a8be5842223043702395f311e3350c28e9db") (:authors ("Austin Bingham" . "austin.bingham@gmail.com")) (:maintainer "Austin Bingham" . "austin.bingham@gmail.com") (:url . "https://github.com/abingham/prosjekt"))]) - (protobuf-mode . [(20220303 1716) nil "major mode for editing protocol buffers." single ((:commit . "354aba886e07c18a233dc33a9895c5d4f8f0bc08") (:authors ("Alexandre Vassalotti" . "alexandre@peadrop.com")) (:maintainer "Alexandre Vassalotti" . "alexandre@peadrop.com") (:keywords "google" "protobuf" "languages"))]) + (protobuf-mode . [(20220303 1716) nil "major mode for editing protocol buffers." single ((:commit . "b3199d62be2af7f2ddd60a002e0f48850df09997") (:authors ("Alexandre Vassalotti" . "alexandre@peadrop.com")) (:maintainer "Alexandre Vassalotti" . "alexandre@peadrop.com") (:keywords "google" "protobuf" "languages"))]) (protocols . [(20170802 1132) ((cl-lib (0 5))) "Protocol database access functions." single ((:commit . "d0f7c4acb05465f1a0d4be54363bbd2802647e77") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "convenience" "net" "protocols") (:url . "https://github.com/davep/protocols.el"))]) (proxy-mode . [(20220210 1410) ((emacs (25))) "A minor mode to toggle proxy." single ((:commit . "620e48c6afaf760d0ee9f5bdf583fd91cd9d0ec6") (:keywords "comm" "proxy") (:url . "https://repo.or.cz/proxy-mode.git"))]) (psalm . [(20211002 1552) ((emacs (24 3)) (php-mode (1 22 3))) "Interface to Psalm" single ((:commit . "28d546a79cb865a78b94cd7e929d66d720505faa") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "tools" "php") (:url . "https://github.com/emacs-php/psalm.el"))]) @@ -3951,7 +3953,7 @@ (pulseaudio-control . [(20220418 742) nil "Use `pactl' to manage PulseAudio volumes." single ((:commit . "22f54ae7282b37eaec0231a21e60213a5dbc7172") (:authors ("Alexis" . "flexibeast@gmail.com") ("Ellington Santos" . "ellingtonsantos@gmail.com") ("Sergey Trofimov" . "sarg@sarg.org.ru")) (:maintainer "Alexis" . "flexibeast@gmail.com") (:keywords "multimedia" "hardware" "sound" "pulseaudio") (:url . "https://github.com/flexibeast/pulseaudio-control"))]) (punctuality-logger . [(20141120 2031) nil "Punctuality logger for Emacs" single ((:commit . "e09e5dd37bc92289fa2f7dc44aed51a7b5e04bb0") (:authors ("Philip Woods" . "elzairthesorcerer@gmail.com")) (:maintainer "Philip Woods" . "elzairthesorcerer@gmail.com") (:keywords "reminder" "calendar") (:url . "https://gitlab.com/elzair/punctuality-logger"))]) (pungi . [(20150222 1246) ((jedi (0 2 0 -3 2)) (pyvenv (1 5))) "Integrates jedi with virtualenv and buildout python environments" single ((:commit . "a2d4d439ea371be0b064a12248288903b8a521a0") (:authors ("Matthew Russell" . "matthew.russell@horizon5.org")) (:maintainer "Matthew Russell" . "matthew.russell@horizon5.org") (:keywords "convenience"))]) - (puni . [(20220405 1808) ((emacs (26 1))) "Parentheses Universalistic" single ((:commit . "bb9b1e271b51b3dfae984da15f0e40f5be5b2473") (:authors ("Hao Wang" . "amaikinono@gmail.com")) (:maintainer "Hao Wang" . "amaikinono@gmail.com") (:keywords "convenience" "lisp" "tools") (:url . "https://github.com/AmaiKinono/puni"))]) + (puni . [(20220514 1722) ((emacs (26 1))) "Parentheses Universalistic" single ((:commit . "9757b6b5533bede372b03fdaa375987a0840eb5e") (:authors ("Hao Wang" . "amaikinono@gmail.com")) (:maintainer "Hao Wang" . "amaikinono@gmail.com") (:keywords "convenience" "lisp" "tools") (:url . "https://github.com/AmaiKinono/puni"))]) (punpun-theme . [(20210508 1635) ((emacs (24 1))) "A bleak theme" tar ((:commit . "7026684cd568cb691af3ced5de14c375fe6f5a1a"))]) (puppet-mode . [(20210305 645) ((emacs (24 1)) (pkg-info (0 4))) "Major mode for Puppet manifests" single ((:commit . "71bcd383f20a457e8ad34e0e08ec47f8e1b64263") (:authors ("Vox Pupuli" . "voxpupuli@groups.io") ("Bozhidar Batsov" . "bozhidar@batsov.com") ("Sebastian Wiesner" . "swiesner@lunaryorn.com") ("Russ Allbery" . "rra@stanford.edu")) (:maintainer "Vox Pupuli" . "voxpupuli@groups.io") (:keywords "languages") (:url . "https://github.com/voxpupuli/puppet-mode"))]) (purescript-mode . [(20210109 244) ((emacs (25 1))) "A PureScript editing mode" tar ((:commit . "9c37067e611b5253a095f03245c247aa97bd7614") (:authors ("1992 Simon Marlow") ("1997-1998 Graeme E Moss" . "gem@cs.york.ac.uk") ("Tommy Thorn" . "thorn@irisa.fr") ("2001-2002 Reuben Thomas (>=v1.4)") ("2003 Dave Love" . "fx@gnu.org") ("2014 Tim Dysinger" . "tim@dysinger.net")) (:maintainer "1992 Simon Marlow") (:keywords "faces" "files" "purescript") (:url . "https://github.com/purescript-emacs/purescript-mode"))]) @@ -3970,12 +3972,12 @@ (py-yapf . [(20160925 1122) nil "Use yapf to beautify a Python buffer" single ((:commit . "a878304202ad827a1f3de3dce1badd9ca8731146") (:authors ("Friedrich Paetzke" . "f.paetzke@gmail.com")) (:maintainer "Friedrich Paetzke" . "f.paetzke@gmail.com") (:url . "https://github.com/paetzke/py-yapf.el"))]) (pycarddavel . [(20150831 1216) ((helm (1 7 0)) (emacs (24 0))) "Integrate pycarddav" single ((:commit . "a6d81ee4eb8309cd82f6082aeca68c5a015702a3") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "helm" "pyccarddav" "carddav" "message" "mu4e" "contacts"))]) (pycoverage . [(20200513 2047) ((emacs (24 3))) "Support for coverage stats on Python 2.X and 3" tar ((:commit . "3c69ed312121368f1b24cc04d54a29ce4ed4f743") (:authors ("matt harrison")) (:maintainer "matt harrison") (:keywords "project" "convenience") (:url . "https://github.com/mattharrison/pycoverage.el"))]) - (pydoc . [(20211119 2211) nil "functional, syntax highlighted pydoc navigation" single ((:commit . "3aaffe41e1c5a9d53fbc1de02686c386fd002890") (:authors ("John Kitchin" . "jkitchin@andrew.cmu.edu")) (:maintainer "Brian J. Lopes" . "statmobile@gmail.com") (:keywords "pydoc" "python") (:url . "https://github.com/statmobile/pydoc"))]) + (pydoc . [(20220513 2059) nil "functional, syntax highlighted pydoc navigation" single ((:commit . "604c12e19deeae60b9416c1ac0454fd9bce5e6ce") (:authors ("John Kitchin" . "jkitchin@andrew.cmu.edu")) (:maintainer "Brian J. Lopes" . "statmobile@gmail.com") (:keywords "pydoc" "python") (:url . "https://github.com/statmobile/pydoc"))]) (pyenv-mode . [(20200518 1521) ((pythonic (0 1 0))) "Integrate pyenv with python-mode" single ((:commit . "b818901b8eac0e260ced66a6a5acabdbf6f5ba99") (:authors ("Artem Malyshev" . "proofit404@gmail.com")) (:maintainer "Artem Malyshev" . "proofit404@gmail.com") (:url . "https://github.com/proofit404/pyenv-mode"))]) (pyenv-mode-auto . [(20180620 1252) ((pyenv-mode (0 1 0)) (s (1 11 0)) (f (0 17 0))) "Automatically activates pyenv version if .python-version file exists." single ((:commit . "347b94cd5ad22e33cc41be661c102d4548767858") (:authors ("Sviatoslav Bulbakha" . "mail@ssbb.me")) (:maintainer "Sviatoslav Bulbakha" . "mail@ssbb.me") (:keywords "python" "pyenv") (:url . "https://github.com/ssbb/pyenv-mode-auto"))]) (pygen . [(20161121 506) ((elpy (1 12 0)) (python-mode (6 2 2)) (dash (2 13 0))) "Python code generation using Elpy and Python-mode." single ((:commit . "9019ff44ba49d7295b1476530feab91fdadb084b") (:authors ("Jack Crawley <http://www.github.com/jackcrawley>")) (:maintainer "Jack Crawley <http://www.github.com/jackcrawley>") (:keywords "python" "code generation") (:url . "https://github.com/JackCrawley/pygen/"))]) (pygn-mode . [(20211021 2325) ((emacs (26 1)) (tree-sitter (0 15 2)) (tree-sitter-langs (0 10 7)) (uci-mode (0 5 4)) (nav-flash (1 0 0)) (ivy (0 10 0))) "Major-mode for chess PGN files, powered by Python" tar ((:commit . "eb1da7e3eb5f5754b60d404b0e341206eebe19ca") (:authors ("Dodge Coates and Roland Walker")) (:maintainer "Dodge Coates and Roland Walker") (:keywords "data" "games" "chess") (:url . "https://github.com/dwcoates/pygn-mode"))]) - (pyim . [(20220509 405) ((emacs (25 1)) (async (1 6)) (xr (1 13))) "A Chinese input method support quanpin, shuangpin, wubi, cangjie and rime." tar ((:commit . "3339ffac4bb116f09754f1ed262e8bede2df2bf1") (:authors ("Ye Wenbin" . "wenbinye@163.com") ("Feng Shu" . "tumashu@163.com")) (:maintainer "Feng Shu" . "tumashu@163.com") (:keywords "convenience" "chinese" "pinyin" "input-method") (:url . "https://github.com/tumashu/pyim"))]) + (pyim . [(20220513 605) ((emacs (25 1)) (async (1 6)) (xr (1 13))) "A Chinese input method support quanpin, shuangpin, wubi, cangjie and rime." tar ((:commit . "1208a9dcbc029865bbd75621e9035c8f44def15f") (:authors ("Ye Wenbin" . "wenbinye@163.com") ("Feng Shu" . "tumashu@163.com")) (:maintainer "Feng Shu" . "tumashu@163.com") (:keywords "convenience" "chinese" "pinyin" "input-method") (:url . "https://github.com/tumashu/pyim"))]) (pyim-basedict . [(20210517 43) nil "The default pinyin dict of pyim" tar ((:commit . "86f6de3e3a1523eb278bd3afe7c4ceba2a0e2972") (:authors ("Feng Shu" . "tumashu@163.com")) (:maintainer "Feng Shu" . "tumashu@163.com") (:keywords "convenience" "chinese" "pinyin" "input-method" "complete") (:url . "https://github.com/tumashu/pyim-basedict"))]) (pyim-cangjiedict . [(20210617 934) ((pyim (3 7))) "Some cangjie dicts for pyim" tar ((:commit . "d17e3d32a6480939b350a91a915ebe8e6efad819") (:authors ("Yuanchen Xie" . "yuanchen.gm@gmail.com")) (:maintainer "Yuanchen Xie" . "yuanchen.gm@gmail.com") (:keywords "convenience" "chinese" "pinyin" "input-method" "complete") (:url . "https://github.com/p1uxtar/pyim-cangjiedict"))]) (pyim-smzmdict . [(20210505 1445) ((pyim (3 7))) "Sanma(triple) Zhengma dict for pyim" tar ((:commit . "fcddbde17a04d174c7353548056524687f7be8d2") (:authors ("Yue Shi (Zhizhi)")) (:maintainer "Yuanchen Xie") (:keywords "convenience" "i18n" "pyim" "chinese" "zhengma") (:url . "https://github.com/p1uxtar/pyim-smzmdict"))]) @@ -3983,7 +3985,7 @@ (pyimport . [(20180308 1752) ((dash (2 8 0)) (s (1 9 0)) (shut-up (0 3 2))) "Manage Python imports!" single ((:commit . "a6f63cf7ed93f0c0f7c207e6595813966f8852b9") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk"))]) (pyimpsort . [(20160130 453) ((emacs (24 3))) "Sort python imports." tar ((:commit . "d5c61d70896b642646dfd3c809c06174ae086c1a") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience") (:url . "https://github.com/emacs-pe/pyimpsort.el"))]) (pyinspect . [(20211102 1415) ((emacs (27 1))) "Python object inspector" tar ((:commit . "36cf624236c8b4cce852dd52b64d058d4d4a32fd") (:authors ("Maor Kadosh" . "git@avocadosh.xyz")) (:maintainer "Maor Kadosh" . "git@avocadosh.xyz") (:keywords "tools") (:url . "https://github.com/it-is-wednesday/pyinspect.el"))]) - (pylint . [(20210411 1931) nil "minor mode for running `pylint'" single ((:commit . "874cb4339aac8100806ac7ca9701f4f519080288") (:authors ("Ian Eure" . "ian.eure@gmail.com")) (:maintainer "Jonathan Kotta" . "jpkotta@gmail.com") (:keywords "languages" "python"))]) + (pylint . [(20210411 1931) nil "minor mode for running `pylint'" single ((:commit . "5ab99efdd62751d58b82287e8a05b44532441d8e") (:authors ("Ian Eure" . "ian.eure@gmail.com")) (:maintainer "Jonathan Kotta" . "jpkotta@gmail.com") (:keywords "languages" "python"))]) (pynt . [(20180710 726) ((emacs (24 4)) (ein (0 13 1)) (epc (0 1 1)) (deferred (0 5 1))) "Generate and scroll EIN buffers from python code" single ((:commit . "86cf9ce78d34f92bfd0764c9cbb75427ebd429e6") (:authors ("Edward Banner" . "edward.banner@gmail.com")) (:maintainer "Edward Banner" . "edward.banner@gmail.com") (:keywords "convenience") (:url . "https://github.com/ebanner/pynt"))]) (pyramid . [(20210427 1032) ((emacs (25 2)) (pythonic (0 1 1)) (tablist (0 70))) "Minor mode for working with pyramid projects" tar ((:commit . "66f54f4a9cc9fa81edf768ab433d5b3c5517363c") (:authors ("Daniel Kraus" . "daniel@kraus.my")) (:maintainer "Daniel Kraus" . "daniel@kraus.my") (:keywords "python" "pyramid" "pylons" "convenience" "tools" "processes") (:url . "https://github.com/dakra/pyramid.el"))]) (pytest . [(20200330 41) ((s (1 9 0))) "Easy Python test running in Emacs" single ((:commit . "6934047242db79b1c53e9fe3e0734cc9719ed1c4") (:keywords "pytest" "python" "testing") (:url . "https://github.com/ionrock/pytest-el"))]) @@ -3998,7 +4000,7 @@ (python-insert-docstring . [(20211127 1232) ((emacs (25 1))) "Python Google docstring inserter" single ((:commit . "cd6419b74c99c06d5c48c1b289572acce1fd193b") (:authors ("Marco Vocialta" . "macurovc@tutanota.com")) (:maintainer "Marco Vocialta" . "macurovc@tutanota.com") (:url . "https://github.com/macurovc/insert-docstring"))]) (python-isort . [(20210603 2153) ((emacs (26)) (reformatter (0 6))) "Reformat python-mode buffer with isort" single ((:commit . "339814df22b87eebca02137e581f65d6283fce97") (:authors ("Jimmy Yuen Ho Wong" . "wyuenho@gmail.com")) (:maintainer "Jimmy Yuen Ho Wong" . "wyuenho@gmail.com") (:keywords "languages") (:url . "https://github.com/wyuenho/emacs-python-isort"))]) (python-mls . [(20220505 1523) ((emacs (27 1))) "Multi-line shell for (i)Python" single ((:commit . "6016c780865b3b9dcf90d9452367e0d39bbc1d1f") (:authors ("J.D. Smith")) (:maintainer "J.D. Smith") (:keywords "languages" "processes") (:url . "https://github.com/jdtsmith/python-mls"))]) - (python-mode . [(20220509 1820) nil "Python major mode" tar ((:commit . "2933e707a09fb99942a062cfb41aa67a2bb64f8e") (:authors ("2015-2021 https://gitlab.com/groups/python-mode-devs") ("2003-2014 https://launchpad.net/python-mode") ("1995-2002 Barry A. Warsaw") ("1992-1994 Tim Peters")) (:maintainer nil . "python-mode@python.org") (:keywords "languages" "processes" "python" "oop") (:url . "https://gitlab.com/groups/python-mode-devs"))]) + (python-mode . [(20220512 1206) nil "Python major mode" tar ((:commit . "97bb2d5ca50bec43a22ffc6187d13e3afb38238f") (:authors ("2015-2021 https://gitlab.com/groups/python-mode-devs") ("2003-2014 https://launchpad.net/python-mode") ("1995-2002 Barry A. Warsaw") ("1992-1994 Tim Peters")) (:maintainer nil . "python-mode@python.org") (:keywords "languages" "processes" "python" "oop") (:url . "https://gitlab.com/groups/python-mode-devs"))]) (python-pytest . [(20220502 1237) ((emacs (24 4)) (dash (2 18 0)) (transient (0 3 7)) (projectile (0 14 0)) (s (1 12 0))) "helpers to run pytest" single ((:commit . "5e72c343cb81866358e4437390c5eb84c3203440") (:authors ("wouter bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "wouter bolsterlee" . "wouter@bolsterl.ee") (:keywords "pytest" "test" "python" "languages" "processes" "tools") (:url . "https://github.com/wbolster/emacs-python-pytest"))]) (python-switch-quotes . [(20161228 809) ((emacs (24 3))) "cycle between ' and \" quotes in python strings" single ((:commit . "93f1e9b40e061a6cea480139e8b1362b6404abd0") (:authors ("Vladimir Lagunov" . "lagunov.vladimir@gmail.com")) (:maintainer "Vladimir Lagunov" . "lagunov.vladimir@gmail.com") (:keywords "python" "tools" "convenience") (:url . "https://github.com/werehuman/python-switch-quotes"))]) (python-test . [(20181018 29) ((emacs (25 1))) "Python testing integration" single ((:commit . "f899975b133539e19ba822e4b0bfd1a28572967e") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience" "tools" "processes") (:url . "https://github.com/emacs-pe/python-test.el"))]) @@ -4015,7 +4017,7 @@ (quarto-mode . [(20220405 1556) ((emacs (25 1)) (polymode (0 2 2)) (poly-markdown (0 2 2)) (markdown-mode (2 3)) (request (0 3 2))) "A (poly)mode for https://quarto.org" single ((:commit . "2a199735866dc34126a061c6f2990378b381e687") (:authors ("Carlos Scheidegger")) (:maintainer "Carlos Scheidegger") (:keywords "languages" "multi-modes") (:url . "https://github.com/quarto-dev/quarto-emacs"))]) (quasi-monochrome-theme . [(20200415 705) nil "Quasi Monochrome theme" tar ((:commit . "b38d71860fdea945e10e8a766ac9dfa1410ade67") (:authors ("Lorenzo Bolla" . "lbolla@gmail.com")) (:maintainer "Lorenzo Bolla" . "lbolla@gmail.com") (:keywords "color-theme" "monochrome" "high contrast") (:url . "https://github.com/lbolla/emacs-quasi-monochrome"))]) (quelpa . [(20211228 248) ((emacs (25 1))) "Emacs Lisp packages built directly from source" tar ((:commit . "54fc5b951f103fadba25dde38274964737815883") (:authors ("steckerhalter")) (:maintainer "steckerhalter") (:keywords "tools" "package" "management" "build" "source" "elpa") (:url . "https://github.com/quelpa/quelpa"))]) - (quelpa-leaf . [(20210124 348) ((emacs (25 1)) (quelpa (1 0)) (leaf (4 1 0))) "Quelpa handler for leaf" single ((:commit . "e220893d29a095234076be1b255fade11f6410b8") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/quelpa/quelpa-leaf"))]) + (quelpa-leaf . [(20210124 348) ((emacs (25 1)) (quelpa (1 0)) (leaf (4 1 0))) "Quelpa handler for leaf" single ((:commit . "ea60d14a6c8dbe65ad0b3353185945d43ae4393d") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/quelpa/quelpa-leaf"))]) (quelpa-use-package . [(20201022 746) ((emacs (25 1)) (quelpa (1 0)) (use-package (2))) "quelpa handler for use-package" single ((:commit . "d985c0326b66aa19581918deccdc5edcacccf953") (:authors ("steckerhalter")) (:maintainer "steckerhalter") (:keywords "package" "management" "elpa" "use-package") (:url . "https://github.com/quelpa/quelpa-use-package"))]) (quick-buffer-switch . [(20201027 2307) nil "Quick switch to file or dir buffers." single ((:commit . "da82555f286588f171eed1de151325bbdd8cbd91") (:authors ("Sebastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>")) (:maintainer "Sebastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>") (:keywords "emacs" "configuration"))]) (quick-peek . [(20200130 2059) ((emacs (24 3))) "Inline quick-peek windows" single ((:commit . "03a276086795faad46a142454fc3e28cab058b70") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "tools" "help" "doc" "convenience"))]) @@ -4028,7 +4030,7 @@ (quiz . [(20190525 1206) ((cl-lib (0 5)) (emacs (25))) "Multiple choice quiz game" single ((:commit . "570bf53926d89282cdb9653bd5aa8fe968f92bbd") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "games" "trivia" "quiz") (:url . "https://github.com/davep/quiz.el"))]) (r-autoyas . [(20140101 1510) ((ess (0)) (yasnippet (0 8 0))) "Provides automatically created yasnippets for R function argument lists." tar ((:commit . "b4020ee7f5f895e0065b8b26da8a49c51432d530") (:authors ("Sven Hartenstein & Matthew Fidler")) (:maintainer "Matthew Fidler") (:keywords "r" "yasnippet") (:url . "https://github.com/mlf176f2/r-autoyas.el"))]) (racer . [(20210307 243) ((emacs (25 1)) (rust-mode (0 2 0)) (dash (2 13 0)) (s (1 10 0)) (f (0 18 2)) (pos-tip (0 4 6))) "code completion, goto-definition and docs browsing for Rust via racer" single ((:commit . "1e63e98626737ea9b662d4a9b1ffd6842b1c648c") (:authors ("Phil Dawes")) (:maintainer "Phil Dawes") (:keywords "abbrev" "convenience" "matching" "rust" "tools") (:url . "https://github.com/racer-rust/emacs-racer"))]) - (racket-mode . [(20220505 1350) ((emacs (25 1))) "Racket editing, REPL, and more" tar ((:commit . "fbb4a4664e2cc2b5d21eee62735f73b7f0272e60") (:authors ("Greg Hendershott")) (:maintainer "Greg Hendershott") (:url . "https://www.racket-mode.com/"))]) + (racket-mode . [(20220515 1531) ((emacs (25 1))) "Racket editing, REPL, and more" tar ((:commit . "2477f07e779cceb034d62a79f8afae92e0e794ff") (:authors ("Greg Hendershott")) (:maintainer "Greg Hendershott") (:url . "https://www.racket-mode.com/"))]) (rails-i18n . [(20220126 1643) ((emacs (27 2)) (yaml (0 1 0)) (dash (2 19 1))) "Seach and insert i18n on ruby code" single ((:commit . "8e87e4e48e31902b8259ded28a208c2e7efea6e9") (:authors ("Otávio Schwanck dos Santos" . "otavioschwanck@gmail.com")) (:maintainer "Otávio Schwanck dos Santos" . "otavioschwanck@gmail.com") (:keywords "tools" "languages") (:url . "https://github.com/otavioschwanck/rails-i18n.el"))]) (rails-log-mode . [(20140408 425) nil "Major mode for viewing Rails log files" single ((:commit . "ff440003ad7d47cb0ac3300f2a632f4cfd36a446") (:authors ("Anantha kumaran" . "ananthakumaran@gmail.com")) (:maintainer "Anantha kumaran" . "ananthakumaran@gmail.com") (:keywords "rails" "log"))]) (rails-routes . [(20220126 1631) ((emacs (27 2)) (inflections (1 1))) "Search for and insert rails routes" single ((:commit . "eab995a9297ca5bd9bd4f4c2737f2fecfc36def0") (:authors ("Otávio Schwanck" . "otavioschwanck@gmail.com")) (:maintainer "Otávio Schwanck" . "otavioschwanck@gmail.com") (:keywords "tools" "languages") (:url . "https://github.com/otavioschwanck/rails-routes"))]) @@ -4144,7 +4146,7 @@ (review-mode . [(20220215 842) nil "major mode for ReVIEW" single ((:commit . "f08ef20d9ff4f03a00a8c24dae9ce416da0d9d1c") (:authors ("Kenshi Muto" . "kmuto@kmuto.jp")) (:maintainer "Kenshi Muto" . "kmuto@kmuto.jp") (:url . "https://github.com/kmuto/review-el"))]) (reykjavik-theme . [(20201219 947) ((emacs (24))) "Theme with a dark background." single ((:commit . "f6d8e83946633603234cd1dac725e17447f40bce") (:authors ("martin haesler")) (:maintainer "martin haesler"))]) (rfc-mode . [(20210615 1721) ((emacs (25 1))) "RFC document browser and viewer" single ((:commit . "3ef663203b157e7c5b2cd3c425ec8fbe7977a24c") (:authors ("Nicolas Martyanoff" . "khaelin@gmail.com")) (:maintainer "Nicolas Martyanoff" . "khaelin@gmail.com") (:url . "https://github.com/galdor/rfc-mode"))]) - (rg . [(20220427 1613) ((emacs (25 1)) (transient (0 3 0)) (wgrep (2 1 10))) "A search tool based on ripgrep" tar ((:commit . "a6411f98a695d8b3ef0db156d41b2a62ca36ee7a") (:authors ("David Landell" . "david.landell@sunnyhill.email") ("Roland McGrath" . "roland@gnu.org")) (:maintainer "David Landell" . "david.landell@sunnyhill.email") (:keywords "matching" "tools") (:url . "https://github.com/dajva/rg.el"))]) + (rg . [(20220511 1328) ((emacs (25 1)) (transient (0 3 0)) (wgrep (2 1 10))) "A search tool based on ripgrep" tar ((:commit . "c46c5167ac03f68fd6fee07972017282c62bc942") (:authors ("David Landell" . "david.landell@sunnyhill.email") ("Roland McGrath" . "roland@gnu.org")) (:maintainer "David Landell" . "david.landell@sunnyhill.email") (:keywords "matching" "tools") (:url . "https://github.com/dajva/rg.el"))]) (rhq . [(20220329 1027) ((emacs (24 4))) "Client for rhq" single ((:commit . "46a3108436cc4a2c5343b010f2086088d7b9682b") (:authors ("ROCKTAKEY" . "rocktakey@gmail.com")) (:maintainer "ROCKTAKEY" . "rocktakey@gmail.com") (:keywords "tools" "extensions") (:url . "https://github.com/ROCKTAKEY/rhq"))]) (rhtml-mode . [(20130422 1311) nil "major mode for editing RHTML files" tar ((:commit . "a6d71b38a3db867ccf82999c99805db1a3a33c33"))]) (rib-mode . [(20170726 1448) ((emacs (24))) "RenderMan® Interface Bytestream (RIB) Major Mode" single ((:commit . "97470158784c3c212e22e2c20b8471ee65ba59af") (:authors ("Remik Ziemlinski and Daniel Blezek" . "daniel.blezek@gmail.com")) (:maintainer "Remik Ziemlinski and Daniel Blezek" . "daniel.blezek@gmail.com") (:url . "https://github.com/blezek/rib-mode"))]) @@ -4160,7 +4162,7 @@ (riscv-mode . [(20170804 1521) ((emacs (24 4))) "Major-mode for RISC V assembly" single ((:commit . "99febf97d1fa9441e8dada94fe30c2aa439c9749") (:authors ("Adam Niederer <https://github.com/AdamNiederer>")) (:maintainer "Adam Niederer") (:keywords "riscv" "assembly") (:url . "https://github.com/AdamNiederer/riscv-mode"))]) (rivet-mode . [(20201013 1905) ((emacs (24)) (web-mode (16))) "A minor mode for editing Apache Rivet files" single ((:commit . "3dd4fc28f29e4d4f43a881ed5816dea41a912419") (:authors ("Jade Michael Thornton")) (:maintainer "Jade Michael Thornton") (:url . "https://gitlab.com/thornjad/rivet-mode"))]) (rjsx-mode . [(20200120 1446) ((emacs (24 4)) (js2-mode (20170504))) "Real support for JSX" single ((:commit . "b697fe4d92cc84fa99a7bcb476f815935ea0d919") (:authors ("Felipe Ochoa" . "felipe@fov.space")) (:maintainer "Felipe Ochoa" . "felipe@fov.space") (:keywords "languages") (:url . "https://github.com/felipeochoa/rjsx-mode/"))]) - (rmsbolt . [(20220503 1708) ((emacs (25 1))) "A compiler output viewer" tar ((:commit . "de28f7903a3b895c3bf9628ac6d4db4378748fa8") (:authors ("Jay Kamat" . "jaygkamat@gmail.com")) (:maintainer "Jay Kamat" . "jaygkamat@gmail.com") (:keywords "compilation" "tools") (:url . "http://gitlab.com/jgkamat/rmsbolt"))]) + (rmsbolt . [(20220516 1559) ((emacs (25 1))) "A compiler output viewer" tar ((:commit . "b56d3b6cdbfa828144d3d8e559472064b0908d0e") (:authors ("Jay Kamat" . "jaygkamat@gmail.com")) (:maintainer "Jay Kamat" . "jaygkamat@gmail.com") (:keywords "compilation" "tools") (:url . "http://gitlab.com/jgkamat/rmsbolt"))]) (robe . [(20211208 205) ((inf-ruby (2 5 1)) (emacs (25 1))) "Code navigation, documentation lookup and completion for Ruby" tar ((:commit . "11207bd549a5a78e3a4d70265c3715990dcdab71") (:authors ("Dmitry Gutov")) (:maintainer "Dmitry Gutov") (:keywords "ruby" "convenience" "rails") (:url . "https://github.com/dgutov/robe"))]) (robot-mode . [(20210425 1925) ((emacs (26 1))) "Major-mode for Robot Framework files" single ((:commit . "e7e9c4d4750d048ad771fa735621ad813fa9c128") (:authors ("Kalle Kankare" . "kalle.kankare@iki.fi")) (:maintainer "Kalle Kankare" . "kalle.kankare@iki.fi") (:keywords "languages" "files") (:url . "https://github.com/kopoli/robot-mode"))]) (robots-txt-mode . [(20190812 1858) nil "Major mode for editing robots.txt" single ((:commit . "0d79161dfece3920600ad155ab1cc1a59da06964") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "languages" "comm" "web") (:url . "https://github.com/emacs-php/robots-txt-mode"))]) @@ -4203,7 +4205,7 @@ (rust-auto-use . [(20200608 1359) nil "Utility to automatically insert Rust use statements" single ((:commit . "d5205f7b9b9eae0f7d0893f87d3391464719f9c0") (:authors ("Rotem Yaari" . "rotemy@MBP.local")) (:maintainer "Rotem Yaari" . "rotemy@MBP.local") (:keywords "languages"))]) (rust-mode . [(20220217 2009) ((emacs (25 1))) "A major-mode for editing Rust source code" tar ((:commit . "d17be3051b22a06d7742178cd1367aed61807a66") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages") (:url . "https://github.com/rust-lang/rust-mode"))]) (rust-playground . [(20200116 1043) ((emacs (24 3))) "Local Rust playground for short code snippets." single ((:commit . "5a117781dcb66065bea7830dd73618008fc34949") (:authors ("Alexander I.Grafov" . "grafov@gmail.com")) (:maintainer "Alexander I.Grafov" . "grafov@gmail.com") (:keywords "tools" "rust") (:url . "https://github.com/grafov/rust-playground"))]) - (rustic . [(20220509 716) ((emacs (26 1)) (rust-mode (1 0 3)) (dash (2 13 0)) (f (0 18 2)) (let-alist (1 0 4)) (markdown-mode (2 3)) (project (0 3 0)) (s (1 10 0)) (seq (2 3)) (spinner (1 7 3)) (xterm-color (1 6))) "Rust development environment" tar ((:commit . "3b379fc25b7a097a014147d9c8b83ec1a418cd76") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))]) + (rustic . [(20220517 458) ((emacs (26 1)) (rust-mode (1 0 3)) (dash (2 13 0)) (f (0 18 2)) (let-alist (1 0 4)) (markdown-mode (2 3)) (project (0 3 0)) (s (1 10 0)) (seq (2 3)) (spinner (1 7 3)) (xterm-color (1 6))) "Rust development environment" tar ((:commit . "918049baf01d3639cbdbea22c48c5a2807dfefba") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))]) (rutils . [(20210805 608) ((emacs (26 1)) (ess (18 10 1)) (transient (0 3 0))) "R utilities with transient" tar ((:commit . "e216db63a2ccd50fe5c80679fc5b929dd2c114e8") (:authors ("Shuguang Sun" . "shuguang79@qq.com")) (:maintainer "Shuguang Sun" . "shuguang79@qq.com") (:keywords "convenience") (:url . "https://github.com/ShuguangSun/rutils.el"))]) (rvm . [(20201222 17) nil "Emacs integration for rvm" single ((:commit . "c1f2642434b0f68d9baa0687127079ecd884ba12") (:authors ("Yves Senn" . "yves.senn@gmx.ch")) (:maintainer "Yves Senn" . "yves.senn@gmx.ch") (:keywords "ruby" "rvm") (:url . "http://www.emacswiki.org/emacs/RvmEl"))]) (ryo-modal . [(20220103 940) ((emacs (25 1))) "Roll your own modal mode" single ((:commit . "0a61eed4d2917422d6401b6abe2037c26dab658a") (:authors ("Erik Sjöstrand" . "sjostrand.erik@gmail.com")) (:maintainer "Erik Sjöstrand" . "sjostrand.erik@gmail.com") (:keywords "convenience" "modal" "keys") (:url . "http://github.com/Kungsgeten/ryo-modal"))]) @@ -4216,7 +4218,6 @@ (sailfish-scratchbox . [(20171202 1332) nil "Sailfish OS scratchbox inside the emacs." single ((:commit . "65c6b04abadd2cdeb4cc2dc2a8b96b06e0f27ed8") (:authors ("V. V. Polevoy" . "fx@thefx.co")) (:maintainer "V. V. Polevoy" . "fx@thefx.co") (:keywords "sb2" "mb2" "building" "scratchbox" "sailfish") (:url . "https://github.com/vityafx/sailfish-scratchbox.el"))]) (salesforce-utils . [(20160814 154) ((cl-lib (0 5))) "simple utilities for Salesforce" single ((:commit . "73328baf0fb94ac0d0de645a8f6d42e5ae27f773") (:authors ("Sean McAfee")) (:maintainer "Sean McAfee") (:url . "https://github.com/grimnebulin/emacs-salesforce"))]) (salt-mode . [(20200210 1200) ((emacs (24 4)) (yaml-mode (0 0 12)) (mmm-mode (0 5 4)) (mmm-jinja2 (0 1))) "Major mode for Salt States" single ((:commit . "c46b24e7fdf4a46df5507dc9c533bbc0064a46fa") (:authors ("Ben Hayden" . "hayden767@gmail.com")) (:maintainer "Glynn Forrest" . "me@glynnforrest.com") (:keywords "languages") (:url . "https://github.com/glynnforrest/salt-mode"))]) - (sane-term . [(20181130 101) ((emacs (24 1))) "Multi Term is crazy. This is not." single ((:commit . "369178c2dd0348250c2ec0019567688376c637f7") (:authors ("Adam Patterson" . "adam@adamrt.com")) (:maintainer "Adam Patterson" . "adam@adamrt.com") (:url . "http://github.com/adamrt/sane-term"))]) (sass-mode . [(20190502 53) ((haml-mode (3 0 15)) (cl-lib (0 5))) "Major mode for editing Sass files" single ((:commit . "247a0d4b509f10b28e4687cd8763492bca03599b") (:authors ("Natalie Weizenbaum")) (:maintainer "Natalie Weizenbaum") (:keywords "markup" "language" "css") (:url . "http://github.com/nex3/haml/tree/master"))]) (sauron . [(20201015 836) nil "Track (erc/org/dbus/...) events and react to them." tar ((:commit . "5daade4836da5b1b2ab26d84128d6c38328a5d52") (:authors ("Dirk-Jan C. Binnema" . "djcb@djcbsoftware.nl")) (:maintainer "Dirk-Jan C. Binnema" . "djcb@djcbsoftware.nl") (:keywords "comm" "frames"))]) (save-load-path . [(20140206 1214) nil "save load-path and reuse it to test" single ((:commit . "6cb763a37e2b8af505bff2bcd11fd49c9ea04d66") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "lisp") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/save-load-path.el"))]) @@ -4226,7 +4227,7 @@ (say-what-im-doing . [(20160706 1931) nil "dictate what you're doing with text to speech" single ((:commit . "5b2ce6783b02805bcac1107a149bfba3852cd9d5") (:authors ("Benaiah Mischenko")) (:maintainer "Benaiah Mischenko") (:keywords "text to speech" "dumb" "funny") (:url . "http://github.com/benaiah/say-what-im-doing"))]) (sayid . [(20220101 1357) ((cider (0 21 0))) "sayid nREPL middleware client" single ((:commit . "879aff586336a0ec4d46c0ed4720fb1de22082bd") (:authors ("Bill Piel" . "bill@billpiel.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.dev") (:keywords "clojure" "cider" "debugger") (:url . "https://github.com/clojure-emacs/sayid"))]) (sbt-mode . [(20211203 1148) ((emacs (24 4))) "Interactive support for sbt projects" tar ((:commit . "9fe1e8807c22cc1dc56a6233e000969518907f4d") (:keywords "languages") (:url . "https://github.com/hvesalai/emacs-sbt-mode"))]) - (scad-mode . [(20200830 301) nil "A major mode for editing OpenSCAD code" single ((:commit . "b929e705e76e8ff47d170c5e9849f86002f3e09f") (:authors ("Len Trigg, Łukasz Stelmach")) (:maintainer "Len Trigg" . "lenbok@gmail.com") (:keywords "languages") (:url . "https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el"))]) + (scad-mode . [(20200830 301) nil "A major mode for editing OpenSCAD code" single ((:commit . "6aae7963498675dfb5bedaaef2cb8e56bdcddcab") (:authors ("Len Trigg, Łukasz Stelmach")) (:maintainer "Len Trigg" . "lenbok@gmail.com") (:keywords "languages") (:url . "https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el"))]) (scad-preview . [(20211212 1128) ((scad-mode (91 0)) (emacs (24 4))) "Preview SCAD models in real-time within Emacs" single ((:commit . "c5449b26c63f3e0a695905a7e4e84f8d844f761b") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "https://zk-phi.github.io/"))]) (scala-mode . [(20210414 1126) nil "Major mode for editing Scala" tar ((:commit . "598cb680f321d9609295aa9b4679040cc703b602") (:keywords "languages") (:url . "https://github.com/hvesalai/emacs-scala-mode"))]) (scf-mode . [(20151122 248) nil "shorten file-names in compilation type buffers" single ((:commit . "dbfcdcd89034f208d65e181af58e0d73ad09f8b2") (:authors ("Le Wang")) (:maintainer "Le Wang") (:keywords "compilation") (:url . "https://github.com/lewang/scf-mode"))]) @@ -4247,13 +4248,13 @@ (scratch-pop . [(20200910 226) nil "Generate, popup (& optionally backup) scratch buffer(s)." single ((:commit . "cbe842fd78e4b742ece9fc493ebf43e69d872866") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://hins11.yu-yake.com/"))]) (scratches . [(20151006 416) ((dash (2 11 0)) (f (0 17 0))) "Multiple scratches in any language" single ((:commit . "9441afe6396ca38f08029123fab5d87429cbf315") (:authors ("Zhang Kai Yu" . "yeannylam@gmail.com")) (:maintainer "Zhang Kai Yu" . "yeannylam@gmail.com") (:keywords "scratch"))]) (scribble-mode . [(20190912 200) ((emacs (24))) "Major mode for editing Scribble documents" single ((:commit . "5c3ea3cc9bbad585476eee41ea76dc056c2012bb") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience") (:url . "https://github.com/emacs-pe/scribble-mode"))]) - (scroll-on-drag . [(20220507 1118) ((emacs (26 2))) "Interactive scrolling" single ((:commit . "fb9af984610f7ef83b031ff04efa32dbdf2eb741") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-scroll-on-drag"))]) + (scroll-on-drag . [(20220510 1204) ((emacs (26 2))) "Interactive scrolling" single ((:commit . "01c14f4c024548ed1f644263faa0786c10afc978") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-scroll-on-drag"))]) (scroll-on-jump . [(20220509 1046) ((emacs (26 2))) "Scroll when jumping to a new point" single ((:commit . "8fde237ae6d6a54730445b399513bc6d31d7daba") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-scroll-on-jump"))]) (scrollable-quick-peek . [(20201224 329) ((quick-peek (1 0)) (emacs (24 4))) "Display scrollable overlays" single ((:commit . "3e3492145a61831661d6e97fdcb47b5b66c73287") (:authors ("Pablo Barrantes" . "xjpablobrx@gmail.com")) (:maintainer "Pablo Barrantes" . "xjpablobrx@gmail.com") (:keywords "convenience" "extensions" "help" "tools") (:url . "https://github.com/jpablobr/scrollable-quick-peek"))]) (scrollkeeper . [(20190109 629) ((emacs (25 1))) "Custom scrolling commands with visual guidelines" single ((:commit . "3c4ac6b6b44686d31c260ee0b19daaee59bdccd6") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "convenience") (:url . "https://github.com/alphapapa/scrollkeeper.el"))]) (scrooge . [(20180630 1022) ((emacs (24)) (cl-lib (0 5)) (dash (2 13 0)) (thrift (0 9 3))) "Major mode for Twitter Scrooge files" single ((:commit . "0a8c58e9e6708abe4ef7e415bc1e0472318bb1b0") (:authors ("Daniel McClanahan" . "danieldmcclanahan@gmail.com")) (:maintainer "Daniel McClanahan" . "danieldmcclanahan@gmail.com") (:keywords "scrooge" "thrift"))]) (scss-mode . [(20180123 1708) nil "Major mode for editing SCSS files" single ((:commit . "cf58dbec5394280503eb5502938f3b5445d1b53d") (:authors ("Anton Johansson" . "anton.johansson@gmail.com")) (:maintainer "Anton Johansson" . "anton.johansson@gmail.com") (:keywords "scss" "css" "mode") (:url . "https://github.com/antonj/scss-mode"))]) - (sculpture-themes . [(20220406 2330) ((emacs (26 1))) "Themes with vivid colors" tar ((:commit . "a21871b75cc7cb575ceb43640d039307fbb412e1") (:authors ("t-e-r-m" . "newenewen@tutanota.com")) (:maintainer "t-e-r-m" . "newenewen@tutanota.com") (:url . "https://github.com/t-e-r-m/sculpture-theme"))]) + (sculpture-themes . [(20220515 1006) ((emacs (26 1))) "Themes with vivid colors" tar ((:commit . "d779c5f5f58409c5e4394c881e86bc11399b8f5c") (:authors ("t-e-r-m" . "newenewen@tutanota.com")) (:maintainer "t-e-r-m" . "newenewen@tutanota.com") (:url . "https://github.com/t-e-r-m/sculpture-theme"))]) (sdcv . [(20220210 1412) ((emacs (24 3)) (popup (0 5 3)) (showtip (0 1)) (pos-tip (0 4 6)) (cl-lib (0 3))) "Interface for sdcv (StartDict console version)." single ((:commit . "98e239c7380c63282845d5bc55ea6d605f5a33b8") (:authors ("Andy Stewart" . "lazycat.manatee@gmail.com")) (:maintainer "Andy Stewart" . "lazycat.manatee@gmail.com") (:keywords "startdict" "sdcv") (:url . "https://repo.or.cz/sdcv.el.git"))]) (sdlang-mode . [(20161201 711) ((emacs (24 3))) "Major mode for Simple Declarative Language files." single ((:commit . "7fdcf4ead88d451c0a4a6425b2e730818eaf610e") (:authors ("Vladimir Panteleev")) (:maintainer "Vladimir Panteleev") (:keywords "languages") (:url . "https://github.com/CyberShadow/sdlang-mode"))]) (search-web . [(20150312 1103) nil "Post web search queries using `browse-url'." single ((:commit . "c4ae86ac1acfc572b81f3d78764bd9a54034c331") (:authors ("Tomoya Otake" . "tomoya.ton@gmail.com")) (:maintainer "Tomoya Otake" . "tomoya.ton@gmail.com"))]) @@ -4268,7 +4269,7 @@ (select-themes . [(20160221 106) nil "Color theme selection with completing-read" single ((:commit . "236f54287519a3ea6dd7b3992d053e4f4ff5d0fe") (:authors ("Jason Milkins" . "jasonm23@gmail.com")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com") (:url . "https://github.com/jasonm23/emacs-select-themes"))]) (selected . [(20220509 1810) nil "Keymap for when region is active" single ((:commit . "81cb32521a05ff2a9125e001b83608e108e480f6") (:authors ("Erik Sjöstrand")) (:maintainer "Erik Sjöstrand") (:keywords "convenience") (:url . "http://github.com/Kungsgeten/selected.el"))]) (selectric-mode . [(20200209 2107) nil "IBM Selectric mode for Emacs" tar ((:commit . "1840de71f7414b7cd6ce425747c8e26a413233aa") (:authors ("Ricardo Bánffy" . "rbanffy@gmail.com")) (:maintainer "Ricardo Banffy" . "rbanffy@gmail.com") (:keywords "multimedia" "convenience" "typewriter" "selectric") (:url . "https://github.com/rbanffy/selectric-mode"))]) - (selectrum . [(20220323 10) ((emacs (26 1))) "Easily select item from list" single ((:commit . "7da932eeb89f1aa8060a73ddd040f95bbb127343") (:authors ("Radon Rosborough" . "radon.neon@gmail.com")) (:maintainer "Radon Rosborough" . "radon.neon@gmail.com") (:keywords "extensions") (:url . "https://github.com/raxod502/selectrum"))]) + (selectrum . [(20220513 2106) ((emacs (26 1))) "Easily select item from list" single ((:commit . "810ea697bdd559d97b86b795e01769cddfa3daf2") (:authors ("Radian LLC" . "contact+selectrum@radian.codes")) (:maintainer "Radian LLC" . "contact+selectrum@radian.codes") (:keywords "extensions") (:url . "https://github.com/radian-software/selectrum"))]) (selectrum-prescient . [(20220509 2300) ((emacs (25 1)) (prescient (5 2)) (selectrum (3 1))) "Selectrum integration" single ((:commit . "c05f8a43c6ff07a8b5a3ba8df7a2ec35677b7484") (:authors ("Radian LLC" . "contact+prescient@radian.codes")) (:maintainer "Radian LLC" . "contact+prescient@radian.codes") (:keywords "extensions") (:url . "https://github.com/raxod502/prescient.el"))]) (semaphore . [(20190607 1949) ((emacs (26))) "Semaphore based on condition variables" single ((:commit . "a069b69018b96d284ce7553cd63350a88ea3679c") (:authors ("Herwig Hochleitner" . "herwig@bendlas.net")) (:maintainer "Herwig Hochleitner" . "herwig@bendlas.net") (:keywords "processes" "unix") (:url . "http://github.com/webnf/semaphore.el"))]) (semaphore-promise . [(20190607 2115) ((emacs (26)) (semaphore (1)) (promise (1))) "semaphore integration with promise" single ((:commit . "a069b69018b96d284ce7553cd63350a88ea3679c") (:authors ("Herwig Hochleitner" . "herwig@bendlas.net")) (:maintainer "Herwig Hochleitner" . "herwig@bendlas.net") (:keywords "processes" "unix") (:url . "http://github.com/webnf/semaphore.el"))]) @@ -4304,7 +4305,7 @@ (shampoo . [(20131230 1019) nil "A remote Smalltalk development mode" tar ((:commit . "bc193c39636c30182159c5c91c37a9a4cb50fedf"))]) (shanty-themes . [(20220509 1656) ((emacs (27 2))) "The themes for digital workers" tar ((:commit . "14a0e9de08aa6412931b121ae97b700e10ccaa80") (:authors ("Philip Gaber" . "phga@posteo.de")) (:maintainer "Philip Gaber" . "phga@posteo.de") (:keywords "faces" "theme" "blue" "yellow" "gold" "dark" "light") (:url . "https://github.com/qhga/shanty-themes"))]) (share2computer . [(20200316 31) ((emacs (25 1))) "Elisp helper of android ShareToComputer" single ((:commit . "15da47625a800e3310b8dc714bd4e41e32966d6a") (:authors ("Feng Shu" . "tumashu@163.com")) (:maintainer "Feng Shu" . "tumashu@163.com") (:keywords "convenience" "comm") (:url . "https://github.com/tumashu/share2computer"))]) - (sharper . [(20220321 422) ((emacs (27 1)) (transient (0 2 0))) "A dotnet CLI wrapper, using Transient" single ((:commit . "96edd4a1dbc267afdff0cb97298d1b05b7c2080c") (:authors ("Sebastian Monia" . "smonia@outlook.com")) (:maintainer "Sebastian Monia" . "smonia@outlook.com") (:keywords "maint" "tool") (:url . "https://github.com/sebasmonia/sharper"))]) + (sharper . [(20220510 2001) ((emacs (27 1)) (transient (0 2 0))) "A dotnet CLI wrapper, using Transient" single ((:commit . "8020a5da0327f9a18b4bdab474bf8d81c1b38ea7") (:authors ("Sebastian Monia" . "smonia@outlook.com")) (:maintainer "Sebastian Monia" . "smonia@outlook.com") (:keywords "maint" "tool") (:url . "https://github.com/sebasmonia/sharper"))]) (shell-current-directory . [(20140101 2354) nil "create new shell based on buffer directory" single ((:commit . "bf843771bf9a4aa05e054ade799eb8862f3be89a") (:authors ("Daniel Polani")) (:maintainer "Daniel Polani") (:keywords "shell" "comint"))]) (shell-here . [(20220102 1703) nil "Open a shell relative to the working directory" single ((:commit . "eeb437ff26d62a5009046b1b3b4503b768e3131a") (:authors ("Ian Eure" . "ian.eure@gmail.com")) (:maintainer "Ian Eure" . "ian.eure@gmail.com") (:keywords "unix" "tools" "processes"))]) (shell-history . [(20100505 839) nil "integration with shell history" single ((:commit . "ee371a81f2d2bf5a308344078329ca1e9b5ed38c") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "processes" "convenience") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/shell-history.el"))]) @@ -4360,7 +4361,7 @@ (simplezen . [(20130421 1000) ((s (1 4 0)) (dash (1 1 0))) "A simple subset of zencoding-mode for Emacs." single ((:commit . "119fdf2c6890a0c56045ae72cf4fce0071a81481") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com"))]) (simplicity-theme . [(20220217 1928) ((emacs (24 1))) "A minimalist dark theme" single ((:commit . "2a0aaf19cf1e99c50df0d2e6225a2d2931a203d2") (:authors ("Matthieu Petiteau" . "mpetiteau.pro@gmail.com")) (:maintainer "Matthieu Petiteau" . "mpetiteau.pro@gmail.com") (:keywords "faces" "theme" "minimal") (:url . "http://github.com/smallwat3r/emacs-simplicity-theme"))]) (siri-shortcuts . [(20211229 1833) ((emacs (25 2))) "Interact with Siri Shortcuts" single ((:commit . "190f242f71e071adfd89fa1f2f6ea22b62afd133") (:authors ("Daniils Petrovs" . "thedanpetrov@gmail.com")) (:maintainer "Daniils Petrovs" . "thedanpetrov@gmail.com") (:keywords "convenience" "multimedia") (:url . "https://github.com/DaniruKun/siri-shortcuts.el"))]) - (sis . [(20220506 1606) ((emacs (25 1)) (terminal-focus-reporting (0 0))) "Less manual switch for native or OS input source (input method)." single ((:commit . "f26d25194c65e19b5473fa1a3cdf96be2b209e19") (:keywords "convenience") (:url . "https://github.com/laishulu/emacs-smart-input-source"))]) + (sis . [(20220511 1734) ((emacs (25 1)) (terminal-focus-reporting (0 0))) "Less manual switch for native or OS input source (input method)." single ((:commit . "0eeb75db3eb031bde3e5820ee39a2b7549dc5d8b") (:keywords "convenience") (:url . "https://github.com/laishulu/emacs-smart-input-source"))]) (sisyphus . [(20220506 1140) ((emacs (27)) (compat (28 1 1 0)) (magit (3 4 0))) "Create releases of Emacs packages" single ((:commit . "9626d9d26dc9f3cc57d41fa119a74e0cb1c4aab9") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/sisyphus"))]) (skeletor . [(20210129 239) ((s (1 7 0)) (f (0 14 0)) (dash (2 2 0)) (cl-lib (0 3)) (let-alist (1 0 3)) (emacs (24 1))) "Provides project skeletons for Emacs" tar ((:commit . "f6e560a0bfe459e0b8a268047920ce1148f2ebf6") (:authors ("Chris Barrett" . "chris.d.barrett@me.com")) (:maintainer "Chris Barrett" . "chris.d.barrett@me.com"))]) (skerrick . [(20220306 2139) ((emacs (27 1)) (request (0 3 2))) "REPL-driven development for NodeJS" single ((:commit . "fc88e82aa4b0a71b1fbe0217df4020538ebd8cd5") (:authors ("Rafael Nicdao <https://github.com/anonimitoraf>")) (:maintainer "Rafael Nicdao" . "nicdaoraf@gmail.com") (:keywords "languages" "javascript" "js" "repl" "repl-driven") (:url . "https://github.com/anonimitoraf/skerrick"))]) @@ -4373,7 +4374,7 @@ (slack . [(20211129 310) ((websocket (1 8)) (request (0 2 0)) (oauth2 (0 10)) (circe (2 2)) (alert (1 2)) (emojify (0 2))) "Slack client for Emacs" tar ((:commit . "ff46d88726482211e3ac3d0b9c95dd4fdffe11c2") (:authors ("yuya.minami" . "yuya.minami@yuyaminami-no-MacBook-Pro.local")) (:maintainer "yuya.minami" . "yuya.minami@yuyaminami-no-MacBook-Pro.local") (:keywords "tools") (:url . "https://github.com/yuya373/emacs-slack"))]) (slideview . [(20150324 2240) ((cl-lib (0 3))) "File slideshow" single ((:commit . "b6d170bda139aedf81b47dc55cbd1a3af512fb4c") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "files") (:url . "https://github.com/mhayashi1120/Emacs-slideview"))]) (slim-mode . [(20170728 1348) nil "Major mode for editing Slim files" single ((:commit . "3636d18ab1c8b316eea71c4732eb44743e2ded87") (:authors ("Nathan Weizenbaum")) (:maintainer "Nathan Weizenbaum") (:keywords "markup" "language") (:url . "http://github.com/slim-template/emacs-slim"))]) - (slime . [(20220302 1215) ((cl-lib (0 5)) (macrostep (0 9))) "Superior Lisp Interaction Mode for Emacs" tar ((:commit . "6ef28864d4a6b4d9390dbd0cac64f2a56582682d") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime"))]) + (slime . [(20220515 746) ((cl-lib (0 5)) (macrostep (0 9))) "Superior Lisp Interaction Mode for Emacs" tar ((:commit . "32f5652d6a976f68e7cf47b61d7d0e2764b68aae") (:keywords "languages" "lisp" "slime") (:url . "https://github.com/slime/slime"))]) (slime-company . [(20210124 1627) ((emacs (24 4)) (slime (2 13)) (company (0 9 0))) "slime completion backend for company mode" single ((:commit . "f20ecc4104d4c35052696e7e760109fb02060e72") (:authors ("Ole Arndt" . "anwyn@sugarshark.com")) (:maintainer "Ole Arndt" . "anwyn@sugarshark.com") (:keywords "convenience" "lisp" "abbrev"))]) (slime-docker . [(20210426 1422) ((emacs (24 4)) (slime (2 16)) (docker-tramp (0 1))) "Integration of SLIME with Docker containers" tar ((:commit . "c7d073720f2bd8e9f72a20309fff2afa4c4e798d") (:keywords "docker" "lisp" "slime") (:url . "https://gitlab.common-lisp.net/cl-docker-images/slime-docker"))]) (slime-repl-ansi-color . [(20200712 1226) ((emacs (24)) (slime (2 3 1))) "Turn on ANSI colors in REPL output;" single ((:commit . "e38c7958d9657e41c426b4e96938b3f604238795") (:authors ("Max Mikhanosha" . "max@openchat.com")) (:maintainer "Augustin Fabre" . "augustin@augfab.fr") (:keywords "lisp") (:url . "https://gitlab.com/augfab/slime-repl-ansi-color"))]) @@ -4397,7 +4398,7 @@ (smart-cursor-color . [(20201207 2228) nil "Change cursor color dynamically" single ((:commit . "d532f0b27e37cbd3bfc0be09d0b54aa38f1648f1") (:authors ("7696122")) (:maintainer "7696122") (:keywords "cursor" "color" "face") (:url . "https://github.com/7696122/smart-cursor-color/"))]) (smart-dash . [(20210427 1709) nil "Smart-Dash minor mode" single ((:commit . "bc740889dd81e7dc8a90a33d1f075f21aba9b2d3") (:authors ("Dennis Lambe Jr." . "malsyned@malsyned.net")) (:maintainer "Dennis Lambe Jr." . "malsyned@malsyned.net"))]) (smart-forward . [(20140430 713) ((expand-region (0 8 0))) "Semantic navigation" single ((:commit . "7b6dbfdbd4b646376a567c70e1a161545431b72b") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "navigation"))]) - (smart-hungry-delete . [(20211020 1822) ((emacs (24 3))) "smart hungry deletion of whitespace" single ((:commit . "78acd1f16fb99b66a6c9bd605a988c3c74280577") (:authors ("Hauke Rehfeld" . "emacs@haukerehfeld.de")) (:maintainer "Hauke Rehfeld" . "emacs@haukerehfeld.de") (:keywords "convenience") (:url . "https://github.com/hrehfeld/emacs-smart-hungry-delete"))]) + (smart-hungry-delete . [(20220516 1538) ((emacs (24 3))) "smart hungry deletion of whitespace" single ((:commit . "e06525cc1841805ebe470c876d6b966de90bc275") (:authors ("Hauke Rehfeld" . "emacs@haukerehfeld.de")) (:maintainer "Hauke Rehfeld" . "emacs@haukerehfeld.de") (:keywords "convenience") (:url . "https://github.com/hrehfeld/emacs-smart-hungry-delete"))]) (smart-indent-rigidly . [(20141206 15) nil "Smart rigid indenting" single ((:commit . "323d1fe4d0b81e598249aad01bc44adb180ece0e") (:authors ("atom smith")) (:maintainer "atom smith") (:keywords "indenting" "coffee-mode" "haml-mode" "sass-mode") (:url . "https://github.com/re5et/smart-indent-rigidly"))]) (smart-jump . [(20210304 844) ((emacs (25 1))) "Smart go to definition." tar ((:commit . "3392eb35e3cde37e6f5f2a48dc0db15ca535143c") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "tools") (:url . "https://github.com/jojojames/smart-jump"))]) (smart-mark . [(20150912 210) nil "Restore point after C-g when mark" single ((:commit . "04b522a23e3aae8381c6a976fc978532fcb2e7d0") (:authors ("Kai Yu" . "yeannylam@gmail.com")) (:maintainer "Kai Yu" . "yeannylam@gmail.com") (:keywords "mark" "restore"))]) @@ -4411,7 +4412,7 @@ (smart-tab . [(20210530 1743) ((emacs (24 3))) "Intelligent tab completion and indentation" single ((:commit . "2f1b4073904805c8454ebc9bc967b23836a2d577") (:authors ("John SJ Anderson" . "john@genehack.org") ("Sebastien Rocca Serra" . "sroccaserra@gmail.com") ("Daniel Hackney" . "dan@haxney.org")) (:maintainer "John SJ Anderson" . "john@genehack.org") (:keywords "extensions") (:url . "https://git.genehack.net/genehack/smart-tab"))]) (smart-tabs-mode . [(20200907 2025) nil "Intelligently indent with tabs, align with spaces!" single ((:commit . "1044c17e42479de943e69cdeb85e4d05ad9cca8c") (:authors ("John Croisant" . "jacius@gmail.com") ("Alan Pearce" . "alan@alanpearce.co.uk") ("Daniel Dehennin" . "daniel.dehennin@baby-gnu.org") ("Matt Renaud" . "mrenaud92@gmail.com")) (:maintainer "Joel C. Salomon" . "joelcsalomon@gmail.com") (:keywords "languages") (:url . "http://www.emacswiki.org/emacs/SmartTabs"))]) (smart-window . [(20160717 130) ((cl-lib (0 5))) "vim-like window controlling plugin" single ((:commit . "5996461b7cbc5ab4509ac48537916eb29a8e4c16") (:authors ("Felix Chern" . "idryman@gmail.com")) (:maintainer "Felix Chern" . "idryman@gmail.com") (:keywords "window") (:url . "https://github.com/dryman/smart-window.el"))]) - (smartparens . [(20220204 1134) ((dash (2 13 0)) (cl-lib (0 3))) "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." tar ((:commit . "37f77bf2e2199be9fe27e981317b02cfd0e8c70e") (:authors ("Matus Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "abbrev" "convenience" "editing") (:url . "https://github.com/Fuco1/smartparens"))]) + (smartparens . [(20220510 934) ((dash (2 13 0)) (cl-lib (0 3))) "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." tar ((:commit . "ec15aaa748b21c9b8453dd95604ccc95fc1138cf") (:authors ("Matus Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "abbrev" "convenience" "editing") (:url . "https://github.com/Fuco1/smartparens"))]) (smartrep . [(20150509 230) nil "Support sequential operation which omitted prefix keys." single ((:commit . "f0ff5a6d7b8603603598ae3045c98b011e58d86e") (:authors ("myuhe <yuhei.maeda_at_gmail.com>")) (:maintainer "myuhe") (:keywords "convenience") (:url . "https://github.com/myuhe/smartrep.el"))]) (smartscan . [(20170211 2033) nil "Jumps between other symbols found at point" single ((:commit . "234e077145710a174c20742de792b97ed2f965f6") (:authors ("Mickey Petersen" . "mickey@masteringemacs.org")) (:maintainer "Mickey Petersen" . "mickey@masteringemacs.org") (:keywords "extensions"))]) (smarty-mode . [(20100703 1158) nil "major mode for editing smarty templates" single ((:commit . "3dfdfe1571f5e9ef55a29c51e5a80046d4cb7568") (:maintainer "Benj Carson") (:keywords "smarty" "php" "languages" "templates") (:url . "none yet"))]) @@ -4475,7 +4476,7 @@ (sparkline . [(20150101 1319) ((cl-lib (0 3))) "Make sparkline images from a list of numbers" single ((:commit . "a2b5d817d272d6363b67ed8f8cc75499a19fa8d2") (:authors ("Willem Rein Oudshoorn" . "woudshoo@xs4all.nl")) (:maintainer "Willem Rein Oudshoorn" . "woudshoo@xs4all.nl") (:keywords "extensions"))]) (sparql-mode . [(20210701 1202) ((cl-lib (0 5)) (emacs (24 3))) "Edit and interactively evaluate SPARQL queries." tar ((:commit . "ceb370b3879841f8809cc3f9b1b87e898f10562f") (:authors ("Craig Andera <candera at wangdera dot com>")) (:maintainer "Bjarte Johansen <Bjarte dot Johansen at gmail dot com>") (:url . "https://github.com/ljos/sparql-mode"))]) (spatial-navigate . [(20220507 1118) ((emacs (26 2))) "Directional navigation between white-space blocks" single ((:commit . "09ebd2ba7779998c31296bf8b6ffebf854f3eb73") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://codeberg.com/ideasman42/emacs-spatial-navigate"))]) - (spdx . [(20220509 141) ((emacs (24 4))) "Insert SPDX license and copyright headers" tar ((:commit . "9c054f6c86797ece9079e46662ea16b7ac6af790") (:authors ("Zhiwei Chen" . "condy0919@gmail.com")) (:maintainer "Zhiwei Chen" . "condy0919@gmail.com") (:keywords "license" "tools") (:url . "https://github.com/condy0919/spdx.el"))]) + (spdx . [(20220511 143) ((emacs (24 4))) "Insert SPDX license and copyright headers" tar ((:commit . "701e7c49c38babaa2b2071febd2b112fef600683") (:authors ("Zhiwei Chen" . "condy0919@gmail.com")) (:maintainer "Zhiwei Chen" . "condy0919@gmail.com") (:keywords "license" "tools") (:url . "https://github.com/condy0919/spdx.el"))]) (speech-tagger . [(20170728 1829) ((cl-lib (0 5))) "tag parts of speech using coreNLP" tar ((:commit . "61955b40d4e8b09e66a3e8033e82893f81657c06") (:authors ("Danny McClanahan" . "danieldmcclanahan@gmail.com")) (:maintainer "Danny McClanahan" . "danieldmcclanahan@gmail.com") (:keywords "speech" "tag" "nlp" "language" "corenlp" "parsing" "natural") (:url . "https://github.com/cosmicexplorer/speech-tagger"))]) (speechd-el . [(20211231 758) nil "Client to speech synthesizers and Braille displays." tar ((:commit . "a4be22b5b62a6be1e749df6f64b06e16a6b09790") (:authors ("Milan Zamazal" . "pdm@zamazal.org")) (:maintainer "Milan Zamazal" . "pdm@zamazal.org"))]) (speed-type . [(20191204 1107) ((emacs (24 3)) (cl-lib (0 3))) "Practice touch and speed typing" single ((:commit . "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21") (:authors ("Gunther Hagleitner")) (:maintainer "Julien Pagès" . "j.parkouss@gmail.com") (:keywords "games") (:url . "https://github.com/parkouss/speed-type"))]) @@ -4501,6 +4502,7 @@ (sql-impala . [(20181218 410) nil "comint support for Cloudera Impala" single ((:commit . "466e7c0c789ec3e5e8a276c8f6754f91bb584c3e") (:authors ("Jason Terk" . "jason@goterkyourself.com")) (:maintainer "Jason Terk" . "jason@goterkyourself.com") (:keywords "sql" "impala") (:url . "https://github.com/jterk/sql-impala"))]) (sql-presto . [(20190113 1742) ((emacs (24 4))) "No description available." single ((:commit . "bcda455e300a1af75c7bb805882329bc844703b2") (:authors ("Katherine Cox-Buday" . "cox.katherine.e@gmail.com")) (:maintainer "Katherine Cox-Buday" . "cox.katherine.e@gmail.com") (:keywords "sql" "presto" "database"))]) (sql-sqlline . [(20201102 1508) ((emacs (24 4))) "Adds SQLLine support to SQLi mode" single ((:commit . "38baf140cae26f9d93fc45d5eaff7d5c7f050bff") (:authors ("Matteo Redaelli" . "matteo.redaelli@gmail.com")) (:maintainer "Matteo Redaelli" . "matteo.redaelli@gmail.com") (:keywords "languages") (:url . "https://gitlab.com/matteoredaelli/sql-sqlline"))]) + (sql-trino . [(20220502 851) ((emacs (24 4))) "Adds Trino support to SQLi mode" single ((:commit . "bad7be0bf2f6d2d653a787a4b5bc6a281a8bea88") (:authors ("Filipe Regadas" . "oss@regadas.email")) (:maintainer "Filipe Regadas" . "oss@regadas.email") (:keywords "tools") (:url . "https://github.com/regadas/sql-trino"))]) (sqlformat . [(20210305 209) ((emacs (24 3)) (reformatter (0 3))) "Reformat SQL using sqlformat or pgformatter" single ((:commit . "5d3f776c7eaac0c353ad184b54ef17b2ebc58015") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "languages") (:url . "https://github.com/purcell/sqlformat"))]) (sqlite . [(20201227 1822) ((emacs (24 5))) "Use sqlite via ELisp" single ((:commit . "f3da716302c929b9df4ba0c281968f72a9d1d188") (:authors ("cnngimenez")) (:maintainer "cnngimenez") (:keywords "extensions" "lisp" "sqlite") (:url . "https://gitlab.com/cnngimenez/sqlite.el"))]) (sqlite3 . [(20220501 1217) ((emacs (25 1))) "Direct access to the core SQLite3 API" tar ((:commit . "68eda59d5f3d29d0a64d6256d58b8c1f93ba3583") (:authors ("Y. N. Lo" . "gordonynlo@yahoo.com")) (:maintainer "Y. N. Lo" . "gordonynlo@yahoo.com") (:keywords "comm" "data" "sql") (:url . "https://github.com/pekingduck/emacs-sqlite3-api"))]) @@ -4530,10 +4532,10 @@ (stem . [(20131102 1109) nil "Routines for stemming" single ((:commit . "d74e6611d6ba5025e0276a2cc7c8a90f46bfa9ac") (:authors ("Tsuchiya Masatoshi" . "tsuchiya@pine.kuee.kyoto-u.ac.jp")) (:maintainer "Tsuchiya Masatoshi" . "tsuchiya@pine.kuee.kyoto-u.ac.jp") (:keywords "stemming") (:url . "https://github.com/yuutayamada/stem"))]) (stem-english . [(20180109 358) ((emacs (24 3))) "- routines for stemming English word" single ((:commit . "c9fc4c6ed6bf82382e479dae80912f4ae17d31f4") (:authors ("Tsuchiya Masatoshi" . "tsuchiya@pine.kuee.kyoto-u.ac.jp")) (:maintainer "KAWABATA, Taichi <kawabata.taichi_at_gmail.com>") (:keywords "text") (:url . "http://github.com/kawabata/stem-english"))]) (stem-reading-mode . [(20220418 1136) ((emacs (25 1))) "Highlight word stems for speed-reading" single ((:commit . "a8bacd80fab6013c09e4e8d337fd88267cbe2ff8") (:authors ("Yuri D'Elia" . "wavexx@thregr.org")) (:maintainer "Yuri D'Elia" . "wavexx@thregr.org") (:keywords "convenience" "wp") (:url . "https://gitlab.com/wavexx/stem-reading-mode.el"))]) - (stgit . [(20200606 1308) nil "major mode for StGit interaction" single ((:commit . "03fc757c4255bfd445cdbc2a62ca3b02a65beba5") (:authors ("David Kågedal" . "davidk@lysator.liu.se")) (:maintainer "David Kågedal" . "davidk@lysator.liu.se") (:url . "http://stacked-git.github.io"))]) + (stgit . [(20200606 1308) nil "major mode for StGit interaction" single ((:commit . "9ce680a52bd90ce9bac568a6a182b1b3c00577e5") (:authors ("David Kågedal" . "davidk@lysator.liu.se")) (:maintainer "David Kågedal" . "davidk@lysator.liu.se") (:url . "http://stacked-git.github.io"))]) (sticky . [(20170926 36) nil "Sticky key for capital letters" single ((:commit . "fec4e1af38f17f5cd80eca361d8e8ef8772db366") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "convenience") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/sticky.el"))]) (stickyfunc-enhance . [(20150429 1814) ((emacs (24 3))) "An enhancement to stock `semantic-stickyfunc-mode'" single ((:commit . "13bdba51fcd83ccbc3267959d23afc94d458dcb0") (:authors ("Tu, Do Hoang" . "tuhdo1710@gmail.com")) (:maintainer "Tu, Do Hoang") (:keywords "c" "languages" "tools") (:url . "https://github.com/tuhdo/semantic-stickyfunc-enhance"))]) - (stimmung-themes . [(20220510 644) ((emacs (25))) "Themes tuned to inner harmonies" tar ((:commit . "67e3bc2e9fbc3564ea2884b999ebc66f9a29413c") (:authors ("Love Lagerkvist")) (:maintainer "Love Lagerkvist") (:keywords "faces") (:url . "https://github.com/motform/stimmung-themes"))]) + (stimmung-themes . [(20220511 1245) ((emacs (25))) "Themes tuned to inner harmonies" tar ((:commit . "d34e83d6a00c248c7ce9ab34425773c30910f634") (:authors ("Love Lagerkvist")) (:maintainer "Love Lagerkvist") (:keywords "faces") (:url . "https://github.com/motform/stimmung-themes"))]) (stock-ticker . [(20150204 1052) ((s (1 9 0)) (request (0 2 0))) "Show stock prices in mode line" single ((:commit . "f2e564142c9de84232839a5b01979cf95b04d6a9") (:authors ("Gunther Hagleitner")) (:maintainer "Gunther Hagleitner") (:keywords "comms") (:url . "https://github.com/hagleitn/stock-ticker"))]) (stock-tracker . [(20220430 1144) ((emacs (27 1)) (dash (2 16 0)) (async (1 9 5))) "Track stock price" single ((:commit . "58018a1747273df23dec08ec5d318da1960428c1") (:authors ("Huming Chen" . "chenhuming@gmail.com")) (:maintainer "Huming Chen" . "chenhuming@gmail.com") (:keywords "convenience" "stock" "finance") (:url . "https://github.com/beacoder/stock-tracker"))]) (strace-mode . [(20171116 2039) nil "strace output syntax highlighting" single ((:commit . "2901baa968d5180ab985ac40ca22cc20914d01f5") (:authors ("Preston Moore" . "prestonkmoore@gmail.com")) (:maintainer "Preston Moore" . "prestonkmoore@gmail.com") (:keywords "languages"))]) @@ -4642,7 +4644,7 @@ (tea-time . [(20120331 820) nil "Simple timer package, useful to make perfect tea." single ((:commit . "1f6cf0bdd27c5eb3508989c5095427781f858eca") (:authors ("konsty" . "antipin.konstantin@googlemail.com")) (:maintainer "Gabriel Saldana" . "gsaldana@gmail.com") (:keywords "timer" "tea-time"))]) (teacode-expand . [(20181231 640) ((emacs (24 4))) "Expansion of text by TeaCode program." single ((:commit . "2122e4b32ed4edd2d7ebc0ff8ebf407e29d6e910") (:authors ("Richard Guay" . "raguay@customct.com")) (:maintainer "Richard Guay" . "raguay@customct.com") (:keywords "lisp") (:url . "https://github.com/raguay/TeaCode-Expand"))]) (teco . [(20200707 2309) nil "Teco interpreter" single ((:commit . "61caf8f419659a0567a269f290c90427a215d77b") (:authors ("Dale R. Worley" . "worley@alum.mit.edu")) (:maintainer "Mark T. Kennedy" . "mtk@acm.org") (:keywords "convenience" "emulations" "files") (:url . "https://github.com/mtk/teco.git"))]) - (telega . [(20220503 349) ((emacs (26 1)) (visual-fill-column (1 9)) (rainbow-identifiers (0 2 2))) "Telegram client (unofficial)" tar ((:commit . "29010616931f52e3a5aa9d155c14873c09c7306b") (:authors ("Zajcev Evgeny" . "zevlg@yandex.ru")) (:maintainer "Zajcev Evgeny" . "zevlg@yandex.ru") (:keywords "comm") (:url . "https://github.com/zevlg/telega.el"))]) + (telega . [(20220516 1923) ((emacs (26 1)) (visual-fill-column (1 9)) (rainbow-identifiers (0 2 2))) "Telegram client (unofficial)" tar ((:commit . "6c3bea4f4a227afdf9cdbfae017a797e12b70f13") (:authors ("Zajcev Evgeny" . "zevlg@yandex.ru")) (:maintainer "Zajcev Evgeny" . "zevlg@yandex.ru") (:keywords "comm") (:url . "https://github.com/zevlg/telega.el"))]) (telepathy . [(20131209 1258) nil "Access Telepathy from Emacs" single ((:commit . "211d785b02a29ddc254422fdcc3db45262582f8c") (:authors ("Nicolas Petton" . "petton.nicolas@gmail.com")) (:maintainer "Nicolas Petton" . "petton.nicolas@gmail.com") (:keywords "telepathy" "tools"))]) (telephone-line . [(20220424 400) ((emacs (24 4)) (cl-lib (0 5)) (cl-generic (0 2)) (seq (1 8))) "Rewrite of Powerline" tar ((:commit . "6f3455a365912e8f0c45a2240ea79507dee45ade") (:authors ("Daniel Bordak" . "dbordak@fastmail.fm")) (:maintainer "Daniel Bordak" . "dbordak@fastmail.fm") (:keywords "mode-line") (:url . "https://github.com/dbordak/telephone-line"))]) (teletext . [(20211203 1111) ((emacs (24 3))) "Teletext broadcast viewer" single ((:commit . "6b003e9dab9bd0c27d188a81f5fff740d66a2282") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "comm" "help" "hypermedia") (:url . "https://github.com/lassik/emacs-teletext"))]) @@ -4662,7 +4664,7 @@ (term-run . [(20200128 702) nil "Run arbitrary command in terminal buffer" single ((:commit . "0fd135d55fcf864598b1fb8dd880833a1a322910") (:authors ("10sr <8slashes+el [at] gmail [dot] com>")) (:maintainer "10sr <8slashes+el [at] gmail [dot] com>") (:keywords "utility" "shell" "command" "term-mode") (:url . "https://github.com/10sr/term-run-el"))]) (termbright-theme . [(20151031 235) ((emacs (24 1))) "a more usable theme for white-on-black terminals" single ((:commit . "bec6ab14336c0611e85f45486276004f16d20607") (:authors ("Brian Mastenbrook" . "brian@mastenbrook.net")) (:maintainer "Brian Mastenbrook" . "brian@mastenbrook.net") (:keywords "themes") (:url . "https://github.com/bmastenbrook/termbright-theme-el"))]) (terminal-focus-reporting . [(20180830 719) ((emacs (24 4))) "Minor mode for terminal focus reporting." single ((:commit . "6b1dbb2e96b3ff680dbe88153c4c569adbbd64ce") (:authors ("Vitalii Elenhaupt")) (:maintainer "Vitalii Elenhaupt") (:keywords "convenience") (:url . "https://github.com/veelenga/terminal-focus-reporting.el"))]) - (terminal-here . [(20210605 1453) ((emacs (25 1))) "Run an external terminal in current directory" single ((:commit . "e0e89344624fadf080f6770132ebdd7991355fdd") (:authors ("David Shepherd" . "davidshepherd7@gmail.com")) (:maintainer "David Shepherd" . "davidshepherd7@gmail.com") (:keywords "tools" "frames") (:url . "https://github.com/davidshepherd7/terminal-here"))]) + (terminal-here . [(20220517 655) ((emacs (25 1))) "Run an external terminal in current directory" single ((:commit . "54fcbc50fd58fe2c1b756ea6c21bd95f5e5f9d22") (:authors ("David Shepherd" . "davidshepherd7@gmail.com")) (:maintainer "David Shepherd" . "davidshepherd7@gmail.com") (:keywords "tools" "frames") (:url . "https://github.com/davidshepherd7/terminal-here"))]) (terminal-toggle . [(20190226 1510) ((emacs (24)) (popwin (1 0 0))) "simple pop-up terminal" single ((:commit . "f824d634aef3600cb7a8e2ddf9e8444c6607c160") (:authors ("Mehmet Tekman")) (:maintainer "Mehmet Tekman") (:keywords "outlines") (:url . "https://github.com/mtekman/terminal-toggle.el"))]) (tern . [(20181108 722) ((json (1 2)) (cl-lib (0 5)) (emacs (24))) "Tern-powered JavaScript integration" single ((:commit . "ef50c6f0269a6fd9ce742d0a87647d60a0ef850f") (:authors ("Marijn Haverbeke")) (:maintainer "Marijn Haverbeke") (:url . "http://ternjs.net/"))]) (tern-auto-complete . [(20170521 1935) ((tern (0 0 1)) (auto-complete (1 4)) (cl-lib (0 5)) (emacs (24))) "Tern Completion by auto-complete.el" single ((:commit . "ef50c6f0269a6fd9ce742d0a87647d60a0ef850f") (:authors ("<m.sakurai at kiwanami.net>")) (:maintainer "<m.sakurai at kiwanami.net>"))]) @@ -4693,11 +4695,11 @@ (thinks . [(20170802 1128) ((cl-lib (0 5))) "Insert text in a think bubble." single ((:commit . "c02f236abc8c2025d9f01460b09b89ebdc96e28d") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "convenience" "quoting") (:url . "https://github.com/davep/thinks.el"))]) (thread-dump . [(20170816 1850) nil "Java thread dump viewer" single ((:commit . "204c9600242756d4b514bb5ff6293e052bf4b49d") (:authors ("Dmitry Neverov")) (:maintainer "Dmitry Neverov") (:url . "http://github.com/nd/thread-dump.el"))]) (threes . [(20160820 1242) ((emacs (24)) (seq (1 11))) "A clone of Threes (a tiny puzzle game)" single ((:commit . "6981acb30b856c77cba6aba63fefbf102cbdfbb2") (:authors ("Chunyang Xu" . "xuchunyang.me@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang.me@gmail.com") (:keywords "games") (:url . "https://github.com/xuchunyang/threes.el"))]) - (thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "a066e6c79778766adb0c60c894e916169ae28b1f") (:keywords "languages"))]) + (thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "b185a097993b11284ad026ba1225916df0c188aa") (:keywords "languages"))]) (thumb-through . [(20120119 534) nil "Plain text reader of HTML documents" single ((:commit . "08d8fb720f93c6172653e035191a8fa9c3305e63") (:keywords "html"))]) (tickscript-mode . [(20171219 203) ((emacs (24 1))) "A major mode for Tickscript files" single ((:commit . "f0579f38ff14954df5002ce30ae6d4a2c978d461") (:authors ("Marc Sherry" . "msherry@gmail.com")) (:maintainer "Marc Sherry" . "msherry@gmail.com") (:keywords "languages") (:url . "https://github.com/msherry/tickscript-mode"))]) (tidal . [(20210211 1531) ((haskell-mode (16)) (emacs (24))) "Interact with TidalCycles for live coding patterns" single ((:commit . "39389e4080144c6734dbe3020cc35185f025ebf0") (:authors (nil . "alex@slab.org")) (:maintainer nil . "alex@slab.org") (:keywords "tools") (:url . "https://github.com/tidalcycles/Tidal"))]) - (tide . [(20220429 1501) ((emacs (25 1)) (dash (2 10 0)) (s (1 11 0)) (flycheck (27)) (typescript-mode (0 1)) (cl-lib (0 5))) "Typescript Interactive Development Environment" tar ((:commit . "83c34c636f47cb0c10c7d1a728fa308bfec40890") (:authors ("Anantha kumaran" . "ananthakumaran@gmail.com")) (:maintainer "Anantha kumaran" . "ananthakumaran@gmail.com") (:keywords "typescript") (:url . "http://github.com/ananthakumaran/tide"))]) + (tide . [(20220514 614) ((emacs (25 1)) (dash (2 10 0)) (s (1 11 0)) (flycheck (27)) (typescript-mode (0 1)) (cl-lib (0 5))) "Typescript Interactive Development Environment" tar ((:commit . "96bfc5da11a9b83b32368c38e933a405270652de") (:authors ("Anantha kumaran" . "ananthakumaran@gmail.com")) (:maintainer "Anantha kumaran" . "ananthakumaran@gmail.com") (:keywords "typescript") (:url . "http://github.com/ananthakumaran/tide"))]) (tikz . [(20210927 1704) ((emacs (24 1))) "A minor mode to edit TikZ pictures" tar ((:commit . "f9ea0793affa34be29e1861bfa559fd248b7d22e") (:authors ("Emilio Torres-Manzanera" . "torres@uniovi.es")) (:maintainer "Emilio Torres-Manzanera" . "torres@uniovi.es") (:keywords "tex") (:url . "https://github.com/emiliotorres/tikz"))]) (tile . [(20161225 357) ((emacs (25 1)) (s (1 9 0)) (dash (2 12 0)) (stream (2 2 3))) "Tile windows with layouts" single ((:commit . "22660f21f6e95de5aba55cd5d293d4841e9a4661") (:authors ("Ivan Malison" . "IvanMalison@gmail.com")) (:maintainer "Ivan Malison" . "IvanMalison@gmail.com") (:keywords "tile" "tiling" "window" "manager" "dynamic" "frames") (:url . "https://github.com/IvanMalison/tile"))]) (time-ext . [(20170126 1215) nil "more function for time/date" single ((:commit . "d128becf660fe3f30178eb1b05cd266741f4784a") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "lisp") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/time-ext.el"))]) @@ -4706,14 +4708,14 @@ (timesheet . [(20191024 151) ((s (1)) (org (7)) (auctex (11))) "Timesheet management add-on for org-mode" tar ((:commit . "5098dc87d3d4f289b6c1b6532070dacbfe6de9fd") (:authors ("Tom Marble")) (:maintainer "Tom Marble") (:keywords "org" "timesheet") (:url . "https://github.com/tmarble/timesheet.el"))]) (timonier . [(20170411 800) ((emacs (24 4)) (s (1 11 0)) (f (0 19 0)) (dash (2 12 0)) (pkg-info (0 5 0)) (hydra (0 13 6)) (request (0 2 0)) (all-the-icons (2 0 0))) "Manage Kubernetes Applications" tar ((:commit . "0a150ea87bf695b43cf1740dfd7e553e0ae7601c") (:authors ("Nicolas Lamirault" . "nicolas.lamirault@gmail.com")) (:maintainer "Nicolas Lamirault" . "nicolas.lamirault@gmail.com") (:keywords "kubernetes" "docker") (:url . "https://github.com/nlamirault/timonier"))]) (timp . [(20160618 803) ((emacs (24 4)) (cl-lib (0 5)) (fifo-class (1 0)) (signal (1 0))) "Multithreading library" tar ((:commit . "66b21934b1eb8ee428c06dd64b3562ad44776a35") (:authors ("Mola-T" . "Mola@molamola.xyz")) (:maintainer "Mola-T" . "Mola@molamola.xyz") (:keywords "internal" "lisp" "processes" "tools") (:url . "https://github.com/mola-T/timp"))]) - (timu-rouge-theme . [(20220501 1753) ((emacs (27 1))) "Color theme inspired by the Rouge Theme for VSCode" single ((:commit . "935e4907f01fba2c7c2ecaab88eb7c4163955c3b") (:authors ("Aimé Bertrand" . "aime.bertrand@macowners.club")) (:maintainer "Aimé Bertrand" . "aime.bertrand@macowners.club") (:keywords "faces" "themes") (:url . "https://gitlab.com/aimebertrand/timu-rouge-theme"))]) + (timu-rouge-theme . [(20220515 1712) ((emacs (27 1))) "Color theme inspired by the Rouge Theme for VSCode" single ((:commit . "a00b704235bcc595e02b157eee22caaecfc0080f") (:authors ("Aimé Bertrand" . "aime.bertrand@macowners.club")) (:maintainer "Aimé Bertrand" . "aime.bertrand@macowners.club") (:keywords "faces" "themes") (:url . "https://gitlab.com/aimebertrand/timu-rouge-theme"))]) (timu-spacegrey-theme . [(20220501 1509) ((emacs (25 1))) "Color theme inspired by the Spacegray theme in Sublime Text" single ((:commit . "1318c58a118c6c5a95a82e71da5eda6bfcf8f143") (:authors ("Aimé Bertrand" . "aime.bertrand@macowners.club")) (:maintainer "Aimé Bertrand" . "aime.bertrand@macowners.club") (:keywords "faces" "themes") (:url . "https://gitlab.com/aimebertrand/timu-spacegrey-theme"))]) (tinkerer . [(20200914 1756) ((s (1 2 0))) "Elisp wrapper for Tinkerer Blogging Engine." single ((:commit . "7cedeb264a44cd62bcd9c778dca52316d09e07e5") (:authors ("Yagnesh Raghava Yakkala" . "hi@yagnesh.org")) (:maintainer "Yagnesh Raghava Yakkala" . "hi@yagnesh.org") (:keywords "tinkerer" "blog" "wrapper") (:url . "https://github.com/yyr/tinkerer.el"))]) (tiny . [(20190722 1212) nil "Quickly generate linear ranges in Emacs" single ((:commit . "fd8a6b0b0c564d8242259e20e557ee6041f40908") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "convenience") (:url . "https://github.com/abo-abo/tiny"))]) (tiny-menu . [(20161213 1235) ((emacs (24 4))) "Display tiny menus." single ((:commit . "05563b94537b6eb22aeddedef2a6e59e3f88d073") (:authors ("Aaron Bieber" . "aaron@aaronbieber.com")) (:maintainer "Aaron Bieber" . "aaron@aaronbieber.com") (:keywords "menu" "tools") (:url . "https://github.com/aaronbieber/tiny-menu.el"))]) (tinypng . [(20200306 911) ((emacs (25 1))) "Compress PNG and JPEG with TinyPNG.com API" single ((:commit . "f7632e073ce13ef5ce30ae5584cb482a8bb9ffff") (:authors ("Xu Chunyang" . "mail@xuchunyang.me")) (:maintainer "Xu Chunyang" . "mail@xuchunyang.me") (:keywords "multimedia") (:url . "https://github.com/xuchunyang/tinypng.el"))]) (tinysegmenter . [(20141124 1013) ((cl-lib (0 5))) "Super compact Japanese tokenizer in Javascript ported to emacs lisp" single ((:commit . "872134704bd25c13a4c59552433da4c6881b5230") (:authors ("lugecy" . "lugecy@gmail.com")) (:maintainer "myuhe") (:keywords "convenience") (:url . "https://github.com/myuhe/tinysegmenter.el"))]) - (titlecase . [(20220510 331) ((emacs (25 1))) "Title-case phrases" tar ((:commit . "8f609e46d4d0c06cd442352ca7d296e2ccb1b62a") (:authors ("Case Duckworth" . "acdw@acdw.net")) (:maintainer "Case Duckworth" . "acdw@acdw.net") (:url . "https://github.com/duckwork/titlecase.el"))]) + (titlecase . [(20220516 1909) ((emacs (25 1))) "Title-case phrases" tar ((:commit . "ca79d9b25e8bab5eef92b13dc69ac0c38ac39172") (:authors ("Case Duckworth" . "acdw@acdw.net")) (:maintainer "Case Duckworth" . "acdw@acdw.net") (:url . "https://github.com/duckwork/titlecase.el"))]) (tj3-mode . [(20180519 1228) nil "major mode for editing TaskJuggler 3 files" single ((:commit . "1d98eb23f1606392f34ef1b80517cfc940fb9950") (:authors ("Christophe Rhodes" . "christophe@rhodes.io")) (:maintainer "Christophe Rhodes" . "christophe@rhodes.io") (:url . "https://github.com/csrhodes/tj3-mode"))]) (tldr . [(20210921 1715) ((emacs (24 3))) "tldr client for Emacs" single ((:commit . "d3fd2a809a266c005915026799121c78e8b358f0") (:authors ("Ono Hiroko" . "azazabc123@gmail.com")) (:maintainer "Ono Hiroko" . "azazabc123@gmail.com") (:keywords "tools" "docs") (:url . "https://github.com/kuanyui/tldr.el"))]) (tmmofl . [(20121025 1101) nil "Calls functions dependant on font lock highlighting at point" single ((:commit . "532aa6978e994e2b069ffe37aaf9a0011a07dadc") (:authors ("Phillip Lord" . "p.lord@hgmp.mrc.ac.uk")) (:maintainer "Phillip Lord" . "p.lord@hgmp.mrc.ac.uk") (:keywords "minor mode" "font lock" "toggling."))]) @@ -4729,13 +4731,13 @@ (toggle-test . [(20140723 537) nil "Toggle between source and test files in various programming languages" single ((:commit . "e969321f274903d705995a7d0345a257576ec5ff") (:authors ("Raghunandan Rao" . "r.raghunandan@gmail.com")) (:maintainer "Raghunandan Rao" . "r.raghunandan@gmail.com") (:keywords "tdd" "test" "toggle" "productivity") (:url . "https://github.com/rags/toggle-test"))]) (toggle-window . [(20141207 1548) nil "toggle current window size between half and full" single ((:commit . "e82c60e543933880402ede11e9423e48a17dde53") (:authors ("Kenny Liu")) (:maintainer "Kenny Liu") (:keywords "hide" "window") (:url . "https://github.com/deadghost/toggle-window"))]) (tok-theme . [(20220509 1324) ((emacs (26 1))) "Minimal theme with dark and yellow color scheme" single ((:commit . "a1a224d96665ee14c059eed63dc4b458f6b7a8d8") (:authors ("Topi Kettunen" . "topi@topikettunen.com")) (:maintainer "Topi Kettunen" . "topi@topikettunen.com") (:url . "https://github.com/topikettunen/tok-theme"))]) - (tokei . [(20220422 2234) ((emacs (27 1)) (magit-section (3 3 0))) "Display codebase statistics" single ((:commit . "181021cd881eecd604a546d4a717866a81c7a511") (:authors ("Daniel Nagy <https://github.com/nagy>")) (:maintainer "Daniel Nagy" . "danielnagy@posteo.de") (:url . "https://github.com/nagy/tokei.el"))]) + (tokei . [(20220422 2234) ((emacs (27 1)) (magit-section (3 3 0))) "Display codebase statistics" single ((:commit . "08db7ef62b3bcab5e1e1abf0a427d478db04420b") (:authors ("Daniel Nagy <https://github.com/nagy>")) (:maintainer "Daniel Nagy" . "danielnagy@posteo.de") (:url . "https://github.com/nagy/tokei.el"))]) (tomatinho . [(20180621 1748) nil "Simple and beautiful pomodoro timer" tar ((:commit . "b53354b9b9f496c0388d6a573b06b7d6fc53d0bd") (:authors ("Konrad Scorciapino" . "scorciapino@gmail.com")) (:maintainer "Konrad Scorciapino" . "scorciapino@gmail.com") (:keywords "time" "productivity" "pomodoro technique"))]) (toml . [(20130903 1255) nil "TOML (Tom's Obvious, Minimal Language) parser" single ((:commit . "994644f9e68c383071eeee23389a7989b228c2d2") (:authors ("Wataru MIYAGUNI" . "gonngo@gmail.com")) (:maintainer "Wataru MIYAGUNI" . "gonngo@gmail.com") (:keywords "toml" "parser") (:url . "https://github.com/gongo/emacs-toml"))]) (toml-mode . [(20161107 1800) ((emacs (24)) (cl-lib (0 5))) "Major mode for editing TOML files" single ((:commit . "f6c61817b00f9c4a3cab1bae9c309e0fc45cdd06") (:authors ("Felix Chern" . "idryman@gmail.com")) (:maintainer "Felix Chern" . "idryman@gmail.com") (:keywords "data" "toml") (:url . "https://github.com/dryman/toml-mode.el"))]) (tommyh-theme . [(20131004 2330) nil "A bright, bold-colored theme for emacs" single ((:commit . "46d1c69ee0a1ca7c67b569b891a2f28fed89e7d5") (:authors ("William Glass" . "william.glass@gmail.com")) (:maintainer "William Glass" . "william.glass@gmail.com"))]) (tongbu . [(20200414 507) ((emacs (25 1)) (web-server (0 1 2))) "A web server to share text or files between two devices" single ((:commit . "6f6e5c5446f0c5735357ab520b249ab97295653e") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "tools") (:url . "https://github.com/xuchunyang/tongbu.el"))]) - (topspace . [(20220504 2220) ((emacs (25 1))) "Scroll down & recenter top lines / get upper margins/padding" single ((:commit . "cbd1f7e8dad4284455488f759946d2f38deff2c6") (:authors ("Trevor Edwin Pogue" . "trevor.pogue@gmail.com")) (:maintainer "Trevor Edwin Pogue" . "trevor.pogue@gmail.com") (:keywords "convenience" "scrolling" "center" "cursor" "margin" "padding") (:url . "https://github.com/trevorpogue/topspace"))]) + (topspace . [(20220513 1925) ((emacs (25 1))) "Scroll down & recenter top lines / get upper margins/padding" single ((:commit . "dd7d35b52dda7bf503b8d4c23d97150152eebc41") (:authors ("Trevor Edwin Pogue" . "trevor.pogue@gmail.com")) (:maintainer "Trevor Edwin Pogue" . "trevor.pogue@gmail.com") (:keywords "convenience" "scrolling" "center" "cursor" "margin" "padding") (:url . "https://github.com/trevorpogue/topspace"))]) (topsy . [(20210831 133) ((emacs (26 3))) "Simple sticky header" single ((:commit . "8ae0976dfdbe4461c33ed44cf1dedc2c903b0bb0") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "convenience") (:url . "https://github.com/alphapapa/topsy.el"))]) (tornado-template-mode . [(20141128 1008) nil "A major mode for editing tornado templates" single ((:commit . "667c0663dbbd279b6c345446b9f2bc50eb52b747") (:authors ("Florian Mounier aka paradoxxxzero")) (:maintainer "Florian Mounier aka paradoxxxzero"))]) (torus . [(20190325 753) ((emacs (26))) "A buffer groups manager" single ((:commit . "b309da8c2eaee573a2e2572f25a08ce5da9e9990") (:authors ("Chimay")) (:maintainer "Chimay") (:keywords "files" "buffers" "groups" "persistent" "history" "layout" "tabs") (:url . "https://github.com/chimay/torus"))]) @@ -4745,7 +4747,7 @@ (tox . [(20160810 1555) nil "Launch current python test with tox" single ((:commit . "7655eb254038d5e34433e8a9d66b3ffc9c72e40c") (:authors ("Chmouel Boudjnah" . "chmouel@chmouel.com")) (:maintainer "Chmouel Boudjnah" . "chmouel@chmouel.com") (:keywords "convenience" "tox" "python" "tests") (:url . "https://github.com/chmouel/tox.el"))]) (toxi-theme . [(20160424 2126) ((emacs (24))) "A dark color theme by toxi" single ((:commit . "90c8828b91025adf5adc96011a35d25682991b8a") (:authors ("Karsten Schmidt" . "info@postspectacular.com")) (:maintainer "Karsten Schmidt" . "info@postspectacular.com") (:url . "http://bitbucket.org/postspectacular/toxi-theme/"))]) (tql-mode . [(20170724 254) ((emacs (24))) "TQL mode" single ((:commit . "488add79eb3fc8ec02aedaa997fe1ed9e5c3e638") (:authors ("Sean McLaughlin" . "seanmcl@gmail.com")) (:maintainer "Sean McLaughlin" . "seanmcl@gmail.com") (:keywords "languages" "tql"))]) - (tr-ime . [(20211120 718) ((emacs (27 1)) (w32-ime (0 0 1))) "Emulator of IME patch for Windows" tar ((:commit . "e6313639afb51d91efcc417bd0c81afd13bb079c") (:authors ("Masamichi Hosoda" . "trueroad@trueroad.jp")) (:maintainer "Masamichi Hosoda" . "trueroad@trueroad.jp") (:url . "https://github.com/trueroad/tr-emacs-ime-module"))]) + (tr-ime . [(20211120 718) ((emacs (27 1)) (w32-ime (0 0 1))) "Emulator of IME patch for Windows" tar ((:commit . "fdf93198c6303cc480a50e24aaa02c7a8308427d") (:authors ("Masamichi Hosoda" . "trueroad@trueroad.jp")) (:maintainer "Masamichi Hosoda" . "trueroad@trueroad.jp") (:url . "https://github.com/trueroad/tr-emacs-ime-module"))]) (traad . [(20180730 48) ((dash (2 13 0)) (deferred (0 3 2)) (popup (0 5 0)) (request (0 2 0)) (request-deferred (0 2 0)) (virtualenvwrapper (20151123)) (f (0 20 0)) (bind-map (1 1 1))) "emacs interface to the traad refactoring server." single ((:commit . "98e23363b7e8a590a2f55976123a8c3da75c87a5") (:authors ("Austin Bingham" . "austin.bingham@gmail.com")) (:maintainer "Austin Bingham" . "austin.bingham@gmail.com") (:url . "https://github.com/abingham/traad"))]) (tracking . [(20210713 1609) nil "Buffer modification tracking" tar ((:commit . "710f057fedae6e9b820cce9336fef24b7d057e4c") (:authors ("Jorgen Schaefer" . "forcer@forcix.cx")) (:maintainer "Jorgen Schaefer" . "forcer@forcix.cx") (:url . "https://github.com/emacs-circe/circe/wiki/Tracking"))]) (tracwiki-mode . [(20150119 1621) ((xml-rpc (1 6 8))) "Emacs Major mode for working with Trac" single ((:commit . "6a620444d59b438f42383b48cd4c19c03105dba6") (:authors ("Matthew Erickson" . "peawee@peawee.net")) (:maintainer "Matthew Erickson" . "peawee@peawee.net") (:keywords "trac" "wiki" "tickets"))]) @@ -4753,10 +4755,10 @@ (tramp-hdfs . [(20210526 339) ((emacs (24 4))) "Tramp extension to access hadoop/hdfs file system in Emacs" single ((:commit . "aa93bdbb3d5619c262ce53af1981edcd2a0705e5") (:authors ("Raghav Kumar Gautam" . "raghav@apache.org")) (:maintainer "Raghav Kumar Gautam" . "raghav@apache.org") (:keywords "tramp" "emacs" "hdfs" "hadoop" "webhdfs" "rest"))]) (tramp-term . [(20220412 1546) nil "Automatic setup of directory tracking in ssh sessions" single ((:commit . "e2e5375a444d4eb5d144bef12e066c02befd1352") (:authors ("Randy Morris" . "randy.morris@archlinux.us")) (:maintainer "Randy Morris" . "randy.morris@archlinux.us") (:keywords "comm" "terminals") (:url . "https://github.com/randymorris/tramp-term.el"))]) (transfer-sh . [(20200601 1708) ((emacs (24 3)) (async (1 0))) "Simple interface for sending buffer contents to transfer.sh" single ((:commit . "0621a66d00ec91a209a542c10b158095088bd44d") (:keywords "comm" "convenience" "files") (:url . "https://gitlab.com/tuedachu/transfer-sh.el"))]) - (transient . [(20220509 1943) ((emacs (25 1)) (compat (28 1 1 0))) "Transient commands" tar ((:commit . "6fc09a663e408ade0d1b88f47701c96a9b051e34") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "extensions") (:url . "https://github.com/magit/transient"))]) + (transient . [(20220514 945) ((emacs (25 1)) (compat (28 1 1 0))) "Transient commands" tar ((:commit . "a0c69e5c712511a35d0ab53a5634420e9705149e") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "extensions") (:url . "https://github.com/magit/transient"))]) (transient-dwim . [(20220425 1331) ((emacs (26 1)) (transient (0 1))) "Useful preset transient commands" single ((:commit . "7b6e70fb49b9d18106748202011863ebc39b864a") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "tools") (:url . "https://github.com/conao3/transient-dwim.el"))]) (transient-posframe . [(20210102 130) ((emacs (26 0)) (posframe (0 4 3)) (transient (0 2 0))) "Using posframe to show transient" single ((:commit . "dcd898d1d35183a7d4f2c8f0ebcb43b4f8e70ebe") (:authors ("Yanghao Xie")) (:maintainer "Yanghao Xie" . "yhaoxie@gmail.com") (:keywords "convenience" "bindings" "tooltip") (:url . "https://github.com/yanghaoxie/transient-posframe"))]) - (translate-mode . [(20220402 853) ((emacs (24 3))) "Paragraph-oriented side-by-side doc translation workflow" single ((:commit . "fb73b3d928a8011a21402e2c14aa4aab56bd05ae") (:authors ("Ray Wang" . "rayw.public@gmail.com")) (:maintainer "Ray Wang" . "rayw.public@gmail.com") (:keywords "translate" "convenience" "editing") (:url . "https://github.com/rayw000/translate-mode"))]) + (translate-mode . [(20220511 1357) ((emacs (24 3))) "Paragraph-oriented side-by-side doc translation workflow" single ((:commit . "e1940b333241a4d0c224b7b875962736ca2b693b") (:authors ("Ray Wang" . "rayw.public@gmail.com")) (:maintainer "Ray Wang" . "rayw.public@gmail.com") (:keywords "translate" "convenience" "editing") (:url . "https://github.com/rayw000/translate-mode"))]) (transmission . [(20210705 2152) ((emacs (24 4)) (let-alist (1 0 5))) "Interface to a Transmission session" single ((:commit . "a03a6f5c7b133e0a37896b6d993dd6d6d4532cc2") (:authors ("Mark Oteiza" . "mvoteiza@udel.edu")) (:maintainer "Mark Oteiza" . "mvoteiza@udel.edu") (:keywords "comm" "tools"))]) (transpose-frame . [(20200307 2119) nil "Transpose windows arrangement in a frame" single ((:commit . "12e523d70ff78cc8868097b56120848befab5dbc") (:authors ("S. Irie")) (:maintainer "S. Irie") (:keywords "window"))]) (transpose-mark . [(20150405 716) nil "Transpose data using the Emacs mark" single ((:commit . "667327602004794de97214cf336ac61650ef75b7") (:authors ("Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com")) (:maintainer "Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com") (:keywords "transpose" "convenience"))]) @@ -4770,15 +4772,15 @@ (tree-sitter-indent . [(20220411 1439) ((emacs (26 1)) (tree-sitter (0 12 1)) (seq (2 20))) "Provide indentation with a Tree-sitter backend" single ((:commit . "4ef246db3e4ff99f672fe5e4b416c890f885c09e") (:authors ("Felipe Lema" . "felipelema@mortemale.org")) (:maintainer "Felipe Lema" . "felipelema@mortemale.org") (:keywords "convenience" "internal") (:url . "https://codeberg.org/FelipeLema/tree-sitter-indent.el"))]) (tree-sitter-langs . [(20220508 636) ((emacs (25 1)) (tree-sitter (0 15 0))) "Grammar bundle for tree-sitter" tar ((:commit . "deb2d8674be8f777ace50e15c7c041aeddb1d0b2") (:authors ("Tuấn-Anh Nguyễn" . "ubolonton@gmail.com")) (:maintainer "Tuấn-Anh Nguyễn" . "ubolonton@gmail.com") (:keywords "languages" "tools" "parsers" "tree-sitter") (:url . "https://github.com/emacs-tree-sitter/tree-sitter-langs"))]) (treefactor . [(20200516 1631) ((emacs (26 1)) (dash (2 16 0)) (f (0 20 0)) (org (9 2 6)) (avy (0 5 0))) "Restructure your messy Org documents" single ((:commit . "75357757022a4399ab772ff0d92065bd114dabe9") (:authors ("Leo Littlebook" . "Leo.Littlebook@gmail.com")) (:maintainer "Leo Littlebook" . "Leo.Littlebook@gmail.com") (:keywords "outlines" "files" "convenience") (:url . "https://github.com/cyberthal/treefactor"))]) - (treemacs . [(20220506 1056) ((emacs (26 1)) (cl-lib (0 5)) (dash (2 11 0)) (s (1 12 0)) (ace-window (0 9 0)) (pfuture (1 7)) (hydra (0 13 2)) (ht (2 2)) (cfrs (1 3 2))) "A tree style file explorer package" tar ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-all-the-icons . [(20220425 1124) ((emacs (26 1)) (all-the-icons (4 0 1)) (treemacs (0 0))) "all-the-icons integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Eric Dallo" . "ercdll1337@gmail.com")) (:maintainer "Eric Dallo" . "ercdll1337@gmail.com") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-evil . [(20220427 1331) ((emacs (26 1)) (evil (1 2 12)) (treemacs (0 0))) "Evil mode integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-icons-dired . [(20211229 1448) ((treemacs (0 0)) (emacs (26 1))) "Treemacs icons for dired" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-magit . [(20220502 1310) ((emacs (26 1)) (treemacs (0 0)) (pfuture (1 3)) (magit (2 90 0))) "Magit integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-persp . [(20220209 2117) ((emacs (26 1)) (treemacs (0 0)) (persp-mode (2 9 7)) (dash (2 11 0))) "Persp-mode integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-perspective . [(20220209 2117) ((emacs (26 1)) (treemacs (0 0)) (perspective (2 8)) (dash (2 11 0))) "Perspective integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de") ("Jason Dufair" . "jase@dufair.org")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-projectile . [(20211223 1454) ((emacs (26 1)) (projectile (0 14 0)) (treemacs (0 0))) "Projectile integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) - (treemacs-tab-bar . [(20220221 2038) ((emacs (27 1)) (treemacs (0 0)) (dash (2 11 0))) "Tab bar integration for treemacs" single ((:commit . "07706547a2a927e6787645538d8bdb6e9418fb62") (:authors ("Alexander Miller" . "alexanderm@web.de") ("Jason Dufair" . "jase@dufair.org") ("Aaron Jensen" . "aaronjensen@gmail.com")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs . [(20220516 2036) ((emacs (26 1)) (cl-lib (0 5)) (dash (2 11 0)) (s (1 12 0)) (ace-window (0 9 0)) (pfuture (1 7)) (hydra (0 13 2)) (ht (2 2)) (cfrs (1 3 2))) "A tree style file explorer package" tar ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-all-the-icons . [(20220425 1124) ((emacs (26 1)) (all-the-icons (4 0 1)) (treemacs (0 0))) "all-the-icons integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Eric Dallo" . "ercdll1337@gmail.com")) (:maintainer "Eric Dallo" . "ercdll1337@gmail.com") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-evil . [(20220511 1852) ((emacs (26 1)) (evil (1 2 12)) (treemacs (0 0))) "Evil mode integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-icons-dired . [(20211229 1448) ((treemacs (0 0)) (emacs (26 1))) "Treemacs icons for dired" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-magit . [(20220502 1310) ((emacs (26 1)) (treemacs (0 0)) (pfuture (1 3)) (magit (2 90 0))) "Magit integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-persp . [(20220209 2117) ((emacs (26 1)) (treemacs (0 0)) (persp-mode (2 9 7)) (dash (2 11 0))) "Persp-mode integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-perspective . [(20220209 2117) ((emacs (26 1)) (treemacs (0 0)) (perspective (2 8)) (dash (2 11 0))) "Perspective integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de") ("Jason Dufair" . "jase@dufair.org")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-projectile . [(20211223 1454) ((emacs (26 1)) (projectile (0 14 0)) (treemacs (0 0))) "Projectile integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) + (treemacs-tab-bar . [(20220221 2038) ((emacs (27 1)) (treemacs (0 0)) (dash (2 11 0))) "Tab bar integration for treemacs" single ((:commit . "96a53189f51f3c75db8dcf3bf54bf82e927cf980") (:authors ("Alexander Miller" . "alexanderm@web.de") ("Jason Dufair" . "jase@dufair.org") ("Aaron Jensen" . "aaronjensen@gmail.com")) (:maintainer "Alexander Miller" . "alexanderm@web.de") (:url . "https://github.com/Alexander-Miller/treemacs"))]) (treepy . [(20191108 2217) ((emacs (25 1))) "Generic tree traversal tools" single ((:commit . "3ac940e97f3d03e48ca9d7fcd74916a9b01c72f3") (:authors ("Daniel Barreto" . "daniel.barreto.n@gmail.com")) (:maintainer "Daniel Barreto" . "daniel.barreto.n@gmail.com") (:keywords "lisp" "maint" "tools") (:url . "https://github.com/volrath/treepy.el"))]) (treeview . [(20210723 2256) ((emacs (24 4))) "A generic tree navigation library" single ((:commit . "09c8c1d045c7c8eace61b10b6df9d2f9079de78e") (:authors ("Tilman Rassy" . "tilman.rassy@googlemail.com")) (:maintainer "Tilman Rassy" . "tilman.rassy@googlemail.com") (:keywords "lisp" "tools" "internal" "convenience") (:url . "https://github.com/tilmanrassy/emacs-treeview"))]) (trident-mode . [(20190410 2036) ((emacs (24)) (slime (20130526)) (skewer-mode (1 5 0)) (dash (1 0 3))) "Live Parenscript interaction" single ((:commit . "109a1bc10bd0c4b47679a6ca5c4cd27c7c8d4ccb") (:authors ("John Mastro" . "john.b.mastro@gmail.com")) (:maintainer "John Mastro" . "john.b.mastro@gmail.com") (:keywords "languages" "lisp" "processes" "tools") (:url . "https://github.com/johnmastro/trident-mode.el"))]) @@ -4811,7 +4813,7 @@ (typit . [(20220106 1722) ((emacs (24 4)) (f (0 18)) (mmt (0 1 1))) "Typing game similar to tests on 10 fast fingers" tar ((:commit . "61dba759f8178550bc067a360c42ce1089e99a66") (:authors ("Mark Karpov" . "markkarpov92@gmail.com")) (:maintainer "Mark Karpov" . "markkarpov92@gmail.com") (:keywords "games") (:url . "https://github.com/mrkkrp/typit"))]) (typo . [(20200706 1714) nil "Minor mode for typographic editing" single ((:commit . "173ebe4fc7ac38f344b16e6eaf41f79e38f20d57") (:authors ("Jorgen Schaefer" . "forcer@forcix.cx")) (:maintainer "Jorgen Schaefer" . "forcer@forcix.cx") (:keywords "convenience" "wp") (:url . "https://github.com/jorgenschaefer/typoel"))]) (typo-suggest . [(20200830 1143) ((emacs (24 3)) (helm (3 0)) (company (0 9 10)) (s (1 12 0)) (dash (2 13 0))) "Don't make typos with the help of helm and company" single ((:commit . "3014d18ae2f0b6b857bb613f373e034c743f4d2e") (:authors ("Kadir Can Çetin" . "kadircancetin@gmail.com")) (:maintainer "Kadir Can Çetin" . "kadircancetin@gmail.com") (:keywords "convenience" "wp") (:url . "https://github.com/kadircancetin/typo-suggest"))]) - (tzc . [(20220126 604) ((emacs (27 1))) "Converts time between different time zones" single ((:commit . "3af821d2125a67786f93d50d532a71f681f381cc") (:authors ("Md Arif Shaikh" . "arifshaikh.astro@gmail.com")) (:maintainer "Md Arif Shaikh" . "arifshaikh.astro@gmail.com") (:keywords "convenience") (:url . "https://github.com/md-arif-shaikh/tzc"))]) + (tzc . [(20220513 434) ((emacs (27 1))) "Converts time between different time zones" single ((:commit . "8fa2aa5636448a3c3e7b59ea3fe38e80a268537a") (:authors ("Md Arif Shaikh" . "arifshaikh.astro@gmail.com")) (:maintainer "Md Arif Shaikh" . "arifshaikh.astro@gmail.com") (:keywords "convenience") (:url . "https://github.com/md-arif-shaikh/tzc"))]) (ubuntu-theme . [(20150805 1506) nil "A theme inspired by the default terminal colors in Ubuntu" single ((:commit . "88b0eefc75d4cbcde103057e1c5968d4c3052f69") (:authors ("Francesc Rocher" . "francesc.rocher@gmail.com")) (:maintainer "Francesc Rocher" . "francesc.rocher@gmail.com") (:url . "http://github.com/rocher/ubuntu-theme"))]) (uci-mode . [(20210626 1956) ((emacs (25 1))) "Major-mode for chess engine interaction" single ((:commit . "2cdf4de5af96d56108a0a5716416ef3c8ac7bb7c") (:authors ("Dodge Coates and Roland Walker")) (:maintainer "Dodge Coates and Roland Walker") (:keywords "data" "games" "chess") (:url . "https://github.com/dwcoates/uci-mode"))]) (ucs-utils . [(20150826 1414) ((persistent-soft (0 8 8)) (pcache (0 2 3)) (list-utils (0 4 2))) "Utilities for Unicode characters" tar ((:commit . "cbfd42f822bf5717934fa2d92060e6e24a813433") (:authors ("Roland Walker" . "walker@pobox.com")) (:maintainer "Roland Walker" . "walker@pobox.com") (:keywords "i18n" "extensions") (:url . "http://github.com/rolandwalker/ucs-utils"))]) @@ -4935,13 +4937,13 @@ (voca-builder . [(20161101 1645) ((popup (0 5 2))) "Helps you build up your vocabulary" single ((:commit . "51573beec8cd8308477b0faf453aad93e17f57c5") (:authors ("Yi Tang" . "yi.tang.uk@me.com")) (:maintainer "Yi Tang" . "yi.tang.uk@me.com") (:keywords "english" "vocabulary") (:url . "https://github.com/yitang/voca-builder"))]) (volatile-highlights . [(20160612 155) nil "Minor mode for visual feedback on some operations." single ((:commit . "9a20091f0ce7fc0a6b3e641a6a46d5f3ac4d8392") (:authors ("K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>")) (:maintainer "K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>") (:keywords "emulations" "convenience" "wp") (:url . "http://www.emacswiki.org/emacs/download/volatile-highlights.el"))]) (volume . [(20201002 1022) nil "tweak your sound card volume from Emacs" single ((:commit . "afb75a5f7fe41eb28c8dbb1378e80d103eea05c7") (:authors ("Daniel Brockman" . "daniel@brockman.se")) (:maintainer "Daniel Brockman" . "daniel@brockman.se") (:url . "http://www.brockman.se/software/volume-el/"))]) - (vs-dark-theme . [(20220414 930) ((emacs (24 1))) "Visual Studio IDE dark theme" single ((:commit . "f5eb6387506b22ba7e21b4e335e689cf6768f18b") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/emacs-vs/vs-dark-theme"))]) - (vs-light-theme . [(20220414 931) ((emacs (24 1))) "Visual Studio IDE light theme" single ((:commit . "d585d0a3b87461b01dfad4ceaa7831668c6021d8") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/emacs-vs/vs-light-theme"))]) + (vs-dark-theme . [(20220515 714) ((emacs (24 1))) "Visual Studio IDE dark theme" single ((:commit . "890d21867a50bf447d2a192aab6460401089c6c2") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/emacs-vs/vs-dark-theme"))]) + (vs-light-theme . [(20220515 714) ((emacs (24 1))) "Visual Studio IDE light theme" single ((:commit . "dc5c1fda65ad7f8da2c06944560c1818fdf64390") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/emacs-vs/vs-light-theme"))]) (vscdark-theme . [(20191212 107) ((emacs (24 1))) "VS Code Dark+ like theme" single ((:commit . "8eba74059e8a9db974e4056ee024e52fe54da485") (:authors ("Alexander L. Belikoff")) (:maintainer "Alexander L. Belikoff") (:url . "https://github.com/abelikoff/vscdark-theme"))]) (vscode-dark-plus-theme . [(20220320 530) nil "Default Visual Studio Code Dark+ theme" single ((:commit . "cec18a9d816fef372a4e70f6ad1e16a42aa93b06") (:authors ("Ian Y.E. Pan")) (:maintainer "Ian Y.E. Pan") (:url . "https://github.com/ianpan870102/vscode-dark-plus-emacs-theme"))]) (vscode-icon . [(20201214 2227) ((emacs (25 1))) "Utility package to provide Vscode style icons" tar ((:commit . "909151c8105861aa300f5601e333909d36d0ebf5") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "files" "tools") (:url . "https://github.com/jojojames/vscode-icon-emacs"))]) (vterm . [(20220429 21) ((emacs (25 1))) "Fully-featured terminal emulator" tar ((:commit . "b44723552f86407d528c4a6c8057382c061b008e") (:authors ("Lukas Fürmetz" . "fuermetz@mailbox.org")) (:maintainer "Lukas Fürmetz" . "fuermetz@mailbox.org") (:keywords "terminals") (:url . "https://github.com/akermu/emacs-libvterm"))]) - (vterm-toggle . [(20220416 1034) ((emacs (25 1)) (vterm (0 0 1))) "Toggles between the vterm buffer and other buffers." single ((:commit . "644e9df9f741c3338c248291799375a1778eb98b") (:authors (nil . "jixiuf jixiuf@qq.com")) (:maintainer nil . "jixiuf jixiuf@qq.com") (:keywords "vterm" "terminals") (:url . "https://github.com/jixiuf/vterm-toggle"))]) + (vterm-toggle . [(20220416 1034) ((emacs (25 1)) (vterm (0 0 1))) "Toggles between the vterm buffer and other buffers." single ((:commit . "b402b284da3ff38a4abf2acc480188df9965ba88") (:authors (nil . "jixiuf jixiuf@qq.com")) (:maintainer nil . "jixiuf jixiuf@qq.com") (:keywords "vterm" "terminals") (:url . "https://github.com/jixiuf/vterm-toggle"))]) (vtm . [(20200921 338) nil "Manages vterm buffers with configuration files" tar ((:commit . "d770fd8cff7c24688199392ad93c01485c6a9569") (:keywords "convenience") (:url . "https://github.com/laishulu/emacs-vterm-manager"))]) (vue-html-mode . [(20180428 2035) nil "Major mode for editing Vue.js templates" single ((:commit . "1514939804bad558584feeb6298b38d22eadf64e") (:authors ("Adam Niederer" . "adam.niederer@gmail.com")) (:maintainer "Adam Niederer" . "adam.niederer@gmail.com") (:keywords "languages" "vue" "template") (:url . "http://github.com/AdamNiederer/vue-html-mode"))]) (vue-mode . [(20190415 231) ((mmm-mode (0 5 5)) (vue-html-mode (0 2)) (ssass-mode (0 2)) (edit-indirect (0 1 4))) "Major mode for vue component based on mmm-mode" single ((:commit . "031edd1f97db6e7d8d6c295c0e6d58dd128b9e71") (:authors ("codefalling" . "code.falling@gmail.com")) (:maintainer "codefalling" . "code.falling@gmail.com") (:keywords "languages"))]) @@ -5008,7 +5010,7 @@ (whizzml-mode . [(20201013 239) ((emacs (24 4))) "Programming mode for editing WhizzML files" tar ((:commit . "3dce3be0c32b9b2d259e462b4b27c530af47466a") (:authors ("Jose Antonio Ortega Ruiz" . "jao@bigml.com")) (:maintainer "Jose Antonio Ortega Ruiz" . "jao@bigml.com") (:keywords "languages" "lisp"))]) (whois . [(20211104 812) ((emacs (24))) "Syntax highlighted domain name queries using system whois" single ((:commit . "f22244202fdac5064d5eff95c6f35ae887b01142") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "network" "comm") (:url . "https://github.com/lassik/emacs-whois"))]) (whole-line-or-region . [(20201214 650) ((emacs (24 1)) (cl-lib (0 6))) "Operate on current line if region undefined" single ((:commit . "500ad90695e8a5a0cefabb7500158eab0835a0ce") (:authors ("Joe Casadonte" . "emacs@northbound-train.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "convenience" "wp") (:url . "https://github.com/purcell/whole-line-or-region"))]) - (why-this . [(20220429 1227) ((emacs (27 2))) "Why is this line here? Ask version control" single ((:commit . "b69263c66b63680e1db81f6da98de00c230c7384") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "convenience" "vc") (:url . "https://codeberg.org/akib/emacs-why-this"))]) + (why-this . [(20220515 1722) ((emacs (27 1))) "Why is this line here? Ask version control" single ((:commit . "c7f771736cd82a6c420078c07787a3872b444c40") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "convenience" "vc") (:url . "https://codeberg.org/akib/emacs-why-this"))]) (wide-column . [(20170925 1613) nil "Calls functions dependant on column position." single ((:commit . "ce9ef4675485a7bea381077866368ef875226b10") (:authors ("Phillip Lord" . "p.lord@russet.org.uk")) (:maintainer "Phillip Lord" . "p.lord@russet.org.uk") (:keywords "minor mode" "cursor colour" "column width"))]) (widget-mvc . [(20150102 406) nil "MVC framework for the emacs widgets" single ((:commit . "ff5a85880df7b87f9f480fe3c28438a0712b7b87") (:authors ("SAKURAI Masashi <m.sakurai at kiwanami.net>")) (:maintainer "SAKURAI Masashi <m.sakurai at kiwanami.net>") (:keywords "lisp" "widget"))]) (wiki-nav . [(20200309 1323) ((button-lock (1 0 2)) (nav-flash (1 0 0))) "Simple file navigation using [[WikiStrings]]" single ((:commit . "9afe0f4d05910b0cccc94cb6d4d880119f3b0528") (:authors ("Roland Walker" . "walker@pobox.com")) (:maintainer "Roland Walker" . "walker@pobox.com") (:keywords "mouse" "button" "hypermedia" "navigation") (:url . "http://github.com/rolandwalker/button-lock"))]) @@ -5053,18 +5055,18 @@ (worf . [(20220102 835) ((swiper (0 11 0)) (ace-link (0 1 0)) (hydra (0 13 0)) (zoutline (0 1 0))) "A warrior does not press so many keys! (in org-mode)" tar ((:commit . "8681241e118585824cd256e5b026978bf06c7e58") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "lisp") (:url . "https://github.com/abo-abo/worf"))]) (workgroups . [(20110726 1641) nil "workgroups for windows (for Emacs)" single ((:commit . "9572b3492ee09054dc329f64ed846c962b395e39") (:authors ("tlh" . "thunkout@gmail.com")) (:maintainer "tlh" . "thunkout@gmail.com") (:keywords "session" "management" "window-configuration" "persistence"))]) (workgroups2 . [(20220423 1150) ((emacs (25 1))) "save&load multiple named workspaces (or \"workgroups\")" tar ((:commit . "ccd6948c92ea21d0dec56dff029b3f46df408de5") (:authors ("Sergey Pashinin <sergey at pashinin dot com>")) (:maintainer "Sergey Pashinin <sergey at pashinin dot com>") (:keywords "session" "management" "window-configuration" "persistence") (:url . "https://github.com/pashinin/workgroups2"))]) - (workroom . [(20220501 1500) ((emacs (27 2))) "Named rooms for work without irrelevant distracting buffers" single ((:commit . "001fe2777f49ac73b6ab24401094a1c3c5efc887") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "convenience") (:url . "https://codeberg.org/akib/emacs-workroom"))]) + (workroom . [(20220515 1728) ((emacs (25 1))) "Named rooms for work without irrelevant distracting buffers" single ((:commit . "5da61d48fb1cf855ac76ff5bbb126d4033212678") (:authors ("Akib Azmain Turja" . "akib@disroot.org")) (:maintainer "Akib Azmain Turja" . "akib@disroot.org") (:keywords "tools" "convenience") (:url . "https://codeberg.org/akib/emacs-workroom"))]) (world-time-mode . [(20140627 807) nil "show whole days of world-time diffs" single ((:commit . "ce7a3b45c87eb24cfe61eee453175d64f741d7cc") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "tools" "calendar"))]) (wotd . [(20170328 1948) ((emacs (24 4)) (org (8 2 10))) "Fetch word-of-the-day from multiple online sources" single ((:commit . "d2937a3d91e014f8028a1f33d21c18cc0b065a64") (:authors ("Junpeng Qiu" . "qjpchmail@gmail.com")) (:maintainer "Junpeng Qiu" . "qjpchmail@gmail.com") (:keywords "extensions"))]) (wrap-region . [(20140117 720) ((dash (1 0 3))) "Wrap text with punctation or tag" single ((:commit . "fbae9b0f106187af19823f1a6260b5c68b7252e6") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "speed" "convenience") (:url . "http://github.com/rejeep/wrap-region"))]) (writefreely . [(20190628 1606) ((emacs (24 3)) (org (9 0)) (ox-gfm (0 0)) (request (0 3))) "Push your Org files as markdown to a writefreely instance" single ((:commit . "83a487e48e0d8342c372deb74d04c0b43474268c") (:authors ("Daniel Gomez <d.gomez at posteo dot org>")) (:maintainer "Daniel Gomez <d.gomez at posteo dot org>") (:keywords "convenience") (:url . "https://github.com/dangom/writefreely.el"))]) - (writegood-mode . [(20220509 1817) nil "Polish up poor writing on the fly" single ((:commit . "2ae759944a7865ceef6f6049f5e26c1f60c6270c") (:authors ("Benjamin Beckwith")) (:maintainer "Benjamin Beckwith") (:keywords "writing" "weasel-words" "grammar") (:url . "http://github.com/bnbeckwith/writegood-mode"))]) + (writegood-mode . [(20220511 2109) nil "Polish up poor writing on the fly" single ((:commit . "d54eadeedb8bf3aa0e0a584c0a7373c69644f4b8") (:authors ("Benjamin Beckwith")) (:maintainer "Benjamin Beckwith") (:keywords "writing" "weasel-words" "grammar") (:url . "http://github.com/bnbeckwith/writegood-mode"))]) (writeroom-mode . [(20220426 2046) ((emacs (25 1)) (visual-fill-column (2 2))) "Minor mode for distraction-free writing" tar ((:commit . "a736205c194d7525feb1e1f10f4186c7b2b62bef") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text") (:url . "https://github.com/joostkremers/writeroom-mode"))]) (ws-butler . [(20201117 1528) nil "Unobtrusively remove trailing whitespace." single ((:commit . "e3a38d93e01014cd47bf5af4924459bd145fd7c4") (:authors ("Le Wang")) (:maintainer "Le Wang") (:url . "https://github.com/lewang/ws-butler"))]) (wsd-mode . [(20191031 1211) nil "Emacs major-mode for www.websequencediagrams.com" tar ((:commit . "53330a2a43c4875f8682457df1a869a4c9028660") (:authors ("Jostein Kjønigsen" . "jostein@gmail.com")) (:maintainer "Jostein Kjønigsen" . "jostein@gmail.com") (:keywords "wsd" "diagrams" "design" "process" "modelling" "uml") (:url . "https://github.com/josteink/wsd-mode"))]) (wttrin . [(20170614 1206) ((emacs (24 4)) (xterm-color (1 0))) "Emacs frontend for weather web service wttr.in" single ((:commit . "df5427ce2a5ad4dab652dbb1c4a1834d7ddc2abc") (:authors ("Carl X. Su" . "bcbcarl@gmail.com") ("ono hiroko (kuanyui)" . "azazabc123@gmail.com")) (:maintainer "Carl X. Su" . "bcbcarl@gmail.com") (:keywords "comm" "weather" "wttrin") (:url . "https://github.com/bcbcarl/emacs-wttrin"))]) - (wucuo . [(20211201 1214) ((emacs (25 1))) "Fastest solution to spell check camel case code or plain text" tar ((:commit . "09fc58a02621b6c9615f8289c457e30ca6f63bcb") (:authors ("Chen Bin <chenbin DOT sh AT gmail DOT com>")) (:maintainer "Chen Bin <chenbin DOT sh AT gmail DOT com>") (:keywords "convenience") (:url . "http://github.com/redguardtoo/wucuo"))]) - (wwg . [(20210614 1527) ((emacs (25 1))) "Writer word goals" single ((:commit . "46c8a7c71275ced2c662c1222d4b85319f80dd83") (:authors (nil . "Andrea andrea-dev@hotmail.com>")) (:maintainer nil . "Andrea andrea-dev@hotmail.com>") (:keywords "wp") (:url . "https://github.com/ag91/writer-word-goals"))]) + (wucuo . [(20220516 751) ((emacs (25 1))) "Fastest solution to spell check camel case code or plain text" tar ((:commit . "44cf8adee58f2b4922c34dfa51af06c52de0a192") (:authors ("Chen Bin <chenbin DOT sh AT gmail DOT com>")) (:maintainer "Chen Bin <chenbin DOT sh AT gmail DOT com>") (:keywords "convenience") (:url . "http://github.com/redguardtoo/wucuo"))]) + (wwg . [(20210614 1527) ((emacs (25 1))) "Writer word goals" single ((:commit . "cf29c6ae6f8d92f012feecec1dccb23b7e93c86f") (:authors (nil . "Andrea andrea-dev@hotmail.com>")) (:maintainer nil . "Andrea andrea-dev@hotmail.com>") (:keywords "wp") (:url . "https://github.com/ag91/writer-word-goals"))]) (wwtime . [(20151122 1610) nil "Insert a time of day with appropriate world-wide localization" single ((:commit . "d04d8fa814b5d3644efaeb28f25520ada69acbbd") (:authors ("Norman Walsh" . "ndw@nwalsh.com")) (:maintainer "Norman Walsh" . "ndw@nwalsh.com") (:keywords "time"))]) (www-synonyms . [(20170128 2251) ((request (0 2 0)) (cl-lib (0 5))) "insert synonym for a word" single ((:commit . "7e37ea35064ff31c9945f0198a653647d408c936") (:authors ("Bernhard Specht" . "bernhard@specht.net")) (:maintainer "Bernhard Specht" . "bernhard@specht.net") (:keywords "lisp"))]) (x-path-walker . [(20201220 628) ((helm-core (1 9 2))) "Navigation feature for JSON/XML/HTML based on path (imenu like)" tar ((:commit . "e553968b6ddebe39ea00904a2e9ff4cff6096985") (:authors (nil . "<lompik@ArchOrion>")) (:maintainer nil . "<lompik@ArchOrion>") (:keywords "convenience"))]) @@ -5138,7 +5140,6 @@ (ytel . [(20200725 1056) ((emacs (25 3))) "Query YouTube via Invidious" single ((:commit . "d40bc7ead8d4d7e4d16b03b66a93d63bef51cc5f") (:authors ("Gabriele Rastello")) (:maintainer "Gabriele Rastello") (:keywords "youtube" "matching" "multimedia") (:url . "https://github.com/grastello/ytel"))]) (z3-mode . [(20211116 138) ((flycheck (0 23)) (emacs (24))) "A z3/SMTLIBv2 interactive development environment" single ((:commit . "0356cbe1e1e2b780ba0ddb4aaa055fa246a67931") (:authors ("Zephyr Pellerin" . "zephyr.pellerin@gmail.com")) (:maintainer "Zephyr Pellerin" . "zephyr.pellerin@gmail.com") (:keywords "z3" "yices" "mathsat" "smt" "beaver") (:url . "https://github.com/zv/z3-mode"))]) (zeal-at-point . [(20180131 2354) nil "Search the word at point with Zeal" single ((:commit . "0fc3263f44e95acd3e9d91057677621ce4d297ee") (:authors ("Jinzhu" . "wosmvp@gmail.com")) (:maintainer "Jinzhu" . "wosmvp@gmail.com") (:url . "https://github.com/jinzhu/zeal-at-point"))]) - (zel . [(20171014 832) ((emacs (25)) (frecency (0 1))) "Access frecent files easily" single ((:commit . "9dae2d212224d1deae1f62561fa8e4d689fd09f2") (:authors ("Sebastian Christ" . "rudolfo.christ@gmail.com")) (:maintainer "Sebastian Christ" . "rudolfo.christ@gmail.com") (:keywords "convenience" "files" "matching") (:url . "https://github.com/rudolfochrist/zel"))]) (zen-and-art-theme . [(20120622 1437) nil "zen and art color theme for GNU Emacs 24" single ((:commit . "a7226cbce0bca2501d69a620cb2aeabfc396c232") (:authors ("Nick Parker")) (:maintainer "Nick Parker"))]) (zen-mode . [(20200609 822) ((emacs (24 3))) "A major mode for the Zen programming language" single ((:commit . "c1b1806358f3cce6c04b30699987d82dc7d42559") (:authors ("Andrea Orru <andreaorru1991@gmail.com>, Andrew Kelley <superjoe30@gmail.com>, kristopher tate <kt@connectfree.co.jp>, Yoshitaka Takemoto" . "yt.3b8@connectfree.co.jp")) (:maintainer "Andrea Orru <andreaorru1991@gmail.com>, Andrew Kelley <superjoe30@gmail.com>, kristopher tate <kt@connectfree.co.jp>, Yoshitaka Takemoto" . "yt.3b8@connectfree.co.jp") (:keywords "zen" "languages") (:url . "https://github.com/zenlang/zen-mode"))]) (zenburn-theme . [(20220412 2023) nil "A low contrast color theme for Emacs." single ((:commit . "89c0e39317850d5ccf14dcbbaff06b0a193454a6") (:authors ("Bozhidar Batsov" . "bozhidar@batsov.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:url . "http://github.com/bbatsov/zenburn-emacs"))]) @@ -5150,15 +5151,16 @@ (zero-input . [(20200405 1220) ((emacs (24 3)) (s (1 2 0))) "Zero Chinese input method framework" single ((:commit . "729da9f4b99acb744ee6974ed7f3d4e252fd19da") (:url . "https://gitlab.emacsos.com/sylecn/zero-el"))]) (zerodark-theme . [(20211115 841) ((all-the-icons (2 0 0))) "A dark, medium contrast theme for Emacs" single ((:commit . "b463528704f6eb00684c0ee003fbd8e42901cde0") (:authors ("Nicolas Petton" . "nicolas@petton.fr")) (:maintainer "Nicolas Petton" . "nicolas@petton.fr") (:keywords "themes") (:url . "https://github.com/NicolasPetton/zerodark-theme"))]) (zetteldeft . [(20220429 2057) ((emacs (25 1)) (deft (0 8)) (ace-window (0 7 0))) "Turn deft into a zettelkasten system" tar ((:commit . "86dd346be4bdddd6ac8d47503355fea350098271") (:authors ("EFLS <Elias Storms>")) (:maintainer "EFLS <Elias Storms>") (:keywords "deft" "zettelkasten" "zetteldeft" "wp" "files") (:url . "https://efls.github.io/zetteldeft/"))]) + (zetteldesk . [(20220512 1736) ((emacs (27 1)) (org-roam (2 0))) "A revision and outlining tool for org-roam" single ((:commit . "0237a5a0f9cc40dc543c9713c37bbb34d548de50") (:authors ("Vidianos Giannitsis" . "vidianosgiannitsis@gmail.com")) (:maintainer "Vidianos Giannitsis" . "vidianosgiannitsis@gmail.com") (:url . "https://github.com/Vidianos-Giannitsis/zetteldesk.el"))]) (zettelkasten . [(20210830 1025) ((emacs (25 1)) (s (1 10 0))) "Helper functions to organise notes in a Zettelkasten style" single ((:commit . "603a5b692a08340c1865a6f73cacf57c4fd64cb2") (:authors ("Yann Herklotz" . "yann@ymhg.org")) (:maintainer "Yann Herklotz" . "yann@ymhg.org") (:keywords "files" "hypermedia" "notes") (:url . "https://github.com/ymherklotz/emacs-zettelkasten"))]) (zetz-mode . [(20200823 536) ((emacs (25 1)) (dash (2 17 0)) (hydra (0 15 0))) "A major mode for the ZetZ programming language" single ((:commit . "04da33f4ffa9db5b3556f423276f4fd1db13ec67") (:keywords "languages" "programming") (:url . "https://github.com/damon-kwok/zetz-mode"))]) (zig-mode . [(20211227 1108) ((emacs (24 3))) "A major mode for the Zig programming language" single ((:commit . "aa20d630b8c413dab8d6bd120ec3ed5db5c9da70") (:authors ("Andrea Orru <andreaorru1991@gmail.com>, Andrew Kelley" . "superjoe30@gmail.com")) (:maintainer "Andrea Orru <andreaorru1991@gmail.com>, Andrew Kelley" . "superjoe30@gmail.com") (:keywords "zig" "languages") (:url . "https://github.com/zig-lang/zig-mode"))]) (zim-wiki-mode . [(20211117 2000) ((emacs (25 1)) (helm-ag (0 58)) (helm-projectile (0 14 0)) (dokuwiki-mode (0 1 1)) (link-hint (0 1)) (pretty-hydra (0 2 2))) "Zim Desktop Wiki edit mode" single ((:commit . "aa906931f22c34d77c65bed31121edfef714e4e2") (:authors ("Will Foran" . "willforan+zim-wiki-mode@gmail.com")) (:maintainer "Will Foran" . "willforan+zim-wiki-mode@gmail.com") (:keywords "outlines") (:url . "https://github.com/WillForan/zim-wiki-mode"))]) (zimports . [(20211011 2059) ((emacs (26 1)) (projectile (2 1 0))) "Reformat python imports with zimports" single ((:commit . "76cf76bdc871cb0454a6fc555aeb1aa94f1b6e57") (:url . "https://github.com/schmir/zimports.el"))]) - (zk . [(20220509 2156) ((emacs (24 4))) "Functions for working with Zettelkasten-style linked notes" single ((:commit . "9a3ed5e743c38725e7d9a7e4eaecfe624654c68d") (:authors ("Grant Rosson <https://github.com/localauthor>")) (:maintainer "Grant Rosson <https://github.com/localauthor>") (:url . "https://github.com/localauthor/zk"))]) - (zk-index . [(20220509 802) ((emacs (26 1)) (zk (0 3))) "Index and Desktop for zk" single ((:commit . "9a3ed5e743c38725e7d9a7e4eaecfe624654c68d") (:authors ("Grant Rosson <https://github.com/localauthor>")) (:maintainer "Grant Rosson <https://github.com/localauthor>") (:url . "https://github.com/localauthor/zk"))]) + (zk . [(20220516 1848) ((emacs (24 4))) "Functions for working with Zettelkasten-style linked notes" single ((:commit . "42576bd09163c6f6a87e2827702a76d3eccbcb1d") (:authors ("Grant Rosson <https://github.com/localauthor>")) (:maintainer "Grant Rosson <https://github.com/localauthor>") (:url . "https://github.com/localauthor/zk"))]) + (zk-index . [(20220516 2050) ((emacs (26 1)) (zk (0 3))) "Index and Desktop for zk" single ((:commit . "42576bd09163c6f6a87e2827702a76d3eccbcb1d") (:authors ("Grant Rosson <https://github.com/localauthor>")) (:maintainer "Grant Rosson <https://github.com/localauthor>") (:url . "https://github.com/localauthor/zk"))]) (zlc . [(20151011 157) nil "Provides zsh like completion system to Emacs" single ((:commit . "4dd2ba267ecdeac845a7cbb3147294ee7daa25f4") (:authors ("mooz" . "stillpedant@gmail.com")) (:maintainer "mooz" . "stillpedant@gmail.com") (:keywords "matching" "convenience"))]) - (zmq . [(20210613 343) ((cl-lib (0 5)) (emacs (26))) "ZMQ bindings in elisp" tar ((:commit . "38dc6c4119aee57666caf8f97c8a3d7f678823e0") (:authors ("Nathaniel Nicandro" . "nathanielnicandro@gmail.com")) (:maintainer "Nathaniel Nicandro" . "nathanielnicandro@gmail.com") (:keywords "comm") (:url . "https://github.com/nnicandro/emacs-zmq"))]) + (zmq . [(20220510 1820) ((cl-lib (0 5)) (emacs (26))) "ZMQ bindings in elisp" tar ((:commit . "af5299d80715b1083a18145e9c84ef9563020676") (:authors ("Nathaniel Nicandro" . "nathanielnicandro@gmail.com")) (:maintainer "Nathaniel Nicandro" . "nathanielnicandro@gmail.com") (:keywords "comm") (:url . "https://github.com/nnicandro/emacs-zmq"))]) (znc . [(20210803 159) ((cl-lib (0 2))) "ZNC + ERC" single ((:commit . "6f0949c393b7778a96033716787d152ada32f705") (:authors ("Yaroslav Shirokov")) (:maintainer "Yaroslav Shirokov") (:url . "https://github.com/sshirokov/ZNC.el"))]) (zombie . [(20141222 1616) nil "major mode for editing ZOMBIE programs" single ((:commit . "ff8cd1b4cdbb4b0b9b8fd1ec8f6fb93eba249345") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://hins11.yu-yake.com/"))]) (zombie-trellys-mode . [(20150304 1448) ((emacs (24)) (cl-lib (0 5)) (haskell-mode (1 5))) "A minor mode for interaction with Zombie Trellys" single ((:commit . "7f0c45fdda3a44c3b6d1762d116abb1421b8fba2") (:authors ("David Raymond Christiansen" . "david@davidchristiansen.dk")) (:maintainer "David Raymond Christiansen" . "david@davidchristiansen.dk") (:keywords "languages"))]) @@ -5173,7 +5175,7 @@ (zotero . [(20211008 2207) ((emacs (27 1)) (ht (2 2)) (oauth (1 0 4)) (s (1 12 0))) "Library for the Zotero API" tar ((:commit . "811bd1f14b38c3dde3f80cd8a13490c9900de888") (:authors ("Folkert van der Beek" . "folkertvanderbeek@gmail.com")) (:maintainer "Folkert van der Beek" . "folkertvanderbeek@gmail.com") (:keywords "zotero" "hypermedia") (:url . "https://gitlab.com/fvdbeek/emacs-zotero"))]) (zotxt . [(20210908 402) ((request (0 3 2)) (deferred (0 5 1))) "Tools to integrate emacs with Zotero via the zotxt plugin." tar ((:commit . "96a132d6b39f6bc19a58913b761d42efc198f8a4") (:authors ("Erik Hetzner" . "egh@e6h.org")) (:maintainer "Erik Hetzner" . "egh@e6h.org") (:keywords "bib"))]) (zoutline . [(20220102 835) nil "Simple outline library." single ((:commit . "32857c6c4b9b0bcbed14d825a10b91a98d5fed0a") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "outline") (:url . "https://github.com/abo-abo/zoutline"))]) - (zoxide . [(20220302 522) ((emacs (25 1))) "Find file by zoxide" single ((:commit . "2133eb000b5239b08a1c2532629a19a19f8e6309") (:authors ("Ruoyu Feng" . "emacs@vonfry.name")) (:maintainer "Ruoyu Feng" . "emacs@vonfry.name") (:keywords "converience" "matching") (:url . "https://gitlab.com/Vonfry/zoxide.el"))]) + (zoxide . [(20220302 522) ((emacs (25 1))) "Find file by zoxide" single ((:commit . "41c090402816b15eb226ff9368f0ca40c7244f92") (:authors ("Ruoyu Feng" . "emacs@vonfry.name")) (:maintainer "Ruoyu Feng" . "emacs@vonfry.name") (:keywords "converience" "matching") (:url . "https://gitlab.com/Vonfry/zoxide.el"))]) (zpl-mode . [(20180906 1059) ((emacs (24 3))) "ZIMPL major mode" single ((:commit . "35e7e23c6baf31b5e65dd7405c8ab9b13c70637e") (:url . "https://github.com/ax487/zpl-mode.git"))]) (zpresent . [(20200417 309) ((emacs (25 1)) (org-parser (0 4)) (dash (2 12 0)) (request (0 3 0))) "Simple presentation mode based on org files." single ((:commit . "406967322b7692492a5942d901335d626cace4d0") (:keywords "comm") (:url . "https://hg.sr.ht/~zck/zpresent"))]) (zprint-format . [(20210602 146) ((emacs (24)) (reformatter (0 3))) "Reformat Clojure code using zprint" single ((:commit . "6051a5709ea6182974d7239f26e04c9731e04447") (:authors ("Derek Passen" . "dpassen1@gmail.com")) (:maintainer "Derek Passen" . "dpassen1@gmail.com") (:keywords "clojure" "zprint" "tools" "languages") (:url . "http://www.github.com/dpassen/zprint-format"))]) diff --git a/elpa/archives/nongnu/archive-contents b/elpa/archives/nongnu/archive-contents index bf24829..b469822 100644 --- a/elpa/archives/nongnu/archive-contents +++ b/elpa/archives/nongnu/archive-contents @@ -387,10 +387,8 @@ (:authors ("Sylvain Benner" . "sylvain.benner@gmail.com")))]) (evil-matchit . - [(2 4 4) - ((evil - (1 14 0)) - (emacs + [(3 0 0) + ((emacs (25 1))) "Vim matchit ported to Evil" tar ((:url . "http://github.com/redguardtoo/evil-matchit") @@ -398,7 +396,7 @@ (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) - (:commit . "b314e816bacfc01bb7df9b19a06b18638af5cdbe"))]) + (:commit . "7a2a7384b6e752a805d6fbb78cf9425e54c2b18b"))]) (evil-nerd-commenter . [(3 5 7) ((emacs @@ -1587,7 +1585,7 @@ (:authors ("Le Wang")))]) (xah-fly-keys . - [(17 7 20220429090059) + [(17 9 20220516184525) ((emacs (24 1))) "ergonomic modal keybinding minor mode." tar @@ -1596,7 +1594,7 @@ (:maintainer "Xah Lee" . "xah@xahlee.org") (:authors ("Xah Lee ( http://xahlee.info/ )")) - (:commit . "e4db51a90d13eb886b88bbba6a71846653a76e47"))]) + (:commit . "9e4d32ad028649786557858366acf1cd9793d338"))]) (xml-rpc . [(1 6 15) nil "An elisp implementation of clientside XML-RPC" tar diff --git a/elpa/archives/nongnu/archive-contents.signed b/elpa/archives/nongnu/archive-contents.signed index 3d5fa7e..0c3c1f6 100644 --- a/elpa/archives/nongnu/archive-contents.signed +++ b/elpa/archives/nongnu/archive-contents.signed @@ -1 +1 @@ -Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-05-07T05:15:05-0400 using RSA
\ No newline at end of file +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-05-17T05:15:04-0400 using RSA
\ No newline at end of file diff --git a/elpa/auctex-13.1.3.signed b/elpa/auctex-13.1.3.signed new file mode 100644 index 0000000..5599928 --- /dev/null +++ b/elpa/auctex-13.1.3.signed @@ -0,0 +1 @@ +Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2022-04-16T05:05:01-0400 using RSA
\ No newline at end of file diff --git a/elpa/auctex-13.1.3/.elpaignore b/elpa/auctex-13.1.3/.elpaignore new file mode 100644 index 0000000..7ab3202 --- /dev/null +++ b/elpa/auctex-13.1.3/.elpaignore @@ -0,0 +1,14 @@ +*.m4 +*.in +*.ac +*.spec +autogen.sh +install-sh +lpath.el +mkinstalldirs +prv-install.el +README.GIT +tests +build-aux +admin +.dir-locals.el diff --git a/elpa/auctex-13.1.3/COPYING b/elpa/auctex-13.1.3/COPYING new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/elpa/auctex-13.1.3/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/elpa/auctex-13.1.3/ChangeLog-preview b/elpa/auctex-13.1.3/ChangeLog-preview new file mode 100644 index 0000000..753847c --- /dev/null +++ b/elpa/auctex-13.1.3/ChangeLog-preview @@ -0,0 +1,1909 @@ +2022-02-20 Mosè Giordano <mose@gnu.org> + + * Version 13.1 released. + +2020-10-18 Mosè Giordano <mose@gnu.org> + + * Version 12.3 released. + +2019-10-30 Mosè Giordano <mose@gnu.org> + + * Version 12.2 released. + +2017-12-10 Mosè Giordano <mose@gnu.org> + + * Version 12.1 released. + +2017-12-03 Mosè Giordano <mose@gnu.org> + + * Version 11.92 released. + +2017-07-24 Mosè Giordano <mose@gnu.org> + + * Version 11.91 released. + +2017-01-10 Mosè Giordano <mose@gnu.org> + + * Version 11.90 released. + +2015-11-13 Mosè Giordano <mose@gnu.org> + + * Version 11.89 released. + +2014-11-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * preview.el.in: Cleanup compiler warnings. Mark unused arguments. + (error): Don't declare; we don't use it anyway. + (view-exit-action): Declare. + (desktop-buffer-preview): Use normal names for the function's args. + (preview-parse-messages): Remove unused vars `error', `context-start', + and `context' (this last one wasn't even bound). + +2014-11-04 Stefan Monnier <monnier@iro.umontreal.ca> + + * prv-install.el: Adjust copyright years. + (preview-make-package-xemacs): Use insert-file-contents instead of + insert-file. + + * preview.el.in (error): Declare not only at compile-time. + (preview-expandable-string): Use explicit let instead of calling + lambda with another lambda. + (preview-mouse-open-eps): Use default-value of major-mode instead + of default-major-mode. + (preview-copy-text): Use with-current-buffer instead of + save-excursion with set-buffer. + (preview-parse-messages): Don't let-bind context. Use mapc + + funcall instead of run-hooks. Use goto-char + forward-line + instead of goto-line. + +2014-10-29 Mosè Giordano <mose@gnu.org> + + * Version 11.88 released. + +2014-10-29 Mosè Giordano <mose@gnu.org> + + * latex/preview.dtx: Manually change the release version. + + * preview.el.in: Rename from "preview/preview.el". + (preview-version): Use @PREVIEWVERSION@ autoconf variable. + (preview-release-date): Use @PREVIEWDATE@ autoconf variable. + (preview-report-bug): Adapt to new `preview-version' format. + +2014-06-24 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-gs-command): Don't run the mgs command if + mgs is not installed. + +2013-09-05 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-lispdir): New defvar. + + * auto.el.in (preview-lispdir): Set it to @lisppackagelispdir@. + +2013-07-03 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-gs-command): Change test for `mgs' + functionality to "gs -q -dNODISPLAY -c quit". + +2013-07-02 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-gs-command): Better test if `mgs' is + working. + +2013-07-01 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-gs-command): Test `mgs' for functionality + before using it. + +2013-06-29 Tassilo Horn <tsdh@gnu.org> + + * preview.el (preview-gs-command): Prefer the TeX distro + ghostscript wrapper scripts `rungs' and `mgs' over calling `gs' + directly which requires it to be in PATH. + +2013-06-26 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (use-hint): Don't warn about problems with overly + obsolete packages. + +2013-04-08 Tassilo Horn <tsdh@gnu.org> + + * latex/preview.dtx: Fix date format which got converted from + YYYY/MM/DD to YYYY-MM-DD during conversion to git. + +2012-12-04 Tassilo Horn <tsdh@gnu.org> + + Merge revno 314 (Stefan Monnier) from emacs elpa branch: Shorten + copyright year ranges. + + * preview.el: + +2011-01-23 Ralf Angeli <angeli@caeruleus.net> + + * preview.el (preview-auto-reveal): Add `forward-char' and + `backward-char' to commands on which to open an overlay. + +2010-10-14 Ralf Angeli <angeli@caeruleus.net> + + * preview.el (preview-gs-options): Start gs with -dDELAYSAFER + instead of -dSAFER. + (preview-prepare-fast-conversion): Add relevant files to + PermitFileReading list of paths. + +2010-02-14 Ralf Angeli <angeli@caeruleus.net> + + * latex/preview.dtx: Add support for XeTeX. + +2009-06-18 Ralf Angeli <angeli@caeruleus.net> + + * preview.el (preview-start-pdf2dsc): Determine the PDF source + depending on the previews being generated from the master or the + region file. + +2008-05-10 Reiner Steib <reiner.steib@gmx.de> + + * preview.el (preview-auto-cache-preamble): Fix markup in in doc + string. + +2008-02-03 Ralf Angeli <angeli@caeruleus.net> + + * Relicense all "GPLv2 or later" files to "GPLv3 or later". + + * COPYING: Switch to GPLv3. + + * preview/Makefile.in, preview/configure.ac, + preview/preview-latex.spec, preview/latex/Makefile.in: Add + copyright and license notices. + +2007-04-29 Ralf Angeli <angeli@caeruleus.net> + + * preview.el (preview-parse-messages): Match any closing + parenthesis. + +2007-03-25 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (preview-dump-threshold): + + * prv-emacs.el (preview-dump-threshold): Make the dump threshold + closely match what mylatex.ltx expects. + + * latex/preview.dtx: Have the counter output appear before the + snippet start/end messages in order to have the counter + maintenance work out correctly regardless of the order of `auctex' + and `counters' options to preview.el. + +2007-02-09 Masayuki Ataka <masayuki.ataka@gmail.com> + + * preview.el (preview-report-bug): Use `AUCTeX-version' instead of + `AUC-TeX-version'. Reported by Ikumi Keita <ikumi@ikumi.que.jp>. + +2007-01-12 Ralf Angeli <angeli@caeruleus.net> + + * configure.ac: Bump version number. + +2006-12-01 David Kastrup <dak@gnu.org> + + * prv-emacs.el (preview-move-point): Do not error out if + `distance' is nil. + + * prv-xemacs.el (preview-supports-image-type): Move so that the + following comment makes sense. + +2006-12-01 Ralf Angeli <angeli@caeruleus.net> + + * prv-xemacs.el (preview-move-point): Do not error out if + `distance' is nil. + +2006-10-24 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (preview-move-point): rearrange for calling + `preview-auto-reveal' with DISTANCE argument. + + * prv-emacs.el (preview-remove-urgentization): Small optimization. + (preview-move-point): Rearrange to be more efficient in the + absence of overlays. + + * preview.el (preview-auto-reveal): Fetch keybindings of [left] + and [right] at runtime. Change proposed default accordingly. + (preview-at-point): Fix change from 2005-03-15 for cursor + restoration. + (preview-auto-reveal-p): Implement integer MODE and take DISTANCE + argument. + (preview-auto-reveal): Allow DISTANCE. + +2006-10-19 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (preview-defmacro): Use `fboundp' instead of + `functionp'. + (add-to-list): compatibility function not needed anymore since + 2006-10-11 change. + +2006-10-18 David Kastrup <dak@gnu.org> + + * preview.el (eval-when-compile): restore function definitions of + compatibility macros. + + * prv-xemacs.el (preview-defmacro): Also redefine functions that + actually exist, but save their definition. + + * preview.el (preview-parse-messages): Fix bad regexp. + +2006-10-16 David Kastrup <dak@gnu.org> + + * preview.el (preview-parse-messages): Rearrange the regexp for + matching and renumber the matches and match strings accordingly. + +2006-10-11 David Kastrup <dak@gnu.org> + + * preview.el (LaTeX-preview-setup): Move setup of + `TeX-error-description-list' and `TeX-expand-list' to AUCTeX + proper. + +2006-10-10 David Kastrup <dak@gnu.org> + + * preview.el (preview-gs-filter): Fix prompt match expression to + allow stack garbage > 10. + (preview-gs-open): Assume `.runandhide' is defined (Ghostscript + 6.53 and greater). Don't check Ghostscript stack for correctness, + just leave garbage. + (preview-prepare-fast-conversion): Use `.runandhide' to ignore + garbage left by preamble (such as Omega fonts). + (preview-LaTeX-command): Use "%'" and "%t" expansion strings in + order to allow filenames with spaces in them. + (preview-goto-info-page): Use `info' instead of `Info-goto-node'. + (preview-parse-messages): Spike up terminal log file name tracing + in order to have a reasonable chance of detecting spaces in file + names. + (preview-parse-messages): Massage match string for partial strings + to deal better with TeX-quoted control sequences. + (preview-dump-file-name): The format name should not contain + spaces. Replace them with underlines. + (preview-dump-replacements, preview-undump-replacements): Use a + different replacement in order to work with the new + `preview-LaTeX-command'. + (preview-cache-preamble): shell-quote `preview-format-name'. Keep + `mylatex.ltx' from ignoring spaces in file names. + (TeX-inline-preview-internal): shell-quote `preview-format-name'. + +2006-09-29 David Kastrup <dak@gnu.org> + + * preview.el (preview-gs-command): Make default depend on + `system-type', using "GSWIN32C.EXE" on `windows-nt'. + + * configure.ac: If no GhostScript or the standard setting for the + operating system is found, don't override the default. + +2006-09-21 David Kastrup <dak@gnu.org> + + * preview.el (preview-TeX-style-cooked): Fix bugs. + (preview-set-texinputs): Use `preview-TeX-style-cooked'. + (preview-TeX-style-dir): Change doc string to reflect new behavior + of `preview-set-texinputs'. + (preview-install-styles): Try to deal with `preview-TeX-style-dir' + properly. Bomb out if no styles found to install. + (preview-report-bug): Add `preview-TeX-style-dir' to reported + variables. + + * configure.ac: Remove `--with-kpathseasep' option. + +2006-09-01 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (preview-import-image): Allow strings as image + properties. + + * prv-emacs.el (preview-remove-urgentization) + (preview-import-image): Allow strings as image properties. + + * preview.el (preview-clearout, preview-kill-buffer-cleanup) + (preview-place-preview): Use `timestamp' field universally for + dealing with when to overwrite and when to retain images, don't + rely on filename internals. + (desktop-buffer-preview-misc-data): Use `preview-image' to judge + the availability of savable data. + (preview-reinstate-preview): Allow saving images without + associated filenames. + (preview-format-mml): Deal with string type images. + +2006-08-25 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Use eTeX's `\protected' on redefinitions when + available. + +2006-08-15 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Change from 2006-07-12 could lose the + `AtBeginDvi' material. Fix that. Disable preview within output + routine. + And actually hijack `\output' instead of doing it half way. + +2006-07-28 Reiner Steib <Reiner.Steib@gmx.de> + + * latex/Makefile.in (install-texmf): Only update the relevant ls-R + file. + +2006-07-25 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Allow two optional parameters as in + memoir.cls for sections. Also preview chapter headings. + +2006-07-23 Ralf Angeli <angeli@caeruleus.net> + + * configure.ac: Fix spelling of MiKTeX. + +2006-07-12 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Add a font-lock helping comment, remove + preview's hook into the output routine, deactivate `\shipout' in a + cleaner manner. + +2006-07-11 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Fix XymTeX catcodes again. + +2006-07-10 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in, latex/Makefile.in (datarootdir): New variable used + by autoconf 2.59e. + +2006-06-12 Ralf Angeli <angeli@caeruleus.net> + + * latex/README: Streamline. Add sections. Clean up. + +2006-06-08 David Kastrup <dak@gnu.org> + + * latex/README: Adapt to new realities. + +2006-05-25 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Add another fix for XyMTeX (which got the + catcode for @ wrong). + +2006-05-25 Ralf Angeli <angeli@caeruleus.net> + + * configure.ac: Bump version number. + + Update address of FSF in GPL notices. + +2006-04-20 David Kastrup <dak@gnu.org> + + * preview.el (preview-parse-messages): Adapt parser to + `-file-line-error-style' messages. Try to make the detection of + the current file more robust. Utilize file-line-error messages + for that purpose if they are present. + +2006-03-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (.PHONY, install): Remove `install-metadata'. + (install-metadata): Remove. + +2006-03-22 David Kastrup <dak@gnu.org> + + * prv-install.el (preview-make-package-xemacs): Accept list of + files to be appended. + +2006-03-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Use `AC_PROG_MAKE_SET' instead of deprecated + `AC_SET_MAKE'. + +2006-02-21 Ikumi Keita <ikumi@revery.net> + + * preview.el (preview-error-quote, TeX-inline-preview-internal): + Fix the problem that preview-latex put the preview-image in wrong + place if user compiles iso-2022-jp file on Windows or UNIX, by + using TeX-japanese-process-output-coding-system for + preview-coding-system instead of buffer-file-coding-system if + tex-jp.el is loaded. + +2006-01-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (install-metadata): Let `for' loop return an exit + status of 0. + +2006-01-20 Reiner Steib <Reiner.Steib@gmx.de> + + * preview.el (preview-TeX-style-cooked): Fix cond expression. + +2006-01-17 David Kastrup <dak@gnu.org> + + * preview.el (preview-TeX-style-cooked): New function, to be used + later. Just checked in so that nobody else feels compelled + writing it. + +2006-01-14 David Kastrup <dak@gnu.org> + + * configure.ac: Remove infodir and INSTALL_INFO checks. Don't + check for TEXHASH if it is already set. + +2006-01-13 David Kastrup <dak@gnu.org> + + * preview.el (preview-parse-messages): Some ugly fix for + `<xxx (PNG copy)>' style error messages. + +2005-12-31 David Kastrup <dak@gnu.org> + + * Makefile.in (ELCC, AUCTEX): Put "." in front of load-path to + avoid picking up outdated `prv-*.el*' files from the installation + directory. + +2005-12-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Bump version number. + +2005-10-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Import `TEX' in unquoted form. + +2005-10-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Change wrongly used `previewdatadir' to + `previewlispdir'. + Change version number in `AC_INIT'. + +2005-10-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * prv-xemacs.el (preview-check-changes): Delete detached extents. + +2005-09-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Document option for specifying AUCTeX startfile as + --with-previewstartfile, not --with-preview-startfile which does + not work. + Use matching package names for determining the kpathsea path + separator both internally and in the option name which now is + --with-kpathseasep. + Fix the quadrigraph for the closing bracket in the + kpathsesep-related error message. + +2005-09-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex/preview.dtx: Add space for nicer formatting in version + output. Adapt checksum. + +2005-09-25 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Try fixing the release parsing/grouping. + +2005-09-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex/README (CTAN): Bump version number. + + * latex/preview.dtx: Fix case in release tag parsing. + +2005-09-24 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Try parsing version correctly by treating + underlines in the release tag properly. + +2005-09-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * preview.el (preview-version): Extract version number from + release tag. + +2005-08-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Import unquoted variables from top-level configure + script. + +2005-07-15 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Don't talk nonsense about the footnote macro, + and don't define it nonsensical for AUCTeX. + Reproduce `\@startsection' command to keep numbering correct in + default configuration for AUCTeX. + +2005-07-14 David Kastrup <dak@gnu.org> + + * configure.ac: protect against packagedir starting with `-' + +2005-07-11 David Kastrup <dak@gnu.org> + + * preview.el (preview-at-point): Join adjacent touched previews + for regeneration. + + * prv-emacs.el (preview-mode-setup): + + * prv-xemacs.el (preview-mode-setup): Use correct string for + resetting watch on preamble. + +2005-07-05 David Kastrup <dak@gnu.org> + + * preview.el (preview-string-expand): Allow substrings to be + controlled by booleans. + (preview-expandable-string): Adapt type to that. + (preview-required-option-list): Make dependent on + `preview-preserve-counters'. + (preview-preserve-counters): New boolean. + +2005-06-30 jalar <jalar@mai.liu.se> + + * latex/preview.dtx: <tightpage>: added comments + +2005-06-28 Jan-Ake Larsson <jalar@mai.liu.se> + + * latex/preview.dtx: Add version number in a \special, in dvips + mode. Fix mismatched parantheses. + +2005-06-27 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Put version into `\pr@version'. + +2005-06-27 Jan-Ake Larsson <jalar@mai.liu.se> + + * latex/preview.dtx: Add backwards-compatibility for dvipng <= 1.5 + + * latex/preview.dtx: Add preview@tightpage + +2005-06-24 David Kastrup <dak@gnu.org> + + * prv-install.el (preview-make-package-xemacs): Add author-version. + + * preview.el (preview-TeX-style-dir): Change docs. + + * latex/Makefile.in (preview.dvi): Depend on preview.sty + (preview.pdf): Same here. + + * configure.ac: Remove checks for PERL and info-related stuff. + Add . into search path first. + + * Makefile.in (texmf): Depend on latex/Makefile + (latex/Makefile, auto.el, configure, Makefile, config.status): + targets to make sure that Makefile and stuff are up to date. + (install-metadata): pass author version into prv-install.el + +2005-06-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Make message at end of configuration clearer. + Remove redundant build hint. + + * .cvsignore: Remove irrelevant entries. + +2005-06-21 David Kastrup <dak@gnu.org> + + * configure.ac: correct comparison. + +2005-06-20 David Kastrup <dak@gnu.org> + + * RELEASE: Remove (folded into ../RELEASE). + +2005-06-18 David Kastrup <dak@gnu.org> + + * preview.el (preview-gs-dvips-process-setup) + (preview-dvipng-process-setup): Improve error message. + (preview-parse-messages): Don't throw error on nil parsestate if + we are in error unwinding mode already. + +2005-06-14 David Kastrup <dak@gnu.org> + + * README.CVS: Remove. Top file should be sufficient. + + * autogen.sh: Remove. We have its functionality in the top + directory. + +2005-06-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (docs, install-docs): Remove. + (all): Do not depend on `docs' anymore. + (.PHONY): Do not depend on `docs' and `install-docs' anymore. + (clean, maintainer-clean): Do not descend into doc directory + anymore. + + * autogen.sh: Do not generate documentation anymore. + + * configure.ac: Remove doc/Makefile from AC_OUTPUT. + + * doc/todo.texi: Move to AUCTeX's main doc/ directory as + preview-todo.texi. + + * doc/readme.texi: Move to AUCTeX's main doc/ directory as + preview-readme.texi. + + * doc/problems.texi: Move to AUCTeX's main doc/ directory as + preview-problems.texi. + + * doc/preview-dtxdoc.pl, doc/preview-latex.texi: Move to AUCTeX's + main doc/ directory. + + * doc/faq.texi: Move to AUCTeX's main doc/ directory as + preview-faq.texi. + + * doc/copying.texi: Move to AUCTeX's main doc/ directory. + + * doc/Makefile.in: Remove. + + * doc/.cvsignore: Remove. + +2005-06-06 David Kastrup <dak@gnu.org> + + * configure.ac: Remove call to MAKEINFO_CHECK_MACROS: we expect a + recent enough makeinfo version for bootstrapping, anyway. + + * doc/Makefile.in (MAKEINFO_MACROS): remove + (TEXINFOINCLUDES): Remove unused TEXIPWD hack. Troublesome. + +2005-06-04 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (TEXIFILES): Oops, depends on ../../doc/macros.texi + + * latex/Makefile.in (MKINSTALLDIRS): + + * doc/Makefile.in (MKINSTALLDIRS): + + * Makefile.in (MKINSTALLDIRS): Use mkinstalldirs from AUCTeX. + + * mkinstalldirs: remove in favor of ../mkinstalldirs + + * doc/Makefile.in (TEXI2HTML): Use TEXI* tools and TEXINFOINCLUDES. + (../README): et al. Depend on ../../doc/macros.texi + + * configure.ac: Check and test for TEXI* as well. Quotify if + necessary. + + * autogen.sh: Look in .. for macros. + + * doc/Makefile.in (preview-latex.dvi): Use texi2dvi. + (preview-latex.pdf): Use texi2pdf. + (preview-latex.ps): Use -Ppdf option. + (preview-latex.info, ../README, ../FAQ, ../PROBLEMS, ../TODO): + deal with ../../doc/macros.texi + +2005-05-25 David Kastrup <dak@gnu.org> + + * circ.tex (section{Die gerade Linie}): Make the intentional + errors more conspicuous. + +2005-05-24 David Kastrup <dak@gnu.org> + + * aclocal.m4: Use elif for prettiness. + + * prv-xemacs.el (preview-mode-setup): Change watch condition. + (preview-watch-preamble): Accept command. + (preview-unwatch-preamble): Change unwatch method. + (preview-preamble-check-change): Change check. + + * prv-emacs.el (preview-preamble-changed-function): First unwatch + preamble, then kill format. + (preview-watch-preamble): Accept command to watch for. + (preview-unwatch-preamble): Adapt to new `format-cons' format. + (preview-mode-setup): Change watch condition. + + * preview.el (preview-dumped-alist): Change definition. + (preview-parse-messages): Use `string-to-number' instead of + obsoleted `string-to-int'. + (preview-cache-preamble): Add format-cons arg. Only cache + preamble if there is no cache with the same command yet. + Precalculate command and check whether it matches previous one. + If so, omit dumping. + (preview-region, preview-document): Expand command here. + (preview-generate-preview): Accept expanded command. Always + tentatively dump command (unless disabled) and set sentinel only + if this succeeded. + (TeX-inline-preview-internal): Set command buffer at start. Use + `commandbuff' argument rather than `TeX-command-buffer'. + Raise error at different point. + +2005-05-22 David Kastrup <dak@gnu.org> + + * aclocal.m4: Allow --with-emacs=sth and --without-xemacs and + similar combinations as long as they are more or less consistent. + +2005-05-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * prv-install.el (preview-make-package-xemacs): Cater for XEmacs + 21.5 which uses a different interface for generating autoloads at + present. + +2005-05-21 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Editing changes. Last checkin before + removal. + + * doc/install.texi: Editing changes. Last checkin before removal. + + * doc/faq.texi (Customization): Don't use @var inappropriately. + + * autogen.sh: Remove generation of auto.texi. + + * doc/preview-latex.texi (Installation): Refer to AUCTeX manual. + (Keys and lisp): Some formatting changes. + + * doc/Makefile.in (TEXIFILES): Remove wininstall.texi and + install.texi. + (DISTTEXTS): Remove ../INSTALL and ../INSTALL.windows + (../INSTALL, ../INSTALL.windows): Remove. + + * doc/problems.texi (Known problems): Remove old AUCTeX advice. + Remove explicit node names. + (Emacs problems): Rewrite. Mention precompiled CVS Emacsen. + Refer to AUCTeX manual. + (AUCTeX prior to 11.0): Remove. + (Too small bounding boxes): Reword. + (x-symbol interoperation): Explain 8-bit cleanliness somewhat more. + +2005-05-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * preview.el (preview-specs-type): Use an extra :value keyword to + avoid a bug in `widget-convert' of XEmacs 21.4 and Emacs 21. + +2005-05-18 David Kastrup <dak@gnu.org> + + * doc/preview-dtxdoc.pl: Don't use \n in character ranges since it + is not actually a character in Windows. + +2005-05-17 David Kastrup <dak@gnu.org> + + * Makefile.in (lisp): Rewrite condition to make `make -n' work, + also non-Posix shells. + (install-metadata): Rewrite stuff for non-Posix shells. + (preview-latex.el): Same here. + (install-metadata): ignore return state of mkinstalldirs. + +2005-05-02 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: + + * doc/install.texi: Overhaul, use auto.texi. + + * doc/Makefile.in (../INSTALL, ../INSTALL.windows): add auto.texi + dependence. + (maintainer-clean): remove auto.texi. + + * autogen.sh: Generate auto.texi + + * README.CVS: Some modifications. + + * aclocal.m4 (EMACS_PATH_LISPDIR): better help. + +2005-05-01 David Kastrup <dak@gnu.org> + + * doc/install.texi (Configure): Synch with auctex. + +2005-04-30 David Kastrup <dak@gnu.org> + + * configure.ac: Use existing variables packagedatadir, + packagelispdir. + If configuring a package and infodir is defaulted, disable + install-info. + Disable TEXHASH when installing --without-texmfdir. Move TEXHASH + test. + + * aclocal.m4: Use existing lispdir variable. + + * prv-install.el (preview): don't require + (preview-make-package-xemacs): several changes to command line + options. + + * Makefile.in (lisp): rename from elisp for harmony with AUCTeX. + (install-images): rename from install-icons. + (install-metadata): new options for prv-install.el + +2005-04-29 David Kastrup <dak@gnu.org> + + * aclocal.m4: echo date correctly. + +2005-04-28 David Kastrup <dak@gnu.org> + + * aclocal.m4 (AUCTEX_AUTO_DIR): simplify. + (AC_LISPIFY_DIR): add third argument. Simplify a few common + expressions. + +2005-04-27 David Kastrup <dak@gnu.org> + + * aclocal.m4: sed paranoia. + +2005-04-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): Escape `+'. Add + regexp group. Close function. + +2005-04-27 David Kastrup <dak@gnu.org> + + * preview.el (TeX-inline-preview-internal): Don't try interpreting + coding-system if it is nil. + + * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): actually look into + the ChangeLog file. Uh. + + * latex/README (Note): Add bug reporting address. + +2005-04-19 David Kastrup <dak@gnu.org> + + * preview.el (preview-install-styles): Add autoload cookie. + +2005-04-18 David Kastrup <dak@gnu.org> + + * preview.el (preview-dump-state): New function to get run buffer + info. + (preview-report-bug): Use it. + + * Makefile.in (install-metadata): include directories in `MANIFEST'. + +2005-04-16 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Work around another ntheorem bug affecting + showlabels. + +2005-04-12 David Kastrup <dak@gnu.org> + + * configure.ac: Don't bother about pre-2.5 autoconf versions. + + * doc/faq.texi (Customization): Remove lamentation that PDF + foreground is fixed to black. + + * preview.el (preview-pdf-color-string): New function. + (preview-pdf2dsc-sentinel): Use it. + + * configure.ac: renamed from configure.in + +2005-04-11 jalar <jalar@mai.liu.se> + + * configure.in: Minimal changes to printouts + +2005-04-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * preview.el (preview-set-texinputs): Fix grouping. + +2005-04-11 David Kastrup <dak@gnu.org> + + * prv-install.el (preview-make-package-xemacs): Don't generate + manifest and take package name from command line. + + * configure.in: Don't expose `lispdir'. Explain `TEXHASH', + `PERL', `MAKEINFO', `INSTALL_INFO'. + + * latex/Makefile.in (texmfdir): Don't import. + + * Makefile.in (lispdir): Don't import. + + * preview.el (preview-counter-find): Fix bug with `(marker)'. + + * latex/Makefile.in (exec_prefix, libdir): Export. + + * doc/install.texi (Configure): Explain `--without-texmf-dir'. + (Advice for package providers): Don't trash talk AUCTeX + preactivation. + (Advice for package providers): Mention `--without-texmf-dir'. + + * doc/Makefile.in (exec_prefix, libdir): export. + + * preview.el (preview-datadir): Use instead of `preview-icondir'. + (preview-filter-specs): Use it. + (preview-TeX-style-dir): New variable for uninstalled styles + (preview-set-texinputs): Add or remove it from TEXINPUTS + environment. + (preview-TeX-style-dir): proper customization. + (preview-install-styles): New function to install styles + permanently. + + * configure.in: use `packagedatadir' instead of `icondir'. Add + check for `kpathseaseparator'. Shell-quote and export + `exec_prefix' and `libdir'. + + * auto.el.in (preview-datadir): replace preview-icondir, and add + `lisppackagetexstyles' invocation. + + * aclocal.m4 (TEX_PATH_TEXMFDIR): Allow --without-texmf-dir, stop + quoting a bunch of stuff, fix reference to load-file-name. + + * Makefile.in (exec_prefix, libdir, packagedatadir): export since + the XEmacs tree might call them. + (.PHONY, install): add install-nosearch target. + (install-nosearch): Install .nosearch file. + (install-icons): Use `$(packagedatadir)/images' instead of + `$(icondir)' + +2005-04-10 David Kastrup <dak@gnu.org> + + * configure.in: Use new backquote syntax. + + * doc/install.texi (Configure): Clarify. + +2005-04-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex/preview.dtx: Dvipng --> dvipng. + + * RELEASE, circ.tex, configure.in, preview.el, doc/faq.texi, + doc/install.texi, doc/preview-latex.texi, doc/problems.texi, + doc/readme.texi, doc/wininstall.texi, latex/README, + latex/preview.dtx: GhostScript --> Ghostscript. + +2005-04-08 David Kastrup <dak@gnu.org> + + * Makefile.in (previewstartfile): import. + (install-startup): split lines with `$(MAKE)' and + `$(INSTALL_DATA)' so that `make -n' will properly recurse. + + * aclocal.m4 (AC_LISPIFY_DIR): resolve relative paths below + ${lispdir} hierarchy. AC_SUBST both lisp variant of directory as + well as original. + + * configure.in: Add `--with-preview-startfile', use new semantics + of `AC_LISPIFY_DIR', drop `AC_MAKE_FILENAME_ABSOLUTE' stuff. + + * doc/install.texi (Configure): explain new semantics of + `--with-lispdir' and new `--with-preview-startfile'. + + * doc/wininstall.texi: Document changes semantics for + `--with-lispdir' and new `with-preview-startfile'. + +2005-04-07 David Kastrup <dak@gnu.org> + + * aclocal.m4 (EMACS_LISP): properly echo result to log file. + (EMACS_EXAMINE_INSTALLATION_DIR): check that the result of + file-relative-name is not absolute, which can happen for unrelated + drives on Windows. + (AC_FULL_EXPAND): also check, set and restore exec_prefix if not + set. + +2005-04-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.in: Cosmetics for ./configure --help. + + * preview.el (desktop-buffer-preview): Return buffer even if no + information about previews is found. + +2005-04-04 David Kastrup <dak@gnu.org> + + * preview-latex.spec (URL, Source0): Fix addresses to point to + AUCTeX. Oops. + +2005-04-03 David Kastrup <dak@gnu.org> + + * Release 0.9.1 + + * latex/preview.dtx: Don't let negative dimensions into tightpage + comment. + + * doc/macros.texi: Make @previewlatex swallow argument in links. + Don't scrap sf declaration. Make it correct in links. + + * doc/readme.texi (What use is it?): + + * doc/problems.texi: + + * doc/install.texi (Top): Work around raisesection bug. + + * doc/Makefile.in (../INSTALL, ../INSTALL.windows, ../README) + (../FAQ, ../TODO): Remove --no-validate option. + (../PROBLEMS): remove --no-validate option, and number sections. + + * doc/faq.texi: Make validatable top entry. Don't raise sections + until after the first chapter. This is insane, but otherwise + everything will be unnumbered. + + * configure.in: Expand `packagelispdir' and `lispdir' before + checking for conflicts. + +2005-04-02 David Kastrup <dak@gnu.org> + + * autogen.sh: Remove autom4te.cache + + * doc/Makefile.in (.PHONY): Add a few targets. + + * doc/readme.texi (Basic modes of operation): Correct dvipng + information. + + * autogen.sh: make preview-latex.info generation work by passing + in PERL default. + + * README.CVS: Mention that `perl' is needed for autogen.sh, and + that `makeinfo' might need to be up to date. + + * latex/README: Renamed from latex/README-preview. Overhaul + availability. + + * doc/macros.texi: Synchronize to AUCTeX. + + * Makefile.in (tarball-ready): Remove this target for now: it + can't be used consistently really. It is probably better to do + just run autogen.sh on a freshly exported archive. + + * doc/Makefile.in (DISTTEXTS): Targets in parent dir. + (../INSTALL, ../INSTALL.windows, ../README, ../FAQ, ../PROBLEMS) + (../TODO): New targets instead of targets in current dir. + (clean): Don't remove targets in this dir. + (maintainer-clean): Remove DISTTEXTS targets. + + * autogen.sh: Use make for generating distribution texts and also + pregenerate the info file. + + * Makefile.in (emacsprefix): Remove. + (.PHONY): Collect phony targets here. + (DISTTEXTS): Move to doc/Makefile.in + (tarball-ready): Adapt + + * preview-latex.spec: Change version number. Change directory + choice to "xemacs-packages" on fedora. + + * doc/wininstall.texi: Mention that Perl is not needed if working + with the default tarball. + + * doc/preview-latex.texi: Bump versions numbers, fix copyrights. + + * doc/readme.texi (Activating preview-latex): Don't talk about + half a dozen non-sensical things. + (Availability): Change information to match move into AUCTeX. + + * configure.in: Add check for load-path shadowing. + + * aclocal.m4 (TEX_PATH_TEXMFDIR): We want "${texprefix}/share" in + most cases. + +2005-04-01 David Kastrup <dak@gnu.org> + + * doc/faq.texi: Some changes. This thing really is an outdated + unmaintained abomination. We need to do something about it at one + time. + +2005-04-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (EMACS_EXAMINE_INSTALLATION_DIR): Repair quoting. + +2005-04-01 David Kastrup <dak@gnu.org> + + * RELEASE: rearrange. Mention AUCTeX 11.80 as target. + + * aclocal.m4(EMACS_EXAMINE_INSTALLATION_DIR): avoid trailing + `/.'. + (TEX_PATH_TEXMFDIR): search order changed. + + * latex/Makefile.in (prefix, datadir, texmfdir, previewtexmfdir) + (previewdocdir): Use (null) to mask Windows backslashes. + + * configure.in: Adjust version info. + + * aclocal.m4 (EMACS_PATH_PREFIX): just generate a single output. + (EMACS_PROG_EMACS): Check for `emacsprefix'. + (EMACS_EXAMINE_INSTALLATION_DIR): accept list of prefix variables + as second argument. Decompose and compare directory names + starting from the back. + (EMACS_PATH_PACKAGEDIR): search in several prefixes. + (EMACS_PATH_LISPDIR): same. + (TEX_PATH_TEXMFDIR): set `texprefix' from kpsepath. + Use new `EMACS_EXAMINE_INSTALLATION_DIR' for getting TeX + directories. + +2005-03-31 David Kastrup <dak@gnu.org> + + * configure.in: Don't set prefix if it is not set. + + * aclocal.m4 (EMACS_PATH_PREFIX): new function. + (AC_FULL_EXPAND): set `prefix' from `ac_default_prefix' before + expansion if it is unset. + +2005-03-31 jalar <jalar@mai.liu.se> + + * Makefile.in: + * aclocal.m4: Add $emacsprefix + +2005-03-31 David Kastrup <dak@gnu.org> + + * RELEASE: Update release info. + +2005-03-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (use-hint): Fix spelling. + + * preview.el (preview-report-bug): Use "preview-" prefix in + version information. + +2005-03-29 David Kastrup <dak@gnu.org> + + * configure.in (auctexdir): Use `AC_ARG_VAR' on `GS' and `TEXHASH' + (should probably also be used on a few other environment + variables). + Use `AC_SHELL_QUOTIFY' on `GS'. + +2005-03-28 David Kastrup <dak@gnu.org> + + * preview.el (preview): Change home page address to AUCTeX. + (preview-report-bug): Change bug reporting address. + + * doc/readme.texi (Contacts): Change mailing list info. + + * doc/problems.texi: Change mailing list info. + + * doc/faq.texi (Introduction to FAQ): Change mailing list address. + + * preview.el (if): Use (featurep 'xemacs) instead of + `(string-match "XEmacs" (emacs-version))'. + (preview-at-point): Don't check for XEmacs, just use + `TeX-active-mark' instead. + +2005-03-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (distclean, maintainer-clean, tarball-ready): Delete + autom4te.cache in maintainer-clean and tarball-ready targets. + +2005-03-24 Jan-Ake Larsson <jalar@mai.liu.se> + + * doc/Makefile.in: Add *.pdf to clean target and + preview-dtxdoc.texi to maintainer-clean + +2005-03-23 jalar <jalar@mai.liu.se> + + * doc/Makefile.in: + * Makefile.in: add maintainer-clean target + + * Makefile.in: add tarball-ready target + + * configure.in: Add check for perl + + * doc/Makefile.in: Use the configure-provided $PERL + +2005-03-22 David Kastrup <dak@gnu.org> + + * preview.el (preview-counter-find): Coerce `begin' to integer to + work around an Emacs 21.x bug. + + * Makefile.in (install): Install startup file before docs. + + * doc/Makefile.in (preview-latex/index.html): Don't ignore exit + status of makeinfo (this target is on-demand only, anyway). + + * doc/preview-dtxdoc.pl: Accept two arguments so that output file + will not get clobbered if Perl is not operative. + +2005-03-19 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (preview-buffer-recoding-alist): Madness variable. + (preview-buffer-recode-system): Use it. + (tex-site, tex, latex): Require them. + + * prv-emacs.el (tex-site, tex, latex): require them to silence + byte compiler. + (preview-buffer-recode-system): Compatibility function. Probably + not necessary for Emacs. + + * preview.el (TeX-overlay-prioritize): don't redefine, test for + its presence at runtime. Less invasive, less offensive to the + byte compiler. + (preview-coding-system): New buffer-local variable to indicate the + coding system used for processes. + (preview-place-preview, preview-reinstate-preview): Use + `TeX-overlay-prioritize' only if it exists. + (mailcap-extension-to-mime): Use an autoload form instead of + `require' at runtime. + (preview-format-mml): Use `mailcap-extension-to-mime' directly + (preview-error-quote): take coding system of LaTeX process as + second argument. + (preview-parse-messages): initialize `run-coding-system' from + `preview-coding-system'. Use it for calling + `preview-error-quote'. + (TeX-inline-preview-internal): Initialize `preview-coding-system' + and make process use it. + +2005-03-18 David Kastrup <dak@gnu.org> + + * preview.el (TeX-region-create): Try shutting up the byte + compiler at load time. + + * doc/install.texi: Mention that "the usual procedure" is for + site-wide installation. + (Advice for package providers): Mention site-start.el. + (Advice for non-privileged users): Adapt to new conventions. + Some other small changes. + + * preview.el (TeX-overlay-prioritize): correct stupid typo. + (preview-log-error): Pop up run buffer in case of error. + +2005-03-17 David Kastrup <dak@gnu.org> + + * preview.el (tex-site): Require loads of stuff at the beginning: + preview.el is supposed to be autoloaded, so we can just load + everything that needs to get loaded, anyway. + (TeX-overlay-prioritize): alias to "ignore" if not defined + elsewhere. This will not set priorities. + (eval-when-compile): move out most requires. + (preview-place-preview): Use TeX-overlay-prioritize instead of + TeX-fold-prioritize. + (preview-counter-find): Pass begin in to reduce one compilation + error message. + (TeX-region-create): Don't preactivate `preview-counter' advice. + (preview-reinstate-preview): Rename priority function to + `TeX-overlay-prioritize'. + (LaTeX-preview-setup): Remove requires. + (TeX-region-create): Explicitly activate `preview-preamble' advice + even though it is preactivated. + +2005-03-16 David Kastrup <dak@gnu.org> + + * prv-emacs.el: Use the four-argument version of `face-attribute' + if it exists. + +2005-03-15 David Kastrup <dak@gnu.org> + + * doc/install.texi (Configure): Be somewhat more verbose. Be + explicit about Emacs-only options. + + * doc/wininstall.texi: Warn against Winzip. Reorganize docs + somewhat and clarify about Emacs-only procedures. + + * doc/preview-latex.texi (Keys and lisp): Document + preview-at-point allowing active region. + + * preview.el (preview-at-point): Remove nonsensical arguments. + Instead, allow for an active region. + + * configure.in: Add `packagelispdir' to quoted Makefile variables. + +2005-03-14 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Reformat the kaboodle to look nicer. + Move \nofiles to auctex option. + + * latex/README-preview (Note): Mention \nofiles problem. + + * preview.el (preview-LaTeX-command): Add \nofiles to startup. + +2005-03-14 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * preview.el (TeX-fold-prioritize): autoload. + (preview-place-preview, preview-reinstate-preview): Use it. + +2005-03-07 David Kastrup <dak@gnu.org> + + * preview.el (preview-gs-open): Make better error message for junk + left over on PostScript stack, so that we may better pass the + buck. + +2005-03-05 David Kastrup <dak@gnu.org> + + * latex/preview.dtx: Fix psfixbb option that must have become + illegal at some time accidentally. + + * doc/install.texi (Loading the package): Explain that + preview-latex.el should already be installed in-place. + +2005-03-04 David Kastrup <dak@gnu.org> + + * Organizational: preview-latex development has been moved from + <URL:http://sourceforge.net/projects/preview-latex> into the + AUCTeX CVS Archive on + <URL:http://savannah.gnu.org/projects/auctex>. + +2005-03-03 David Kastrup <dak@gnu.org> + + * Release 0.9 + + * prv-install.el (preview-make-package-xemacs): Add directory + information from autoe.el to autoloads. + + * Makefile.in (elisp): generate preview-latex.el only when no + package system. + (install-el): Depend on auto.el + (install-startup): Make and install preview-latex.el only when no + package system. + + * prv-emacs.el (preview-create-icon-1): Use adaptive heuristic + mask for transparency. + + * preview-latex.spec: Make preview.dvi. But preview-latex.pdf + + * latex/Makefile.in (all): Generate both dvi and pdf. + (install-texmf-doc): Install DVI (faster, compact). + + * latex/Makefile.in (install-texmf-doc): Install PDF instead of + DVI file. + + * doc/wininstall.texi: Simplify, rearrange, adapt to new + installation scheme. Add links to CVS precompiled versions. + + * doc/install.texi (Prerequisites): Revamp. + (Configure): Add explanations. + + * preview-latex.spec: Change rpm name to include "fedora". Adapt + to new configure stuff. Use pdf doc instead of DVI. + + * configure.in: icondir is absolute, reorder some stuff to + maintain directory locality. + + * aclocal.m4: Change a lot of $x to ${x}. + Simplify some stuff. + + * RELEASE: Add information for release. + + * configure.in: Correct prefix check. Add Emacs version check. + + * aclocal.m4: Move several functions around, completely overhaul + the stuff to just detect material in prefix-related directories. + Remove docstrip config detection, add version checking of major + and minor version. Rely on prefix being set by configure.in. + +2005-03-02 David Kastrup <dak@gnu.org> + + * Makefile.in (install-el): no means no for packagedir. + + * configure.in: Set prefix. + + * aclocal.m4: Use "no" for no packagedir in XEmacs. + Don't save prefix and stuff. + Expand stuff at some points. + + * doc/wininstall.texi: Use executable name directly to save + confusion. + + * prv-xemacs.el (preview-filter-specs): Rework specs. + + * prv-emacs.el (preview-filter-specs): Translate :type fields. + + * preview.el (preview-min-spec): Move. + (preview-filter-specs): Move from prv-emacs.el and prv-xemacs.el. + (preview-filter-specs-1): simplify. + (preview-icondir): Create icondir preset variable. + (preview-filter-specs): expand file specs against it here instead + of prv-emacs.el and prv-xemacs.el. + + * configure.in: Adapt to new variables. + Remove check for image-supporting Emacs: it is probably not + reliable on consoles. + Add packagelispdir and icondir options. + (GS): Don't try GSWIN32.EXE. + Create lispGS in auto.el + + * autogen.sh: Use --output option for makeinfo to get + tableofcontents in FAQ. + + * doc/Makefile.in (.PHONY): Add install here. + + * Makefile.in (install-el): Adapt targets to packagelispdir. + (.PHONY): Add install target for case insensitive filesystems. + + * aclocal.m4: Rewrite EMACS_EXAMINE_PACKAGEDIR. + EMACS_LISP now gets one argument less. + EMACS_TEST_LISP_DIR makes just one pass. + EMACS_PATH_LISPDIR expands less. + AC_LISPIFY_DIR is a new function. + AC_MAKE_FILENAME_ABSOLUTE + AC_LISP_RELATIVE new functions. + +2005-02-26 David Kastrup <dak@gnu.org> + + * doc/readme.texi (Basic modes of operation): Adapt PDFLaTeX + explanation to newer AUCTeX versions. + + * preview.el (preview-error-icon-specs): Choose somewhat oversized + errors. Adapt to set. + (preview-gs-restart, preview-gs-transact): Change image file name + prefix to `pr'. + (preview-clean-subdir): When cleaning out subdirectories, match + `pr' instead of `pre'. + + * Makefile.in (ICON_SOURCES): Adapt to existing set. + +2005-02-25 David Kastrup <dak@gnu.org> + + * preview.el (preview-gs-options): Remove "-dDELAYSAFER" from + option list. + (preview-gs-sequence): New variable. + (preview-gs-sentinel): Don't repeat startup echo if GhostScript + fails before prompting the first time. + (preview-gs-sentinel): When restarting, remove expected file names + from `preview-gs-outstanding'. + (preview-gs-restart): generate a unique output file name pattern + from `preview-gs-sequence' + (preview-gs-restart): list start command quoted. + (preview-gs-open): initialize `preview-gs-sequence'. + (preview-gs-open): if historic "DELAYSAFER" is still configured, + start safe mode manually. Remove all settings of OutputFile, and + all runandhide stuff. + (preview-gs-place): Don't generate a filename that might not be + needed. + (preview-gs-flag-error): Generate a synthetic OutputFile option. + Use it in error messages. + (preview-gs-transact): generate output file name in outstanding + queue. Don't fiddle with OutputFile settings. Advance + `preview-gs-sequence'. + (preview-dvipng-place-all): Generate file name. + + * prv-xemacs.el (null-device): Remove compatibility definition. + +2005-02-18 David Kastrup <dak@gnu.org> + + * preview.el (preview-specs-setter): New function. + (preview-nonready-icon-specs): Choose slightly smaller icons. + (preview-nonready-icon-specs, preview-error-icon-specs) + (preview-icon-specs): Use `preview-specs-setter'. + + * doc/wininstall.texi: Mention case problems. + + * doc/install.texi (Prerequisites): Update AUCTeX version info. + + * doc/problems.texi (Middle-clicks paste instead of toggling): + Remove reference to patches directory. Should no longer be + necessary. + (Problems with GhostScript): Mention use of gswin32.exe instead of + gswin32c.exe as a problem source. + + * preview.el (preview-nonready-icon-specs): Add size 14. + + * images/prvwrk24.xpm: New icon, dimmer, better shape. + + * images/prvwrk20.xpm: New icon + + * images/prvwrk16.xpm: New icon + + * images/prvwrk14.xpm: New icon + + * images/prvwrk12.xpm: New icon + +2005-02-15 David Kastrup <dak@gnu.org> + + * preview.el (preview-error-quote): Encode to raw-text to get + unibyte string. + +2005-02-13 David Kastrup <dak@gnu.org> + + * doc/preview-latex.texi (The Emacs interface): Adapt to new + `preview-use-balloon-help' default. + + * doc/faq.texi (Customization): Adapt to new + `preview-use-balloon-help' default. + + * prv-xemacs.el (preview-use-balloon-help): Default to nil. + + * preview.el (preview-gs-flag-error): For consistency, make error + icons have a context menu on right mouse button. + +2005-02-11 David Kastrup <dak@gnu.org> + + * doc/preview-latex.texi (Keys and lisp): Change descriptions to + cater only for interactive use. + (Keys and lisp): Explain mouse-3 better. + (Keys and lisp): Move preview-copy-region-as-mml explanation up. + Explain about the new border avoidance behavior. + (The Emacs interface): Explain about how to adapt the various + icon-specs. + + * preview.el (preview-specs-type): Type for specs defcustom. + + (preview-nonready-icon-specs, preview-error-icon-specs) + (preview-icon-specs): move lower and make defcustom from it. + +2005-02-10 David Kastrup <dak@gnu.org> + + * prv-emacs.el (preview-mode-setup): Only define a preview toolbar + entry when the icon is valid. + + * RELEASE: Mention the new icons. + + * prv-xemacs.el (preview-tb-icon): Use this instead of + (preview-icon-toolbar-button): in order to match + `preview-tb-icon-specs', as in prv-emacs.el + (preview-mode-setup): Don't install a toolbar item when no icon + image can be generated properly. + +2005-02-09 David Kastrup <dak@gnu.org> + + * prv-xemacs.el (add-to-list): only provide definition for + three-argument version if XEmacs doesn't. May be removed at some + time completely. + (null-device): Only defvar if unbound in order not to munge the + doc string. + (preview-transparent-border): Silence the byte-compiler. + (preview-supports-image-type): Move earlier. + (preview-filter-specs): Correct a few typos. + (preview-filter-specs): Don't forget to call `make-glyph'. + (preview-mode-setup): Correct toolbar icon setup. + + * preview.el (preview-error-quote): Remove unused variable `char'. + + * doc/faq.texi (Requirements): Stop talking about ancient XEmacs + versions. + (Requirements): Mention Emacs 22 instead of 21.4 + + * doc/install.texi (Prerequisites): same + + * doc/problems.texi (Emacs problems): same + + * preview-latex.spec (Conflicts): xemacs = 21.4.16 + + * RELEASE: Add some dvipng information, more detailed + recommendations. + + * preview.el (preview-region, preview-buffer, TeX-region-create) + (preview-document, preview-environment, preview-section): Move + down to avoid byte compiler warnings. + + * images/*: lots of renaming/moving stuff around. + + * configure.in: remove ICONFORM stuff. + + * Makefile.in (ICONFORM): removed. + (ICON_SOURCES): Change to different list. + + * prv-xemacs.el (preview-nonready-icon, preview-error-icon) + (preview-icon, preview-tb-icon): Removed in this form. + (preview-ascent-spec): New symbol for storing minimal data when + parsing specs. + (preview-filter-specs): New function. + (preview-icon-copy): Replaces `preview-nonready-copy'. + (preview-mode-setup): Create toolbar button. + + * prv-emacs.el (preview-nonready-icon, preview-error-icon) + (preview-icon): removed. + (preview-filter-specs): New function. + (preview-tb-icon-specs, preview-tb-icon): New variables for the + toolbar icon. + (preview-icon-copy): replaces `preview-nonready-copy' + (preview-mode-setup): Initialize `preview-tb-icon' + + * preview.el (preview-nonready-icon-specs) + (preview-nonready-icon, preview-error-icon-specs) + (preview-error-icon, preview-icon-specs, preview-icon) + (preview-min-spec): New variables. + (preview-gs-place): Use `preview-icon-copy' instead of + `preview-nonready-copy' + (preview-make-image): New function. + (preview-filter-specs-1): New function. + (preview-buffer-restore-internal): Call `preview-get-geometry' for + having size information. This may be incorrect at restore time. + (preview-get-geometry): Also constitute `preview-icon', + `preview-error-icon' and `preview-nonready-icon'. + +2005-02-06 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Add note about `gswin32c.exe'. + +2005-01-29 David Kastrup <dak@gnu.org> + + * preview-latex.spec (Release): Bump version to prerelease, make + some changes that look like they'd fit into AUCTeX's scheme. + + * RELEASE: Some changes and mentions. + + * doc/preview-dtxdoc.pl: Convert AUC\TeX reference as well. + Convert `\#' to `#'. + + * latex/preview.dtx: Add `#' and `:' letters and documentation. + Make all commands pass on `#' on cleanly. Don't eliminate last + `{}' last in argument lists. + + * latex/Makefile.in (preview.pdf): New target. Since PDFs are + used for external documentation usually, generate only the + description (for internal docs, dvi is fine and adding the code, + too). + + * configure.in: Bump version number. + check for PDFLaTeX. + +2005-01-26 David Kastrup <dak@gnu.org> + + * preview.el (preview-copy-mml, preview-copy-region-as-mml) + (preview-format-mml): Ask whether user really wants to use + bordered graphics. + (preview-error-quote): Fix typo. Make the condition to call + decode-coding-string depend on (featurep 'mule) to match choice + for using raw process output. + (preview-get-geometry): Return the geometry instead of + manipulating a buffer. + (preview-set-geometry): New function to set the geometry into + buffer-local variables. + (preview-generate-preview): Start by getting geometry. + (TeX-inline-preview-internal): Additional geometry argument. + Don't switch into buffer where we are already. + +2005-01-25 David Kastrup <dak@gnu.org> + + * prv-emacs.el: Don't use transparent borders when Emacs is new + enough to have tolerable blinking. + + * preview.el (preview-dvipng-color-string): Pass the border into + dvipng. + (preview-dvipng-place-all): Record the border in the image data + structure. + +2005-01-24 David Kastrup <dak@gnu.org> + + * RELEASE: Ask for dvipng 1.4, mention utf-8 capability. + + * preview.el (preview-error-quote): Don't regexp codes out of the + ASCII range, and convert the resulting string using the buffer + encoding. This makes for utf-8. + (preview-parse-messages): Change match mechanism. + (TeX-inline-preview-internal): Set process encoding to raw-text + since TeX may deliver mixtures of encoded and clean bytes. + +2005-01-19 Jan-Ake Larsson <jalar@mai.liu.se> + + * aclocal.m4: sync with AUCTeX + +2005-01-17 jalar <jalar@mai.liu.se> + + * ChangeLog.1: Move dvipng changes to its Changelog + +2004-11-05 David Kastrup <dakas@users.sourceforge.net> + + * doc/readme.texi (What use is it?): New section. + + * doc/preview-latex.texi (The Emacs interface) + (The preview images): Add a bit of information concerning + PDF/dvipng operation. + + * preview.el (preview-default-preamble): Require specific date of + preview package. + + * latex/preview.dtx: Let bop-hook and eop-hook work only on outer + level, so that previews can contain dvips -E generated files. + +2004-10-23 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview): Change group to 'AUCTeX. + +2004-10-21 David Kastrup <dakas@users.sourceforge.net> + + * prv-xemacs.el (preview-mode-setup): Add `desktop-save-buffer' + setup. + + * prv-emacs.el (preview-mode-setup): Add `desktop-save-buffer' + setup. + + * preview.el (desktop-buffer-preview-misc-data): Let arguments be + ignored for desktop 2.06. + Add to `desktop-buffer-misc-functions' only after desktop has been + loaded. + (desktop-buffer-preview): take arguments for desktop 206. + +2004-10-18 David Kastrup <dakas@users.sourceforge.net> + + * prv-xemacs.el (glyph-image-type): Removed. + (preview-create-icon-1, preview-create-icon): like in prv-emacs.el. + (preview-replace-active-icon): Use defsubst. + (preview-ps-image): Removed. + (preview-move-point): Reorganized. + (preview-export-image): Removed. + (preview-import-image): Changed to new preview-image semantics. + + * prv-emacs.el (preview-create-icon): replace macro with defsubst, + add border argument. + (preview-replace-active-icon): defsubst, and cater for new + preview-image structure. + (preview-int-bb, preview-ps-image): Removed, only needed for + postscript device. + (preview-move-point): Reorganized. + (preview-export-image): Removed. + + * preview.el (preview-image-creators): Remove postscript device, + it did not work, anyway. + (preview-dvipng-color-string): Add resolution to args in order to + properly convert border thickness. + (preview-gs-dvips-sentinel): Delete unused `gsfile' variable. + (preview-eps-open, preview-eps-dvips-process-setup, + preview-eps-place): Removed. + (preview-gs-place, preview-gs-transact, preview-dissect) + (preview-dvipng-place-all, preview-active-string) + (preview-reinstate-preview): add construction info to + `preview-image' property. + (preview-start-dvipng): Calculate resolution info correctly. + (preview-at-point): Fix an awful typo. + +2004-10-14 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx: Make the end of snarfed environments behave + normally if the environment is not being snarfed. + +2004-10-14 Jan-Åke Larsson <jalar@mai.liu.se> + + * doc/wininstall.texi: Adjust text to conform with the AUCTeX aclocal. + + * configure.in: Add VALID_BUILD_DIR + +2004-10-13 Jan-Åke Larsson <jalar@mai.liu.se> + + * configure.in: Adjust for the aclocal.m4 sync with AUCTeX + + * aclocal.m4: Sync with AUCTeX. Well, almost. Don't + use the version test. + +2004-10-09 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-dvipng-command): Use -picky option. + (preview-error-quote): Convert character to buffer encoding if + mule allows it. + (preview-parse-messages): Strip incomplete 8bit character + transliterations from the error context. + +2004-08-21 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/install.texi: Markup fixes, see "(texinfo)command". + + * doc/wininstall.texi: Ditto. + +2004-08-09 David Kastrup <dakas@users.sourceforge.net> + + * doc/preview-latex.texi: Bump version number. + (top): Change preview-latex typesetting convention. + (Keys and lisp): AUCTeX menus are not changed. + (Simple customization): Don't talk about `.dvi'. + (For advanced users): Menu `The preview images' instead of `On EPS + previews'. + (The Emacs interface): Take PDF into account. + (The preview images): Describe `preview-gs-image-type-alist', + `preview-dvipng-image-type'. + + * doc/faq.texi (Introduction to FAQ): Change submission address to + preview-latex-devel since this appears to better reflect reality. + + * latex/preview.dtx (showlabels): work around ntheorem/amsmath + bug. + + * preview.el (preview-gs-image-type-alist): Add fallback for + 'postscript image type (not yet used). + (preview-dvipng-command): Add documentation about + `preview-dvipng-image-type'. Change options to `-picky + -noghostscript' to work with dvipng 1.2. + (preview-dvipng-image-type): New variable. + (preview-gs-open): Don't barf until we know what device will + actually be used. + (preview-gs-dvips-process-setup): Complain about unavailable + devices here. + (preview-dvipng-process-setup): And here. + (preview-dvipng-process-setup, preview-dvipng-place-all): Use + `preview-dvipng-image-type'. + (preview-TeX-inline-sentinel): Change "abnormally with code 1" and + "finished" exit status message. + (preview-dump-replacements, preview-undump-replacements): Don't + match command name as specifically. + (preview-report-bug): Report more variables. + +2004-08-07 David Kastrup <dakas@users.sourceforge.net> + + * doc/macros.texi: New @ConTeXt{} macro, change appearance of + @previewlatex{}. + + * doc/faq.texi (Customization): Presentation classes should work + mostly. + (Customization): Remove troubleshooting for `xy.sty'. + (Requirements): Add AUCTeX 11.50 for PDFLaTeX. + (Requirements): Mention dvipng. + (Customization): PDFLaTeX is supported now. + (Customization): ConTeXt is supported by AUCTeX, PDFLaTeX too. + `Only' style support is missing now. + + * latex/preview.dtx: workaround for `xy.sty' in `textmath' code. + +2004-08-04 David Kastrup <dakas@users.sourceforge.net> + + * aclocal.m4: Merge a few AUCTeX changes. + +2004-08-03 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-walk-document): Current buffer and its + master are always considered part of the document. + (preview-dvipng-command): Use -noghostscript option. + (preview-dvipng): Remove the almost unused customization group + 'preview-dvipng. + +2004-08-02 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-extract-bb): remove old outcommented version. + (preview-dvipng-command): Use -no-image-on-warn option. + (preview-pdf2dsc-process-setup): Oops, just use + `preview-gs-image-type' here. + (preview-dvipng-sentinel): Don't delete dvi file since it might be + needed in `dvipng-place-all'. + (preview-dvipng-place-all): Start dvips/GhostScript if some image + files are missing. Delete dvi file if none are missing. + +2004-07-28 David Kastrup <dakas@users.sourceforge.net> + + * doc/problems.texi (Too small bounding boxes): Fix node + crosslinks. + + * latex/preview.dtx: Tiny change to placate font-latex. + + * latex/README-preview: Explain that PDF may be produced. + + * doc/wininstall.texi: Remove advice about failing byte-compiles: + we should have this covered by now. + + * doc/problems.texi (LaTeX international characters): remove node. + + * doc/preview-latex.texi (Misplaced previews): Refer to x-symbol + node instead of 8bit testing. + + * doc/install.texi (Configure): Remove --disable-8bit-test + description. + + * preview.el (preview-parse-messages): Simplify line match. + + * preview-latex.spec: Several changes of %{buildroot} uses and of + infodir. Doubtful whether this will work with Fedora. + + * configure.in: Remove all 8bit-cleanness testing. + + * aclocal.m4 (EMACS_LISP): just write out a string expression + without change or echo. Document the macro. + + * doc/Makefile.in (prefix) (packagedir) (datadir) (infodir): + preserve trailing backslashes. + + * Makefile.in (INSTALL) (INSTALL_DATA): Don't munge them for + trailing backslashes. + +2004-07-27 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-dvipng): New customization group. + (preview-image-creators): Remove ghostscript options here. + (preview-gs-image-type-alist): New variable for lookup of + Ghostscript options. + (preview-gs-open): Remove imagetype and gs-optionlist arguments. + Instead, look them up in preview-gs-image-type-alist. + (preview-gs-dvips-process-setup): Setup GhostScript command line + at different place. + (preview-gs-dvips-process-setup): Use preview-gs-image-type, not + preview-image-type for extension. + (preview-dvipng-open): Removed. + (preview-dvipng-process-setup): Setup GhostScript fallback. + (preview-pdf2dsc-process-setup): Don't setup GhostScript here. + (preview-error-quote): Fix bugs, only convert last ^^ sequence + when a long string of ^^ exists. + +2004-07-16 David Kastrup <dakas@users.sourceforge.net> + + * Makefile.in (INSTALL_DATA): Use `$(null)' at end of variables at + end of lines instead of `#' + +2004-07-15 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-format-mml): Somewhat different code. + (preview-error-quote): New function for generating a matching + regexp to deal with ^^ type error messages. In short: forget + about 8-bit-cleanliness. + (preview-parse-messages): Use it. + +2004-05-08 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-format-mml): Determine MIME format from + file name properly. And don't return anything for bad overlays. + + * Split ChangeLog.1 off, create dvipng/ChangeLog. + + * preview.el (preview-gs-sentinel): Add info about GhostScript + finishing to run buffer. + (preview-gs-restart): Same for start. + (preview-gs-color-string): Cater for border without mask color + (didn't we do that already?) + +2004-04-23 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-gs-color-string) + (preview-dvipng-color-string): Try to do something reasonably sane + when a non-nil border thickness is specified, but no color. + +2004-04-20 Reiner Steib <Reiner.Steib@gmx.de> + + * .cvsignore: Added "autom4te.cache". + +2004-04-19 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/preview-latex.texi (Simple customization): Don't "unlispify" + variable names. + +2004-04-12 David Kastrup <dakas@users.sourceforge.net> + + * Release 0.8.1 + + * preview.el (preview-dump-replacements): Use regexp not + triggering bugs in older Emacsen. + (preview-dump-replacements): Same here. + + * RELEASE, configure.in, doc/preview-latex.texi: Adapt to 0.8.1 + + * preview-latex.spec: xemacspkgdir has changed in recent XEmacs + releases for Redhat. + + * prv-xemacs.el (preview-mode-setup): Remove non-existent menu. + + * prv-emacs.el (preview-mode-setup): Remove non-existent menu + "copied" from TeX-command-list to Command menu. + + * Release 0.8 + + * RELEASE: prepare for 0.8 + + * preview-latex.spec: prepare for 0.8, bump XEmacs to 21.4.9. + +;; Local Variables: +;; coding: utf-8 +;; End: diff --git a/elpa/auctex-13.1.3/ChangeLog-preview.1 b/elpa/auctex-13.1.3/ChangeLog-preview.1 new file mode 100644 index 0000000..cdd9956 --- /dev/null +++ b/elpa/auctex-13.1.3/ChangeLog-preview.1 @@ -0,0 +1,3736 @@ +2004-04-12 David Kastrup <dakas@users.sourceforge.net> + + * Release 0.8.1 + + * preview.el (preview-dump-replacements): Use regexp not + triggering bugs in older Emacsen. + (preview-dump-replacements): Same here. + + * RELEASE, configure.in, doc/preview-latex.texi: Adapt to 0.8.1 + + * preview-latex.spec: xemacspkgdir has changed in recent XEmacs + releases for Redhat. + + * prv-xemacs.el (preview-mode-setup): Remove non-existent menu. + + * prv-emacs.el (preview-mode-setup): Remove non-existent menu + "copied" from TeX-command-list to Command menu. + + * Release 0.8 + + * RELEASE: prepare for 0.8 + + * preview-latex.spec: prepare for 0.8, bump XEmacs to 21.4.9. + +2004-04-11 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-dvipng-color-string): Try to deliver border + thickness. + (preview-gs-transact): Don't set page size to 1,1 if that has + already been done. + (preview-start-dvipng): Use new -D convention for resolution. + (preview-pdf2dsc-process-setup): Add resolution to GhostScript + call for PDF. Doh. + + * circ.tex: Format with AUCTeX. + + * preview.el (preview-gs-open): Bypass page initialization if + page is 1bp times 1bp (that is: not yet set). + + * latex/preview.dtx: Remove tightpdf option again. Better + explanation for tightpage. + + * preview.el (preview-parsed-tightpage): New variable. + (preview-TeX-bb): Use tightpage borders if found in file. + (preview-gs-flag-error): Display correct file on error. + (preview-gs-transact): Don't pass page dimensions if tightpage is + active. + (preview-required-option-list): Replace dvips option with tightpdf + option. + (preview-parse-tightpage): New function. + (preview-parse-variables): Add preview-parse-tightpage, add + function quoting. + (preview-gs-open): Move color setup to BeginPage hook. Rename + preview-latex-* PostScript Variables to just preview-*. + (preview-gs-transact): Set minimal pagesize if tightpage detected + to speed up unimportant setpagedevice operations. + (preview-required-option-list): Use tightpage option always. + (preview-parse-variables): Remove function quoting: it lead to + double quotes and tears. + (preview-LaTeX-disable-pdfoutput): Move into separate constant + for easy access as it is no longer the standard. + (preview-LaTeX-command-replacements): Default to nil to enable + PDFTeX operation. Better customization type. + + * latex/preview.dtx: Some reformatting, add new parse items - and + >, add new option pdftex, adjust tightpage for it, add new + option tightpdf. + + * doc/preview-dtxdoc.pl: Eat spaces after %. + +2004-04-09 David Kastrup <dakas@users.sourceforge.net> + + * images/preverr.xbm: + * images/preverr.xpm: invert upside-down icons. + +2004-03-15 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-gs-color-string): Add missing space in + color setup (GhostScript syntax error). + (preview-gs-color-string): And another color setup bug. + +2004-03-11 David Kastrup <dakas@users.sourceforge.net> + + * doc/readme.texi (Activating preview-latex): Make a few changes + with regard to keybindings and stuff. + (Contacts): Add Paypal info for myself. + + * doc/preview-latex.texi (Keys and lisp): Remove the C-c C-c g + pseudobinding from the description. + (Keys and lisp): Document mouse actions. + (Keys and lisp): Move Kill Job description. + +2004-03-10 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-gs-colors): replaced with preview-colors. + (preview-pdf2dsc-command): replaces preview-pdftodsc-command + (preview-gs-open, preview-gs-color-value) + (preview-gs-color-string, preview-dvipng-color-string) + (preview-dvipng-open, preview-dvipng-process-setup) + (preview-pdf2dsc-process-setup, preview-pdf2dsc-sentinel) + (preview-gs-close, preview-dvipng-close) + (preview-prepare-fast-conversion, preview-attach-filename): lots + of small changed to accommodate pdf2dsc. + (preview-parse-messages): Change pattern to accommodate pdfTeX. + (preview-LaTeX-command-replacements): Changed to not rely on latex + being different from elatex. And for allowing pdflatex in DVI mode. + (preview-dump-replacements, preview-undump-replacements): Same. + (preview-cache-preamble): transfer setting of \pdfoutput to + dumped format. + + * prv-emacs.el (preview-gs-color-value): Moved to preview.el. + (preview-get-colors): Substitute for previous + preview-gs-get-colors. + (preview-dvipng-get-colors): Removed. + * prv-xemacs.el (preview-gs-color-value): Moved to preview.el. + (preview-get-colors): Substitute for previous + preview-gs-get-colors. + (preview-dvipng-get-colors): Removed. + +2004-03-02 Jan-Åke Larsson <jalar@mai.liu.se> + + * preview.el: Fix xemacs' defalias problem + +2004-03-02 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-image-creators): dvipng now uses different + place and close routines. + (preview-dvipng-command): Fix file name default. + (preview-pdf2dsc-command): for PDFLaTeX support + (preview-gs-dvips-process-setup): Pass image type. + (preview-dvipng-open), (preview-dvipng-process-setup), + (preview-dvipng-abort), (preview-dvipng-sentinel), + (preview-dvipng-close): New functions + (preview-gs-place): get imagetype as argument. + (preview-gs-place): don't create temporary file names for dvipng. + (preview-dvipng-place): deleted. + (preview-dvipng-place-all): New function. + (preview-attach-filename): New function for PDF support. + (preview-delete-file): Support attached files. + (preview-format-mml): Slight formatting changes. + +2004-01-14 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-parsed-pdfoutput): Add detection for PDF + output from preview.sty. + (mail-header-encode-parameter): Encode the header ourselves: it + seems that versions of the library are not good at that. + (preview-parse-variables): Add `preview-parsed-pdfoutput'. + (preview-map): Add keybinding for `preview-copy-region-as-mml'. + (preview-copy-mml): factor out `preview-format-mml'. + (preview-copy-region-as-mml): New function. + (preview-format-mml): New function. + +2004-01-11 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (subsection{Preview attaching commands}): + Tell preview-latex when the output format is PDF. + +2004-01-06 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-region): Use "<none>" for file name if + buffer not associated with a file. + (preview-parse-messages): recognize "<none>" to mean + TeX-command-buffer. + (preview-region): Use `preview-generate-preview' instead of + `TeX-command'. + (preview-document): Same. + (preview-at-point): Add arguments to allow mouse use at later + time. + (LaTeX-preview-setup): Don't touch TeX-command-list. + (preview-cache-preamble): Use `preview-generate-preview' instead + of `TeX-command'. + (TeX-inline-preview): Deprecate. + (preview-generate-preview): New function. + (TeX-inline-preview-internal): Remove `name' argument. + +2004-01-04 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-equality-transforms) + (preview-relaxed-string=, preview-walk-document) + (preview-required-option-list): Doc changes. + (preview-disabled-string, preview-inactive-string) + (preview-active-string, preview-place-preview) + (preview-reinstate-preview): Use new context menus and give help + strings for them. + (preview-copy-text, preview-copy-mml, preview-active-contents) + (preview-context-menu): Implement context menu and functionality. + (mail-header-encode-parameter): Add an autoload cookie for this + function taken from `mail-parse.el'. + +2003-11-11 Jan-Ake Larsson <jalar@mai.liu.se> + + * Makefile.in, doc/Makefile.in, latex/Makefile.in: Add DESTDIR + variable + +2003-11-10 Jan-Åke Larsson <jalar@mai.liu.se> + + * preview.el: Add 'dvipng preview-scale functionality + +2003-11-08 Stephen Reindl <sr@stephenreindl.de> (tiny change) + + * preview-latex.spec (%install): rm texinfo 'dir' file because + this file is not needed for distribution (rpm 4.1+ complains about + this 'missing' file). + +2003-11-07 Jan-Åke Larsson <jalar@mai.liu.se> + + * preview.el: Fix dvipng resolution + +2003-11-06 Jan-Åke Larsson <jalar@mai.liu.se> + + * prv-xemacs.el: + * prv-emacs.el: + * preview.el: Add color handling for dvipng + +2003-11-05 Jan-Ake Larsson <jalar@mai.liu.se> + + * preview.el: Primitive dvipng support. Lacking ascent and colors. + +2003-11-04 David Kastrup <dakas@users.sourceforge.net> + + * doc/todo.texi: Add quite a few more wishes. Actually, it would + be nice to strike off a few instead. + +2003-11-02 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (subsection{Selection options}): Fix the + carnage broken document classes like elsart.cls and IEEEtran.cls + do to \endfigure and \endtable, and complain about it in + appropriate warning messages. + +2003-10-15 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (subsection{Selection options}): Let the + textmath option also preview the `math' environment. + +2003-07-10 David Kastrup <dakas@users.sourceforge.net> + + * doc/wininstall.texi: fix web page of AUCTeX. + + * doc/install.texi (Prerequisites): fix web page of AUCTeX. + + * preview.el (LaTeX-preview-setup, preview-parse-messages) + (TeX-inline-preview): Fix references to AUCTeX. + + * aclocal.m4 (library): Fix references to AUCTeX. + + * RELEASE: Fix references to AUCTeX. + +2003-06-19 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx: Make \long what needs to be \long in order + to deal with argument lists and macros that might contain \par. + +2003-05-13 David Kastrup <dakas@users.sourceforge.net> + + * configure.in: Really bail if 8bit test fails. + + * circ.tex (section{Die gerade Linie}): Add comments for + intentional bugs. + +2003-04-28 David Kastrup <dakas@users.sourceforge.net> + + * configure.in: Fix check for images. + + * aclocal.m4 (library): Try setting the EMACS_cv_SYS_* variable + that we are actually checking. Is that correct? + +2003-04-17 Jan-Åke Larsson <jalar@mai.liu.se> + + * doc/wininstall.texi: Corrected --with-lispdir and --with-packagedir + +2003-04-09 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4: More sane emacs-macro path-searching. + +2003-03-31 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4 (EMACS_PROG_EMACS): Make the test fail gracefully + when no binary executable is found. More generally, make the + emacs-macro path-searching tests run. + +2003-03-30 David Kastrup <dakas@users.sourceforge.net> + + * doc/install.texi (Configure), doc/wininstall.texi: explain + --with-emacs and stuff even less ambiguously. + +2003-03-28 David Kastrup <dakas@users.sourceforge.net> + + * doc/faq.texi (Installation Trouble): Update Windows info. + +2003-02-15 David Kastrup <dakas@users.sourceforge.net> + + * configure.in: quote MAKEINFO. + + * README.CVS: Fix instructions because autoconf now does not need + patching anymore. + + * doc/preview-latex.texi: juggle the dircategory, hopefully right + now. + +2003-02-13 David Kastrup <dakas@users.sourceforge.net> + + * doc/preview-latex.texi: Somewhat changed info dir entries. + (Simple customization): add hint for RefTeX. + + * doc/problems.texi, doc/macros.texi: anticipate name change of + AUC TeX to AUCTeX. + + * aclocal.m4, configure.in: resynch with AUCTeX aclocal.m4. + Lots of name changes. + + * configure.in: Remove redundant checks/substs. + + * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): lots of fixes with regard + to quoting, bad code and other stuff. + (AC_CHECK_AUCTEX): remove trailing slash. + +2003-02-10 Alan Shutko <ats@acm.org> + + * aclocal.m4: Changed all references of AUCTEXDIR to auctexdir. + + * Makefile.in (auctexdir): Changed all references of AUCTEXDIR to + auctexdir. + +2003-02-05 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (section{Package options}): Correct doc of + \PreviewBbAdjust. + +2003-02-05 Alan Shutko <ats@acm.org> + + * doc/problems.texi: Add documentencoding. + (Emacs problems): Move @end itemize after XEmacs. + +2003-02-03 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (subsection{The \texttt{auctex} option}): + Make \item actually produce an \item. + +2003-01-27 David Kastrup <dakas@users.sourceforge.net> + + * doc/problems.texi (Emacs problems): CVS Emacs supports PNG now. + + * doc/wininstall.texi: CVS Emacs supports PNG images now. + + * prv-xemacs.el (null-device): Add defvar for older XEmacsen. + +2003-01-24 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (preview-gs-sentinel): Delete PostScript file when + GhostScript has finished. + (preview-gs-dvips-sentinel): Don't mark PostScript file for + deletion when GhostScript will be run: otherwise preview.el will + delete the PostScript file automatically when the last preview has + been generated but before GhostScript exits. And since + GhostScript has the file still open, some "operating systems" will + refuse to delete the PostScript file at that moment. + +2003-01-20 David Kastrup <dakas@users.sourceforge.net> + + * Release 0.7.8 + + * aclocal.m4: Correct environment spellings for Makefiles. + + * latex/preview.dtx (subsection{The internals}): comment out color + setup. That means that one might not be able to use color.sty for + setting up fore/background color, but it will also mean that + loading color.sty does not interfere with the initial colors set + up inside of GhostScript. In the long run, we will have to solve + this differently. + +2003-01-19 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (section{Package options}) + (subsection{The \texttt{showlabels} option}), doc/todo.texi: + spell RefTeX correctly. + + * preview.el (preview-gs-open): Get really paranoid about closing + our output file in a way which should get rid of races. + (preview-ps-quote-filename): Get an optional argument for + avoiding making file names relative (like null-device). + (preview-equality-transforms, preview-relaxed-string=, + preview-canonical-spaces): Add functionality for relaxed check of + region changes (should allow outline-minor-mode in XEmacs, too, + and paragraph reformatting). + + * prv-emacs.el (preview-check-changes): use + `preview-relaxed-string=' for detecting relevant changes. + + * prv-xemacs.el (preview-create-icon): Use defsubst instead of + defmacro in order to avoid double evaluation of `file'. + (preview-check-changes): use `preview-relaxed-string=' for + detecting relevant changes. + + * latex/preview.dtx (section{Introduction}) + (section{Package options}, subsection{Supporting conversions}): + Mention that `tightpage' requires `dvips', too. + +2003-01-18 David Kastrup <dakas@users.sourceforge.net> + + * Makefile.in (install-el, install-icons): Fix overquoting. + +2003-01-17 Jan-Ake Larsson <jalar@mai.liu.se> + + * Makefile.in (install): Unquote $x so that the install prints + what is installed. + +2003-01-17 David Kastrup <dakas@users.sourceforge.net> + + * aclocal.m4 (AC_SHELL_QUOTIFY): c\:\\bin is correct, but ugly. + Don't quote : specifically, it is not likely to be a special shell + character. + + * doc/Makefile.in (infodir): Add a few missing environment + variables. + + * latex/Makefile.in, Makefile.in, aclocal.m4, configure.in: try + to deal as perfectly as possible with spaces in file names, + quotes, backslashes and desperate things in general. + +2003-01-15 Jan-Ake Larsson <jalar@mai.liu.se> + + * configure.in: Use AC_PROG_EMACS and more portable + AC_PATH_LISPDIR/PACKAGEDIR + + * aclocal.m4 (AC_PROG_EMACS): New. Sanitize AC_PATH_LISPDIR. Make + AC_PATH_PACKAGEDIR portable. + +2003-01-10 Jan-Ake Larsson <jalar@mai.liu.se> + + * Makefile.in: Make Solaris make grok the remaining long lines + +2003-01-10 David Kastrup <dakas@users.sourceforge.net> + + * preview.el (LaTeX-preview-setup): Change menu name for + generating customize menu to "Extend this menu". + + * configure.in (TEXMFGEN): Make this possibly more portable (at + the very least, we had some potential quoting problems). + + * autogen.sh, configure.in: Ok, darn them all. We now have a + configure.in that does no longer need to get patched up after + autoconf, regardless of which autoconf version gets used between + 2.13 and 2.57 or hopefully later. + +2003-01-07 David Kastrup <dakas@users.sourceforge.net> + + * Makefile.in (AUCTEXLISP): quoting levels still unsufficient. + + * configure.in: Error message contained a single backquote, and + this made autoconf-213 barf. + + * Makefile.in (AUCTEXLISP): quote sed command correctly. + + * README.CVS: Update info about what autogen.sh generates. + + * doc/wininstall.texi: Well, forget a few details. Also added. + + * autogen.sh: Make much more simple, so that this will work with + more sed versions. + + * doc/wininstall.texi: Major overhaul, taking also GNU Emacs CVS + into account. + + * Makefile.in: Lots of quote fixes to make this hopefully compile + better when paths may contain spaces and backslashes (the horror, + the horror). + + * latex/Makefile.in: Lots of quote fixes to make this hopefully + compile better when paths may contain spaces and backslashes + (the horror, the horror). + + * doc/preview-latex.texi (Keys and lisp): Rearrange section, + cater for renamed menus, some better explanations. + + * doc/faq.texi (Installation Trouble): Some rearrangements and + additional explanations. + + * latex/preview.dtx (section{Provided Commands}): Add description + of \PreviewOpen and \PreviewClose. + (subsection{Selection options}): Typo in displaymath hook on \[ + fixed. + (subsection{Preview attaching commands}): Fix code of + \PreviewOpen and \PreviewClose which need to have their own + groups open and close always. + +2003-01-06 David Kastrup <dakas@users.sourceforge.net> + + * latex/preview.dtx (section{Provided Commands}): Add a lot of + additional possibilities for previewing commands and document + them. + + * doc/preview-dtxdoc.pl: convert @ to @@, add braces around \marg + argument, allow spaces in \oarg argument. + + * doc/Makefile.in (install): rename INSTALLINFO to INSTALL_INFO + for consistency. + + * autogen.sh: Allow use of AUTOCONF, use sed. + + * configure.in: Rework the language stuff autoconf sickness. + Require autogen.sh for editing work. + +2002-12-29 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-clearout-section): New function. + (preview-map): Add keybinding to it. + (LaTeX-preview-setup): Reorganize Preview menu for better user + friendliness. + +2002-12-22 David Kastrup <David.Kastrup@t-online.de> + + * latex/Makefile.in (install-texmf): don't call TEXHASH with + argument: some of the substitutes might not like it. Better safe + than sorry. + + * configure.in: A few more texhash-related fixes. + +2002-12-20 David Kastrup <David.Kastrup@t-online.de> + + * Makefile.in (LISP_SOURCES): Use = instead of := for non-GNU + make versions. Also in other variables. + +2002-12-19 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (section{Package options}): Document + `footnotes' option. + (section{Provided Commands}): Document new second optional + argument to \PreviewMacro*. + (subsection{Parsing commands}): Obliterate \pr@seq and make + \pr@callafter have different semantics. + (subsection{Preview attaching commands}): New macroo \pr@endmacro + needed for new \pr@callafter semantics. + (subsection{Preview attaching commands}): Implement the new + second argument to \PreviewMacro* and \PreviewEnvironment*. + (subsection{Preview attaching commands}): Make \pr@startsnarf + adapt to new \pr@callafter semandtics. + (subsection{The \texttt{auctex} option}): Use the new semantics + in a number of cases. + + * doc/install.texi (Loading the package): Make this more + fool-proof by leaving out alternatives and reordering. + +2002-12-18 Jan-Ake Larsson <jalar@mai.liu.se> + + * preview.dtx: Add \caption to auccfg + +2002-12-17 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.7.7 + + * prv-emacs.el (preview-unwatch-preamble): Fix a lethal typo. + + * Release 0.7.6 + + * preview-latex.spec (Requires): Bump to 0.7.6 + + * doc/faq.texi (Requirements): Change version requirements for + AUC TeX. + + * doc/readme.texi (Activating preview-latex): Explain about what + to do if preview-latex.el did not get installed properly. + + * doc/preview-latex.texi (Keys and lisp): Explain about new + commands and options. + (Simple customization): Explain how to keep counters accurate. + (The Emacs interface): document new options. + + * doc/install.texi (Prerequisites): Explain about AUCTeX and + XEmacs versions. + (Loading the package): Recommend using preview-latex.el as + standard measure. + + * Makefile.in (GS): Inherit GhostScript executable name. + (preview-latex.el): If GhostScript is not named "gs", change + preview-gs-command setting appropriately. Add the Lisp + installation directory to the load-path. + + * configure.in: use : instead of /bin/true + Check typical GhostScript executable names on Windows. Check for + initexmf -u (MikTeX specific). + + * RELEASE: Some more changes for 0.7.6 + +2002-12-16 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-string-expand): Get optional separator + argument. + (preview-expandable-string): Change type somewhat. + (preview-clearout-document): doc change. + (preview-default-preamble, preview-LaTeX-command): Simplify to + changed definition of preview-expandable-string. + + * prv-xemacs.el (preview-mode-setup, preview-watch-preamble) + (preview-unwatch-preamble): Differentiate between unwanted formats + and formats without loaded master file. + + * prv-emacs.el (preview-watch-preamble, preview-unwatch-preamble, + preview-mode-setup): Differentiate between unwanted formats and + formats without loaded master file. + +2002-12-15 David Kastrup <David.Kastrup@t-online.de> + + * Makefile.in (preview-latex.el): Avoid putting the output of pwd + inside of "...", because something like "C:\notagain" is not + quite the Lisp string we'd want. + + * preview.el (preview-walk-document): New function walking + through buffers of current document. + (preview-clearout-document): New function for completeness. + (preview-map): Add keybinding for it. + (LaTeX-preview-setup): Add menu entry for it. + + * configure.in: Preparations for 0.7.6 + + * RELEASE: Preparations for 0.7.6 + +2002-12-14 David Kastrup <David.Kastrup@t-online.de> + + * aclocal.m4: Don't lie about name of option --with-texmf-dir + +2002-12-13 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (subsection{The \texttt{footnotes} option}): + new option. + + * preview.el (preview-default-option-list): Switch on previews + for footnotes by default. + +2002-12-12 Jan-Ake Larsson <jalar@mai.liu.se> + + * autogen.sh: Nitpicking + + * aclocal.m4, configure.in, doc/Makefile.in, doc/macros.texi: + Sanitize makeinfo macro tests + + * configure.in: Make LANG and LC_CTYPE saving work across + recursive call of ./configure (2.52) + +2002-12-12 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (subsection{The internals}): Kill insertions + off that annoy our space strippers. That makes + \PreviewMacro[*[]{}]{\footnote} feasible. + +2002-12-11 Jan-Ake Larsson <jalar@mai.liu.se> + + * images/preview-cap-up.xpm: Fix bg and fg color issues + +2002-12-10 Jan-Ake Larsson <jalar@mai.liu.se> + + * autogen.sh: Make LANG and LC_CTYPE saving work across recursive + call of ./configure (2.13) + + * doc/macros.texi: Typo fixed + +2002-12-10 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-counter-find): Take counters by searching + forward if searching backwards does not avail us. + (preview-reinstate-preview): Optimize queue/tempdir handling for + the most common case. + +2002-12-09 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-counter-find): Factor out stuff from advice + since it will otherwise miss out on compatibility macros for XEmacs. + (TeX-region-create): Factor out advice. + (preview-reinstate-preview): Oops, wrong data if nothing + changed. Switched around. + + * latex/preview.dtx (subsection{Preview attaching commands}): + Don't \unskip in vertical modes in preview/nopreview + environments. + + * preview.el (preview-parsed-counters): New variable. + (preview-dissect): export counter info. + (preview-place-preview): get counter info. + (preview-reinstate-preview): resinstate counters also. + (preview-default-option-list): add counters option. + (preview-string-expand): New function. + (preview-expandable-string): New type. + (TeX-region-create): Advice for counter restoration. + (preview-last-counter): for restoring. + (preview-extract-counters): New function. + (desktop-buffer-preview-misc-data): Sort stuff when writing and + deal with counters. + (preview-dissect, preview-buffer-restore-internal) + (preview-place-preview): Deal with counters. + (preview-buffer-has-counters): New variable during parsing. + (preview-place-preview): Deal with counters. + (preview-required-option-list): New option. + (preview-make-options, preview-make-preamble): deleted + (preview-default-preamble, preview-LaTeX-command): redefine using + expandable strings. + (LaTeX-preview-setup): Replace entry in TeX-command-list with + dummy. + (LaTeX-preview-setup): Delete "%D" and "%P" fudges. + (preview-parse-counters): New function for parsing counters. + (preview-parse-variables): Add preview-parsed-counters to parse + list. + (preview-parse-messages): deal with counters. + (preview-dump-replacements): Add preview-LaTeX-command-replacements + (preview-cache-preamble): Don't generate string for + TeX-inline-preview, it does so itself. + (TeX-inline-preview): Generate command from preview-LaTeX-command + (preview-report-bug): Report more variables. + +2002-12-07 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): simplify "%m" entry in + TeX-expand-list. + (preview-create-subdirectory): return a quoted relative file name. + (preview-cache-preamble): various directory name related changes + so that everything will work master-relative. + (preview-cache-preamble-off): Same here. + (TeX-inline-preview-internal): Same here. + (preview-report-bug): Add autoload cookie. + (preview-create-subdirectory): Make dvips directory relative. + (preview-report-bug): also report LaTeX-command-style. + +2002-12-06 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-open): Another GhostScript security work + around, this time leaving off something that confuses 7.x + releases of AFPL GhostScript. + +2002-12-03 Jan-Ake Larsson <jalar@mai.liu.se> + + * Makefile.in: + * prv-xemacs.el: handle the new toolbar image + + * images/preview-cap-up.xpm: toolbar image + +2002-11-29 Jan-Ake Larsson <jalar@mai.liu.se> + + * doc/readme.texi: + * doc/preview-latex.texi: + * doc/macros.texi: + * doc/Makefile.in: + * configure.in: + * aclocal.m4 (AC_TEST_MAKEINFO_ACRONYM): Attempt to make docs + build with old texinfo + +2002-11-28 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.7.5 + + * latex/preview.dtx (subsection{Debugging options}): Typos. + + * Makefile.in (use-hint): Add XEmacs version hint. + + * prv-xemacs.el (preview-defmacro): define compatibility macros + only at compile time. + (preview-mode-setup): correct check for icon in toolbar. + + * preview.el (require): use load-library on prv-xemacs.el in + order to get the compatibility macros at compilation time. + +2002-11-22 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.7.4 + + * preview-latex.spec (Requires): New RPM brain damage means we + have to disable the 8bit test. + + * doc/faq.texi: Various updates. + + * doc/install.texi: Some cosmetic changes and version info + updates. + + * doc/preview-latex.texi (Keys and lisp): Adjust docs for changed + menu structure (Preview having a top-level entry). + (On EPS previews): phase out info about historical `postscript' + settings. + + * preview.el (preview-image-type): Don't offer `postscript' when + customizing. + + * configure.in: bump version. + + * doc/preview-latex.texi: bump version. + (Keys and lisp): reorder so that indexes refer to the start of + items. + + * preview.el (preview-gs-transact): add a bit of paranoia into + page shifts in case the coordinate origin is not upper left. + Similar to change in tightpage option of preview.dtx. + (preview-LaTeX-command-replacements): comment fix. + + * latex/preview.dtx (subsection{The \texttt{counters} option}): + new option and documentation: add counter checkpoints in + diagnostics. + +2002-11-21 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-mode-setup): And here we have the + toolbar icon for XEmacs users. Does not look too pretty, but + might inspire volunteers for improvements. + +2002-11-07 Jan-Ake Larsson <jalar@mai.liu.se> + + * aclocal.m4: Cosmetic change to the AUC TeX path printout + +2002-11-20 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: some changes for 0.7.4 + + * preview.el (preview-dump-command, preview-undump-command): + deleted. + (preview-do-replacements): New function for performing + replacements in strings. + (preview-LaTeX-command-replacements, preview-format-name) + (preview-dump-replacements, preview-undump-replacements): new + variables. + (preview-cache-preamble): adapt to new variables. + (TeX-inline-preview, TeX-inline-preview-internal): same. + +2002-11-18 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-mode-setup): Add preview-at-point to the + toolbar, for those people that have not seen fit to disable it. + Volunteers for the XEmacs equivalent? + +2002-11-10 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-ps-quote-filename): New function replacing + preview-ps-quote, generating a relative file name. + (preview-prepare-fast-conversion): Use it. + (preview-gs-transact): Use it. + (LaTeX-preview-setup): Make tmp directory name relative. + Problem is that Cygwin absolute paths are not suitable for + passing into MikTeX. Sigh. But perhaps relative file names are + nicer, anyway. + (preview-parse-messages): Fix regexps for the sake of people + incompetent to make the run buffer not contain ^M everywhere. + Another Windows-related "fix". + +2002-11-05 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-open): Place color setup after + setpagedevice. + + * latex/preview.dtx (subsection{Supporting conversions}): Make + the tightpage option generate proper /PageOffset values also for + devices with bottom-up coordinate systems. + + * doc/problems.texi: Remove preview-gs-broken-security docs. See + below. + + * preview.el (require): Don't abort compilation if desktop or + reporter packages are not installed. + (preview-gs-broken-security): Removed: + (preview-gs-open): Workaround for braindead security. + +2002-11-04 David Kastrup <David.Kastrup@t-online.de> + + * Changes in order to preserve point in previews as follows: + * preview.el (preview-at-point): Pass selected window into + preview-toggle. + (preview-place-preview): Pass event into preview-toggle. + (preview-reinstate-preview): Same here. + * prv-emacs.el (preview-toggle): take additional argument (event + or window). + (preview-last-location): New variable, buffer-local. + (preview-mark-point): Remember point before moving out. + (preview-restore-position): New function. + * prv-xemacs.el (preview-toggle): take additional argument (event + or window). + (preview-last-location): New variable, buffer-local. + (preview-mark-point): Remember point before moving out. + (preview-restore-position): New function. + +2002-10-21 Jan-Ake Larsson <jalar@mai.liu.se> + + * configure.in: Fix texhash check + +2002-09-16 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (section{Introduction}): Mention tightpage + option for image conversion already here. + (\pr@endbox): set \reserved@a to something harmless for skipping + (if it was set to a conditional, we got into trouble). + (subsection{Selection options}): Redo the textmath option because + the exscale package (for example) does dirty things within + \frozen@everymath. + +2002-09-06 David Kastrup <David.Kastrup@t-online.de> + + * doc/faq.texi: Explain about 'Preview-LaTeX exited abnormally + with code 1' message + +2002-09-02 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-mode-setup): Make behaved startup in + buffers without associated file (M-x calendar RET tfw produces + things like that). Generating previews will not work before you + save the buffer, but at least the stuff doesn't bomb out right + away. + + * prv-emacs.el (preview-mode-setup): Make behaved startup in + buffers without associated file (M-x calendar RET tfw produces + things like that). Generating previews will not work before you + save the buffer, but at least the stuff doesn't bomb out right + away. + + * circ.tex: Load and save once to make it X-Symbol-compatible + (changes are negligible, and it makes demoing mixtures of the two + tools nicer). + + * preview.el (LaTeX-preview-setup): Fix menu position of generated + customize menu. + (preview-format-kill, preview-dump-file-name) + (preview-cache-preamble, TeX-inline-preview-internal): Use prefix + `prv_' for dumped formats to avoid name collisions (for example, + with WhizzyTeX). + +2002-08-14 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.7.3 + + * preview.el (preview-auto-cache-preamble): Renamed from + preview-dump-default. Make the default 'ask: that way people + will be hard put to overlook this feature, but are not stuck on + it in case it causes trouble. Perhaps will make them read the + manual, too, in order to set this to T. + (preview-map): Use preview-cache-* + (preview-cache-preamble, preview-cache-preamble-off): renamed + from preview-dump-*. + + * doc/preview-latex.texi (Keys and lisp): Rename + preview-dump-format and its ilk to preview-cache-preamble. + (Simple customization): Mention automatic preamble caching. + +2002-08-13 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (TeX-inline-preview): Use set-process-coding-system + only when Mule is active. + (preview-document): Save document if necessary. + (TeX-inline-preview): Some overhaul. + (TeX-inline-preview-internal): Separated out so that + region/format dumps don't interfere. + + * prv-xemacs.el (preview-mode-setup): See below. + (preview-dump-threshold): See below. + (preview-preamble-format-cons): File local variable for watching. + (preview-preamble-check-change, preview-watch-preamble) + (preview-unwatch-preamble): See below. + (preview-handle-before-change): Call + preview-preamble-check-change. + + * prv-emacs.el (preview-dump-threshold): Regexp ending dump. + (preview-preamble-changed-function): New function. + (preview-watch-preamble): New function. + (preview-unwatch-preamble): New function. + (preview-mode-setup): Check whether we open a watched file. + + * preview.el (preview-buffer): Move region exclusion into advice + for TeX-region-create. + (preview-dump-default): New variable, tells us whether we should + dump formats automatically. + (preview-dumped-alist): Semantics change. + (preview-dump-format): Use watch functions from prv-*.el + (preview-clear-format): new optional argument, save last wanted + state. + (TeX-inline-preview): Use preview-dump-default. + +2002-08-07 Jan-Ake Larsson <jalar@imf.au.dk> + + * autogen.sh: Fixed autoconf-fix message + +2002-08-07 David Kastrup <David.Kastrup@t-online.de> + + * preview-latex.spec (Release): Set to 9 (prerelease) + (Requires): Add FAQ to docs. + + * doc/faq.texi: FAQ added. + +2002-08-06 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-use-balloon-help): New boolean + customization variable. + (preview-mode-setup): Use it. + + * doc/preview-latex.texi (The Emacs interface): Document it. + +2002-08-05 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (subsection{Supporting conversions}): change + default of \PreviewBbAdjust from 0.5bp to 0.50001bp. + +2002-08-04 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-back-command): New optional argument + NOCOMPLEX. + (preview-parse-messages): Use it for not skipping backwards over + braced expressions when start and end of triggered errors match. + +2002-08-03 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: update RedHat distro info. + + * doc/preview-latex.texi: Remove documentlanguage setting: English + is the default anyway, and declaring it breaks the broken TeXlive 7 + texinfo distribution. + + * doc/todo.texi: Updates. + + * RELEASE: New leading commercial. + +2002-08-01 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: Typo corrected + +2002-07-31 David Kastrup <David.Kastrup@t-online.de> + + * doc/Makefile.in (preview-latex/index.html, clean): clean out + preview-latex directory for html-docs. + + * doc/problems.texi (Problems with GhostScript): document + preview-gs-broken-security. + + * doc/preview-latex.texi: Bump version to 0.7.3. + (The Emacs interface): Document changes in options. + + * doc/install.texi (Prerequisites): GhostScript problem info. + + * doc/Makefile.in (TEXIFILES): New macro. + (preview-latex/index.html, preview-latex.dvi, preview-latex.info): + Make dependency on TEXIFILES. + (clean): remove INSTALL.windows + + * preview.el (preview-parsed-font-size) + (preview-parsed-magnification): documented. + (preview-hook-enquiry): Use value of symbol only if bound. + (preview-document-pt-list): Correct customization type. + +2002-07-30 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (section{Package options}): document `lyx' + option. + + * doc/wininstall.texi: New file documenting XEmacs/Windows, + courtesy of Anthony Williams. + +2002-07-29 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-parsed-font-size) + (preview-parsed-magnification): new variables set from + preview.sty + (preview-get-magnification): consults + preview-parsed-magnification. + (preview-gs-resolution): consult preview-get-magnification. + (preview-gs-open): Delay setup of preview-gs-command-line + (preview-gs-dvips-process-setup): complete it. + (preview-hook-enquiry): New function. + (preview-document-pt-list): Sources of document-pt. + (preview-auctex-font-size): Previously preview-document-pt + (preview-document-pt): Uses preview-document-pt-list + (preview-scale-from-face): defer part of calculation. + (preview-parse-variables): Variable list set from preview.sty + (preview-parse-messages): Clear them at start of parse. + (preview-parse-messages): New pattern for variable list. + (preview-parse-messages): magnification for PS bounding box. + (preview-parse-messages): Parse variables from preview.sty + (preview-get-geometry): Use preview-hook-enquiry for call of + preview-scale-function. + +2002-07-28 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (subsection{Preview attaching commands}): Fix + \PreviewEnvironment* + (subsection{Preview attaching commands}): Type out font size and + magnification info at start of document. + (subsection{Supporting conversions}): Take DVI magnification into + account in `tightpage' option. + +2002-07-26 David Kastrup <David.Kastrup@t-online.de> + + * circ.tex: Demonstrate showlabels (and fix a math oversight). + + * latex/preview.dtx (subsection{The \texttt{showlabels} option}): + Changes, different look, more robust. + +2002-07-25 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/problems.texi: Info on windows-xemacs + +2002-07-25 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): Fix form of preview-entry in + order not to confuse customize. + +2002-07-24 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (TeX-inline-preview): Export buffer coding system to + TeX process output encoding (for our Polish friends and others). + Hope this does not break non-Mule XEmacsen if such are around. + +2002-07-23 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-image-creators): Change tiff device to use + tiff12nc, which has a chance of working with the current + settings, at the cost of large file sizes. + +2002-07-23 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/install.texi: Minor changes + + * doc/problems.texi: Documented GNU gs 7.05 security bug info + +2002-07-22 David Kastrup <David.Kastrup@t-online.de> + + * latex/preview.dtx (subsection{The \texttt{showlabels} option}): + Make sanitization of labels more consistent and switch to + typewriter font. + +2002-07-19 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-mode-setup): Add preview menu. + + * prv-emacs.el (preview-mode-setup): Add preview menu. Why is it + before the LaTeX menus? + + * preview.el (preview-map): Prefix-keymap. + (LaTeX-preview-setup): Use it. + +2002-07-18 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (face-attribute): shift stuff to compile time. + (preview-with-LaTeX-menus, preview-mode-setup): cosmetic changes. + + * preview.el (preview-LaTeX-command): Use Windows-friendly + quoting. + (preview-dump-command, preview-undump-command): Same here. + +2002-07-16 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-ps-quote): New function. + (preview-prepare-fast-conversion): Use it. + (preview-gs-transact): Use it. + + * latex/preview.dtx (subsection{The \texttt{auctex} option}): + Output font size. + (subsection{The \texttt{lyx} option}): New option. + (subsection{Supporting conversions}): Write out tightpage + dimensions before each change. + (section{Various driver files}): generate prlyx.def. + +2002-07-11 David Kastrup <dak@localhost.localdomain> + + * preview.el (preview-gs-broken-security): New option specifying + when to disable security. + (preview-gs-open): Use it. Also abort more predictably if + setpagedevice fails, usually due to broken security. + +2002-05-28 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup, preview-parse-messages): cater + to abbreviated locator error message. + (preview-clearout-at-point): New function. + (LaTeX-preview-setup): add to menus and cleanup unnecessary flags. + + * latex/preview.dtx: replace "Package Preview Error" with + "Preview": too many people got confused. + + * doc/preview-latex.texi (Simple customization): Document new + auto-reveal default. + (Simple customization): Document a better way for default + options. + + * preview.el (preview-gs-open): bind preview-latex-do PostScript + operator. + (preview-auto-reveal): Change default to auto-open on move + left/right. + +2002-05-08 David Kastrup <David.Kastrup@t-online.de> + + * doc/todo.texi: add request for other TeX formats. + + * preview.el (preview-parse-messages): There is little point in + being more picky about ( than we are about ), since all that this + buys us is bad nesting. + + * prv-emacs.el (preview-gs-get-colors): Warp outline borders to + integral pixels in order to avoid antialiasing artifacts. + +2002-05-06 <dak@lola.goethe.zz> + + * preview.el (preview-back-command): Changed semantics in order + not to backstep over punctuation. + (preview-get-geometry): Bad error message format. + +2002-04-30 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview.el (preview-dump-format): + Now checks if format has changed; if it hasn't, + no new dump is made. + + * preview.el (preview-buffer): Changed to mirror the behaviour of + TeX-region-create. This is probably the best we can do. + +2002-04-29 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview.el (preview-buffer): allow it to work with format + caching + added comment + +2002-04-28 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: + Document preview-clear-format and its keybindings + + * preview.el (preview-clear-format): + new, also changed keybinding for it + +2002-04-26 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: Documented preview-dump-format + + * preview.el: Cosmetic change in menu + +2002-04-26 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): Menu entries and keybindings + for preview-dump-format. + (preview-dumped-list): New variable: dumped formats. + (preview-dump-format): New command for pregenerating format files. + (TeX-inline-preview): Use dumped format if present. + (preview-dumped-list): Move. + (preview-cleanout-tempfiles): Also kill format files. + (preview-format-extensions): New variable for cleanup purposes. + (TeX-inline-preview): preview-dumped-list contains expanded file + names. + +2002-04-24 Jan-Ake Larsson <jalar@imf.au.dk> + + * problems.texi: Slight index change + + * preview-latex.texi (Keys and lisp): Added the menu entries + +2002-04-23 Jan-Ake Larsson <jalar@imf.au.dk> + + * autogen.sh: Test for unique file 'preview.el' in autoconf 2.13 + +2002-04-23 Alan Shutko <ats@acm.org> + + * aclocal.m4 (AC_PATH_PROGS_REQUIRED): New. + + * configure.in: Lock in whole path of Emacs executable. + +2002-04-23 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.7.2b + + * Makefile.in (preview-latex.el): Quickfix + + * Release 0.7.2 + + * preview.el (preview-buffer-restore-internal): Remove expired + previews. + (preview-reinstate-preview): set timestamp. + +2002-04-22 Nix <nix@esperi.demon.co.uk> + + * doc/install.texi (Advice for non-privileged users): + Add XEmacs-specific instructions. + + * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): Locate an existing preview-latex + package and install over it if found. + (AC_PATH_PACKAGEDIR): Support ~/ in package directory names. + +2002-04-22 David Kastrup <David.Kastrup@t-online.de> + + * doc/install.texi (Advice for non-privileged users): new section. + + * configure.in: Quote TEXMFGEN. + + * doc/readme.texi (Getting started): mention the mouse buttons. + +2002-04-21 Nix <nix@esperi.demon.co.uk> + + * prv-emacs.el: Remove comment regarding XEmacs's lack of local + change hooks; it has them and we use them. + + * doc/problems.texi (XEmacs): Mention the process-liveness patch. + Fix some grammar. Call the support `quite new' rather than + `very new'. + + * configure.in (infodir): Define for XEmacs; point to the info + location in the package tree. + +2002-04-21 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-parse-messages): Try a few changes making + bad buffer-local interac + shorten export format. Backward compatible. + + * prv-xemacs.el (preview-export-image, preview-import-image): + shorten export format. Backward compatible. + +2002-04-14 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (glyph-image-type): New, determine the + image type of a glyph. + (preview-export-image): Use it. + + * doc/problems.texi (XEmacs): Say that preview reinstating + works with a new enough desktop.el. + +2002-04-14 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-export-image): New macro. + (preview-import-image): New macro. + + * preview.el (preview-reinstate-preview): use + preview-import-image. + (preview-dissect): Use preview-export-image. + + * prv-xemacs.el (preview-export-image, preview-import-image): New + functions for desktop.el. + + * doc/Makefile.in (preview-latex.info): In the interest of + release sanity, add --no-split option so that we have to cater + for just a single info file. Needs to be reverted later. + + * doc/readme.texi (Getting started): mention circ.tex here + instead of installation.texi. + + * preview.el (preview-gs-filter): Don't remove from "Compilation" + tag if just in filter routine. + + * patches/flyspell.patch, patches/mouse-drag.patch: update + inflicted Emacs version number. + + * doc/problems.texi (Middle-clicks paste instead of toggling): + Alas, those bugs persist into 21.2 although the CVS has had it + fixed for half a year almost. "Stable release" policies. Ha. + +2002-04-14 Nix <nix@esperi.demon.co.uk> + + * preview.el (preview-parse-messages): + Typo and grammar fixes in comments. + No longer wonder if XEmacs will like line-number regexps. + + * doc/problems.texi (XEmacs): + Say that it works modulo core bugs and new desktop.el package. + Point to the latest version of the core patch. + Suggest trying under MS Windows. + (GNU Emacs under Windows): Point out that preview-latex's not been tested + under Windows with XEmacs, either. + + * doc/install.texi (Prerequisites): + No longer describe XEmacs support as preliminary. + Mention the Known Problems link. + (Configure): Elaborate --with-packagedir. + (Loading the package): Mention that most of these instructions + are unnecessary for XEmacs, except if you used --with-packagedir. + (Maybe should split into Emacs/XEmacs subsections?) + +2002-04-14 Jan-Ake Larsson <jalar@imf.au.dk> + + * install.texi: Added --with-xemacs + + * preview-latex.spec: Only require xemacs >= 21.1 + +2002-04-14 David Kastrup <David.Kastrup@t-online.de> + + * doc/install.texi Added section for package providers, updated + the links. + + * preview.el (preview-error-condition): New variable for last + error condition. + (preview-log-error): Error reporting routine. Logs to run buffer. + (preview-reraise-error): At the end of routines, raise a true + error with beep and whatever else is necessary to get attention. + (preview-gs-sentinel, preview-gs-filter) + (preview-gs-dvips-sentinel, preview-gs-transact): use it. + (preview-gs-transact): Don't send to dead process. + (preview-parse-messages): Use error logger. + (preview-TeX-inline-sentinel): Same here. + (TeX-inline-preview): Catch initialization errors and abort. + Good for people without graphic display. + +2002-04-13 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: Repair RedHat XEmacs braindamage + + * preview-latex.texi: Document new keybindings + +2002-04-13 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (preview-compatibility-macros): + Bind the final list of compiled macros into the bytecode at + the end of compilation. + +2002-04-13 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-make-clickable): Revert changes. + (preview-auto-reveal): revert default: reveal.el might be loaded + after preview.el, and we still want the default to follow + reveal-mode in that case. + +2002-04-13 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (preview-nonready-icon): + Give a reasonable error if the icon doesn't exist. + (preview-error-icon): Likewise. + (preview-icon): Likewise. + + (preview-make-clickable): Set `isearch-open-invisible' on new clickable regions. + (preview-toggle): Likewise. + (preview-auto-reveal): Only track reveal-mode if reveal-mode is defined. + If reveal-mode' is not defined, the default should be nil. + + (isearch-highlight): Make a protected, disabled advisement by default. + (replace-highlight): Never exists; don't bother to advise. + (preview-query-replace-reveal): Turn on the isearch-highlight advisement. + + * doc/todo.texi: Update XEmacs status: most things are now done. + +2002-04-13 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-next-border): Fix a weird error where + regions beyond the file were demanded. + (preview-at-point): Include previews immediately before point for + toggling. + + * prv-xemacs.el (preview-toggle): Make isearch open the invisible + stuff, and make isearch-invisible track invisible so that isearch + will not "restore" things improperly. + (preview-move-point): isearch is manipulated by advising + isearch-highlight. No need to check here for isearch-mode. + (defadvice): only advise replace-highlight if defined. + + * latex/preview.dtx (subsection{The \texttt{showlabels} option}): + hotfix for strange label names. + + * preview.el (preview-disable): Go via toggle for disabling + strings. + + * prv-xemacs.el (preview-mode-setup, preview-marker) + (preview-temporary-opened, preview-mark-point) + (preview-auto-reveal, preview-move-point, preview-open-overlays) + (replace-highlight, preview-query-replace-reveal) + (preview-change-list, preview-register-change) + (preview-check-changes, preview-handle-before-change) + (preview-handle-after-change): Do the whole fake-intangibility + and change detection shmeer. isearch does not work yet. + +2002-04-12 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): call preview-mode-setup + and/or put it in LaTeX-mode-hook. + (preview-buffer, preview-document, LaTeX-preview-setup): New + commands, keybindings, menu entries. Things are now more + orthogonal and you do no longer need C-c C-c and their ilk (though + still supported): we have the commands all accessible via C-c C-p + now. + (preview-dsc-parse): Make DSC parsing more robust. + + * prv-xemacs.el (preview-mode-setup): New function. Enable + balloon help. + + * prv-emacs.el (preview-toggle): Move hook setup to + preview-mode-setup. + (preview-mode-setup): New function. + (preview-mark-active): make macro. + + * Makefile.in: New icons. + + * images/preverr.xbm, images/preverr.xpm: New icons. + + * prv-emacs.el (preview-error-icon): New icon. + + * preview.el (preview-mouse-open-error): Use other call + conventions in order not to confuse XEmacs. + (preview-gs-flag-error): switch to using error icon. + (preview-error-face): deleted. + + * prv-xemacs.el (preview-error-icon): New icon. + (preview-make-clickable): new properties preview-balloon-help and + preview-keymap. + (preview-click-reroute): changed to use preview-keymap. + (preview-reroute-map): new function. + (preview-balloon-reroute): new function. + (preview-toggle): change the juggling. + + * doc/preview-latex.texi (Simple customization): expound on the + center example. + +2002-04-11 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: Adjustments for xemacs + + * doc/preview-latex.texi: Reinstate (reverse) textmath hint + +2002-04-11 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-environment, preview-parse-messages): byte + compiler warnings. + (preview-buffer-restore-internal): basically the previous + preview-buffer-restore. + (preview-buffer-restore): delay resinstating previews vie + desktop-delay-hook. + + * prv-xemacs.el (face-attribute): Try getting calculation of + :height more correct. + (preview-inherited-face-attribute): Make a macro. + + * prv-install.el (preview-make-package): Avoid Emacs + unnecessarily loading all command line arguments as files. + + * prv-xemacs.el (preview-click-reroute): New routine to + discriminate between clicks on glyphs or else. + (preview-make-reroute): Generate a reroute map from original + glyph clickable keymap. + (preview-toggle): use the rerouter. + +2002-04-10 Jan-Ake Larsson <jalar@localhost.localdomain> + + * doc/preview-latex.texi: Added hint on getting custom + environments previewed due to John Jones, remove the textmath hint + + * latex/.cvsignore: New + + * .cvsignore: Changed due to the 'latex' subdir + + * patches/x-symbol.patch: Removed + + * preview-latex.spec: Simplifications from using a 'latex' subdir + + * doc/Makefile.in: Use mkinstalldirs + +2002-04-10 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-default-option-list): set textmath per + default. + + * latex/README-preview: update to reflect added file footprint + from preview.dtx + +2002-04-10 Jan-Ake Larsson <jalar@imf.au.dk> + + * Makefile.in: Move the texmf part to latex/Makefile.in, fix the + 'clean' target + + * configure.in: preview.dtx has moved, generate latex/Makefile + + * doc/Makefile.in: preview.dtx has moved + + * latex/README-preview, README-preview: + Renamed README-preview to latex/README-preview + + * latex/bootstrap.ins, bootstrap.ins: + Renamed bootstrap.ins to latex/bootstrap.ins + + * latex/preview.dtx, preview.dtx: + Renamed preview.dtx to latex/preview.dtx + + * latex/Makefile.in: Move latex style to subdir, Typo corrected + +2002-04-10 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (face-attribute): GNU Emacs calculates face + heights differently. + (preview-replace-active-icon): For now do the full inefficient + stuff. Working this out later should be easy. XEmacs now + displays previews, but that's about all. + (preview-button-1, preview-button-2): define as XEmacs buttons + (preview-make-clickable): make balloon-help something that + balloon-help-mode understands. + +2002-04-09 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el: Remove crufty destructive-copy stuff. + + (map-plist, destructive-replace-glyph, copy-glyph): Removed. + (preview-replace-active-icon): Just set the new image property rather than + destructively copying it. + +2002-04-09 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (preview-nonready-icon): Fix baseline. + (preview-icon): Likewise. + + Bug fixes: + + (destructive-replace-glyph): Don't confuse `new-glyph' and `glyph'. + + Sync with prv-emacs changes: + + (propertize): Create zero-length extents if possible. + (preview-image-from-icon): Removed. + (preview-string-from-image): Removed. + (preview-replace-icon): Removed. + (preview-nonready-copy): New, simple as anything. + (preview-replace-active-icon): New, albeit apparently broken. + + (preview-make-clickable): Handle glyphs as well as strings. + (preview-toggle): Clickable glyphs are now always on the `end-glyph'. + +2002-04-09 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-nonready-copy): replaces + preview-image-from-icon + (preview-replace-active-icon): replaces preview-replace-icon + (preview-make-clickable): make preview-string-from-image + unnecessary. + + * preview.el (preview-gs-place): Don't return image, just enter + it. + (preview-gs-transact): Call preview-replace-active-icon + specialized routine instead of the more general hack used before. + (preview-disabled-string): kill preview-string-from-image + (preview-inactive-string): same here. + (preview-eps-place): change in place semantics as above. + (preview-active-string): Don't receive image argument. + (preview-place-preview): New place semantics. + + * doc/problems.texi (x-symbol interoperation): Bump recommended + version to 4.2.2. + (Middle-clicks paste instead of toggling): Mention fixes present + in Emacs-21.2. + (Middle-clicks paste instead of toggling): Mention isearch. + +2002-04-09 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: Install icons + + * doc/preview-latex.texi: Put Nick in authors, slight other changes + + * doc/problems.texi: Added entry on fast conversion and bounding boxes + + * doc/todo.texi: Added manual stuff + +2002-04-08 David Kastrup <David.Kastrup@t-online.de> + + * doc/todo.texi: New suggestion for manual. + + * doc/readme.texi (Getting started): Adapt text to new icons. + + * doc/preview-latex.texi (The Emacs interface): Add documentation + about the scaling variables/issues from preview-latex. + +2002-04-07 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-parse-messages): Error message cosmetics + and a judicious save-excursion for fast hooks. + + * prv-emacs.el (preview-nonready-icon): Use new icons. + (preview-icon): Same here. + +2002-04-07 Nix <nix@esperi.demon.co.uk> + + * prv-install.el (preview-make-package-xemacs): + Revert last change; package version numbers must be integral. + Ensure that we get a valid integer even if `preview-version' + contains multiple periods. + +2002-04-07 David Kastrup <David.Kastrup@t-online.de> + + * images: Icons, several revisions. + +2002-04-06 Nix <nix@esperi.demon.co.uk> + + * prv-install.el (preview-make-package-xemacs): + Prepend "0." to XEmacs package version numbers + for CVS versions of preview.el. + + * prv-xemacs.el (preview-icon,preview-nonready-icon): + Use new icon images. + + * Makefile.in (ICONFORM,ICON_XPM_SOURCES): New + variables, for icon installation. + (ICON_XBM_SOURCES,ICON_SOURCES,icondir): Likewise. + (ELCC): Include the ICONFORM. + + (install-icons): New, install the icons. + + (MKINSTALLDIRS): New (for later, when objdir!=srcdir support is added). + (install): Use it. + (install-el): Likewise. + (install-texmf): Likewise. + (install-texmf-doc): Likewise. + + * configure.in (icondir): + Set for GNU Emacs too (but blank), and substitute it. + (ICONFORM): New variable, comamnd-line switch to pass to (X)Emacs + to find the images at build time (if needed). Substitute it. + + * mkinstalldirs: New file, from automake-1.6. + +2002-04-06 Nix <nix@esperi.demon.co.uk> + + * doc/todo.texi: Update XEmacs status. + + * configure.in: Substitute the packagedir. + + * Makefile.in (packagedir): New variable, used by... + (install-el): ... this new package-installation handling. + + * prv-install.el: New file, containing... + (preview-make-package): New function. + (preview-make-package-xemacs): New function, derived from + emacs-w3m. + + * aclocal.m4 (AC_EXAMINE_PACKAGEDIR): Lowercasify PACKAGEDIR. + (AC_PATH_PACKAGEDIR): Likewise. + +2002-04-06 Alan Shutko <ats@acm.org> + + * configure.in: Start adding XEmacs-specific hooks. Right now, + lispdir should be correctly set up, I think. icondir is sitting + there for when we add icons. + + * aclocal.m4 (AC_PATH_PACKAGEDIR,AC_EXAMINE_PACKAGEDIR): New + functions for XEmacs installation, borrowed from from emacs-w3m, + credit to Katsumi Yamaoka <yamaoka@jpl.org>. + +2002-04-06 Jan-Ake Larsson <jalar@imf.au.dk> + + * autogen.sh, doc/Makefile.in, doc/preview-latex.texi: + Include todo.texi + + * doc/todo.texi: Moved from TODO + + * TODO: Moved to todo.texi + +2002-04-05 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-parse-messages): Another addition to the + fast location hook semantics. + (preview-parse-messages): one last change for Christoph. + + * prv-emacs.el (preview-add-urgentization): Cosmetic change. + + * Additional frobbing of urgentization. + +2002-04-05 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (preview-add-urgentization): Use + `set-extent-initial-redisplay-function' to force immediate + redisplay if already on-screen. + (preview-remove-urgentization): Likewise. + +2002-04-05 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el (preview-remove-urgentization): proper return + value. + (preview-add-urgentization): Make entry in + initial-redisplay-function easier to reextract for + preview-remove-urgentization. + + * TODO: small changes. + +2002-04-04 Nix <nix@esperi.demon.co.uk> + + * preview.el (preview-parse-messages): + Cater for XEmacs shy grouping bug (shy grouping + very nearly doesn't work in XEmacs-21.4...) + + * prv-xemacs.el (match-string-no-properties): + New, same as `match-string'. + (set-buffer-multibyte): Degenerate implementation. + + (face-attribute): Throw an error of the right error class. + (make-temp-file): Likewise. + + (preview-add-urgentization): Revise signature, as in prv-emacs. + (preview-with-LaTeX-menus): Do not copy useless menus around. + + (preview-string-from-image): Make obvious that this generates any + kind of glyph, not just begin-glyphs. + (preview-ps-image): Revise signature (but implementation is still + stubbed). + (preview-toggle): Revise signature slightly. Flip between begin + and end-glyphs to partially cater for XEmacs redisplay bug. + +2002-04-04 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-dvips-process-setup): Correct deletion + of dvi file. + (preview-dvips-abort): don't unnecessarily clean subdirs. + (preview-gs-dvips-sentinel): get the delete semantics right. + (preview-gs-close): same here. + (preview-delete): after deleting files, set files in overlay to + nil since in connection with urgentization we can get multiple + deletions. + (preview-parse-messages): initialize lfile to "", so that line + number caching does not fail when the filename is "nil". + (preview-parse-messages): AAAAAARGGG!!!. Fix the typo that + caused O(n^2) parsing time. + +2002-04-03 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-close): move. + (preview-gs-dvips-process-setup): New function for setting up + process just at the time of use. + (preview-dvips-abort): New function. + (preview-gs-dvips-sentinel): Overhaul. + (preview-gs-close): Overhaul in order to do the right thing + regardless of whether Dvips has finished or not. + (preview-eps-open): Some initial changes. 'postscript image + device likely to be broken by us (but it is broken in Emacs, + anyway). + (preview-parse-messages): Take `open-closure' as argument. + (preview-parse-messages): different hook semantics for fast + hooks. We are still in negotiations over this... + (preview-parse-messages): change parsestate to list of vectors. + +2002-04-03 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: documented showlabels + + * doc/install.texi, doc/readme.texi: Slight edits + + * doc/problems.texi: Document x-symbol.patch, slight other edits + + * patches/x-symbol.patch: Initial version + + * preview-latex.spec: Use texmfdir, slight other edits + +2002-04-03 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: Use texmfdir, slight other edits + +2002-04-02 Jan-Ake Larsson <jalar@imf.au.dk> + + * aclocal.m4: escaped usage of $texmfdir + +2002-04-01 Jan-Ake Larsson <jalar@imf.au.dk> + + * Makefile.in: added texmf and elisp targets, also targets for + $TEXMFGEN + + * preview-latex.spec: Initial stab at triple-rpm spec + + * doc/Makefile.in: *.dvi and *.info cleaned again + + * preview-latex.spec: Typo corrected + +2002-04-01 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): Remove our own + TeX-translation-hook that did not really work (supposed to remove + Preview error messages from preview runs, but for document + problems you'd rather use the real run, anyhow). + (preview-parse-messages): remember directory when switching + buffers. Implement fast translation hooks. A pity nobody uses + them yet. + (TeX-inline-preview): Use TeX-run-command instead of + TeX-run-format: we miss out on the progress info in the mode + line, but it slowed down the filter routine. + + * preview.dtx (subsection{The \texttt{auctex} option}): Make the + error messages shorter to cut down on I/O time. + +2002-03-31 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview): add cross links. + + * Makefile.in: Rerun LaTeX to get references right. + + * preview.dtx (subsection{The \texttt{auctex} option}): Disable + \thanks and \and. + + * preview.el (preview-default-option-list): Update possibilities + and docs. + (preview-parse-messages): Don't do files not known to be + human-generated. + (preview-gs-queue-empty): New cleanout function. We use this + instead of just clearing preview-gs-queue in order to avoid + losing pointers to deletable temporary files. + (preview-gs-sentinel): Use it. + (preview-gs-close): Same here. + (preview-gs-open): And here. Use unwind-protect in order to + ascertain we process the queue. + (preview-prepare-fast-conversion): Accept non-dereferenced big ps + file. + (preview-gs-dvips-sentinel): better behavior when processes get + started and finished in unexpected orders. + +2002-03-31 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: + Changed to include everything in /texmf/tex/latex/preview, + fix for %config files + +2002-03-30 David Kastrup <David.Kastrup@t-online.de> + + * doc/preview-dtxdoc.pl, preview.dtx (section{Various driver + files}): Add \previewlatex macro for consistent translation. + + * doc/preview-dtxdoc.pl: add \% and ~ translations. + + * preview.dtx (section{Package options}): document new option + files. + + * doc/problems.texi (x-symbol interoperation): Mention speed + problem. + + * preview.dtx: loads of smaller and larger changes, new options + files. + + * preview.el (preview-back-command): typo. + + * autogen.sh (makeinfo): move into doc directory for + autogenerating files so that include files are found. + +2002-03-30 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/Makefile.in: New dependency on macros.texi + + * doc/install.texi, doc/readme.texi, doc/copying.texi: + Macros in separate file + + * doc/problems.texi: Typo corrected, macros in separate file + + * doc/preview-dtxdoc.pl: Changed slightly wrt \cmd translation + + * doc/macros.texi: Macros for the texinfo generation + + * doc/preview-latex.texi: Typos corrected, macros in separate file. + +2002-03-30 Alan Shutko <ats@acm.org> + + * Makefile.in (TEXMFGEN): Use new variable. + + * configure.in (TEXMFGEN): New variable with the tex stuff + generated which should be installed. + +2002-03-29 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-back-command): Change call semantics to + something easier to understand and try out. + (preview-parse-messages): Remove unused variable `next-point'. + (preview-parse-messages): Correct thinko and use new + preview-back-command semantics. + +2002-03-28 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: move \pr@ship@start + + * preview-latex.spec (%configure): Use --with-texmf-dir. + +2002-03-27 Alan Shutko <ats@acm.org> + + * doc/install.texi (Configure): Reflect changes in configure + options. + + * configure.in (--with-texmf): Changed to --with-texmf-dir per bug + 480837. + (--with-preview-dir): Changed to --with-tex-dir per bug 480837. + (--with-doc-dir): New. + +2002-03-28 David Kastrup <David.Kastrup@t-online.de> + + * circ.tex: Correct labels. + +2002-03-27 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: be careful in unboxing so as not to remove + possibly shifted hboxes (bug reported by Jan-Åke) protected by an + otherwise inexplicable penalty. + + * preview.el: Complete overhaul of parsing to avoid (costly) + buffer switches. + (preview-gs-close): Transfer queue to + preview-gs-queue. + (preview-gs-open): Pass arglist to preview-parse-messages for + place functions. + (preview-eps-open): Same. + (preview-gs-place): Completely different args in order to avoid + buffer switching. Different return value. + (preview-inactive-string): Different semantics (were valid before + by accident, so no change in callers necessary). + (preview-eps-place): Rearranged to avoid buffer switching. + (preview-make-filename): require tempdir. + (preview-delete-file): changed API to avoid buffer switching. + (preview-place-preview): Same. + (preview-parse-messages): New args passed into place routines. + Completely rearranged and merged preview-analyze-error into it. + (preview-start-dvips): Pass tempdir to preview-make-filename + + * prv-emacs.el (preview-add-urgentization): Changed API, but it + turns out this gets called just like it did before. + +2002-03-27 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/.cvsignore: Ignore preview-dtxdoc.texi + + * doc/Makefile.in: Autogeneration of ../preview.dtx -> + preview-dtxdoc.texi + + * doc/preview-dtxdoc.pl: Initial version + + * doc/preview-latex.texi: Moved menu to problems.texi, documented + preview-auto-reveal and preview-inner-environments, include + autogenerated preview-dtxdoc.texi + + * doc/problems.texi: Moved menu here from preview-latex.texi + + * doc/readme.texi: Removed out-commented parts + +2002-03-26 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview.dtx: Minimal change to simplify autogen of texinfo manuals + +2002-03-26 Alan Shutko <ats@acm.org> + + * doc/.cvsignore: Add preview-latex.tmp. + + * .cvsignore: Add latex.out. + + * autogen.sh: Modify ed script to account for difference between + AC_INIT in 2.13 and 2.52 + + + * doc/Makefile.in (INSTALLINFO): Make it use configure value. + + * configure.in: Check for path of install-info. Check whether + Emacs supports images. + +2002-03-26 David Kastrup <David.Kastrup@t-online.de> + + * TODO (Integrate into RefTeX): bemoan another shortcoming, or + rather feature wish. + +2002-03-25 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-dvips-sentinel): Treat absence of + previews in buffer more graciously. + (preview-parse-messages): require space before !name and !offset + tags from AUC TeX. + + * prv-emacs.el (preview-auto-reveal, replace-highlight) + (preview-query-replace-reveal): moved. + + * preview.dtx (subsection{The internals}): Remove spurious space + via \vsplit. + (subsection{The internals}): Set \deadcycles to avoid TeX + interfering with our \output fake. + (subsection{Selection options}): Implement hooking into equations + differently. Somewhat ugly hack to circumvent amslatex/3425 bug. + (subsection{Preview attaching commands}): keep \showboxbreadth + and \showboxdepth operative, though set to minimal values. + (\cmd{\everypar}): Cater for ugly LaTeX commands that hide things + like the startup code of \paragraph in \everypar. + + * doc/problems.texi (x-symbol interoperation): Update Web address. + + * doc/readme.texi (Contacts): Remove personal Email address from + README. + +2002-03-24 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/install.texi: Incorporated "Prerequisites" from readme.texi + + * doc/preview-latex.texi: Moved "Getting started" to readme.texi, + also index changes + + * doc/readme.texi: Moved "Getting started" from + preview-latex.texi, moved "Prerequisites" to install.texi, Placed + appropriate pointers and crossreferences in README and other + manuals + +2002-03-24 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: Info about RedHat 7.3 beta. + + * preview.dtx (subsection{The internals}): Spacing improvements. + + * prv-emacs.el (replace-highlight): advise so that query-replace + works as reasonable. + (preview-query-replace-reveal): Option to make this customizable. + +2002-03-23 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-toggle): get rid of + isearch-open-invisible hooks and stuff; using the invisible + property was confusing to the display engine, anyhow, and was + about to be broken by changes in Emacs. The current behavior for + isearch is nicer than the default was before, so what. + (preview-auto-reveal): New customizable option. + + * doc/problems.texi (Emacs problems): Windows availability for CVS + Emacs. + + * doc/readme.texi: Windows availability for CVS Emacs. + + * preview.el (preview-parse-messages): Comment used regexps. + + * preview.dtx (subsection{The internals}): Removed an \everypar + that caused bad spacing. No idea why. Redundant anyway. + (subsection{Selection options}): changed displaymath option to + put in the \everydisplay tokens at a theoretically more correct + place. Explicitly hooked equation and equation*: AMSLaTeX calls + them too late to have them behave well. + (subsection{Preview attaching commands}): Corrected + \PreviewEnvironment which must have led to error messages for + months. Seems nobody cares. + (subsection{Selection options}): Still more displaymath cosmetics. + +2002-03-22 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (section{The Implementation}): fix typo in dvips + option. Ugh. + + * preview.el (preview-bb-filesize): move to preview-gs group. + (LaTeX-preview-setup): add bug reporter. + (preview-report-bug): update reported options. + +2002-03-22 Jan-Ake Larsson <jalar@jalar.imf.au.dk> + + * doc/preview-latex.texi (preview-environment): + doc rewrite. Slight other layout changes + +2002-03-22 David Kastrup <David.Kastrup@t-online.de> + + * doc/problems.texi: Edits. + + * doc/install.texi: Lots of editing + + * doc/readme.texi: same here + + * doc/preview-latex.texi: same here + + * RELEASE: Changes for 0.7. + + * TODO: Throw out stuff already implemented. + + * preview.el (preview-prefer-TeX-bb): Doc cosmetic. + (preview-fast-conversion): Now defaults to on. + (preview-fast-dvips-command): remove -tletter option, we do this + better now. + (preview-LaTeX-command): Pass new dvips option to preview. + + * preview.dtx (section{Package options}) + (section{The Implementation}): Add dvips option for overriding + page dimensions/landscape and such stuff. + + * preview.el (preview-TeX-bb): comment sanitized. + (preview-gs-init-string, preview-ps-file, preview-gs-dsc): new + variables. + (preview-fast-conversion): Set this customizable variable for an + impressive speedup, particularly of the DviPS pass. + (preview-dvips-command): moved. + (preview-fast-dvips-command): New command for fast conversion. + (preview-gs-restart): send initialization string to gs + (preview-gs-open): initialize preview-gs-init-string + (preview-gs-open): pass preview-fast-conversion into + preview-start-dvips + (preview-dsc-parse, preview-gs-dsc-cvx) + (preview-prepare-fast-conversion): New functions for using DSC + comments. + (preview-gs-dvips-sentinel): read DSC in. + (preview-gs-place): remember snippet in 'queued property. + (preview-mouse-open-eps): allow opening at position. + (preview-gs-flag-error): take preview-gs-init-string into + account, generate other message for fast PS conversion. + (preview-gs-transact): allow non-empty stack in prompt, use + preview-latex-do command in GhostScript. + (preview-place-preview): comment correction, no eps file if ps + generated. + (preview-analyze-error): doc change. + (preview-start-dvips): allow for fast version. + + * prv-emacs.el (preview-ps-image): Allow optional bounding box + from TeX. + +2002-03-21 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{Preview attaching commands}): Backward + compatible message with TeX bounding box. + + * preview.el (preview-parse-messages): Backward compatible + message parsing. + + * preview.dtx (subsection{The internals}, subsection{Preview + attaching commands}): provide additional bounding box info. + (subsection{The internals}): move location of \pr@shipend to + before shipping out \pr@box so that we may measure/change it. + (subsection{Selection options}): slightly changed call of old + \everydisplay hook. + (subsection{Preview attaching commands}): disable more warnings + in order to decrease possible parse errors of preview.el. + + * preview.el (preview-prefer-TeX-bb): New option to fish bounding + box from TeX output. Not enabled by default until we get to fix + a particular problem occuring with split environment nested in + equation. + (preview-TeX-bb-border): Additional slop around bounding box. + (preview-TeX-bb): New function to calculate PostScript bb from + TeX box dimensions in sp. + (preview-gs-place, preview-eps-place, preview-place-preview): + accept additional box argument. + (preview-gs-transact): consider more box sources. + (preview-delete-file, preview-make-filename): new semantics for + reference-counting files. + (preview-parse-messages, preview-analyze-error): Parse additional + bounding box information from AUC TeX run. + +2002-03-20 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el (preview-with-LaTeX-menus): Handle the case + where the current menubar is not the AuCTeX one. Remove + dead code. + +2002-03-19 Nix <nix@esperi.demon.co.uk> + + * preview.dtx: Doc fix. + + * preview.el: Require `reporter'. + * preview.el (preview-image-creators): Doc extension. + * preview.el (preview-eps-place): Doc fix. + * preview.el (preview-analyze-error): Likewise. + * preview.el (preview-gs): Grammar fix. + * preview.el (preview-face): Likewise. + * preview.el (preview-temp-dirs): Layout fix. + * preview.el (preview-environment): Grammar and layout fix. + + * preview.el (preview-mouse-open-eps): Cater for XEmacs's + more limited PostScript mode. + * preview.el (LaTeX-preview-setup): Use `preview-mark-active' to + cater for Emacs/XEmacs active-region detection differences. + + * prv-emacs.el (preview-nonready-icon): Doc fix. + * prv-emacs.el (preview-image-from-icon): Likewise. + * prv-emacs.el (preview-mark-active): New. + + * prv-xemacs.el (preview-gs-color-value): New, from prv-emacs.el. + +2002-03-19 Nix <nix@esperi.demon.co.uk> + + * prv-xemacs.el: Require overlay always, not just at compile time. + + (preview-compatibility-macros): Define only when compiling. + (preview-defmacro): Likewise. Teach Emacs to indent this form properly. + + Code to compensate for features missing in XEmacs: + + (face-attribute): Teach how to fake :foreground and :background. + + (find-image): Remove. + (defimage): Likewise. There's no need for this call here; even if there + were, the image-type analysis should take place at instantiation + time, not definition time. + + (easy-menu-create-menu): New, after the Emacs function. + (next-single-char-property-change): Likewise. + (previous-single-char-property-change): Likewise. + (with-temp-message): Likewise. + (add-to-list): Likewise, redefining the two-argument XEmacs version. + + (copy-glyph): New, uses... + (destructive-replace-glyph): ... this. New (and ugly). Uses... + (map-plist): ... this. New, `map' for property lists. + + Code derived from prv-emacs.el: + + (preview-mark-active): New, handle the special XEmacs `mark-is-nil' case. + (preview-create-icon): New. + (preview-icon): XEmacsize from commented-out code; reindent. + (preview-nonready-icon): Likewise. + + (preview-add-urgentization): Add docstring. + (preview-add-urgentization): Likewise. + + (preview-image-from-icon): New. + (preview-string-from-image): Likewise. + (preview-make-clickable): Likewise. + (preview-ps-image): Likewise. + (preview-toggle): Likewise. + (preview-inherited-face-attribute): Likewise. + (preview-with-LaTeX-menus): Likewise. + (preview-gs-get-colors): Likewise. + + (provide): Add. + +2002-03-16 David Kastrup <David.Kastrup@t-online.de> + + * doc/install.texi: Work in progress. + + * doc/readme.texi: Work in progress. + + * TODO: update wish list. This is getting longer by the minute. + + * doc/Makefile.in (INSTALL, README, PROBLEMS): add -D rawfile + option for raw text files. + + * doc/readme.texi: documentation restructuring for making README + good on preinstalled systems. + + * autogen.sh (makeinfo): add -D rawfile option for raw text files + +2002-03-15 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{Preview attaching commands}): disable + \showmaxdepth and \showmaxbreadth. + + * preview.el (preview-place-preview): (widen) paranoia. + (preview-back-command): same here. + (LaTeX-preview-setup): better safe than sorry (users might call + this wrong), so rerequire 'latex + (preview-parse-messages): New regexp parser. Nick, if the shy + groups \(?: ...\) worry XEmacs, make them non-shy and adjust the + match-... thingies appropriately. + (preview-analyze-error): and another save-restriction... + +2002-03-14 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-parse-messages): Obliterate preview-snippet + and preview-snippet-start for general parsestate. + (preview-analyze-error): Use parsestate and cache line number + info from last call. This plugs a *big* performance hog + (goto-line). Made buffer parsing here about 8 times faster. + +2002-03-13 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{The internals}): Use + \@arrayparboxrestore for better reset of spacing. + + * preview.el (require): avoid compiler warning. + (preview-goto-info-page): new function + (LaTeX-preview-setup): add preview-goto-info-page binding + (info): add preview prefix for C-h F lookup + (LaTeX-preview-setup): add documentation and customization menu. + +2002-03-11 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.6.1 + +2002-03-10 David Kastrup <David.Kastrup@t-online.de> + + * Makefile.in: Add preview.ins target. + + * doc/install.texi: Brown paper bag. + + * autogen.sh: don't prebuild doc. We offer a separate download + archive for people without texinfo. + + * preview-latex.spec (BuildRequires): changes for 0.6.1. + + * doc/install.texi: Some changes for 0.6.1. + + * RELEASE: Some adjustments for 0.6.1. + +2002-03-09 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): Use preview-with-LaTeX-menus. + + * prv-emacs.el (preview-with-LaTeX-menus): New function + temporarily making menus active. This is quite different for + XEmacs. + +2002-03-09 Nix <nix@esperi.demon.co.uk> + + * doc/preview-latex.texi: Minor typo fixes. + * doc/problems.texi: Likewise. + +2002-03-09 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): Deal with the easy-menu + sickness so that XEmacs might work. + (LaTeX-preview-setup): (require 'latex) unnecessary, we get + called only if the feature has been loaded already. + +2002-03-08 Alan Shutko <ats@acm.org> + + * configure.in: When checking for texhash, use /bin/true if we + can't find it. + +2002-03-08 David Kastrup <David.Kastrup@t-online.de> + + * doc/problems.texi (Emacs problems), doc/readme.texi: some + brighter outlook with regard to XEmacs port. + + * preview.el (preview-gs-transact): Throw in the towel. We don't + use .runandhide (and .setsafe) unless we are dealing with gs with + a version of at least 7.00. gs-6.53 seems to provide + .runandhide, while making it useless because + save .setsafe restore + does not return to unsafer mode. + +2002-03-05 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: Few changes and explanations for 0.6.1. + + * doc/problems.texi (Font problems with Dvips): Changed pounds + sign. Not much of an improvement (we get the wrong character), + but 7bit safe. If Jan-Åke finds this as desirable as to have his + own name mangled, we should follow at least make it pay off. + + * doc/preview-latex.texi (On EPS previews): png16m is default + instead of png256. + + * doc/install.texi: Document 8bit problems. + + * README.CVS: updated. + + * configure.in: update to autoconf 2.52. + + * autogen.sh: Wheedle MY_LANG and MY_LC_CTYPE in if autoconf + failed to do so. + + * preview.el: copyright extended. Basically overhaul of + persistent data, leads to: + (preview-disable): clear timestamp. + (preview-delete): Don't fiddle with ovr after it is already + deleted. + (preview-clearout): additional argument timestamp + (preview-kill-buffer-cleanup): New function for killing buffers: + properly time-stamped previews will not get their files deleted. + (kill-buffer-hook): use it + (before-revert-hook): use it + (desktop-buffer-preview-misc-data): changed dissect call, work + only if buffer unmodified. + (preview-dissect): work with timestamp, don't destroy preview. + (preview-buffer-restore): new function, works from saved data. + (desktop-buffer-preview): use it. + (preview-cleanout-tempfiles): Do things differently. + (LaTeX-preview-setup): Call preview-buffer-restore if we + accidently got here before setting up the desktop hooks. + +2002-03-04 David Kastrup <David.Kastrup@t-online.de> + + * doc/preview-latex.texi (Package options): doc changes, psfixbb + documented. + + * doc/problems.texi: doc changes. + + * doc/readme.texi: doc changes (@AUCTeX). + + * doc/install.texi: doc changes. + + * doc/preview-latex.texi: some documentation amendments. + + * preview.el (preview-dissect): improve false desktop cleanups. + (desktop-buffer-preview): handle file load oneself. + (preview-place-preview): subtle bug leading to empty previews + accumulating in secondary buffers. + (preview-reinstate-preview): don't reinstate previews where the + files have been deleted. + (preview-TeX-inline-sentinel): Make sure "Compilation" flag gets + cleared even on errors. + (preview-environment): Doc change. + (desktop-buffer-preview-misc-data, preview-dissect) + (desktop-buffer-preview, preview-cleanout-tempfiles) + (preview-active-string, preview-reinstate-preview) + (preview-default-preamble): Doc corrections/additions. + +2002-03-02 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-transact): Don't use .setsafe unless + .runandhide is defined. There might be no way back to unsafer + mode otherwise. + (preview-create-subdirectory): Be more forgiving about users + messing up the directory organization of preview-latex, by + manually deleting stuff under its control. + +2002-03-01 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-default-option-list): add new options. + + * preview.dtx: add new package option psfixbb for getting better + bounding boxes in the presence of PStricks and the like. + +2002-02-28 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-inner-environments): New variable for + avoiding ugly environments. + (preview-environment): Accept a count, and avoid bad environments. + (preview-section): Doc string fixed. + +2002-02-26 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (require): suppress desktop warnings + (preview-clearout): restrict to narrowed area. + (desktop-buffer-preview-misc-data): widen. + (preview-dissect): don't use subseq from cl-extra, rather butlast + from subr. + (preview-cleanout-tempfiles): new routine used in kill-emacs-hook + (preview-reinstate-preview): setup kill-emacs-hook late so that + preview-cleanout gets called after desktop saving + (preview-create-subdirectory): same here + +2002-02-25 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (TeX-active-tempdir): Changed the type. + (preview-gs-dvips-sentinel): adjusted for that. + (preview-gs-place): queued is now missing image + (preview-gs-transact): that is in overlay property preview-image + instead. + (preview-gs-transact): adapt to new queued + (desktop-buffer-preview-misc-data): save overlays when leaving + desktop. + (preview-dissect): gets details from overlay. + (desktop-buffer-preview): restore overlays on reentry + (kill-emacs-hook): must be run after desktop hook. + (preview-active-string): gets passed image instead of snippet. + (preview-make-filename): New TeX-active-tempdir type + (preview-delete-file): same here + (preview-place-preview): adapt to new preview-active-string + (preview-reinstate-preview): new function for restoring a preview + (preview-create-subdirectory): new TeX-active-tempdir type + +2002-02-24 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: Incorporated docs from preview.dtx, + minor other changes + +2002-02-20 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: Removed isolatin1 style include and chars + +2002-02-20 Alan Shutko <ats@acm.org> + + * configure.in: Patch from Stephen Gildea + correcting the disable-8bit-test code. + +2002-02-19 Jan-Ake Larsson <jalar@imf.au.dk> + + * Created 0.6b, which includes .info and .dvi manuals + + * doc/Makefile.in: Removed .info and .dvi from 'clean' target + +2002-02-19 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.6 + +2002-02-19 Jan-Ake Larsson <jalar@imf.au.dk> + + * Makefile.in: + Changed target 'doc' to 'docs'. 'doc' matched the (unchanged) + directory 'doc'. + + * preview-latex.el: Startup file for site-start.d + + * preview-latex.spec: + Added site-start.d support and prauctex.cfg config file + +2002-02-19 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: Oops, prauctex.cfg inadvertantly overrode a + possible "sections" option. + (subsection{The internals}): The fake \shipout had a syntax + error. Why don't people report bugs? + +2002-02-18 Alan Shutko <ats@acm.org> + + * Makefile.in (all): Split out docs target so install-hint is + still last. Ditto install. + +2002-02-18 David Kastrup <David.Kastrup@t-online.de> + + * TODO: Add a few suggestions and throw out what has already been + accomplished. + + * README-preview: Slight edits. + + * README.CVS: mention PROBLEMS as autogenerated file, add warning + about autoconf earlier than 2.13. + + * RELEASE: explain about configuration files. + + * doc/preview-latex.texi: dircategory Emacs + + * doc/Makefile.in (install): correct install target for + install-info. + + * doc/preview-latex.texi (Misplaced previews): explain about + prauctex.cfg. + + * doc/install.texi: Write @LaTeX instead of La@TeX + + * preview.el (preview-default-preamble): Shorten stuff out that + sits now in prauctex.cfg. + + * Makefile.in (all): cater for prauctex.cfg. Same for other + targets. + + * preview.dtx (section{Introduction}): Replaced TeX by \TeX and + similar cosmetics. + (section{Package options}): Added noconfig option, explained + prdefault.cfg (not yet there) and prauctex.cfg. + (subsection{Preview attaching commands}): Predefine prauctex.cfg. + (section{Various drivers}): make installer extract it. + +2002-02-18 Jan-Ake Larsson <jalar@imf.au.dk> + + * problems.texi: Simple layout fix + + * preview-latex.spec: For 0.6 proper + + * RELEASE: Mention AUC TeX RPM on project site + + * Makefile.in: Fixed 'make clean' in doc subdir, install info + files too + + * doc/Makefile.in: Typo corrected, fixed INSTALL_DATA + +2002-02-17 Alan Shutko <ats@acm.org> + + * doc/Makefile.in: New file, replacing the former ad-hoc build. + + * doc/install.texi: Mention --disable-8bit-test. + + * doc/problems.texi (LaTeX international characters): Mention + --disable-8bit-test. + + * aclocal.m4 (AC_CHECK_AUCTEX): Correct --with-auctex to + --with-tex-site. + + * configure.in: 8bit test enhancements. Allow disabling test with + --disable-8bit-test. + Check for makeinfo. + Generate doc/Makefile. + +2002-02-17 David Kastrup <David.Kastrup@t-online.de> + + * doc/install.texi: Mention problems with 8-bit-uncleanliness. + We need an override still. + + * doc/problems.texi (LaTeX international characters): Mention + that configure might barf. + +2002-02-15 Jan-Ake Larsson <jalar@imf.au.dk> + + * RELEASE: RPM info added, "for RH 7.x" + +2002-02-14 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: + For 0.6. Included code to build from CVS and temporary fix to allow + build before autoconf includes docs, included patches subdir in %doc + + * doc/Makefile: Typo corrected + +2002-02-11 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/readme.texi, doc/install.texi, doc/problems.texi, + doc/copying.texi: Include @macro defs for text-file generation + + * doc/problems.texi: Minor changes + + * doc/readme.texi: Shortened + + * doc/Makefile: Added --no-validate on README + + * doc/install.texi: Layout changes, xref to PROBLEMS shortened + + * doc/problems.texi: + Layout changes, added text on bug reports and GS EPS handling + + * doc/preview-latex.texi: Layout changes, install-info fix, index + additions, fixed direntries for preview-latex + +2002-02-11 David Kastrup <David.Kastrup@t-online.de> + + * doc/Makefile (install): install the renamed info files. + + * doc/preview-latex.texi: change output file name to + preview-latex.info in order to keep preview-latex as a directory + name for HTML output. + + * doc/Makefile (preview-latex/index.html): generate HTML with + makeinfo as texi2html does not grok @preview-latex. + + * doc/preview-latex.texi: Write Å instead of @AA (x-symbol sneaked + that in). And revert again: does not print. + + * doc/install.texi: Use @previewlatex. + + * doc/problems.texi: Use @previewlatex and @uref. + + * doc/readme.texi: Use @previewlatex. + + * doc/copying.texi: Use @previewlatex. + + * doc/preview-latex.texi (top): Introduce @previewlatex macro and + use it throughout. Some more changes. + +2002-02-09 David Kastrup <David.Kastrup@t-online.de> + + * INSTALL README PROBLEMS: removed because autogenerated + * README.CVS and autogen.sh added. + + * doc/problems.texi: Initial rendition of PROBLEMS file in + texindex form. + + * doc/copying.texi: Change Preview La@TeX{} to preview-latex + + * preview.el (preview-image-creators): Change png default device + to png16m due to popular request. + + * doc/readme.texi: overhaul for 0.6. + + * doc/preview-latex.texi: fat overhaul. + + * preview.dtx (section{The Implementation}): Simplify \pr@advise, + it broke the delayed option. + (subsection{Preview attaching commands}): Same. + +2002-02-08 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-transact): Sigh. Some refinements to the + SAFER stuff: restart gs on errors that seem to stop in SAFER mode. + (preview-gs-transact): And another few changes, there are gs + versions that have .setsafer but not .runandhide. Rats. + +2002-02-07 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{Preview attaching commands}): Use + \nofiles instead of \@fileswfalse in order to suppress erroneous + log file output. + + * preview.el (preview-gs-options): Remove -DSAFER option that + causes OutputFile selection of GhostScript to fail (starting with + 7.04). This cannot be the final fix. + (preview-gs-options): Ok, so it isn't. Restored -dSAFER and added + -dDELAYSAFER (which should be ignored by earlier GhostScript + versions). Also: + (preview-gs-transact): call .setsafe procedure if defined in + systemdict, so we don't get unsafer in GhostScript 7.04. + +2002-02-06 Jan-Ake Larsson <jalar@imf.au.dk> + + * readme.texi: Index and layout changes + +2002-02-05 Jan-Ake Larsson <jalar@imf.au.dk> + + * copying.texi: Less zealous index + + * readme.texi: Typo corrected + + * preview-latex.texi: Document preview-default-preamble, bumped + release number, typos corrected. + + * doc/Makefile: Simpler index generation + +2002-02-04 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.texi: Simplify to only one section for keys and + lisp function sections. Also only one Index. + +2002-02-01 David Kastrup <David.Kastrup@t-online.de> + + * PROBLEMS: Tell about x-symbol 4.0h/beta working successfully + with preview-latex. + +2002-02-01 Alan Shutko <ats@acm.org> + + * configure.in: Corrected error message for 8-bit test. + +2002-01-30 Alan Shutko <ats@acm.org> + + * configure.in: Added diversion at the beginning to allow us to + save LANG and LC_CTYPE for the 8-bit test. Also added test to see + if LaTeX is 8-bt clean. + +2002-01-24 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.spec: Initial version. On the 0.5.8.2 release. + +2002-01-22 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (LaTeX-preview-setup): quote created directory name + in %m fields. + +2002-01-18 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{The internals}): Try catering for output + routine changes. + +2002-01-18 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview.el (preview-make-preamble): Simplified the code by sorting + TeX-expand-list better. + +2002-01-18 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: Document a few changes. + + * doc/preview-latex.texi: document preview-at-point + + * preview.el (preview-next-border): Doc change. + (preview-at-point): renamed from preview-dwim. + (LaTeX-preview-setup): use preview-at-point. + (LaTeX-preview-setup): menu change. + (preview-document-pt): Use TeX-style-list instead of + TeX-active-styles so that AucTeX may parse if not yet done. + (before-revert-hook): clearout previews on revert. + +2002-01-17 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview.el (preview-default-preamble): Added default preamble + for use when a document not configured for preview-latex is + previewed in AUC TeX. + + * preview-latex.texi (section Misplaced previews): Info on \emph + and \PreviewMacro*. + +2001-12-05 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.texi: Added new section: User-level lisp functions + + * install.texi: Layout improvements + + * doc/Makefile: Typo and dependencies corrected + +2001-12-04 Jan-Ake Larsson <jalar@imf.au.dk> + + * doc/Makefile: Added index generation for DVI docs + +2001-12-03 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.texi: + Keymap documentation and general text on emacs interface added + + * readme.texi, install.texi: Layout changes + +2001-12-03 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-clearout): add optional argument keep-dir. + (preview-place-preview): Don't clearout previews from current + run. This makes preview-latex keep multiple previews in command + arguments instead of just keeping the last such one. + +2001-11-30 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (section{Provided Commands}): Add descriptions of + new commands \PreviewMacro* and \PreviewEnvironment*. + (subsection{The internals}): New internal \pr@protect. + (subsection{Preview attaching commands}): Implement the new + `*'-forms. + (subsection{Preview attaching commands}): + Also treat \end{env} in \PreviewEnvironment*. + +2001-11-30 Jan-Ake Larsson <jalar@imf.au.dk> + + * preview-latex.texi, install.texi: + Autoload the package rather than require it. + +2001-11-30 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-register-change): widen before getting + substring in order to avoid error when narrowed. + (preview-check-changes): Same here. + (preview-handle-insert-in-front): Changed DOC string. + (preview-handle-insert-behind): same. + (preview-handle-modification): same. + +2001-11-29 Jan-Åke Larsson <jalar@imf.au.dk> + + * doc/preview-latex.texi: Created first draft + + * doc/readme.texi: Created first draft + + * doc/readme.texi: Created first draft + + * doc/copying.texi: Created + + * doc/Makefile: Created layout. Now for autoconf, Alan? + +2001-11-28 Alan Shutko <ats@acm.org> + + * INSTALL (--with-tex-site): Rename --with-auctex. + + * aclocal.m4 (AC_CHECK_AUCTEX): Try to fix things so that it looks + for tex-site, only tex-site, and adds the location of tex-site + into the load-path. + (AC_CHECK_REQUIRE): New. + (AC_CHECK_AUCTEX): Change name of --with-auctex to --with-tex-site. + +2001-11-12 Alan Shutko <ats@acm.org> + + * Makefile.in (lispdir): Remove /preview because @lispdir@ now + includes it. + + * aclocal.m4 (AC_PATH_LISPDIR): Modify it so it prints out + that lisp files are going in $lispdir/preview. + +2001-11-20 David Kastrup <David.Kastrup@t-online.de> + + * README-preview: adjust instructions because preview.ins will be + available on CTAN already. + + * prv-emacs.el (preview-make-clickable): consult + `preview-button-1' and `preview-button-2' at run-time. + (preview-overlay): Need insert-behind-hooks too in case someone + uses `insert-before-markers' at end of previews. + (preview-change-list): New variable. + (preview-register-change): New function. + (preview-check-changes): New function. All of this stuff is to + make sure we open/disable overlays only if permanent changes occur + inside. + (preview-handle-insert-in-front): some changes for new behaviour. + (preview-handle-insert-behind): New function. + (preview-move-point): Call `preview-check-changes' after commands. + (preview-gs-color-value): checkdoc-compatible comment. + + * preview.el: Change installation comments + +2001-11-15 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (section{Provided Commands}): Correct documentation + names for \PreviewEnvironment and \PreviewSnarfEnvironment + + * prv-emacs.el (preview-inherited-face-attribute): Add document + string, simplify some tests. + + * preview.el: Add autoload magic comments. + (preview-compatibility-macros): avoid byte compiler warning. + +2001-11-13 David Kastrup <David.Kastrup@t-online.de> + + * PROBLEMS: Add patch for mouse-drag.el + + * INSTALL: add autoload instructions for fastest Emacs startup. + +2001-11-12 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs-restart): Use push. + (preview-clearout-buffer): New function. Use in kill-buffer-hook. + (kill-emacs-hook): add cleanout of temp directories when leaving + Emacs. + (preview-make-options): cosmetics + (LaTeX-preview-setup): add keybindings for clearing buffer + (preview-clean-subdir): cosmetic changes. + (preview-clean-topdir): new function. + (preview-create-subdirectory): use it. + (preview-report-bug): report preview-dvips-command. + +2001-11-11 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.5.8.2 + +2001-11-11 Alan Shutko <ats@acm.org> + + * aclocal.m4 (AC_EMACS_CHECK_LIB_WITH_LIB): varient of + AC_EMACS_CHECK_LIB which first requires a prereq lib. + (AC_CHECK_AUCTEX): Use AC_EMACS_CHECK_LIB_WITH_LIB to prereq + tex-site. + + * Makefile.in (use-hint): Get line wrapping right. + + * configure.in (--with-texmf): Applied patch from Hans Fredrik + Nordhaug making --with-texmf obey TDS. + +2001-11-11 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-transparent-border): Change definition to + numeric/nil, set default to 3pt. + (preview-create-icon): adapt heuristic-mask accordingly + (preview-ps-image): same here + (preview-gs-get-colors): use new definition of + preview-transparent-border, use PostScript code not subject to + anti-aliasing effects. + (preview-transparent-border): Change default to take into + account that we previously got only half of requested width. + (preview-gs-get-colors): generate only necessary tokens. Disable + stroke adjustment in order to get more even borders. + +2001-11-10 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{The internals}): Make reassignment of + \@tempboxa that lead to missing section headers local. + Interesting bug. + +2001-11-09 David Kastrup <David.Kastrup@t-online.de> + + * RELEASE: initial stab at release notes. + + * preview.el (preview-back-command): Make token backer somewhat + more robust. + (preview-analyze-error): Don't bomb out if no token matches. + + * README-preview: first draft. + + * prv-emacs.el (preview-int-bb): moved from preview.el + + * preview.el (preview-preserve-indentation): New option, on per + default. Switch off for old behaviour. + (preview-extract-bb): heed preview-preserve-indentation by faking + the bounding box left. + (preview-int-bb): move to prv-emacs.el + + * preview.dtx (subsection{The internals}): Try killing off indents + in order to get good horizontal positioning of preview. + + * preview.el (preview-start-dvips): fix bug WRT free variable + `buffer'. + + * prv-emacs.el (preview-transparent-color): change default for a + new default transparency scheme. + (preview-get-heuristic-mask): bug fix for specified color + (preview-create-icon): adjust for new policy + (preview-ps-image): same here + (preview-transparent-border): new option + (preview-gs-get-colors): heed this + +2001-11-08 David Kastrup <David.Kastrup@t-online.de> + + * PROBLEMS: Recommend customizing new variable + preview-dvips-command for DviPS problems. + Add sections about Windows and XEmacs. + Add section about LaTeX/language environment problem. + Add section about flyspell.el including patch. + +2001-11-07 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-gs): and other groups: set :prefix in + defgroup + (preview-get-geometry): Oops, make it work if + preview-scale-function is a constant instead of a function. + +2001-11-06 Alan Shutko <ats@acm.org> + + * aclocal.m4 (AC_CHECK_AUCTEX): Revert the previous change, since + it was horribly broken, and fix --with-auctex, so that it doesn't + do the check if --with-auctex was specified. + +2001-11-06 Alan Shutko <ats@acm.org> + + * aclocal.m4 (AC_CHECK_AUCTEX): Try looking for tex-site instead + of tex-buf... this may help since we're sure it's in load-path, + but I'm afraid that the contents of tex-site may not be standard + enough across installations. + + +2001-11-06 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-image-creators): Add preview-eps-open + function for calling dvips conversion. + (preview-eps-open): Resume half-hearted support of postscript + image type. Does anybody use this, after all? If so, let him + run DviPS in background if he so desires... + + * preview.dtx (subsection{The internals}): add \leavevmode to make + things like \paragraph flush their \everypar tokens. Perhaps not + the right thing to do, let's wait for error reports about that + one. + + * preview.el: require 'tex-site when compiling + (preview-gs-file): new local variable + (preview-gs-sentinel): cater for "Compilation" flag in mode-line + (preview-gs-restart): changes in process setup + (preview-gs-close): Same here + (preview-gs-open): Same here + (preview-gs-dvips-sentinel): New function + (preview-gs-place): postpone Bounding Box extraction. + (preview-gs-flag-error): cosmetic changes + (preview-gs-transact): extract bounding box + (preview-LaTeX-command): Remove dvips call from command + (preview-dvips-command): New option for dvips call + (preview-parse-messages): add message while parsing + (preview-parse-messages): remove call to open, this calls parsing + instead. + (preview-start-dvips): New function. + (preview-TeX-inline-sentinel): Changed to new process model + Note: this breaks 'postscript image support. To be fixed. + +2001-11-03 Alan Shutko <ats@acm.org> + + * aclocal.m4 + (AC_CHECK_PROG_REQUIRED,AC_CHECK_PROGS_REQUIRED,AC_PATH_PROG_REQUIRED): + New functions to check programs, and abort with a message if not + found. + (AC_EMACS_CHECK_LIB): Function stolen from Gnus to check whether + an elisp library exists. + (AC_CHECK_AUCTEX): Check if AUC-TeX is in a normal emacs load + path, and allow --with-auctex switch to specify it. SF Bug + #477262, #477260. + + * Makefile.in (use-hint, install-hint): New hints. SF Bug #477282. + (all, install): Use the above hints. + + * configure.in: Changed all AC_CHECK_PROG(S)/AC_PATH_PROG(S) to + new AC_*_REQUIRED, which abort and print a message if something + isn't found. Added AC_CHECK_AUCTEX. Add note at end of configure + to run "make". SF Bug #469741 (partial). + + Removed --with-auctex since that's now done in AC_CHECK_AUCTEX. + +2001-10-30 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el (preview-make-clickable): Use 'keymap instead of + 'local-map, obliterating the need to inherit from LaTeX-mode-map. + (preview-toggle): Same here, and cater for null-length overlays. + (preview-mark-point): Jury's still out on that one. + + * preview.el (preview-gs-sentinel): Don't hickup if buffer got + killed. + (preview-gs-restart): Don't mind exiting Emacs if GhostScript + still running. + (preview-snippet): Buffer-locality not needed because parsing + occurs fully blocking. + (preview-snippet-start): Same + (preview-analyze-error): Somewhat saner behaviour if the error + message parsing fails due to macro arguments or other. This + cannot be the final verdict. + + * TODO: add a few items. + + * prv-emacs.el (preview-transparent-color): Make transparency + customizable. Note that due to a bug everything except "None" is + treated the same as "Autodetect" in 21.1. Fixed in CVS. + (preview-get-heuristic-mask): Function for calculating mask to use + from above. + (preview-create-icon): use preview-get-heuristic-mask + (preview-ps-image): same. + (preview-mark-point): move point out of previews before starting + next command for consistent implementation of intangibility. Not + sure whether this is actually a good idea, though. + (preview-inherited-face-attribute): New function + (preview-gs-get-colors): New function, replaces preview-get-colors + + * preview.el (preview-gs): New customization group hierarchy + (preview-appearance): same + (preview-latex): same + (preview-gs-colors): change string to single tokens. + (preview-gs-transact): construct string from same + (preview-scale-from-face): consult preview-reference-face instead + of default. Use new function preview-inherited-face-attribute for + this. + (preview-face): add different colours for dark backgrounds. + change default background to beige, probably less likely to match + users default background. + (preview-error-face): change preview-error-face for non-color terms. + (preview-reference-face): used for size and color determination of + previews. + (preview-TeX-inline-sentinel): tell user while we are parsing + +2001-10-27 David Kastrup <David.Kastrup@t-online.de> + + * PROBLEMS: revert AucTeX patch to that before we tried our luck + with intangibility. Some changes in formatting. Add comment + about -Pwww font problems. + +2001-10-26 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.5.8.1 + + * preview.el (preview-mouse-open-eps): fix a typo in help + message. + (preview-analyze-error): Remove traces of inhibit-point-motion + madness. If search for (concat string after-string) fails, try + again just with string in order to support uses of Auc-TeX's + original interface. + + * prv-emacs.el (preview-toggle): Don't reactivate disabled + overlays (could happen in isearches ended by an editing operation). + (preview-move-point): While we are simulating point-adjustment, + heed disable-point-adjustment in order to make isearch (and + probably other utilities) Do The Right Thing (TM). Works + beatifully. + + * preview.el (preview-LaTeX-command): new customization variable. + (LaTeX-preview-setup): use it. + +2001-10-25 David Kastrup <David.Kastrup@t-online.de> + + * We now cater for people with non-black-on-white setup. + + * prv-emacs.el (preview-get-colors): gets colors from default + font. + + * preview.el (preview-gs-colors): new variable for GhostScript + color setup string. + (preview-gs-transact): pass color setup. + (preview-get-geometry): pass color setup + + * prv-emacs.el (preview-ps-image): Don't expect white background + in heuristic-mask. + + * preview.el (preview-next-border): Can't get everything right + first try now, can I? + + * prv-emacs.el: replace preview-intangible by preview-state. + (preview-handle-insert-in-front): Same here. + (preview-toggle): Same here. + (preview-toggle): Let preview-toggle handle setting of category. + That way category is not set/used outside of prv-emacs.el. + (preview-move-point): replace preview-intangible by + preview-state. + + * preview.el (preview-dwim): replaces preview-again. + Excruciatingly useful function bound to C-c C-p C-p. Will do just + what you want whenever you call it. + (preview-next-border): Helper-function for that + (preview-disable): set property 'preview-state + (preview-clearout): use 'preview-state instead of 'category + (preview-place-preview): same here. + (LaTeX-preview-setup): use preview-dwim in keyboard bindings + +2001-10-23 David Kastrup <David.Kastrup@t-online.de> + + * Release 0.5.8 + + * PROBLEMS (AucTeX): remove patch for intangibility problem. + + * preview.el (preview-regenerate): use preview-region + (preview-region): New user function. + (preview-environment): New user function. + (preview-section): New user function. + (preview-again): New user function. + (LaTeX-preview-setup): Add menus and keyboard shortcuts for new + user functions. + (preview-version): Don't recalculate version in compiled form. + + * prv-emacs.el: inherit from LaTeX-mode-map in order to have + normal commands work when cursor is on preview. + (preview-make-clickable): same. + (preview-overlay): don't make intangible, but preview-intangible. + In short, we now fake intangibility until Emacs will keep the + cursor out of overlay images like it does out of text property + images. + (preview-handle-insert-in-front): Same here. + (preview-toggle): Same here. Load pre-command-hook and + post-command-hook for fake intangibility. + (preview-marker): Added for fake intangibility. + (preview-mark-point): pre-command-hook function for fake + intangibility. + (preview-move-point): post-command-hook function for fakr + intangibility. + +2001-10-22 David Kastrup <David.Kastrup@t-online.de> + + * README: Change info for Emacs release 21.1 + + * PROBLEMS: Change info for Emacs release 21.1 + + * INSTALL: Change info for Emacs release 21.1 + +2001-10-19 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{The internals}): Heed \AtBeginDvi + sequences. Small doc/formatting changes. + +2001-10-17 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: Get the version headers right (hopefully). + +2001-10-16 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: Make a stab at an automated version header + (subsection{Preview attaching commands}): Move the badness stuff + to the auctex option. + +2001-10-15 David Kastrup <David.Kastrup@t-online.de> + + * prv-emacs.el: insert-in-front back. Discovered all-saving + undo-in-progress. + (preview-handle-insert-in-front): pseudo-advance if not in undo + while iconized. + (preview-handle-modification): fitting behaviour for that. commit + suicide on changes that leave the range empty, disable else. + + * preview.el (preview-place-preview): overlays get auto-advancing + front. + (preview-analyze-error): intangible. inhibit-point-motion-hooks. + what a mess. Made parsing saner in the presence of such stuff. + (preview-place-preview): overlays get non-auto-advancing front + back again, since we rather pseudo-advance in + preview-handle-insert-in-front. + + * prv-emacs.el: don't handle insert-in-front: impossible to do + consistently. Instead make beginning ofg overlays auto-advance + always. + (preview-handle-insert-in-front): removed + (preview-handle-modification): removed insert-in-front-hooks + +2001-10-13 David Kastrup <David.Kastrup@t-online.de> + + * prv-xemacs.el: This is completely and utterly broken and + incomplete. The recent changes from Simon have not yet been + incorporated, some of the stuff still has old semantics and so + forth and so on. One needs to go through prv-emacs.el and make + sure that everything in there has an equivalent here. + + * prv-emacs.el: See preview.el. + + * preview.el: This is the big one. Changes too numerous to + mention. Lots of modularization for making XEmacs support + possible. Changed semantics, the works. See PROBLEMS file for + new AucTeX compatibility annoyances. + + * PROBLEMS (AucTeX versions from 11.01 up to version 11.05): Patch + added. Patch for earlier versions revised. + +2001-10-12 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{Preview attaching commands}): set + \hbadness and \vbadness to infinity in order to avoid + parse-unfriendly error messages. Would one want to see overfull + hbox rules in preview output? + +2001-10-12 Alan Shutko <ats@acm.org> + + * Makefile.in (LISP_OBJS): New var. + ($(LISP_OBJS)): Got rid of elc target and used dependencies, so we + don't recompile every make. + +2001-10-12 David Kastrup <David.Kastrup@t-online.de> + + * configure.in: Try fixing the emacs flavor detection. + And revert back to Alan's version. + +2001-10-12 Alan Shutko <ats@acm.org> + + * configure.in: Change AC_PATH_PROG of emacs to AC_CHECK_PROG, as + it was breaking --with-xemacs. + +2001-10-12 David Kastrup <David.Kastrup@t-online.de> + + * Makefile.in: Switch order of LISP_SOURCES in order to avoid + compiling preview.el with older versions of prv-emacs.elc or + prv-xemacs.elc + +2001-10-11 Alan Shutko <ats@acm.org> + + * Makefile.in (ELCC): Bug 469742: Include . in load path. + + * configure.in: Added --with-xemacs option. Added AC_XEMACS_P to + determine if we're using xemacs. Added PLAT_LISP substitution + with the flavor-specific lisp file. + + * Makefile.in (LISP_SOURCES): New variable, listing files needing + byte-compilation. + (all): Depend on "elc" target to capture all the emacs files. + (install-el): Install more lisp files. + (elc): New target, compile all relevant files. + +2001-10-11 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{The internals}): Introduce count + \pr@snippet so as not to get confused by \include. + (subsection{Preview attaching commands}): Make auctex option use + this counter. + +2001-10-10 David Kastrup <David.Kastrup@t-online.de> + + * circ.tex: Demonstrate new `sections' option. + + * preview.el (preview-default-option-list): Cater for new + `sections' option to preview.sty. + + * preview.dtx (section{Provided Commands}): New argument syntax as + in \PreviewMacro[{*[][]{}}]{\includegraphics}. + (subsection{Parsing commands}): introduce \pr@endparse and support + new syntax. + (subsection{Preview attaching commands}): same here. + (section{Package options}): explain new `sections' option. + (subsection{Selection options}): implement `sections' option. + +2001-10-09 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-mouse-open-error): Don't have multiple + "*Preview-GhostScript-Error*" buffers gather, reuse single one. + (LaTeX-preview-setup): Enter us into "Command" menu. + +2001-10-08 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx (subsection{Preview attaching commands}): Change + output routine to flush out floats. + Correct \CheckSum. + + * preview.el: Use `error' identifier only where really needed. + (preview-gs-behead-outstanding): see above. + (preview-gs-sentinel): see above. + (preview-gs-flag-error): see above. + Still require (defvar error) because of Auc-TeX + (TeX-active-tempdir): Move definition. + (preview-gs-place, preview-eps-place) + (preview-active-string, preview-make-filename) + (preview-place-preview, preview-parse-messages) + (preview-analyze-error): remove `tempdir' argument + (preview-get-geometry): some change in semantics + (preview-TeX-inline-sentinel): call `preview-parse-messages' with + process buffer active instead of source. + (TeX-inline-preview): adapt to changed `preview-get-geometry' + +2001-10-07 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-get-geometry): comment clarification to + satisfy checkdoc. + (preview-version): added. + (preview-report-bug): use `preview-version' instead of current + ugliness. + + * .cvsignore (Module): Add a few more entries. + + * preview.el: Don't defvar AucTeX internal TeX-auto-file, make + auto-size detection of previews from parsed styles work. + (preview-document-pt): Use `TeX-active-styles' instead of bad AucTeX + internal `TeX-auto-file'. + (preview-get-geometry): Different arguments and semantics. Make + it work. + (TeX-inline-preview): Call changed `preview-get-geometry'. + + * prv-xemacs.el: add macros line-beginning-position and + line-end-position. + + * preview.el: Change manner of loading prv-xemacs + (preview-analyze-error): Use line-end-position again. + +2001-10-05 David Kastrup <David.Kastrup@t-online.de> + + * preview.dtx: Include \ProvidesPackage and \CheckSum + (subsection{Preview attaching commands}): put \unskip in + \end{preview} where it will make a difference. + (section{Various drivers}): \askforoverwritefalse only generated + for make-intended installer. + + * prv-xemacs.el: require overlay + preview-compatibility-macros added + (find-image): some changes of compilation + (defimage): define using preview-defmacro + (make-temp-file): ignore temporary-filename: not needed in here. + +2001-10-04 David Kastrup <David.Kastrup@t-online.de> + + * preview.el: first stab at XEmacs compatibility. + + * prv-xemacs.el: first stab at XEmacs compatibility. + + * circ.tex (section{Die gerade Linie}): built in two deliberate + bugs for testing. + + * preview.el (preview-gs-behead-outstanding): use + `preview-gs-flag-error'. + (preview-mouse-open-error, preview-mouse-open-eps): factored out + stuff from `preview-gs-flag-error'. + (preview-gs-flag-error): replaces `preview-gs-error-string' + (preview-gs-transact): Use `preview-gs-flag-error'. + + * PROBLEMS: be more specific about GhostScript errors + +2001-10-03 David Kastrup <David.Kastrup@t-online.de> + + * preview.el (preview-delete-file): remove dont-register + (preview-make-filename): remove dont-register + (preview-regenerate): switch to clicked buffer if not there. + (preview-gs-error-string): try to avoid strange behaviour from + having `let' restore potential buffer-local-variables to the wrong + buffer. Make some functions (interactive "@"). + +2001-10-02 David Kastrup <dakas@users.sourceforge.net> + + * release 0.5 + + * PROBLEMS: Completed summary of patches and made an outline-mode file. + + * INSTALL: + Gearing up for a release. Last modifications and clarifications. + + * preview.el: + Lots of cleanups for getting to release quality. Made good error + reporting with things masquerading as actual GhostScript sessions, + including command line, prompt, messages, the works. + + Removed preview-gs-urgent which actually has never been anything + but the front of preview-gs-queue. + + * TODO: Some more wishes. + + * preview.el: Make active error display. + + * preview.el: + Changed the process line appearance somewhat, added a bit of + robustness when error line parsing fails, beautified appearance of + opened previews (icon gets its own line only when previewed area + starts on a line). + +2001-10-01 David Kastrup <dakas@users.sourceforge.net> + + * TODO: Added a few items. + + * README: Added CVS instructions and a few other odds and ends. + + * bootstrap.ins: Remove docstrip configuration related messages. + + * INSTALL: Some more massaging. + + * PROBLEMS: Initial checkin, preparation for first tarball release. + + * ChangeLog: Initial entry of ChangeLog. + +2001-10-01 alanshutko <alanshutko@users.sourceforge.net> + + * aclocal.m4: Instead of /dev/null, throw stuff to FD 5, where it + might do some good. + +2001-09-30 David Kastrup <dakas@users.sourceforge.net> + + * README: Mentioned M-x preview-report-bug. + + * README: Removed redundancies with INSTALL, cleared some stuff up. + + * preview.el: + Obliterated transaction queues. They did not help that much, and are + not implemented in earlier versions of XEmacs. More trouble than they + were worth, anyway. + + * preview.el: Define a few more image types. + +2001-09-29 David Kastrup <dakas@users.sourceforge.net> + + * INSTALL: Some general information and stuff. + + * Makefile.in: + Use latex '\nonstopmode \input ...' instead of -interaction + nonstopmode + + Fixed string comparison in Emacs. + + * aclocal.m4: + Remove trailing slashes after path discovery, do some more things with + sed instead of various other utilities. One change in calling LaTeX + to make it work with older or non-web2c binaries. + + * preview.dtx: + Support those misguided people using $$ in their LaTeX documents. I + am not sure this is a good idea, but it will probably save us bug + reports. + + * TODO: Removed a few done points. + + * preview.el: + Made parsing good. Now the entire TeX error context gets used. In + most cases, regenerating previews should work now, as well as region + previewing. + +2001-09-28 alanshutko <alanshutko@users.sourceforge.net> + + * INSTALL: New file + +2001-09-27 alanshutko <alanshutko@users.sourceforge.net> + + * Makefile.in (preview.elc): Patch from Simon Josefsson to fix + build with non-standard AUCTeX location. + +2001-09-27 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Made error and abort messages appear in the faulty images. Reworked + file handling somewhat so that in the case of errors all involved + files can stay until the image overlay gets deleted. + + * preview.el: + Added bug reporting instructions and helper function for reports + to preview-latex-bugs@lists.sourceforge.net. + +2001-09-26 alanshutko <alanshutko@users.sourceforge.net> + + * Makefile.in: (install-texmf) Install the dvi file + + * Makefile.in, aclocal.m4, configure.in: + * aclocal.m4: Removed some dross stolen from Gnus, since it is unused. + Fixed up AC_PATH_TEXMFDIR to try to find a dir to install the docs + and to export texmfdir. + + * configure.in: --with-auctex=DIR, new option + + * Makefile.in: Changed rules for byte-compilation to allow setting + AUCTEXDIR. + (install-texmf) Only texhash the directory we installed into + +2001-09-26 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Oodles of documentation and a much faster bounding box extractor + not relying on grep. Some small internal changes. + + * preview.el: + Background rendering now working without errors, even with crummy + default tq.el as currently shipped with Emacs (and XEmacs?). + +2001-09-25 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Some initial stab at trying to make do without tq.el. Figured out a + way to make do with tq's ugly semantics, however. Just keep this + somewhere. Only half done. + +2001-09-24 alanshutko <alanshutko@users.sourceforge.net> + + * Makefile.in: + Makefile.in: clean and distclean targets from Simon Josefsson <jas@extundo.com> + +2001-09-24 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Sanitized temporary file handling by introducing a reference count + scheme. Temporary directories should now get deleted as they become + empty. We still do a general cleanup (in case a previous EMacs + session crashed) on first accessing any preview subdirectory, which + means bad luck when you are starting multiple instances of Emacs for + previewing purposes. + +2001-09-24 alanshutko <alanshutko@users.sourceforge.net> + + * Makefile.in, configure.in: + Run texhash after tex installation. Also set full + pathnames for programs, since the path of the installing user may + not match the compiling user. + + * Makefile.in, aclocal.m4: First cut at previewdocdir + +2001-09-24 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + PNG rendering now basically works and is the default. Errors during + transaction queue processing insert their messages into the TeX + background buffer; so do unexpected GhostScript messages. Good for + debugging. + +2001-09-22 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Forgot entering into queue and a condition. Still does not work with png. + + * preview.dtx: Fixed \begin{table} bug. + + * preview.el: Several changes from several people. + + The big one: support of other image formats. PNG. Unfortunately, not + yet functional. Checked in nevertheless since the old postscript + rendering is on by default and seems to work still. + + * preview.dtx: Forgotten macrocode, empty line. + +2001-09-21 alanshutko <alanshutko@users.sourceforge.net> + + * Makefile.in, aclocal.m4, configure.in: + 2001-09-21 Alan Shutko <ats@acm.org> + + * aclocal.m4: Correct handling of docstrip configuration for + non-TDS setup. Also, quote the $ in awk. + + * Makefile.in (TEX): New variable. + (all): preview-mk.ins instead of preview.ins + (preview-mk.ins, preview.sty prauctex.def preview.drv): Use $TEX. + + * configure.in: Added --with-preview-dir option. Check for tex + executable. + + * configure.in: Clarified --with-texmf help. + + * README: Updated build directions for autoconf build. + + * .cvsignore, Makefile, Makefile.in, aclocal.m4, configure.in, install-sh: + Makefile.in, aclocal.m4, configure.in: Create autoconf versions of + Makefile. Much of aclocal.m4 was stolen from Gnus, though the + AC_PATH_TEXMF is new. + + Added install-sh for use by the makefile if a compatible install + binary is not found. + +2001-09-20 David Kastrup <dakas@users.sourceforge.net> + + * Makefile: First sketch at installation via make instead of docstrip. + + * bootstrap.ins: No error if no docstrip.cfg. + + * bootstrap.ins: + First sketch at bootstrap install file for extracting main installer + and giving directory info. + + * preview.dtx: Added missing macrocode environment (David Love). + Leave directory off installer when installing via make. + +2001-09-19 David Kastrup <dakas@users.sourceforge.net> + + * README: Checked in antialiasing suggestions from Alan Shutko. + +2001-09-16 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: Still learning about customize-variable... + +2001-09-15 David Kastrup <dakas@users.sourceforge.net> + + * preview.el: + Parse HiRes Bounding Boxes, remove accidental paste of definition of + shell-command-to-string, add support for graphical preview of files + not prepared for it. + + * preview.dtx: Another spurious space. + + * preview.dtx: + AucTeX option delays \nonstopmode. Spurious space in \pr@endbox removed. + + * README: Add instructions for anti-aliasing. + + * preview.dtx, README: Corrected Email address. + +2001-09-14 David Kastrup <dakas@users.sourceforge.net> + + * README: Added some more descriptive stuff and my Email address. + + * preview.el: Added intelligent determination of EPS scale. + Changed Bounding Box determination to use a HiResBoundingBox if + present, and work without a shell. + Added some customization. + +2001-09-13 David Kastrup <dakas@users.sourceforge.net> + + * .cvsignore: Ignore generated files. + + * preview.dtx: + Deleted no longer applicable comment. Fixed bug in connection with \item. + + * COPYING: Copy of GPL version 2 included. + + * README: Typo. + + * README: Clarified comment about how to improve EPS support in Emacs. + + * README: Removed link to pretest Emacs on request from Gerd Möllmann. + +2001-09-12 David Kastrup <dakas@users.sourceforge.net> + + * circ.tex: New file. + + * circ.tex: This is the initial checkin of preview-latex. Enjoy. + + * Makefile, README, TODO, preview.dtx: New file. + + * Makefile, README, TODO, preview.dtx: + This is the initial checkin of preview-latex. Enjoy. + + * preview.el: New file. + + * preview.el: This is the initial checkin of preview-latex. Enjoy. + diff --git a/elpa/auctex-13.1.3/ChangeLog.1 b/elpa/auctex-13.1.3/ChangeLog.1 new file mode 100644 index 0000000..3be0398 --- /dev/null +++ b/elpa/auctex-13.1.3/ChangeLog.1 @@ -0,0 +1,28132 @@ +2022-02-20 Mosè Giordano <mose@gnu.org> + + * Version 13.1 released. + +2022-02-17 Arash Esbati <arash@gnu.org> + + Update style/ltxdoc.el to class version 2.1d + + * style/ltxdoc.el ("ltxdoc"): Add '|' to `LaTeX-shortvrb-chars' + before running the 'shortvrb' style hook. Add missing symbols to + the style hook incl. fontification. + (LaTeX-ltxdoc-class-options): New variable. + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add one entry "cs". + +2022-02-15 Arash Esbati <arash@gnu.org> + + Update footmisc package options to v6.0b + + * style/footmisc.el (LaTeX-footmisc-package-options): Delete + "bottomfootnotes". + +2022-02-13 Arash Esbati <arash@gnu.org> + + Update footmisc package options to v6.0a + + * style/footmisc.el (LaTeX-footmisc-package-options): Add new + package options. + +2022-02-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Add NEWS item + + * doc/changes.texi: Announce changes in + `LaTeX-indent-environment-list'. + +2022-02-11 Arash Esbati <arash@gnu.org> + + Consider environments defined with newfloat package + + * style/subcaption.el ("subcaption"): Offer environments defined + with newfloat package when declaring the sub-caption feature. + +2022-02-11 Arash Esbati <arash@gnu.org> + + Improve fontification for LaTeX kernel macros + + * font-latex.el (font-latex-built-in-keyword-classes): Add + fontification support for LaTeX kernel macros to various keyword + classes. + + * tests/latex/font-latex-test.el + (font-latex-general-fontification): Update test for fontification. + +2022-02-09 Arash Esbati <arash@gnu.org> + + Adjust entries for completion + + (TeX-arg-corner, TeX-arg-lr): Remove empty strings and unlistify + the elements in collection argument of `completing-read'. + +2022-02-09 Arash Esbati <arash@gnu.org> + + Improve query for opt. arguments of \parbox and minipage + + * latex.el (LaTeX-env-minipage): Support query for all optional + arguments of minipage environment. Don't use INITIAL-VALUE + argument when reading the width with `TeX-read-string', use + DEFAULT-VALUE instead and indicate the value in the prompt. + (TeX-arg-tb): Add new argument POSLIST which can be used to offer + more sides for completion. + (LaTeX-common-initialization): Use new arguments of `TeX-arg-tb' + for the "parbox" entry. + +2022-02-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Add default entries to LaTeX-indent-environment-list (bug#28405) + + My previous commits disregard user's customization on + LaTeX-indent-environment-list. Reconsideration led to move entries to + its default value. + + * style/amsmath.el ("amsmath"): + * style/mathtools.el ("mathtools"): + Move entries into default value in latex.el. + * latex.el (LaTeX-indent-environment-list): Pull in those entries. + Add math envs without alignment as well to fix bug#28405. + +2022-01-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Add M-RET support for smallmatrix variants + + * style/mathtools.el ("mathtools"): Add smallmatrix variant + environments to `LaTeX-item-list'. + +2022-01-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Add new test for indent + + * tests/latex/latex-test.el (LaTeX-indent-tabular): Add cookie to + recognize \usepackage. + * tests/latex/tabular-in.tex: + * tests/latex/tabular-out.tex: + Add \usepackage to deal with align and aligned environments. + Add new test involving aligned environment. + +2022-01-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Add support for indent for environments with alignment + + * latex.el (LaTeX-indent-environment-list): Move align, align* and + equation* environment to amsmath.el. + * style/amsmath.el ("amsmath"): Add amsmath environments with + alignment to local value of `LaTeX-indent-environment-list'. + Add smallmatrix environment to `LaTeX-item-list'. + * style/mathtools.el ("mathtools"): Add mathtools environments with + alignment to local value of `LaTeX-indent-environment-list'. + Add FIXME comment to `LaTeX-item-list' for spreadlines environment. + Update copyright year. + + TODO: Add support for empheq environment as well. It would be + necessary to implement a new function which looks into the argument of + empheq environment and indents approapriately. + +2022-01-21 Arash Esbati <arash@gnu.org> + + Re-run LaTeX when .toc|lof|lot is missing + + * tex-buf.el (TeX-LaTeX-sentinel): Recognize missing .toc|lof|lot + files and suggest a LaTeX re-run. Issue raised in: + https://lists.gnu.org/archive/html/auctex/2022-01/msg00020.html + +2022-01-21 Arash Esbati <arash@gnu.org> + + Fontify LaTeX kernel macros + + * font-latex.el (font-latex-built-in-keyword-classes): Add 3 core + macros for TOC, LOF and LOT to function class. + +2022-01-20 Arash Esbati <arash@gnu.org> + + * tex-ispell.el: Skip the arguments of stabular*? environments. + +2022-01-18 Arash Esbati <arash@gnu.org> + + Add macros to skip from caption package + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add macros from + caption.sty. + +2022-01-11 Arash Esbati <arash@gnu.org> + + Re-add support for deprecated but necessary macros + + * style/siunitx.el ("siunitx"): Add back support for deprecated + macros \si et al. + Conditionalize support for macros \qty and \units to avoid clash + with other packages defining macros with the same name. + +2022-01-08 Andrea Greselin <greselin.andrea@gmail.com> (tiny change) + + Make TeX-insert-quote robust for corner case (bug#52852) + + * tex.el (TeX-insert-quote): Go back only when there's enough room to + do so. + +2022-01-06 Arash Esbati <arash@gnu.org> + + Fix tabular test for siunitx v3 + + * tests/latex/tabular-count-ampersands-in.tex: + * tests/latex/tabular-count-ampersands-out.tex: Replace the s + column specifier with S which is the only one provided by siunitx + version 3. + +2021-12-29 Tassilo Horn <tsdh@gnu.org> + + Revert "Properly destructure LaTeX-xparse-macro/environment-list entries" + + This reverts commit 0c2eda1940e2efb89006d4353d234ce3cb66ecb0. + +2021-12-29 Andrea Greselin <greselin.andrea@gmail.com> (tiny change) + + Properly destructure LaTeX-xparse-macro/environment-list entries + + * style/xparse.el (LaTeX-xparse-macro-parse): Properly destructure + LaTeX-xparse-macro/environment-list entries (bug#52872). + +2021-12-28 David Kastrup <dak@gnu.org> + + Make preview.sty deal with newer LaTeX hiding \shipout + +2021-12-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix TeX-complete-make-expert-command-functions + + * tex.el (TeX-complete-make-expert-command-functions): Use dynamically + generated, dedicated variable to register expert entities. + +2021-12-23 Tassilo Horn <tsdh@gnu.org> + + Refactor completion annotation code + + * tex.el + (TeX--completion-annotation-from-tex--prettify-symbols-alist): New + function. + (TeX--completion-annotation-function): Use it. + +2021-12-22 Tassilo Horn <tsdh@gnu.org> + + Add completion annotation support from LaTeX-math-list/default + + * latex.el (LaTeX--completion-annotation-from-math-menu): New + function. + * tex.el (TeX--completion-annotation-function): Use it if bound. + +2021-12-21 Tassilo Horn <tsdh@gnu.org> + + Add an :annotation-function for completion and CAPF + + * tex.el (TeX--completion-annotation-function): New function. + (TeX--completion-at-point): Use it. + (TeX--symbol-completion-table): New function. + (TeX-insert-macro): Use both new functions. + +2021-12-18 Arash Esbati <arash@gnu.org> + + Support enhanced tabular indentation + + * style/stabular.el ("stabular"): Append defined environments to + `LaTeX-indent-environment-list'. + +2021-12-15 Arash Esbati <arash@gnu.org> + + Add style/sidecap.el + + * Makefile.in (STYLESRC): Add new style. + + * style/sidecap.el: New file. + +2021-12-15 Arash Esbati <arash@gnu.org> + + Add new style/rotating.el + + * Makefile.in (STYLESRC): Add new style. + + * style/rotating.el: New file. + +2021-12-15 Arash Esbati <arash@gnu.org> + + Add styles for packages from sttools collection + + * Makefile.in (STYLESRC): Add new styles. + + * style/cuted.el: + * style/floatpag.el: + * style/flushend.el: + * style/midfloat.el: + * style/stabular.el: + * style/stfloats.el: New files. + +2021-12-06 Arash Esbati <arash@gnu.org> + + Update style/url.el to package version 3.4 + + * style/url.el: Add parsing abilities for the macros \urldef and + \DeclareUrlCommand. + (TeX-arg-url-urlstyle): New function renamed from + `TeX-arg-urlstyle'. + (TeX-arg-url-DeclareUrlCommand, TeX-arg-url-urldef): New + functions. + ("url"): Remove macros for setting new styles, linebreaks + etc. from fontification. Move '\urlstyle' to function class. + (LaTeX-url-package-options): Update package options. + +2021-11-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix marker management + + * latex.el (LaTeX-env-figure): Set marker only when it's really a + marker. + +2021-11-26 Arash Esbati <arash@gnu.org> + + Track changes in LaTeX kernel 2021-11-15 + + * font-latex.el (font-latex-built-in-keyword-classes): Add the + macros \counterwith(in|out) to variable keyword-class. + + * latex.el (LaTeX-common-initialization): Support completion for + \counterwith(in|out) macros. + +2021-11-26 Arash Esbati <arash@gnu.org> + + Add new style/unicodefonttable.el + + * Makefile.in (STYLESRC): Add new style. + + * style/unicodefonttable.el: New file. + +2021-11-25 Arash Esbati <arash@gnu.org> + + Update style/siunitx.el to package version 3 + + * doc/changes.texi: Document the update of siunitx.el. + + * style/siunitx.el: Change email address. + (LaTeX-siunitx-regexp): Adjust regexp to match the second + mandatory argument of '\DeclareSIPower'. + (LaTeX-siunitx-cleanup): Delete function since the function + `LaTeX-siunitx-unit-list' already moves parsed elements to the + variable `LaTeX-siunitx-unit-list'. Don't add the function to + `TeX-auto-cleanup-hook'. + (LaTeX-siunitx-unit-list-parsed): New function returning all + predefined and parsed units. + (LaTeX-arg-siunitx-unit): Use the function + `LaTeX-siunitx-unit-list-parsed'. + (LaTeX-siunitx-package-options): Update to (and only to) key=vals + defined in package version 3. + (LaTeX-siunitx-key-val-options): New function returning key=vals. + ("siunitx"): Use the function `LaTeX-siunitx-key-val-options' in + the hook. + Remove deprecated macros and units. Keep fontification for + deprecated main macros \si, \SI, \SIlist and \SIrange. + (LaTeX-siunitx-package-options): Support the preamble-only key + 'table-column-type'. + +2021-11-25 Arash Esbati <arash@gnu.org> + + Add new style/cancel.el + + * Makefile.in (STYLESRC): Add new style. + + * style/cancel.el: New file. + +2021-11-23 Arash Esbati <arash@gnu.org> + + Add new style/xr.el + + * Makefile.in (STYLESRC): Add new style. + + * style/xr.el: New file. + +2021-11-23 Arash Esbati <arash@gnu.org> + + Add new style/xr-hyper.el + + * Makefile.in (STYLESRC): Add new style. + + * style/xr-hyper.el: New file. + +2021-11-23 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/tcolorbox.el + + * style/tcolorbox.el (LaTeX-tcolorbox-keyval-options-local) + (LaTeX-tcolorbox-update-style-key): Remove now unused variable and + function. + (LaTeX-tcolorbox-keyval-options): New function returning key=vals. + (LaTeX-tcolorbox-keyval-options-full): Change the content of the + variable. It now holds a list of symbols. + (LaTeX-tcolorbox-keyval-options-full): New function returning + key=vals from symbols in the variable + `LaTeX-tcolorbox-keyval-options-full'. + ("tcolorbox-tcbuselibrary"): Add the missing prefix to plural + argument. + (LaTeX-tcolorbox-auto-cleanup): Don't call + `LaTeX-tcolorbox-update-style-key' anymore. + ("tcolorbox"): Use new function `LaTeX-tcolorbox-keyval-options' + in the hook. + Process the library names read in by \tcbuselibrary directly. + + * style/tcolorboxlib-raster.el + (LaTeX-tcolorbox-lib-raster-env-item): Use the new function + `LaTeX-tcolorbox-keyval-options'. + ("tcolorboxlib-raster"): Register library variable + `LaTeX-tcolorbox-lib-raster-keyval-options' in + `LaTeX-tcolorbox-keyval-options-full'. + Use the function `LaTeX-tcolorbox-keyval-options' in the hook. + +2021-11-22 Arash Esbati <arash@gnu.org> + + Update style/multicol.el to package version 1.9b + + * style/multicol.el ("multicol"): Add new macros. Change the + query for \columnbreak which accepts an optional argument. + Add fontification support for relevant macros. + (LaTeX-multicol-package-options): Add new option "colcation". + +2021-11-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix misc minor issues + + * latex.el (LaTeX-env-figure): Ensure temporal marker is cleaned in + all cases. + (LaTeX-current-verbatim-macro): Include asterisk, if present, in + returned name. + * tex-info.el (TeX-texinfo-mode): Set `TeX-comment-start-regexp'. + * tex.el (TeX-verbatim-p): Call `TeX-verbatim-p-function' with + argument POS. + (TeX-verbatim-p-function): State explicitly in doc string about the + argument POS of the function. + +2021-11-21 Arash Esbati <arash@gnu.org> + + Fontify \tabularnewline macro + + * font-latex.el (font-latex-built-in-keyword-classes): Add an + entry for \tabularnewline to warning class. + +2021-11-21 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/caption.el + + * style/caption.el (LaTeX-caption-key-val-options-local) + (LaTeX-caption-update-key-val-options): Remove now unused variable + and function. + (LaTeX-arg-caption-command): Remove function since the + functionality is now provided by `TeX-arg-key-val' which is used + in the hook. + ("caption"): Use `completing-read' to read a single key from + provided key=vals for the macros \clearcaptionsetup*?. + Various docstring fixes. + + * style/subcaption.el ("subcaption"): Don't use removed variable + `LaTeX-caption-key-val-options-local' anymore. + Various docstring fixes. + +2021-11-19 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/hologo.el + + * style/hologo.el ("hologo"): Use `TeX-arg-key-eval' instead of + more complicated call of `TeX-arg-eval'. + +2021-11-19 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/floatrow.el + + * style/floatrow.el (LaTeX-floatrow-key-val-options-local) + (LaTeX-floatrow-update-key-val-options): Remove now unused + variable and function. + (LaTeX-floatrow-key-val-options): New function returning key=vals. + (LaTeX-floatrow-auto-cleanup) + (LaTeX-floatrow-arg-declare-new-options): Remove call of + `LaTeX-floatrow-update-key-val-options'. + ("floatrow"): Call the function `LaTeX-floatrow-key-val-options' + instead of the variable `LaTeX-floatrow-key-val-options-local'. + Minor spacing fixes. + +2021-11-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix logic again + + * latex.el (LaTeX-fill-region-as-paragraph): When identifying code + comment, continue search if the found candidate turns out not to be a + code comment. + Add a comment for regexp. + +2021-11-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix wrong logic of the previous commit + + * latex.el (LaTeX-fill-region-as-paragraph): Take into account lines + ending with "\par" or "\\" before code comments. We must always + perform both code comment detection and regexp match. + * tests/latex/latex-filling-in.tex: + * tests/latex/latex-filling-out.tex: + Add additional tests. + +2021-11-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Use coherent logic to identify code comment (bug#51762) + + * latex.el (LaTeX-fill-region-as-paragraph): Use the same logic to + identify code comment as the rest of latex.el. + Use shy regexp groups when possible. + Add some comments. + * tests/latex/latex-test.el (LaTeX-filling): + * tests/latex/latex-filling-in.tex: + * tests/latex/latex-filling-out.tex: + Add new tests (including ones for bug#48937). + +2021-11-17 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/listings.el + + * style/listings.el (LaTeX-listings-key-val-options): Fix a typo. + (LaTeX-listings-key-val-options-local) + (LaTeX-listings-update-style-key): Remove now unused variable and + function. + (LaTeX-listings-key-val-options): New function returning key=vals. + (LaTeX-listings-lstnewenvironment-regexp): Adjust matching of + first optional argument. + ("listings"): Call the function `LaTeX-listings-key-val-options' + instead of the variable `LaTeX-listings-key-val-options-local'. + Various docstring fixes. + +2021-11-15 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/enumitem.el + + * style/enumitem.el (LaTeX-enumitem-key-val-options-local) + (LaTeX-enumitem-newlist-list-local): Remove now unused variables. + (LaTeX-enumitem-key-val-options): New function returning key=vals. + Replace all occurrences of `LaTeX-enumitem-key-val-options-local' + with a call to the new function. + (LaTeX-arg-enumitem-SetLabelAlign) + (LaTeX-arg-enumitem-SetEnumitemKey) + (LaTeX-arg-enumitem-SetEnumitemValue): Add library prefix to the + function names. + (LaTeX-arg-enumitem-setlist): New function. + (LaTeX-enumitem-update-key-val-options): Remove unused function. + ("enumitem"): Update style to package version 3.9, add support for + 'size' feature in \setlist and adjust fontification. Fix typo for + 'labelindent'. Various docstring fixes. + +2021-11-13 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/fancyvrb.el + + * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options-local): Remove + now unused variable. + (LaTeX-fancyvrb-key-val-options): New New function returning + key=vals. Replace all occurrences of + `LaTeX-fancyvrb-key-val-options-local' with a call to the new + function. + + * style/fvextra.el (LaTeX-fvextra-key-val-options): Uncomment the + "numbers" key=val. + (LaTeX-fvextra-update-key-val): Remove the unused function and its + addition to `TeX-auto-cleanup-hook'. + ("fvextra"): Replace all occurrences of + `LaTeX-fancyvrb-key-val-options-local' with a call to the function + `LaTeX-fancyvrb-key-val-options'. + + * style/pythontex.el: Declare the function + `LaTeX-fancyvrb-key-val-options'. + (LaTeX-env-pythontex, "pythontex"): Replace all occurrences of + `LaTeX-fancyvrb-key-val-options-local' with a call to the function + `LaTeX-fancyvrb-key-val-options'. + + * style/tex-live.el ("tex-live"): Call the function + `LaTeX-fancyvrb-key-val-options' instead of the variable + `LaTeX-fancyvrb-key-val-options-local'. + +2021-11-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't use obsolete @inforef + + * doc/preview-latex.texi (Keys and lisp): + (The Emacs interface): + Use @xref instead of @inforef as Texinfo 6.8 marked it as obsolete. + +2021-11-10 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/todo.texi (Mid-term Goals): Add TODO about tool bar. + +2021-11-10 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/minted.el + + * style/minted.el (LaTeX-minted-key-val-options-local) + (LaTeX-minted-update-key-vals): Remove now unused variable and + function. + (LaTeX-minted-key-val-options): New function returning key=vals. + (LaTeX-minted-auto-cleanup): Delete call of + `LaTeX-minted-update-key-vals'. + ("minted"): Use new function in the style hook. + +2021-11-10 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/mdframed.el + + * style/mdframed.el (LaTeX-mdframed-key-val-options-local) + (LaTeX-mdframed-update-style-key): Remove now unused variable and + function. + (LaTeX-mdframed-newmdenv-regexp) + (LaTeX-mdframed-mdtheorem-regexp): Use the helper function + `LaTeX-extract-key-value-label' to build the regexp. + (LaTeX-mdframed-key-val-options): New function returning key=vals. + ("mdframed"): Use new function in the style hook. + +2021-11-10 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals style/newfloat.el + + * style/newfloat.el (LaTeX-empheq-key-val-options-local): Remove + now unused variable. + (LaTeX-newfloat-key-val-options): New function returning key=vals. + ("newfloat"): Use new function `LaTeX-newfloat-key-val-options'. + +2021-11-10 Arash Esbati <arash@gnu.org> + + Improve handling of key=vals in style/empheq.el + + * style/empheq.el (LaTeX-empheq-key-val-options-local) + (LaTeX-empheq-update-key-val-options): Remove now unused variable + and function. + (LaTeX-empheq-key-val-options): New function returning key=vals. + (LaTeX-empheq-env, LaTeX-empheq-env-overload, "empheq"): Use new + function `LaTeX-empheq-key-val-options' instead of variable + `LaTeX-empheq-key-val-options-local'. Minor code rearrangements. + +2021-11-09 Arash Esbati <arash@gnu.org> + + Improve style/babel.el + + * style/babel.el (LaTeX-babel-cleanup-babeltags): Use \' instead + of $ to match string-end. Drop unnecessary grouping. + ("babel"): Update various key=vals. + +2021-11-09 Arash Esbati <arash@gnu.org> + + * style/babel.el ("babel"): Use `LaTeX-fontspec-font-features'. + +2021-11-08 Arash Esbati <arash@gnu.org> + + Update style/fontspec.el to package version 2.7i + + * style/fontspec.el (LaTeX-fontspec-font-features): Update + key=val list. + (LaTeX-fontspec-font-features-local) + (LaTeX-fontspec-update-font-features): Remove now unused variable + and function. + (LaTeX-fontspec-font-features): New function returning key=vals. + (LaTeX-fontspec-auto-cleanup): Remove the call of + `LaTeX-fontspec-update-font-features'. + ("fontspec"): Replace `LaTeX-fontspec-font-features-local' with + `LaTeX-fontspec-font-features' call. + +2021-11-08 Ikumi Keita <ikumi@ikumi.que.jp> + + Supplement doc string + + * style/kpfonts.el (LaTeX-kpfonts-default): Supplement doc string + according to recent change in doc string of `LaTeX-math-list'. + +2021-11-03 Arash Esbati <arash@gnu.org> + + Autoload `TeX-check-engine-add-engines' in tex.el + + * style/arabxetex.el ("arabxetex"): + * style/babel.el ("babel"): + * style/bidi.el ("bidi"): + * style/fontspec.el ("fontspec"): + * style/polyglossia.el ("polyglossia"): Don't require tex-buf.el + in the style hook. + + * tex.el (TeX-check-engine-add-engines): Autoload the function so + the styles using it don't have to require tex-buf.el. + +2021-10-29 Arash Esbati <arash@gnu.org> + + Extend `TeX-read-key-val' to accept a function call + + * doc/changes.texi: Document the change. + + * latex.el (TeX-read-key-val): Accept a function call returning an + alist as second argument. + +2021-10-24 Arash Esbati <arash@gnu.org> + + * style/graphicx.el (LaTeX-graphicx-key-val-options): Add alt key. + +2021-10-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Cater for corner case when dealing with TeX error + + * tex-buf.el (TeX-find-display-help): Don't try to open error file + when it wasn't found. + Some cleanups. + +2021-10-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Silence compiler warning + + * tex-buf.el (TeX-parse-TeX): + (TeX-error-overview-goto-source): + Don't let-bind `default-major-mode'. + (TeX-find-display-help): Fall back to the major mode of command + buffer. + +2021-10-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Explain how to do forward search by mouse + + * doc/auctex.texi (I/O Correlation): Add a sample usage of + `TeX-source-correlate-map' and `TeX-view-mouse'. + +2021-09-24 Ikumi Keita <ikumi@ikumi.que.jp> + + * tests/latex/latex-test.el (LaTeX-flush-left-indent): New test. + +2021-09-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Cleanup indentation of verbatim environments + + * latex.el (LaTeX-begin-regexp): Delete because this variable isn't + used anywhere. + (LaTeX-indent-calculate-last): Remove redundant regexp grouping. + +2021-09-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't indent begin/end of comment env + + Begin/end line of comment environment must be flush left, just like + verbatim environments. However, comment environment shouldn't be + included in `LaTeX-verbatim-environments' because + 1. filling shouldn't be disabled inside comment environment + 2. contents inside comment environment should be fontified as comment + + * latex.el (LaTeX-verbatim-regexp): Attach a new optional argument + COMMENT to allow inclusion of comment environments. + (LaTeX-indent-calculate): Indent begin/end line of comment environment + at column 0. + Remove redundant regexp grouping. + (LaTeX-indent-calculate-last): Calculate indent after comment + environment correctly. + Remove redundant regexp grouping. + +2021-09-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Explain how to support option completion + + * doc/auctex.texi (Adding Other): Add explanation for style file + authors: How to provide support for completion of optional arguments + for \usepackage and \documentclass. + +2021-09-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Delete obsolete files and targets + + * auctex.spec: + * preview-latex.spec: + Delete rpm spec files. + * Makefile.in (): Remove make targets rpm-packages and + windows-package. + * doc/preview-readme.texi (Availability): Remove mention about rpm + package. + Supplement description about git access. + +2021-09-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Add NEWS for two commands available in Texinfo mode + + * doc/changes.texi: Add news of two new entries in `TeX-command-list', + "Texindex" and "Texi2dvi". + +2021-09-08 Tassilo Horn <tsdh@gnu.org> + + Recognize L3 \msg_line_context: on warning parsing + + * tex-buf.el (TeX-warning): Recognize L3 \msg_line_context: on warning + parsing which reads "on line X" instead of "on input line X". + +2021-09-02 Arash Esbati <arash@gnu.org> + + Track standardized generic hook names in LaTeX kernel + + * latex.el (TeX-read-hook): Unify query for hooks and track the + change for standardized generic hook names described in: + https://github.com/latex3/latex2e/blob/develop/base/doc/ltnews34.tex + +2021-08-30 Arash Esbati <arash@gnu.org> + + Handle optional embellishment arguments correctly + + * style/xparse.el (LaTeX-xparse-macro-regexp) + (LaTeX-xparse-environment-regexp): Include the entire match text + to avoid ambiguity. + (LaTeX-arg-xparse-embellishment-query): New function. + (LaTeX-xparse-macro-parse): Handle embellishments (e/E argument + type) correctly. + +2021-08-30 Arash Esbati <arash@gnu.org> + + Check the options and load the style backref.el + + * style/hyperref.el ("hyperref"): Run the style hook for + backref.el when the corresponding option is given. + Correct link to testform.tex. + +2021-08-28 Tassilo Horn <tsdh@gnu.org> + + Fix error when tex.el is loaded while default-directory doesn't exist + + * tex.el (TeX-view-program-select-evince): Bind `default-directory' to + HOME for the shell command testing for the availability of + evince-based viewer. That triggered an error when tex.el is loaded as + response to finding a tex file in a non-existent directory which at + this point is the value of `default-directory' (bug#50225). + +2021-08-27 Arash Esbati <arash@gnu.org> + + Add new style/backref.el + + * Makefile.in (STYLESRC): Add new style. + + * style/backref.el: New file. + +2021-08-26 Arash Esbati <arash@gnu.org> + + * style/beamer.el ("beamer"): Improve indentation of \frametitle. + +2021-08-24 Arash Esbati <arash@gnu.org> + + Improve obeying the value of `TeX-insert-braces' + + * latex.el (LaTeX-common-initialization): Add "columnseprule" to + list of known lengths and remove it from style/multicol.el. + Remove 0 as specifier for symbols formerly provided by the + textcomp package. + + * style/multicol.el ("multicol"): Add lengths defined by the + package to list of known lengths. + + * style/brazilian.el ("brazilian"): + * style/currvita.el ("currvita"): + * style/ltugboat.el ("ltugboat"): + * style/marginnote.el ("marginnote"): + * style/mflogo.el ("mflogo"): + * style/portuguese.el ("portuguese"): Remove 0 as specifier for + the defined symbols. Braces are now inserted after the symbols if + `TeX-insert-braces' is non-nil. + +2021-08-21 Al Haji-Ali <abdo.haji.ali@gmail.com> + + Add NEWS entry for output-dir feature + + + * doc/changes.texi (News in 13.1): Add NEWS entry for Al's output-dir + feature. + +2021-08-20 Arash Esbati <arash@gnu.org> + + Update Pygments styles + + * style/minted.el (LaTeX-minted-key-val-options): Update values + for style-key provided by Pygments v2.9. + +2021-08-17 Arash Esbati <arash@gnu.org> + + * style/ltxguide.el ("ltxguide"): Update syntactic font-locking. + +2021-08-13 Arash Esbati <arash@gnu.org> + + Improve style/xparse.el + + * style/xparse.el (LaTeX-xparse-macro-parse): Remove unnecessary + grouping in regexps. + ("xparse"): Fix number of arguments of testing macros. + +2021-08-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Avoid superfluous output directories + + * tex.el (TeX--master-output-dir): Add new optional argument ENSURE so + that it doesn't make output dir when `TeX-region-file' is called from + `TeX-set-mode-name', which can be called from + `TeX-source-correlate-mode' in major mode function. + (TeX--output-dir-arg): Feed t for the above new argument ENSURE. + +2021-07-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Add index files as clean target in Texinfo mode + + * tex-info.el (Texinfo-clean-intermediate-suffixes): Add index file + suffixes. + +2021-07-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Add entries for Texinfo mode in `TeX-command-list' + + * tex.el (TeX-command-list): Add "Texindex" and "Texi2dvi" entries in + `TeX-command-list'. + * doc/auctex.texi (Superseding): Mention "Texindex" instead of "Index". + +2021-07-21 Arash Esbati <arash@gnu.org> + + Update style/ulem.el + + * style/ulem.el ("ulem"): Add macros \dashuline and \dotuline. + Fix \markoverwith which takes one argument. + Add \ULdepth to list of known lengths. + Cater fontification for added macros. + (LaTeX-ulem-fontdecl, LaTeX-ulem-fontcmd): Rename from + `LaTeX-arg-fontdecl' and `LaTeX-arg-fontcmd'. + (TeX-arg-ulem-fontdecl, TeX-arg-ulem-fontcmd): Use renamed + variables. + (TeX-arg-ulem-useunder): Don't listify the completion candidates, + `completing-read' can handle list of strings. + +2021-07-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix slowdown of font lock in doctex mode + + `texmathp' limits search by looking for empty lines, which appear + frequently in LaTeX documents. However, docTeX documents often lack + such true empty lines. In such buffer, `texmathp' must search + from (point-min) every time, which slowed down font lock operation + siginificantly. + + * texmathp.el (texmathp): Adjust regular expression so that a line + containing only whitespaces except consecutive %'s at its beginning + is considered as empty in doctex mode buffer. + +2021-07-18 Arash Esbati <arash@gnu.org> + + Be more precise about the first element in `LaTeX-math-list' + + * doc/auctex.texi (Mathematics): + * latex.el (LaTeX-math-list): Update description for the first + element KEY in `LaTeX-math-list'. + Remove unnecessary quoting of opening/closing parenthesis. + +2021-07-16 Arash Esbati <arash@gnu.org> + + * tex-fold.el (TeX-fold-macro-spec-list): Add entry for "footref". + +2021-07-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Clean up temporal markers + + * latex.el (LaTeX-env-figure, LaTeX-fill-region-as-paragraph) + (LaTeX-fill-region-as-para-do,LaTeX-fill-paragraph) + (LaTeX-fill-region): + * style/dinbrief.el (LaTeX-dinbrief-env-recipient): + * style/letter.el (LaTeX-env-recipient): + * tex-info.el (Texinfo-reftex-section-info): + * tex.el (TeX-parse-argument): + Clean up temporal markers after their usage so that they don't slow + down the subsequent editing in the buffer. + +2021-07-07 Arash Esbati <arash@gnu.org> + + Add support for LaTeX hook macros + + * doc/auctex.texi (Adding Macros): Document new functions for + reading and inserting LaTeX hooks. + + * doc/changes.texi: Add entry for LaTeX hooks support. + + * font-latex.el (font-latex-built-in-keyword-classes): Add hook + macros to function keywords class. + + * latex.el (TeX-global-input-files-with-extension): New variable. + (TeX-read-hook, TeX-arg-hook): New functions for reading and + inserting LaTeX hooks. + (LaTeX-common-initialization): Add hook macros to AUCTeX's LaTeX2e + hook. + +2021-07-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Add defensive `save-match-data' + + * preview.el.in (preview-set-texinputs): Follow the instruction + "Simple Match Data Access" in elisp reference: + A search which fails may or may not alter the match data. In the + current implementation, it does not, but we may change it in the future. + Don’t try to rely on the value of the match data after a failing search. + +2021-07-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix order of arguments + + * preview.el.in (preview-make-image): Rearrange the arguments of `get' + in correct order. + Adapt doc string. + +2021-07-05 Arash Esbati <arash@gnu.org> + + * doc/auctex.texi (Modes and Hooks): Fix hook name. + +2021-06-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Improve tool bar appearance + + * toolbar-x.el (toolbarx-emacs-add-button): Use built-in separator. + Add :vert-only property to suppress labels unless vertical alignment + is specified for labels. + Reindent the codes. + * preview.el.in (preview-mode-setup): Add :vert-only property as well. + +2021-06-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Update document + + * doc/auctex.texi (Multifile): Delete description about nonexistent + feature. + +2021-06-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix doc strings and comment + + * latex.el (LaTeX-style-list): + * preview.el.in (preview-document-pt-list): + * tex-buf.el (TeX--concat-ext, TeX-command) + (TeX-active-master-with-quotes): + * tex.el (TeX-master,TeX-auto-regexp-list,TeX-auto-x-regexp-list) + (TeX-output-dir, TeX--master-output-dir, TeX--output-dir-arg): + Fix doc strings. + Fix defcutom specs. + * tex-fold.el (TeX-fold-mode): Fix comment. + +2021-06-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix arguments given to makeglossaries + + * tex.el (TeX-expand-list-builtin): Add new placeholder "%(d-dir)". + (TeX-command-list): Use it and give basename of the document, not .aux + file names, as argument for makeglossaries. + Tweak the order of the argument for biber and dvipdfmx for coherency. + +2021-06-11 Arash Esbati <arash@gnu.org> + + Define `TeX-parse-all-errors' in tex.el + + * tex-buf.el: + * tex.el (TeX-parse-all-errors): Move defintion of custom variable + into tex.el. This variable is also used in + `TeX-mode-specific-command-menu-entries' and results in an error + when selecting 'Command' in the menu bar since tex.el doesn't + require tex-buf.el. + +2021-06-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix bug#36651 + + * tex-fold.el (TeX-fold-mode): Open folded portion when isearch + matches the hidden text. + +2021-06-09 Tassilo Horn <tsdh@gnu.org> + + Fix filling of code-and-comment lins where code ended in \% (bug#48937) + + * latex.el (LaTeX-fill-region-as-paragraph): Fix filling of + code-and-comment lins where code ended in \% (bug#48937). + +2021-06-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Make TeX-fold-mode aware of superscript and subscript + + * tex-fold.el (TeX-fold-hide-item): Copy `display' property of + underlying text to displayed text to raise superscript and lower + subscript suitably. + +2021-06-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Use own error description for LaTeX mode only + + * tex-buf.el (TeX-error-description-list): Move its value to new + variable in latex.el. Now it holds user defined entries only and + defaults to nil. + (TeX-error-description-list-local): New variable to store buffer + local list of error descriptions. + (TeX-help-error): Combine values of the above two variables. + * latex.el (LaTeX-error-description-list): New variable for LaTeX + specific error descriptions, formerly stored in + `TeX-error-description-list'. + (LaTeX-common-initialization): Set local value of + `TeX-error-description-list-local'. + * tex-jp.el (toplevel): Overwrite `LaTeX-error-description-list' + instead of `TeX-error-description-list'. + * doc/changes.texi (News in 13.1): Mention about it. + +2021-06-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Adapt for Texinfo mode + + * tex.el (TeX-local-master-p): Just look into + `file-local-variables-alist' to return correct value even in TeXinfo + mode. This fixes bug#33227 as well. + +2021-06-02 Arash Esbati <arash@gnu.org> + + Define minor modes using keywords + + * tex.el (TeX-Omega-mode, TeX-interactive-mode): + * tex-fold.el (TeX-fold-mode): + * style/kpfonts.el (LaTeX-kpfonts-mode): + * latex.el (LaTeX-math-mode): Use keywords to define minor modes. + +2021-06-02 Arash Esbati <arash@gnu.org> + + Check for `auto-fill-function' before filling + + * style/algorithm.el (LaTeX-env-algorithm): + * style/beamer.el ("beamer"): + * style/bicaption.el (LaTeX-arg-bicaption-bicaption): + * style/caption.el (LaTeX-arg-caption-captionbox) + (LaTeX-arg-caption-captionof): + * style/currvita.el (LaTeX-currvita-env-with-label): + * style/enumitem.el (LaTeX-enumitem-env-with-opts): + * style/longtable.el (LaTeX-env-longtable): + * style/moodle.el (LaTeX-moodle-question-env-with-args): + * style/subcaption.el (LaTeX-arg-subcaption-subcaption) + (LaTeX-arg-subcaption-subcaptionbox): + * style/tcolorboxlib-raster.el (LaTeX-tcolorbox-lib-raster-env-item): + * style/xltabular.el (LaTeX-env-xltabular): Fill the paragraph if + `auto-fill-function' is non-nil. + +2021-06-01 Tassilo Horn <tsdh@gnu.org> + + Only re-fill \item contents if auto-fill-mode is active (bug#48760) + + * latex.el (LaTeX-env-item): Only fill the paragraph of the new \item + if auto-fill-mode is activated (bug#48760). + +2021-06-01 Arash Esbati <arash@gnu.org> + + Remove backspace as paragraph separator + + * tex-info.el (TeX-texinfo-mode): Remove backspace from paragraph + separator and start. See also Emacs commit 3c6b59918a. + +2021-05-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Use #' rather than ' to quote function names + + * latex.el (LaTeX-match-class-option, LaTeX-auto-cleanup): + * style/beamer.el (LaTeX-beamer-after-insert-env): + * style/doc.el (LaTeX-doc-after-insert-macrocode): + * tex-buf.el (TeX-style-check, TeX-error-overview-make-entries): + * tex.el (TeX-match-style, TeX-run-style-hooks) + (TeX-complete-word) + (TeX-complete-make-expert-command-functions) + (TeX-default-mode,TeX-auto-parse-region): + Use #' rather than ' to quote function names. + +2021-05-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix markups in documents + + * doc/auctex.texi (Internationalization): Fix markups. + (Japanese): Reorder words so that unbreakable email addresses don't + make the line ugly in pdf output. + +2021-05-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Followup my commit on May 6 + + * tex-buf.el (TeX-LaTeX-sentinel): Use `insert-file-contents-literally' + instead of `insert-file-contents'. + +2021-05-28 Arash Esbati <arash@gnu.org> + + Improve completion + + * style/pdfpages.el ("pdfpages"): Allow directories while reading + the file name. Use "\'" to match the empty string at the end of + regexp. + +2021-05-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Improve `TeX-electric-macro' in Texinfo mode + + * tex.el (TeX-electric-macro): Compare with `last-command-event' + rather than constant ?\ in case `@' is typed in Texinfo mode. + +2021-05-26 Arash Esbati <arash@gnu.org> + + Delete style/latexinfo.el from AUCTeX + + * Makefile.in (STYLESRC): Delete entry for style/latexinfo.el. + + * doc/changes.texi: Document removal of style. + +2021-05-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Add -dDELAYBIND only when necessary + + * preview.el.in (preview-pdf2dsc-sentinel): Add gs option -dDELAYBIND + only when preview-latex tries to tweak foreground color. According to + gs developer[1], -dDELAYBIND option must be accompanied by ".bindnow" + in gs init string. + [1] https://lists.gnu.org/r/auctex-devel/2021-05/msg00030.html + +2021-05-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Update documentation + + * doc/auctex.texi (Internationalization): Update according to recent + utf8-oriented change in LaTeX. + (Modes and Hooks): Display mode function names in lower case because + `major-mode' variable holds those forms. + (Mapping): Fix typo in key sequence. + (Processing): Add mention about options to customize tool bar. + (Adding Other): Add description how to examine package/class names and + options. + * doc/preview-latex.texi: Remove duplicated "@contents". + * doc/preview-readme.texi (More documentation): Update acoording to + change already done in favor of pdf format. + * doc/quickstart.texi (Editing Facilities): Update paragraph written + in days that `global-font-lock-mode' wasn't enabled by default. + (Processing Facilities): Add mention about synctex. + Update paragraph mentioning `TeX-PDF-from-DVI' rather than obsolete + `TeX-PDF-via-dvips-ps2pdf' option. + + * doc/auctex.texi: + * doc/changes.texi: + * doc/faq.texi: + * doc/install.texi: + * doc/preview-faq.texi: + * doc/preview-latex.texi: + * doc/preview-problems.texi: + * doc/preview-readme.texi: + * doc/preview-todo.texi: + * doc/quickstart.texi: + * doc/tex-ref.tex: + * doc/todo.texi: + * doc/wininstall.texi: + Fix and (hopefully) improve a lot of markups and comments. + Add some FIXME's. + Convert tabs to spaces. + Add more indexes. + Use "init.el" as well as ".emacs" as the name of user init file. + +2021-05-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Indent region (bug#48518) + + * latex.el (LaTeX-insert-environment): Indent active region when + `auto-fill-mode' is disabled. + +2021-05-20 Arash Esbati <arash@gnu.org> + + Improve style/algorithm.el + + * style/algorithm.el (LaTeX-algorithm-package-options): Add + missing options. + (LaTeX-env-algorithm): Insert a newline only when a label is + really added. Remove unnecessary comments. + ("algorithm"): Move `TeX-dialect' to be the third argument of the + hook. + +2021-05-13 Ikumi Keita <ikumi@ikumi.que.jp> + + Add new test + + * tests/latex/font-latex-test.el (font-latex-unclosed-dollars): New + test. + * font-latex.el (font-latex-find-dollar-math): Clean up doc string and + comment. + +2021-05-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix fontification when $ is unclosed in buffer + + * font-latex.el (font-latex-match-dollar-math): Ensure that limit + passed to `font-latex-find-dollar-math' doesn't exceed end of buffer. + +2021-05-12 Arash Esbati <arash@gnu.org> + + Add new variable `TeX-normal-mode-reset-list' + + * latex.el: + * style/graphicx.el: Add variables to `TeX-normal-mode-reset-list' + which were hard-coded in `TeX-normal-mode'. + + * tex.el (TeX-normal-mode-reset-list): New variable for symbols to + be reset when the command `TeX-normal-mode' is run with argument. + (TeX-normal-mode): Remove the hard-coded variables and use + `TeX-normal-mode-reset-list'. + Remove the defvar's silencing the compiler. + +2021-05-11 Tassilo Horn <tsdh@gnu.org> + + Skip inline math $ inside comments (bug#48365) + + * font-latex.el (font-latex-find-dollar-math): Skip inline math $ + inside comments. + +2021-05-11 Arash Esbati <arash@gnu.org> + + Introduce new variable `LaTeX-global-package-files' + + * latex.el (LaTeX-global-package-files): New variable holding + LaTeX package files. + (LaTeX-arg-usepackage-read-packages-with-options): Set and use it + instead of `TeX-global-input-files'. + + * tex.el (TeX-normal-mode): Reset also + `LaTeX-global-package-files' when invoked with ARG. + Silence the compiler. + +2021-05-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Ensure rawness of data to compute MD5 + + * tex-buf.el (TeX-run-TeX): Use `insert-file-contents-literally' + instead of `insert-file-contents' in order to avoild possible wrong + MD5 value due to unnecessary encoding conversion. + ;(TeX-sentinel-function, TeX-sentinel-default-function): Fix typo. + +2021-05-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Make `TeX-run-format' self-contained (bug#48144) + + * tex-buf.el (TeX-run-format, TeX-run-TeX): Move initialization of + `TeX-error-report-switches' from `TeX-run-TeX' to `TeX-run-format'. + This makes `TeX-TeX-sentinel', set to `TeX-sentinel-function', work + without error when `TeX-run-format' is called outside of + `TeX-run-TeX'. + (TeX-error-report-switches, TeX-error-report-has-errors-p): Define + them before `TeX-run-format' to prevent compiler warning. + +2021-05-05 Arash Esbati <arash@gnu.org> + + Support new kernel macro \footref + + * font-latex.el (font-latex-built-in-keyword-classes): Add entry + for footref to reference class. + + * latex.el (LaTeX-common-initialization): Add support for + \footref macro. + +2021-05-04 Arash Esbati <arash@gnu.org> + + Add support for (Brazilian) Portuguese + + * tex.el (TeX-quote-language-alist): Add entry for "portuguese". + + * doc/auctex.texi (European): Document the features of new + language styles. + + * Makefile.in (STYLESRC): Add entries for new styles. + + * style/brazil.el: + * style/brazilian.el: + * style/portuges.el: + * style/portuguese.el: New files. + +2021-04-28 Tassilo Horn <tsdh@gnu.org> + + Allow one level of braces in verbatim environment args (bug#48078) + + * font-latex.el (font-latex-set-syntactic-keywords): Allow one level + of braces in verbatim environment args (bug#48078). + +2021-04-27 Tassilo Horn <tsdh@gnu.org> + + Fix filling issue caused by commit 98455d05. + + * latex.el (LaTeX-fill-region-as-para-do): Call + LaTeX-back-to-indentation without explicit arg again. + +2021-04-25 Tassilo Horn <tsdh@gnu.org> + + Fix matching of script chars (bug#48012) + + * font-latex.el (font-latex-match-script-chars): Don't stop after + findind the first script char which turns out not to be an actual + script char (bug#48012). + +2021-04-23 Tassilo Horn <tsdh@gnu.org> + + Give explicit arg to LaTeX-back-to-indentation in filling functions. + + Also add some comment filling tests, and adapt one existing test to + new filling behavior introduced in previous commit. + + * latex.el (LaTeX-fill-region-as-para-do): + (LaTeX-fill-move-to-break-point): Provide explicit arg to + `LaTeX-back-to-indentation'. + +2021-04-23 Tassilo Horn <tsdh@gnu.org> + + Don't treat comments with whitespace before % as code comments + + * latex.el (LaTeX-fill-region-as-paragraph): Don't treat comments with + whitespace before % as code comments (mentioned as addendum to + bug#47757). + +2021-04-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Add new test + + * tests/latex/latex-test.el (LaTeX-electric-pair-interaction): New + test. + * latex.el (LaTeX-insert-left-brace): Add comments. + +2021-04-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Follow up previous commit + + * latex.el (LaTeX-insert-left-brace): Let side effects of + self-insertion, such as electric paring, to occur when this function + doesn't do special treatment. + +2021-04-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Get rid of unexpected side effects + + * latex.el (LaTeX-insert-left-brace): Use `insert' instead of + `self-insert-command' to avoid all unexpected interactions. + (LaTeX-insert-corresponding-right-macro-and-brace) + (LaTeX-common-initialization): + Remove codes which is no longer necessary. + +2021-04-21 Philip K <philipk@posteo.net> + + Improve handling for parentheses with electric-pair-mode (bug#47936) + + * latex.el (LaTeX-insert-corresponding-right-macro-and-brace): Improve + handling for parentheses with electric-pair-mode (bug#47936). + +2021-04-18 Tassilo Horn <tsdh@gnu.org> + + Fix the fix of bug#47757 which broke comment filling. + + * latex.el (LaTeX-back-to-indentation): Move point to the comment + content only if the current command is no newline command (fixes the + previous fix for bug#47757 which broke comment filling). + +2021-04-16 Tassilo Horn <tsdh@gnu.org> + + Rename TeX-xreader-sync-view to TeX-reader-sync-view (bug#47807) + + * tex.el (TeX-reader-sync-view): Rename from + TeX-xreader-sync-view (bug#47807). + +2021-04-14 Tassilo Horn <tsdh@gnu.org> + + Don't move past % if the current command is a non-indent command + + * latex.el (LaTeX-back-to-indentation): Don't move past % if the + current command is a non-indent command (bug#47757). + +2021-04-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Simplify conditionals evaluating to constant + + * font-latex.el (font-latex-bold-face, font-latex-italic-face) + (font-latex-math-face, font-latex-string-face) + (font-latex-warning-face, font-latex-verbatim-face) + (font-latex-script-char-face): + All supported emacsens support :inherit attribute for face and + have `fixed-pitch' basic face. + +2021-04-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Resolve constant fboundp/boundp/featurep + + * bib-cite.el (bib-apropos-keyword-at-point): + * context.el (ConTeXt-menu-update) + (ConTeXt-mode-common-initialization): + * latex.el (LaTeX-math-initialize) + (LaTeX-fill-move-to-break-point): + * multi-prompt.el (multi-prompt-next): + * preview.el.in (preview-transparent-border) + (preview-place-preview, preview-reinstate-preview): + * style/kpfonts.el (math): + * style/dk-bib.el (LaTeX-dk-bib-package-options): + * tex-buf.el (TeX-shell-command-option, TeX-check-engine): + * tex-fold.el (TeX-fold-item, TeX-fold-post-command): + * tex.el (TeX-source-specials-view-start-server) + (TeX-auto-private, TeX-style-private, TeX-complete-symbol) + (VirTeX-common-initialization, TeX-token-char) + (TeX-mode-specific-command-menu-entries) + (TeX-math-input-method-off, TeX-abbrev-mode-setup): + Simplify conditionals containing `fboundp', `boundp' and `featurep' + which evaluate to constant. + + * latex.el (LaTeX-math-initialize, LaTeX-fold-math-spec-list): + Simplify by not using `decode-char'. Now that emacs is unicode based, + (decode-char 'ucs ARG) is trivial operation which just returns ARG. + Code point in ucs is the same as emacs char. + + * multi-prompt (multi-prompt): Use #' to quote function names. + (multi-prompt-next-must-match): Use + `minibuffer-contents-no-properties' instead of + `buffer-substring-no-properties'. + +2021-04-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for Emacs<24.3 + + * latex.el (LaTeX-insert-left-brace): + * tex.el (TeX-insert-dollar): + Simplify the property `delete-selection-mode'. + (VirTeX-common-initialization): Use " " for `comment-padding'. + (TeX-math-input-method-off): Never use `inactivate-input-method'. + +2021-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Use #' instead of ' to quote function names + + * bib-cite.el (bib-switch-to-buffer-function): + * latex.el (LaTeX-item-array, LaTeX-item-tabular*) + (LaTeX-math-insert-function, LaTeX-environment-menu-entry) + (LaTeX-environment-modify-menu-entry) + (LaTeX-section-menu-entry, LaTeX-indent-tabular) + * preview.el.in (preview-auto-reveal, preview-copy-mml) + (preview-copy-region-as-mml, preview-generate-preview): + * style/amsmath.el (LaTeX-item-equation-alignat): + * style/amsthm.el (LaTeX-amsthm-auto-cleanup) + ("amsthm"): + * style/biblatex.el ("biblatex"): + * style/dinbrief.el (LaTeX-dinbrief-style) + (LaTeX-dinbrief-env-recipient): + * style/exam.el ("exam"): + * style/jurabib.el ("jurabib"): + * style/letter.el (LaTeX-env-recipient): + * style/minted.el (LaTeX-minted-auto-cleanup): + * style/natbib.el ("natbib"): + * style/ntheorem.el (LaTeX-ntheorem-auto-cleanup) + ("ntheorem"): + * style/pythontex.el ("pythontex"): + * style/tcolorbox.el (LaTeX-tcolorbox-auto-cleanup): + * style/theorem.el (LaTeX-theorem-auto-cleanup) + ("theorem"): + * style/xparse.el (LaTeX-xparse-macro-parse): + * tests/latex/font-latex-test.el (font-latex-three-dollars) + (font-latex-extend-region-backwards-quotation) + (font-latex-general-fontification): + * tex-bar.el (TeX-bar-TeX-button-alist) + (TeX-bar-LaTeX-button-alist): + * tex-buf.el (TeX-command-master, TeX-view): + * tex-info.el (TeX-texinfo-mode): + * tex-fold.el (TeX-fold-post-command): + * tex-site.el.in (tex-site-unload-hook): + * tex.el (TeX-expand-list-builtin,toplevel) + (TeX-source-correlate-start-server-maybe) + (TeX-install-font-lock, TeX-command-current) + (TeX-command-select-master, TeX-command-select-buffer) + (TeX-command-select-region, TeX-newline-function) + (TeX-mode-specific-command-menu-entries) + (TeX-font-replace-function, TeX-insert-dollar): + * toolbar-x.el (toolbarx-default-toolbar-meaning-alist): + * doc/auctex.texi (Mathematics, Filling, Folding) + (Hacking the Parser): + * doc/tex-ref.tex: + Use #' instead of ' to quote function names. + + tex.el (): Add `declare-function' for `gnuserv-start'. + +2021-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Use closure rather than hand-made lambda + + * latex.el (LaTeX-math-initialize): + * style/kpfonts.el (math): + * toolbar-x.el (toolbarx-make-command): + Use closure rather than hand-made lambda form. + +2021-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Resolve unnecassary back quote + + * font-latex.el (font-latex-user-keyword-classes, + (font-latex-slide-title-face): + * tex-fold.el (TeX-fold-macro-spec-list): + Turn unnecassary back quote into forward quote. + Fix typo in doc string. + +2021-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove xemacs compat elements + + * tex-bar.el (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): + Don't use vector as element. + * toolbar-x.el (toolbarx-install-toolbar): Fix doc string. + Partially revert the comments removed recently which are still + valid. + +2021-03-31 Arash Esbati <arash@gnu.org> + + Add new fontification test + + * tests/latex/font-latex-test.el + (font-latex-general-fontification): Add test for general + fontification of vanilla LaTeX files. + +2021-03-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Use built-in functions for similar functions + + * tex.el (TeX-split-string): Simplify by `split-string' and mark + obsolete. + (TeX-assoc): Simplify by `assoc-string' and mark obsolete. + * doc/changes.texi (News in 13.0): Add announce that these functions + are removed in future release. + + * latex.el (LaTeX-split-bibs, LaTeX-auto-cleanup) + (LaTeX-209-to-2e): + * style/babel.el (LaTeX-babel-active-languages): + Replace `TeX-split-string' by `split-string'. + + * tex-buf.el (TeX-command-query, TeX-printer-query): Replace + `TeX-assoc' by `assoc-string'. + +2021-03-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Some minor followups + + * doc/tex-ref.tex: Fix markups as well as a few errors. + Remove mention about xemacs. + * tex.el (TeX-expand-list-builtin): Simplify. + * tests/make-test-deps.emacs-lisp: Enable lexical binding. + Update Copyright year. + +2021-03-29 Arash Esbati <arash@gnu.org> + + Fix broken test + + * tests/japanese/preview-latex.el: Mark + `japanese-TeX-error-messages' as special before dynamically + binding it. + +2021-03-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix doc string + + * tex.el (TeX-expand-list): Delete obsolete comment. + State that variable name is allowed as the second element and how that + is treated. + +2021-03-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Reduce byte compiler warning + + * tex.el (): Move `(eval-when-compile (require 'dbus))' before + `declare-function's of dbus related functions because otherwise they + seem ineffective. + Both NOERROR optional argument for `(require 'dbus)' and `(featurep + 'dbusbind)' test are removed deliberately because + (1) Now all supported emacsen have dbus.el. + (2) Even if emacs is built with configure option "--without-dbus", it + doesn't cause error to load dbus.el just to get macro definition + of `dbus-ignore-errors'. + This way, it works fine even when + (a) Emacs used for byte-compiling lacks D-Bus support. + (b) Emacs at run time has D-Bus support. + without relying on `TeX--if-macro-fboundp'. + + (): Remove `declare-function' for `dbus-ignore-errors' because it's + now guaranteed that the macro is expanded away at byte compile time. + (): Remove `defvar' for `dbus-debug' because `dbus.el' provides a + suitable defvar. + +2021-03-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Reduce byte compiler warning + + * tex.el (VirTeX-common-initialization,toplevel): Don't set obsolete + ispell variables `ispell-tex-p' and `ispell-tex-major-modes'. Neither + appears in NEWS.* nor source of emacs 24.3. + (TeX-run-ispell): Don't call obsolete functions `spell-buffer' and + `spell-region'. + (): Discard `declare-function' for `spell-buffer'. + Add `defvar' for `ispell-parser' to silence byte compiler. + +2021-03-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Use #' instead of ' to quote function where possible + + * latex.el (LaTeX-babel-insert-hyphen): + * multi-prompt.el (multi-prompt-delete) + (multi-prompt-next-must-match): + * style/biblatex.el ("biblatex"): + * style/newfloat.el ("newfloat"): + * style/ntheorem.el ("ntheorem"): + * style/wrapfig.el ("wrapfig"): + * tex.el (TeX-electric-macro, TeX-insert-punctuation) + (TeX-run-ispell): + Use #' instead of ' to quote function where possible. + +2021-03-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Reduce byte compiler warning + + * bib-cite.el (bib-display-or-find-label): Use `outline-show-entry' + instead of `show-entry' when possible. Wrap `show-entry' with + `with-no-warnings'. + (bib-get-citations, psg-list-env): Use `replace-regexp-in-string' + instead of `dired-replace-in-string'. + Use `split-string' instead of `dired-split' and `TeX-split-string'. + (dired-replace-in-string,TeX-split-string): Delete fallback + definitions. + (): Remove `declare-function' for `dired-replace-in-string' and + `dired-split'. + +2021-03-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Reduce byte compiler warning + + * bib-cite.el (bib-bib-label-help-echo-format, bib-ext-list) + (bib-label-help-echo, bib-label-help): + Delete remaining XEmacs only functions and variables. + (bib-highlight-mouse): Don't touch removed variable. + (bib-etags-command, bib-etags-append-command, bib-display, bib-find) + (bib-find-next, bib-make-bibliography, bib-edit-citation) + (bib-get-bibliography): + Fix doc strings. + +2021-03-26 Ikumi Keita <ikumi@ikumi.que.jp> + + * tests/japanese/preview-latex.el: Make cleanup forms more robust + +2021-03-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix preamble cache + + * preview.el.in (preview-cache-preamble): Remove trash left when + preferring closure over backquote+lambda. + (preview-gs-flag-error): Replace `str' with `string' for clarity; + `str' is used again in the clause just after the one in question. + +2021-03-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix preview-latex and regression tests + + * preview.el.in (preview-query-replace-reveal): Add treatment for + nadvice functions. + (): Promote defvar's without value to proper defvar's to prevent + unexpected error when external program calls preview-latex functions. + * tests/latex/font-latex-test.el (): Add defvar for `font-lock-beg' + and `font-lock-end' to make dynamic binding at let-binding them. + * tests/tex/path-expansion.el: Add temporal defvar for dummy variable. + * tests/japanese/preview-latex.el + (japanese-preview-preserve-kanji-option2) + (japanese-preview-preserve-kanji-option3): + Make cleanup forms more robust. + +2021-03-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix font-latex.el + + * font-latex.el (font-latex-make-built-in-keywords): Defer making + `font-latex-match-*' buffer-local so that it attains sane default + value. + +2021-03-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix void function error + + * font-latex.el (font-latex-make-built-in-keywords): Bring back the + defun of `font-latex-match-*-make` before the defcustom of + `font-latex-match-*-keywords' because the latter depends on the + former through :set function. + Add defvar without value to suppress byte compile warnings for + `font-latex-match-*-keywords'. + +2021-03-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix documents + + * doc/auctex.texi (LaTeX-amsmath-label): Add multline env. and remove + aligned env. since the former gets label while the latter doesn't get. + (Error overview): Delete spurious "on". + * doc/install.texi (Prerequisites): Raise minimum required version to + 24.3. + * doc/preview-faq.texi (Requirements): Add description about + availability on Windows. + Remove reference on table deleted before. + Adapt subsection title. + +2021-03-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Discard obsolete variables + + According to NEWS.24, `font-lock-defaults-alist' was removed at + emacs 24.1. + `font-lock-mode-enable-list' doesn't exist in any NEWS.* nor emacs + 24.3 source. (Xemacs specific variable?) + According to loaddefs.el, `font-lock-auto-fontify' is xemacs variable + corresponding to `global-font-lock-mode'. + + * tex-buf.el: + (): Remove defvar for `font-lock-mode-enable-list', + `font-lock-auto-fontify' and `font-lock-defaults-alist'. + (TeX-region-create): Don't let-bind obsolete variables. + Stop let-binding `font-lock-defaults' since it is buffer local + variable. It doesn't make sense to let-bind it before changing the + current buffer. + Set NOWARN argument to t in `find-file-noselect' to suppress "(New + file)" message in echo area. + +2021-03-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix merging + + * tex-buf.el (TeX-region-update): Use `begin', not `TeX--begin'. + * tex.el (TeX--call-minor-mode): Rename from `tex--call-minor-mode' to + make prefix uniform in AUCTeX. + (): Add autoload declaration of `TeX-previous-error'. + (TeX-output-dir): Use #' instead of ' to quote function name. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Use UTF-8 for all ELisp files + + UTF-8 is the default encoding used for ELisp files nowadays, so + convert the few remaining exceptions. + + * tests/japanese/preview-latex.el: + * tex-jp.el: Remove `coding:` cookie and re-encode into utf-8. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Prefer lexical closures over hand-built lambda forms + + now that we have lexical-binding, we can use closures, which have the + advantage over `(lambda ...) of allowing the byte-compiler to compile + the code, and also makes it possible to Edebug it. + + * preview.el (preview-gs-close, preview-gs-flag-error) + (preview-scale-from-face, preview-gs-flag-error) + (preview-scale-from-face, preview-disabled-string) + (preview-buffer-restore, preview-place-preview) + (preview-reinstate-preview, preview-cache-preamble) + (preview-generate-preview, preview-report-bug): + * toolbar-x.el (toolbarx-emacs-mount-popup-menu): + * tex.el (TeX-mode-specific-command-menu): Replace `(lambda...) with closures. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Activate lexical-binding everywhere + + Also, add an underscore at the beginning of unused arguments to + silence warnings. + + * bib-cite.el (bib-highlight-mouse): Remove unused vars `extent` + and `local-extent-list`. + + * latex.el (LaTeX-label): Remove unused var `label`. + (LaTeX-math-mode-map): Move before first use. + + * preview.el.in (preview-start-dvipng, preview-start-dvips): + Remove unused var `file`. + + * tex-fold.el (TeX-fold-macro-nth-arg): Remove unused var `close-string`. + (TeX-fold-hide-item): Remove unused var `face`. + + * tex-font.el (tex-font-lock-keywords-2): Remove unused var `type`. + + * tex-info.el (Texinfo-mark-section): Rework to avoid relying on + dynamic scoping to access local vars. + + * toolbar-x.el (toolbarx-test-toolbar-type): Remove unused vars + `all-but-def-opts` and `all-opts`; remove always-t var `good-jobs`. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Expose the body of advice to the compiler + + While at it, use `advice-add` when available. + We can drop `defadvice` completely when we bump the required version + to Emacs-24.4, or if/when we add `nadvice` as a required package. + + * context.el (ConTeXt--invalidate-menu): New function. + (ConTeXt-add-environments): Advise with it. + + * latex.el (LaTeX-add-bibliographies): Advise with `TeX-run-style-hooks`. + (LaTeX--invalidate-menus): New function. + (LaTeX-add-environments): Advise with it. + + * preview.el.in (preview--open-for-replace): New function. + (replace-highlight): Advise with it. + + * tex.el (tex--call-minor-mode): New function. + (hack-one-local-variable): Advise with it. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Miscellaneous minor changes + + Move to the next line arguments that are easy to misread. + Fix some commenting style to obey `outline-minor-mode`. + + * auctex.el.in: Don't require `cl-lib` since it's bundled with Emacs-24.3. + + * README: Prefer HTTPS over HTTP/FTP for gnu.org sites. + + * bib-cite.el (bib-find-next): Simplify. + + * latex.el: Use a non-nil default value for `LaTeX-label-function` + so RefTeX can override it with `add-function`. + (LaTeX-label--default): New function, extracted from `LaTeX-label`. + (LaTeX-label): Use it. + (LaTeX-label-function): Use it as default value. + + * toolbar-x.el (toolbarx-emacs-mount-popup-menu): Make the control&data + flow a bit simpler. + (toolbarx-test-image-type, toolbarx-process-dropdown-group): + Use `car-safe` and strength-reduce `eval` to `symbol-value`. + + * style/dinbrief.el: Remove redundant comment. + + * style/kpfonts.el (<toplevel>): Simplify. + + * style/latexinfo.el (LaTeXinfo-mode-map): Move initialization into + the declaration. + + * style/url.el (TeX-arg-urlstyle): + * style/prosper.el (LaTeX-prosper-slide-style-prompt): + Completion tables can be lists of strings. + + * style/tikz.el (TeX-TikZ-single-macro-arg): Strength-reduce `eval` to + `apply`. + + More misc changes + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Remove some XEmacs and old-Emacs code + + Remove uses of `easy-menu-add` and `easy-menu-remove` which have + always been no-op in Emacs and are declared obsolete in Emacs-28. + + * bib-cite.el (bib-cite-setup-highlight-mouse-keymap): Remove Emacs-19 code. + + * tex-buf.el (TeX-region-create): Remove use of variable + `font-lock-maximum-size` declared obsolete in Emacs-24. + + * toolbar-x.el: Remove left over code from XEmacs compatibility. + Remove XEmacs-only `:toolbar` and `:dropdown-toolbar` as well + `:insert` which was only used to select Emacs-only or XEmacs-only entries. + (toolbarx-default-toolbar-meaning-alist): Replace all uses of + `[Emacs-only XEmacs-only]` vectors with the `Emacs-only` form. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Don't quote `lambda` + + Remove some redundant `:group` arguments + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Use #' rather than ' to quote functions + + This helps track down typos, references to functions which don't exist + any more, as well as references to obsolete functions. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + * font-latex.el (font-latex-make-built-in-keywords): Make it a macro + + This lets us expose the code it generates to the compiler without + having to call `byte-compile` explicitly. It also reduces the reliance + on `eval`, saving the souls of many kitten along the way. + + (font-latex-built-in-keyword-classes): Define it at compile-time as well. + (font-latex-keywords-1, font-latex-keywords-2): + Move their definition to `font-latex-make-built-in-keywords`. + (font-latex-keyword-matcher): Define it at compile-time as well. + (font-latex--make-match-defun): Rename from `font-latex-make-match-defun`. + Define it at compile-time as well. Return the function definition (as + the docstring suggests) rather than evaluating it. + (font-latex-make-user-keywords): Adjust call to it. + (<toplevel>): Don't manually call the byte-compiler. + +2021-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + * font-latex.el (font-latex-make-built-in-keywords): Reorder defs + + Move definition of `font-latex-match-*-make` after the `defvar`s of + the vars it uses. + +2021-03-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Prepare for enabling lexical binding in preview.el.in + + * tex-buf.el (TeX-region-update): + * preview.el.in (preview-region, preview-counters) + (preview--counter-information): + Turn a piece of advice for `TeX-region-create' into a helper function + `preview--counter-information', and invoke it at all calls of + `TeX-region-create'. + Use `buffer-substring-no-properties' instead of `buffer-substring' to + save memory usage a bit. + Simplify code by `TeX-current-offset'. + + * tex-buf.el (TeX-region-create): + * preview.el.in (preview-preamble, preview--skip-preamble-region): + Turn another advice for `TeX-region-create' into a helper function + `preview--skip-preamble-region' and call it in `TeX-region-create'. + + * tex-buf.el (TeX-region-extra): Move `defcustom' before its new first + usage. + +2021-03-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Discard `TeX-auto-update' to silence byte compiler + + Now that we add `TeX-safe-auto-write' as local hook in + `write-contents-functions', we don't have to check every time whether + it is AUCTeX buffer. + + * latex.el (BibTeX-auto-store): + * tex-info.el (TeX-texinfo-mode): + Don't set `TeX-auto-update'. + * tex.el (VirTeX-common-initialization): Don't set `TeX-auto-update'. + (TeX-safe-auto-write): Don't check whether it is AUCTeX buffer or + BibTeX buffer. + (TeX-update-style): Consult `major-mode' instead of `TeX-auto-update' + to check whether it is BibTeX buffer. + * bib-cite.el: Don't use `TeX-auto-update'. Consult `TeX-mode-p' to + check whether it is AUCTeX buffer. + +2021-03-17 Al Haji-Ali <a.hajiali@hw.ac.uk> + + Implement the user option TeX-output-dir + + * doc/auctex.texi (Control/Controlling the output): Document the + new TeX-output-dir user option. + + * preview.el.in (preview-pdf2dsc-command): Replace concatenated output + file names with the new expansions. + (preview-LaTeX-command): Use an expansion for filename only. + (preview-create-subdirectory): Retrieve prv path from + TeX-active-master. + (preview-dump-replacements, preview-undump-replacements): Do not + discard --output-directory from the command arguments. + (preview-cache-preamble, preview-document): Call TeX-save-document + with file function instead of filename. + (TeX-inline-preview-internal): Retrieve prv path from TeX-master-file. + + * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-LaTeX-button-alist): + Call TeX-save-document with file function instead of filename. + + * tex-buf.el (TeX-save-document, TeX-command-default) + (TeX-command-query): Change implementation to accept file function as + well as filename as argument. + (TeX--concat-ext): New helper function. + (TeX-command-master, TeX-command-region): Call TeX-command-query with + file function instead of filename. + (TeX-command): Update documentation. + (TeX-active-master-with-quotes): Add new argument for pre-processing + filename. + (TeX-command-sequence): Pass file function to TeX-command-default. + (TeX-run-TeX, TeX-run-index, TeX-LaTeX-sentinel): Call + TeX-active-master instead of concatenating extension to filename. + (TeX-region-file): Change to return paths in TeX-output-dir when + non-nil. + + * tex.el (TeX-command-list, LaTeX-command-style): Change commands to + pass output-directory as an argument. + (TeX-print-command, TeX-printer-list): Use "%d" for dvi files. + (TeX-expand-list-builtin): Add expansions for output files and + directories. + (TeX-clean): Refactor to use the new TeX--clean-extensions-regexp. + (TeX-master-file): Change to return output files inside + TeX-output-file. + (TeX-output-dir): New user option. + (TeX--master-output-dir, TeX--output-dir-arg) + (TeX--clean-extensions-regexp): New function. + (TeX-split-string): Correct a spelling mistake. + +2021-03-06 Arash Esbati <arash@gnu.org> + + Improve style/footmisc.el + + * style/footmisc.el ("footmisc"): Add completion support for some + macros. Support special macros defined only with `splitrule' + option. Improve fontification. + +2021-03-03 Tassilo Horn <tsdh@gnu.org> + + Use "wrap region or query for logo" also in \[hH]ologoVariant + + * style/hologo.el: Use "wrap region or query for logo" also in + \[hH]ologoVariant. + +2021-03-03 Tassilo Horn <tsdh@gnu.org> + + Fix wrapping of active region with \[Hh]ologo macros + + * style/hologo.el (LaTeX-hologo--arg-use-region-or-query-logo-name): + Fix wrapping of logo in active region. + +2021-03-02 Tassilo Horn <tsdh@gnu.org> + + Use active region if it is a logo name. + + * style/hologo.el (LaTeX-hologo--arg-use-region-or-query-logo-name): + New function for the logo name arg of \hologo and \Hologo. + +2021-02-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Enable lexical binding in context-{en,nl}.el + + * context-en.el: + * context-nl.el: + Enable lexical binding. + Update copyright year. + +2021-02-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix preview-cache-preamble after region typeset/preview + + * preview.el.in (preview-cache-preamble): Move `setq' for + `TeX-current-process-region-p' before `let*' so that + `TeX-command-expand' in `let*' should work correctly. + +2021-02-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Enable lexical binding in plain-tex.el + + * plain-tex.el: Enable lexical binding. + Update copyright year. + +2021-02-24 Arash Esbati <arash@gnu.org> + + * style/geometry.el ("geometry"): Fontify \restoregeometry macro. + +2021-02-11 Brian Leung <leungbk@mailfence.com> + + Deprioritize "\\.drv\\'" in auto-mode-alist + + Guix and Nix have derivation files that look like + "/gnu/store/.*\\.drv". To avoid choosing the wrong mode, we prefer to + use more stringent regexps for those corresponding modes, and add the + less-stringent regexp here to the end of auto-mode-alist. + + * latex.el (auto-mode-alist): Deprioritize "\\.drv\\'" in + auto-mode-alist. + +2021-02-09 Arash Esbati <arash@gnu.org> + + Add new style/changes.el + + * Makefile.in (STYLESRC): Add new style. + + * style/changes.el: New file. + +2021-02-09 Arash Esbati <arash@gnu.org> + + Add parsing support to style/comment.el + + * style/comment.el (LaTeX-comment-include-exclude-regexp): + (LaTeX-comment-package-options): New variables. + (LaTeX-comment-auto-cleanup): New function for processing parsed + elements. + +2021-02-06 Arash Esbati <arash@gnu.org> + + Add new style/footnotehyper.el + + * Makefile.in (STYLESRC): Add new style. + + * style/footnotehyper.el ("footnotehyper"): New file. + +2021-02-03 Arash Esbati <arash@gnu.org> + + Add new style/truncate.el + + * Makefile.in (STYLESRC): Add new style. + + * style/truncate.el: New file. + +2021-01-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove eol format suffix from coding tag (bug#46117) + + * doc/preview-dtxdoc.pl: + * tex-jp.el: + Remove "-unix" suffix from coding: tag for local git repos of git for + windows which enable autocrlf feature. + Update copyright year. + +2021-01-25 Arash Esbati <arash@gnu.org> + + Document how to load AUCTeX from a local Git repo + + * doc/install.texi (Advice for non-privileged users): Add + instructions to use AUCTeX directly out of a local Git repo. + +2021-01-24 Arash Esbati <arash@gnu.org> + + Update style/bigdelim.el to package version 2.6 + + * style/bigdelim.el (TeX-arg-bigdelim-brace): Support completion + for more brace choices. Insert the choice in braces only if the + choice doesn't start with a backslash. + ("bigdelim"): Add fontification support. + +2021-01-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Prevent inadvertent destruction of list variable + + * latex.el (LaTeX-common-initialization): Apply `copy-sequence' to the + last argument of `delete-dups'+`append'. + +2021-01-20 Arash Esbati <arash@gnu.org> + + Update style/bigstrut.el to package version 2.6 + + * style/bigstrut.el ("bigstrut"): Remove non-existent macro + \bigstrutsetup. + Add \bigstrutjot to list of lengths. + Add fontification support for \bigstrut. + (TeX-arg-bigstrut): Fix prompt and the usage of + `TeX-argument-prompt'. Make the function more AUCTeX standard. + +2021-01-20 Arash Esbati <arash@gnu.org> + + Update style/multirow.el to package version 2.6 + + * style/multirow.el ("multirow"): Improve arguments of \multirow + macro incl. fontification. + Add \bigstrutjot to list of lengths and not to macros. + Add \STneed macro depending on supertabular package option. + (LaTeX-multirow-package-options): Fix package options. + +2021-01-19 Arash Esbati <arash@gnu.org> + + Update style/thmtools.el to package version 0.72 + + * style/thmtools.el (LaTeX-arg-thmtools-declaretheorem): Query for + the optional argument after the mandatory environment name. + (LaTeX-thmtools-env-label): Use `read-char-choice' instead of + `read-char'. + Set `help-form' in the let-binding. + (LaTeX-thmtools-listoftheorems-key-val): Update key=val's. + ("thmtools"): Fontify also the optional argument after the + mandatory one. Keep the old behavior for compatibility. + +2021-01-19 Tassilo Horn <tsdh@gnu.org> + + Signal an error if auto-parser regexp has too many groups + + In (pathological) documents which activate too many styles adding + entries to TeX-auto-regexp-list, the full regular expression built for + auto-parsing may contain more groups than emacs supports (which is 255 + at this point of time). Therefore, signal a clear error in that case + instead of failing unpredictably by resultant problems. + + Also, fix another spot where duplicate entries could have been added. + + * tex.el (TeX-auto-parse-region): Signal an error if the generated + auto-parser regexp has more than 255 groups. + * latex.el (LaTeX-common-initialization): Ensure we don't add + duplicate entries to TeX-auto-full-regexp-list. + +2021-01-19 Tassilo Horn <tsdh@gnu.org> + + Fix adding duplicates to TeX-auto-regexp-list + + * tex.el (TeX-auto-add-regexp): Check membership with `member' instead + `memq' because the latter won't work with list-valued entries. + +2021-01-15 Arash Esbati <arash@gnu.org> + + Delete kernel commands from styles + + * style/scrbase.el ("scrbase"): + * style/scrpage2.el ("scrpage2"): Delete support for macros + provided by LaTeX kernel. + +2021-01-15 Arash Esbati <arash@gnu.org> + + * style/extramarks.el ("extramarks"): Use reference keyword class. + +2021-01-13 Tassilo Horn <tsdh@gnu.org> + + Fix use-package recipe in install docs (once again) + + * doc/install.texi (Installation): Fix use-package recipe. + +2021-01-12 Arash Esbati <arash@gnu.org> + + Add support for some missing kernel macros + + * font-latex.el (font-latex-built-in-keyword-classes): Add various + \<sectioning>mark to "reference" class. + + * latex.el (LaTeX-common-initialization): Add support for \...mark + macros. + +2021-01-12 Arash Esbati <arash@gnu.org> + + Add new style/extramarks.el + + * Makefile.in (STYLESRC): Add new style. + + * style/extramarks.el: New file. + +2021-01-12 Arash Esbati <arash@gnu.org> + + Update style/fancyhdr.el to package version 4.0 + + * style/fancyhdr.el (TeX-arg-fancyhdr-place): Rename from + `TeX-arg-fancyhdr-position'. Improve list of candidates for + completion. + (LaTeX-fancyhdr-fancypagestyle-regexp): New variable for parsing + user defined pagestyles. + ("fancyhdr"): Update for macros provided by package version 4.0. + Remove completion support for deprecated macros. + Remove macros provided by LaTeX kernel. + Improve fontification support. + (LaTeX-fancyhdr-package-options): Add new package options. + +2021-01-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Support page(box) options for dvipdfmx in graphicx.el + + * style/graphicx.el (LaTeX-arg-graphicx-includegraphics-key-val): + Support page(box) options when the document is to be processed by + dvipdfmx. + (): Update copyright year. + +2021-01-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix off-by-one behavior of preview-latex (bug#39927) + + * preview.el.in (preview-prepare-fast-conversion): Turn newline in + init string into space so that gs waits subsequent input. This newline + caused a spurious appearance of gs prompt "GS>". + +2021-01-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't use `add-to-list' on lexical vars + + * tex.el (TeX-view-program-list, TeX-view-program-selection): + (TeX-add-to-alist): + Don't use `add-to-list' on lexical scope variables. + * tests/tex/utility.el (TeX-adding-to-alist): New test. + (): Enable lexical binding. Update copyright year. + +2021-01-09 Tassilo Horn <tsdh@gnu.org> + + Fix mistake in use-package recipe + + * doc/install.texi (Installation): Fix mistake in use-package recipe. + +2021-01-09 Tassilo Horn <tsdh@gnu.org> + + Fix docstring too wide warnings + + * bib-cite.el (bib-dos-or-os2-variable): Reword/reformat docstring so + that it's less than 80 chars wide. + * context-en.el (ConTeXt-project-structure-list-en) + (ConTeXt-section-block-list-en): Ditto. + * context-nl.el (ConTeXt-project-structure-list-nl) + (ConTeXt-section-block-list-nl): Ditto. + * context.el (ConTeXt-numbered-section-hook) + (ConTeXt-unnumbered-section-hook): Ditto. + * tex-buf.el (TeX-check-engine): Ditto. + +2021-01-09 Tassilo Horn <tsdh@gnu.org> + + Add use-package recipe to installation info docs + + * doc/install.texi (Installation): Add use-package recipe. + +2021-01-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Adapt preview.el.in for `TeX-translate-location-hook' + + * preview.el.in (preview-parse-messages): Transport the values between + dynamic scope variables TeX-translate-location-* and corresponding + lexical scope variables around the call to + `TeX-translate-location-hook'. + Update copyright year. + +2021-01-08 Tassilo Horn <tsdh@gnu.org> + + Fix error reported in <87o8hzto7r.fsf@fastmail.fm> on auctex@gnu.org + + * style/polyglossia.el (LaTeX-polyglossia-active-languages): Don't use + add-to-list on lexical variable. + +2021-01-08 Tassilo Horn <tsdh@gnu.org> + + Declare formerly free vars accessible in TeX-translate-location-hook + + * tex-buf.el (TeX-translate-location-file,TeX-translate-location-offset) + (TeX-translate-location-line,TeX-translate-location-string) + (TeX-translate-location-error,TeX-translate-location-context): New + defvars. + * tex-buf.el (TeX-find-display-help): Bind them before calling + TeX-translate-location-hook. + (TeX-translate-location-hook): Adapt docstring. + +2021-01-08 Ikumi Keita <ikumi@ikumi.que.jp> + + Use proper name rather than obsolete alias + + * latex.el (LaTeX-insert-environment): Use + `LaTeX-after-insert-env-hook' instead of + `LaTeX-after-insert-env-hooks'. + +2021-01-07 Arash Esbati <arash@gnu.org> + + Update style/eso-pic.el to package version 3.0a + + * style/eso-pic.el ("eso-pic"): Don't run the style hook for + `atbegshi' since `eso-pic' doesn't rely on that package anymore. + (LaTeX-eso-pic-package-options-list): Update package options. + +2021-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `write-contents-functions' instead of `write-file-functions' + + * tex.el (VirTeX-common-initialization): + * latex.el (BibTeX-auto-store): + Use `write-contents-functions' instead of `write-file-functions' to + store `TeX-safe-auto-write' because the latter is cleared by C-x + C-w (write-file). + * doc/changes.texi (News in 13.0): Mention the bug fix. + +2021-01-04 Tassilo Horn <tsdh@gnu.org> + + Use frame-monitor-attributes for computing DPI if avail (bug#45596) + + * preview.el.in (preview-get-dpi): New defun. + (preview-get-geometry): Use it for computing the screen DPI (bug#45596) + +2021-01-02 Arash Esbati <arash@gnu.org> + + Remove support for \swshape + + * style/baskervaldx.el ("baskervaldx"): Delete additions for + \swshape macro which is now part of LaTeX kernel and supported via + latex.el and font-latex.el. + +2020-12-29 Tassilo Horn <tsdh@gnu.org> + + Convert tabs to spaces in all *.el.in files according to .dir-locals.el + + Convert tabs to spaces in all lisp files according to .dir-locals.el + +2020-12-29 Tassilo Horn <tsdh@gnu.org> + + URI-encode ? in filename to %3F (bug#45510) + + * tex.el (TeX-evince-sync-view-1): Evince's dbus method wants an URI + where ? is properly encoded as %3F so do so (bug#45510). + +2020-12-29 Tassilo Horn <tsdh@gnu.org> + + Untabify tex.el. + +2020-12-27 Arash Esbati <arash@gnu.org> + + * .dir-locals.el: Add new file. + +2020-12-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Indent additional texts + + * latex.el (LaTeX-insert-environment): Indent texts sent after the + inserted environment. + +2020-12-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Fixup dropping old implementations for viewers + + * tex-buf.el (TeX-output-style-check): Remove function only useful for + old view implementations. + +2020-12-22 Arash Esbati <arash@gnu.org> + + Lift required GNU Emacs version to 24.3 + + * RELEASE (Requirements): Mention that AUCTeX now requires at + least GNU Emacs 24.3. + + * auctex.el.in: Lift GNU Emacs version to 24.3 and cl-lib to 1.0 + for `Package-Requires' header. + + * configure.ac (EMACS_CHECK_VERSION): Check for 24.3. + + * doc/changes.texi: Add entry for required Emacs version. + + * doc/faq.texi: + * doc/preview-faq.texi (Requirements): Change tested/required + Emacs version. + + * tex-site.el.in: + * tex.el: Consider Emacs' minor version as well before reporting + an error. + +2020-12-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Delete bogus defvar + + * tex-buf.el: Remove bogus defvar for `compilation-in-progress'. There + is a bare defvar for it already far above these lines. + +2020-12-22 Ikumi Keita <ikumi@ikumi.que.jp> + + Drop old implementations for viewers + + * tex.el (TeX-expand-list-builtin): Remove entries for "%v" and "%vv". + (TeX-view-style, TeX-output-view-style): Remove. + * doc/auctex.texi (Starting Viewers): Remove description about old + implementations. + * doc/changes.texi (News in 13.0): Mention the above changes. + * tex-mik.el: Remove entries for TeX-view-style and + TeX-output-view-style. + +2020-12-21 Tassilo Horn <tsdh@gnu.org> + + Document lexical-binding changes in context.el. + + * doc/changes.texi: Document lexical-binding changes in context.el. + * context.el: Don't reference non-existing ConTeXt-section-hook but + ConTeXt-numbered-section-hook. + +2020-12-18 Tassilo Horn <tsdh@gnu.org> + + Document lexical binding changes. + + * doc/changes.texi: Document lexical binding changes. + +2020-12-03 Tassilo Horn <tsdh@gnu.org> + + Fix compile "Error: symbol-value cannot use lexical var ‘amsenv’" + + * style/empheq.el (LaTeX-empheq-env): Don't call symbol-value on lexical + variable amsenv. + +2020-12-02 Arash Esbati <arash@gnu.org> + + Add new style/scholax.el + + * Makefile.in (STYLESRC): Add new style. + + * style/scholax.el: New file. + +2020-11-10 Arash Esbati <arash@gnu.org> + + Update style/subfiles.el to package version 2.1 + + * style/subfiles.el (LaTeX-subfiles-class-options): Use \' to + match the empty string at the end of the file extension. + ("subfiles"): Add support for \subfileinclude macro. + +2020-10-31 Tassilo Horn <tsdh@gnu.org> + + Rename LaTeX-dialect to TeX-dialect. + + * tex.el (TeX-dialect): Renamed from LaTeX-dialect and move from latex.el to + tex.el. + * doc/auctex.texi: Adapt docs. + * doc/changes.texi: Mention in changes for AUCTeX 13. + * style/*.el: Adapt all style files accordingly. + +2020-10-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Ensure the trailing slash for directory + + * tex.el (TeX-parse-path, TeX-strip-extension): Apply + `file-name-as-directory' for `TeX-macro-global' and + `TeX-macro-private' in case their entries lack the trailing slash. + * tex-site.el.in (TeX-auto-global): Delete obsolete sentence. + +2020-10-24 Tassilo Horn <tsdh@gnu.org> + + Delete unused ispell code from 1994. + + * tex.el (ispell-tex-buffer-p): Delete defun. + (ispell-enable-tex-parser): Don't set undefined variable. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Put point after the graphic file argrument + + * style/graphicx.el (LaTeX-includegraphics-extensions): Delimit + the regexp with \\' instead of $. + (LaTeX-arg-includegraphics): Rewrite the function in order to + comply with AUCTeX insertion hooks. Put point after the braced + group once the file argument in inserted into buffer. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Fix insertion of unnecessary backslash + + * style/amsthm.el (LaTeX-arg-amsthm-fontdecl): + * style/ntheorem.el (LaTeX-arg-ntheorem-fontdecl): Don't insert a + backslash if the query for font declaration is left empty. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Add new style/appendix.el + + * Makefile.in (STYLESRC): Add new style. + + * style/appendix.el: New file. + +2020-10-23 Arash Esbati <arash@gnu.org> + + * tex-ispell.el: Enable lexical-binding. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Improve style/amsthm.el + + * style/amsthm.el (LaTeX-amsthm-theoremstyle-list): Delete + variable. + (LaTeX-arg-amsthm-fontdecl): Adjust `prompt' in + `TeX-argument-prompt' and don't use the 5. argument of + `TeX-completing-read-multiple'. + (LaTeX-amsthm-auto-cleanup): Remove the part for the deleted + `LaTeX-amsthm-theoremstyle-list'. + ("amsthm"): Use `LaTeX-add-amsthm-newtheoremstyles' for + predefined styles. + Adjust the hook for deleted variable. + +2020-10-23 Tassilo Horn <tsdh@gnu.org> + + Enable lexical-binding for texmathp.el + + * texmathp.el (texmathp-compile): Use `push' on places rather than `set' and + `symbol-value' on locals partly pointing to symbols naming globals. + +2020-10-23 Arash Esbati <arash@gnu.org> + + * style/fancyvrb.el: Replace dynamically bound `optional'. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Update style/fancyvrb.el to package version 3.6 + + * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options): Add the + "reflabel" key. + (LaTeX-fancyvrb-env-reflabel-key-val) + (LaTeX-fancyvrb-reftex-label-context-function): New functions. + (LaTeX-fancyvrb-arg-define-environment): Use + `LaTeX-fancyvrb-env-reflabel-key-val'. + (LaTeX-fancyvrb-key-val-label-regexp): New variable added to + AUCTeX parser. + ("fancyvrb"): Run `font-latex-set-syntactic-keywords' in the hook + if fontification is enabled. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Add missing argument to function body + + * style/thmtools.el (LaTeX-thmtools-declaretheoremstyle-key-val) + (LaTeX-thmtools-declaretheorem-key-val): Add the missing `prompt' + argument. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Remove `TeX-arg-none' + + * style/alphanum.el (TeX-arg-none): Remove function and use + `TeX-arg-literal' instead. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Adapt styles to lexical-binding + + * style/arabxetex.el ("arabxetex"): + * style/babel.el ("babel"): + * style/doc.el ("doc"): + * style/enumitem.el ("enumitem"): + * style/exam.el ("exam"): + * style/floatrow.el ("floatrow"): + * style/fontspec.el ("fontspec"): + * style/graphicx.el ("graphicx"): + * style/hologo.el ("hologo"): + * style/ltugboat.el ("ltugboat"): + * style/mdframed.el ("mdframed"): + * style/menukeys.el ("menukeys"): + * style/moodle.el ("moodle"): + * style/natbib.el ("natbib"): + * style/ntheorem.el ("ntheorem"): + * style/paracol.el ("paracol"): + * style/pythontex.el ("pythontex"): + * style/splitidx.el ("splitidx"): + * style/tcolorbox.el ("tcolorbox"): + * style/tex-live.el ("tex-live"): + * style/thmtools.el ("thmtools"): + * style/titleps.el ("titleps"): + * style/titlesec.el ("titlesec"): + * style/titletoc.el ("titletoc"): + * style/xcolor.el ("xcolor"): Replace occurrences of dynamically + bound `optional' with constant nil or t. + + * style/harvard.el ("harvard"): Remove unnecessary quoting of + `lambda'. + + * style/xcolor.el (LaTeX-xcolor-color-models): Remove unnecessary + `symbol-value'. + +2020-10-23 Arash Esbati <arash@gnu.org> + + Enable lexical-binding in all style files. + +2020-10-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Use declared dynamic variable in tex-jp + + * tex-jp.el (TeX-expand-list-builtin): Replace former dynamic var + `pos' with `TeX-expand-pos'. + (): Enable lexical binding. + Move `coding' tag to the File Local Variable section at EOF. + Update copyright year. + +2020-10-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Simplify nested `let's + + * tex-buf.el (TeX-active-master-with-quotes): Simplify nested `let's + into singe one. + +2020-10-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Make "%o" compatible again with file name with spaces + + * tex-buf.el (TeX-active-master-with-quotes): Rename from + `TeX--master-or-region-file-with-extra-quotes' and make public. + Incorporate adjust of `TeX-expand-pos' from `TeX-command-expand'. + (TeX-command-expand): Simplify. + * tex.el (TeX-expand-list-builtin): Use renamed function instead of + `TeX-active-master'. + * tests/tex/command-expansion.el (TeX-command-expand-skip-file-name): + Include "%o" in test. + (TeX-command-expand-file-name-with-spaces): New test. + (TeX-command-detokenize): Add case where `TeX-master' has space. + +2020-10-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Arrange test condition + + * latex.el (LaTeX-env-args): Just test nil or not since + `TeX-exit-mark' is now always bound. + +2020-10-23 Tassilo Horn <tsdh@gnu.org> + + Enable lexical-binding for AUCTeX core files + + * tex.el: Enable lexical-binding. + (TeX-command-text,TeX-command-pos): Moved from tex-buf.el. + (TeX-expand-pos,TeX-expand-command): New defvars used in place of `pos' and + `command' in TeX-expand-list{,-builtin} entries. + (TeX-expand-list-builtin): Use TeX-expand-pos and TeX-expand-command (instead + of pos and command). Use TeX-active-master instead of formerly dynamically + bound `file'. + (TeX-view-command-raw): Adapt to TeX-command-expand signature change. + (TeX-exit-mark): New defvar. + (TeX-parse-macro): Adapt docstring; bind and use TeX-exit-mark instead of + exit-mark. + (TeX-last-optional-rejected): New defvar. + (TeX-parse-arguments): Use TeX-last-optional-rejected instead of + last-optional-rejected. + (TeX-parse-argument): Use TeX-exit-mark instead of exit-mark. + (TeX-argument-insert): Use TeX-exit-mark and TeX-last-optional-rejected instead + of the former unprefixed variables. + (TeX-safe-auto-write,TeX-auto-untabify,TeX-auto-parse-region,TeX-verbatim-p) + (TeX-submit-bug-report): Prefix unused var with _. + (TeX-mode-specific-command-menu-entries): Don't bind `file'. + (TeX-doc): Remove unused var `doc'. + (TeX-run-ispell): Remove unused var `found'. + (TeX-ispell-document): Use `when' instead of `if' with `progn'. + * tex-buf.el: Enable lexical-binding. + (TeX-command-expand): Remove file argument but use TeX-active-master instead. + (TeX-command): Rename file argument to file-fn; adapt to TeX-command-expand + signature change. + (TeX--master-or-region-file-with-extra-quotes): Remove file-fn argument. + * latex.el: Enable lexical-binding. + (LaTeX-title,LaTeX-name,LaTeX-level,LaTeX-done-mark,LaTeX-toc): New defvars. + (LaTeX-section): Bind them. + (LaTeX-section-hook): Adapt docstring to the new defvars. + (LaTeX-section-section): Ditto, and use the new defvars. + (LaTeX-section-heading,LaTeX-section-title,LaTeX-section-toc,LaTeX-section-label): + Use the new defvars. + (LaTeX-env-args): Use TeX-exit-mark instead of exit-mark. + (TeX-arg-index): Prefix unused argument args with _. + (TeX-arg-cite): Prefix unused argument definition with _. + (LaTeX-mark-environment,LaTeX-forward-paragraph,LaTeX-backward-paragraph) + (LaTeX-narrow-to-environment): Use _ for unused dotimes counter variable. + (LaTeX-check-insert-macro-default-style): Use TeX-last-optional-rejected + instead of last-optional-rejected. + * context.el: Enable lexical-binding. + (ConTeXt-title,ConTeXt-name,ConTeXt-level,ConTeXt-done-mark,ConTeXt-reference): + New defvars. + (ConTeXt-section): Bind them. + (ConTeXt-numbered-section-hook): Adapt docstring to the new defvars. + (ConTeXt-unnumbered-section-hook): Ditto. + (ConTeXt-numbered-section-heading,ConTeXt-unnumbered-section-heading) + (ConTeXt-section-section,ConTeXt-section-ref): Use the new defvars. + * preview.el.in (preview-generate-preview): Remove region-p argument. + (preview-start-dvipng,preview-start-dvips) + (preview-cache-preamble): Adapt to TeX-command-expand and + preview-generate-preview signature change. + (preview-region, preview-document): Ditto. + * style/bicaption.el (LaTeX-arg-bicaption-bicaption): Use + TeX-last-optional-rejected instead of last-optional-rejected. + * style/booktabs.el ("booktabs"): Menion TeX-last-optional-rejected in comment. + * style/caption.el (LaTeX-arg-caption-captionbox): Use + TeX-last-optional-rejected instead of last-optional-rejected. + * style/color.el (TeX-arg-color,(TeX-arg-color-fcolorbox): Use + TeX-last-optional-rejected instead of last-optional-rejected. + * style/exam.el: Enable lexical-binding. + (LaTeX-exam-insert-item): Use LaTeX-current-environment instead of dynamically + bound `environment'. + * style/floatrow.el (LaTeX-floatrow-arg-floatbox): Use + TeX-last-optional-rejected instead of last-optional-rejected. + * style/ifluatex.el (LaTeX-ifluatex-set-TeX-exit-mark): Use TeX-exit-mark + instead of exit-mark. + * style/xcolor.el (TeX-arg-xcolor-definecolor,TeX-arg-xcolor-definecolorset): + (TeX-arg-xcolor,TeX-arg-xcolor-fcolorbox): Use TeX-last-optional-rejected + instead of last-optional-rejected. + * tests/japanese/preview-latex.el (japanese-preview-preserve-kanji-option2) + (japanese-preview-preserve-kanji-option3): Adapt to TeX-command-expand + signature change. + * tests/tex/command-expansion.el (TeX-command-expansion) + (TeX-command-expansion-errors,TeX-command-detokenize) + (TeX-command-expand-skip-file-name,TeX-command-expand-active-master): Adapt to + TeX-command-expand signature change. + * doc/auctex.texi (Sectioning): Describe LaTeX-level, LaTeX-name, LaTeX-title, + LaTeX-toc, and LaTeX-done-mark instead of the former unprefixed vars. + +2020-10-18 Mosè Giordano <mose@gnu.org> + + * Version 12.3 released. + +2020-10-18 Mosè Giordano <mose@gnu.org> + + Mark default argument to `LaTeX-arg-polyglossia-lang' as optional + + * style/polyglossia.el (LaTeX-arg-polyglossia-lang): The `default' argument + isn't currently used, mark it as ignored. + +2020-10-10 Mosè Giordano <mose@gnu.org> + + Prepare for upcoming release + +2020-08-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Simplify mode line for emacs 27 + + * tex-buf.el: Don't add an entry in `minor-mode-alist' for + `compilation-in-progress'. In emacs 27, compile.el adds a similar + entry in `mode-line-modes'. + +2020-08-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix document + + * doc/auctex.texi (Fontification of math): Delete incorrect + description. + +2020-08-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Restore all math environments in texmathp.el + + * texmathp.el (texmathp-tex-commands-default): Restore all math + environments from style files. The idea to update t-t-c-d by style + files afterwards fails when texmathp is used solely in external + packages like org mode. + * style/amsmath.el: + * style/breqn.el: + * style/empheq.el: + * style/mathtools.el: + Adjust in accord with the above change. + * doc/changes.texi: Delete relevant entry. + +2020-08-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Prepare for pdf output for PSTricks documents + + * style/pstricks.el ("pstricks"): Prepare for pdf output rather than + turn off PDF mode. + (): Update copyright year. + * doc/changes.texi: Mention above change. + +2020-07-28 Arash Esbati <arash@gnu.org> + + Add an extra check for tex-buf.el in some style hooks + + * style/arabxetex.el ("arabxetex"): + * style/bidi.el ("bidi"): + * style/fontspec.el ("fontspec"): + * style/polyglossia.el ("polyglossia"): Check if "tex-buf.el" is + loaded and require it otherwise. `TeX-check-engine-add-engines' + is defined in "tex-buf.el" and the hook would exit too early if + the library isn't loaded. + +2020-07-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Merge prv-emacs.el into preview.el.in + + * preview.el.in: Merge all contents of prv-emacs.el. + * prv-emacs.el: Delete. + * Makefile.in: + * configure.ac: + Drop prv-emacs.el. + +2020-07-22 Arash Esbati <arash@gnu.org> + + Treat \choice like \item + + * style/exam.el ("exam"): Add "choice" to `LaTeX-item-regexp'. + Simplify regexp for "subpart" and "subsubpart". + +2020-07-19 Arash Esbati <arash@gnu.org> + + Update style/csquotes.el to package version 5.2j + + * style/csquotes.el: Track changes in package version 5.2j. + Remove deprecated macros, improve query for language argument. + Add keyval query of package options. + (LaTeX-csquotes-insert-environment): Remove function and use + `LaTeX-env-args' instead. + +2020-07-13 Ikumi Keita <ikumi@ikumi.que.jp> + + Add support of \tag for texmathp + + * style/amsmath.el (): Add entries for \tag and \tag* to + `texmathp-tex-commands-default'. + +2020-07-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Cater for case where fontification match goes over limit + + * font-latex.el (font-latex-match-quotation): Cater for case + where fontification match goes over limit. + Drop `string-make-multibyte'. It's no longer necessary because + all supported emacsen handle multibyte strings well enough. + (font-latex--updated-region-end): Adjust comments. + +2020-07-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix previous commit and add new test + + * font-latex.el (font-latex-extend-region-backwards-quotation): Move + the point back to the correct position when the inner loop search + fails. + * tests/latex/font-latex-test.el + (font-latex-extend-region-backwards-quotation): New test. + +2020-07-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't extend font lock region too eagerly (bug#42267) + + * font-latex.el (font-latex-extend-region-backwards-quotation): If + there is no matching open quote, don't extend the font lock region. + +2020-07-03 Arash Esbati <arash@gnu.org> + + Add short verb characters to `ispell-tex-skip-alist' + + * style/shortvrb.el ("shortvrb"): Add entries in + `LaTeX-shortvrb-chars to `ispell-tex-skip-alist' in order to skip + verbatim content during spell checking. + +2020-07-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Ajust document + + * doc/preview-latex.texi (Key bindings and user-level lisp functions): + * preview.el.in (preview-at-point): + Delete mention about zmacs-regions. + * doc/auctex.texi (Known problems): Delete comment which is no longer + valid because the current highlighting of $...$ is search-based, not + syntactic. + +2020-07-01 Arash Esbati <arash@gnu.org> + + Support \newblock macro + + * latex.el (LaTeX-common-initialization): Add entry for \newblock + marco. + Add "bibindent" to list of known lengths. + (LaTeX-paragraph-commands-internal): Add "newblock". + +2020-06-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Get rid of gabage in generated texi file + + * doc/preview-dtxdoc.pl (MAIN): Add rule to delete dtx comment ^^A. + (): Add coding tag. Update copyright year. + +2020-06-28 Arash Esbati <arash@gnu.org> + + Update style/xparse.el to package dated 2020-03-06 + + * style/xparse.el: Update style to package version 2020-03-06 + incl. auto-parsing capabilities. Fix fontification of provided + macros. + +2020-06-27 Tassilo Horn <tsdh@gnu.org> + + Document deprecation of font-latex-update-font-lock + + * doc/changes.texi: Document deprecation of font-latex-update-font-lock. + +2020-06-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Accommodate preview.dtx to new font-latex.el + + * latex/preview.dtx: Add "^^A$" so that |$| doesn't mess up the + highlighting of TeX codes at later part. + * doc/auctex.texi: Add mention about usage of "^^A$" in docTeX + documents. + +2020-06-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Add TODO item about remove-style feature + + * doc/todo.texi (Mid-term Goals): Add an item about remove-style + feature. + * doc/changes.texi (News in 12.3): Fix typo. + +2020-06-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Improve conformance to code conventions, and documents + + * font-latex.el (font-latex-update-math-env): Rename by changing "--" + to "-" in function name. + Don't alter user customize option `font-latex-math-environments'. In + order to achieve that, use always `texmathp-tex-commands1' for + input and omit argument LIST. + * style/empheq.el: Arrange in accord with the above changes. + * style/amsmath.el: + * style/breqn.el: + * style/mathtools.el: + Arrange in accord with the above changes. + Use `cl-pushnew' instead of `add-to-list' and require cl-lib in order + to do that. + * doc/changes.texi (News in 12.3): + * texmathp.el: + Mention change about support for AMS-LaTeX and packages mathtools, + empheq and breqn. + +2020-06-17 Tassilo Horn <tsdh@gnu.org> + + Don't call TeX-remove-style in TeX-arg-document. + + * latex.el (TeX-arg-document): Don't call TeX-arg-document. + +2020-06-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Use constant regexp to fontify math environments + + * font-latex.el (font-latex--match-math-envII-regexp): New internal + variable to store regexp to search math environments such as + "equation". + (font-latex-match-math-envII): Use it. + (font-latex--update-math-env): New function to update + `font-latex-math-environments' and build + `font-latex--match-math-envII-regexp' from it. + (font-latex-math-environments-from-texmathp): Remove. + (font-latex-math-environments): Change default value to nil and + initialize at top level by new function. + * style/breqn.el: + * style/empheq.el: + * style/mathtools.el: + Arrange in accord with the above change. + * style/amsmath.el: + Arrange in accord with the above change. + Add fontification rule for \boxed{}. + * doc/auctex.texi: + Add instruction to convert customization. + +2020-06-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix regression of font lock + + * font-latex.el (font-latex-match-math-envII): Store the position of + "\begin{foo}" as (match-beginnig 0) so that `font-lock-multiline' text + property covers it. Store the range of math expression as + subexpression 1. + (font-latex-make-user-keywords): Arrange in accord with the above + change. + +2020-06-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix typos + + * doc/changes.texi (News in 12.3): + * tests/latex/fontification-general.tex (AUCTeX fontification): + Fix typos. + +2020-06-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Update documents + + * doc/auctex.texi (Fontification of math): + * doc/changes.texi (News in 12.3): + * font-latex.el (font-latex-math-environments): + Document that variable `font-latex-math-environments' is no longer + suitable for personal customization and recommend to use + `texmathp-tex-commands' instead. + * tests/latex/fontification-general.tex: Mention new function + `font-latex-extend-region-backwards-math' + +2020-06-15 Ikumi Keita <ikumi@ikumi.que.jp> + + * texmathp.el: Add comment about additional bug. + +2020-06-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Recover compatibility for older emacsen + + * font-latex.el (font-latex-fontify-region): Add check for return + value from `font-lock-default-fontify-region'. + +2020-06-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Reconsider region extension + + * font-latex.el (font-latex-fontify-region): Consider cases that + `font-lock-extend-region-functions' extends the region inside + `font-lock-default-fontify-region'. Use the return value from it to + construct the correct region. + (font-latex-match-math-env): + (font-latex-match-math-envII): + (font-latex-match-dollar-math): + Raise `font-latex--updated-region-end' to at least LIMIT when + necessary. + (font-latex--updated-region-end): Fix comments. + +2020-06-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Delete overhead in extending font lock range of math expression + + * font-latex.el (font-latex-math-environments-from-texmathp): New + helper function. + (font-latex-math-environments): Take default value using the above + function. + (font-latex-extend-region-backwards-math): Rename from + `font-latex-extend-region-backwards-dollar-math' and include the + functionality of `font-latex-extend-region-backwards-math-env' and + `font-latex-extend-region-backwards-math-envII'. + (font-latex-extend-region-backwards-math-env): + (font-latex-extend-region-backwards-math-envII): + Remove. + (font-latex-setup): Simplify according to the above change. + * texmathp.el (texmathp-tex-commands-default): Move entries not in + standard LaTeX to the respective style files. + * style/amsmath.el (): + * style/breqn.el (): + * style/empheq.el (): + * style/mathtools.el (): + Add package specific entries to `texmathp-tex-commands-default' and + take additions for `font-latex-math-environments' from it rather than + adding constant entries. + +2020-06-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Update region extension in font-latex.el + + * font-latex.el (font-latex--updated-region-end): New variable to + record the end of the region that fontification actually took place. + (font-latex-fontify-region): New function to utilize it. + (font-latex-setup): Assign it to `font-lock-fontify-region-function'. + (font-latex-match-math-env): Search closing tag beyond limit honoring + `font-latex-multiline-boundary'. + Use new variable. + (font-latex-match-math-envII): + (font-latex-match-dollar-math): + Use new variable. + +2020-06-14 Uwe Brauer <oub@mat.ucm.es> + + Add support for algopseudocde style + + * Makefile.in (STYLESRC): Add algopseudocde style + + * style/algpseudocode.el: Add support for the algopseudocde (algorithmcx) + style + +2020-06-14 Uwe Brauer <oub@mat.ucm.es> + + Add support for algorithm style + + * Makefile.in (STYLESRC): Add algorithm style + + * style/algorithm.el: Add support for the algorithm style + +2020-06-13 Ikumi Keita <ikumi@ikumi.que.jp> + + Ignore 3 consective $'s properly + + * font-latex.el (font-latex-match-dollar-math): Ignore 3 or more + consecutive $'s when searching opening of $...$ or $$...$$, instead of + stopping to return nil. + * tests/latex/font-latex-test.el: New test. + +2020-06-11 Tassilo Horn <tsdh@gnu.org> + + Trigger refontification in font-latex-add-to-syntax-alist. + + * font-latex.el (font-latex-add-to-syntax-alist): Trigger refontification. + +2020-06-11 Tassilo Horn <tsdh@gnu.org> + + Omit hard font-lock reset also in font-latex-add-to-syntax-alist + + * font-latex.el (font-latex-add-to-syntax-alist): Don't nilify + font-lock-set-defaults but adjust font-lock-syntax-table directly as suggested + by Ikumi Keita on auctex-devel. + +2020-06-10 Tassilo Horn <tsdh@gnu.org> + + Obsolete font-latex-update-font-lock (bug#37945) + + * font-latex.el (font-latex-add-keywords): Don't call + font-latex-update-font-lock but font-lock-flush. + (font-latex-update-font-lock): Make obsolete and emit a warning when called. + * style/alltt.el: Adapt, i.e., don't call font-latex-update-font-lock but maybe + font-latex-set-syntactic-keywords. + * style/beamer.el: Dito. + * style/comment.el: Dito. + * style/expl3.el: Dito. + * style/fancyhdr.el: Dito. + * style/fancyvrb.el: Dito. + * style/fvextra.el: Dito. + * style/hyperref.el: Dito. + * style/listings.el: Dito. + * style/ltxguide.el: Dito. + * style/minted.el: Dito. + * style/pythontex.el: Dito. + * style/revtex4-2.el: Dito. + * style/tex-live.el: Dito. + * style/url.el: Dito. + * style/verbatim.el: Dito. + +2020-06-09 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/changes.texi: Delete words inappropriate for raw file. + +2020-06-08 Ikumi Keita <ikumi@ikumi.que.jp> + + Complement document + + * doc/changes.texi: Mention workaround for new incompatibility. + * doc/auctex.texi: Add missing entry to TOC. + +2020-06-07 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/changes.texi (News in 12.3): Add news about fix of bug#33139. + +2020-06-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Use search-based fontification for $...$ (bug#33139) + + It turned out that using "text quotes" syntax for "$" in + `font-lock-syntax-table' sometimes leads to scrambled fontification + about in-line math $...$ (bug#33139). That's because conflicting + results of `syntax-ppss' are compiled into syntax-ppss cache as + explained in: + https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02725.html + We, Keita, Tassilo and Arash discussed this issue and decided to use + search-based fontification for $...$ since syntactic fontification for + $...$ doesn't seem prospective with regard to this bug. + + * font-latex.el (font-latex-match-dollar-math): + (font-latex-find-dollar-math,font-latex-extend-region-backwards-dollar-math): + New functions to do search-based fontification for $...$. + Fontification facility for $$...$$ is merged into them. + (font-latex-make-user-keywords,font-latex-setup): Use new functions. + (font-latex-syntax-alist): Don't change syntax of "$" during font lock. + (font-latex-syntactic-face-function): Simplify. + +2020-05-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Simplify regexp in texmathp.el + + * texmathp.el (texmathp-compile): Simplify regexp. In [^...] backslash + and dollar have no special meaning so they can (should) be raw. + +2020-05-28 Stefan Monnier <monnier@iro.umontreal.ca> + + Don't make TeX-remove-style-hook buffer-local. + + * tex.el (TeX-remove-style-hook): Not buffer-local anymore. + +2020-05-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix false negative of texmathp (bug#41559) + + * texmathp.el (texmathp-compile): Fix `texmathp-onoff-regexp' to allow + switch to begin at (point-min). + Use `regexp-opt' instead of `mapconcat'+`regexp-quote'. + (texmathp): Use `>=' instead of `>' so that match is updated even when + arg-on or sw-on begins at (point-min). + * tests/latex/texmathp-test.el: New test. + +2020-05-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix regression of unfontify-region + + * font-latex.el (font-latex-unfontify-region): Restore `invisible' as + removed property. My commit on Jan 7 was partially wrong. It kept "^" + and "_" invisible even when commented out if + `font-latex-fontify-script' is `invisible'. + +2020-05-22 Arash Esbati <arash@gnu.org> + + Fontify content of comment environment + + * style/verbatim.el ("verbatim"): Add fontification support for + comment environment. Delete unnecessary `function' in the hook. + +2020-05-17 Tassilo Horn <tsdh@gnu.org> + + Empty commit fixing ChangeLog. + + * font-latex.el (font-latex-syntax-alist): This variable has not been deleted + as suggested by the previous entry. + (font-latex-extend-region-functions): Delete defvar. Now set via + `font-lock-defaults'. + +2020-05-17 Tassilo Horn <tsdh@gnu.org> + + Modernize font-latex.el + + - Use a syntax-propertize-function. + - Use normal font-lock-extend-region-functions. + - Add a function to syntax-propertize-extend-region-functions. + - Use lexical-binding. + + * font-latex.el: Use lexical-binding. + (font-latex-syntax-alist): Delete defvar. Now set via `font-lock-defaults'. + (font-latex-syntax-propertize-function): New defun being set as + `syntax-propertize-function'. + (font-latex-extend-region-backwards-command-with-args, + font-latex-extend-region-backwards-command-in-braces, + font-latex-extend-region-backwards-math-env, + font-latex-extend-region-backwards-math-envII, + font-latex-extend-region-backwards-quotation): Convert to normal + `font-lock-extend-region-functions'. + (font-latex-sp-extend-region-backwards-verb-env): New defun used in + `syntax-propertize-extend-region-functions'. + (font-latex-setup): Set `font-lock-extend-region-functions', + `syntax-propertize-extend-region-functions', and `syntax-propertize-function' + via `font-lock-defaults'. + (font-latex-jit-lock-force-redisplay, font-latex-fontify-region): Delete + defuns. + (font-latex-unfontify-region): Remove unused lexical variable. + (font-latex-script-char): Mark argument as ignored to silence the + byte-compiler. + +2020-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Update all mode lines + + * tex-buf.el (TeX-command-sentinel): Supply argument t for + `force-mode-line-update' and discard useless `with-current-buffer'. + * preview.el.in: Replace all + `(set-buffer-modified-p (buffer-modified-p))' with + `(force-mode-line-update)' and remove `sit-for' calls accompanying + them. + +2020-04-20 Arash Esbati <arash@gnu.org> + + Update style/breqn.el to package version 0.98j + + * style/breqn.el (LaTeX-breqn-key-val-options): Delete no-op keys + "background" and "color". + (LaTeX-breqn-key-val-options-local): Delete now unneeded variable, + also from the style hook. + (LaTeX-breqn-env): Use `LaTeX-breqn-key-val-options' instead of + `LaTeX-breqn-key-val-options-local'. + (LaTeX-breqn-update-color-keys): Delete function and entry for + `TeX-auto-cleanup-hook'. + +2020-04-11 Tassilo Horn <tsdh@gnu.org> + + Fix some regexp issues reported by relint. + + * latex.el (LaTeX-209-to-2e): Fix regexp issues reported by relint. + * tex-buf.el (LaTeX-warnings-regexp, TeX-LaTeX-sentinel, TeX-parse-error): + Dito. + +2020-04-09 Pieter Pareit <pieter.pareit@gmail.com> (tiny change) + + Fix y-or-n-p query prompts + + * style/prosper.el (LaTeX-prosper-insert-slide): Fix query prompt. + ("prosper"): Delete unnecessary (funtion ...) in the hook. + + * tex-buf.el (TeX-check-engine): + * tex-wizard.el (TeX-wizard): Fix query prompt. + +2020-04-09 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Document latest changes. + +2020-04-08 Arash Esbati <arash@gnu.org> + + Track LaTeX kernel changes for textcomp package + + * font-latex.el (font-latex-built-in-keyword-classes): Add entry + for \legacyoldstylenums to type-command class. + + * latex.el (LaTeX-common-initialization): Move all entries from + textcomp.el into latex.el since the macros are part of kernel with + 2020-02-02 release. + Add support for \legacyoldstylenums. + + * style/textcomp.el: Move all entries to latex.el. + (LaTeX-textcomp-package-options): Update options. + +2020-04-07 Arash Esbati <arash@gnu.org> + + Load caption style when asking for bicaption package options + + * style/bicaption.el (LaTeX-bicaption-package-options): Load + "caption" style when making the query for package options. + +2020-04-06 Arash Esbati <arash@gnu.org> + + Load caption style before asking for package options + + * style/subcaption.el (LaTeX-subcaption-package-options): Load + "caption" style in order to make `LaTeX-caption-key-val-options' + defined when calling the function. (Emacs bug#40464) + +2020-04-05 Ikumi Keita <ikumi@ikumi.que.jp> + + * preview.el.in (preview-gs-open): Use wrapper function. + +2020-03-29 Arash Esbati <arash@gnu.org> + + Add new style/tex-live.el + + * Makefile.in (STYLESRC): Add new style. + + * style/tex-live.el: New file. + +2020-03-26 Arash Esbati <arash@gnu.org> + + Update style/listings.el + + * style/listings.el (LaTeX-listings-key-val-options): Add + "consecutivenumbers" key. + ("listings"): Add \lstlistingnamestyle and \thelstlisting macros. + +2020-03-26 Arash Esbati <arash@gnu.org> + + Add new style/overpic.el + + * Makefile.in (STYLESRC): Add new style. + + * style/overpic.el: New file. + +2020-03-23 Arash Esbati <arash@gnu.org> + + Fix regexp for parsing optional arguments + + * latex.el (LaTeX-auto-minimal-regexp-list): + (LaTeX-auto-class-regexp-list): Fix regexp for parsing optional + argument of \usepackage, \RequirePackage and \LoadClass. + +2020-02-14 Arash Esbati <arash@gnu.org> + + Add new style/ltxguide.el + + * Makefile.in (STYLESRC): Add new style. + + * style/ltxguide.el: New file. + +2020-01-25 Uwe Brauer <oub@mat.ucm.es> + + Add support for some missing environments + + * style/exam.el (LaTeX-exam-insert-item): + ("exam"): Add support for various "choices" and "checkboxes" + environments. + + ("exam"): Append the entries added to `LaTeX-item-list'. + Enter a space in the buffer after the \choice macro. + +2020-01-25 Arash Esbati <arash@gnu.org> + + Add fontification support \textnormal macro + + * font-latex.el (font-latex-built-in-keyword-classes): Add + entry for \textnormal to "type-command" class. + +2020-01-25 Arash Esbati <arash@gnu.org> + + * doc/auctex.texi (Font Specifiers): Document new font macros. + +2020-01-18 Arash Esbati <arash@gnu.org> + + Move customizable variable into tex-style.el + + * style/shortvrb.el: Move definition of `LaTeX-shortvrb-chars' + into `tex-style.el'. + Delete check for function `font-latex-set-syntactic-keywords' and + check for feature font-latex instead. + + * tex-style.el (LaTeX-shortvrb-chars): Add entry for + `LaTeX-shortvrb-chars'. + +2020-01-18 Arash Esbati <arash@gnu.org> + + Add new font macros in the related menus + + * latex.el (LaTeX-mode-menu): Add new entries for new kernel font + macros. Reorder the entries in groups family, series, shapes and + miscellaneous. + +2020-01-11 Arash Esbati <arash@gnu.org> + + Add new style/revtex4-2.el + + * Makefile.in (STYLESRC): Add new style. + + * style/revtex4-2.el: New file. + + * tex-style.el (LaTeX-write18-enabled-p): Delete * and whitespace + in docstring. + Indent comment. + Add customize entries for revtex4-2.el. + +2020-01-08 Arash Esbati <arash@gnu.org> + + Adjust style/fontaxes.el to LaTeX kernel + + * style/fontaxes.el ("fontaxes"): Comment out entries for macros + which are now provided by LaTeX kernel. Also remove fontification + support. + +2020-01-08 Arash Esbati <arash@gnu.org> + + Improve support for extended NFSS macros + + * font-latex.el (font-latex-built-in-keyword-classes): Move + entries for \normalfont and \normalshape to `function' class. + Add \textssc to `bold-command' and \sscshape to `bold-declaration' + class. + + * latex.el (LaTeX-common-initialization): Add entries for `spaced + small caps' macros \sscshape and \textssc. \textssc is not part + of `LaTeX-font-list' yet. + +2020-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + According to NEWS.22, `font-lock-extra-managed-props' is available in + all supported emacsen. + + * font-latex.el (font-latex-script,font-latex-script-char): Remove + `boundp' test for `font-lock-extra-managed-props'. + (font-latex-unfontify-region): Don't play with `invisible' text + property because it is now handled by font-lock thanks to + `font-lock-extra-managed-props'. + +2020-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't use obsolete variable + + According to NEWS.20, `font-lock' no longer supports + `font-lock-comment-start-regexp'. + + * font-latex.el (defvar): Remove `defvar' for + `font-lock-comment-start-regexp'. + (font-latex-setup): Don't include `font-lock-comment-start-regexp' in + `font-lock-defaults'. + +2020-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + Since `font-lock-multiline' is available in all supported emacsen, we + no longer need `font-latex-multiline'. + + * font-latex.el (font-latex-setup): Remove `boundp' check. + (font-latex-unfontify-region): Delete unnecessary code. + (font-lock-after-change-function): Delete obsolete advice. + (font-latex-put-multiline-property-maybe): Remove. + (font-latex-match-command-with-arguments): + (font-latex-match-command-in-braces): + (font-latex-match-math-env): + (font-latex-match-math-envII): + (font-latex-match-quotation): + Remove call on `font-latex-put-multiline-property-maybe'. + +2020-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Delete obsolete comment + + * font-latex.el: Delete obsolete comment. `font-latex-do-multi-line' + was removed in 2007. + +2020-01-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Add changelog for my previous bug fix + + * doc/changes.texi (News in 12.3): Add a new entry for bug fix of + `LaTeX-insert-environment' (C-c C-e). + +2020-01-05 Arash Esbati <arash@gnu.org> + + Support extended NFSS shapes with 2020-02-02 LaTeX kernel + + * font-latex.el (font-latex-built-in-keyword-classes): Add + \textulc and \textsw to `bold-command' class, the respective + declarations to `bold-declaration'. + Add reset \normalfont and \normalshape to `type-declaration' + class. + + * latex.el (LaTeX-font-list): Add the macros \textulc and \textsw + and bind the to C-l and C-w respectively. + (LaTeX-common-initialization): Add the matching font declarations + \ulcshape and \swshape. Add user level reset macros \normalfont + and \normalshape. + +2020-01-05 Arash Esbati <arash@gnu.org> + + Update style/fbox.el to package version 0.04 + + * style/fbox.el: Add support for \fparbox macro. + +2020-01-05 Arash Esbati <arash@gnu.org> + + Fix handling of LaTeX font declaration macros + + * latex.el (LaTeX-common-initialization): Delete unnecessary and + duplicate entry for picture environment. + Add `-1' to LaTeX font declaration macros in order to work + correctly on active regions. + +2020-01-05 Arash Esbati <arash@gnu.org> + + Delete insertion of wrong dollar sign + + * tex.el (TeX-insert-dollar): Remove insertion of wrong `$' as + reported here: + https://lists.gnu.org/archive/html/auctex-devel/2020-01/msg00002.html + +2020-01-04 Arash Esbati <arash@gnu.org> + + Update Pygments styles to version 2.5.2 + + * style/minted.el (LaTeX-minted-key-val-options): Update values of + "style" to styles provided by Pygments version 2.5.2. + +2019-12-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Improve environment insertion (bug#35284) + + * latex.el (LaTeX-insert-environment): Place the point and the mark at + appropriate place. + * tests/latex/latex-test.el (LaTeX-insert-environment-with-active-region): + New test. + +2019-12-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Use pdf rather than dvi for preview package document + + * latex/Makefile.in: Generate preview.pdf with full contents and use + it instead of preview.dvi. + +2019-12-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Adjust Makefile clean targets + + * Makefile.in: + * doc/Makefile.in: + * latex/Makefile.in: + Adjust clean targets + +2019-12-08 Arash Esbati <arash@gnu.org> + + * font-latex.el (font-latex-setup): Remove XEmacs compat code. + +2019-12-07 Arash Esbati <arash@gnu.org> + + Update style/caption.el to package version 3.4a + + * style/caption.el (LaTeX-caption-key-val-options): Add values + autodot and unnumbered to labelformat key. + Remove wrong ContinuedFloat value from type key. + ("caption"): Delete entries for ContinuedFloat. + Add fontification support for \continuedfloat macro. + +2019-12-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Update menu in proper timing (bug#38058) + + * tex-buf.el (TeX-command-sentinel): Do `force-mode-line-update' in + the command buffer so that "Next Error" item will appear in the menu + bar just after compilation. + Replace all `(set-buffer-modified-p (buffer-modified-p))' with + `(force-mode-line-update)' + (TeX-run-command): Remove `sit-for' call which is no longer + necessary. + +2019-11-16 Arash Esbati <arash@gnu.org> + + Update style/ltugboat.el to class version 2.22 + + * style/ltugboat.el ("ltugboat"): Add new abbreviation macros. + +2019-11-08 Arash Esbati <arash@gnu.org> + + Add new style/fbox.el + + * Makefile.in (STYLESRC): Add new style. + + * style/fbox.el: New file. + +2019-10-30 Mosè Giordano <mose@gnu.org> + + * Version 12.2 released. + +2019-10-29 Mosè Giordano <mose@gnu.org> + + Prepare for upcoming release + + * RELEASE: Update version number, release notes and list of contributors. + * configure.ac: Update version number. + * doc/auctex.texi: Update copyright years. + * doc/changes.texi: Mention generic bug fixes. + * doc/tex-ref.tex: + * latex/preview.dtx: Update version number and copyright years + +2019-10-26 Arash Esbati <arash@gnu.org> + + Add new style/xkcdcolors.el + + * Makefile.in (STYLESRC): Add new style. + + * style/xkcdcolors.el: New file. + +2019-10-26 Arash Esbati <arash@gnu.org> + + Add check for empty overlay + + * tex-fold.el (TeX-fold-hide-item): Add an extra check to make + sure that the function runs when overlay start and end are + non-nil. What is done in the end of function isn't useful with + evaporated overlays and used to cause bugs because `overlay-start' + and `overlay-end' return nil for such overlays, and functions such + as `TeX-fold-overfull-p` try to move point to the + overlay-end. (bug#37337) + +2019-10-20 Arash Esbati <arash@gnu.org> + + * style/amsmath.el ("amsmath"): Improve query strings. + +2019-10-19 Stefan Monnier <monnier@iro.umontreal.ca> + + multi-prompt.el, style/beamer*.el: Get copyright just right + +2019-10-18 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Mention changes in News. + +2019-10-18 Arash Esbati <arash@gnu.org> + + Add final adjustments for LaTeX 2019-10-01 + + * latex.el (LaTeX-env-contents): Adjust function to LaTeX kernel + 2019-10-01 release. Remove check for usage within preamble only. + Add query for optional argument with completion. + (LaTeX-verbatim-environments): + (LaTeX-indent-environment-list): Add filecontents(*) environments. + + * style/amsmath.el ("amsmath"): Add support for \overunderset + macro. Delete unnecessary `function' before `lambda'. Re-indent + the code. + +2019-10-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Change default for new Ghostscript + + * preview.el.in (preview-pdf-color-adjust-method): Change the default + value to t and adjust doc string. + * doc/preview-problems.texi (No images are displayed with gs 9.27 and + earlier): Adjust its contents in line with the above change and change + the title from "... newer". + +2019-10-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix for revised file access controls of gs (bug#37719) + + * preview.el.in (preview-prepare-fast-conversion): Add commands for + revised file access controls introduced after gs 9.27. + (preview-gs-restart): Use "-d" option instead of "-s" because the + former does not accept "%d" in OutputFile parameter. + Don't wrap the file name into parentheses in line with this change. + (preview-gs-flag-error): Adjust the reconstructed gs command line + argument so that it matches with the above change. + Add comments about limitations of this function. + +2019-10-07 Ikumi Keita <ikumi@ikumi.que.jp> + + * preview.el.in (preview-undump-replacements): Fix last commit. + +2019-10-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix preview-latex for TeXLive 2019 update + + * preview.el.in (preview-LaTeX-command, preview-undump-replacements): + Remove the brace around the argument of \input. + +2019-09-23 Arash Esbati <arash@gnu.org> + + Add fontification support for ragged2e macros + + * style/ragged2e.el ("ragged2e"): Add provided macros to function + keywords class. This is in line with decision in `font-latex.el' + for corresponding kernel macros. + +2019-09-22 Arash Esbati <arash@gnu.org> + + Delete \Ref and \labelformat from varioref.el + + * style/varioref.el ("varioref"): Delete \Ref and \labelformat + from style hook and fontification support. + +2019-09-22 Arash Esbati <arash@gnu.org> + + * latex.el (LaTeX-common-initialization): Add \Ref to `TeX-complete-list'. + +2019-09-22 Arash Esbati <arash@gnu.org> + + Support new kernel macros \Ref and \labelformat + + * font-latex.el (font-latex-built-in-keyword-classes): Add \Ref to + reference and \labelformat to function class. + + * latex.el (LaTeX-common-initialization): Add support for \Ref and + \labelformat which are part of LaTeX kernel 2019-10-01 release. + +2019-09-18 Arash Esbati <arash@gnu.org> + + Update style/subcaption.el to package version 1.3 + + * style/subcaption.el ("subcaption"): Add support for \subfloat + macro. + +2019-09-18 Arash Esbati <arash@gnu.org> + + Update style/varioref.el to package version 1.6b + + * style/varioref.el ("varioref"): Rearrange macros acc. to the + manual. Add missing starred version of \Vref. Add fontification + support for \labelformat. + (LaTeX-varioref-package-options): Update package options. + +2019-09-14 Arash Esbati <arash@gnu.org> + + Improve detecting of rejected optional arguments + + * style/bicaption.el (LaTeX-arg-bicaption-bicaption): + * style/caption.el (LaTeX-arg-caption-captionbox): + * style/floatrow.el (LaTeX-floatrow-arg-floatbox): + * style/xcolor.el (TeX-arg-xcolor-fcolorbox): Add an additional + check for detecting if last optional argument was rejected. + +2019-09-08 Arash Esbati <arash@gnu.org> + + Add new style/multitoc.el + + * Makefile.in (STYLESRC): Add new style. + + * style/multitoc.el: New file + +2019-08-31 Arash Esbati <arash@gnu.org> + + Make "PDF Tools" viewer available under Windows and macOS + + * tex.el (TeX-view-program-list-builtin): Make entry for "PDF + Tools" available under Windows and macOS. (bug#37152) + + * doc/changes.texi: Mention availability of "PDF Tools" under + Windows and macOS in `TeX-view-program-list-builtin'. + + * doc/install.texi (Prerequisites): Replace "Mac OS X" with + "macOS". + +2019-08-22 Arash Esbati <arash@gnu.org> + + Add new style/ltugboat.el + + * Makefile.in (STYLESRC): Add new style. + + * style/ltugboat.el: New file. + +2019-08-22 Arash Esbati <arash@gnu.org> + + Add new style/changelog.el + + * Makefile.in (STYLESRC): Add new style. + + * style/changelog.el: New file. + +2019-08-22 Arash Esbati <arash@gnu.org> + + Support explicitly numbered group contructs + + * latex.el (LaTeX-extract-key-value-label): Add an optional + argument for explicitly numbered group contructs. + +2019-08-22 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Mention fontification improvement for biblatex. + +2019-08-21 Arash Esbati <arash@gnu.org> + + * context.el (ConTeXt-environment): Fix docstring. + +2019-08-21 Arash Esbati <arash@gnu.org> + + Fix lisp example for `TeX-electric-math' + + * doc/auctex.texi (Quotes): Use `make-local-variable' instead of + `make-variable-buffer-local' in lisp example for init file. (bug#37124) + +2019-08-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Restore syntax fontify in Texinfo mode + + * tex-info.el (TeX-texinfo-mode): Set `syntax-propertize-function', + mimicking texinfo.el. Now comments in Texinfo mode buffer are + displayed with comment face again. + +2019-08-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Reduce unnecessary local variable safety inquiry + + * tex.el (TeX-add-local-master): Call major mode function only when + necessary. + +2019-08-18 Arash Esbati <arash@gnu.org> + + Update style/titlesec.el to package version 2.11 + + * style/titlesec.el ("titlesec"): Add \nostruts macro. + (LaTeX-titlesec-package-options): Add `nostruts' option. + +2019-08-17 Arash Esbati <arash@gnu.org> + + Update style/thmtools.el to package version 67 + + * style/thmtools.el (LaTeX-thmtools-declaretheoremstyle-regexp) + (LaTeX-thmtools-declaretheorem-regexp): Use the function + `LaTeX-extract-key-value-label' to build the regexp. + (LaTeX-thmtools-listoftheorems-key-val): Add new key `title'. + (LaTeX-thmtools-package-options): Add new variable. + +2019-08-17 Arash Esbati <arash@gnu.org> + + Update style/fvextra.el to package version 1.4 + + * style/fvextra.el (LaTeX-fvextra-key-val-options): Add new keys. + ("fvextra"): Add new macros. Add fontification support for + \EscVerb macro. + +2019-08-15 Arash Esbati <arash@gnu.org> + + Update style/paracol.el to package version 1.35 + + * style/paracol.el: Add macro \definecolumnpreamble and the length + \belowfootnoteskip. + +2019-07-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Change color adjustment method (bug#35571, bug#35696, bug#36039) + + * preview.el.in (preview-pdf-color-adjust-method): New option. + (preview-pdf-color-string): Use new code using DELAYBIND feature when + the new option is t. + (preview-gs-color-string): Add new optional argument to suppress code + for explicit colors. + (preview-gs-open): Don't adjust color when the latex command produces + PDF and `preview-pdf-color-adjust-method' is nil. + (preview-pdf2dsc-sentinel): Add "-dDELAYBIND" option to gs invocation + when `preview-pdf-color-adjust-method' is t. + * doc/changes.texi: Add a new entiry. + * doc/preview-problems.texi: Add a section to explain how to do with + the case no images are displayed with gs 9.27 and newer. + +2019-07-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Enhance support for file names with spaces + + * tex-buf.el (TeX-run-compile): Add an entry for file name with spaces + to localized `compilation-error-regexp-alist'. + +2019-07-14 Arash Esbati <arash@gnu.org> + + Update style/AnonymousPro.el to package version 2.2 + + * style/AnonymousPro.el (LaTeX-AnonymousPro-package-options): Add + the `scaled' key. + +2019-06-27 Ikumi Keita <ikumi@ikumi.que.jp> + + Conform to `delete-selection-mode' (bug#36385) + + * latex.el (LaTeX-insert-left-brace): Put `delete-selection' property + which obeys that of `self-insert-command' when + `LaTeX-electric-left-right-brace' feature is inactive. + +2019-06-14 Arash Esbati <arash@gnu.org> + + Support cleveref labels + + * style/cleveref.el (TeX-arg-cleveref-crossref-type): New + function. + (LaTeX-cleveref-label-regexp): New variable for parsing \label + macros with an optional argument. + ("cleveref"): Add missing package macros. + Update expert commands and fontification. + Update `reftex-label-regexps' enabling RefTeX to handle \label + with an optional argument as well. + Update description line and add Commentary section. (bug#36111) + +2019-05-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Make navigation function robust + + * tex.el (TeX-find-macro-end-helper): Cater for corner case that the + `while' loop is exited or skipped. + * tests/tex/navigation.el: Add new test. + +2019-05-20 Arash Esbati <arash@gnu.org> + + Update style/babel.el to package version 3.31 + + * style/babel.el (LaTeX-babel-language-list): Add azerbaijani and + remove frenchb. + (LaTeX-babel-babelprovide-key-val-options): New variable. + (LaTeX-babel-babeltags-regexp, LaTeX-babel-cleanup-babeltags): Add + parsing support for \babeltags macro. + (LaTeX-babel-babelfont-regexp, LaTeX-babel-cleanup-babelfont): Add + parsing support for \babelfont macro. + (TeX-arg-babel-lang): Use the arguments optional and prompt + properly. + ("babel"): Add missing macros incl. fontification. + (LaTeX-babel-package-options): Add missing package options. + +2019-05-17 Tassilo Horn <tsdh@gnu.org> + + Fix autoload generation code (bug#35758) + + * Makefile.in (AUTOLOAD,PREVIEW_AUTOLOAD): Use arg instead of + generated-autoload-file (bug#35758). + +2019-05-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix regression + + * latex.el (LaTeX-arg-usepackage-insert, LaTeX-arg-usepackage): Move + `TeX-run-style-hooks' from `LaTeX-arg-usepackage' to + `LaTeX-arg-usepackage-insert'. Due to my commit "Defer running style + hook until options are given actually", style hooks associated with + \usepackage were not run when the document is newly created with + `LaTeX-env-document'. + +2019-05-17 Arash Esbati <arash@gnu.org> + + Load hyperref.el in `LaTeX-beamer-class-options' + + * style/beamer.el (LaTeX-beamer-class-options): Load "hyperref.el" + in order to have `LaTeX-hyperref-package-options-list' defined + when the document class is requested and the style hook hasn't run + yet. (bug#35649) + +2019-05-12 Arash Esbati <arash@gnu.org> + + Improve style/mflogo.el + + * style/mflogo.el ("mflogo"): Ask for Text when \textlogo is + invoked. Change \logofamily into a declaration. Add missing + macros \MF and \MP. Adjust fontification for \textlogo and + \logofamily. + +2019-05-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix last commit + + * tex-buf.el (TeX-command-expand): Redefine the value of `file' just + once per call of `TeX-command-expand'. Previous code could give + spurious quote when the given command string contains more than one + "%" expanders tied with the symbol `file'. + +2019-05-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Stop depreciated usage of undeclared dynamic variable + + * tex-buf.el (TeX--master-or-region-file-with-extra-quotes): Redefine + as template. On accepting one of `TeX-master-file', `TeX-region-file' + or `TeX-active-master' as its first argument, it becomes a wrapper for + those three, like previous definition. + (TeX-command-expand): Arrage in accord with the above change. + With these two changes, we no longer need implicit dynamic binding of + non-special variable `orig-file'. + * tex.el (TeX-expand-list-builtin): Update supplementary comment for + "%T". + +2019-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-jp.el (AUCTeX-jp): Add keyword :link to info node. + +2019-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix treatment of class and package options + + * preview.el.in (preview-auctex-font-size): Consult + `LaTeX-provided-{class,package}-options' instead of + `(TeX-style-list)'. This function has been accidentally disabled + since AUCTeX began not to include the class and package options into + the styles. Similar problem with bug#25563. + * latex.el (LaTeX-match-class-option): Update doc string because the + above change depends on its implicit behavior. + +2019-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove obsolete codes + + * preview.el.in (preview-mouse-open-eps): Remove xemacs compatibility + code. + Don't use obsolete variable `default-major-mode'. + +2019-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for xemacs + + * prv-emacs.el (preview-compatibility-macros): Remove. + * preview.el.in (eval-when-compile,makunbound): Remove useless + codes. + +2019-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for xemacs + + * prv-emacs.el (preview-mark-active): Remove. + (): Update Copyright year. + * preview.el.in (LaTeX-preview-setup): Remove the above macro. + (): Update Copyright year. + +2019-05-08 Mohammad Hossein Bateni <bateni@google.com> + + Allow the user to customize which TeX commands are available in each mode. + + Commands such as Biber, DVI2PS, PS2PDF, Index, etc. are not useful in + ConTeXt. ConTeXt generates a PDF directly and has its own indexing + mechanism. + + In Mark IV (which has been the preferred version for over a decade and + is actively developed), a new bibliography package is also available, + which can process old bibtex files as well. So there is no need for + BibTeX. + + Having so many commands in context-mode clutters the menus. In the + definition of TeX-command-list, we either provide a list of relevant + modes, or set the value to `t' indicating that this command should + always be available. In the latter case, the user cannot customize + it. Here we provide sensible defaults as well as the ability for the + user to customize. + + * tex.el (TeX-command-list): Hide by default some commands from context-mode. + +2019-04-23 Arash Esbati <arash@gnu.org> + + Add new function `LaTeX-extract-key-value-label' + + * latex.el (LaTeX-extract-key-value-label): Add new utility + function to return a regexp string to extract label value in an + optional key=val argument. + + * style/breqn.el (LaTeX-breqn-key-val-label-regexp): + * style/listings.el (LaTeX-listings-key-val-label-regexp) + (LaTeX-listings-auto-cleanup): Use + `LaTeX-extract-key-value-label'. + Delete now unused variable `LaTeX-listings-key-val-label-extract'. + +2019-04-20 Arash Esbati <arash@gnu.org> + + Add support for ChangeLog entries for LaTeX files + + * tex.el (TeX-current-defun-name): New function returning the name + of current sectioning command when `C-x 4 a' is invoked. + + * latex.el (LaTeX-common-initialization): Set a local version + `add-log-current-defun-function' to `TeX-current-defun-name'. + +2019-04-19 Arash Esbati <arash@gnu.org> + + * style/xparse.el ("xparse"): Fix fontification of alternatives. + +2019-04-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Reset `TeX-PDF-from-DVI' if xetex engine is in use + + * tex.el (TeX-engine-set): Reset `TeX-PDF-from-DVI' when the new + engine is `xetex'. Fix bug#34593. + +2019-04-13 Arash Esbati <arash@gnu.org> + + Update keywords to biblatex v3.12 + + * font-latex.el (font-latex-built-in-keyword-classes): Update + biblatex keywords. For qualified lists, fontify at least 2 + mandatory arguments. + +2019-04-11 Arash Esbati <arash@gnu.org> + + * tex-info.el (TeX-texinfo-mode): Set `add-log-current-defun-function' locally. + +2019-04-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Elaborate LaTeX math insertion command + + * latex.el (LaTeX-math-insert): Put the point after the closing dollar + sign when appropriate. This fixes bug#35128. + In addtion, wrap the text in the active region suitably. + +2019-04-05 Arash Esbati <arash@gnu.org> + + Fix handling of function entries in `TeX-complete-list' + + * tex.el (TeX-complete-symbol): Check if the fourth argument of + entry in `TeX-complete-list' is a list and eval it. (Bug#35074) + +2019-03-16 Arash Esbati <arash@gnu.org> + + Improve fontification of \href macro + + * style/hyperref.el ("hyperref"): Add "href" to + `LaTeX-verbatim-macros-with-braces-local'. + Check for feature font-latex and not for functions. + Declare and use `font-latex-update-font-lock' instead of + `font-latex-set-syntactic-keywords'. + +2019-03-09 Tassilo Horn <tsdh@gnu.org> + + Support up to 12 command arguments. + + * font-latex.el (font-latex-keyword-matcher): Support up to 12 command + arguments. + +2019-03-04 Arash Esbati <arash@gnu.org> + + Fix fontification of simple macros + + * font-latex.el (font-latex-match-simple-command): Change second + part of regexp in order to be less greedy. This function now + fontifies only letters and characters defined in + `font-latex-match-simple-include-list' (bug#34712). + (font-latex-match-simple-include-list): New variable. + + * style/expl3.el ("expl3"): Add "_" and ":" to + `font-latex-match-simple-include-list'. + +2019-02-24 Tassilo Horn <tsdh@gnu.org> + + New styles for beamerarticle & beamerswitch triggering beamer + + * style/beamerarticle.el: New style. + * style/beamerswitch.el: New style. + * Makefile.in (STYLESRC): Enable them. + +2019-02-11 Arash Esbati <arash@gnu.org> + + * style/listings.el: Require tex.el. + +2019-02-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * auctex.el: Add requireds, keywords, and trailer + + (cherry picked from commit 0c8d6703d16097eb64f014c56e4135a5a1f9600f) + +2019-02-08 Arash Esbati <arash@gnu.org> + + Delete auctex-pkg.el which is not needed for ELPA releases + +2019-02-08 Arash Esbati <arash@gnu.org> + + Add dependencies file auctex-pkg.el + + * auctex-pkg.el: Add new file containing AUCTeX's dependencies for + ELPA releases. + +2019-02-02 Arash Esbati <arash@gnu.org> + + Improve indenting and filling in "Form" environments + + * style/hyperref.el ("hyperref"): Add the "Form" environment to + `LaTeX-document-regexp'. + +2019-01-12 Arash Esbati <arash@gnu.org> + + Add support for w and W column specifiers + + * style/array.el ("array"): Add column specifiers w and W to + `LaTeX-array-column-letters'. + + * doc/changes.texi: Mention that counting columns is supported + only if the align parameter is enclosed in braces. + +2019-01-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove combatibility code for older emasen + + * tex.el (put): Don't put unnecessary property on + `TeX-source-correlate-mode'. + (TeX-clean): Remove fallback code for emacs 21. + +2019-01-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * font-latex.el (put): + * tex-style.el (put): + Use `booleanp' instead of `TeX-booleanp'. + * tex.el (put): Use `booleanp' instead of `TeX-booleanp'. + (TeX-booleanp): Remove. + +2019-01-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * context.el (ConTeXt-mode-common-initialization): + * latex.el (TeX-latex-mode): + * plain-tex.el (TeX-plain-tex-mode, ams-tex-mode): + * tex-info.el (TeX-texinfo-mode): + Use `run-mode-hooks' instead of `TeX-run-mode-hooks'. + * tex.el (TeX-run-mode-hooks): Remove. + +2019-01-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix test conditions on w32 + + * tests/tex/command-expansion.el (TeX-command-detokenize): Correct + `system-type' for w32. + (TeX-command-expand-skip-file-name, TeX-command-expand-active-master): + Skip tests on w32. + +2019-01-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Override some bindings in `TeX-mode-map' in Texinfo mode + + * tex-info.el (Texinfo-mode-map): Bind `self-insert-command' to + "$", "^", "_" and "\" because they are normal characters in Texinfo + documents. + Bind `TeX-insert-backslash' to "@" so that users benefit from + `TeX-electric-macro' even in Texinfo mode. + * tex.el (TeX-electric-escape): Update doc string. + * doc/auctex.texi (Completion): Update description. + * doc/changes.texi (News in 12.2): Mention the above changes. + +2019-01-06 Arash Esbati <arash@gnu.org> + + Update style/enumitem.el to package version 3.6 + + * style/enumitem.el (LaTeX-enumitem-key-val-options): Update + key=val options to v3.6. + (LaTeX-enumitem-auto-cleanup): Use sharp-quote notation. + ("enumitem"): Query for trivlist environment depending of package + option. + Add macro \Drawenumitemlabel and length \labelitem. + (LaTeX-enumitem-package-options): Update package options. + +2019-01-02 Arash Esbati <arash@gnu.org> + + Skip macros and environments from pythontex + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add document macros + of pythontex package. + (TeX-ispell-skip-envs-list): Add environments provided by + pythontex package. + Add general verbatim macros. + +2018-12-15 Arash Esbati <arash@gnu.org> + + Improve completion for \url between url.el and hyperref.el + + * style/hyperref.el ("hyperref"): Comment the entry for "url" + since the completion is provided via url.el. + + * style/url.el ("url"): Add a conditional to "url" in order to + check if hyperref.el is loaded and then supply the argument in + braces. + Also check for hyperref.el. before adding "url" to + `LaTeX-verbatim-macros-with-delims-local'. + +2018-12-14 Arash Esbati <arash@gnu.org> + + Add new style/pythontex.el + + * Makefile.in (STYLESRC): Add new style. + + * style/pythontex.el: New file. + +2018-12-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Drop xemacs support and mule check from configure and Makefile + + * aclocal.m4: + * configure.ac: + * doc/Makefile.in: Drop xemacs support and mule check. + * Makefile.in: Merge mule file into main files. + Drop xemacs support. + * prv-install.el: Remove. + +2018-12-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix document + + * doc/auctex.texi (Completion): Correct wrong description and typo. + (Cleaning): Add mention about variables related to AmSTeX mode. + +2018-12-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Use ASCII apostrophe in code expample + + * doc/auctex.texi (): (I/O Correlation): Use APOSTROPHE(U+0027) rather + than RIGHT SINGLE QUOTATION MARK(U+2019) in code example. + Add coding tag in Local Variables section. + +2018-12-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Redefine support for \url in hyperref + + * style/hyperref.el ("hyperref"): Override the entry for \url macro in + url.el because hyperref.sty redefines the macro. + +2018-12-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Revise description about CJK support + + * doc/auctex.texi (Internationalization): Revise description about CJK + support in Emacs and TeX. + (Japanese): Fix typo and add index entries. + +2018-12-06 Arash Esbati <arash@gnu.org> + + Improve handling of `TeX-insert-macro-default-style' in styles + + * latex.el (LaTeX-check-insert-macro-default-style): Add new + macro. This macro is intended for more complex functions in style + files querying multiple optional and mandatory arguments and + obeying the values of `TeX-insert-macro-default-style' and + `current-prefix-arg'. + + * tex.el (TeX-parse-arguments): Add a comment about the new macro. + + * style/bicaption.el (LaTeX-arg-bicaption-bicaption): + * style/caption.el (LaTeX-arg-caption-captionbox): + * style/color.el (TeX-arg-color, TeX-arg-color-fcolorbox): + * style/floatrow.el (LaTeX-floatrow-arg-floatbox): + * style/xcolor.el (TeX-arg-xcolor-definecolor) + (TeX-arg-xcolor-definecolorset, TeX-arg-xcolor) + (TeX-arg-xcolor-fcolorbox): Use + `LaTeX-check-insert-macro-default-style'. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * tex.el: Remove XEmacs compatibility definitions for + `TeX-read-string', `TeX-active-mark', `TeX-activate-region', + `line-beginning-position', `line-end-position' and + `TeX-overlay-prioritize'. + (TeX-activate-region): Remove compatibility code for older emacsen. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove TeX-maybe-remove-help, TeX-menu-with-help + + * tex.el (TeX-maybe-remove-help, TeX-menu-with-help): Remove. + (TeX-mode-specific-command-menu-entries, TeX-fold-menu) + (TeX-common-menu-entries): + * context.el: + * latex.el: + * plain-tex.el: + * tex-buf.el: + * tex-info.el: + Remove `TeX-menu-with-help' and fix indent. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove TeX-mark-active + + * tex.el (TeX-mark-active): Remove. + (TeX-mode-specific-command-menu-entries): + * style/dinbrief.el (LaTeX-dinbrief-insert) + (LaTeX-dinbrief-env-recipient): + Use the variable `mark-active' directly instead of the function + `TeX-mark-active'. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove TeX-replace-regexp-in-string + + * tex.el (TeX-replace-regexp-in-string): Remove. + * latex.el: + * style/empheq.el: + * style/floatrow.el: + * style/tcolorbox.el: + * style/xcolor.el: + Use `replace-regexp-in-string' instead of + `TeX-replace-regexp-in-string'. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `write-file-functions' + + * tex.el (VirTeX-common-initialization): + * latex.el (BibTeX-auto-store): + Use `write-file-functions' instead of obsolete + `local-write-file-hooks' and `write-file-hooks'. Also, use local hook. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility face + + * tex-buf.el (TeX-error-description-error) + (TeX-error-description-warning, TeX-error-description-tex-said): + Remove compatibility alternatives in `defface'. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove XEmacs compatibility code in tex-bar.el + + * tex-bar.el (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): Remove + Emacs/XEmacs choice of buttons. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-buf.el (TeX-special-mode): Use `define-derived-mode'. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * font-latex.el (font-latex-after-hacking-local-variables): Remove + fallback code for case `file-local-variables-alist' isn't available. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * font-latex.el (font-latex-doctex-^^A): Remove fallback for case + `string-to-syntax' isn't available. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility code for older emacsen + + * latex.el (LaTeX-fill-region-as-para-do): Drop fallback for case + `fill-delete-prefix' isn't available. + +2018-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Adjust autoload cookie + + * tex-fold.el (TeX-fold-mode): Set autoload cookie directly to + `define-minor-mode'. + +2018-12-02 Arash Esbati <arash@gnu.org> + + Remove unnecessary parentheses + + * style/geometry.el ("geometry"): + * style/graphicx.el ("graphicx"): Remove unnecessary parentheses + in option management. + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove compatibility codes for older emacsen + + * tex-info.el (when, TeX-texinfo-mode): + * tex.el (TeX-documentation-texdoc): + * plain-tex.el (TeX-plain-tex-mode): + * preview.el.in (preview-counter-find): + Remove compatibility codes for older emacsen. + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `declare-function' without `fboundp' test + + * latex.el: + * tex-info.el: + Use `declare-function' without `fboundp' test. + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove references to older emacsens in comments and doc strings + + * bib-cite.el: + * font-latex.el: + * tex-fold.el: + * tex-style.el: + * style/graphicx.el + Remove references on older emacsens in comments and doc strings + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove references to XEmacs from the manual + + * RELEASE (): Delete the words "or XEmacs" and fill the paragraph. + * doc/install.texi (Configure): Delete redundant line and words. + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Clean up remnants of previous removal of compatibility codes + + * tex.el (TeX-mode-specific-command-menu): Delete irrelevant comment. + * latex.el (LaTeX-indent-line): Clear out unused lines. + +2018-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Add suggestions for non-privileged installation + + * doc/install.texi (Configure): Reorganize a paragraph and add @ref's. + (Installation for non-privileged users): Add paragraphs to suggest to + supply options "--with-lispdir" and "--with-texmf-dir" etc. to + configure when installing AUCTeX under the user's home directory. + +2018-11-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Defer running style hook until options are given actually + + * latex.el (LaTeX-arg-usepackage-read-packages-with-options): Don't + run the style hooks before reading package options, just load the + style files for completion of package options. + (LaTeX-arg-usepackage): Run style hooks actually after the package + options are given. + (TeX-arg-document): Don't run the style hooks before reading class + options, just load the style file for completion of class options. + The style hooks are run afterward by `TeX-update-style' anyway. + * style/exam.el ("exam"): Prepare `LaTeX-exam-class-options' to have + its full values outside the style hook along with the above idea. + * style/mathtools.el ("mathtools"): + * style/empheq.el ("empheq"): + * style/graphics.el ("graphics"): Set `LaTeX-*****-package-options' + outside the style hook along with the above idea. + +2018-11-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix not to run wrong style hooks + + * tex.el (TeX-style-hook-dialect-weight-alist): Add entry for + pseudo-dialect `:classopt'. + (TeX-style-hook-dialect): Add description for `:classopt' in doc + string. + * latex.el (LaTeX-common-initialization): Assign style hooks for + class options into pseudo-dialect `:classopt'. + Don't set `TeX-PDF-from-DVI' in XeLaTeX document. + (TeX-latex-mode): Run style hooks for class options in + `TeX-update-style-hook', without altering `TeX-active-list'. + * style/geometry.el ("geometry"): + * style/graphicx.el ("graphicx"): Don't set `TeX-PDF-from-DVI' in + XeLaTeX document. + * style/hyperref.el ("hyperref"): Set `TeX-PDF-from-DVI' to "Dvipdfmx" + when package option "dvipdfmx" is given for non-XeLaTeX document. + * tests/latex/latex-test.el (LaTeX-style-hook-with-class-option): + Refine tests. + * doc/auctex.texi (Simple Style): Add descriptions for available + dialects including `:classopt'. + +2018-11-24 Arash Esbati <arash@gnu.org> + + Add new style/dashundergaps.el + + * Makefile.in (STYLESRC): Add new style. + + * style/dashundergaps.el: New file. + +2018-11-16 Arash Esbati <arash@gnu.org> + + Improve behavior of `TeX-arg-beamer-overlay-spec' + + * style/beamer.el (TeX-arg-beamer-overlay-spec): Use + `TeX-argument-insert' in the body of the function and respect the + OPTIONAL argument. + ("beamer"): Enclose all occurrences of + `TeX-arg-beamer-overlay-spec' in brackets in order to mark them as + optional. + +2018-11-16 Arash Esbati <arash@gnu.org> + + style/enumitem.el ("enumitem"): Use `TeX-argument-prompt' for query. + +2018-11-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Surround both \langle and \rangle with math delimiter + + * latex.el (LaTeX-math-insert): Typing "C-u ` (" used to result in + "$\langle$\rangle" when `LaTeX-math-mode' and + `LaTeX-electric-left-right-brace' are enabled. Fix this to insert + "$\langle\rangle$" instead. + +2018-11-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Set `TeX-command-buffer' always (bug#33377) + + * tex-buf.el (TeX-command): Make sure to set `TeX-command-buffer' + always. + +2018-11-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Adjust preview-latex in case sub file isn't in master directory + + * preview.el.in (preview-dvips-abort): + (preview-gs-dvips-sentinel): + (preview-dvipng-place-all): Make sure directory part of dvi file to be + deleted is removed because deletion takes place in master directory. + (preview-start-pdf2dsc): Make sure directory part of pdf file is + removed so that path for later use is constructed correctly. + (preview-cache-preamble): + (preview-region): + (preview-document): Retain directory part of the file name to be + passed to `preview-generate-preview' because `TeX-run-command' in + `TeX-inline-preview-internal' doesn't recognize the right path + otherwise. + (preview-generate-preview): Adjust in accord with the above change. + +2018-11-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't block emacs during viewing document + + * tex.el (TeX-documentation-texdoc): Use asynchronous proces not to + block emacs during viewing document. + Supply "%s" to `message' argument in case the shell output contains + accidental %-sequence. + +2018-11-02 Arash Esbati <arash@gnu.org> + + * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options): Add vspace key. + +2018-10-31 Arash Esbati <arash@gnu.org> + + Improve style/fancyvrb.el + + * style/fancyvrb.el (LaTeX-fancyvrb-arg-define-macro): Refactor + code. Cater for starred version of user defined macros. Add + missing `,' in backquote constructs. + (LaTeX-fancyvrb-arg-define-environment): Refactor code. + ("fancyvrb"): Add \Verb* macro incl. fontification. + +2018-10-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Deal with space in path of MikTeX gs executable (Bug#32251) + + * preview.el.in (preview-gs-command): Wrap gs with + `shell-quote-argument' in case it has space in its path. + +2018-10-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Change regexp for clarity + + * preview.el.in (preview--decode-^^ab): Change regexp "[\x00-\xFF]+" to + "[^[:multibyte:]]+" for clarity that it matches raw 8-bit bytes. + +2018-10-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Make style hooks associated with class options valid again + + * latex.el (TeX-latex-mode): Add a function on `TeX-update-style-hook' + to run style hooks associated with class options. + (LaTeX-common-initialization): Set `TeX-PDF-from-DVI' to suitable + value when a class option "dvips" or "dvipdfmx" is given. + * style/geometry.el ("geometry"): + * style/graphicx.el ("graphicx"): Set `TeX-PDF-from-DVI' to "Dvipdfmx" + when a package option "dvipdfmx" is given. + * tests/latex/latex-test.el (LaTeX-style-hook-with-class-option): New + test. + +2018-10-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Deal with partial ^^-quoting in preview-latex + + If latex outputs a multibyte character as a mixture of raw 8-bit byte + and byte with ^^-quoting, we have to decode them as a whole. + + * preview.el.in (preview--decode-^^ab): Include raw 8-bit bytes which + already exist in the string as well when decoding with the given + coding system. + * tests/latex/preview-latex-test.el: New test. + +2018-10-20 Arash Esbati <arash@gnu.org> + + Extract caption for RefTeX's label context + + * style/listings.el (LaTeX-listings-reftex-label-context-function): + New function. Extract the caption in the optional argrument of + the lstlisting environment and return it as a string for the + context of a label. + +2018-09-07 Arash Esbati <arash@gnu.org> + + Update style/lettrine.el to package version 2.21 + + * style/lettrine.el (LaTeX-lettrine-key-val-options): Delete + "Vone" option. + ("lettrine"): Delete \LettrineVonefalse macro. + +2018-08-25 Arash Esbati <arash@gnu.org> + + Update style/lettrine.el to package version 2.1 + + * style/lettrine.el (LaTeX-lettrine-key-val-options): Add new keys + "Vone" and "refstring". + ("lettrine"): Add new macros, minor rearrangements. + +2018-08-09 Arash Esbati <arash@gnu.org> + + Update style/lettrine.el to package version 2.01 + + * style/lettrine.el (LaTeX-lettrine-key-val-options): Update + key=val options. + ("lettrine"): Use correct functions on counters and + lengths/dimensions provided by lettrine.sty. + Add support for missing macros. + +2018-08-09 Arash Esbati <arash@gnu.org> + + Add new style/ocg-p.el and style/ocgx.el + + * Makefile.in (STYLESRC): Add new styles. + + * style/ocg-p.el: + * style/ocgx.el: New files. + +2018-07-17 Arash Esbati <arash@gnu.org> + + Add \eqref to RefTeX's reference styles + + * style/amsmath.el ("amsmath"): Add \eqref to + `reftex-ref-style-alist' when RefTeX is loaded and activate the + reference style. + +2018-07-12 Arash Esbati <arash@gnu.org> + + Add new style/thmtools.el and style/thm-restate.el + + * Makefile.in (STYLESRC): Add new styles. + + * style/thmtools.el: + * style/thm-restate.el: New files. + +2018-07-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix regression of `TeX-view' + + * tex-buf.el (TeX-active-master): Add dummy argument for + compatibility. In `TeX-view', `TeX-commmand' is called with + `TeX-active-master', so the `file' argument is `TeX-active-master' + in subsequent call of `TeX-command-expand'. In that case, + `TeX--master-or-region-file-with-extra-quotes' calls + `TeX-active-master' with three arguments. + (TeX--master-or-region-file-with-extra-quotes): Adapt doc string. + * tex.el (TeX-expand-list-builtin): Adapt comment. + * tests/tex/command-expansion.el (TeX-command-expand-active-master): + New test. + +2018-07-07 Arash Esbati <arash@gnu.org> + + Add new style/marginnote.el + + * Makefile.in (STYLESRC): Add new style. + + * style/marginnote.el: New file. + +2018-07-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix possible endless loop + + * tex.el (TeX-expand-list-builtin): Use symbol `file' for the entry + "%T" so that special treatment for `file' about advancing matching + position in `TeX-command-expand' takes effect. + * tests/tex/command-expansion.el (TeX-command-expand-skip-file-name): + New test. + +2018-06-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Adjust test for known emacs bug + + * tests/latex/latex-test.el (LaTeX-includegraphics-extensions): Mark + emacs 26.1 as expected failure. + +2018-06-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Make preamble caching robust to LuaLaTeX and (u)pLaTeX + + * preview.el.in (preview-cache-preamble): Modify .ini code so that + LaTeX variants even without \pdfoutput can read unusual file names + (with space or non-ascii character, or both) when preamble cache is + enabled. The modified .ini code is kindly provided by jfbu + <jfbu@free.fr>. + (preview-dump-replacements, preview-undump-replacements): Add + -file-line-error option to the undump- variable so that AUCTeX can + analyse the output from lualatex even with file name with space. + It turned out that -kanji option is needed for platex even when + dumping format file if the preamble contains Japanese characters. + Thus modify the both variables so that -kanji option, if any, is + retained. + (TeX-inline-preview-internal): Revert the additional post process of + the command line string introduced last year by me because it is no + longer necessary by the above change on + `preview-undump-replacements'. Though this change disables -jobname + option again when lualatex is used with preamble cache, it would be + fine because that concerns only very old lualatex binaries and that + had always been the state before my commit just a year ago. + The above three modifications fix bug#31685 and bug#31686. + * tests/japanese/preview-latex.el + (japanese-preview-preserve-kanji-option2): Arrange with the above + change. + (japanese-preview-preserve-kanji-option3): New test. + (japanese-preview-error-quote-shift-jis): Remove spurious backslash. + * doc/preview-latex.texi (Key bindings and user-level lisp functions): + Add description about restriction of preamble cache on LaTeX variants. + +2018-06-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Raise robustness of call of dvipng command + + * preview.el.in (preview-dvipng-command): Remove spurious quotes which + cause error for file names with space. (bug#31684) + (preview-dvipng-color-string): Replace single quotes with double + quotes for w32 users. + * doc/preview-latex.texi: (The preview images): Add warning that + (u)pLaTeX is not compatible with dvipng. + +2018-05-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Add note and test about the change involving non-ascii file name + + * doc/changes.texi (News in 12.2): Add note that support for standard + LaTeX without e-TeX extension is now very limited. + * tests/tex/command-expansion.el (TeX-command-detokenize): New test to + check whether \input and \detokenize are supplied when necessary. + +2018-05-28 Ikumi Keita <ikumi@ikumi.que.jp> + + TL 2018 non-ascii file name fix for preview-latex + + * preview.el.in (preview-LaTeX-command): Wrap file name after implicit + \input in \detokenize{}. + (preview-cache-preamble): Arrange the ini file code so that non-ascii + file name can be used with generated format file. Be careful not to + lose capability of handling file name with space. + (preview-undump-replacements): Use new TeX macro defined in the above + ini file code to accept even unusual file name with non-ascii + character or space. + Delegate quoting of format name to `TeX-inline-preview-internal' so + that non-ascii character will not be quoted twice. + (TeX-inline-preview-internal): Adjust to the above change. + +2018-05-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Accept non-ascii file name in accord with change in TL 2018 + + * tex.el (TeX-expand-list-builtin): Add new entry %T. Same as %t, + except to enclose with \detokenize{} for non UTF-8 LaTeX when \input + is supplmented. + Adjust the entries %` and %' so that \input is supplemented only when + any TeX code is present between them and leave the bind to + `TeX-command-text' for later examination. + The bind to `TeX-command-pos' is no longer retained. + (TeX-command-list): Use %T for "LaTeX". + Adjust "TeX" and "AmSTeX" as the same with "LaTeX" in the aspect that + user can supply one's own TeX code, as well as any command line + options, through `TeX-command-extra-options'. + * tex-buf.el (TeX--master-or-region-file-with-extra-quotes): New + function to act as a wrapper of `TeX-master-file' and + `TeX-region-file' inside `TeX-command-expand'. + (TeX-command-expand): Use the above function as the value of `file' + and get rid of tricky temporal overriding of `file' with lambda form. + (TeX-region-create): Make the first line parsing of %&FORMAT + construct, if any, to be valid even for region compilation. + Discard text properties when constructing the content of _region_.tex. + Drop bind check for `buffer-file-coding-system'. + * tests/tex/command-expansion.el (TeX-command-expansion): Reflect the + change that \input is not necessarily supplemented now by %`-%' pair + in `TeX-command-expand'. + +2018-05-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix region compilation with \usepackage[utf8]{inputenc} + + * tex-buf.el (TeX-quote-filename): Wrap non-ascii characters in + \unexpanded{} for non UTF-8 LaTeX so that raw file name is recovered. + +2018-05-27 Arash Esbati <arash@gnu.org> + + Quote %b expansion string for Zathura + + * tex.el (TeX-view-program-list-builtin): Guard %b expansion + string for Zathura with quotes for file names with spaces + (bug#31451). + +2018-05-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Prepare for UTF-8 with BOM + + * tex-buf.el (TeX-adjust-process-coding-system): Don't use + `utf-8-with-signature' to encode keyboard input for TeX process. + Drop mule feature check. + +2018-05-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Drop compatibility code for older emacsen in preview-latex + + We no longer need messy treatment with regard to coding system in + preview-latex since xemacs isn't supported anymore. + + * preview.el.in (preview-coding-system): Remove. + (preview-error-quote): Simplify. Discard RUN-CODING-SYSTEM argument. + (preview--decode-^^ab): Drop mule feature check. + (preview--convert-^^ab): Drop compatibility code for older emacsen. + (preview-parse-messages): Remove `run-coding-system' argument from + calls to `preview-error-quote'. + (TeX-inline-preview-internal): Drop codes related to coding system. + * prv-emacs.el (preview-buffer-recode-system): Remove. + * tests/japanese/preview-latex.el + (japanese-preview-error-quote-shift-jis): Remove `shift_jis' argument + from call to `preview-error-quote'. + Remove unnecessary let bind on `TeX-japanese-process-output-coding-system'. + (japanese-preview-process-coding-system): Remove. + (japanese-preview-shift-jis): + (japanese-preview-different-coding-system): Use `copy-sequence' on + `process-environment' in order to guard it from temporal `setenv'. + +2018-05-11 Ikumi Keita <ikumi@ikumi.que.jp> + + Support UTF-8 with BOM in Japanese TeX documents + + * tex-jp.el (japanese-TeX-coding-ejsu): Consider the case the document + is encoded in UTF-8 with BOM, which begins to be supported in TeXLive + 2018. + +2018-05-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Replace another cl function with cl-lib + + * style/pstricks.el (eval-when-compile): Require cl-lib. + (LaTeX-pst-cleanup): Replace `caddr' with `cl-caddr'. + +2018-05-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Update URLs further + + * COPYING: + * Makefile.in: + * RELEASE: + * bib-cite.el: + * build-aux/gitlog-to-auctexlog: + * latex/README: + * latex/preview.dtx: + * preview.el.in: + * style/foils.el: + * style/hyperref.el: + * style/ifluatex.el: + * style/luatextra.el: + * style/mathtools.el: + * style/pstricks.el: + * tests/Makefile: + * tex-buf.el: + * tex.el: Update URLs. Use https: rather than http: or ftp: where + possible. + * build-aux/gitlog-to-changelog: Update URLs. + Use `before-save-hook' instead of obsolete `write-file-hooks' in + Local Variables section. + +2018-05-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Update URLs + + * tex-site.el.in: + * doc/auctex.texi: + * doc/fdl.texi: + * doc/install.texi: + * doc/intro.texi: + * doc/preview-readme.texi: + * doc/wininstall.texi: Update URLs. Use https: rather than http: or + ftp: where possible. + * auctex.spec: Update URLs. Use https: rather than http: or + ftp: where possible. + Remove xemacs support. + Update required emacs version. + +2018-05-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Adjust coding system for Japanese pTeX engine on w32 + + Default coding system of Japanese pTeX engine in w32 TeXLive changed + from SHIFT JIS to UTF-8 in 2018. Make tex-jp.el to work with both + TeXLive 2017 and 2018 on w32 platform, with higher priority on newer + engine with regard to the behavior in non default case. + + * tex-jp.el (japanese-TeX-use-kanji-opt-flag): Set default value to t + even on w32 platform. + (japanese-TeX-set-process-coding-system): Change coding system for non + default case from `shift_jis' to `utf-8' on w32 platform. + (TeX-expand-list-builtin): Remove mule feature check. + +2018-05-05 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove obsolete option related to Japanese TeX + + * tex-jp.el (japanese-TeX-command-list): Remove. Ataka-san and I + (Ikumi) discussed this topic and decided to delete this option. + * doc/auctex.texi (Japanese): Mention the above change. + +2018-05-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix previous removal of xemacs compatibility code + + * toolbar-x.el (toolbarx-default-toolbar-meaning-alist): Remove + spurious quote formerly inside "," construct. + Replace "`" with "'". + +2018-04-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Prevent spurious newlines to be added + + * tex-fold.el (TeX-fold-overfull-p): Restore mandatory `and'. The + removal of xemacs compatibility code previously done was a bit too + aggressive. + +2018-04-16 Arash Esbati <arash@gnu.org> + + Update key=val options to geometry package v5.8 + + * style/geometry.el (LaTeX-geometry-preamble-key-val-options): Add + new keys luatex, dvipdfmx and xdvipdfmx. Delete duplicate + entries. + +2018-04-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Correct how `TeX-record-buffer' is used + + * tex-buf.el (TeX-pop-to-buffer): Use `TeX-record-buffer' in accord with + the documents. + * doc/changes.texi: Mention the change and warn users who have + customized the option. + +2018-04-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Correct record in changes.texi + + * doc/changes.texi (): Make a new section for release 12.2 and move + mention about change made after release 12.1 there. + +2018-04-07 Arash Esbati <arash@gnu.org> + + Quote %b expansion string for SumatraPDF + + * tex.el (TeX-view-program-list-builtin): Guard %b expansion + string for SumatraPDF with quotes for file names with spaces + (bug#30999). + +2018-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Add support for dvipdfmx to \includegraphics + + * style/graphicx.el (LaTeX-includegraphics-extensions-list): Add + support for dvipdfmx. + * tests/latex/latex-test.el (LaTeX-includegraphics-extensions): New + test to check whether correct extensions are generated. + +2018-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `TeX-search-files-by-type' to assist input \includegraphics + + * style/graphicx.el (LaTeX-includegraphics-extensions-list): New + function. + (LaTeX-includegraphics-extensions): Delegate most of its task to the + above new function and become its wrapper. + (LaTeX-includegraphics-global-files): New variable. + (LaTeX-includegraphics-read-file-TeX): Use `TeX-search-files-by-type' + rather than `TeX-search-files' and cache global value in the above + new variable. + Reflect the option `LaTeX-includegraphics-strip-extension-flag'. + * tex.el (TeX-search-files-type-alist): Remove `graphics' entry, + which is supplied in latex-mode by `LaTeX-search-files-type-alist'. + (TeX-normal-mode): Add `LaTeX-includegraphics-global-files' to list of + variables to be cleared. + +2018-04-01 Ikumi Keita <ikumi@ikumi.que.jp> + + Resolve conflict of argument spec between regexp and literal + + * tex.el (TeX-search-files-kpathsea): Treat EXTENSIONS argument as a + list of regexps in accordance with other parts of AUCTeX. + (TeX-ispell-document): Treat `TeX-file-extensions' as a list of + regexps in accordance with other parts of AUCTeX. + (TeX-file-extensions, TeX-Biber-file-extensions): + (BibTeX-file-extensions, BibLaTeX-style-extensions): + (BibTeX-style-extensions): Change custom type to regexp from string. + (TeX-doc-extensions): Turn into list of regexps. + * latex.el (LaTeX-split-bibs): Treat `TeX-Biber-file-extensions' as a + list of regexps in accordance with other parts of AUCTeX. + +2018-03-29 Alex Branham <branham@utexas.edu> + + Fix TeX-dwim-master + + * tex.el (TeX-dwim-master): `cl-return' is much easier to work with if + we're alerady using cl- functions, so convert `dolist' to `cl-loop.' + +2018-03-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Make `TeX-clean' to work in ams-tex-mode + + * plain-tex.el (AmSTeX-clean-intermediate-suffixes, + AmSTeX-clean-output-suffixes): New customize options. + (AmS-TeX-mode-hook): Move from tex.el. + (AmSTeX-mode-command-menu, AmSTeX-mode-menu): Fix doc strings. + (): Update copyright year. + * tex.el (TeX-mode-prefix): Add an entry for AmS-TeX. + (AmS-TeX-mode-hook): Move to plain-tex.el. + +2018-03-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Make compatible with emacs 24 + + * latex.el (TeX-read-label): Use `format' instead of `format-message' + if the latter is not available. + +2018-03-29 Jonathan Underwood <jonathan.underwood@gmail.com> + + Fix incorrect FSF address + + * multi-prompt.el (): + * style/comment.el (): + * style/latexinfo.el (): Fix incorrect FSF address and whitespaces. + +2018-03-17 Ikumi Keita <ikumi@ikumi.que.jp> + + * style/amsmath.el ("amsmath"): Correct \cfrac spec. + +2018-03-16 Alex Branham <branham@utexas.edu> + + * tex.el (TeX-dwim-master): Prefer `cl-return' over `return'. + +2018-03-12 Arash Esbati <arash@gnu.org> + + * font-latex.el (font-latex--get-script-props): Use `cl-case' instead of `case'. + +2018-03-04 Arash Esbati <arash@gnu.org> + + Add new function `TeX-arg-verb-delim-or-brace' + + * latex.el (TeX-arg-verb-delim-or-brace): New function for \verb + like macros which take their argument either in delimiters or in + braces. + + * doc/auctex.texi (Adding Macros): Document + `TeX-arg-verb-delim-or-brace'. + + * style/listings.el ("listings"): Use + `TeX-arg-verb-delim-or-brace' for \lstinline which also takes an + optional argument. + + * style/minted.el (LaTeX-minted-auto-cleanup, "minted"): Use + `TeX-arg-verb-delim-or-brace' for \mintinline and new macros + defined with \newmintinline. + + * style/url.el ("url"): Use `TeX-arg-verb-delim-or-brace' for \url + and \path. + Remove "{" from fontification or \url and \path. + +2018-03-01 Alex Branham <branham@utexas.edu> + + Remove cl from AUCTeX + + * tex.el: replace last 'cl with 'cl-lib + * latex.el: replace cl function with cl-lib function + +2018-03-01 Alex Branham <branham@utexas.edu> + + Refine how we setup flymake backend function + + * latex.el: Add LaTeX-flymake to TeX-latex-mode + * latex-flymake.el: Don't add to LaTeX-mode-hook + +2018-02-21 Alex Branham <branham@utexas.edu> + + Improve flymake documentation + + * doc/changes.texi: + * doc/auctex.texi (Checking): Add Flymake support to manual. + + * latex-flymake.el: Add copyright notice and fix a quote. + +2018-02-20 Arash Esbati <arash@gnu.org> + + * Makefile.in (AUCSRC): Add new file latex-flymake.el. + +2018-02-18 Arash Esbati <arash@gnu.org> + + * style/babel.el (LaTeX-babel-active-languages): Use `cl-pushnew'. + +2018-02-17 Mosè Giordano <mose@gnu.org> + + Replace cl with cl-lib in other files + + * latex.el (LaTeX-hanging-ampersand-position): + * tex-fold.el (require): + (TeX-fold-region-macro-or-env): + (TeX-fold-update-at-point): + * tex-info.el (require): + (Texinfo-make-node-list): + * toolbar-x.el (require): + (toolbarx-good-option-list-p): Replace cl with cl-lib and corresponding macros. + +2018-02-17 Mosè Giordano <mose@gnu.org> + + Explicitly require Emacs 24 + + * tex.el: Error when Emacs < 24 is used. + +2018-02-17 Alex Branham <branham@utexas.edu> + + Support flymake in Emacs 26+ using chktex + + * latex-flymake.el: New file. + * latex.el (require): Require `latex-flymake' in Emacs >= 26. + +2018-02-17 Alex Branham <branham@utexas.edu> + + Replace cl with cl-lib + + * bib-cite.el (require): + (psg-list-env): + * font-latex.el (require): + * latex.el (require): + * style/babel.el (require): + * style/caption.el (require): + (LaTeX-caption-update-key-val-options): + * style/empheq.el (require): + (LaTeX-empheq-update-key-val-options): + * style/enumitem.el (require): + (LaTeX-enumitem-update-key-val-options): + ("enumitem"): + * style/floatrow.el (require): + (LaTeX-floatrow-update-key-val-options): + * style/fvextra.el (require): + (LaTeX-fvextra-update-key-val): + * style/listings.el (require): + (LaTeX-listings-update-style-key): + * style/mdframed.el (require): + (LaTeX-mdframed-update-style-key): + * style/tcolorbox.el (require): + (LaTeX-tcolorbox-update-style-key): Replace cl with cl-lib. + +2018-01-25 Alex Branham <branham@utexas.edu> + + Remove some obsolete functions + + * font-latex.el (font-latex-syntactic-face-function): + * preview.el.in (preview-gs-restart): + * tex-buf.el (TeX-run-background): + (TeX-run-silent): + * tex.el: + (TeX-source-correlate-handle-TeX-region): + (TeX-insert-macro): + (TeX-doc): + * texmathp.el (texmathp): Now that AuCTeX requires GNU Emacs 24.1 or greater, we + can remove some functions that are obsolete in Emacs < 24.1 + +2018-01-12 Mosè Giordano <mose@gnu.org> + + Do not actually write bug report instructions + + * tex.el (TeX-submit-bug-report): Use `propertize' to show instructions without + writing them in the message. + +2017-12-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Make sure `process-environment' is recovered after temporal setenv + + * preview.el.in (TeX-inline-preview-internal): Since `setenv' operates + destructively on `process-environment', use `copy-sequence' for + maximal safety in order to guard its list structure. + +2017-12-28 Arash Esbati <arash@gnu.org> + + Add fontification for some core macros + + * font-latex.el (font-latex-built-in-keyword-classes): Add macros + \addvspace, \raggedright and \raggedleft to function class. + +2017-12-27 Arash Esbati <arash@gnu.org> + + * texmathp.el (texmathp-tex-commands-default): Add entries for breqn.sty. + +2017-12-21 Mosè Giordano <mose@gnu.org> + + Restore some code erroneously removed from font-latex.el + + * font-latex.el (font-latex-make-sectioning-faces): + (font-latex-user-keyword-classes): + (font-latex-slide-title-face): Restore code. + +2017-12-21 Mosè Giordano <mose@gnu.org> + + Restore loading of prv-emacs + + * preview.el.in: Require prv-emacs. + +2017-12-20 Mosè Giordano <mose@gnu.org> + + Remove compatibility code for XEmacs in toolbar-x.el + + * toolbar-x.el (toolbarx--if-when-compile): Remove macro no more needed. + (toolbarx-emacs-mount-popup-menu): + (toolbarx-mount-popup-menu): + (toolbarx-test-image-type): + (toolbarx-test-button-type): + (toolbarx-test-toolbar-type): + (toolbarx-find-image): + (toolbarx-emacs-add-button): + (toolbarx-refresh): + (toolbarx-install-toolbar): + (toolbarx-default-toolbar-meaning-alist): Remove code for compatibility with + XEmacs. + (toolbarx-xemacs-mount-popup-menu): + (toolbarx-xemacs-image-properties): + (toolbarx-xemacs-button-properties): + (toolbarx-xemacs-refresh-process-button-or-insert-list): + (toolbarx-xemacs-refresh): Remove functions. + +2017-12-20 Mosè Giordano <mose@gnu.org> + + Remove compatibility code for XEmacs in font-latex.el + + * font-latex.el (font-latex-sectioning-5-face): + (font-latex-update-sectioning-faces): + (font-latex-make-sectioning-faces): + (font-latex-user-keyword-classes): + (font-latex-fontify-script): + (font-latex-verbatim-face): + (font-latex-slide-title-face): + (font-latex-setup): Remove code for compatibility with XEmacs. + +2017-12-20 Mosè Giordano <mose@gnu.org> + + Remove compatibility code for XEmacs in tex-fold.el + + * tex-fold.el (TeX-fold-overfull-p): + (TeX-fold-macro-nth-arg): + (TeX-fold-hide-item): + (TeX-fold-show-item): + (TeX-fold-post-command): Remove code for compatibility with XEmacs. + +2017-12-20 Mosè Giordano <mose@gnu.org> + + Remove code for compatibility with very old emacsens in bib-cite.el + + * bib-cite.el (bib-cite-minor-mode): + (bib-cite-setup-highlight-mouse-keymap): + (bib-cite-fontify-help-as-bibtex): + (bib-cite-fontify-help-as-latex): + (bib-etags): + (bib-highlight-mouse): + (bib-toggle-highlight): + (bib-guess-or-prompt-for-label): + (bib-etags-find-noselect): Remove compatibility code. + +2017-12-20 Mosè Giordano <mose@gnu.org> + + Delte prv-xemacs.el + + * prv-xemacs.el: Delete file. + * preview.el.in (preview): Remove code to load prv-xemacs. + +2017-12-20 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove XEmacs compatibility code in tex-jp.el + + * tex-jp.el (japanese-TeX-set-process-coding-system) + (japanese-TeX-coding-ejsu): Remove code for compatibility with + XEmacs. + +2017-12-20 Ikumi Keita <ikumi@ikumi.que.jp> + + Delete unused options + + * tex-jp.el (japanese-TeX-command-default, + japanese-LaTeX-command-default): Remove them because they are no + longer used anywhere in the current code. Ataka-san and I (Ikumi) + discussed this matter and agreed to dismiss them. + * doc/auctex.texi: Reflect the above change. + +2017-12-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Make sure `LaTeX-default-options' is honored + + * latex.el (TeX-arg-document): Use `LaTeX-default-options' as default + of class options even when the respective `LaTeX-XXXX-class-options' + is not set. + +2017-12-17 Arash Esbati <arash@gnu.org> + + Update style/bidi.el to package version 31.7 + + * style/bidi.el (LaTeX-bidi-package-options): Add + "extrafootnotefeatures" option. + (LaTeX-env-bidi-bib): New function. + ("bidi"): Add missing macros and environments. Add fontification + support. + +2017-12-17 Arash Esbati <arash@gnu.org> + + Add fontification for some core macros + + * font-latex.el (font-latex-built-in-keyword-classes): Fontify + core macros \marginpar (reference), \LaTeXe (function) and + \bibitem (textual). + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Change encoding of Elisp source files to UTF-8 + + * style/alphanum.el: + * style/dk-bib.el: + * style/doc.el: + * style/inputenc.el: + * style/jura.el: + * style/ltx-base.el: + * style/ltxdoc.el: + * tex-font.el: + * tex.el: Change coding of files to UTF-8. Now that we require Emacs >= 24 it + is always possible to use this encoding. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove code for compatibility with old Emacsens in tex.el + + * tex.el: Always require `crm', which is available in all supported version of + Emacs. + (TeX-completing-read-multiple): Remove function definition for XEmacs. + (TeX-view-predicate-list-builtin): + (TeX-source-correlate-sync-source): + (TeX-tree-expand): + (TeX-comment-forward): Remove code for compatibility with old Emacsens. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove TeX-line-number-at-pos + + * tex.el (TeX-line-number-at-pos): Remove function and alias. + * style/pdfsync.el (LaTeX-pdfsync-output-page): + * tex-info.el (Texinfo-make-node-list): Replace `TeX-line-number-at-pos' with + `line-number-at-pos'. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove XEmacs compatibility code in tex.el + + * tex.el (TeX-source-correlate-gnuserv-p): + (TeX-source-correlate-map): + (VirTeX-common-initialization): + (TeX-mode-map): + (TeX-search-syntax-table): Remove code for compatibility with XEmacs. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove TeX-how-many function + + * tex.el (TeX-how-many): Remove function. + * latex.el (LaTeX-hanging-ampersand-position): Replace `TeX-how-many' with + `how-many'. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove TeX-assoc-string + + * tex.el (TeX-assoc-string): Remove alias. + (TeX-add-style-hook): + (TeX-unload-style): + (TeX-run-style-hooks): + * tex-info.el (Texinfo-nodename-de-escape): + (Texinfo-nodename-escape): Replace `TeX-assoc-string' with `assoc-string'. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove TeX-deactivate-mark + + * tex.el (TeX-deactivate-mark): Remove function. + (TeX-argument-insert): + * latex.el (LaTeX-env-item): + * style/currvita.el (LaTeX-currvita-env-with-label): + * style/dinbrief.el (LaTeX-dinbrief-insert): + (LaTeX-dinbrief-env-recipient): + * style/enumitem.el (LaTeX-enumitem-env-with-opts): + * style/moodle.el (LaTeX-moodle-question-env-with-args): + * style/tcolorboxlib-raster.el (LaTeX-tcolorbox-lib-raster-env-item): Replace + `TeX-deactivate-mark' with `deactivate-mark'. + +2017-12-17 Mosè Giordano <mose@gnu.org> + + Remove old compat functions for commenting and uncommenting + + * tex.el (TeX-comment-regio): + (TeX-comment-or-uncomment-region): + (TeX-uncomment-region): Remove old compatibility functions. + * context.el (ConTeXt-mode-menu): + * latex.el (LaTeX-mode-menu): + * plain-tex.el (plain-TeX-menu-entries): + * tex-info.el (Texinfo-mode-menu): + * tex.el (TeX-mode-map): + (TeX-in-comment): + (TeX-in-commented-line): Replace compat functions with standard functions. + +2017-12-16 Mosè Giordano <mose@gnu.org> + + Remove XEmacs compatibility code in latex.el + + * latex.el (LaTeX-largest-level-set): + (LaTeX-after-insert-env-hook): + (LaTeX-indent-line): + (LaTeX-fill-region-as-paragraph): + (LaTeX-fill-newline): + (LaTeX-common-initialization): Remove code for compatibility with XEmacs. + (LaTeX-fill-delete-newlines): Remove function, no more needed. + (LaTeX-fill-region-as-para-do): Replace `LaTeX-fill-delete-newlines' with + `fill-delete-newlines'. + +2017-12-16 Mosè Giordano <mose@gnu.org> + + Remove XEmacs compatibility code in tex-buf.el + + * tex-buf.el (TeX-record-buffer): Always define this option. + (TeX-recenter-output-buffer): + (TeX-previous-error): + (TeX-parse-TeX): Remove code for compatibility with XEmacs. + (TeX-parse-error): Fix a bug in the regexp. + (TeX-error-overview): Remove check for Emacs version. Now this works in all + supported versions. + +2017-12-10 Mosè Giordano <mose@gnu.org> + + * Version 12.1 released. + +2017-12-09 Mosè Giordano <mose@gnu.org> + + Remove references to old Emacsen from the manual + +2017-12-07 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove references to XEmacs from the manual + + * doc/intro.texi: + * doc/preview-faq.texi: + * doc/preview-latex.texi: + * doc/preview-readme.texi: Remove references to XEmacs. + +2017-12-04 Mosè Giordano <mose@gnu.org> + + Remove references to XEmacs from the manual + + * doc/auctex.texi: + * doc/faq.texi: + * doc/install.texi: + * doc/preview-faq.texi: + * doc/preview-latex.texi: + * doc/preview-problems.texi: + * doc/quickstart.texi: + * doc/tex-ref.tex: + * doc/todo.texi: + * doc/wininstall.texi: Remove references to XEmacs. + +2017-12-03 Mosè Giordano <mose@gnu.org> + + Prepare for new brand-new series of AUCTeX + + * RELEASE: Update version number and release notes. + * doc/changes.texi: Update. + * configure.ac: + * doc/tex-ref.tex: + * latex/preview.dtx: Update version number. + * tex-site.el.in: Require Emacs 24 of higher. + +2017-12-03 Mosè Giordano <mose@gnu.org> + + * Version 11.92 released. + +2017-12-03 Mosè Giordano <mose@gnu.org> + + Prepare for upcoming release + + * RELEASE: Update version number and release notes. + * doc/changes.texi: Mention bug fixes. + * configure.ac: + * doc/tex-ref.tex: + * latex/preview.dtx: Update version number. + +2017-12-03 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix auto detect of kpathsea delimeter + + * tex.el (TeX-kpathsea-detect-path-delimiter): New function. + (TeX-kpathsea-path-delimiter): Use it to obtain the default value. + (TeX-tree-expand): Use it to simplify auto detection method. + Use `TeX-kpathsea-path-delimiter' for argument given to kpsewhich + command. Using constant ";" is completely wrong for most kpsewhich + implementation. + +2017-11-30 Arash Esbati <arash@gnu.org> + + Get rid of `delete-dups' + + * style/caption.el (LaTeX-caption-update-key-val-options): + * style/enumitem.el (LaTeX-enumitem-update-key-val-options): + * style/floatrow.el (LaTeX-floatrow-update-key-val-options): + * style/graphicx.el (LaTeX-includegraphics-extensions): + * style/listings.el (LaTeX-listings-update-style-key): + * style/mdframed.el (LaTeX-mdframed-update-style-key): + * style/menukeys.el (TeX-arg-menukeys-newmenumacro): Replace + `delete-dups' with `TeX-delete-duplicate-strings'. + +2017-11-30 Arash Esbati <arash@gnu.org> + + * style/longtable.el ("longtable"): Use `make-local-variable'. + + * tex-ispell.el: Add entry for "xltabular" environment. + +2017-11-30 Arash Esbati <arash@gnu.org> + + Fix style/xltabular.el + + * style/xltabular.el (LaTeX-xltabular-skipping-regexp): New variable. + (LaTeX-env-xltabular): + (LaTeX-item-xltabular): New function. + ("xltabular"): Use the above functions in the style hook. + +2017-11-30 Mosè Giordano <mose@gnu.org> + + Reduce code duplication in tests + + * tests/make-test-deps.emacs-lisp: New file. + * tests/Makefile (%.log): Load it make-test-deps.emacs-lisp when running tests. + * tests/context/context-test.el: + * tests/japanese/error-parsing.el: + * tests/japanese/parse-timing.el: + * tests/japanese/preview-latex.el: + * tests/latex/latex-test.el: + * tests/tex/error-parsing.el: + * tests/tex/path-expansion.el: + * tests/tex/utility.el: Remove code moved to make-test-deps.emacs-lisp. + +2017-11-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Revert wrong test + + * tests/tex/path-expansion.el (TeX-kpathsea-delimiter-w32): Remove. + +2017-11-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Add style path explicitly + + * tests/japanese/error-parsing.el (): + * tests/japanese/parse-timing.el (): + * tests/japanese/preview-latex.el (): Add "style" subdirectory in the + repository to `TeX-style-path' so we can load style files inside tests. + +2017-11-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Re-implement auto-detect of path separator from kpsewhich output + + * tex.el (TeX-kpathsea-path-delimiter): Accept t for Autodetect again + and make it default on w32 platform. + (TeX-tree-expand): Use heuristics as much as possible to determine the + path separator, paying attention to the case that it cannot be + determined. + +2017-11-23 Tassilo Horn <tsdh@gnu.org> + + Don't set company-minimum-prefix-length in tex mode buffers + + * tex.el (VirTeX-common-initialization): Don't set + company-minimum-prefix-length in tex mode buffers. + + AUCTeX used to set company-minimum-prefix-length to 1 initially because there + aren't too many TeX completions provided by AUCTeX itself. However, some users + use multiple completion backends in TeX modes (like dabbrev for example), and + then the number of completion candidates increases dramatically. + + Also see https://github.com/syl20bnr/spacemacs/issues/9388 and + https://github.com/alexeyr/company-auctex/issues/18. + +2017-11-19 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Mention compatibility of preview with GS 9.22. + +2017-11-18 Arash Esbati <arash@gnu.org> + + Improve style/epigraph.el + + * style/epigraph.el ("epigraph"): Leave point inside first pair of + braces for \epigraph and \qitem. + Use `LaTeX-add-lengths' for skips instead of `TeX-add-symbols'. + Use `TeX-arg-length' instead of `TeX-arg-size' for \dropchapter. + Append qitem macro to `LaTeX-item-regexp'. + Improve fontification. + +2017-11-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Give proper argument to `TeX-command-expand' + + * preview.el.in (TeX-inline-preview-internal): Give `TeX-region-file' + or `TeX-master-file' as `file' argument of `TeX-command-expand' when + preamble caching is enabled. This argument used to be nil, which + caused error when lualatex is in use. The fourth element of the + `luatex' entry of `TeX-engine-alist-builtin' contains "%s", which + eventually triggers the use of the `file' argument. + +2017-11-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Add test for the recent change about `TeX-kpathsea-path-delimiter' + + * tests/tex/path-expansion.el (TeX-kpathsea-delimiter-w32): New test. + +2017-11-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Document `TeX-view-evince-keep-focus' + + * doc/auctex.texi (Starting Viewers): + * doc/changes.texi (News in 11.92): + Document `TeX-view-evince-keep-focus'. + +2017-11-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Document `TeX-math-input-method-off-regexp' properly. + + * doc/auctex.texi (Entering Mathematics): + * doc/changes.texi (News in 11.92): + Document `TeX-math-input-method-off-regexp'. + +2017-11-13 Ikumi Keita <ikumi@ikumi.que.jp> + + Mention the necessity of GNU make + + * doc/install.texi (Prerequisites): Add an item of GNU make. + Fix copyright year. + +2017-11-13 Ikumi Keita <ikumi@ikumi.que.jp> + + Bug fix and code refactoring related to kpathsea + + * tex.el (TeX-kpathsea-path-delimiter): Use `path-separator' for + default value. Drop t from the candidates because auto detection + sometimes fails for w32 platform. + (TeX-tree-expand): Always use `TeX-kpathsea-path-delimiter' if + non-nil. + Disable subsequent use of kpathsea if kpsewhich causes error or + returns non-zero exit value. + Accept nil for PROGRAM argument. + (TeX-search-files-kpathsea): Always use `TeX-kpathsea-path-delimiter' if + non-nil. + Use `TeX-tree-expand'. + Don't signal error even if kpsewhich causes error or returns non-zero + exit value. + +2017-11-12 Arash Esbati <arash@gnu.org> + + Add new style/xltabular.el + + * Makefile.in (STYLESRC): Add new style. + + * style/xltabular.el: New file. + +2017-11-12 Arash Esbati <arash@gnu.org> + + Add new function `LaTeX-env-longtable' + + * style/longtable.el (LaTeX-env-longtable): Add new function. + Move the body of the anonymous function into this in order to make + it available for other styles loading longtable. + +2017-11-10 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex.el (TeX-math-input-method-off-regexp): Turn defvar into defcustom. + +2017-11-06 David Kastrup <dak@gnu.org> + + Remove use of .runandhide operator + + Ghostscript bug 698680 + <https://bugs.ghostscript.com/show_bug.cgi?id=698680> has been caused + by the removal of the .runandhide operator in Ghostscript 9.22 + upstream. Since .runandhide has no longer been used in a + security-critical manner, its operation can be emulated by storing the + respective information in a .preview-ST variable. Potentially + malicious code would not be able to retrieve a non-safe "save" object + from here. + +2017-09-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix Copyright year + + * context-en.el, context-nl.el, latex.el, plain-tex.el: + * preview.el.in, prv-xemacs.el, tex-bar.el, tex-buf.el: + * tex-info.el, tex-site.el.in, tex-style.el, tex.el: + Fix Copyright year. + +2017-09-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Cosmetic Change + + * font-latex.el (font-latex-match-math-env): Quote "\[" with "\=" in + doc string. + (font-latex-add-to-syntax-alist): Delete duplicated line. + +2017-09-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix doc strings and comments + + * plain-tex.el (TeX-plain-tex-mode, ams-tex-mode): Fix doc strings. + * tex-fold.el (): Fix typo. + +2017-09-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Make preview-latex parsing robust to fix Bug#20773, Bug#27088 + + * preview.el.in (TeX-inline-preview-internal): Set environment + variable max_print_line to sufficiently large value of 1000 so that + LaTeX process does not insert newline in lines necessary to identify + Bounding Boxes. + +2017-09-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Add test abount truncation of list + + * tests/tex/path-expansion.el: New file to test whether + `TeX-search-files-by-type' does not truncate the value of list + variable. + +2017-09-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Prevent possible truncation of list value + + * tex.el (TeX-search-files-by-type): Use + `TeX-delete-duplicate-strings' instead of `delete-dups'. + +2017-09-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Add a new option for evince compatible viewer. + + * tex.el: (TeX-view-evince-keep-focus): New option. + (TeX-evince-sync-view-1): Pull the focus back to Emacs if the above + new option is non-nil. + +2017-09-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Make correct extensions are returned + + * style/graphicx.el (LaTeX-includegraphics-extensions): + Fix misaligned form structure which prevented `cond' to enter clauses + for engines other than default. + Use copied list for the last argument of `append' so that + `delete-dups' does not alter the value of + `LaTeX-includegraphics-extensions'. + Use `delete' rather than `remove' for copied sequence. + (): + (LaTeX-includegraphics-read-file-relative): + Fix typos. + +2017-09-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Add test for infinite loop + + * tests/tex/utility.el: New file. + +2017-09-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Parse package/class option with comments correctly + + * latex.el: (LaTeX-auto-class-regexp-list): Replace the regexp for + RequirePackage/LoadClass option with the same one for usepackage. + * tests/latex/latex-test.el: Add test for the change above. + +2017-09-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Conform to elisp coding convention + + * style/biblatex.el (LaTeX-arg-addbibresource) + (LaTeX-biblatex-package-options): + * style/fontspec.el (LaTeX-fontspec-arg-font): + Add "done" message. + * style/relsize.el ("relsize"): Tailor prompt string. + * style/bidi.el: Remove spurious execution bit. + +2017-08-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Prevent possible infinite loop + + * tex.el (TeX-delete-duplicate-strings): Make sure that comparison is + done with valid list elements. + (TeX-delete-dups-by-car): Ditto. + Use `TeX-sort-strings' and `TeX-car-string-lessp'. + (TeX-car-string-lessp): Move the position of defun before the + defcustom of `TeX-engine'. Since the defcustom requires + `TeX-delete-dups-by-car' at load time, all the functions used in + `TeX-delete-dups-by-car' must be defined before the defcustom. + +2017-08-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `delete' correctly for list variable + + * tex.el (TeX-search-files-kpathsea): Make sure that "." will be + removed from the directory list even if "." is the first element of + the list, when the SCOPE argument is `global'. + +2017-08-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Add test for my commit on Aug 18 + + * tests/japanese/parse-timing-test.tex: + * tests/japanese/parse-timing.el: + New file. + +2017-08-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix doc string and indent + + * tex.el (TeX-PDF-from-DVI, TeX-insert-braces-alist) + (TeX-arg-literal, TeX-auto-add-type): + Fix doc string. + (TeX-auto-parse-region): Fix indent. + +2017-08-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Add %(PDF) when undumped format is used in preview-latex + + * preview.el.in (TeX-inline-preview-internal): Make pdflatex to be + called when default output is PDF and dumped format is used. Although + it seems that if the dumped format is created by pdflatex, the format + produces PDF output even when the command name is (non-pdf) latex, it + would be better that pdflatex is used in that case, too. + +2017-08-20 Arash Esbati <arash@gnu.org> + + Add new style/arabxetex.el + + * Makefile.in (STYLESRC): Add new style. + + * style/arabxetex.el: New file. + +2017-08-18 Vincent Belaïche <vincent.b.1@hotmail.fr> + + Improvements for tex-info.el + + * tex-info.el (Texinfo-arg-nodename): Fix default prompt. + (Texinfo-arg-lrc): New function, used for commands that take Left, + Center, and Right entries for setting page header. + (Texinfo-arg-next-line): New function. Used to break line if need + be after entering command argument. + (Texinfo-arg-on|off): New function for entering boolean input. + (TeX-texinfo-mode): Add TeX symbols `allowcodebreak', `atchar', + `codequotebacktick', `codequoteundirected', `documentlanguage', + `documentencoding', `evenfooting', `evenheading', `everyfooting', + `everyheading', `LaTeX', `oddfooting', `oddheading', + `setchapternewpage', and `url'. + +2017-08-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Use #' to quote function names + + * tex-jp.el (japanese-plain-tex-mode-initialization, + add-hook, japanese-latex-mode-initialization, + japanese-TeX-reset-mode-name, TeX-insert-punctuation): + Use #' to quote function names. + +2017-08-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Delay setting Japanese TeX engine in `japanese-latex-mode' + + * tex-jp.el (japanese-latex-mode-initialization): The part which + guesses and sets `TeX-engine' using `TeX-match-style' is factored out + and put in `TeX-update-style-hook'. `TeX-match-style' eventually + triggers `TeX-update-style', which isn't appropriate in + `LaTeX-mode-hook'. + (japanese-LaTeX-guess-engine): New function. + +2017-08-11 Arash Esbati <arash@gnu.org> + + * style/XCharter.el ("XCharter"): Update to package v1.094 from 2017/08/08. + +2017-08-09 Arash Esbati <arash@gnu.org> + + * style/amsthm.el ("amsthm"): Use `LaTeX-amsthm-env-label'. + +2017-07-31 Ikumi Keita <ikumi@ikumi.que.jp> + + Conform to elisp coding convention in context.el + + * context.el (ConTeXt-numbered-section-heading, + ConTeXt-unnumbered-section-heading, ConTeXt-environment): Tailor + prompt string. + (ConTeXt-menu-update): Add "done" messages. + +2017-07-25 Stefan Monnier <monnier@iro.umontreal.ca> + + * font-latex.el: Use the standard utf-8 rather than latin-1 + +2017-07-25 Stefan Monnier <monnier@iro.umontreal.ca> + + Fix unescaped character literals + + * font-latex.el (font-latex-command-with-args-opt-arg-delims) + * tex-fold.el (TeX-fold-expand-spec): Escape [ and ] character literals + +2017-07-25 Tassilo Horn <tsdh@gnu.org> + + Manually cherry-pick commit bc0db60e + +2017-07-24 Mosè Giordano <mose@gnu.org> + + * Version 11.91 released. + +2017-07-24 Mosè Giordano <mose@gnu.org> + + Prepare for upcoming release + +2017-07-22 Arash Esbati <arash@gnu.org> + + Update key=val options to minted package v2.5 + + * style/minted.el (LaTeX-minted-key-val-options): Update options + to package version v2.5 from 2017/07/19. + +2017-07-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Conform to elisp coding conventions. + + * latex.el (LaTeX-section-heading, LaTeX-environment) + (TeX-arg-document, LaTeX-arg-usepackage-read-packages-with-options) + (TeX-arg-bibstyle, TeX-arg-bibliography, TeX-arg-verb) + (LaTeX-fill-region): Taylor minibuffer prompt string. Add or taylor + "done" messages. + * tex-buf.el (TeX-command-query, TeX-printer-query): Ditto. + * tex.el (TeX-master-file-ask, TeX-master-file, TeX-update-style) + (TeX-auto-list-information, TeX-auto-generate): Ditto. + +2017-07-21 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/changes.texi: Mention changes related to Japanese TeX. + +2017-07-03 Arash Esbati <arash@gnu.org> + + * doc/auctex.texi (European): Add babel languages which load english.el. + +2017-07-03 Arash Esbati <arash@gnu.org> + + Check and set `TeX-quote-language' if necessary + + * style/english.el ("english"): Reset `TeX-quote-language' to nil + if changed by other babel language options. + +2017-07-03 Arash Esbati <arash@gnu.org> + + Add new style/australian.el and style/newzealand.el + + * Makefile.in (STYLESRC): Add new styles. + + * style/australian.el: + * style/newzealand.el: New files. + +2017-07-02 Arash Esbati <arash@gnu.org> + + Add new style/canadian.el + + * Makefile.in (STYLESRC): Add new style. + + * style/canadian.el: New file. + +2017-07-01 Arash Esbati <arash@gnu.org> + + Add new style/moodle.el + + * Makefile.in (STYLESRC): Add new style. + + * style/moodle.el: New file. + +2017-07-01 Arash Esbati <arash@gnu.org> + + * latex.el (LaTeX-babel-hyphen-language-alist): Fix typo in docstring. + +2017-06-17 Antoine Levitt <antoine.levitt@gmail.com> + + Add support for xreader viewer + + * tex.el (TeX-evince-dbus-p): + (TeX-evince-sync-view-1): + (TeX-view-program-select-evince): + (TeX-raise-frame-function): + (TeX-source-correlate-mode): Adapt functions and docstrings to xreader. + (TeX-xreader-sync-view): New function. + (TeX-view-program-list-builtin): Add xreader. + +2017-06-14 Arash Esbati <arash@gnu.org> + + Update key=value options to graphicx package version 1.1a + + * style/graphicx.el (LaTeX-graphicx-key-val-options): Add new + key=value options. + (LaTeX-arg-graphicx-includegraphics-key-val): Support "pagebox" + key with pdfTeX or LuaTeX. + +2017-06-13 Arash Esbati <arash@gnu.org> + + * style/beamer.el ("beamer"): Query for optional argument after \pause. + +2017-06-13 Mosè Giordano <mose@gnu.org> + + Suggest to rerun LaTeX if xsim properties changed + + * tex-buf.el (TeX-LaTeX-sentinel): Catch xsim warning suggesting to rerun LaTeX + and set LaTeX and next default command. + +2017-06-13 Mosè Giordano <mose@gnu.org> + + Catch expl3 warnings + + * tex-buf.el (LaTeX-warnings-regexp): Adapt regexp to the style of expl3 + warnings. + * tests/tex/error-parsing.el (TeX-error-parsing-expl3-warnings): New test for + expl3 warnings. + +2017-06-02 Ikumi Keita <ikumi@ikumi.que.jp> + + Correct actions on region file in included file not placed in master dir + + * tex-buf.el (TeX-command-region): Call `TeX-region-file' with nil + `nondirectory' argument. + Fix a typo in doc string. + (TeX-command-default): Use `(TeX-region-file)' instead of `TeX-region' + for comparison with the given argument. + +2017-05-30 Ikumi Keita <ikumi@ikumi.que.jp> + + Imporve fix for Bug#26694 + + * tex-buf.el (TeX-command): Update point in region file if the + command is "View". + (TeX-view): + (TeX-region-create): Pass the above job to `TeX-command'. + (TeX-region-update-point): Move point according to the column in + the original buffer. + Do nothing when `TeX-source-correlate-mode' is disabled. + Use `TeX-current-offset' instead of `TeX-line-number-at-pos' in + case narrowing is in effect in the original buffer. + * preview.el.in (preview-at-point): Revert previous commit in + accord with the changes above. + * tex.el (TeX-evince-sync-view-1): Use `TeX-current-offset' + instead of `TeX-line-number-at-pos' in case narrowing is in + effect in the original buffer. + Add FIXME comment about using `current-column'. + (TeX-synctex-output-page-1): Ditto. + Arrange regexp to pick up page number more correctly. + (TeX-view-program-list-builtin): Remove spurious quotation around + %b in SumatraPDF entry. + +2017-05-29 Mosè Giordano <mose@gnu.org> + + * tests/tex/compilation-log.txt: + * tests/tex/error-parsing.el: Add test for error starting with exclamation mark. + +2017-05-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Resolve preview-latex incompatibility with Japanese TeX (Bug#25322) + + * preview.el.in (preview-error-quote): Work consistently with + decoded text. The idea of "encoding entire string beforehand and + decoding it at the last stage" was used previously, but that failed + with `japanese-shift-jis' coding system containing bytes which + happen to coincide with regexp meta characters. + (preview--decode-^^ab): + (preview--convert-^^ab): New functions. + (TeX-inline-preview-internal): Record the process coding system + for decode assigned already so that `preview-error-quote' can + decode the given text correctly afterward. To achive that, change + the role of `preview-coding-system' together with the changes to + `preview-error-quote'. + Give back the command options provided in `(TeX-engine-alist)' to + latex command when preamble caching is enabled. + (preview-coding-system): Modify doc string according to the + changes above to `preview-error-quote' and + `TeX-inline-preview-internal'. + * tex-buf.el (TeX-adjust-process-coding-system): New function. + Adjust the process coding system for asynchronous process launched + within AUCTeX. + (TeX-after-start-process-function): Change default value to + `TeX-adjust-process-coding-system'. + * tex-jp.el (japanese-TeX-set-process-coding-system): Specify end + of line format on the coding systems assigned to process. + (): Don't set `japanese-TeX-set-process-coding-system' to + `TeX-after-start-process-function'. It is now called within + `TeX-adjust-process-coding-system'. + * prv-xemacs.el (preview-buffer-recoding-alist): Fix docstring. + (coding-system-change-eol-conversion): Add advice because XEmacs + 21.4 mule-ucs fails to define `utf-8' coding system to respond + properly to this function. + (preview-ps-quote-filename): Add advice so that this function is + not confused by backslashes as path separator in the return value + of XEmacs function. + * tests/japanese/preview-latex.el: + * tests/japanese/preview-error-test.tex: + * tests/japanese/preview-error-test2.tex: + * tests/japanese/prv-dif-code.tex: New files for regression test. + +2017-05-21 Mosè Giordano <mose@gnu.org> + + Fix indentation in ConTeXt mode after indented optional argument + + * context.el (ConTeXt-find-indent): Fix indentation. Requested by Henri Menke. + * tests/context/context-test.el: + * tests/context/context-indentation-in.tex: + * tests/context/context-indentation-out.tex: New test files. + +2017-05-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't discard process output with `TeX-run-silent' + + * tex-buf.el (TeX-run-silent): Associate the process to the buffer + "*TeX silent*". + +2017-05-15 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex.el (TeX-command-list): Fix typo in help string (mendex -> upmendex) + +2017-05-12 Arash Esbati <arash@gnu.org> + + * latex.el (LaTeX-env-label-as-keyval): Use `buffer-substring-no-properties'. + +2017-05-11 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Document recent changes. + +2017-05-10 Arash Esbati <arash@gnu.org> + + * tests/latex/fontification-general.tex: New file. + +2017-05-10 Arash Esbati <arash@gnu.org> + + Exclude arguments to math environments from fontification + + * font-latex.el (font-latex-match-math-envII) + (font-latex-extend-region-backwards-math-envII): Match and exclude + optional and mandatory argument(s) to math environments from + fontification. + +2017-05-08 Arash Esbati <arash@gnu.org> + + Improve further the exclusion of reserved characters + + * font-latex.el (font-latex-match-simple-exclude-list): New + variable. + (font-latex-match-simple-command): Use + `font-latex-match-simple-exclude-list'. Add check for docTeX mode + in order to remove "_" from the list. + +2017-05-06 Mosè Giordano <mose@gnu.org> + + Work around bug#26694 + + * preview.el.in (preview-at-point): Let-bind `TeX-source-correlate-mode' to nil. + * tex-buf.el (TeX-region-create): Move point only when + `TeX-source-correlate-mode' is non-nil. + +2017-05-06 Arash Esbati <arash@gnu.org> + + * latex/preview.dtx: Adjust contact email address. + +2017-05-04 Arash Esbati <arash@gnu.org> + + * tex-ispell.el: Move entries from style/empheq.el to this file. + + * latex/preview.dtx: Adjust modification date for CTAN. + +2017-05-03 Arash Esbati <arash@gnu.org> + + Query for expl3 package options + + * style/expl3.el (LaTeX-expl3-package-options): New function to + read package options from user. + Add missing file footer. + +2017-05-03 Arash Esbati <arash@gnu.org> + + Add new style/floatrow.el + + * Makefile.in (STYLESRC): Add new style. + + * style/floatrow.el: New file. + +2017-05-02 Arash Esbati <arash@gnu.org> + + Use `ispell-tex-arg-end' on parsed elements + + * style/mdframed.el (LaTeX-mdframed-auto-cleanup, "mdframed"): Use + correct function `ispell-tex-arg-end'. + +2017-04-27 Arash Esbati <arash@gnu.org> + + Improve exclusion of reserved characters from command matches + + * font-latex.el (font-latex-match-simple-command): Skip matches + starting with reserved characters. + +2017-04-27 Arash Esbati <arash@gnu.org> + + Add support for plus sign in macro syntax specification list + + * font-latex.el (font-latex-match-command-with-arguments): Support + plus sign besides asterisk in specification of macro syntax. + +2017-04-27 Arash Esbati <arash@gnu.org> + + Update style/fontspec.el to package version 2.6a + + * style/fontspec.el (LaTeX-fontspec-font-features): Update + variable to package version 2.6a. + (LaTeX-fontspec-auto-cleanup): New function for parsing support + for \newfontfamily and \newfontface macros. + ("fontspec"): Add missing macros and environment. + (LaTeX-fontspec-package-options): Update with new options. + +2017-04-27 Arash Esbati <arash@gnu.org> + + Consider the return value of `assq-delete-all' + + * style/breqn.el (LaTeX-breqn-update-color-keys): + * style/fvextra.el (LaTeX-fvextra-update-key-val): + * style/mdframed.el (LaTeX-mdframed-update-style-key): + * style/minted.el (LaTeX-minted-update-key-vals): + * style/tcolorbox.el (LaTeX-tcolorbox-update-style-key): Use the + return value of `assq-delete-all' rather than looking at the saved + value of the temporary variable. + +2017-04-27 Arash Esbati <arash@gnu.org> + + * latex.el (LaTeX-common-initialization): Add eminnershape macro. + +2017-04-26 Arash Esbati <arash@gnu.org> + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add \addlinespace. + +2017-04-25 Tassilo Horn <tsdh@gnu.org> + + Correctly exclude hypenation and thin spaces from command matches + + * font-latex.el (font-latex-match-simple-command): Skip matches starting with + \- or \,. + +2017-04-25 Arash Esbati <arash@gnu.org> + + Add LaTeX core command \oldstylenums + + * font-latex.el (font-latex-built-in-keyword-classes): Add + \oldstylenums to "type-command" keyword class. + + * latex.el (LaTeX-common-initialization): Add \oldstylenums to + LaTeX core commands. + + * style/textcomp.el ("textcomp"): Remove \oldstylenums from + textcomp.el which is provided by LaTeX core. + +2017-04-24 Arash Esbati <arash@gnu.org> + + Make preview.sty compatible with recent luatex + + * latex/preview.dtx: Check if file luatex85.sty is loadable and + require the package (bug#25601). + +2017-04-24 Arash Esbati <arash@gnu.org> + + Do not highlight control spaces with "\ " + + * font-latex.el (font-latex-match-simple-command): Add space to + the list of characters to be ignored. + +2017-04-23 Arash Esbati <arash@gnu.org> + + Adjust macros acc. to change in `LaTeX-paragraph-commands-regexp-make' + + * style/bicaption.el ("bicaption"): Add \bicaption, \bicaptionbox, + \bisubcaption and \bisubcaptionbox to paragraph commands. + + * style/caption.el ("caption"): Add \captionbox and \captionof to + paragraph commands. + + * style/subcaption.el ("subcaption"): Add \subcaption and + \subcaptionbox to paragraph commands. + +2017-04-23 Arash Esbati <arash@gnu.org> + + * style/exam.el ("exam"): Remove duplicate entries and backslash. + +2017-04-23 Uwe Brauer <oub@mat.ucm.es> + + Add the select environment and related macros to exam style. + + * style/exam.el ("exam"): Add the select environment and related macros. + +2017-04-23 Tassilo Horn <tsdh@gnu.org> + + Fix comment environment highlighting + + * style/comment.el ("comment"): Don't set comment starter/ender but generic + comment delimiters. + +2017-04-21 Ikumi Keita <ikumi@ikumi.que.jp> + + Add test for my last commit + + * tests/japanese/error-parsing.el: New file. + +2017-04-21 Mosè Giordano <mose@gnu.org> + + Do not highlight thin spaces with \, + + * font-latex.el (font-latex-match-simple-command): Add comma to the list of + characters to be ignored. + +2017-04-19 Mosè Giordano <mose@gnu.org> + + Fix parsing of LaTeX2e date formats + + * tex-buf.el (TeX-LaTeX-sentinel): Support ISO date format, now used by + LaTeX2e. Reported by Uwe Siart. + * tests/tex/error-parsing.el (TeX-LaTeX2e-date): Add a test for LaTeX2e date + formats. + +2017-04-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Improve error handling for Japanese users + + * tex-buf.el (TeX-help-error): Use number based condition to + detect whether the search over `TeX-error-description-list' + comes to its last element. Comparison with a literal string + breaks when tex-jp.el installs Japanese help messages into + `TeX-error-description-list'. + +2017-04-18 Ikumi Keita <ikumi@ikumi.que.jp> + + Deal with strange file name + + * tex-jp.el (): Increase `pos' in case the master file + name happens to contain special %-sequence. + +2017-04-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Support upmendex + + * tex-jp.el (): Make "%(makeindex)" to expand to upmendex when + upmendex is available and `TeX-engine' is supported by it. + Add "%(dic)" expander for the dictionary option of (up)mendex. + * tex.el (TeX-command-list): Add "upMendex" entry. Set 4th + element to t so that user will get a chance to supply + dictionary option to the command line string. + +2017-04-17 Tassilo Horn <tsdh@gnu.org> + + Improve command highlighting to not be triggered by hyphenation + + Reported by François Patte. + +2017-04-17 Tassilo Horn <tsdh@gnu.org> + + Add proper copyright header to some styles + + Add the required headers so that the ELPA build works again. + +2017-04-15 Arash Esbati <arash@gnu.org> + + * doc/changes.texi: Update with recent changes. + +2017-04-10 Arash Esbati <arash@gnu.org> + + * doc/auctex.texi (Selecting a Command): Document `TeX-ispell-verb-delimiters'. + +2017-04-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix `paragraph-start' and `paragraph-separate' + + * plain-tex.el (plain-TeX-common-initialization): Remove "^" from + `paragraph-start' according to the doc string. + Remove LaTeX display math delimiters "\[" and "\]" from + `paragraph-start'. + Add "item" and "itemitem" to `paragraph-start'. + Change the regexp grouping to shy group in `paragraph-start' and + `paragraph-separate'. + * tex-info.el (TeX-texinfo-mode): Remove "^" from `paragraph-start' + and `paragraph-separate'. + +2017-04-03 Arash Esbati <arash@gnu.org> + + Update package options in style/amsmath.el + + * style/amsmath.el (LaTeX-amsmath-package-options): Update package + options to v2.16a. + +2017-04-01 Arash Esbati <arash@gnu.org> + + Append \b to regexp built from TeX control words + + * latex.el (LaTeX-paragraph-commands-regexp-make): Append \b to + regexp built from TeX control words. Fix this report + http://lists.gnu.org/archive/html/auctex/2017-03/msg00009.html + + * tests/latex/latex-filling-in.tex: + * tests/latex/latex-filling-out.tex: + * tests/latex/latex-test.el (LaTeX-filling): Extend test for addition + in `LaTeX-paragraph-commands-regexp-make' in latex.el. + +2017-03-31 Mosè Giordano <mose@gnu.org> + + Fix detection of bibliography files with dots in path + + * latex.el (LaTeX-auto-regexp-list): Remove dot from the list of excluded + characters in addbibresource's regexp. + * tests/latex/latex-test.el (LaTeX-addbibresource): New test for addbibresource. + +2017-03-29 Ikumi Keita <ikumi@ikumi.que.jp> + + Don't alter standard value or saved value themselves of customize option + + * tex-jp.el (): Stop using `setcar' on the elements of + `TeX-command-list'. This used to alter the standard value + or saved value themselves of the customize option since + `setcar' operates descructively on lists as Lisp objects. + Instead create new list by `mapcar' and `append'. + (): Deal with the case that `TeX-view-program-list-builtin' + doesn't have an entry of "xdvi". + Change the expected executable name to "%(xdvi)" as well. + +2017-03-28 Arash Esbati <arash@gnu.org> + + Fix last improvement for skipping of inline verbatim macros + + * tex.el (TeX-ispell-tex-arg-verb-end): New function. + + * tex-ispell.el (TeX-ispell-verb-delimiters): Replace + `TeX-ispell-verb-opening-delimiters' and + `TeX-ispell-verb-closing-delimiters' with new customizable option + `TeX-ispell-verb-delimiters'. + (TeX-ispell-skip-setcar): Use new function + `TeX-ispell-tex-arg-verb-end' with verbatim macros. + +2017-03-27 Arash Esbati <arash@gnu.org> + + Improve skipping of inline verbatim macros + + * tex-ispell.el (TeX-ispell-verb-opening-delimiters) + (TeX-ispell-verb-closing-delimiters): New customizable options. + (TeX-ispell-skip-setcar): Skip inline verbatim macros from + listings and fancyvrb package. Use new variables for minted + package. + +2017-03-27 Arash Esbati <arash@gnu.org> + + * tests/latex/fontification-verb-macros.tex: New file. + +2017-03-27 Arash Esbati <arash@gnu.org> + + Improve fontification of verbatim macros in style/minted.el + + * style/minted.el (LaTeX-minted-auto-cleanup): Add key=val query + and fontification support for parsed elements. + (LaTeX-minted-add-syntactic-keywords-extra): New function. + ("minted"): Use `LaTeX-minted-add-syntactic-keywords-extra' to add + fontification support for \mint and \mintinline macros. + Add \mint and \mintinline to textual keywords class and apply the + fontification only for optional and first mandatory argument. + +2017-03-27 Arash Esbati <arash@gnu.org> + + Adapt fontification for \lstinline + + * style/listings.el ("listings"): Fontify only the optional + argument of \lstinline. + +2017-03-27 Arash Esbati <arash@gnu.org> + + Recognize optional argument in verb macros with delimiters/braces + + * font-latex.el (font-latex-built-in-keyword-classes): Add \verb + to textual keyword class. + (font-latex-set-syntactic-keywords): Extend regexp to ignore an + optional argument for verbatim macros with delimiters and/or + braces. + +2017-03-26 Ikumi Keita <ikumi@ikumi.que.jp> + + Add support for Japanese font command + + * tex-jp.el (): Append entries for mincho and gothic font + commands to `LaTeX-font-list'. + (japanese-latex-mode-initialization): Add font lock support + to \textgt, \mathgt and \gtfamily commands for displaying + with bold font in Emacs buffer. + * doc/auctex.texi (Japanese): Mention new font commands and + add indexes for them. + +2017-03-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Enhance Japanese class files support + + * style/tarticle.el: + * style/tbooks.el: + * style/treport.el: + * style/jsreport.el: Add new style files. + * Makefile.in (STYLESRC): Add them and tweak order not to break the + format of file name alignment. + * style/j-book.el ("j-book"): Correct the largest section level to + "part" following book.el. + * style/jarticle.el: + * style/jbook.el: + * style/jreport.el: + * style/jsarticle.el: + * style/jsbook.el: Add defvar for class options, counters and + pagestyles following {article,book,report}.el. + Correct the largest section level in jbook.el, too. + Deal with "report" option in jsbook.el. + +2017-03-24 Arash Esbati <arash@gnu.org> + + * texmathp.el (texmathp-tex-commands-default): Add entries for empheq.sty. + +2017-03-23 Arash Esbati <arash@gnu.org> + + * style/minted.el ("minted"): Add key=val query for \mint and \mintinline. + +2017-03-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `TeX-line-number-at-pos' further for older emacsen + + * tex-buf.el (TeX-region-create): + (TeX-region-update-point): + * tex-info.el (Texinfo-make-node-list): Replace `line-number-at-pos' + with `TeX-line-number-at-pos'. + +2017-03-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Use compatibility function `TeX-line-number-at-pos' for older emacsen + + * tex.el (TeX-evince-sync-view-1): + (TeX-synctex-output-page-1): Replace `line-number-at-pos' with + `TeX-line-number-at-pos'. + +2017-03-18 Arash Esbati <arash@gnu.org> + + Use the variable `LaTeX-listing-label' + + * style/minted.el ("minted"): + * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Use + `LaTeX-listing-label' instead of hard-coded "lst:" string. + +2017-03-18 Arash Esbati <arash@gnu.org> + + Use compat function `TeX-replace-regexp-in-string' in core files + + * tex.el (TeX-source-correlate-sync-source): + * latex.el (LaTeX-split-bibs): Use compat function + `TeX-replace-regexp-in-string'. + +2017-03-18 Arash Esbati <arash@gnu.org> + + Use `TeX-replace-regexp-in-string' in style files + + * style/empheq.el (LaTeX-empheq-item-equation): + * style/tcolorbox.el (LaTeX-tcolorbox-load-used-libraries): + * style/xcolor.el (LaTeX-xcolor-auto-cleanup): Use compat function + `TeX-replace-regexp-in-string'. + +2017-03-18 Arash Esbati <arash@gnu.org> + + Add new compat function `TeX-replace-regexp-in-string' + + * tex.el (TeX-replace-regexp-in-string): New compat function. + With XEmacs, pass arguments to `replace-in-string', with Emacs to + `replace-regexp-in-string'. This function supports only mandatory + arguments of the original functions just mentioned. + +2017-03-17 Ikumi Keita <ikumi@ikumi.que.jp> + + Avoid altering user option as much as possible + + * tex-jp.el (): Alter `TeX-view-predicate-list-builtin' and + `TeX-view-program-list-builtin' instead of their customize option + cousins. + Append to `TeX-view-program-selection' only on w32 system. + +2017-03-16 Arash Esbati <arash@gnu.org> + + Add LaTeX inline math delimiters to Ispell skip list + + * tex-ispell.el: Add LaTeX inline math delimiters \( \) to Ispell + skip list. (bug#26125) + Remove unnecessary part from regexp for \cmidrule. + +2017-03-15 Arash Esbati <arash@gnu.org> + + Fix addition of key=val's + + * style/fvextra.el (LaTeX-fvextra-update-key-val): Fix addition of + key=val's to `LaTeX-fancyvrb-key-val-options-local'. + +2017-03-15 Ikumi Keita <ikumi@ikumi.que.jp> + + Modify `TeX-expand-list-builtin' instead of `TeX-expand-list' + + * tex-jp.el (): `TeX-expand-list' is user option since 2015. Add + extra entries for Japanese TeX engines to `TeX-expand-list-builtin' + instead. + +2017-03-13 Arash Esbati <arash@gnu.org> + + Add new style/fvextra.el + + * Makefile.in (STYLESRC): Add new style. + + * style/fvextra.el: New file. + +2017-03-13 Arash Esbati <arash@gnu.org> + + Improve parsing capabilities of style/fancyvrb.el + + * style/fancyvrb.el (LaTeX-fancyvrb-key-val-options): Add + undocumented keys, update some values. + (LaTeX-fancyvrb-key-val-options-local) + (LaTeX-fancyvrb-base-macros, LaTeX-fancyvrb-base-environments) + (LaTeX-fancyvrb-key-val-skip-regexp): New variables. + (LaTeX-fancyvrb-macro-regexp, LaTeX-fancyvrb-environment-regexp): + Update for new parsing mechanism. + (LaTeX-fancyvrb-arg-define-macro) + (LaTeX-fancyvrb-arg-define-environment) + (LaTeX-fancyvrb-arg-file-relative): New functions. + ("fancyvrb"): Use new variables and functions in the hook. Update + fontification. + +2017-03-10 Arash Esbati <arash@gnu.org> + + Improve fallback for indentation when & is omitted + + * latex.el (LaTeX-hanging-ampersand-position): Improve handling of + fallback which now respects also intended tabular environments. + Thanks to Ikumi Keita for testing and providing code. (bug#26032) + + * tests/latex/tabular-in.tex: + * tests/latex/tabular-out.tex: Add additional test for indented + tabular. + +2017-03-09 Ikumi Keita <ikumi@ikumi.que.jp> + + Remove spurious entries of view settings. + + * tex-jp.el (TeX-view-program-list): + (TeX-view-program-selection): Remove spurious entries, most of which + are related with other TeX IDEs. + cf. http://lists.gnu.org/archive/html/auctex-devel/2016-04/msg00036.html + +2017-03-09 Arash Esbati <arash@gnu.org> + + Add fallback for indentation when & is omitted + + * latex.el (LaTeX-hanging-ampersand-position): Add fallback for + indentation if the row searched does not contain a column + separator &. + + * tests/latex/tabular-in.tex: + * tests/latex/tabular-out.tex: Add filling test for missing & in + row. + +2017-02-06 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix auto selection of japanese TeX engine + + * tex-jp.el (japanese-latex-mode-initialization): Use + `LaTeX-match-class-option' to detect uplatex option given to + jsarticle, jsreport and jsbook class. (The root of this problem is + the same as Bug#25563) + (): Quit appending to `LaTeX-command-style' because this made the + user's intentional selection of `TeX-engine' ineffective with regard + to the selection of the executable names. + Fix copyright year. + * doc/auctex.texi (Japanese): Add description of Japanese TeX engine: + How to use, change and set the value of the engine. + Add description of the customize options related to the encoding of + Japanese TeX documents. + +2017-03-08 Arash Esbati <arash@gnu.org> + + Detect \& in tabular cells when filling + + * latex.el (LaTeX-indent-tabular): Search backward for any + ampersands not escaped with a backslash, i.e. control symbol \&, + and return the adjusted value. Thanks to Ikumi Keita for his + perceptive comments on the implementation. (bug#26010) + + * tests/latex/tabular-in.tex: + * tests/latex/tabular-out.tex: Add test for table filling with \& + in cells. + +2017-03-06 Arash Esbati <arash@gnu.org> + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add hyperref macros. + +2017-03-05 Arash Esbati <arash@gnu.org> + + * tex-ispell.el (TeX-ispell-skip-setcdr): Add entry for filecontents package. + +2017-03-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix documents and add trivial improvements. + + * font-latex.el (font-latex-deactivated-keyword-classes): Add keyword + class biblatexnoarg, biblatex and slide-title to doc string. + Use `buffer-string'. + (font-latex-keyword-matcher): Mention that face attributes is accepted + as FACE argument in doc string. + (font-latex-make-built-in-keywords): Arrange doc string for generated + defvar of `font-latex-match-*-keywords-local' depending on the keyword + type. + Remove spurious type declaration from generated defcustom of + `font-latex-match-*-keywords'. + Replace meaningless argument with nil and add doc string for generated + defvar of `font-latex-match-*'. + Replace redundant call to intern with literal quote of symbol. + (font-latex-user-keyword-classes): Fix doc string. The accepted face + argument is face attribute rather than font specification. + Add doc string for generated defvar of `font-latex-match-*'. + (font-latex-make-user-keywords): Replace backquote with quote where + backquote is not necessary. + (font-latex-add-keywords): Add keyword class biblatexnoarg to doc + string. + * doc/auctex.texi (): Update copyright year. + (Deactivating defaults of built-in keyword classes): Add keyword + class biblatexnoarg, biblatex and slide-title. + Fix sample lisp code. + (User-defined keyword classes): The accepted face argument is face + attribute rather than font specification. + +2017-03-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Make customization to face specification to appear in + customization buffer. + + * font-latex.el (font-latex-user-keyword-classes): Exchange the order + of `face' and `custom-face-edit'. Tweak doc string. + +2017-03-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Unify treatment of face argument over the relevant functions. + + * font-latex.el (font-latex-keyword-matcher): Conform the face + argument correctly to the format `font-lock-keywords' requires. + (font-latex-make-user-keywords) : Call `font-latex-make-match-defun' + directly without `eval'. + (font-latex-deactivated-keyword-classes) : Accept a face symbol, as + well as a form returning a face symbol, for the third element for each + item of `font-latex-built-in-keyword-classes'. + (font-latex-built-in-keyword-classes) : Remove quoting from the face + names. Contrary to the sentence of the doc string + "The third element is the symbol of a face to be used or a Lisp + form returning a face symbol.", symbol of a face was invalid due to + the above bugs. + +2017-03-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix font-latex-make-match-defun to generate intended code. + + * font-latex.el (font-latex-make-match-defun): Arrange the order of + evaluation not to generate meaningless clause. Byte compile warning + on xemacs went away. + +2017-03-04 Mosè Giordano <mose@gnu.org> + + Partially revert previous commit, will look better later + + * tex-buf.el (TeX-command-expand): Do not error if `string' is nil. This made + "View" command unusable. + +2017-03-04 Mosè Giordano <mose@gnu.org> + + Prevent infinite loop in TeX-command-expand + + * tex-buf.el (TeX-command-expand): Throw an error if `string' is not a string. + This prevents an infinite loop. + * tex.el (TeX-engine-in-engine-alist): New function to pick up an engine from + `TeX-engine-alist' and throw an error if the engine is not there. + (TeX-expand-list-builtin): Use `TeX-engine-in-engine-alist'. + * context.el (ConTeXt-expand-options): Use `TeX-engine-in-engine-alist'. + * tests/tex/command-expansion.el (TeX-command-expansion-errors): Add tests for + error handling of `TeX-command-expand'. + +2017-02-24 Ikumi Keita <ikumi@ikumi.que.jp> + + Tweak locale treatment on xemacs. + + * tex-jp.el (japanese-TeX-set-process-coding-system): Use the locale + related environment variables for fallback value. + +2017-02-21 Arash Esbati <arash@gnu.org> + + Add new style/sourcecodepro.el + + * Makefile.in (STYLESRC): Add new style. + + * style/sourcecodepro.el: New file. + +2017-02-21 Arash Esbati <arash@gnu.org> + + * style/subfiles.el (LaTeX-subfiles-class-options): New function. + +2017-02-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Make papersize predicate in tex-jp.el to work again. + Problem parallel to bug#25563. + + * tex-jp.el (): Use `LaTeX-match-class-option' to examine paper size + option of document class. + +2017-02-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix setting of coding system for Japanese TeX + + * tex-jp.el (japanese-TeX-set-process-coding-system): Cater for the + case that kanji option is requested by user but cannot be determined. + XEmacs doesn't have `locale-coding-system'. Use + `get-coding-system-from-locale' and `current-locale' instead. + Cleanup indentation. + (japanese-TeX-coding-ejsu): Add entry for xemacs coding system of cp932. + +2017-02-20 Mosè Giordano <mose@gnu.org> + + Improve regexp for looking for documentclass macro + + * latex.el (LaTeX-env-document): Allow any non line-breaking character in regexp + used to look for `documentclass' macro. Previous regexp did not catch class + options containing dots or slash, that may occur when using `subfiles' class. + +2017-02-20 Mosè Giordano <mose@gnu.org> + + Improve determination of master file with subfiles class + + * style/subfiles.el ("subfiles"): Do not strip dirname from master file. + +2017-02-19 Arash Esbati <arash@gnu.org> + + Add new keys for package version 4.00 + + * style/tcolorbox.el (LaTeX-tcolorbox-keyval-options): Add new + keys for v4.00 of the package. + +2017-02-16 Arash Esbati <arash@gnu.org> + + * latex.el (LaTeX-label): Eliminate premature returning of label. + +2017-02-16 Arash Esbati <arash@gnu.org> + + Append "lstlisting" to `LaTeX-label-alist' + + * style/listings.el ("listings"): Append "lstlisting" to + `LaTeX-label-alist'. + (LaTeX-listings-auto-cleanup): Use `LaTeX-listing-label' as a + symbol during clean up. + +2017-02-10 Arash Esbati <arash@gnu.org> + + Add new style/preview.el + + * Makefile.in (STYLESRC): Add new style. + + * style/preview.el: New file. + +2017-02-10 Arash Esbati <arash@gnu.org> + + * .gitignore: Ignore only preview.el in top directory. + +2017-02-10 Arash Esbati <arash@gnu.org> + + Improve parsing process in style/xcolor.el + + * style/xcolor.el (LaTeX-xcolor-definecolor-regexp): Use + `regexp-opt' to build a regexp to match all color defining macros. + (LaTeX-xcolor-colorlet-regexp): Remove variable. + (LaTeX-xcolor-auto-cleanup): Romove unnecessary *. + +2017-02-09 Arash Esbati <arash@gnu.org> + + Improve parsing process in style/color.el + + * style/color.el (LaTeX-color-definecolor-regexp): Remove + unnecessary 2nd and 3rd arguments from regexp. + (LaTeX-color-auto-cleanup): Delete unnecessary function and remove + it from `TeX-auto-cleanup-hook'. + +2017-02-09 Arash Esbati <arash@gnu.org> + + Fix parsing bug in style/xcolor.el + + * style/xcolor.el (LaTeX-xcolor-definecolor-regexp): Move parsing + of \colorlet macro into `LaTeX-xcolor-colorlet-regexp'. + (LaTeX-xcolor-colorlet-regexp): New variable. + ("xcolor"): Activate `LaTeX-xcolor-colorlet-regexp' in style hook. + +2017-02-06 Arash Esbati <arash@gnu.org> + + * latex/preview.dtx: Fix example for \PreviewMacro* macro. + Add missing backslash. + +2017-02-04 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix minor problems + * tex.el (TeX-view-predicate-list-builtin): Enclose whole alternatives + in regexp with shy group in order that the effect of "\`" and "\'" + covers all the alternatives. + * latex.el (LaTeX-auto-cleanup): Regard "Class", in addition to + "class", as an indicator of LaTeX2e document. + +2017-02-02 Arash Esbati <arash@gnu.org> + + Simplify addition of entirely skipped environments + + * tex-ispell.el (TeX-ispell-skip-envs-list): New variable for + environments which should be skipped entirely. + (TeX-ispell-skip-envs-regexp): New variable keeping the regexp + generated from `TeX-ispell-skip-envs-list'. + +2017-02-02 Tassilo Horn <tsdh@gnu.org> + + Fix TeX-view-predicate-list-builtin predicates wrt class opts + + * latex.el (LaTeX-match-class-option): New function. + * tex.el (TeX-view-predicate-list-builtin): Use above function to check + paper sizes orientation from documentclass options (bug#25563). + +2017-02-01 Mosè Giordano <mose@gnu.org> + + Fix number of arguments of local-variable-p in XEmacs + + * font-latex.el (font-latex-after-hacking-local-variables): Second argument of + `local-variable-p' is mandatory in XEmacs. + +2017-02-01 Tassilo Horn <tsdh@gnu.org> + + Fix font-latex-after-hacking-local-variables on XEmacs + + * font-latex.el (font-latex-after-hacking-local-variables): Cater for the + fact that file-local-variables-alist isn't there in XEmacs and older + Emacs versions (bug#25564). + +2017-02-01 Arash Esbati <arash@gnu.org> + + * tex-ispell.el: Add support for enviroments from breqn.sty. + +2017-02-01 Tassilo Horn <tsdh@gnu.org> + + Fix plain-TeX-auto-regexp-list docstring + + * tex.el: Fix docstring of plain-TeX-auto-regexp-list (bug#25574). + +2017-01-29 Arash Esbati <arash@gnu.org> + + Add new style/breqn.el + + * Makefile.in (STYLESRC): Add new style. + + * style/breqn.el: New file. + +2017-01-29 Arash Esbati <arash@gnu.org> + + Update style/listings.el to use `LaTeX-env-label-as-keyval' + + * style/listings.el (LaTeX-listings-key-val-options): Comment the + "label" key. + (LaTeX-listings-key-val-label-extract): + (LaTeX-listings-key-val-label-regexp): New variable. + (LaTeX-listings-auto-cleanup): Use `LaTeX-add-environments' + instead of adding new enviroments to `LaTeX-auto-environment'. + Use the function `LaTeX-env-label-as-keyval' to insert labels. + Add parsed enviroments to AUCTeX parser with `TeX-auto-add-regexp'. + ("listings"): Add `LaTeX-listings-key-val-label-regexp' to the + parser. + Use `LaTeX-env-label-as-keyval' for "lstlisting". + +2017-01-29 Arash Esbati <arash@gnu.org> + + Add function to put labels in opt. argument of environments + + * doc/changes.texi: Document new feature. + + * latex.el (LaTeX-listing-label): New custom prefix for labels in + code typesetting environments. + (LaTeX-env-label-as-keyval): New function. + (LaTeX-narrow-to-environment): Fix typo in docstring. + +2017-01-27 Arash Esbati <arash@gnu.org> + + Add `NO-INSERT' argument to `LaTeX-label' + + * doc/changes.texi: Document changes to `LaTeX-label' and + `LaTeX-label-function'. + + * latex.el (LaTeX-label): Add second optional argument NO-INSERT. + This argument is passed to function bound to + `LaTeX-label-function' (usually `reftex-label' with RefTeX + enabled). If `LaTeX-label-function' is nil and NO-INSERT is + non-nil, label is read and returned as a string. Remove some + unnecessary checks. + (LaTeX-label-function): Mention in docstring that the function is + expected to take an optional argument NO-INSERT. This is an + incompatible change. + +2017-01-27 Arash Esbati <arash@gnu.org> + + Check if label is defined before adding it to known labels + + * latex.el (TeX-read-label): Check if label is already defined and + ask for user confirmation before adding it list of known labels. + Do not add label if empty string or the value of + `TeX-read-label-prefix'. + +2017-01-26 Arash Esbati <arash@gnu.org> + + Add \citetitle to `reftex-cite-format' in style/biblatex + + * style/biblatex.el ("biblatex"): Add \citetitle[*] to + `reftex-cite-format' and bind them to keys i/I per user request + http://lists.gnu.org/archive/html/auctex/2017-01/msg00049.html. + +2017-01-25 Mosè Giordano <mose@gnu.org> + + Guard setcar with appropriate test + + * tex-jp.el (assoc): Replace second element of "BibTeX" and "Index" entries of + `TeX-command-list' only if they are already there. This variable is + customizable and users may have removed them. Reported by jfbu. + +2017-01-20 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-newline): Make interactive. See bug#24412. + +2017-01-20 Mosè Giordano <mose@gnu.org> + + Add makeglossaries to the list of commands + + * tex.el (TeX-command-list): Add makeglossaries. Fixes bug#24952. + * latex.el (LaTeX-clean-intermediate-suffixes): Add extensions of files created + by makeglossaries. + +2017-01-15 Mosè Giordano <mose@gnu.org> + + Show summary of tests at the end of make check + + * tests/Makefile (check): Depend on `check-doit' and `mostlyclean' phony + targets. + (check-doit): New rule for showing summary of tests. + (mostlyclean): Delete log files. + +2017-01-13 Davide G. M. Salvetti <salve@debian.org> + + Fix ConTeXt-outline-regexp + + Add a separator between different elements; see Debian bug #850444. + +2017-01-13 Mosè Giordano <mose@gnu.org> + + Remove also a gitignore + + * Makefile.in (EXCLUDEDFILES): Add latex/.gitignore to excluded files. + +2017-01-13 Mosè Giordano <mose@gnu.org> + + Remove file from distributed tar ball + + * Makefile.in (EXCLUDEDFILES): Add doc/tex-ref.log. + +2017-01-12 Mosè Giordano <mose@gnu.org> + + Add AUCTeX Logo + + * etc/auctex-logo.tex: Logo of AUCTeX. It was realized with comments from + Vincent Belaïche, Marcin Borkowski, Marta Dell’Atti, Tamas Papp and others. + + * .gitignore: Ignore some files automatically created during compilation. + +2017-01-11 Mosè Giordano <mose@gnu.org> + + Make gitlog-to-changelog ignore release-commit + + * Makefile.in (release-commit): Prefix the commit message with "; ", so that + the commit will be ignored when automatically updating the ChangeLog. + +2017-01-10 Mosè Giordano <mose@gnu.org> + + * Version 11.90 released. + +2017-01-10 Mosè Giordano <mose@gnu.org> + + Refresh RELEASE file + + * RELEASE: Update "Availability" and "Future development and additional + information" sections. + +2017-01-10 Mosè Giordano <mose@gnu.org> + + * Makefile.in (release-commit): Use UTF-8 coding for ChangeLog entry. + + * ChangeLog-preview: Change encoding to UTF-8. + + * Makefile.in (release-commit): Fix name of preview ChangeLog. + +2017-01-10 Arash Esbati <arash@gnu.org> + + Use RefTeX for multiple references in cleveref + + * style/cleveref.el (TeX-arg-cleveref-multiple-labels): Check if + RefTeX is enabled and use it for multiple referencing macros. + ("cleveref"): Use `TeX-arg-ref' instead of `TeX-arg-label'. + ("cleveref"): Remove call of (font-latex-set-syntactic-keywords). + +2017-01-10 Arash Esbati <arash@gnu.org> + + Skip macros and environments from tcolorbox and raster library + + * tex-ispell.el (TeX-ispell-sort-skip-cmds-list): Extract macros + with optional argument from `TeX-ispell-skip-cmds-list'. + (TeX-ispell-skip-cmds-opt-arg-regexp): New variable containing + macros where only the optional argument is skipped while spell + checking. + Add macros and environments from tcolorbox.el and + tcolorboxlib-raster.el. + +2017-01-10 Arash Esbati <arash@gnu.org> + + Advertise AUCTeX installation from ELPA + + * doc/quickstart.texi (Quick Start): Emphasize the necessity to + drop (load "auctex.el" nil t t) when installed from ELPA. + + * doc/install.texi (Installation): Advertise installation from + ELPA. + +2017-01-09 Mosè Giordano <mose@gnu.org> + + Prepare for upcoming release + + * RELEASE: Update AUCTeX version, the new features section, and + the list of contributors. + + * configure.ac: Update AUCTeX version. + + * doc/changes.texi: Reorder changes for 11.90 version section. + + * doc/tex-ref.tex: Update AUCTeX version and copyright years + across the file. + + * latex/preview.dtx: Manually update release version. + +2017-01-07 Mosè Giordano <mose@gnu.org> + + Adapt Makefile to new ChangeLog file name + + * Makefile.in (release-commit): Use `CHANGELOG_N' in place of + `ChangeLog'. + +2017-01-06 Tassilo Horn <tsdh@gnu.org> + + Don't use cl function copy-list + + * font-latex.el (font-latex--get-script-props): Use copy-sequence instead of + copy-list, the latter being a cl function. + +2017-01-05 Tassilo Horn <tsdh@gnu.org> + + Fix bug where font-latex-sub/superscript-face was not applied to ^_ + + * font-latex.el (font-latex-make-user-keywords): prepend + font-latex-script-char-face, don't replace existing specs. + +2017-01-05 Tassilo Horn <tsdh@gnu.org> + + Fontify script characters with a new face + + * doc/auctex.texi (Fontification of math): Document it. + * doc/changes.texi: Mention that. + * font-latex.el (font-latex-make-user-keywords): Adapt. + (font-latex-script-char-face): New face. + (font-latex-match-script-chars): Improve it so that double ^_ aren't + matched because such errors were hard to see with + font-latex-fontify-script set to invisible. + (font-latex-script-char): New function. + +2017-01-05 Arash Esbati <arash.esbati@gmail.com> + + Support biblatex cite format in all Emacsen + + * style/biblatex.el ("biblatex"): Check if biblatex is available + in `reftex-cite-format-builtin' and use it. If not, add entries + for older Emacsen manually. + +2017-01-05 Arash Esbati <arash.esbati@gmail.com> + + Check new custom option before activating RefTeX cite format + + * doc/changes.texi: Document new variable. + + * style/biblatex.el ("biblatex"): + * style/harvard.el ("harvard"): + * style/jurabib.el ("jurabib"): + * style/natbib.el ("natbib"): Set cite format provided by RefTeX + when `LaTeX-reftex-cite-format-auto-activate' is non-nil. + + * tex-style.el (LaTeX-reftex-cite-format-auto-activate): New + customizable variable. + +2017-01-04 Tassilo Horn <tsdh@gnu.org> + + Fix script unfontification bug + + * font-latex.el (font-latex-unfontify-region): Remove script-level + property and raise display property even though it's value is different + from what's specified in font-latex-script-display. + +2017-01-04 Tassilo Horn <tsdh@gnu.org> + + Improve completion docs + + * doc/auctex.texi (Completion): Improved docs. + * doc/changes.texi: Mention math completion, add link to Completion node + in the manual. + * tex.el (TeX-complete-list): Improve docstring. + +2017-01-04 Tassilo Horn <tsdh@gnu.org> + + Refactor normal completion and completion at point a bit + + * tex.el (TeX--complete-find-entry): New function. + (TeX-complete-symbol,TeX--completion-at-point): Use it. + +2017-01-04 Tassilo Horn <tsdh@gnu.org> + + Completion for math macros + + * latex.el (LaTeX--after-math-macro-prefix-p): New function. + (LaTeX-common-initialization): Use it for new TeX-complete-list entry. + * tex.el (TeX-complete-list): Also allow match-data setting predicates in + entries. + (TeX-complete-symbol,TeX--completion-at-point): Adapt to new possibility. + +2017-01-03 Tassilo Horn <tsdh@gnu.org> + + Add completion-at-point support + + * doc/auctex.texi (Completion): Document completion-at-point support. + * doc/changes.texi: Mention completion-at-point support. + * tex.el (TeX--completion-at-point): New function. + (VirTeX-common-initialization): Add TeX--completion-at-point to + completion-at-point-functions in TeX buffers if that's bound. + +2017-01-03 Mosè Giordano <mose@gnu.org> + + Use RefTeX for multiple citations in biblatex + + * style/biblatex.el (LaTeX-arg-biblatex-cites): Use RefTeX when + available. Suggested by Arash Esbati. + +2017-01-03 Tassilo Horn <tsdh@gnu.org> + + Simple docfix + + * font-latex.el (font-latex-fontify-script-max-level): Correct escaping of + \(...\) in the docstring. + +2017-01-03 Tassilo Horn <tsdh@gnu.org> + + Improve multi-level script fontification + + * doc/auctex.texi (Fontification of math): Update docs. + * doc/changes.texi: Add an item for the new script fontification + features. + * font-latex.el (font-latex-fontify-script): Update docstring. + (font-latex-fontify-script-max-level): New custom variable. + (font-latex--get-script-props): Apply script face only for levels up to + font-latex-fontify-script-max-level. + (font-latex-script): Adapt call to font-latex--get-script-props. + +2017-01-03 Arash Esbati <arash.esbati@gmail.com> + + Add a newline only if \label is inserted + + * style/caption.el (LaTeX-arg-caption-captionof): + * style/bicaption.el (LaTeX-arg-bicaption-bicaption): Save the + position before asking for a label. Add a newline only if a label + is inserted. + +2017-01-03 Tassilo Horn <tsdh@gnu.org> + + Bring back multi-level script font-locking + + * doc/auctex.texi (Fontification of math): Add documentation. + * font-latex.el (font-latex-script-display): Increase default raise level to + 0.5. + (font-latex-superscript-face,font-latex-subscript-face): Let scripts be a bit + larger (:height 0.85 instead of 0.8). + (font-latex--get-script-props): New function for incrementing/decrementing + raise display property values. + (font-latex-script): Use it. + +2017-01-03 Tassilo Horn <tsdh@gnu.org> + + Revert "Remove multi-level/invisible feature of font-latex-fontify-script" + + This reverts commit ccec8501960a448dd8faccaae54dfd9839a37c30. + +2017-01-02 Tassilo Horn <tsdh@gnu.org> + + Remove multi-level/invisible feature of font-latex-fontify-script + + * font-latex.el (font-latex-make-user-keywords,font-latex-script-display) + (font-latex-script): Remove multi-level/invisible feature of + font-latex-fontify-script. + (font-latex-doctex-preprocessor-face): Remove function. + * doc/auctex.texi (Fontification of math): Remove documentation for + font-latex-fontify-script's multi-level and invisible values. + +2016-12-31 Arash Esbati <arash.esbati@gmail.com> + + Set `reftex-set-cite-format' to biblatex or natbib + + * style/biblatex.el ("biblatex"): Set `reftex-set-cite-format' to + biblatex or natbib depending on package option. + +2016-12-30 Uwe Brauer <oub@mat.ucm.es> + + Add new style/exam.sty + + * Makefile.in (STYLESRC): add exam.el + * style/exam.el: Add style file + * tex-style.el: Move defcustom from exam.el to tex-style.el + +2016-12-30 Arash Esbati <arash.esbati@gmail.com> + + Fix the names also in expert macros + + * style/cleveref.el ("cleveref"): Fix the names also in expert macros. + +2016-12-30 Arash Esbati <arash.esbati@gmail.com> + + Fix name of macros \lcnamecref and \lcnamecrefs + + * style/cleveref.el ("cleveref"): Fix name of macros \lcnamecref + and \lcnamecrefs. + +2016-12-30 Arash Esbati <arash.esbati@gmail.com> + + Add fontification for varioref's referencing macros + + * font-latex.el (font-latex-built-in-keyword-classes): Add starred + version to \vref macro. + + * style/varioref.el ("varioref"): Add fontification support for + referencing macros. + +2016-12-30 Arash Esbati <arash.esbati@gmail.com> + + Add starred version of \citeauthor and \Citeauthor + + * font-latex.el (font-latex-built-in-keyword-classes): + * style/biblatex.el ("biblatex"): Add starred version of + \citeauthor and \Citeauthor macros. + +2016-12-30 Arash Esbati <arash.esbati@gmail.com> + + Fix fontification for natbib compat macros + + * style/biblatex.el ("biblatex"): Fix fontification for natbib + compat macros which take 2 optional arguments. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add \switchcolumn to paragraph commands + + * style/paracol.el ("paracol"): Add \switchcolumn to paragraph + commands. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add new style/titletoc.el + + * style/titletoc.el: New file. + + * Makefile.in (STYLESRC): Add new style. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add new style/titlesec.el + + * Makefile.in (STYLESRC): Add new style. + + * style/titlesec.el: New file. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add new style/titleps.el + + * Makefile.in (STYLESRC): Add new style. + + * style/titleps.el: New file. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add new style/mdframed.el + + * Makefile.in (STYLESRC): Add new style. + + * style/mdframed.el: New file. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Add new tcolorbox library style/tcolorboxlib-raster.el + + * Makefile.in (STYLESRC): Add new style. + + * style/tcolorboxlib-raster.el: New file. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Update style/tcolorbox.el to package v3.96 + + * style/tcolorbox.el: Update style to package v3.96. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Query for optional float position + + * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Query for + optional float position. + +2016-12-29 Arash Esbati <arash.esbati@gmail.com> + + Improve inserting arguments of \captionof macro + + * style/caption.el (LaTeX-arg-caption-captionof): New function + improving query and insert of caption and label acc. to float + type. + ("caption"): Use it. + +2016-12-29 Mosè Giordano <mose@gnu.org> + + Fix documentation of TeX-arg-file + + * doc/auctex.texi (Adding Macros): `TeX-arg-file' does not strip + extension. Reported by Tyler Smith. Fixes bug#24444. + +2016-12-26 Uwe Brauer <oub@mat.ucm.es> + + Make AUCTeX and RefTeX aware of file loading macro \subfile + + * style/subfiles.el ("subfiles"): Make subfile macro be recognized + as a paragraph command. For AUCTeX, add argument of subfile to + `TeX-auto-file'. For RefTeX, append subfile to + `reftex-include-file-commands' and run `reftex-compile-variables' + only once. Code rearrangement. + +2016-12-24 Mosè Giordano <mose@gnu.org> + + Print only first line of the message in error overview + + * tex-buf.el (TeX-error-overview-make-entries): Use `push' in place of + `add-to-list'. Print only the first line of the message. + +2016-12-23 Arash Esbati <arash.esbati@gmail.com> + + Mention improvements to `LaTeX-array-count-columns' in news + + * doc/changes.texi: Mention improvements to + `LaTeX-array-count-columns' in news since 11.89. + +2016-12-23 Arash Esbati <arash.esbati@gmail.com> + + Extend test for new column counting code with style files loaded + + * tests/latex/tabular-count-ampersands-out.tex: + * tests/latex/tabular-count-ampersands-in.tex: Add tests for + tabularx, tabulary, longtable, dcolumn, siunitx constructs. + + * tests/latex/latex-test.el + (LaTeX-count-ampersands-inserted-in-tabular): Set `TeX-parse-self' + to t in order to load style files in the test. Thanks to Mosè + Giordano for enabling this feature. + +2016-12-22 Arash Esbati <arash.esbati@gmail.com> + + Update style/minted.el to package version 2.4.1. + + * style/minted.el (LaTeX-minted-key-val-options): Add new key=vals + from package version 2.4.1. + (LaTeX-minted-key-val-options-local): New variable. + (LaTeX-minted-language-list): Set the variable + `LaTeX-minted-language-list' after the first call of function. + (LaTeX-minted-style-list): New variable. + (LaTeX-minted-style-list): New function analogous to + `LaTeX-minted-language-list' returning styles provided by + pymentize program. + (LaTeX-arg-minted-style): New function to insert styles provided + by pymentize program into buffer. + (LaTeX-minted-update-key-vals): New function to update key=vals in + `LaTeX-minted-key-val-options-local'. + (LaTeX-minted-auto-cleanup): Call `LaTeX-minted-update-key-vals'. + ("minted"): Use `LaTeX-minted-key-val-options-local' for all + key=val queries. Update macros incl. fontification. Run style + hook for `newfloat' when package option is given. + +2016-12-22 Tassilo Horn <tsdh@gnu.org> + + Uniform font-lock updates/don't break prettify (bug#25245) + + * font-latex.el (font-latex-update-font-lock): New function. + (font-latex-add-keywords): Use it. + (font-latex-after-hacking-local-variables): Use it. + * style/alltt.el: Use font-latex-update-font-lock. + * style/beamer.el: Ditto. + * style/comment.el: Ditto. + * style/expl3.el: Ditto. + * style/fancyhdr.el: Ditto. + * style/fancyvrb.el: Ditto. + * style/listings.el: Ditto. + * style/minted.el: Ditto. + * style/url.el: Ditto. + +2016-12-22 Mosè Giordano <mose@gnu.org> + + Fix to TeX-add-local-master + + * tex.el (TeX-add-local-master): Parse local variables again after + calling the mode function, which killed local variables. + +2016-12-21 Mosè Giordano <mose@gnu.org> + + Add style/ directory to TeX-style-path for tests + + * tests/latex/latex-test.el: Add our "style/" directory `TeX-style-path' + to make it possible to load style files inside tests. + +2016-12-20 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-add-local-master): Inherit major mode from master file. + +2016-12-19 Arash Esbati <arash.esbati@gmail.com> + + Mention that arguments to *-operator must be in braces + + * doc/auctex.texi (Tabular-like): Mention that the new code for + counting columns in *{num}{cols} expects num and cols to be + enclosed in braces. + +2016-12-19 Arash Esbati <arash.esbati@gmail.com> + + Add test for new column counting code + + * tests/latex/tabular-count-ampersands-out.tex: + * tests/latex/tabular-count-ampersands-in.tex: New files. + + * tests/latex/latex-test.el + (LaTeX-count-ampersands-inserted-in-tabular): Test new column + counting code in `LaTeX-array-count-columns'. + +2016-12-19 Arash Esbati <arash.esbati@gmail.com> + + Count *-operator in column specification + + * latex.el (LaTeX-array-count-columns): Detect *-operator in + column specification and count the arguments for final calculation + of columns. Thanks to Ikumi Keita for pointing out this + deficiency and code to fix it. + +2016-12-19 Arash Esbati <arash.esbati@gmail.com> + + Add new style/dcolumn.el + + * Makefile.in (STYLESRC): Add new style. + + * style/dcolumn.el: New file. + +2016-12-19 Arash Esbati <arash.esbati@gmail.com> + + Accept non-letter characters as column specifier + + * style/array.el (LaTeX-array-newcolumntype-regexp): Accept + non-letter characters as column specifier. + +2016-12-17 Arash Esbati <arash.esbati@gmail.com> + + Use `LaTeX-item-longtable' while inserting longtable's + + * style/longtable.el (LaTeX-longtable-skipping-regexp): New variable. + (LaTeX-item-longtable): New function. This function is a + variation of `LaTeX-item-array' which uses + `LaTeX-longtable-skipping-regexp' when inserting ampersands. + ("longtable"): Append longtable to `LaTeX-item-list'. + +2016-12-17 Arash Esbati <arash.esbati@gmail.com> + + Add "s" and "S" to `LaTeX-array-column-letters' + + * style/siunitx.el ("siunitx"): Add column specification letters + "s" and "S" to `LaTeX-array-column-letters'. + +2016-12-17 Arash Esbati <arash.esbati@gmail.com> + + Append tabular[xy] to `LaTeX-item-list' + + * style/tabulary.el ("tabulary"): + * style/tabularx.el ("tabularx"): Append tabularx and tabulary to + `LaTeX-item-list'. + +2016-12-06 Arash Esbati <arash.esbati@gmail.com> + + Support RefTeX with `reftex-add-index-macros' in style/splitidx.el + + * style/splitidx.el ("splitidx"): Support RefTeX with + `reftex-add-index-macros' and not by appending macros to + `reftex-index-macros'. + +2016-12-06 Arash Esbati <arash.esbati@gmail.com> + + Support RefTeX with `reftex-add-label-environments' in style/mathtools.el + + * style/mathtools.el (LaTeX-mathtools-auto-cleanup, "mathtools"): + Support RefTeX with `reftex-add-label-environments' and not by + appending environments to `reftex-label-alist'. + ("mathtools"): Add fontification support for referencing macros. + +2016-12-06 Arash Esbati <arash.esbati@gmail.com> + + Support RefTeX with `reftex-add-label-environments' in style/empheq.el + + * style/empheq.el ("empheq"): Support RefTeX with + `reftex-add-label-environments' and not by appending environments + to `reftex-label-alist'. + +2016-12-05 Arash Esbati <arash.esbati@gmail.com> + + Fix query for defined colors in style/textpos.el + + * style/textpos.el ("textpos"): Use `cond' to check which color + defining package is loaded and use the respective function for + `completing-read'. + +2016-12-05 Arash Esbati <arash.esbati@gmail.com> + + Fix query for defined colors in style/ntheorem.el + + * style/ntheorem.el ("ntheorem"): Use `cond' to check which color + defining package is loaded and use the respective function for + `completing-read'. + +2016-11-30 Arash Esbati <arash.esbati@gmail.com> + + Add support for LaTeX core command \textsubscript + + * font-latex.el (font-latex-built-in-keyword-classes): + * latex.el (LaTeX-common-initialization): Add entry for + "textsubscript" which is in LaTeX core since 2015/01/01. + +2016-11-28 Arash Esbati <arash.esbati@gmail.com> + + Do not spell-check arguments of \LTXtable + + * tex-ispell.el (TeX-ispell-skip-cmds-list): Add entry for + \LTXtable. + +2016-11-28 Arash Esbati <arash.esbati@gmail.com> + + Add \LTXtable to list of file-loading commands + + * style/ltxtable.el (LaTeX-ltxtable-file-regexp): New variable. + ("ltxtable"): Make AUCTeX and RefTeX aware of \LTXtable as file + loading command. + Add fontification support. + +2016-11-25 Arash Esbati <arash.esbati@gmail.com> + + Support new floats defined with newfloat package + + * style/caption.el (LaTeX-caption-update-key-val-options): Append + new floating environments defined with "newfloat.sty" as values to + "type*?" keys in `LaTeX-caption-key-val-options-local'. + +2016-11-25 Arash Esbati <arash.esbati@gmail.com> + + Append entry to `LaTeX-label-alist' for new "verbatim" floats + + * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Append an entry + for parsed environments of "verbatim" type to `LaTeX-label-alist'. + +2016-11-24 Arash Esbati <arash.esbati@gmail.com> + + Insert \label inside the mandatory argument of \caption + + * style/longtable.el ("longtable"): Append \label at the end of + caption text inside the mandatory argument. + (LaTeX-longtable-package-options): New variable to suppress the + query for package options. + +2016-11-24 Uwe Brauer <oub@mat.ucm.es> + + Add style file for subfiles package. + + * Makefile.in (STYLESRC): add subfiles.el entry + + * style/subfiles.el ("subfiles"): add new style. + +2016-11-23 Mosè Giordano <mose@gnu.org> + + Min fix to kpfonts package + + * style/kpfonts.el ("kpfonts"): Move setting of `TeX-font-list' inside + the hook. + +2016-11-23 Mosè Giordano <mose@gnu.org> + + Add style file for amsfonts package + + * style/amsfonts.el: New file. + * Makefile.in (STYLESRC): Install it. + * style/amssymb.el ("amssymb"): Run `amsfonts' hook. + +2016-11-21 Arash Esbati <arash.esbati@gmail.com> + + Add new style/bicaption.el + + * Makefile.in (STYLESRC): Add new style. + + * style/bicaption.el: New file. + +2016-11-21 Arash Esbati <arash.esbati@gmail.com> + + Add support for style/bicaption.el to style/caption.el + + * style/caption.el (LaTeX-caption-supported-float-types): Add + supported caption types available with bicaption.el. + ("caption"): Append key=vals from bicaption.el to + `LaTeX-caption-key-val-options-local'. + ("caption"): Query for a second optional argument with + \captionsetup*? if bicaption.el is loaded. Same for + fontification. + +2016-11-21 Arash Esbati <arash.esbati@gmail.com> + + Do not insert a new line if \label is omitted + + * style/subcaption.el (LaTeX-arg-subcaption-subcaption): Insert a + new line only if \label is given. + +2016-11-18 Arash Esbati <arash.esbati@gmail.com> + + Improve caption and label insertion in style/caption.el + + * style/caption.el (LaTeX-caption-key-val-options): Add key slc + which is an abbrev for singlelinecheck. + (LaTeX-arg-caption-captionbox): Delete unused prompt argument. + Ask for short caption acc. to the value of + `LaTeX-short-caption-prompt-length'. Use `LaTeX-label' instead of + `TeX-insert-macro' to insert a label. Use `TeX-argument-insert' + instead of conditional insert. + ("caption"): Do not fontify the last argument of \captionbox. + Fontification happens within \begin...\end{tabular} or + \includegraphics. + +2016-11-18 Arash Esbati <arash.esbati@gmail.com> + + Improve caption and label insertion in style/subcaption.el + + * style/subcaption.el (LaTeX-arg-subcaption-subcaption): Delete + unused prompt argument. Ask for short caption acc. to the value + of `LaTeX-short-caption-prompt-length'. Fill the inserted + sub-caption before using `LaTeX-label' to insert the label. + (LaTeX-arg-subcaption-subcaptionbox): Delete unused prompt + argument. Ask for short caption acc. to the value of + `LaTeX-short-caption-prompt-length'. Use `LaTeX-label' to insert + the label. Use `TeX-argument-insert' instead of conditional + insert. + ("subcaption"): Append package environments to `LaTeX-label-alist'. + ("subcaption"): Do not fontify the last argument of + \subcaptionbox. Fontification happens within + \begin...\end{tabular} or \includegraphics. + +2016-11-16 Arash Esbati <arash.esbati@gmail.com> + + Add new style/FiraSans.el + + * Makefile.in (STYLESRC): Add new style. + + * style/FiraSans.el: New file. + +2016-11-16 Arash Esbati <arash.esbati@gmail.com> + + Add new style/FiraMono.el + + * Makefile.in (STYLESRC): Add new style. + + * style/FiraMono.el: New file. + +2016-11-14 Mosè Giordano <mose@gnu.org> + + Suggest to display warnings when there are no errors in error overview + + * tex-buf.el (TeX-error-overview): When there are no errors, suggest to + display warnings and bad boxes, if present. Fixes bug #24877. + +2016-11-04 Tassilo Horn <tsdh@gnu.org> + + Refresh font-latex fontification if vars are modified + + Refresh font-latex fontification if variables such as + LaTeX-verbatim-*-local are set in a file-local variables block or as + directory-local variables (bug#24868). + + * font-latex.el (font-latex-after-hacking-local-variables): New function. + (font-latex-setup): Add it do hack-local-variables-hook. + * tex.el (TeX--list-of-string-p): New function. + * latex.el (LaTeX-verbatim-environments-local): + (LaTeX-verbatim-macros-with-braces-local): + (LaTeX-verbatim-macros-with-delims-local): Use it for + safe-local-variable property. + +2016-11-02 Arash Esbati <arash.esbati@gmail.com> + + Update style/natbib.el to package version 8.31b + + * style/natbib.el ("natbib"): Add missing macros to catch up with + package version 8.31b. Rearrange code. + (LaTeX-arg-natbib-notes): Remove redundant check if + `TeX-arg-cite-note-p' is non-nil. + +2016-10-17 Tassilo Horn <tsdh@gnu.org> + + Make Copyright headers conforming to convention + +2016-10-17 Arash Esbati <arash.esbati@gmail.com> + + Do not insert unnecessary brackets for citation macros + + * style/natbib.el (LaTeX-arg-natbib-notes): Rename function name + from `natbib-note-args'. + Improve the insertion of arguments in order not to have an empty + pair of brackets when both pre- and post-note are omitted. + ("natbib"): Replace occurrence of `natbib-note-args' with + `LaTeX-arg-natbib-notes'. + +2016-10-17 Arash Esbati <arash.esbati@gmail.com> + + Use `TeX-argument-insert' instead of conditional `insert' + + * style/biblatex.el (LaTeX-arg-biblatex-natbib-notes): Use + `TeX-argument-insert' instead of `insert' for arguments + insertion. + +2016-10-16 Arash Esbati <arash.esbati@gmail.com> + + Add support for natbib macros to style/biblatex + + * style/biblatex.el (LaTeX-arg-biblatex-natbib-notes): New + function. + ("biblatex"): Add completion and fontification support for natbib + compatibility macros. + +2016-10-14 Tassilo Horn <tsdh@gnu.org> + + Manually merge changes that were only on the elpa branch + +2016-10-13 Tassilo Horn <tsdh@gnu.org> + + Fix TeX--if-macro-fboundp edebug spec + + * tex.el (TeX--if-macro-fboundp): Fix broken edebug spec. + +2016-09-27 Mosè Giordano <mose@gnu.org> + + Fix to my previous commit + + * tex-buf.el (TeX-BibTeX-sentinel): Fix misplaced `setq', it was inside + the `cond' form while it should have been outside. + +2016-09-19 Tassilo Horn <tsdh@gnu.org> + + Improve docs added/changed in last commit + + * doc/auctex.texi (Display): Rewrite WYSIWYG paragraph and add + references. + (Fontification of math): Switch order in which multi-level and invisible + are introduced. Fix misplaced @xref. + +2016-09-19 Uwe Brauer <oub@mat.ucm.es> + + Add information about prettify and semi WYSIWYG features. + + * doc/auctex.texi (Display): Add a sentence about + prettify-symbols-unprettify-at-point. + (Fontification of math): add `invisible' to + `font-latex-fontify-script'. + +2016-09-18 Tassilo Horn <tsdh@gnu.org> + + Don't require \end{env} is on a separate line + + * font-latex.el (font-latex-make-user-keywords): + (font-latex-set-syntactic-keywords): Don't require that \end{env} is on + a line of its own. Also allow empty mandatory argument in verbatim + environments. + +2016-09-18 Mosè Giordano <mose@gnu.org> + + Fix default command after running BibTeX with warnings + + * tex-buf.el (TeX-BibTeX-sentinel): Always set `TeX-command-next' to + `TeX-command-default'. As it was before, if BibTeX issued + warnings (or errors) the default next command would have been "View", + which is in no case what the user would expect. This is the same + logic used in Biber sentinel (which has, in addition, a fatal error + after which Biber is run again). + +2016-09-18 Tassilo Horn <tsdh@gnu.org> + + Improve font-locking of verbatim environments + + * font-latex.el (font-latex-set-syntactic-keywords): Handle case where + verbatim content immediately follows \begin{verb-env}. + +2016-09-17 Uwe <oub@mat.ucm.es> + + Improve style/bidi and add make file entry. + + * Makefile.in (STYLESRC): add bidi.el + + * style/bidi.el ("bidi"): New file. + +2016-09-17 Arash Esbati <arash.esbati@gmail.com> + + Improve style/graphicx.el + + * doc/changes.texi: Document the changes about graphicx.el. + + * tex-style.el (LaTeX-includegraphics-options-alist): Remove the + now no-op variable. + + * style/graphics.el ("graphics"): Set + `LaTeX-graphics-package-options' after running hooks for + graphicx.el. + + * style/graphicx.el (LaTeX-graphicx-key-val-options) + (LaTeX-includegraphics-dvips-extensions) + (LaTeX-includegraphics-pdftex-extensions) + (LaTeX-includegraphics-xetex-extensions) + (LaTeX-graphicx-package-options): New variables. + (LaTeX-arg-graphicx-includegraphics-key-val): New function. + (LaTeX-includegraphics-extensions): Return extensions for input + files depending on the used engine. + (LaTeX-arg-includegraphics): Only query for the image file to + include. The query for the optional key-val argument is now done + by `LaTeX-arg-graphicx-includegraphics-key-val'. + ("graphicx"): Extend the query for commands \resizebox[*]. + Commands shared with graphics.el are guarded respectively. + Add missing commands \graphicspath, \DeclareGraphicsExtensions and + \DeclareGraphicsRule. + +2016-09-14 Stefan Monnier <monnier@iro.umontreal.ca> + + Cherry-pick 9c24759a96f41e288841ec2e815d62d58dc01e7a from elpa branch + + * tex-ispell.el (TeX-ispell-sort-skip-cmds-list): Drop symbol-value + + * tex-site.el.in (TeX-modes): Use #'. + +2016-09-04 Mosè Giordano <mose@gnu.org> + + Do not use a function from cl + + * tex-buf.el (TeX-parse-TeX): Do not use the `signum' function, provided + by `cl' library. + +2016-09-02 Mosè Giordano <mose@gnu.org> + + Fix type of ConTeXt-Mark-version option + + * context.el (ConTeXt-Mark-version): Fix the type, it was wrongly set + with a string in place of a symbol. Reported by Tobias Berndt. + +2016-09-01 Arash Esbati <arash.esbati@gmail.com> + + Add new style/menukeys.el + + * Makefile.in (STYLESRC): Add new style. + + * style/menukeys.el: New file. + +2016-09-01 Arash Esbati <arash.esbati@gmail.com> + + Add new style/paracol.el + + * Makefile.in (STYLESRC): Add new style. + + * style/paracol.el: New file. + +2016-09-01 Arash Esbati <arash.esbati@gmail.com> + + Add new style/framed.el + + * Makefile.in (STYLESRC): Add new style. + + * style/framed.el: New file. + +2016-08-31 Arash Esbati <arash.esbati@gmail.com> + + Use `TeX-ispell-skip-setcar' on user defined index macros + + * style/splitidx.el (LaTeX-splitidx-newindex-regex): Replace wrong + `^}' with `^]'. + (LaTeX-splitidx-auto-cleanup, "splitidx"): Use + `TeX-ispell-skip-setcar' on user defined index macros. + +2016-08-31 Arash Esbati <arash.esbati@gmail.com> + + Use `TeX-ispell-skip-setcdr' on user defined listing environments + + * style/listings.el (LaTeX-listings-auto-cleanup): Use + `TeX-ispell-skip-setcdr' on user defined lists. + +2016-08-31 Arash Esbati <arash.esbati@gmail.com> + + Use `TeX-ispell-skip-setcdr' on user defined list environments + + * style/enumitem.el (LaTeX-enumitem-auto-cleanup): Use + `TeX-ispell-skip-setcdr' on user defined lists. + ("enumitem"): Use `TeX-ispell-skip-setcdr' on user defined lists. + Use `TeX-argument-insert' instead of `insert'. + +2016-08-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Revise document for Japanese TeX + + Revise document for Japanese TeX + * doc/auctex.texi (Language Support): Fix old statements. Mention + about (semi-)obsolete variables japanese-(La)TeX-command-default, + japanese-TeX-command-list and recommend to use + japanese-TeX-engine-default instead. + +2016-08-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Add a Japanese error message translation + + * tex-jp.el (TeX-error-description-list): Add a Japanese error + message translation. + +2016-08-25 Ikumi Keita <ikumi@ikumi.que.jp> + + Set the right coding systems for Japanese TeX process + + Set the right coding systems for Japanese TeX process + + * tex-jp.el: + (LaTeX-command-style): Remove kanji option from uplatex and jlatex, + which was there by mistake. + (TeX-japanese-process-input-coding-system, + TeX-japanese-process-output-coding-system, + japanese-TeX-set-process-coding-system): The coding systems for + interacting with Japanese TeX vary with the OS and other + circumstances. So choose the suitable coding system at run time + rather than using the fixed values. + (japanese-TeX-use-kanji-opt-flag): Declare before the first use. + In addition, change default value and tailor doc string as per the + above change. + (japanese-TeX-coding-ejsu): Add coding system compatible for emacs + 21 and xemacs. + +2016-08-24 Mosè Giordano <mose@gnu.org> + + Make TeX-previous-error go backward + + * tex-buf.el (TeX-parse-TeX): Decrease `TeX-error-last-visited' when + `arg' is negative. This fixes the behavior of `TeX-previous-error'. + +2016-08-23 Arash Esbati <arash.esbati@gmail.com> + + Update style/mathtools.el to v1.18 of mathtools.sty + + * style/mathtools.el (LaTeX-mathtools-package-options): Add + "nonrobust" option. + (LaTeX-mathtools-key-val-options): Add missing key=vals. Insert a + period in doc string. + (LaTeX-mathtools-arg-mathstyle-completion) + (LaTeX-mathtools-arg-mathsize-completion) + (LaTeX-mathtools-arg-declarepaireddelimiter) + (LaTeX-mathtools-env-cases) + (LaTeX-mathtools-item-cases): New functions. + (LaTeX-mathtools-env-multlined): Add an empty pair of square + brackets if only the second optional argument is given. + ("mathtools"): Update commands and environments in style hook. + (LaTeX-mathtools-env-matrix-starred) + (LaTeX-mathtools-env-spreadlines): Delete functions. Use + ["string"] when adding environments in `LaTeX-add-environments'. + +2016-08-21 Mosè Giordano <mose@gnu.org> + + Fold environments with * in name + + * tex-fold.el (TeX-fold-item): Add asterisk to the regexp matching LaTeX + environment names. Fixes bug#24263. + +2016-08-21 Mosè Giordano <mose@gnu.org> + + Remove obsolete TeX-function-p function + + * tex.el (TeX-function-p): Remove this function. It was introduced here + in AUCTeX in 1994, but is present in Emacs since 1997 as well, under + the name `functionp'. Fixes bug#24245. + * tex-buf.el (TeX-command-expand): Replace `TeX-function-p' with + `functionp'. + +2016-08-14 Arash Esbati <arash.esbati@gmail.com> + + Add new style/empheq.el + + * Makefile.in (STYLESRC): Add new style. + + * style/empheq.el: New file. + +2016-08-10 Arash Esbati <arash.esbati@gmail.com> + + Add new style/commath.el + + * Makefile.in (STYLESRC): Add new style. + + * style/commath.el: New file. + +2016-08-02 Arash Esbati <arash.esbati@gmail.com> + + Add new style/pdflscape.el + + * Makefile.in (STYLESRC): Add new style. + + * style/pdflscape.el: New file. + +2016-07-22 Arash Esbati <arash.esbati@gmail.com> + + Document interaction with Ispell + + * doc/auctex.texi (Selecting a Command): Document interaction with Ispell. + +2016-07-18 Arash Esbati <arash.esbati@gmail.com> + + Add new spell checking dictionary tex-ispell.el + + * doc/todo.texi (Wishlist): Remove spell checking of macros from + wish list. + + * doc/changes.texi: Mention new file tex-ispell.el in news since + 11.89. + Fix typo. + + * Makefile.in (AUCSRC): Add tex-ispell.el. + + * latex.el (tex-ispell): Require tex-ispell.el. + + * tex.el (TeX-ispell-extend-skip-list): New customizable variable. + (TeX-ispell-skip-setcar, TeX-ispell-skip-setcdr): New functions. + (TeX-ispell-tex-arg-end): New function. + + * tex-ispell.el: Add new file. + +2016-07-08 Arash Esbati <arash.esbati@gmail.com> + + Reset `LaTeX-auto-xcolor-definecolorset' before parsing + + * style/xcolor.el (LaTeX-xcolor-auto-prepare): Reset + `LaTeX-auto-xcolor-definecolorset' before parsing. + Improve comments. + +2016-07-08 Arash Esbati <arash.esbati@gmail.com> + + Fix doc string for curve quoting style in Emacs 25 + + * style/theorem.el (LaTeX-theorem-env-label): + * style/ntheorem.el (LaTeX-ntheorem-env-label): + * style/amsthm.el (LaTeX-amsthm-env-label): Fix doc string for new + text quoting style in Emacs 25. + +2016-06-29 Arash Esbati <arash.esbati@gmail.com> + + Catch up with deletion of \commondummies in texinfo.tex + + * doc/macros.texi: Catch up with deletion of \commondummies in + texinfo.tex which is replaced with \definedummies. Check which + command is defined and add AUCTeX definitions respectively. + +2016-06-28 Masayuki Ataka <masayuki.ataka@gmail.com> (tiny change) + + Fix to doc/auctex.texi + + * doc/auctex.texi (Prettifying): Insert missing '{}'. + +2016-06-27 Mosè Giordano <mose@gnu.org> + + Change test for PDF Tools availability + + * tex.el (TeX-pdf-tools-sync-view): Change test for PDF Tools + availability, in order to make it possible to postpone loading of the + package, for example when using "use-package". Fixes bug#23803. + +2016-06-11 Tassilo Horn <tsdh@gnu.org> + + More about TeX-raise-frame-function + + * doc/auctex.texi (I/O Correlation): Improve TeX-raise-frame-function + docs. + * doc/changes.texi: Mention TeX-raise-frame-function. + * tex.el (TeX-raise-frame-function): Use raise-frame as default value. + +2016-06-11 Tassilo Horn <tsdh@gnu.org> + + Document TeX-raise-frame-function + + * doc/auctex.texi (I/O Correlation): Document TeX-raise-frame-function. + +2016-06-10 Tassilo Horn <tsdh@gnu.org> + + New defcustom TeX-raise-frame-function + + * tex.el (TeX-raise-frame-function): New defcustom. + (TeX-source-correlate-sync-source): Use it. + +2016-06-04 Uwe Brauer <oub@mat.ucm.es> + + Document how to disable filling for specific environments + + * latex.el (LaTeX-indent-environment-list): Mention in docstring that + environments listed here are not filled. + (LaTeX-fill-region-as-paragraph): Add information to the docstring + concerning excluding enviroments from that function by using + `LaTeX-indent-environment-list'. Suggested by Uwe Brauer. + +2016-05-31 Mosè Giordano <mose@gnu.org> + + Fix compatibility with GNU Emacs < 24 + + * tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame' only + when it is available. + +2016-05-29 Tassilo Horn <tsdh@gnu.org> + + Grab focus on Evince inverse search + + * tex.el (TeX-source-correlate-sync-source): Call `x-focus-frame'. + +2016-05-29 Tassilo Horn <tsdh@gnu.org> + + Don't use non-existing custom-buffer-done-function + + * tex-wizard.el (TeX-wizard): Use `kill-buffer-hook' and + `custom-buffer-done-kill' instead of `custom-buffer-done-function' which + has been removed from Emacs a long time ago. + +2016-05-27 Tassilo Horn <tsdh@gnu.org> + + Docs for prettification with Emacs 25+ + + * doc/auctex.texi (Prettifying): Document prettification. + +2016-05-27 Stefan Monnier <monnier@IRO.UMontreal.CA> + + Fix byte-compiler warnings. + + * context.el: Fix some byte-compiler warnings. + * tex-buf.el: Ditto. + * tex-jp.el: Ditto. + * tex-mik.el: Ditto. + * toolbar-x.el: Ditto. + +2016-05-24 Tassilo Horn <tsdh@gnu.org> + + Fix copyright header of tex-jp.el + + * tex-jp.el: Fix Copyright and Author headers. + +2016-05-22 Tassilo Horn <tsdh@gnu.org> + + Convert ChangeLog.1 to UTF-8 + + * ChangeLog.1: Convert to UTF-8 and adjust encoding cookie. + +2016-05-22 Tassilo Horn <tsdh@gnu.org> + + Make ChangeLog UTF-8 + + * ChangeLog-preview.1: Convert to UTF-8. + * build-aux/gitlog-to-auctexlog: Remove iconv call for converting + ChangeLog to ISO-8859-1. + +2016-05-21 Mosè Giordano <mose@gnu.org> + + Append environment indentation rules to LaTeX-indent-environment-list + + * style/alltt.el ("alltt"): Append indentation rule to + `LaTeX-indent-environment-list' in order not to override custom + settings. Reported by François Patte. + * style/beamer.el ("beamer"): Ditto. + * style/doc.el ("doc"): Ditto. + * style/fancyvrb.el ("fancyvrb"): Ditto. + * style/filecontents.el ("filecontents"): Ditto. + * style/hyperref.el ("hyperref"): Ditto. + * style/listings.el (LaTeX-listings-auto-cleanup, "listings"): Ditto. + * style/longtable.el ("longtable"): Ditto. + * style/minted.el (LaTeX-minted-auto-cleanup, "minted"): Ditto. + * style/tabularx.el ("tabularx"): Ditto. + * style/tabulary.el ("tabulary"): Ditto. + +2016-05-18 Arash Esbati <esbati@gmx.de> + + Respect both "xcolor" and "color" for command queries + + * style/textpos.el ("textpos"): Remove "color" from + `TeX-run-style-hooks'. + ("textpos"): Respect both "xcolor" and "color" for query to + "textblockcolour" and "textblockrulecolour" commands. + +2016-05-18 Arash Esbati <esbati@gmx.de> + + Respect both "xcolor" and "color" for query to "shadecolor" + + * style/ntheorem.el ("ntheorem"): Respect both "xcolor" and + "color" for query to "shadecolor" command. + +2016-05-18 Arash Esbati <esbati@gmx.de> + + Adjust query commands for loading by xcolor.el + + * style/colortbl.el ("colortbl"): Run style hook for "color" only + if "xcolor" is not an active style. + ("colortbl"): Check if "xcolor" is an active style and run + (TeX-arg-xcolor) or (TeX-arg-color) respectively to query for the + arguments. + +2016-05-18 Arash Esbati <esbati@gmx.de> + + Run `TeX-add-symbols' if "xcolor" is not an active style + + * style/color.el ("color"): Check if "xcolor" is an active style + and then run `TeX-add-symbols' on commands defined by "color.sty" + and add fontification support. + +2016-05-18 Arash Esbati <esbati@gmx.de> + + Add new style/xcolor.el + + * Makefile.in (STYLESRC): Add new style xcolor.el. + + * style/xcolor.el: Add new file. + +2016-05-15 Tassilo Horn <tsdh@gnu.org> + + Make TeX-view work better with regions + + * tex-buf.el (TeX-region-update-point): New function which sets point in + the region buffer so that it matches the location of point in the + current buffer. + (TeX-view): Use it. + +2016-05-14 Arash Esbati <esbati@gmx.de> + + Improve the insertation of "macro" environment + + * style/doc.el (LaTeX-env-no-comment): Check if argument + `environment' is "macro" and query/insert a name prefixed with + `TeX-esc'. + (LaTeX-doc-after-insert-macrocode): Add "macro" environment. + ("doc"): Run `LaTeX-env-no-comment' when "macro" environment is + inserted. + +2016-05-14 Mosè Giordano <mose@gnu.org> + + Use commit date for package date also in configure + + * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): Use commit date rather + than author date. + +2016-05-14 Ikumi Keita <ikumi@ikumi.que.jp> + + Tweak mode name only when file local variable is enabled. + + * tex-jp.el (japanese-plain-tex-mode-initialization) + (japanese-latex-mode-initialization): Tweak mode name only + when `enable-local-variables' is non-nil. + +2016-05-12 Ikumi Keita <ikumi@ikumi.que.jp> + + Adapt for upLaTeX + + * tex-buf.el (TeX-LaTeX-sentinel): Accept banner line of upLaTeX. + * tex-jp.el (japanese-LaTeX-style-list): Add class file for upLaTeX. + * tex.el (TeX-format-list): Make upLaTeX class file names lead to + `japanese-latex-mode'. + +2016-05-09 Mosè Giordano <mose@gnu.org> + + Do not check TeX engine with ifluatex package + + * style/ifluatex.el ("ifluatex"): Set `TeX-check-engine-list' to nil so + that the engine is not checked when this package is loaded. + +2016-05-09 Mosè Giordano <mose@gnu.org> + + Check TeX engine only once + + * tex-buf.el (TeX-check-engine): If user does not want to change engine, + do not ask again. Suggested by Joost Kremers. + +2016-05-09 Mosè Giordano <mose@gnu.org> + + Use commit date to determine package date + + * autogen.sh (AUCTEXDATE): Use commit date, rather than author date, to + determine package date. + +2016-05-09 Arash Esbati <esbati@gmx.de> + + Insert braces after some macros and \relax after \ProcessOptions + + * style/ltx-base.el ("ltx-base"): Insert a pair of braces after + "DeclareOption*", "AtEndOfPackage", "AtEndOfClass", + "AtBeginDocument" and "AtEndDocument". + Insert a "\relax" after "ProcessOptions". + +2016-05-09 Arash Esbati <esbati@gmx.de> + + Improve style/doc.el + + * style/doc.el ("doc"): Do not indent the content inside the "macro" + environment. + Insert a pair of braces after "DoNotIndex", "StopEventually", + "MacroFont", "AltMacroFont". + Prefix the string read with TeX-esc when inserting + "DescribeMacro", "cmd". + Ask for an argument ("parg", "oarg", "marg", "meta"). + Add missing macro "cs". + Delete dups ("MacroFont", "AltMacroFont", "theCodelineNo"). + Ask for .fdd and .dtx files to input or include ("DocInput", + "DocInclude"). + Add lengths "MacrocodeTopsep", "MacroTopsep", "MacroIndent". + +2016-05-06 Mosè Giordano <mose@gnu.org> + + Allow for negative offsets in region backward search + + * tex.el (TeX-source-correlate-handle-TeX-region): Use the same regexp + used in `preview-parse-messages', that is also XEmacs compatible and + allows for negative offsets. This makes backward search work also + when using `TeX-command-buffer' and `LaTeX-command-section'. Reported + by Qiang Yin. + +2016-04-28 Ikumi Keita <ikumi@ikumi.que.jp> + + Enable directory local variables in japanese-{latex, plain-tex}-mode + + * tex-jp.el (japanese-latex-mode-initialization): Set + `major-mode' to `japanese-latex-mode' and reset it to + `latex-mode' after `hack-local-variables' is done. + (japanese-plain-tex-mode-initialization): Similar changes + for `japanese-plain-tex-mode'. + (japanese-TeX-reset-mode-name): New function. + (top-level) Make `latex-mode' is regarded as parent of + `japanese-latex-mode' in directory local variables. Similar + addition for `japanese-plain-tex-mode', too. + +2016-04-23 Ikumi Keita <ikumi@ikumi.que.jp> + + Make unloading of tex-site work on Emacs 24 + + * tex-site.el.in (tex-site-unload-hook): Run `TeX-modes-set' when + `advice-add' is defined. + +2016-04-20 Mosè Giordano <mose@gnu.org> + + Fix TeX-error-overview-make-entries + + * tex-buf.el (TeX-error-overview-make-entries): Add `active-buffer' + optional argument. If `TeX-error-overview-open-after-TeX-run' is + non-nil and there is an error, TeX sentinels run this function but + `TeX-error-overview-active-buffer' hadn’t been initialized yet. Fixes + bug#23318. + +2016-04-19 Mosè Giordano <mose@gnu.org> + + Call TeX-newline-function interactively + + * tex.el (TeX-newline): Replace `funcall' with `call-interactively'. + This makes `electric-indent-mode' work out-of-the-box. Suggested by + alex (http://comments.gmane.org/gmane.emacs.auctex.devel/4631). + +2016-04-19 Ikumi Keita <ikumi@ikumi.que.jp> + + Temporarily bind `TeX-insert-macro-default-style' to 'show-optional-args' + + * latex.el (LaTeX-item-argument): Temporarily bind + `TeX-insert-macro-default-style' to 'show-optional-args'. + This is necessary in description environment if the user customize the + option to `mandatory-args-only'. + +2016-04-17 Mosè Giordano <mose@gnu.org> + + Reword documentation of TeX-PDF-from-DVI + + * doc/auctex.texi (Processor Options): Make information about Japanese + documents more accurate. Suggested by Ikumi Keita. + +2016-04-16 Mosè Giordano <mose@gnu.org> + + Replace TeX-PDF-via-dvips-ps2pdf with TeX-PDF-from-DVI + + * tex.el (TeX-command-list): Add Dvipdfmx. + (TeX-expand-list-builtin): Use `TeX-PDF-from-DVI' in place of + `TeX-PDF-via-dvips-ps2pdf'. + (TeX-PDF-from-DVI): New safe buffer-local and customizable variable. + (TeX-PDF-via-dvips-ps2pdf): Mark as obsolete. + (TeX-toggle-PDF-via-dvips-ps2pdf): Remove function. + (TeX-PDF-from-DVI): New function. + (TeX-mode-specific-command-menu-entries): Update menu to convert DVI to + PDF. + * tex-buf.el (TeX-command-default, TeX-run-set-command, + TeX-TeX-sentinel, TeX-TeX-sentinel-check, TeX-LaTeX-sentinel, + TeX-dvips-sentinel, TeX-ps2pdf-sentinel): Use `TeX-PDF-from-DVI' in + place of `TeX-PDF-via-dvips-ps2pdf'. + (TeX-run-dvipdfmx, TeX-dvipdfmx-sentinel): New function. + (): + * doc/auctex.texi (Processor Options): Document `TeX-PDF-from-DVI' and + remove mentions to `TeX-PDF-via-dvips-ps2pdf' + * doc/changes.texi: Mention `TeX-PDF-from-DVI'. + +2016-04-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Use customize option `TeX-region' instead of "_region_" + + * tex-buf.el (TeX-output-revert-buffer): Use customize option + `TeX-region' instead of string literal "_region_". + +2016-04-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `deactivate-input-method' if defined + + * tex.el (TeX-math-input-method-off): Use `deactivate-input-method' + instead of obsolete function `inactivate-input-method' when possible. + +2016-04-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Use `match-string-no-properties' + + * texmathp.el (texmathp, texmathp-match-environment): For better + consistency with other parts of the file, change `match-string' to + `no-properties' variant. + +2016-04-16 Ikumi Keita <ikumi@ikumi.que.jp> + + Fix small errors in doc string and comment + + * tex.el (TeX-auto-add-type): Change the word `function' to `macro' + and add an `s' to the verb `create'. + + * tex-buf.el (TeX-run-format): Correct a typo `debuger' to `debugger'. + +2016-04-14 Mosè Giordano <mose@gnu.org> + + Fix in TeX sentinels + + * tex-buf.el (TeX-TeX-sentinel, TeX-LaTeX-sentinel): Use + `TeX-error-overview-make-entries' to test presence of errors or + warnings. This is the same test carried in `TeX-master-directory' and + prevents from getting an error when + `TeX-error-overview-open-after-TeX-run' is non-nil but + `TeX-debug-warnings' and/or `TeX-debug-bad-boxes' are nil. + +2016-04-13 Matthew Leach <matthew@mattleach.net> + + Auto save `TeX-command-extra-options'. + + * tex.el (TeX-auto-store): Save the value of `TeX-command-extra-options' + so it is set project-wide. + +2016-04-13 Matthew Leach <matthew@mattleach.net> + + TikZ: Don't allow relative points with \coordinate. + + * style/tikz.el (TeX-TikZ-point-function-map): Revert back to simple + point alist. + (TeX-TikZ-relative-point-function-map): New. + (TeX-TikZ-draw-arg-function-map): Use + `TeX-TikZ-relative-point-function-map'. + +2016-04-13 Matthew Leach <matthew@mattleach.net> + + TikZ: Add the grid command. + + * style/tikz.el (TeX-TikZ-arg-grid): New. + (TeX-TikZ-draw-arg-function-map): Map the 'Grid' command to + `TeX-TikZ-arg-grid'. + +2016-04-13 Matthew Leach <matthew@mattleach.net> + + Fix a documentation type. + + * doc/auctex.texi (Automatic Local): Fix a documentation typo. + +2016-04-13 Mosè Giordano <mose@gnu.org> + + Prevent infinite loop in TeX-command-expand + + * tex.el (TeX-view-command-raw): This function should always return a + string. Throw an error if fails to do so. This prevents an infinite + loop in `TeX-command-expand' in the case in which `command' is nil + because of a malformed viewer specification. + * tests/tex/command-expansion.el (TeX-view-command-raw-errors): Add + tests to trigger errors in `TeX-view-command-raw'. + +2016-04-10 Ikumi Keita <ikumi@ikumi.que.jp> + + Integrate viewer support between tex.el and tex-jp.el + + * tex.el (TeX-view-program-list-builtin): Integrate viewer support + between tex.el and tex-jp.el. + * tex-jp.el : Ditto. + +2016-04-09 Mosè Giordano <mose@gnu.org> + + Do not use add-to-list for let-bound variable + + * style/tikz.el (TeX-TikZ-find-named-points): Replace add-to-list with + `push'. + +2016-04-09 Mosè Giordano <mose@gnu.org> + + Compatibility for XEmacs + + * style/tikz.el (TeX-TikZ-single-macro-arg): Pass `function-alist' to + `TeX-TikZ-get-arg-type` because XEmacs requires an alist as argument + to `completing-read'. + +2016-04-08 Matthew Leach <matthew@mattleach.net> + + TikZ: Remove unneeded function. + + * style/tikz.el (TeX-TikZ-arg-rect-point): Delete. + +2016-04-08 Matthew Leach <matthew@mattleach.net> + + TikZ: Add the 'sin' and 'cos' connectors. + + * style/tikz.el (TeX-TikZ-path-connector-function-map): Add 'sin' and + 'cos' mapping to `identity'. + +2016-04-08 Matthew Leach <matthew@mattleach.net> + + TikZ: Make '+' and '++' prefixes apply to TikZ points + + * style/tikz.el (TeX-TikZ-get-prefix-string): New. + (TeX-TikZ-arg-rect-point): Add optional argument `prefix'. + (TeX-TikZ-arg-polar-point): Likewise. + (TeX-TikZ-arg-named-point): Likewise. + (TeX-TikZ-single-macro-arg): Allow a variable number of arguments to + the argument name function map. + (TeX-TikZ-point-function-map): Prefix all point types with '+' and + '++'. + (TeX-TikZ-path-connector-function-map): Remove the '+' and '++' + suffixes. + +2016-04-04 Matthew Leach <matthew@mattleach.net> + + TikZ: Add parabola command. + + * style/tikz.el (TeX-TikZ-arg-bend): New. + (TeX-TikZ-arg-parabola): New. + (TeX-TikZ-draw-arg-function-map): Add mapping from "Parabola" to + `TeX-TikZ-arg-parabola'. + +2016-04-04 Matthew Leach <matthew@mattleach.net> + + TikZ: Add optional parameter to `TeX-TikZ-single-macro-arg'. + + * style/tikz.el (TeX-TikZ-single-macro-arg): New argument OPTIONAL. + (TeX-TikZ-macro-arg): Use OPTIONAL argument when calling + `TeX-TikZ-single-macro-arg'. + +2016-04-04 Matthew Leach <matthew@mattleach.net> + + TikZ: make `TeX-TikZ-single-macro-arg' prompt required. + + * style/tikz.el (TeX-TikZ-get-arg-type): Make prompt non-optional. + (TeX-TikZ-single-macro-arg): Likewise. + (TeX-TikZ-macro-arg): Make prompt explicit. + +2016-04-04 Matthew Leach <matthew@mattleach.net> + + TikZ: Add the arc command. + + * style/tikz.el (TeX-TikZ-arg-arc): New. + (TeX-TikZ-draw-arg-function-map): Map the 'Arc' command to + `Tex-TikZ-arg-arc'. + +2016-04-04 Matthew Leach <matthew@mattleach.net> + + TikZ: Add circle command. + + * style/tikz.el (TeX-TikZ-arg-circle): New. + (TeX-TikZ-draw-arg-function-map): Add mapping from 'Circle' to + `TeX-TikZ-arg-circle'. + +2016-04-04 Stefan Monnier <monnier@iro.umontreal.ca> + + * tex-buf.el: Address some compiler warnings + + Require `latex' since we refer to some of its variables. + Use #' to quote a function. Use _ prefix for unused vars. + (TeX-current-process-region-p, TeX-save-query, TeX-parse-function) + (TeX-sentinel-function, TeX-sentinel-default-function) + (compilation-in-progress, TeX-current-page) + (TeX-error-overview-open-after-TeX-run, TeX-error-list) + (TeX-parse-all-errors, TeX-command-buffer, TeX-region): Declare before + the first use. + (TeX-command-text, TeX-command-pos): Declare as dyn-bound + (TeX-command-expand): Strength reduce `eval' to `symbol-name'. + (TeX-run-TeX): Use let*. + (TeX-sentinel-function, TeX-sentinel-default-function): Put something + in the function's body. + (TeX-TeX-sentinel-check): Check ConTeXt-Mark-version exists before + using it. We could have (require 'context) instead. + (TeX-Biber-sentinel): Remove redundant `concat'. + (TeX-error-description-list): Move before first use. + (TeX-error-overview-mode-map): Remove unused var `menu-map'. + (TeX-output-revert-buffer): Remove unused var `command'. + +2016-04-02 Mosè Giordano <mose@gnu.org> + + Fix compatibility with older Emacs versions + + * tex.el: Dynamic determination of `delete-selection' behavior has been + introduced in Emacs 24.3. For previous versions leave + `TeX-insert-dollar' without that property. + +2016-04-01 Mosè Giordano <mose@gnu.org> + + Dinamically put delete-selection prop to TeX-insert-dollar + + * tex.el (TeX-insert-dollar): Put `delete-selection' property only when + `TeX-electric-math' is nil. Suggested by Roger Lipsett. Fixes + bug#23177. + +2016-03-30 Mosè Giordano <mose@gnu.org> + + Restore compatibility with XEmacs + + * tex-buf.el (TeX-format-filter): Use `memq' in place of `memql'. This + one is not available in XEmacs. + +2016-03-29 Mosè Giordano <mose@gnu.org> + + Fix previous commit + +2016-03-29 Mosè Giordano <mose@gnu.org> + + New function TeX-error-report-has-errors-p + + * tex-buf.el (TeX-error-report-has-errors-p): New function. + (TeX-error-report-switches): Update docstring. + (TeX-LaTeX-sentinel, TeX-command-sequence-sentinel): Use + `TeX-error-report-has-errors-p'. + * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-LaTeX-button-alist): + Ditto. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Add more path connector types. + + * style/tikz.el (TeX-TikZ-path-connector-function-map): New. + (TeX-TikZ-draw-arg-function-map): Use + `TeX-TikZ-path-connector-function-map'. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Rename 'text' to 'label' to be consistent with TikZ terminology. + + * style/tikz.el (TeX-TikZ-arg-label): Rename from `TeX-TikZ-arg-text' + and prompt for a 'Label' rather than 'Text'. + (TeX-TikZ-arg-node): Use new function name. + (TeX-TikZ-node-arg): Likewise. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Ignore case when prompting for argument types. + + * style/tikz.el (TeX-TikZ-get-arg-type): Let-bind + `completion-ignore-case' to t when prompting the user. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Apply suggestions from checkdoc. + + * style/tikz.el (TeX-TikZ-point-function-map): Make documentation + consistent with checkdoc. + (TeX-TikZ-draw-arg-function-map): Likewise. + (TeX-TikZ-draw-arg): Likewise and rename parameter to '_ignored'. + (TeX-TikZ-coordinate-arg): Likewise. + (TeX-TikZ-node-arg): Likewise. + +2016-03-29 Mosè Giordano <mose@gnu.org> + + Fill environment content onley when auto-fill-mode is active + + * latex.el (LaTeX-insert-environment): Fill only when + `auto-fill-function' is non-nil, that means auto-fill-mode is active. + Reported by Florian Lindner. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Add 'Named Point' point type with completion. + + * style/tikz.el (TeX-TikZ-point-name-regexp): New. + (TeX-TikZ-find-named-points): New. + (TeX-TikZ-arg-named-point): New. + (TeX-TikZ-point-function-map): Add 'Named Point' element that maps to + `TeX-TikZ-arg-named-point'. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Add prompting for TikZ's \node macro. + + * style/tikz.el (TeX-TikZ-node-arg): New. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Add prompting for \coordinate macro. + + * style/tikz.el (TeX-TikZ-point-function-map): New. + (TeX-TikZ-draw-arg-function-map): Use `TeX-TikZ-point-function-map'. + (TeX-TikZ-coordinate-arg): New. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: Extract the prompting of the next arg from TeX-TikZ-macro-arg. + + * style/tikz.el (TeX-TikZ-single-macro-arg): New. + (TeX-TikZ-macro-arg): Use `TeX-TikZ-single-macro-arg' for prompting + the user and calling the appropriate function. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: allow arg type prompt to be specified. + + * style/tikz.el (TeX-TikZ-get-arg-type): Add a new optional argument, + prompt, and show that to the user when non-nil, instead of the + default. + +2016-03-29 Matthew Leach <matthew@mattleach.net> + + TikZ: split out the prompts to TeX-TikZ-arg-node & TeX-TikZ-macro-arg. + + * style/tikz.el (TeX-TikZ-arg-options): New. + (TeX-TikZ-arg-name): New. + (TeX-TikZ-arg-text): New. + (TeX-TikZ-arg-node): Use new TikZ arg functions for prompting the + user. + (TeX-TikZ-macro-arg): Use `TeX-TikZ-arg-options' when prompting for + the options. + +2016-03-29 Arash Esbati <esbati@gmx.de> + + Add fontification support + + * style/environ.el ("environ"): Add fontification support. + +2016-03-29 Arash Esbati <esbati@gmx.de> + + Fix a misplaced closing parenthesis + + * style/splitidx.el (LaTeX-splitidx-auto-cleanup): Fix a misplaced + closing parenthesis. + +2016-03-29 Arash Esbati <esbati@gmx.de> + + Fix the name of argument in function body + + * style/currvita.el (LaTeX-currvita-env-with-label): Fix the name + of argument in the body of function. + +2016-03-29 Arash Esbati <esbati@gmx.de> + + Delete redundant code + + * style/enumitem.el (LaTeX-arg-SetLabelAlign) + (LaTeX-arg-SetEnumitemKey, LaTeX-arg-SetEnumitemValue): Delete + redundant code which is part of the function + `LaTeX-enumitem-update-key-val-options'. + (LaTeX-enumitem-env-with-opts): Fix the name of argument in the + body of function. + +2016-03-28 Mosè Giordano <mose@gnu.org> + + Better control for presence of errors + + * tex-buf.el (TeX-LaTeX-sentinel): Use `TeX-error-report-switches' + instead of `TeX-error-list'. + +2016-03-27 Tassilo Horn <tsdh@gnu.org> + + Call TeX-after-compilation-finished-functions on warnings + + * tex-buf.el (TeX-LaTeX-sentinel): Skip calling + TeX-after-compilation-finished-functions only if there are real errors. + +2016-03-27 Matthew Leach <matthew@mattleach.net> + + Add the beginnings of TikZ support. + + * style/tikz.el: New + * doc/changes.texi: Document TikZ style. + * Makefile.in: Add TikZ style to the build. + +2016-03-26 Tassilo Horn <tsdh@gnu.org> + + Fix forward sync bug with multi-file documents + + * tex.el (TeX-pdf-tools-sync-view): Use the current file for the + sync-view call, not always the master file (bug#23083). + +2016-03-19 Mosè Giordano <mose@gnu.org> + + Temporarily bind gc-cons-threshold in time-consuming task + + * tex.el (TeX-search-files-by-type): Bind `gc-cons-threshold' to + 10000000 during the search, to reduce number of garbage collections + during the task. + +2016-03-17 Matthew Leach <matthew@mattleach.net> + + Prompt for optional short caption parameter. + + * latex.el (LaTeX-compose-caption-macro): New. + (LaTeX-short-caption-prompt-length): New. + (LaTeX-env-figure): Prompt for optional short caption parameter, when + the caption length is >= `LaTeX-short-caption-prompt-length', and pass + to `LaTeX-compose-caption-macro'. + * style/longtable.el ("longtable"): Likewise. + * style/psfig.el (LaTeX-env-psfigure): Likewise. + * doc/auctex.texi (Floats): Document short-caption prompting and + `LaTeX-short-caption-prompt-length'. + * doc/changes.texi: Likewise. + +2016-03-16 Matthew Leach <matthew@mattleach.net> + + Improve prompts when defining LaTeX macros. + + * latex.el (TeX-arg-default-argument-value): New. + (TeX-arg-define-macro-arguments): New. + (LaTeX-common-initialization): Use new LaTeX macro argument functions. + +2016-03-12 Matthew Leach <matthew@mattleach.net> + + Ensure LaTeX-indent-environment-list environments aren't filled + + * tests/latex/latex-filling-in.tex: Add a tabular environment to ensure + the body of the environment isn't filled as it is listed in + LaTeX-indent-environment-list. + * tests/latex/latex-filling-out.tex: Likewise. + +2016-03-08 Matthew Leach <matthew@mattleach.net> + + Remove "table" and "table*" from LaTeX-indent-environment-list + + * latex.el (LaTeX-indent-environment-list): Remove the "table" and + "table*" elements. + +2016-03-04 Mosè Giordano <mose@gnu.org> + + Use TeX-quote-after-quote in all language style files + + * style/icelandic.el ("icelandic"): + * style/polish.el ("polish"): + * style/polski.el ("polski"): Use value of `TeX-quote-after-quote' + instead of hard-coding t. + +2016-02-28 Mosè Giordano <mose@gnu.org> + + Improve word-string regexp in TeX-warning + + * tex-buf.el (TeX-warning): Match letters, numbers, colons, and hyphens, + not just word constituents. They may be preceeded by both grave + accent and apostrophe, not only grave accent. + * tests/tex/compilation-log.txt: Add test case. + * tests/tex/error-parsing.el: Update result. + +2016-02-27 Mosè Giordano <mose@gnu.org> + + Another fix for vertical bad box warnings + + * tex-buf.el (TeX-parse-error): Use different regexps for horizontal and + vertical bad boxes, they cannot be handled together. + (TeX-warning): Do not move point when a vertical bad box has been found. + * tests/tex/compilation-log.txt: Add a test where the parser used to + fail to find the file for warnings after a vertical bad box warning. + * tests/tex/error-parsing.el: Update result accordingly. + +2016-02-26 Mosè Giordano <mose@gnu.org> + + Fix parsing of vertical bad boxes context + + * tex-buf.el (TeX-warning): Use as context for vertical bad boxes the + warning itself and don't move point. + * tests/tex/compilation-log.txt: Add a test for vertical bad boxes, and + horizontal bad boxes ending with "at line NN". The two warnings are in + two consecutive lines, make sure the second one is correctly reported. + * tests/tex/error-parsing.el: Update result of the test accordingly. + +2016-02-26 Mosè Giordano <mose@gnu.org> + + Catch more bad box warnings + + * tex-buf.el (TeX-error-list): More information for some elements of the + list. + (TeX-parse-error): Change regexp to catch bad vertical boxes as well and + provide new argument to `TeX-warning'. + (TeX-warning): Require an additional mandatory argument, `bad-box'. + Improve regexp for detecting ending line of horizontal bad boxes in + order to cater for the case "...at line NN". + * tests/tex/error-parsing.el: Update result of the test. + +2016-02-23 Mosè Giordano <mose@gnu.org> + + Avoid checking duplicate directories in TeX-check-files + + * tex-buf.el (TeX-check-files): Delete duplicate directories in paths + list before performing the check. + +2016-02-21 Mosè Giordano <mose@gnu.org> + + Fix detection of line number in TeX-warning + + * tex-buf.el (TeX-warning): Require as additional mandatory argument the + position where the warning starts. Use it to limit + `re-search-backward' when looking for the line number. + (TeX-parse-error): Provide additional argument to `TeX-warning'. + * tests/tex/compilation-log.txt: Add another case where the line number + of the warning was mistaken. + * tests/tex/error-parsing.el: Update expected result of the test + accordingly. + +2016-02-21 Mosè Giordano <mose@gnu.org> + + Improve LaTeX-warnings-regexp + + * tex-buf.el (LaTeX-warnings-regexp): Catch also "LaTeX Font" warnings. + +2016-02-21 Mosè Giordano <mose@gnu.org> + + Another fix for TeX-parse-errro + + * tex-buf.el (TeX-parse-error): Improve regexp for polishing file name. + * tests/tex/compilation-log.txt: Add example to test file. + * tests/tex/error-parsing.el: Update the expected result of the test + accordingly. + +2016-02-21 Mosè Giordano <mose@gnu.org> + + Allow ignoring certain warnings + + * tex.el (TeX-ignore-warnings, TeX-suppress-ignored-warnings): New + customizable options. + (TeX-toggle-suppress-ignored-warnings): New function. + (TeX-mode-map): Add key-binding for `TeX-toggle-suppress-ignored-warnings'. + * tex-buf.el (TeX-error-list-skip-warning-p): Add new argument and use it. + (TeX-parse-TeX): Provide additional argument to + `TeX-error-list-skip-warning-p'. + (TeX-error-list): Document new information. + (TeX-find-display-help): Add new (ignored) argument. + (TeX-error): Add new element to `TeX-error-list' entry. + (TeX-warning): Set the "ignore" flag for `TeX-error-list' + (TeX-error-overview-make-entries): Provide additional argument to + `TeX-error-list-skip-warning-p'. + (TeX-error-overview-toggle-debug-bad-boxes): + (TeX-error-overview-toggle-debug-warnings): Determine + `TeX-master-directory' in `TeX-command-buffer'. + (TeX-error-overview-toggle-suppress-ignored-warnings): New function. + (TeX-error-overview-mode-map): Add key-binding for + `TeX-error-overview-toggle-suppress-ignored-warnings'. + (TeX-error-overview-menu): Add entry for + `TeX-error-overview-toggle-suppress-ignored-warnings'. + +2016-02-21 Mosè Giordano <mose@gnu.org> + + Show and hide warnings and bad boxes in error overview + + * tex-buf.el (TeX-error-list-skip-warning-p): New function. + (TeX-parse-TeX): Skip warnings or bad boxes if they are to be ignored. + (TeX-error-list): Describe information present in the list. + (TeX-parse-error): When storing warnings and bad boxes, add them to + `TeX-error-list' even if `TeX-debug-bad-boxes' and `TeX-debug-warnings' + are nil. + (TeX-error-overview-make-entries): Skip warnings or bad boxes if they + are to be ignored. + (TeX-error-overview-toggle-debug-bad-boxes): + (TeX-error-overview-toggle-debug-warnings): New functions. + (TeX-error-overview-mode-map, TeX-error-overview-menu): Add + `TeX-error-overview-toggle-debug-bad-boxes' and + `TeX-error-overview-toggle-debug-warnings'. + (TeX-error-overview): Make the list of entries for the overview before + creating the buffer and use this list to decide whether there is + something to show. + +2016-02-14 Mosè Giordano <mose@gnu.org> + + Fix TeX-check-files + + * tex-buf.el (TeX-check-files): Run the test in `TeX-master-directory' + as well. + +2016-02-14 Arash Esbati <esbati@gmx.de> + + Add new style/splitidx.el + + * Makefile.in (STYLESRC): Add new style. + + * tex-style.el (LaTeX-splitidx-sindex-reftex-quick-id-key): Add + customizable variable. + + * style/splitidx.el: New file. + +2016-02-14 Arash Esbati <esbati@gmx.de> + + Fix wrong usage of `TeX-auto-prepare-hook' + + * style/theorem.el (TeX-auto-cleanup-hook): + * style/ntheorem.el (TeX-auto-cleanup-hook): + * style/newfloat.el (TeX-auto-cleanup-hook): + * style/amsthm.el (TeX-auto-cleanup-hook): Use + `TeX-auto-cleanup-hook' instead of mistakenly used + `TeX-auto-prepare-hook'. + +2016-02-14 Arash Esbati <esbati@gmx.de> + + Add support for missing macro \SetLabelAlign + + * style/enumitem.el ("enumitem-SetLabelAlign"): Plug + \SetLabelAlign into AUCTeX parser. + (LaTeX-enumitem-SetLabelAlign-regexp): New variable. + (LaTeX-enumitem-auto-prepare): Reset + `LaTeX-auto-enumitem-SetLabelAlign'. + (LaTeX-arg-SetLabelAlign): New function to query the arguments of + \SetLabelAlign. + ("enumitem"): Add \SetLabelAlign to style hook incl. fontification. + (LaTeX-arg-SetEnumitemValue): Use `completing-read' instead of + `TeX-read-key-val'. + +2016-02-13 Mosè Giordano <mose@gnu.org> + + Add support for Atril viewer + + Suggested by Antoine Levitt. + + * tex.el (TeX-evince-dbus-p): Take new arguments to specify desktop + environment and application names. + (TeX-evince-sync-view-1): Rename from `TeX-evince-sync-view'. Take new + arguments to specify desktop environment and application names. + (TeX-atril-sync-view, TeX-evince-sync-view): + (TeX-view-program-select-evince): New functions. + (TeX-view-program-list-builtin): Add Atril entry and use + `TeX-view-program-select-evince' for Atril and Evince. + (TeX-source-correlate-mode): Register for Atril DBUS signal. + * doc/changes.texi: Mention Atril support. + +2016-02-09 Arash Esbati <esbati@gmx.de> + + Add support for dviout viewer + + * doc/changes.texi: Mention support for dviout on Windows. + + * tex.el (TeX-view-program-list-builtin): Add support for dviout + on Windows. This setup works for `TeX-source-correlate-method' + set to (dvi . source-specials). + Reorder " %o" in entry for SumatraPDF. + +2016-02-09 Arash Esbati <esbati@gmx.de> + + Add support for SumatraPDF viewer + + * doc/changes.texi: Mention support for SumatraPDF on Windows. + Fix typos. + + * tex.el (TeX-view-program-list-builtin): Add support for + SumatraPDF on Windows. + +2016-02-08 Mosè Giordano <mose@gnu.org> + + Add support for Zathura viewer + + * tex.el (TeX-view-program-list-builtin): Add Zathura. + * doc/changes.texi: Mention Zathura support and reworked error parsing. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Minor fix in TeX-documentation-texdoc + + * tex.el (TeX-documentation-texdoc): Make it possible to run the + function in read-only buffers. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Improve parsing of certain warnings + + * tex-buf.el (TeX-warning): Get full context and line numbers for + warnings matching `LaTeX-warnings-regexp'. + * tests/tex/compilation-log.txt: Add example warnings for this case. + * tests/tex/error-parsing.el: Update result of test accordingly. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Catch LaTeX class warnings + + * tex-buf.el (LaTeX-warnings-regexp): New variable. This is the same + regexp used before by `TeX-LaTeX-sentinel-has-warnings' and + `TeX-parse-error', but now catches class warnings as well. + (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error): Use + `LaTeX-warnings-regexp'. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Fix TeX-parse-error + + * tex-buf.el (TeX-parse-error): Remove from the file string pages of the + output file. + * tests/tex/compilation-log.txt: Add a warning containing such faulty + file name. + * tests/tex/error-parsing.el (TeX-error-parsing): Update result of the + test accordingly. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Add ERT test for error parsing + + * tests/tex/compilation-log.txt: Add minimal example of compilation log + that failed to be parsed correctly with the old parsing function. + * tests/tex/error-parsing.el: New ERT test. + +2016-02-07 Mosè Giordano <mose@gnu.org> + + Add script to update the ChangeLog + + * ChangeLog.1: Add copyright notice and information about included + commits. + * Makefile.in: Add ChangeLog-related variables and rules. + * build-aux/gitlog-to-auctexlog: New script, adapted from GNU Emacs. + +2016-02-03 Arash Esbati <esbati@gmx.de> + + Another fix for file name regexp in TeX-documentation-texdoc + + * tex.el (TeX-documentation-texdoc): Add `space' and `()' + to file name regexp for Windows paths. + +2016-02-02 Arash Esbati <esbati@gmx.de> + + Fix file name regexp in TeX-documentation-texdoc + + * tex.el (TeX-documentation-texdoc): Add backslash separator for Windows + paths. + +2016-02-02 Mosè Giordano <mose@gnu.org> + + Capture warnings from packages with hyphens in name + + * tex-buf.el (TeX-LaTeX-sentinel-has-warnings): Add hyphen to regexps. + (TeX-parse-error): Ditto. + +2016-02-02 Mosè Giordano <mose@gnu.org> + + New function for reading documentation with texdoc + + * tex.el (TeX-documentation-texdoc): New function. + (TeX-common-menu-entries): Replace `TeX-doc' with + `TeX-documentation-texdoc'. + (TeX-mode-map): Ditto. + * doc/auctex.texi (Documentation): Document `TeX-documentation-texdoc' + in place of `TeX-doc'. + * doc/changes.texi: Mention `TeX-documentation-texdoc'. + +2016-01-31 Tassilo Horn <tsdh@gnu.org> + + Capture message of LaTeX warnings + + * tex-buf.el (TeX-parse-error): Capture message of LaTeX warnings. + +2016-01-30 Mosè Giordano <mose@gnu.org> + + Use default argument of completing-read in ConTeXt-environment + + * context.el (ConTeXt-environment): Properly use default argument of + `completing-read'. Do not set `ConTeXt-default-environment' to + `environment' if the latter is equal to the current default + environment, like in `LaTeX-environment'. + +2016-01-30 Mosè Giordano <mose@gnu.org> + + Add completion for environments in ConTeXt + + * context.el (ConTeXt-language-variable-list): Document variable. Add + `ConTeXt-environment-list' so that now completion for environments + names in `ConTeXt-environment' function works. Suggested by Andrea De + Michele. + +2016-01-27 Mosè Giordano <mose@gnu.org> + + Change coding back to iso-8859-1, XEmacs doesn't support utf-8 + + * font-latex.el: Restore coding to iso-8859-1. + * style/alphanum.el: Ditto. + * style/dk-bib.el: Ditto. + * style/doc.el: Ditto. + * style/inputenc.el: Ditto. + * style/jura.el: Ditto. + * style/ltx-base.el: Ditto. + * style/ltxdoc.el: Ditto. + * tex-font.el: Ditto. + * tex.el: Ditto. + +2016-01-25 Mosè Giordano <mose@gnu.org> + + Code cleaning + + * latex.el (TeX-arg-document): Remove useless (mapcar 'identity ...). + Suggested by Marcin Borkowski. + * style/biblatex.el (LaTeX-biblatex-package-options): Ditto. + +2016-01-24 Arash Esbati <esbati@gmx.de> + + Improve style/enumitem + + * style/enumitem.el (LaTeX-enumitem-newlist-list) + (LaTeX-enumitem-newlist-list-item-arg) + (LaTeX-auto-enumitem-newlist): Remove variables. + (LaTeX-enumitem-newlist-list-local): Fix docstring. + (LaTeX-enumitem-auto-cleanup): Plug \newlist into AUCTeX parser. + ("enumitem"): Offer only enumerated environments as completion for + \restartlist. + +2016-01-24 Arash Esbati <esbati@gmx.de> + + Improve font related queries + + * style/theorem.el (LaTeX-theorem-fontdecl): Do not prefix the + elements with `TeX-esc'. + (LaTeX-arg-theorem-fontdecl): New function. + ("theorem"): Use `LaTeX-arg-theorem-fontdecl' for font related + queries. + +2016-01-24 Arash Esbati <esbati@gmx.de> + + Improve font related queries + + * style/ntheorem.el (LaTeX-ntheorem-fontdecl): Do not prefix the + elements with `TeX-esc'. + (LaTeX-arg-ntheorem-fontdecl): New function. + ("ntheorem"): Use `LaTeX-arg-ntheorem-fontdecl' for font related + queries. + +2016-01-24 Arash Esbati <esbati@gmx.de> + + Improve font related queries + + * style/amsthm.el (LaTeX-amsthm-fontdecl): Do not prefix the + elements with `TeX-esc'. + (LaTeX-arg-amsthm-fontdecl): New function. + ("amsthm"): Use `LaTeX-arg-amsthm-fontdecl' for font related + queries. + +2016-01-23 Mosè Giordano <mose@gnu.org> + + Write TeX-style-hook-dialect to parsed file + + * latex.el (BibTeX-auto-store): Run `TeX-bibtex-set-BibTeX-dialect'. + * tex.el (TeX-auto-store): Store `TeX-style-hook-dialect' from buffer + and write it to parsed file when present. + +2016-01-23 Mosè Giordano <mose@gnu.org> + + Add new dialects + + * context.el: Update copyright years. + (ConTeXt-dialect): New constant. + (ConTeXt-mode-common-initialization): Set `TeX-style-hook-dialect' to + `ConTeXt-dialect'. + * plain-tex.el: Update copyright years. + (plain-TeX-dialect): New constant. + (plain-TeX-common-initialization): Set `TeX-style-hook-dialect' to + `plain-TeX-dialect'. + * tex.el (TeX-style-hook-dialect): Document new dialects. + (TeX-style-hook-dialect-weight-alist): Add plain-tex and context dialects. + +2016-01-23 Mosè Giordano <mose@gnu.org> + + Convert tex-font.el to UTF-8 coding + + * tex-font.el: set coding to utf-8. + +2016-01-23 Mosè Giordano <mose@gnu.org> + + Move \iff macro to Arrows section of LaTeX-math-default + + * latex.el (LaTeX-math-default): \iff symbol is defined in base LaTeX, + move it to the "Arrows" section. + +2016-01-20 Mosè Giordano <mose@gnu.org> + + Fix bug in subfigure style file + + * style/subfigure.el ("subfigure"): Move `TeX-complete-list' inside + append argument. Fixes bug#22417. + +2016-01-17 Mosè Giordano <mose@gnu.org> + + Add some AMS arrows to LaTeX-math-default + + * latex.el (LaTeX-math-default): Add `impliedby', `implies', and `iff' + arrows. Suggested by Aiko Kyle. + +2016-01-10 Mosè Giordano <mose@gnu.org> + + url macro accepts only braces in hyperref + + * style/hyperref.el: Update copyright years. + ("hyperref"): Remove "url" from + `LaTeX-verbatim-macros-with-delims-local', it was added by url.el, but + in hyperref "\url" has a different syntax. + +2015-12-18 Ivan Andrus <darthandrus@gmail.com> + + Fix bug in `preview-LaTeX-disable-pdfoutput' + + * preview.el.in (preview-LaTeX-disable-pdfoutput): Allow one or more + spaces between command line arguments. + +2015-12-04 Tassilo Horn <tsdh@gnu.org> + + Delete .cvsignore + + I'm pretty confident we won't switch back. ;-) + +2015-11-30 Arash Esbati <esbati@gmx.de> + + Fix query prompt + + * style/ntheorem.el ("ntheorem"): + * style/theorem.el ("theorem"): Fix wrong query prompt. + +2015-11-30 Mosè Giordano <mose@gnu.org> + + Fix regex in texmathp + + * texmathp.el: Replace \t with \r. Reported by Marcin Borkowski. + +2015-11-24 Tassilo Horn <tsdh@gnu.org> + + Rename TeX-after-compilation-finished-hook to -functions + + * tex-buf.el (TeX-after-compilation-finished-functions): Rename from + -hook to -functions. + (TeX-LaTeX-sentinel): Adapt. + * context.el (TeX-ConTeXt-sentinel): Adapt. + +2015-11-23 Arash Esbati <esbati@gmx.de> + + Add new style/ntheorem.el + + * Makefile.in (STYLESRC): Add new style. + + * style/ntheorem.el: New file. + +2015-11-23 Arash Esbati <esbati@gmx.de> + + Add new style/theorem.el + + * Makefile.in (STYLESRC): Add new style. + + * style/theorem.el: New file. + +2015-11-23 Arash Esbati <esbati@gmx.de> + + Improve style/amsthm.el + + * style/amsthm.el (LaTeX-amsthm-fontdecl): Cover all font changing + declarations. + ("amsthm"): Overrule the defintion for \newtheorem in `latex.el'. + ("amsthm"): Use `TeX-completing-read-multiple' for font related + queries. + +2015-11-23 Tassilo Horn <tsdh@gnu.org> + + Rename TeX-after-TeX-LaTeX-command-finished-hook + + * tex-buf.el (TeX-after-compilation-finished-hook): Rename from + TeX-after-TeX-LaTeX-command-finished-hook. + * context.el (TeX-ConTeXt-sentinel): Run + TeX-after-compilation-finished-hook when the compilation was successful. + * doc/auctex.texi (Modes and Hooks): Adapt docs. + +2015-11-21 Mosè Giordano <mose@gnu.org> + + Convert Elisp source files to UTF-8 + + * font-latex.el: Change coding to UTF-8 + * style/alphanum.el: Ditto. + * style/dk-bib.el: Ditto. + * style/doc.el: Ditto. + * style/inputenc.el: Ditto. + * style/jura.el: Ditto. + * style/ltx-base.el: Ditto. + * style/ltxdoc.el: Ditto. + * tex.el: Ditto. + +2015-11-19 Mosè Giordano <mose@gnu.org> + + Fix bug in TeX-command-sequence + + * tex-buf.el (TeX-command-sequence): Ask for TeX-master if unknown, + otherwise running this function on a file without a known `TeX-master' + will result in `TeX-master' being automatically set to "<none>" at some + point. + (TeX-region-file): Add a third compatibility argument and update + docstring accordingly. + +2015-11-19 Mosè Giordano <mose@gnu.org> + + Remove support to "Master:" line + + * tex.el (TeX-convert-master): Remove now unused variable. + (TeX-master-file): Remove support to "Master:" line and update + documentation accordingly. + +2015-11-15 Mosè Giordano <mose@gnu.org> + + Activate RefTeX reference styles + + * tex-style.el (LaTeX-reftex-ref-style-auto-activate): New + customizable variable. + * style/cleveref.el ("cleveref"): Activate RefTeX reference style. + * style/fancyref.el ("fancyref"): Ditto. + * style/varioref.el ("varioref"): Ditto. + * style/hyperref.el ("hyperref"): Use + `LaTeX-reftex-ref-style-auto-activate'. + +2015-11-15 Mosè Giordano <mose@gnu.org> + + Determine AUCTEXDATE and AUCTEXVERSION from git + + * aclocal.m4 (AC_DATE_VERSION_FROM_CHANGELOG): if this is git + repository, use it to determine the variables. + * autogen.sh: Ditto. + +2015-11-14 Mosè Giordano <mose@gnu.org> + + Fix error in autogen.sh, configure, and Makefile + + * Makefile.in (doc/Makefile): Replace ChangeLog with ChangeLog.1. + * autogen.sh: Ditto. + * configure.ac: Ditto. + * doc/Makefile.in (version.texi): Ditto. + +2015-11-13 Mosè Giordano <mose@gnu.org> + + Drop ChangeLog + + * .gitignore: Add ChangeLog and auto dirs in tests. + * ChangeLog.1: Rename from ChangeLog. + * Makefile.in (EXCLUDEDFILES): Exclude build-aux directory. + * build-aux/gitlog-to-changelog: Copy script from gnulib. + +2014-05-02 Tassilo Horn <tsdh@gnu.org> + + Improve new-file regex. + + * tex-buf.el (TeX-parse-error): Improve new-file regex. + +2014-04-29 Tassilo Horn <tsdh@gnu.org> + + Fix Wrong type argument: characterp, nil error. + + * tex-buf.el (TeX-format-filter): Fix error caused by trying to + get char syntax from char after EOF. + +2014-04-27 Tassilo Horn <tsdh@gnu.org> + + Don't use TRIM arg of split-string. + + * tex-buf.el (TeX-parse-error): Don't use TRIM arg of + `split-string' which is new in emacs 24.4. + +2014-04-25 Tassilo Horn <tsdh@gnu.org> + + Improve line wrap removal heuristics. + + * tex-buf.el (TeX-format-filter): Remove linebreaks at columns 79 + and also column 80. Also remove linebreaks preceded by a period + that are followed by a word character to remove linebreaks in file + names that are wrapped just after the period starting the file + name extension. + +2014-04-24 Tassilo Horn <tsdh@gnu.org> + + Improve TeX error parsing. + + * tex-buf.el (TeX-error): Error if file containing the TeX error + doesn't exist instead of finding a new file. + (TeX-parse-error): Greatly simplify the new file and end of file + regexps. + +2015-11-13 Mosè Giordano <mose@gnu.org> + + * Version 11.89 released. + +2015-11-12 Mosè Giordano <mose@gnu.org> + + * RELEASE: Update AUCTeX version, the new features section, and + the list of contributors. + + * configure.ac: Update AUCTeX version. + + * doc/changes.texi: Mention PDF Tools and generic features for + 11.89 release. + + * doc/tex-ref.tex: Update AUCTeX version and copyright years + across the file. + + * latex.el: Update copyright year. + + * latex/preview.dtx: Manually update release version. + + * Makefile.in (WEMACSPACKAGE): Update for Emacs 24.5 + (www-doc): Download gendocs.sh patch from AUCTeX repository. + + * tex.el (TeX-view-predicate-list-bultin): For + `has-no-display-manager' predicate, use the current test only for + old Emacsen, otherwise employ `display-graphic-p'. Suggested by + Santiago Saavedra. + +2015-11-11 Mosè Giordano <mose@gnu.org> + + * tests/latex/latex-test.el (LaTeX-math-indent) + (LaTeX-change-environment-with-esc): New tests. + + * tests/latex/math-indent-in.tex: New test file. + + * tests/latex/math-indent-out.tex: Ditto. + +2015-11-10 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-fill-break-at-separators): Change default value + to opening only inline and display math switches. + + * tests/latex/latex-filling-in.tex: New test file. + + * tests/latex/latex-filling-out.tex: Ditto. + + * tests/latex/latex-test.el (LaTeX-indent-tabular-test/in) + (LaTeX-indent-tabular-test/out): Remove variables defined with + `defvar'. + (AUCTeX-set-ert-path): New function for setting the path of the + ERT test files. + (LaTeX-filling): New ERT test. + +2015-11-10 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-revert-document-buffer): New function. + (TeX-after-TeX-LaTeX-command-finished-hook): Mention it in docstring. + * doc/auctex.texi (Modes and Hooks): Mention it in manual. + +2015-11-10 Santiago Saavedra <ssaavedra@gpul.org> (tiny change) + + * tex.el (TeX-command-list, TeX-view-program-list-builtin) + (TeX-view-program-selection): Add dvi2tty as a first-class + command, removing it from a load-time quasiquotation so that the + strategy for selecting it or evince goes down to the frame + performing the View command. Fixes bug#21873. + +2015-11-09 Mosè Giordano <mose@gnu.org> + + * tex-info.el: Update copyright years. + (Texinfo-nodename-de-escape, Texinfo-nodename-escape): Use + `TeX-assoc-string' in place of `assoc-string'. + +2015-11-08 Mosè Giordano <mose@gnu.org> + + * tex-info.el (TeX-texinfo-mode): Set `TeX-output-extension'. + Remove compatibility code with old Emacsen. + +2015-11-06 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-check-TeX, TeX-check-TeX-command-not-found): New + customizable options. + (TeX-command): Do a better check for the presence of a TeX + distribution. Run `call-process' instead of `executable-find', + like `TeX-run-command' actually does. The point is that + `call-process' and `start-process' use `PATH' environment + variable, `executable-find' uses `exec-path' variable and they do + not need to match, but we should check what `TeX-run-command' will + really do. + + * doc/auctex.texi (Processor Options): Document `TeX-check-TeX'. + + * doc/changes.texi: Mention `TeX-check-TeX'. + +2015-11-03 Mosè Giordano <mose@gnu.org> + + * doc/auctex.texi (Processor Options): Document + `ConTeXt-Mark-version'. + (Multifile): Mention `dwim' value for `TeX-master'. + + * doc/changes.texi: Mention `ConTeXt-Mark-version'. + +2015-11-02 Mosè Giordano <mose@gnu.org> + + * latex.el (TeX-arg-document): When `TeX-arg-input-file-search' is + nil, use `LaTeX-style-list' to complete document classes. Fixes + bug#21814. + +2015-10-31 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/hologo.el: New file. + +2015-10-28 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-fill-break-at-separators): Default to nil + because many users don't like that special filling. + + * tex-info.el (Texinfo-make-node-list): Warn about duplicate + nodes. Return nodes in order instead of reversed. + +2015-10-25 Vincent Belaïche <vincent.b.1@hotmail.fr> + + * tex-info.el (Texinfo-nodename-de-escape): New defun. + (Texinfo-nodename-escape): New defun. + (Texinfo-make-node-list): New defun, code taken from + Texinfo-insert-node into this function for the sake of code + factorization. In addition, (1) allow node name not to be + followed by a comma --- i.e. next node etc. unspecified --- (2) + trim trailing blanks after node name, and (3) de-escape @comma{} + before insertion of node name into the list. + (Texinfo-insert-node): (1) Use new function + `Texinfo-make-node-list', and (2) escape node names for commas. + (Texinfo-arg-nodename): New defun. + (TeX-texinfo-mode): (1) Remove `group' from list of commands, + `group' is an environment, not a command. (2) Add + `guillemetleft', `guillemetright', `guilsinglleft', + `guilsinglright', `quotedblbase' and `quotesinglbase' to the list + of commands. (3) For commands `pxref', `ref' and `xref', use new + function `Texinfo-arg-nodename' to read node name with completion. + +2015-10-24 Arash Esbati <esbati@gmx.de> + + * style/enumitem.el (LaTeX-enumitem-auto-cleanup): Move some + operations from style hook into this function. + (LaTeX-enumitem-newlist-list-item-arg-local): Delete now unused + variable. + + * style/amsthm.el (LaTeX-amsthm-theoremstyle-list): New variable + replacing the deleted function + `LaTeX-amsthm-complete-theoremstyle'. + (LaTeX-amsthm-env-label): New function to insert user defined + environments. + ("amsthm"): Improve handling of "newtheorem*" and + "newtheoremstyle". + + * style/AlegreyaSans.el ("AlegreyaSans"): Remove SmallCaps + font declaration command. + + * style/Alegreya.el ("Alegreya"): Remove SmallCaps + font declaration command. + + * style/caption.el (LaTeX-arg-caption-captionbox): Fix doctring. + + * style/subcaption.el (LaTeX-arg-subcaption-subcaption): Fix + doctring. + (LaTeX-arg-subcaption-subcaptionbox): ditto. + +2015-10-19 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-command): Check that AUCTeX can find a working + TeX distribution before running some *TeX commands. + +2015-10-18 Mosè Giordano <mose@gnu.org> + + * tex.el (fboundp): Define a `TeX-completing-read-multiple' + version for GNU Emacs >= 24.4. Fixes bug#19504. + +2015-10-13 Mosè Giordano <mose@gnu.org> + + * style/pstricks.el ("pstricks"): Do not disable PDF mode if XeTeX + engine is used. Suggested by Mandar Mitra. + +2015-10-09 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-fill-move-to-break-point): Fill $...$ like + \(...\) (bug#21645) + +2015-10-08 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-expand-list-builtin): New variable. + (TeX-expand-list): Move all entries to `TeX-expand-list-builtin' + and update docstring. + (TeX-expand-list): New function. + + * tex-buf.el (TeX-command-expand): Use `TeX-expand-list' function. + + * doc/auctex.texi (Starting Viewers): Mention + `TeX-expand-list-builtin'. + + * doc/changes.texi: Mention change to `TeX-expand-list'. + +2015-10-08 Arash Esbati <esbati@gmx.de> + + * style/longtable.el ("longtable"): Use `LaTeX-add-counters' on + "LTchunksize" and not `TeX-add-symbols'. + + * style/enumitem.el (LaTeX-arg-SetEnumitemKey): Remove unused + `prompt' from arguments list. + (LaTeX-arg-SetEnumitemValue): ditto. + + * style/listings.el (LaTeX-listings-key-val-options-local): New + variable used for all key-val queries. + ("listings-lstdefinestyle"): Add parsing support for + "\lstdefinestyle". + (LaTeX-listings-lstnewenvironment-regexp): Add missing "s" to + "listing". + (LaTeX-listings-update-style-key): New function adding newly + defined values to "style" key in + `LaTeX-listings-key-val-options-local'. + ("listings"): Extend "lstdefinestyle". + + * style/wrapfig.el ("wrapfig"): Check for new floating + environments definded through "newfloat.el" and offer them as + completion to "wrapfloat" environment. + +2015-10-05 Mosè Giordano <mose@gnu.org> + + * context.el (TeX-ConTeXt-sentinel): Parse ConTeXt Mark IV output. + + * tex-buf.el (TeX-TeX-sentinel-check): Ditto. + +2015-10-05 Arash Esbati <esbati@gmx.de> + + * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Check if + `LaTeX-caption-supported-float-types' from caption.el is bound and + update it accordingly. Fix docstring. + ("newfloat"): Fix wrong check with (LaTeX-largest-level). + ("newfloat"): Use `LaTeX-newfloat-key-val-options-local' and + delete redundant code. + +2015-10-04 Mosè Giordano <mose@gnu.org> + + * context.el (ConTeXt-Mark-version): New customizable and + safe-local variable. + (ConTeXt-expand-command): New function. + (ConTeXt-expand-options): Use `ConTeXt-Mark-version'. + + * tex.el (TeX-command-list): Use %(cntxcom) expander in all + ConTeXt programs. Remove MkIV entry. + (TeX-expand-list): Add %(cntxcom). + +2015-10-04 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el (font-latex-math-environments): Add math + environment. + +2015-10-04 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-command-list): Add MkIV to `TeX-command-list'. + +2015-09-29 Mosè Giordano <mose@gnu.org> + + * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Replace another + `pushnew' with `add-to-list', previously overlooked. + +2015-09-28 Mosè Giordano <mose@gnu.org> + + * style/newfloat.el: Do not require cl at loading time. + (LaTeX-newfloat-auto-cleanup): Append elements to + `LaTeX-label-alist' in order not to override possible custom + values. + +2015-09-27 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/newfloat.el: New file. + + * style/longtable.el ("longtable"): Make package lengths available + through `LaTeX-add-lengths' and not `TeX-add-symbol'. + +2015-09-26 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-search-files-kpathsea): Remove duplicates + directories. + +2015-09-26 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX--prettify-symbols-compose-p): New function. + (VirTeX-common-initialization): Use it. + +2015-09-25 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/subcaption.el: New file. + + * style/caption.el (LaTeX-caption-key-val-options): Fix values of hypcap-key. + (LaTeX-caption-update-key-val-options): Add support for + subcaption.el if loaded. + (LaTeX-arg-caption-captionbox): Do not query for the third + optional arg. if the second one is empty. + ("caption"): Add support for all lowercase \continuedfloat*?. + ("caption"): Fix fontification for \captionof. + + * style/hyperref.el ("hyperref"): Make + `LaTeX-indent-environment-list' local before adding new env's. + + * style/filecontents.el ("filecontents"): Make + `LaTeX-indent-environment-list' local before adding new env's. + + * style/fontenc.el: Fix mail address in Maintainer-header. + +2015-09-25 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-common-initialization): Remove "abstract" + environment, it is not defined in latex.ltx. + + * style/amsart.el ("amsart"): Add "abstract" environment. + + * style/amsbook.el ("amsbook"): Ditto. + + * style/article.el ("article"): Ditto. + + * style/memoir.el ("memoir"): Ditto. + + * style/report.el ("report"): Ditto. + + * style/scrartcl.el ("scrartcl"): Ditto. + + * style/scrreprt.el ("scrreprt"): Ditto. + +2015-09-24 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-doc): Use default argument of `completing-read'. + +2015-09-22 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-find-matching-end): Find correct end when point + is already on the name in \end{name}. + +2015-09-20 Mosè Giordano <mose@gnu.org> + + * .gitignore: Do not ignore auto.el. + + * Makefile.in (install-metadata): auto.el is not there anymore, + we do not need to test if preview is enabled here. + +2015-09-19 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-error-overview): Fix typo in error message. + (TeX-TeX-sentinel): Fix error parsing. + +2015-09-13 Arash Esbati <esbati@gmx.de> + + * style/eso-pic.el (LaTeX-eso-pic-package-options-list): Rename + from `LaTeX-eso-pic-package-options'. + (LaTeX-eso-pic-package-options): Use renamed variable. + + * style/AlegreyaSans.el: New file. + + * Makefile.in (STYLESRC): Add new style. + + * style/Alegreya.el: New file. + + * Makefile.in (STYLESRC): Add new style. + + * style/fontenc.el: New file. + +2015-09-10 Mosè Giordano <mose@gnu.org> + + * style/gloss-italian.el ("gloss-italian"): Fix "textitalian" + macro and "italian" environment arguments. + + * style/polyglossia.el (LaTeX-polyglossia-prepare): Clear + `LaTeX-polyglossia-lang-list'. + (LaTeX-polyglossia-cleanup): Remove clearing of + `LaTeX-polyglossia-lang-list'. + (TeX-update-style-hook): Append + `LaTeX-polyglossia-load-languages'. + ("polyglossia"): Remove `LaTeX-polyglossia-load-languages' from + here. + +2015-09-09 Mosè Giordano <mose@gnu.org> + + * style/polyglossia.el: Remove + `LaTeX-polyglossia-italian-options-list', moved to + gloss-italian.el. + (LaTeX-polyglossia-setkeys-regexp): Fix regexp. + (LaTeX-polyglossia-cleanup): Remove useless let-bound variables + and set `LaTeX-polyglossia-lang-list'. + (LaTeX-polyglossia-active-languages) + (LaTeX-polyglossia-lang-option-member): Use + `LaTeX-polyglossia-lang-list' variable instead of function. + (LaTeX-polyglossia-load-languages): New function. + ("polyglossia"): Use it. + + * style/gloss-italian.el: New style file. + + * Makefile.in (STYLESRC): Activate it. + + * style/polyglossia.el: New style file. + + * Makefile.in (STYLESRC): Activate it. + +2015-09-08 Arash Esbati <esbati@gmx.de> + + * style/hyperref.el ("hyperref"): Add completion for starred + version of `\autoref' incl. fontification. + ("hyperref"): Add fontification support for `\hypersetup'. + +2015-09-08 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-command-default): Fix bug where wrong command + was guessed for region files. + +2015-09-07 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (LaTeX-idx-md5-alist, LaTeX-idx-changed-alist): New + variables. + (TeX-command-sequence): Call file function without optional + arguments. + (TeX-command-default): Suggest "Index" when appropriate. + (TeX-run-TeX): Store value of `LaTeX-idx-md5-alist'. + (TeX-run-index): New function. + (TeX-LaTeX-sentinel): Set `LaTeX-idx-changed-alist'. + (TeX-index-sentinel): New function. + + * tex.el (TeX-command-list): Mention "makeindex" in "Index" help. + Suggested by Arash Esbati. + + * doc/changes.texi: Mention ability to suggest makeindex when + needed. + + * doc/todo.texi (Wishlist): Remove reference to makeindex. + + * doc/tex-ref.tex: Update copyright years. + Mention C-c C-a key binding. + +2015-09-05 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el (font-latex-unfontify-region): Also remove the + `invisible' text properties. + +2015-09-04 Mosè Giordano <mose@gnu.org> + + * doc/auctex.texi (Starting a Command): Update references to + `TeX-command-run-all' and C-c C-a key binding. + + * doc/changes.texi: Ditto. + + * doc/quickstart.texi (Processing Facilities): Ditto. + + * tex-buf.el (TeX-command-run-all): Use `universal-argument' to + reference C-u. + +2015-09-04 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-command-sequence-file-function): New variable. + (TeX-command-sequence): Use it. + (LaTeX-command-section-boundaries): Recognize end of document as + ultimate boundary. + (LaTeX-command-section): Signal an error if not in a LaTeX buffer. + (LaTeX-command-run-all-section): Ditto. + + * tex.el: Add autoloads for the new commands. + + * tex-buf.el (TeX-region-update): New function. + (TeX-command-region): Use it. + (LaTeX-command-section-boundaries): New function. + (LaTeX-command-section): Use it. + (TeX-command-run-all-region): New command. + (LaTeX-command-run-all-section): New command. + (TeX-command-run-all): Move it here from tex.el. + + * tex.el (TeX-command-run-all): Rename from TeX-update. + (TeX-mode-map): Bind TeX-command-run-all to C-c C-a. + +2015-09-03 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el (font-latex-fontify-script): Add possible value + `multi-level' to allow raising/lowering scripts of scripts, and + another value `invisible' which in addition hides the ^ and _ + characters in scripts. + (font-latex-match-script): Use it. + (font-latex-make-user-keywords): Add font-lock entry for script + signs. + (font-latex-match-script-chars): New function. + + * tex.el (TeX-tex-mode): Don't ignore case when matching the + TeX-format-list regexes. + (TeX-expand-list): Add expansion of %(PDFout) to -output-format + option for AmS-TeX. + (TeX-command-list): Use it instead of calling the non-existing + pdfamstex command. + +2015-09-02 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el: Remove code which set up font-latex for use with + stock latex-mode on load. + +2015-09-01 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-command-sequence): Add argument for processing + the region file instead of the master file. + + * tex.el (TeX--if-macro-fboundp): New portability macro. + (VirTeX-common-initialization): Use it. + +2015-08-31 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-previous-error): Delete point in error message. + (TeX-command-default) + (TeX-run-set-command): Take care of `TeX-PDF-via-dvips-ps2pdf'. + (TeX-run-dvips, TeX-run-ps2pdf): New functions. + (TeX-TeX-sentinel, TeX-TeX-sentinel-check, TeX-LaTeX-sentinel): + Take care of `TeX-PDF-via-dvips-ps2pdf'. + (TeX-dvips-sentinel, TeX-ps2pdf-sentinel): New functions. + (TeX-parse-command, TeX-output-revert-buffer): Delete point in + error message. + + * tex.el (TeX-command-list): Add "Dvips" and "Ps2pdf" entries. + (TeX-expand-list): Take care of `TeX-PDF-via-dvips-ps2pdf'. + (TeX-PDF-via-dvips-ps2pdf): New customizable and safe-local + variable. + (TeX-toggle-PDF-via-dvips-ps2pdf): New function. + (TeX-mode-specific-command-menu-entries): Add "PDF via dvips + + ps2pdf" entry. + + * doc/auctex.texi (Processor Options): Document + `TeX-PDF-via-dvips-ps2pdf' and fix a typo. + + * doc/changes.texi: Mention `TeX-PDF-via-dvips-ps2pdf'. + + * doc/quickstart.texi (Processing Facilities): Mention + `TeX-PDF-via-dvips-ps2pdf'. + + * tex-buf.el: Update copyright year. + (TeX-command-sequence-max-runs-same-command) + (TeX-command-sequence-max-runs): New customizable variables. + (TeX-command-sequence-count-same-command) + (TeX-command-sequence-count, TeX-command-sequence-last-command) + (TeX-command-sequence-sentinel, TeX-command-sequence-command): New + variables. + (TeX-command-sequence): New function. + (TeX-command-default): New function, stripped off from + `TeX-command-query'. + (TeX-command-query): Use `TeX-command-default'. + (TeX-command-sequence-sentinel): New function. + + * tex.el (TeX-update): New function. + (TeX-mode-map): Add key binding for `TeX-update'. + (TeX-mode-specific-command-menu-entries): Add entry for + `TeX-update'. + + * doc/auctex.texi: Update copyright year. + (Starting a Command): Document `TeX-update'. + + * doc/changes.texi: Update copyright year. + Mention `TeX-update'. + + * doc/quickstart.texi (Processing Facilities): Mention + `TeX-update' and `TeX-error-overview'. + + * doc/todo.texi: Update copyright year. + (Wishlist): Remove entry for `TeX-update'. + +2015-08-30 Arash Esbati <esbati@gmx.de> + + * style/caption.el ("caption"): Add support for undocumented + macros `\captionbox[*]'. + (LaTeX-arg-caption-captionbox): New function. + + * Makefile.in (STYLESRC): Add new style. + + * style/transparent.el: New file. + + * style/filecontents.el ("filecontents"): Do not indent the + content of `filecontents[*]' environment. + + * style/hyperref.el ("hyperref"): Do not indent the content of + `Form' environment. + + * style/array.el ("array"): Add fontification for + `\newcolumntype'. + +2015-08-28 Tassilo Horn <tsdh@gnu.org> + + * Version 11.88.8 released. + +2015-08-28 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-mode-syntax-table): Use punctuation syntax for + character | (bug#21366). + +2015-08-24 Tassilo Horn <tsdh@gnu.org> + + * tex.el (VirTeX-common-initialization): Add support for + `prettify-symbols-mode'. + +2015-08-21 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-check-engine): New customizable variable. + (TeX-check-engine-list): New variable. + (TeX-check-engine-add-engines): New function. + (TeX-check-engine): New function. + (TeX-command): Use `TeX-check-engine' and update docstring + accordingly. + + * style/fontspec.el ("fontspec"): Add engine restrictions. + + * doc/auctex.texi (Processor Options): Document + `TeX-check-engine'. + + * doc/changes.texi: Mention `TeX-check-engine'. + +2015-08-20 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-error-overview-jump-to-source) + (TeX-error-overview-goto-log): New functions. + (TeX-error-overview-mode-map): Add + `TeX-error-overview-jump-to-source' and + `TeX-error-overview-goto-log'. + (TeX-error-overview-menu): Define menu for TeX error overview. + (TeX-error-overview-mode): Add menu. + + * doc/auctex.texi (top) + (Debugging): Add section for error overview. + (Error overview): Document new functions and keys. + +2015-08-19 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-label): Mention in the docstring the returned + value. Let-bind `TeX-read-label-prefix' and use `TeX-read-label' + to read the label. + (TeX-read-label-prefix): New variable. + (TeX-read-label): New function. + (TeX-arg-label): Use `TeX-read-label' and mention + `TeX-read-label-prefix' in docstring. + (TeX-arg-define-label): Mention `TeX-read-label-prefix' in + docstring. + +2015-08-14 Arash Esbati <esbati@gmx.de> + + * latex.el (LaTeX-common-initialization): Fix the subgroup number + in the regex for `\\(this\\)?pagestyle' + +2015-08-10 Tassilo Horn <tsdh@gnu.org> + + * latex.el (TeX-latex-mode): Call LaTeX-preview-setup only if its + bound. + + * preview.el.in (LaTeX-preview-setup): Setup menu and keymap only + once. + +2015-08-09 Arash Esbati <esbati@gmx.de> + + * style/enumitem.el ("enumitem"): Cater for the starred version of + `\AddEnumerateCounter'. + + * style/ragged2e.el ("ragged2e"): Make package lengths available + through `LaTeX-add-lengths' and not `TeX-add-symbol'. + +2015-08-07 Tassilo Horn <tsdh@gnu.org> + + * Version 11.88.7 released. + + * latex.el (TeX-latex-mode): Call `LaTeX-preview-setup' + unconditionally instead of calling it from `LaTeX-mode-hook' which + breaks things if that hook is customized (bug#21188). + + * preview.el.in: Don't add `LaTeX-preview-setup' to + `LaTeX-mode-hook'. + +2015-07-21 Arash Esbati <esbati@gmx.de> + + * style/nameref.el ("nameref"): Add missing commands `\nameref*' + and `\Nameref'. + + * style/textpos.el ("textpos"): Fix the name of the provided env's + which is `textblock' and not `textpos'. + +2015-07-18 Arash Esbati <esbati@gmx.de> + + * latex.el (LaTeX-common-initialization): Query for the default + value of first arg when (re-)defining new environments. + + * Makefile.in (STYLESRC): Add new style. + + * style/vwcol.el: New file. + + * Makefile.in (STYLESRC): Add new style. + + * style/textpos.el: New file. + + * Makefile.in (STYLESRC): Add new style. + + * style/environ.el: New file. + + * style/tabulary.el ("tabulary"): Add `LCRJ' to + `LaTeX-array-column-letters'. + + * style/tabularx.el ("tabularx"): Add `X' to + `LaTeX-array-column-letters'. + + * style/array.el: Parse user-defined new column types and add them + to `LaTeX-array-column-letters'. + +2015-07-09 Mosè Giordano <mose@gnu.org> + + * latex/README: restore file deleted by mistake when preview/ + directory has been moved to top level. + + * Makefile.in: Use everywhere $(MAKE) in place of make. + +2015-06-21 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-LaTeX-sentinel): Add support for hf-tikz + messages. + + * style/mnras.el: New style file. + + * Makefile.in (STYLESRC): Activate it. + +2015-06-14 Arash Esbati <esbati@gmx.de> + + * style/pdfpages.el ("pdfpages"): Restrict suggested files to + *.pdf files. File name should be relative to master file + directory. + +2015-06-13 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error): + Cater for packages with digits in their names (e.g., fixltx2e, + which emits a warning from TeX Live 2015). + +2015-06-09 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-evince-dbus-p): Explicitly bind dbus-debug to nil in + order to really ignore dbus errors with dbus-ignore-errors. + +2015-06-05 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/pdfpages.el: New file. + + * style/listings.el (LaTeX-listings-auto-cleanup): Add support for + the optional argument of env's defined with `\lstnewenvironment'. + (LaTeX-listing-lstnewenvironment-regexp): Ditto. + +2015-06-05 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex.el (featurep): Restore compatibility with emacs versions + which don't have `activate-mark' (Emacs <= 22). + +2015-06-02 Arash Esbati <esbati@gmx.de> + + * latex.el (LaTeX-auto-cleanup): Prepare so that an optional + environment arg is also queried. + +2015-06-01 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-auto-env-args-with-opt): New variable for + collecting environments with an optional argument. + (LaTeX-auto-regexp-list): Use it. + (LaTeX-auto-cleanup): Initialize \newenvironment{foo}[n][d]{}{} + with the n-1 remaining mandatory arguments. + +2015-05-29 Nicolas Richard <youngfrog@members.fsf.org> + + * latex.el (LaTeX-backward-paragraph): Make it work in narrowed + buffers. Fixes bug#20685. + +2015-05-18 Orlando Iovino <orlando.iovino@yahoo.it> (tiny change) + + * style/beamer.el ("beamer"): Add `subtitle' to the `slide-title' + class. + +2015-05-16 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new styles. + + * style/newpxmath.el: New file. + + * style/newpxtext.el: New file. + + * font-latex.el (font-latex-set-syntactic-keywords): Allow for + multiple mandatory argument for a verbatim environment. + + * style/listings.el ("listings"): Add support for parsing new + env's defined with `\lstnewenvironment' command. + +2015-05-08 Tassilo Horn <tsdh@gnu.org> + + * Version 11.88.6 released. + +2015-05-08 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-mode-syntax-table): Use paired delimiter syntax for + character |. + (TeX-tree-expand): Fix docstring. + +2015-05-07 Mosè Giordano <mose@gnu.org> + + * tex.el: Update copyright years. + (TeX-view-program-list): Fix type. (Bug#20513) + +2015-05-05 Mosè Giordano <mose@gnu.org> + + * style/italian.el: Evaluate `TeX-quote-after-quote'. + +2015-05-01 Tassilo Horn <tsdh@gnu.org> + + * Version 11.88.5 released. + +2015-05-01 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-tree-expand): Expand all given vars in just one + single call of kpsewhich. Users reported that on some windows and + mac systems, kpsewhich is extremely slow leading to auctex startup + times of several seconds. + +2015-04-29 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-string-divide-number-unit): Fix docstring. + + * style/mathtools.el ("mathtools"): Fix typos. + +2015-04-25 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-parse-macro): Improve docstring. + +2015-04-19 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-clean): Also regexp-quote TeX-region-file. + +2015-04-17 Tassilo Horn <tsdh@gnu.org> + + * preview.el.in (preview-datadir, preview-lispdir): Delete these + two variables. + (preview-filter-specs): Use TeX-data-directory in place of + preview-datadir. + + * configure.ac: Remove auto.el from AC_OUTPUT. + + * Makefile.in (auto.el): Delete target. + +2015-04-11 Tassilo Horn <tsdh@gnu.org> + + * style/mathtools.el (LaTeX-mathtools-env-multlined): Don't call + newline-and-indent after inserting environment. + +2015-04-11 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/attachfile.el: New file. + + * style/fbb.el: Update style to LaTeX package v1.07 from + 2015/04/06. + + * style/erewhon.el ("erewhon"): Update style to LaTeX package + v1.04 from 2015/04/07. + + * style/baskervaldx.el ("baskervaldx"): Update style to LaTeX + package v1.07 from 2015/04/06. + + * style/newtxtext.el ("newtxtext"): Update style to LaTeX package + v1.434 from 2015/04/07. + + * style/enumitem.el ("enumitem"): Fix typos. + + * style/everysel.el ("everysel"): Fix typo (AtNextSelect_f_ont). + + * style/color.el: Replace `read-string' with `TeX-read-string'. + + * style/currvita.el: Replace `read-string' with `TeX-read-string'. + + * style/wrapfig.el: Replace `read-string' with `TeX-read-string'. + + * style/MyriadPro.el ("MyriadPro"): Add missing lenghts + `MdSlantfracSpacingBeforeSlash' and `MdSlantfracSpacingAfterSlash'. + + * style/caption.el (LaTeX-caption-key-val-options): Delete wrong + values for `margin'-key. + (LaTeX-arg-caption-command): Use `TeX-argument-insert' and do not + rely on `TeX-arg-eval' anymore. + (LaTeX-arg-caption-DeclareCaption): Ditto. + +2015-04-02 Mosè Giordano <mose@gnu.org> + + * doc/auctex.texi (Indenting): Document indentation of "\[...\]". + + * doc/changes.texi: Mention it. + +2015-03-30 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-begin-regexp): Add "\[". + (LaTeX-indent-calculate): Remove indentation of "\[...\]" from + here, it is automatically done in `LaTeX-indent-level-count' now + that `LaTeX-begin-regexp' has "\[". (Bug#20227) + +2015-03-28 Mosè Giordano <mose@gnu.org> + + * style/acro.el: + + * style/acronym.el: + + * style/caption.el: + + * style/color.el: + + * style/enumitem.el: + + * style/geometry.el: + + * style/minted.el: + + * style/pst-plot.el: + + * style/pstricks.el: + + * style/siunitx.el: Update copyright years and add + `TeX-auto-parse' to `TeX-update-style-hook'. + +2015-03-28 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/colortbl.el: New file. + + * style/ltxtable.el ("ltxtable"): Ask for a `Width' and not for a + `Length' in minibuffer. + + * latex.el (LaTeX-common-initialization): Add standard LaTeX + lengths `arraycolsep', `arrayrulewidth' and `doublerulesep'. + +2015-03-23 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-run-style-hooks): Apply style hooks in reverse + order. With that, a local style can modify a private or a global + style, and a private style can modify a global one. + +2015-03-17 Mosè Giordano <mose@gnu.org> + + * doc/wininstall.texi: Fix a broken link. + + * style/mn2e.el: New style file. + + * Makefile.in (STYLESRC): Activate new style. + +2015-03-15 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/ltxtable.el: New file. + +2015-03-15 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/ltablex.el: New file. + +2015-03-15 Arash Esbati <esbati@gmx.de> + + * style/enumitem.el (LaTeX-enumitem-SetEnumitemKey-regexp): Delete + match for the second argument. + (LaTeX-enumitem-SetEnumitemValue-regexp): Delete match for the + third argument. + (LaTeX-arg-SetEnumitemValue): Replace the randomly generated + number with something human-readable. + + * style/caption.el (LaTeX-caption-DeclareCaption-regexp): Delete + match for the second argument. + (LaTeX-arg-caption-DeclareCaption): Replace the randomly generated + number with something human-readable. + +2015-03-10 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-style-path): Replace `pushnew' with equivalent code + since defcustom init-forms don't seem to get compiled. + + * doc/auctex.texi (Modes and Hooks): Document + TeX-after-TeX-LaTeX-command-finished-hook. + + * tex-buf.el (TeX-after-TeX-LaTeX-command-finished-hook): New + hook. + (TeX-LaTeX-sentinel): Call it. + +2015-03-09 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-find-display-help): Display the help also when + the file cannot be determined. + + * latex.el (LaTeX-end-regexp): Add "\]". + (LaTeX-indent-calculate): Indent "\[...\]" display math as a + regular environment. + +2015-03-08 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/geometry.el: New file. + +2015-03-08 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/caption.el: New file. + +2015-03-08 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/enumitem.el: New file. + +2015-03-08 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-style-path): Replace add-to-list on local with + pushnew. + + * style/bidibeamer.el: New style. + + * Makefile.in (STYLESRC): Activate new bidibeamer style. + +2015-03-07 Mosè Giordano <mose@gnu.org> + + * doc/install.texi: Mention uninstallation in menus. + (Build/install and uninstall): Add "Uninstallation" index entry. + Document uninstallation process. + + * Makefile.in: Update copyright years. + (.PHONY): Add uninstall rule. + (uninstall): New rule. + + * doc/Makefile.in: Update copyright years. + (.PHONY): Add uninstall rule. + (uninstall): New rule. + + * latex/Makefile.in: Update copyright years. + (.PHONY): Declare phony targets. + (install-texmf-doc): Do not ignore errors in this rule. + (uninstall): New rule. + +2015-03-03 Tassilo Horn <tsdh@gnu.org> + + * doc/auctex.texi (Filling): Document LaTeX-fill-excluded-macros. + + * latex.el (LaTeX-fill-excluded-macros): New defcustom for + excluding macro arguments from filling. + (LaTeX-fill-region-as-paragraph): Use it. + +2015-03-02 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el (font-latex-match-command-with-arguments): Fix + error introduced in the last change. + +2015-02-24 Tassilo Horn <tsdh@gnu.org> + + * style/expl3.el: New style for the wrapper package for + experimental LaTeX 3. + + * Makefile.in (STYLESRC): Activate new style. + + * font-latex.el (font-latex-match-simple-command) + (font-latex-match-command-with-arguments): Use \s_ and \sw regexp + classes instead of hard-coding [A-Za-z@] as LaTeX macro chars. + +2015-02-17 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-after-insert-env-hook): Rename from + `LaTeX-after-insert-env-hooks' which is now an obsolete variable + alias. + (LaTeX-after-modify-env-hook): New hook. + (LaTeX-modify-environment): Run `LaTeX-after-modify-env-hook'. + +2015-02-13 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-pdf-tools-sync-view, TeX-PDF-mode): Move addition of + `TeX-source-correlate-handle-TeX-region' to + `pdf-sync-backward-redirect-functions' from `TeX-PDF-mode' to + `TeX-pdf-tools-sync-view'. + +2015-02-09 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-pdf-tools-sync-view): Make it work with + `TeX-command-region'. + +2015-02-09 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-pdf-tools-sync-view): Simplify function. + +2015-02-09 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/color.el: New style. + +2015-02-08 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-handle-TeX-region): Fix + void-variable error. + +2015-02-07 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-pdf-tools-sync-view) + (TeX-source-correlate-handle-TeX-region) + (TeX-source-correlate-sync-source, TeX-PDF-mode): Adapt PDF Tools + forward/backward search to latest PDF Tools changes. + +2015-02-06 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-source-correlate-handle-TeX-region): Replace + `file-name-base', introduced in GNU Emacs 24, with + `file-name-sans-extension'+`file-name-nondirectory'. + +2015-02-06 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-handle-TeX-region): New function. + (TeX-source-correlate-sync-source): Use it. + (TeX-PDF-mode): Set `pdf-sync-correlate-tex-refine-function' to + `TeX-source-correlate-sync-source'. + +2015-02-05 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-pdf-tools-sync-view): New function to use PDF Tools + `pdf-view-mode' as a viewer. + (TeX-view-program-list-builtin): Add PDF Tools entry calling + `TeX-pdf-tools-sync-view'. + +2015-02-04 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Add new style. + + * style/tcolorbox.el: New style. + +2015-01-31 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new style. + + * style/currvita.el: New file. + +2015-01-27 Tassilo Horn <tsdh@gnu.org> + + * Version 11.88.2 released. + + * tex.el (TeX-view-program-list-builtin): Remove "start" as + executable entry because it's no executable but a Windows system + command. + (TeX-view-program-list-builtin): Also remove "start" as executable + from the "dvips and start" entry. + +2015-01-25 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-section-heading): Use default parameter of + completing-read. Fixes bug#19675. + +2015-01-19 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-auto-store): Fix indentation in auto files. + +2015-01-16 Arash Esbati <esbati@gmx.de> + + * style/minted.el: Update copyright year. + (LaTeX-minted-auto-cleanup): Fix the name of the new langcode + environment. + +2014-12-30 Arash Esbati <esbati@gmx.de> + + * style/multirow.el ("multirow"): Fix a typo in the name of a + variable. + + * Makefile.in (STYLESRC): Add new styles. + + * style/relsize.el: New file. + + * style/wrapfig.el: New file. + + * style/hyperref.el ("hyperref"): Add `Form' environment needed + for PDF and HTML forms. + (LaTeX-hyperref-forms-options): New variable for key-val options + used in form related macros (`TextField', `CheckBox', + `ChoiceMenu', `PushButton', `Submit', `Reset'). + +2014-12-22 Tassilo Horn <tsdh@gnu.org> + + * doc/changes.texi: Document addition of LaTeX-command-section and + forward/backward search enhancements with Evince. + + * latex.el (auto-mode-alist): Add latex-mode association for HeVeA + files. + +2014-12-21 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-parse-macro): Enclose arg in + LaTeX-default-verb-delimiter if macro is in + LaTeX-verbatim-macros-with-delims and there's only one argument. + (TeX-auto-store): Check if LaTeX-verbatim-environments, + LaTeX-verbatim-macros-with-delims, and + LaTeX-verbatim-macros-with-braces are bound before using them. + + * style/minted.el (LaTeX-minted-newminted-regexp) + (LaTeX-minted-newmint-regexp, LaTeX-minted-newmintinline-regexp) + (LaTeX-minted-newmintedfile-regexp, LaTeX-minted-auto-cleanup): + Extend to recognize optional env/macro name. + ("minted"): Add \newminted, \newmint, \newmintinline, and + \newmintedfile macros. + +2014-12-20 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-auto-store): Write LaTeX-verbatim-*-local variables + to auto file to make them document-local. + + * style/minted.el (LaTeX-minted-auto-cleanup): Recognize macros + generated by \newmint, \newmintinline, and \newmintedfile, too. + + * tex.el (TeX-evince-sync-view): Encode URI with `url-encode-url'. + + * auctex.el: Remove byte-recompile-directory call compiling style + files because package.el does that anyhow. + + * Version 11.88.1 released. + +2015-01-19 Tassilo Horn <tsdh@gnu.org> + + * auctex.el (byte-recompile-directory): Refer to correct style + directory on load. + + * style/minted.el: New style. + + * Makefile.in (STYLESRC): Add style/minted.el. + + * latex.el (LaTeX-env-args): Bind exit-mark if its not bound + already. + (LaTeX-verbatim-regexp): Make variable obsolete. + (LaTeX-verbatim-regexp): New function which computes a regexp of + verbatim environments from LaTeX-verbatim-environments. + (LaTeX-indent-calculate, LaTeX-indent-calculate-last): Use the + function LaTeX-verbatim-regexp instead of the variable. + + * style/listings.el ("listings"): Don't modify the now obsolete + LaTeX-verbatim-regexp. + + * style/fancyvrb.el ("fancyvrb"): Don't modify the now obsolete + LaTeX-verbatim-regexp. + + * style/beamer.el ("beamer"): Don't modify the now obsolete + LaTeX-verbatim-regexp. + + * style/alltt.el ("alltt"): Don't modify the now obsolete + LaTeX-verbatim-regexp. + +2014-12-18 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-evince-sync-view): Don't URL-encode commas in the + file name (bug#19398). + +2014-12-12 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-environment-name-regexp): New function. + (LaTeX-modify-environment): Use it. + (LaTeX-find-matching-end): Use `TeX-grop' instead of the + hard-coded "{". Search for the closing of the environment with + `re-search-forward' instead of `search-forward' and use + `LaTeX-environment-name-regexp': this allows to consider + environments with macros in their names. (Bug#19281) + (LaTeX-find-matching-begin): Use `TeX-grop' instead of the + hard-coded "{". + +2014-12-09 Mosè Giordano <mose@gnu.org> + + * style/babel.el (LaTeX-babel-active-languages): Move `nreverse' + call inside `let'. + +2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * tex.el (TeX-mode-specific-command-menu): Remove Emacs 20 + compatibility code. + + * style/shortvrb.el ("shortvrb"): Use mapcar instead of + dolist/add-to-list. + + * style/pstricks.el (LaTeX-pst-point-in-parens) + (LaTeX-pst-macro-psarc, LaTeX-pst-macro-pscircle) + (LaTeX-pst-macro-rput, LaTeX-pst-macro-uput) + (LaTeX-pst-macro-multirputps, LaTeX-pst-macro-psline) + (LaTeX-pst-macro-psdots, LaTeX-pst-macro-parabola) + (LaTeX-pst-macro-pnt-twolen, LaTeX-pst-macro-psbezier) + (LaTeX-pst-macro-pspolygon, LaTeX-pst-macro-psframe) + (LaTeX-pst-macro-psgrid, LaTeX-pst-macro-newpsobject): Rename + unused arg to silence the byte-compiler. + (LaTeX-pst-parameters-add): Remove unused var beg. + + * style/pst-plot.el (LaTeX-pst-macro-psaxes): Rename unused arg to + silence the byte-compiler and fix indentation. + ("pst-plot"): Use mapc instead of mapcar for side-effects only. + + * style/pst-node.el (LaTeX-pstnode-macro-nput) + (LaTeX-pstnode-macro-cnodeput, LaTeX-pstnode-macro-nc) + (LaTeX-pstnode-macro-pc, LaTeX-pstnode-macro-tnabcput): Rename + unused arg to silence the byte-compiler. + + * style/psfig.el (TeX-arg-psfig, LaTeX-env-psfigure): Rename + unused arg to silence the byte-compiler. + + * style/prosper.el: Fix comment style. + (LaTeX-prosper-insert-title, LaTeX-prosper-arg-pdftransition) + (LaTeX-prosper-insert-options, LaTeX-prosper-insert-slide): Rename + unused arg to silence the byte-compiler. + + * style/pdfsync.el (LaTeX-pdfsync-output-page): Remove unused + sync-line variable. + + * style/natbib.el (natbib-note-args): Rename unused arg to silence + the byte-compiler. + + * style/inputenc.el (LaTeX-arg-inputenc-inputenc): Rename unused + arg to silence the byte-compiler. + + * style/harvard.el (LaTeX-env-harvardbib): Rename unused arg to + silence the byte-compiler. + + * style/graphicx.el (LaTeX-arg-includegraphics): Rename unused arg + to silence the byte-compiler. + + * style/fancyref.el (TeX-arg-fancyref-format): Rename unused arg + to silence the byte-compiler. + + * style/epsf.el (TeX-arg-epsfsize): Rename unused arg to silence + the byte-compiler. + + * style/emp.el (LaTeX-env-empfile): Rename unused arg to silence + the byte-compiler. + + * style/dinbrief.el (LaTeX-dinbrief-sender): Add a FIXME. + + * style/bigstrut.el (TeX-arg-bigstrut): Rename unused arg to + silence the byte-compiler. + + * style/beamer.el + (LaTeX-beamer-after-insert-env, TeX-arg-beamer-overlay-spec) + (TeX-arg-beamer-frametitle, TeX-arg-beamer-note) + (LaTeX-arg-beamer-theme, LaTeX-arg-beamer-inner-theme) + (LaTeX-arg-beamer-outer-theme, LaTeX-arg-beamer-color-theme) + (LaTeX-arg-beamer-font-theme): Rename unused arg to silence the + byte-compiler. + + * style/babel.el (require): Require cl at compile-time. + (LaTeX-babel-active-languages): Use pushnew/nreverse instead of + add-to-list. + + * bib-cite.el (bib-cite--kind): New function. + (bib-display, bib-find): Use it. + (featurep): Use with-current-buffer instead of set-buffer. + (bib-cite--fontify-help): New function. + (bib-cite-fontify-help-as-bibtex, bib-cite-fontify-help-as-latex): + Use it. + (bib-highlight-mouse, bib-label-help): Make comment conform to the + commenting conventions. + (bib-label-prompt-map): Derive from + minibuffer-local-completion-map instead of copying that. + (bib-display-this-environment): Fix comment. + (bib-document-TeX-files): Don't doubly-declare the-file. + +2014-12-08 Mosè Giordano <mose@gnu.org> + + * style/mathtools.el ("mathtools"): Fix closing bracket + placement. (Bug#19301) + +2014-12-08 Arash Esbati <esbati@gmx.de> + + * Makefile.in (STYLESRC): Add new styles. + + * style/newtxttt.el: New file. + + * style/newtxtext.el: New file. + + * style/newtxsf.el: New file. + + * style/newtxmath.el: New file. + + * style/fbb.el: New file. + + * style/erewhon.el: New file. + + * style/baskervaldx.el: New file. + +2014-12-04 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-Omega-command): Add aleph and omega choices. + (LaTeX-Omega-command): Add lamed and lambda choices. (Bug#19260) + +2014-12-03 Mosè Giordano <mose@gnu.org> + + * README.GIT: Describe branches of the repository. + +2014-12-02 Vladimir Lomov <lomov.vl@gmail.com> (tiny change) + + * latex/Makefile.in (MKINSTALLDIRS): Fix MKINSTALLDIRS path. + +2014-11-29 Mosè Giordano <mose@gnu.org> + + * tests/latex/latex-test.el (latex): Require latex.el. + (LaTeX-indent-tabular-test/in): Expand file name in load + directory, for automated tests. + (LaTeX-indent-tabular-test/out): Ditto. + + * tests/Makefile: New Makefile. + + * Makefile.in (.PHONY): Add new check target. + (check): New rule. Suggest in comments to run it before a new + release. + +2014-11-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * tex.el (TeX-view-program-list-builtin): Fix up paren typo. + +2014-11-28 Mosè Giordano <mose@gnu.org> + + * tex.el (TeX-view-program-list-builtin): Add the new third + element to each item. + (TeX-view-program-list): Document new third element of items in + doc string. Adapt the type. + (TeX-view-command-raw): Check whether the viewer executable + exists. (Bug#19121) + + * doc/auctex.texi (Starting Viewers): Document change to + `TeX-view-program-list'. + + * doc/changes.texi: Mention it. + +2014-11-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * style/siunitx.el (tex): Require tex because its indispensable + when compiling the call to TeX-auto-add-type. + + * style/acronym.el (tex): Ditto. + + * style/acro.el (tex): Ditto. + +2014-11-27 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-label-alist): Expand doc string. + (LaTeX-label): Make second argument optional to restore backward + compatibility and update doc string accordingly. (Bug#19178) + +2014-11-27 Matthew Leach <matthew@mattleach.net> + + * configure.ac: Merge from preview/configure.ac. + + * .gitignore: Merge from preview/.gitignore. + + * autogen.sh: Don't run autoconf in the preview direcotry. + + * Makefile.in (subdirs): Remove. + (DESCEND): Remove. + (EXCLUDEDFILES): Remove 'preview/' prefix. + (preview-ball): Likewise and decrement stip-components in tar. + (previewstartfile): Adapt from preview/Makefile.in. + (PREVIEW_AUTOLOAD): Likewise. + (texmf): Likewise. + (preview-latex.el): Likewise. + (latex/Makefile): Likewise. + (auto.el): Likewise. + (install-startup): Likewise. + (install-texmf): Likewise. + (release-commit): Likewise. + (DISTCLEANFILES): Likewise. + (CLEANFILES): Add preview files. + (install-el): Likewise. + (install-lisp): Likewise. + (all): Add texmf dependency and remove DESCEND. + (clean): Remove DESCEND action. + (distclean): Likewise. + (maintainer-clean): Likewise. + + * doc/Makefile.in (preview-dtxdoc.texi): Update path of + preview.dtx. + + * preview/ChangeLog: Move to ChangeLog-preview + + * preview/ChangeLog.1: Move to ChangeLog.1-preview + + * preview/auto.el.in: Move to top-level. + + * preview/circ.tex: Move to top-level. + + * preview/preview.el.in: Move to top-level. + + * preview/*.el: Move to top-level. + + * preview/images/: Move to images/. + + * preview/latex/: Move to latex/. + + * preview/Makefile.in: Remove. + + * preview/configure.ac: Remove. + + * preview/.gitignore: Remove. + + * preview/COPYING: Remove. + +2014-11-21 Tassilo Horn <tsdh@gnu.org> + + * doc/auctex.texi (Starting a Command): Document + LaTeX-command-section and friends. + + * style/book.el ("book"): Set LaTeX-largest-level to part instead + of chapter. + + * tex-buf.el (LaTeX-command-section-level): New variable. + (LaTeX-command-section-level): New function. + (LaTeX-command-section-change-level, LaTeX-command-section): New + commands. + + * latex.el (LaTeX-mode-map): Bind C-c C-z to LaTeX-command-section + and C-c M-z to LaTeX-command-section-change-level. + + * tex.el (TeX-evince-sync-view): Use line/col information from the + TeX-region buffer if the View command is made on a region. + + * tex-buf.el (TeX-region-create): Position point in the same + line/col as in the original buffer to make forward search work. + +2014-11-20 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-env-figure): Fix indentation when there is the + \centering macro and no caption is inserted. + + * style/fontspec.el ("fontspec"): Fix fontification of + "newfontfamily" and "newfontface". + +2014-11-19 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-sync-source): Make backward/inverse + search form PDF to tex work also for TeX-regions. + + * tex-buf.el (TeX-region-orig-buffer): New variable. + (TeX-region-create): Set TeX-region-orig-buffer. + + * tex.el (TeX-submit-bug-report): Adapt bug report intro text to + mention debbugs url. + +2014-11-18 Arash Esbati <esbati@gmx.de> + + * style/zlmtt.el (font-latex-add-keywords): Use more consistent + fontification. + + * style/textcomp.el (font-latex-add-keywords): Ditto. + + * style/fontaxes.el (font-latex-add-keywords): Ditto. + + * style/XCharter.el (font-latex-add-keywords): Ditto. + +2014-11-18 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-region-create): Disable finding of appropriate + major-mode for region file. Also disable file-local vars, and + don't run find-file-hook functions. Also, make the region file + read-only to prevent accidental editing where actually the real + file should have been edited (happens easily with source + correlation mode). + +2014-11-16 Mosè Giordano <mose@gnu.org> + + * Makefile.in (WEMACSDATAROOTDIR, WEMACSSITELISP): New variables. + (WPACKAGEFILES): Update accordingly. + (windows-package): Fix structure of the package for Emacs 24.4. + Reported by Uwe Siart. Remove the zip package before creating it, + otherwise it would be updated instead of recreated. + Mention that bash shell is required for windows-package and + release-upload recipes due to some bashisms in them. Reported by + José Carlos Santos. + +2014-11-15 Mosè Giordano <mose@gnu.org> + + * Makefile.in (WEMACSPACKAGE, WEMACSEXTRACTDIR): New variables. + (windows-package): Adapt rule to new Emacs 24.4 package for + Windows. Use `WEMACSPACKAGE' and `WEMACSEXTRACTDIR'. + +2014-11-15 Davide G. M. Salvetti <salve@linux.it> + + * Makefile.in (STYLESRC): Add `ifluatex.el', `luatextra.el'. + + * style/luatextra.el: New style. + + * style/ifluatex.el: New style. + + * doc/faq.texi: Update the `Why does 'TeX-next-error' ('C-c `') + fail?' entry, taking into account the `TeX-file-line-error' + option. Update copyright range. + + * doc/auctex.texi (Selecting a Command): Fix typo. + (Automatic Local): Update description of `TeX-style-path', + `TeX-style-global', `TeX-style-local', and `TeX-auto-local' + variables: there is no need to end directories and directories + lists items with a slash. + + * doc/quickstart.texi (Editing Facilities): Fix documentation: to + change font attributes of existing text, it has to be marked as an + _active_ region. + +2014-11-10 Davide G. M. Salvetti <salve@linux.it> + + * context.el: Replace `read-string' with `TeX-read-string'. + + * latex.el: Replace `read-string' with `TeX-read-string'. + + * style/CJK.el: Replace `read-string' with `TeX-read-string'. + + * style/amsmath.el: Replace `read-string' with `TeX-read-string'. + + * style/amsthm.el: Replace `read-string' with `TeX-read-string'. + + * style/beamer.el: Replace `read-string' with `TeX-read-string'. + + * style/csquotes.el: Replace `read-string' with `TeX-read-string'. + + * style/dinbrief.el: Replace `read-string' with `TeX-read-string'. + + * style/dk-bib.el: Replace `read-string' with `TeX-read-string'. + + * style/emp.el: Replace `read-string' with `TeX-read-string'. + + * style/epsf.el: Replace `read-string' with `TeX-read-string'. + + * style/filecontents.el: Replace `read-string' with `TeX-read-string'. + + * style/foils.el: Replace `read-string' with `TeX-read-string'; + add copyright notice. + + * style/graphicx.el: Replace `read-string' with `TeX-read-string'. + + * style/inputenc.el: Replace `read-string' with `TeX-read-string'. + + * style/letter.el: Replace `read-string' with `TeX-read-string'. + + * style/longtable.el: Replace `read-string' with `TeX-read-string'. + + * style/mathtools.el: Replace `read-string' with `TeX-read-string'. + + * style/natbib.el: Replace `read-string' with `TeX-read-string'. + + * style/paralist.el: Replace `read-string' with `TeX-read-string'. + + * style/plext.el: Replace `read-string' with `TeX-read-string'. + + * style/prosper.el: Replace `read-string' with `TeX-read-string'. + + * style/psfig.el: Replace `read-string' with `TeX-read-string'. + + * style/pstricks.el: Replace `read-string' with `TeX-read-string'. + + * style/scrbase.el: Replace `read-string' with `TeX-read-string'. + + * style/scrlttr2.el: Replace `read-string' with `TeX-read-string'. + + * tex-info.el: Replace `read-string' with `TeX-read-string'. + + * tex.el: Replace `read-string' with `TeX-read-string'. + +2014-11-04 Tassilo Horn <tsdh@gnu.org> + + * tex.el (VirTeX-common-initialization): Define a variable alias + for find-file-hook on XEmacs. + +2014-11-04 Stefan Monnier <monnier@iro.umontreal.ca> + + * toolbar-x.el: Adjust copyright years. + (require): Require cl at compile-time. + (toolbarx-good-option-list-p): Use pushnew instead of add-to-list. + + * tex.el (url-unreserved-chars): Declare to silence byte-compiler. + (TeX-tree-expand): Use pushnew instead of add-to-list. Iterate + path-list in reversed order. + (TeX-style-path): Use mapc instead of mapcar for side-effects. + (TeX-file-extensions, BibTeX-file-extensions) + (TeX-Biber-file-extensions): Declare to silence byte-compiler. + (TeX-tree-roots): Use pushnew instead of add-to-list. + (TeX-search-files-by-type): Use setq/pushnew instead of + dolist/add-to-list. + (TeX-doc): Use pushnew instead of add-to-list. + + * tex-info.el (require): Require cl at compile-time. + (Texinfo-insert-node): Use pushnew instead of add-to-list. + (reftex-section-levels-all, reftex-level-indent) + (reftex-label-menu-flags, reftex-tables-dirty): Always + forward-declare (not only at compile-time). + (when): declare-function only at compile-time. + + * tex-fold.el: Adjust copyright years. + (require): Require cl at compile-time. + (TeX-fold-region-macro-or-env, TeX-fold-update-at-point): Use + pushnew instead of add-to-list. + (TeX-fold-hide-item): Use setq instead of add-to-list. + + * tex-buf.el (font-lock-mode-enable-list) + (font-lock-auto-fontify, font-lock-defaults-alist): Declare vars + to silence byte-compiler. + + * multi-prompt.el: Adjust copyright years. + (multi-prompt): Don't let-bind unused var done. + (multi-prompt-next-must-match): Use minibuffer-completion-table + instead of dynamically bound table. + + * latex.el (require): Require cl at compile-time. + (title, name, level, done-mark, toc): Declare dynamic vars. + (LaTeX-env-document, TeX-arg-index-tag, TeX-arg-document) + (LaTeX-arg-usepackage, TeX-arg-verb, ): Rename unused arg. + (LaTeX-listify-package-options): Use setq instead of add-to-list + to add to local var. + (reftex-ref-macro-prompt, TeX-arg-item-label-p) + (TeX-arg-right-insert-p): Declare to silence byte-compiler. + (LaTeX-indent-line): Use pushnew instead of add-to-list. + (LaTeX-fill-move-to-break-point): Don't let-bind unused math-sep. + (LaTeX-section-enable-symbol): Downcase arg. + (LaTeX-indent-tabular): Use mapc instead of mapcar for + side-effects. + + * context.el (done-mark, reference, title, name, level): Declare + dynamic vars without global nil value. + (ConTeXt-section): let-bind reference. Remove binding of unused + var toc. + (ConTeXt-numbered-section-hook, ConTeXt-unnumbered-section-hook): + Improve docstring. + (ConTeXt-find-matching-stop): Don't let-bind pos. + (ConTeXt-optional-argument-insert) + (ConTeXt-required-argument-insert, ConTeXt-indent-line): Rename + unused arg. + (ConTeXt-mode-common-initialization): Use fboundp to check if + make-local-hook is defined. + + * bib-cite.el: Expand copyright years. + (bib-cite-is-XEmacs): Remove. + (bib-cite-minor-mode, bib-cite-setup-highlight-mouse-keymap) + (bib-etags, bib-highlight-mouse, bib-toggle-highlight) + (bib-etags-find-noselect): Check for XEmacs with featurep. + (bib-cite-setup-mouse-function): Rename unused arg. + (bib-apropos): Use mapc instead of mapcar for side effects. + (bib-cite-fontify-help-xemacs): Define only on XEmacs. + (bib-cite-fontify-help-as-bibtex, bib-cite-fontify-help-as-latex): + Check for XEmacs with featurep. Fix fontification code. + (bib-display-this-ref): Use point-min instead of 1. + (TeX-auto-save, TeX-auto-update, TeX-auto-regexp-list): Declare to + silence the byte-compiler. + +2014-11-03 Arash Esbati <esbati@gmx.de> + + * style/zlmtt.el: New file. + + * style/XCharter.el: New file. + + * style/textcomp.el: New file. + + * style/MyriadPro.el: New file. + + * style/mdsymbol.el: New file. + + * style/fontaxes.el: New file. + + * style/eso-pic.el: New file. + + * style/AnonymousPro.el: New file. + +2014-11-02 Arash Esbati <esbati@gmx.de> + + * style/MinionPro.el (TeX-add-symbols): Remove `figureversion', + `textsw', `textssc', `sscshape' and `swshape'. + (TeX-run-style-hooks): Added "fontaxes". + + * style/MinionPro.el (LaTeX-MinionPro-package-options): Added + additional options from v2.3 of `MinionPro.sty', available from + <https://github.com/sebschub> + +2014-11-01 Davide G. M. Salvetti <salve@linux.it> + + * tex.el (TeX-file-line-error): New customizable option. + (TeX-expand-list): New expander "$(file-line-error)". + (TeX-command-list): Use it. + (LaTeX-command-style): Use it. + + * doc/auctex.texi (Processor Options): Document + `TeX-file-line-error'. + + * doc/changes.texi: Mention `TeX-file-line-error'. + +2014-10-31 Mosè Giordano <mose@gnu.org> + + * Makefile.in (CTANDIR): New variable. + (preview-ball): Create a top level directory "preview/" in the + preview tarball, as required by CTAN. Save the tarball to + $(CTANDIR) instead of $(FTPDIR). + +2014-10-29 Mosè Giordano <mose@gnu.org> + + * Version 11.88 released. + +2014-10-29 Matthew Leach <matthew@mattleach.net> + + * latex.el (LaTeX-indent-environment-list): Remove setter + lambda. + (LaTeX--tabular-like-end): Remove variable. + (LaTeX-indent-tabular): Move setter function from + LaTeX-indent-environment-list to generate tabular-end regex when + called. + +2014-10-29 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-largest-level-set): Set `outline-heading-alist' + only if it is bound. + + * .gitignore: Ignore preview/preview.el. + + * Makefile.in (DISTCLEANFILES): Add preview/preview.el. + (release-commit): Write new version announcement also into + preview/ChangeLog. + + * aclocal.m4: Add a third argument to + `AC_DATE_VERSION_FROM_CHANGELOG' specifying the ChangeLog file. + + * configure.ac: Use new third argument of + `AC_DATE_VERSION_FROM_CHANGELOG'. Retrieve preview date and + version from its ChangeLog. Add preview/preview.el to output + files. + +2014-10-22 Mosè Giordano <mose@gnu.org> + + * RELEASE: Update AUCTeX version, the new features section, and + the list of contributors. + + * configure.ac: Update AUCTeX version. + + * doc/changes.texi: Mention generic bug fixes for 11.88 release. + + * doc/tex-ref.tex: Update AUCTeX version and copyright years + across the file. + Add now working `TeX-previous-error' key-binding. + + * tex.el: Update copyright year. + + * doc/Makefile.in: Make it possible to build the HTML doc with + `makeinfo' if `texi2html' is not available. Add new + `TEXI2HTML_TOC' variable. + (extradist): Use `TEXI2HTML_TOC'. + (html/$(TEXI2HTML_TOC)): Use `TEXI2HTML_TOC'. Fix splitting + option to HTML engine. Suggested by Norbert Preining. + + * latex.el (LaTeX-newline): Fix for when + `comment-auto-fill-only-comments' is non-nil. Suggested by Piet + van Oostrum. + +2014-10-13 Matthew Leach <matthew@mattleach.net> + + * style/cleveref.el: New file. + +2014-10-02 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex.el (featurep): Activate mark in the GNU Emacs version of + TeX-activate-mark instead of being a no-op. + (TeX-insert-dollar): Use set-mark instead of push-mark in order to + avoid duplicate marks. + +2014-10-02 Ikumi Keita <ikumi@ikumi.que.jp> + + * texmathp.el (texmathp-tex-commands-default): Move equation* + environment to AMS-LaTeX section. + (texmathp-why): Fix docstring. + +2014-10-02 Ikumi Keita <ikumi@ikumi.que.jp> + + * style/amstext.el (LaTeX-amstext-package-options): Rename from + `LaTeX-amstext-package-option'. + +2014-10-02 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-info.el (Texinfo-mark-environment, Texinfo-mark-section) + (Texinfo-mark-node): Use `push-mark' instead of `set-mark'. + + * latex.el (LaTeX-mark-environment): Ditto. + + * context.el (ConTeXt-mark-environment): Ditto. + +2014-09-25 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-insert-environment): Pass correct \end buffer + position to hooks in LaTeX-after-insert-env-hooks. + +2014-09-13 Vincent Belaïche <vincent.b.1@hotmail.fr> + + * latex.el (LaTeX-dialect): Correct doctstring for consistency + with definition of function TeX-add-style-hook. + + * doc/auctex.texi (Simple Style): modify example with + 'TeX-add-style-hook', so that 3rd argument is added. Modify @defun + of 'TeX-add-style-hook' also to document addition of 3rd argument. + +2014-09-11 Vincent Belaïche <vincent.b.1@hotmail.fr> + + * doc/changes.texi: Add information about style hook labelling by dialect. + + * doc/todo.texi (Bugs): Update Bug #1 about style hook clash. + + * style/xspace.el ("xspace"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/xparse.el ("xparse"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/virtex.el ("virtex"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/verbatim.el ("verbatim"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/varioref.el ("varioref"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/url.el ("url"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/units.el ("units"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/unicode-math.el ("unicode-math"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ulem.el ("ulem"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/tabulary.el ("tabulary"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/tabularx.el ("tabularx"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/swedish.el ("swedish"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/subfigure.el ("subfigure"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/slovak.el ("slovak"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/slides.el ("slides"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/siunitx.el ("siunitx"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/shortvrb.el ("shortvrb"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/setspace.el ("setspace"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrreprt.el ("scrreprt"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrpage2.el ("scrpage2"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrlttr2.el ("scrlttr2"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrbook.el ("scrbook"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrbase.el ("scrbase"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/scrartcl.el ("scrartcl"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ruby.el ("ruby"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/report.el ("report"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ragged2e.el ("ragged2e"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pstricks.el ("pstricks"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pst-slpe.el ("pst-slpe"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pst-plot.el ("pst-plot"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pst-node.el ("pst-node"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pst-grad.el ("pst-grad"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/psfig.el ("psfig"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/prosper.el ("prosper"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/polski.el ("polski"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/polish.el ("polish"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/plhb.el ("plhb"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/plfonts.el ("plfonts"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/plext.el ("plext"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/placeins.el ("placeins"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/pdfsync.el ("pdfsync"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/paralist.el ("paralist"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/nomencl.el ("nomencl"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/nicefrac.el ("nicefrac"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ngerman.el ("ngerman"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/naustrian.el ("naustrian"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/natbib.el ("natbib"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/nameref.el ("nameref"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/multirow.el ("multirow"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/multind.el ("multind"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/multido.el ("multido"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/multicol.el ("multicol"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/mflogo.el ("mflogo"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/metalogo.el ("metalogo"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/memoir.el ("memoir"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/mdwlist.el ("mdwlist"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/mathtools.el ("mathtools"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/makeidx.el ("makeidx"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/luacode.el ("luacode"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ltxdoc.el ("ltxdoc"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/ltx-base.el ("ltx-base"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/lscape.el ("lscape"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/longtable.el ("longtable"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/listings.el ("listings"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/lipsum.el ("lipsum"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/lettrine.el ("lettrine"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/letter.el ("letter"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/latexinfo.el ("latexinfo"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/kpfonts.el ("kpfonts"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/kantlipsum.el ("kantlipsum"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jurabib.el ("jurabib"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jura.el ("jura"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jsbook.el ("jsbook"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jsarticle.el ("jsarticle"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jreport.el ("jreport"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jbook.el ("jbook"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/jarticle.el ("jarticle"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/j-report.el ("j-report"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/j-book.el ("j-book"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/j-article.el ("j-article"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/italian.el ("italian"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/inputenc.el ("inputenc"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/index.el ("index"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/imakeidx.el ("imakeidx"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/icelandic.el ("icelandic"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/hyperref.el ("hyperref"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/harvard.el ("harvard"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/graphicx.el ("graphicx"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/graphics.el ("graphics"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/german.el ("german"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/frenchb.el ("frenchb"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/french.el ("french"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/francais.el ("francais"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/footmisc.el ("footmisc"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/fontspec.el ("fontspec"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/foils.el ("foils"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/flashcards.el ("flashcards"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/filecontents.el ("filecontents"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/fancyvrb.el ("fancyvrb"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/fancyref.el ("fancyref"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/fancynum.el ("fancynum"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/fancyhdr.el ("fancyhdr"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/exercise.el ("exercise"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/everysel.el ("everysel"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/epsf.el ("epsf"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/epigraph.el ("epigraph"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/english.el ("english"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/emp.el ("emp"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/dutch.el ("dutch"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/doc.el ("doc"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/dk.el ("dk"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/dinbrief.el ("dinbrief"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/danish.el ("danish"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/czech.el ("czech"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/csquotes.el ("csquotes"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/comment.el ("comment"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/captcont.el ("captcont"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/bulgarian.el ("bulgarian"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/booktabs.el ("booktabs"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/book.el ("book"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/bm.el ("bm"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/bigstrut.el ("bigstrut"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/bigdelim.el ("bigdelim"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/biblatex.el ("biblatex"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/beamer.el ("beamer"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/babel.el ("babel"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/austrian.el ("austrian"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/article.el ("article"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/array.el ("array"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amsthm.el ("amsthm"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amstext.el ("amstext"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amstex.el ("amstex"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amssymb.el ("amssymb"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amsopn.el ("amsopn"): Add LaTeX-dialect to + TeX-add-style-hook call. Update header with correct filename. + + * style/amsmath.el ("amsmath"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amsbsy.el ("amsbsy"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amsbook.el ("amsbook"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/amsart.el ("amsart"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/alphanum.el ("alphanum"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/alltt.el ("alltt"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/afterpage.el ("afterpage"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/acronym.el ("acronym"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/acro.el ("acro"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/MinionPro.el ("MinionPro"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/CJKutf8.el ("CJKutf8"): Add LaTeX-dialect to TeX-add-style-hook call. + + * style/CJK.el ("CJK"): Add LaTeX-dialect to TeX-add-style-hook call. + + * bib-cite.el (eval-after-load "bibtex"): Add hook + TeX-bibtex-set-BibTeX-dialect to BibTex mode, this will set + 'TeX-style-hook-dialect' to :bibtex for BibTeX files so that + Mosè's problem should be solved. + + * latex.el (LaTeX-common-initialization): set + 'TeX-style-hook-dialect' to :latex for LaTeX files, and those in + LaTeX derived modes. Add LaTeX-dialect as DIALECT argument to all + calls of TeX-add-style-hook. + + * tex.el (TeX-style-hook-list): Update docstring to make clear + that style hooks can also be in the form '[TeX-style-hook HOOK-FUN + DIALECT-SET]'. + (TeX-bibtex-set-BibTeX-dialect): New defun. + (TeX-style-hook-dialect-weight-alist): New defconst. + (TeX-shdex-eval): New defun. + (TeX-shdex-or TeX-shdex-and TeX-shdex-nor TeX-shdex-not) + (TeX-shdex-in-p TeX-shdex-listify): New defsubst. + (TeX-style-hook-dialect): New defvar, used to have style hooks + called only in corresponding context. + (TeX-add-style-hook): Add optional argument context for marking + hooks that must run only in non default (aka nil) dialect. + (TeX-keep-hooks-in-dialect): New defun, used for unloading only + those hooks in a dialect list. + (TeX-unload-style): Add optional argument context-list for + unloading only those hooks marked for contexts in that + context-list. + (TeX-run-style-hooks): Run style hook only when current style hook + context matches context for which hook is marked. + + * tex-info.el (Texinfo-environment-list): Add 'html' and 'float' + environments. + (TeX-texinfo-mode): set 'TeX-style-hook-dialect' to :texinfo for + Texinfo files. Add macro '@caption'. + +2014-09-08 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-assoc-string): Remove docstring from defalias since + that's not supported with XEmacs. + +2014-08-25 Florent Rougon <f.rougon@free.fr> (tiny change) + + * tex-buf.el (TeX-command-expand): Fix possible endless loop in + file name expansion. + +2014-08-24 Mosè Giordano <mose@gnu.org> + + * tests/tex/command-expansion.el: New test file. + +2014-08-24 Florent Rougon <f.rougon@free.fr> (tiny change) + + * tex.el (TeX-expand-list): Add the previous position to the + lenght of the expanded string to get the current position in the + %' expander. + +2014-08-18 Vincent Belaïche <vincent.b.1@hotmail.fr> + + * font-latex.el (font-latex-add-quotes): Code optimization: use + '(add-to-list (make-local-variable (quote foo)) some-value)' + instead of '(make-local-variable (quote foo)) (add-to-list 'foo + some-value)' wherever possible. + + * bib-cite.el (bib-cite-minor-mode) + (bib-cite-setup-highlight-mouse-keymap): Code optimization: use + '(set (make-local-variable (quote foo)) some-value)' instead of + '(make-local-variable (quote foo)) (setq foo some-value)' wherever + possible. + + * latex.el (BibTeX-auto-store) + (LaTeX-common-initialization): Ditto. + + * tex-info.el (TeX-texinfo-mode): Code optimization: use '(set + (make-local-variable (quote foo)) some-value)' instead of + '(make-local-variable (quote foo)) (setq foo some-value)' wherever + possible. Add in style Texinfo standard macros '@acronym' and + '@tie'. + + * tex.el (TeX-assoc-string) new defalias to work-around missing + assoc-string in XEmacs. + (TeX-unload-style): Code optimization: use 'TeX-assoc-string' + instead of 'assoc' to search style in 'TeX-style-hook-list', and + use delq on returned value of assoc-string for removing the style + --- on the one hand delq will go through the whole list rather + than stop after the first match like in original code, but on the + other hand comparison are faster because eq instead of equal is + used and we are working on assoc cell rather than on key, so less + indirection, furthermore delq is C code. Anyway that make the code + much smaller and easier to understand. + (TeX-file-extensions): Add txi amongst extension of texinfo files, + for consistency with info node '(texinfo) Minimum' + (TeX-run-style-hooks): Code optimization: use 'TeX-assoc-string' + instead of 'assoc' to search style in 'TeX-style-hook-list'. + (VirTeX-common-initialization): Code optimization: use '(set + (make-local-variable (quote foo)) some-value)' instead of + '(make-local-variable (quote foo)) (setq foo some-value)' wherever + possible. + +2014-08-18 Tassilo Horn <tsdh@gnu.org> + + * font-latex.el (font-latex-set-syntactic-keywords): Allow for a + mandatory argument for a verbatim environment. + +2014-08-15 Vladimir Lomov <lomov.vl@gmail.com> + + * style/mathtools.el ("mathtools"): Don't use the removed + `LaTeX-amsmath-env-aligned' function. + +2014-08-14 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-insert-label): Remove. + (LaTeX-label): Add a new mandatory argument. Do not use + `LaTeX-insert-label'. Determine the prefix at the beginning of + the function and insert the label only if the prefix is non nil. + (LaTeX-section-label, LaTeX-env-figure, LaTeX-env-label): Use the + second mandatory argument of `LaTeX-label'. + + * style/amsmath.el: Update copyright years. + ("amsmath"): Append the environments to `LaTeX-label-alist' + instead of prepeding them. Use the second mandatory argument of + the `LaTeX-label' function. + + * style/longtable.el: Update copyright years. + ("longtable"): Move addition of "longtable" environment to + `LaTeX-label-alist' inside the style hook. Append the environment + to the alist instead of prepending it. Use the second mandatory + argument of the `LaTeX-label' function. + + * doc/auctex.texi (Sectioning, Environments): Remove references to + `LaTeX-insert-label'. + (Environments): Document `LaTeX-label-alist'. + + * doc/changes.texi: Remove references to `LaTeX-insert-label'. + +2014-08-12 Mosè Giordano <mose@gnu.org> + + * latex.el (LaTeX-insert-label): Rename from + `LaTeX-auto-insert-label' and mention sections in the doc-string. + (LaTeX-label): Update accordingly. + + * doc/auctex.texi (Sectioning): Mention `LaTeX-insert-label'. + (Environments): Update `LaTeX-insert-label' name and document use + for sectioning commands. + (Environments, Completion): Prettify + `TeX-complete-expert-commands' documentation by using a table + environment. + + * doc/changes.texi: Rename `LaTeX-auto-insert-label' to + `LaTeX-insert-label' and mention sections too. + +2014-08-11 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-command): Keep the frame and the buffer + associate to the error overview if the command to be run is View. + + * latex.el (LaTeX-auto-insert-label): New customizable variable. + (LaTeX-label): Use it. + + * doc/auctex.texi (Environments): Document + `LaTeX-auto-insert-label'. + + * doc/changes.texi: Mention `LaTeX-auto-insert-label'. Fix a + couple of bad-boxes in the PDF output of the manual. + +2014-07-25 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-largest-level-set): Adapt + `outline-heading-alist' according to largest level in order to + make `outline-promote' (and others) work correctly. + +2014-07-25 Mosè Giordano <mose@gnu.org> + + * doc/auctex.texi (Adding Macros): Document `TeX-date-format'. + + * doc/changes.texi: Mention `TeX-date-format'. + + * latex.el (TeX-date-format): New customizable option. + Suggested by Uwe Brauer. + (TeX-arg-date): Use it. + +2014-07-17 Mosè Giordano <mose@gnu.org> + + * Makefile.in: Update copyright years. + (EXCLUDEDFILES): Rename from GITFILES. Remove also .cvsignore and + tests from the release tarball. + (release-commit): More precise suggestion to push tag and release + commit. + (tar-ball): Use EXCLUDEDFILES in place of GITFILES. + +2014-07-15 Ikumi Keita <ikumi@ikumi.que.jp> + + * latex.el: Enhance array and tabular(*) environments support. + (LaTeX-env-array): Add call to `LaTeX-item-array'. + (LaTeX-env-tabular*): Add call to `LaTeX-item-tabular*'. + (LaTeX-array-skipping-regexp): New variable. + (LaTeX-tabular*-skipping-regexp): Ditto. + (LaTeX-item-array): New function. Put line break macro on the + last line and insert suitable number of ampersands. + (LaTeX-item-tabular*): Ditto. + (LaTeX-insert-ampersands): New function. Insert suitable number + of ampersands. + (LaTeX-array-column-letters): New variable. Column letters for + array-like environments. + (LaTeX-array-count-columns): New function. Count number of + ampersands to be inserted. + (LaTeX-common-initialization): Add entries to LaTeX-item-list to + use `LaTeX-item-array' and `LaTeX-item-tabular*'. + + * style/amsmath.el: Enhance alignat-like environments support + as well as some cleanups. + (LaTeX-item-equation-alignat): New function. Insert contents to + terminate a line in multi-line equations environment. + (LaTeX-amsmath-env-alignat): Use it. Add doc string. + (LaTeX-amsmath-env-alignedat): Ditto. + (LaTeX-amsmath-env-aligned): Removed. Just specifying a prompt + string for an optional argument is enough. + (LaTeX-item-equation): Take over the job of + `LaTeX-item-equations'. Add an optional `suppress' argument: + when it is non-nil skip putting line break macro. Add doc string. + (LaTeX-item-equations): Removed. Its task is now covered by + `LaTeX-item-equation'. + (LaTeX-item-equation-alignat): New function. Insert ampersands + according to the columns number, as well as calling + `LaTeX-item-equation'. + (LaTeX-amsmath-alignat-number-of-ampersands): New function. + ("amsmath"): Arrange setups of variables to adopt the above + changes. + + * style/array.el ("array"): Change `LaTeX-array-column-letters' + locally to include addtional letters extended in array.sty. + + * style/plext.el: New style file. Add support for extended + format for array-like environments. + + * Makefile.in (STYLESRC): Include style/plext.el. + + * doc/auctex.texi: Add documentation for the above enhancements. + + * doc/changes.texi: Ditto. + +2014-07-14 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-next-error): Do not pass `reparse' argument to + `next-error' in XEmacs as it is not supported. + (TeX-error-overview-frame, TeX-error-overview-buffer-name): Move + before their first use in order to prevent a runtime error in + XEmacs and GNU Emacs 21. Reported by Ikumi Keita. + (TeX-parse-TeX): Manually set `item' to nil when + `TeX-error-last-visited' is negative. + (TeX-error-description-error, TeX-error-description-warning) + (TeX-error-description-tex-said): Set to nil in XEmacs and GNU + Emacs 21. Reported by Ikumi Keita. + +2014-07-13 Mosè Giordano <mose@gnu.org> + + * latex.el (TeX-latex-mode): Add second argument to + `local-variable-p', mandatory in XEmacs. Suggested by Ikumi + Keita. + + * preview/preview.el (preview-dump-state): Ditto. + + * style/biblatex.el ("biblatex"): Ditto. + + * tex.el (TeX-how-many): Make the function return a number also in + XEmacs and Emacs 21. Suggested by Ikumi Keita. + +2014-07-12 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-error-description-error): Do not use the + `default' display, not supported by GNU Emacs 21 and XEmacs 21.4. + (TeX-error-description-warning): Ditto. + +2014-07-11 Mosè Giordano <mose@gnu.org> + + * tex-buf.el (TeX-error-description-error): Make face definition + XEmacs compatible. + (TeX-error-description-tex-said): Ditto. + (TeX-error-description-help): Ditto. + + * tex.el (nil): Handle the case of a non-available crm.el with a + `condition-case', instead of using the third argument of + `require', not recognized by XEmacs 21.4. + (and): Check whether dbus support is available before requiring + dbus.el. + +2014-07-02 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-expand-list): Set + `TeX-source-correlate-output-page-function' when necessary, in the + "%(outpage)" expander. + (TeX-source-correlate-method): Add an alist as a possible value + and change the default. + (TeX-source-correlate-method-active): Convert to a function. + (TeX-source-correlate-expand-options): Use the + `TeX-source-correlate-method-active' function. + (TeX-source-correlate-mode): Remove setting of the + `TeX-source-correlate-output-page-function' variable and of the + now deleted `TeX-source-correlate-method-active' variable. + (TeX-source-specials-view-expand-options): Use the + `TeX-source-correlate-method-active' function. + (TeX-mode-specific-command-menu-entries): Hide "Previous Error" + and "Error Overview" entries when not available. + + * context.el: Update copyright years. + (ConTeXt-expand-options): Use the + `TeX-source-correlate-method-active' function. + + * doc/auctex.texi (I/O Correlation): Update documentation of + `TeX-source-correlate-method'. + + * doc/changes.texi: Mention change to the default value of + `TeX-source-correlate-method'. + +2014-06-29 Mosè Giordano <giordano.mose@libero.it> + + * doc/todo.texi (Mid-term Goals): Remove "More flexible option and + command handling" item: we now have `TeX-command-extra-options'. + (Wishlist): Remove "Poor man's Source Specials": AUCTeX supports + source specials and SyncTeX. + (Wishlist): Remove "multiple completion for \bibliography" item: + "\bibliography" does complete multiple arguments. + +2014-06-28 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el (TeX-command): Kill the frame and buffer associated + to the error overview before running commands. + (TeX-TeX-sentinel): Open error overview if + `TeX-error-overview-open-after-TeX-run' is non-nil and there are + errors or warnings to show. + (TeX-LaTeX-sentinel): Ditto. + (TeX-find-display-help): Set `runbuf' to `TeX-active-buffer' since + this function may be called also from the error overview buffer. + (TeX-error-description-faces): Change group to more appropriate + `TeX-output'. + (TeX-error-overview-active-buffer): New variable. + (TeX-error-overview-orig-frame): Ditto. + (TeX-error-overview-orig-window): Ditto. + (TeX-error-overview-frame): Ditto. + (TeX-error-overview-setup): New customizable variable. + (TeX-error-overview-setup): New function. + (TeX-error-overview-goto-source): Ditto. + (TeX-error-overview-make-entries): Ditto. + (TeX-error-overview-next-error): Ditto. + (TeX-error-overview-previous-error): Ditto. + (TeX-error-overview-quit): Ditto. + (TeX-error-overview-mode-map): New variable. + (TeX-error-overview-list-entries): Ditto. + (TeX-error-overview-mode): New major mode. + (TeX-error-overview-buffer-name): New constant. + (TeX-error-overview-frame-parameters): New customizable variable. + (TeX-error-overview-open-after-TeX-run): Ditto. + (TeX-error-overview): New function. + (TeX-find-display-help): Expand the name of the file to be visited + starting from the directory of the master file. + (TeX-error-overview-make-entries): Add optional `master-dir' + argument, to shorten file names when they are relative. + (TeX-error-overview): Pass `TeX-master-directory' as argument to + `TeX-error-overview-make-entries'. + + * tex.el (TeX-error-overview): Autoload `TeX-error-overview'. + (TeX-mode-specific-command-menu-entries): Add an entry for the + error overview. + + * doc/auctex.texi (Debugging): Document error overview. + + * doc/changes.texi: Mention error overview. Add local variables + to the end of the file. + + * doc/todo.texi: Add local variables to the end of the file. + (Wishlist): Update entry about error reporting. + +2014-06-21 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el (TeX-parse-TeX): Use `TeX-find-display-help' in place + of `TeX-error-list-find-display-help'. + (TeX-error-list-find-display-help): Removed, replaced by more + general `TeX-find-display-help'. + (TeX-find-display-help): New function. + (TeX-error): Append nils to the `TeX-error-list' entry to make + each entry of the same lenght for both errors and warnings. + Append also `TeX-error-point'. This fixes a bug occurring when + `TeX-display-help' is set to `expert'. Use + `TeX-find-display-help' to display the help. + (TeX-warning): Append `TeX-error-point' to the `TeX-error-list' + entry to fix the above mentioned bug. Use `TeX-find-display-help' + to display the help. + +2014-06-04 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el (TeX-parse-TeX): Use + `TeX-error-list-find-display-help'. + (TeX-error-list-find-display-help): New function. + (TeX-warning): Use `bad-box' when there is a bad box. + (TeX-warning--find-display-help): Cater for bad boxes. + (TeX-help-error): Ditto. + +2014-06-02 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el (TeX-error--find-display-help): Use new fourth + argument of `TeX-help-error'. + (TeX-warning): Rename mandatory argument to `warning'. Do not add + leading "** " to warning string. + (TeX-warning--find-display-help): Use new fourth argument of + `TeX-help-error'. + (TeX-error-description-faces): New group. + (TeX-error-description-error): New face. + (TeX-error-description-warning): Ditto. + (TeX-error-description-tex-said): Ditto. + (TeX-error-description-help): Ditto. + (TeX-help-error): Add new `type' argument. Color help messages + using the new faces. + (TeX-warning): Preserve point when searching backward. In some + cases this prevents infinite loops in `TeX-parse-all-errors' and + fixes wrong detection of context string. + +2014-05-27 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-mode-specific-command-menu-entries): Add + `TeX-previous-error'. + + * tex-buf.el (TeX-error-list): Fix typo. + (TeX-parse-all-errors): Ditto. + +2014-05-23 Stefan Monnier <monnier@iro.umontreal.ca> + + Backport from ELPA repository. + * tex-site.el (TeX-modes-set): Use advice-add if available. + * font-latex.el (font-latex-make-sectioning-faces): Don't rely on + dynamic scoping for `num'. + (font-latex-make-built-in-keywords): Don't use `eval' needlessly. + (font-latex-doctex-syntactic-keywords): Declare before first use. + (font-latex-match-command-with-arguments): + Stay away from `add-to-list' on let-bound variables. + (font-latex-match-command-in-braces): Remove unused var `end'. + +2014-05-20 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el: Update copyright years. + (TeX-error-last-visited): New buffer-local variable. + (TeX-get-parse-function): New function. + (TeX-next-error): Add `apt' argument and make all arguments + optional. Use `TeX-get-parse-function'. + (TeX-previous-error): Use `TeX-get-parse-function'. Use + `TeX-parse-TeX' to move between errors when possible. + (TeX-TeX-sentinel): Parse the output log when + `TeX-parse-all-errors' is non-nil. + (TeX-LaTeX-sentinel): Ditto. + (TeX-parse-reset): Add an optional `reparse' argument and reparse + the output log when it is non-nil. Reset also `TeX-error-list' + and `TeX-error-last-visited'. + (TeX-parse-command): Add `arg' argument. + (TeX-parse-TeX): Add `arg' argument. When `TeX-parse-all-errors' + is non-nil, use `TeX-error-list' to move to the error point. + (TeX-error-list): New buffer-local variable. + (TeX-parse-all-errors): New customizable variable. + (TeX-parse-all-errors): New function. + (TeX-parse-error): Add an optional `store' argument. Make the + function return non-nil when an error or a warning is found. + (TeX-error): Add an optional `store' argument: when it is non-nil + store the relevant information about the error in + `TeX-error-list'. Use `TeX-error--find-display-help'. + (TeX-error--find-display-help): New function. + (TeX-warning): Add an optional `store' argument: when it is + non-nil store the relevant information about the warning in + `TeX-error-list'. Use `TeX-warning--find-display-help'. + (TeX-warning--find-display-help): New function. + (TeX-output-mode-map): Bind `p' to the now working + `TeX-previous-error'. + + * doc/auctex.texi (Debugging): Document `TeX-previous-error' and + `TeX-parse-all-errors'. Update `TeX-next-error'. + + * doc/changes.texi: Update copyright years. Mention + `TeX-next-error' and `TeX-previous-error' changes and the new + `TeX-parse-all-errors'. + + * doc/todo.texi: Update copyright years. + (Wishlist): Update a couple of items related to error parsing. + +2014-05-17 Mosè Giordano <giordano.mose@libero.it> + + * font-latex.el: Update copyright years. + (font-latex-update-sectioning-faces): Make sure + `height-scale' is a floating point number. + (font-latex-make-sectioning-faces): Ditto. + +2014-05-10 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el: Update copyright years and specify last + `siunitx' version supported. Hard wrap lines longer than 80 + columns. + (LaTeX-siunitx-regexp): Move the escape character out of the group + matching the unit name. + (LaTeX-arg-siunitx-unit): Add `prefix' argument. Replace the + space with `TeX-esc' as the completion separator. + (LaTeX-arg-define-siunitx-unit): Define a default prompt; set + `initial-input' to nil; use `TeX-esc' as prefix to the given + input. + ("siunitx"): Remove the escape character from the unit names. + +2014-05-02 Jobst Hoffmann <J.Hoffmann@fh-aachen.de> (tiny change) + + * style/listings.el ("listings"): Fix typo. + +2014-05-01 Mosè Giordano <giordano.mose@libero.it> + + * font-latex.el (font-latex-set-syntactic-keywords): Fix + fontification of the optional argument to a verbatim-like + environment. + +2014-04-16 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-parse-error): Add another exception. + +2014-04-06 Tassilo Horn <tsdh@gnu.org> + + * tex-info.el (TeX-texinfo-mode): Use `texinfo-current-defun-name' + in `C-x 4 a'. + +2014-04-04 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-add-environments): Move advising of + `LaTeX-add-environments' after definition of + `LaTeX-environment-menu' and `LaTeX-environment-modify-menu' + variables to fix assignment to free variable warnings. + + * tex-style.el: Update coyright years. + (LaTeX-biblatex-use-Biber): New variable. Mark as + safe-local-variable. + + * latex.el (TeX-latex-mode): Add setting of `LaTeX-using-Biber' to + `TeX-update-style-hook'. + + * style/biblatex.el ("biblatex"): Use `LaTeX-biblatex-use-Biber' + value to set `LaTeX-using-Biber' when it is set locally. + + * tex-bar.el: Update copyright years. + (LaTeX-install-toolbar): Append toolbar refresh to + `TeX-update-style-hook' instead of prepending it. + + * doc/auctex.texi: Update copyright years. + (Selecting a Command): Document `LaTeX-biblatex-use-Biber'. + + * doc/changes.texi: Mention `LaTeX-biblatex-use-Biber' change. + +2014-04-02 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el: Update copyright years and specify last + `biblatex' version supported. + (LaTeX-biblatex-executebibliographyoptions-options): Update. + (LaTeX-biblatex-language-list): Ditto. + (LaTeX-arg-biblatex-cites): Fix condition on `items' variable to + adapt to the `TeX-completing-read-multiple' return value change. + +2014-03-17 Nicolas Richard <theonewiththeevillook@yahoo.fr> + + * style/exercise.el: New file. + +2014-03-18 Tassilo Horn <tsdh@gnu.org> + + * doc/auctex.texi: Mention that `TeX-PDF-mode' is enabled by + default. + + * tex.el (TeX-PDF-mode): Enable TeX PDF mode by default. + + * tex-buf.el (TeX-command-master): Ask for TeX-master if it cannot + be determined otherwise. + +2014-03-15 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-view-command-raw): Throw an error when `spec' is + nil, otherwise when the function returns nil `TeX-command-expand' + enters an infinite loop. + + * style/paralist.el: Update copyright years. + ("paralist"): Use `LaTeX-provided-package-options-member' to + conditionally define environments. + +2014-03-12 Tassilo Horn <tsdh@gnu.org> + + * multi-prompt.el (multi-prompt): Return nil on empty input. + + * tex.el (TeX-completing-read-multiple): Define it so that empty + input results in nil across different emacs versions (<= 24.3 + vs. later versions). + + * style/biblatex.el ("biblatex"): Use + `TeX-completing-read-multiple' instead of + `completing-read-multiple'. + (LaTeX-arg-biblatex-cites): Use `TeX-completing-read-multiple' and + adapt handling of return value. + + * style/pstricks.el (LaTeX-package-parameters): Adapt to + `TeX-completing-read-multiple' change. + +2014-03-11 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-arg-usepackage-read-packages-with-options): Fix + bug that caused AUCTeX to query for packages infinitely. + + * context.el (ConTeXt-add-environments): Advice instead of + renaming and redefining generated function. + + * latex.el (LaTeX-close-environment): Remove non-interactive + `next-line' usage compile warning. + (LaTeX-add-bibliographies): Advice instead of renaming and + redefining generated function. + (LaTeX-add-environments): Ditto. + +2014-03-10 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-fill-break-at-separators): Default to opening + and closing math switches. + +2014-03-06 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Processor Options): Add missing pair of braces. + +2014-02-22 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-environment): Do not set + `LaTeX-default-environment' to `environment' if the latter is + equal to the current default environment. + +2014-02-21 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-arg-usepackage-read-packages-with-options): New + function. Now options are requested only if at least one package + has been provided. + (LaTeX-arg-usepackage-insert): New function. + (LaTeX-arg-usepackage): Use + `LaTeX-arg-usepackage-read-packages-with-options' and + `LaTeX-arg-usepackage-insert'. + (LaTeX-insert-usepackages): New function. + (LaTeX-env-document): Use it. + + * doc/auctex.texi (Environments): Document new behavior of + `LaTeX-env-document'. + + * doc/changes.texi: Mention it. + +2014-02-20 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-command-extra-options): New customizable variable. + (TeX-expand-list): New `%(extraopts)' expander. + (TeX-command-list): Use `%(extraopts)'. + + * doc/auctex.texi (Processor Options): Document + `TeX-command-extra-options'. + + * doc/changes.texi: Document it. + +2014-02-10 Tassilo Horn <tsdh@gnu.org> + + * style/english.el: New style for english documents so that + `TeX-language-en-hook' gets run. + + * Makefile.in (STYLESRC): Activate it. + + * doc/auctex.texi (languages): Document it. + +2014-02-04 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-auto-add-type): Convert to macro. + + * lpath.el: Don't silence byte-compiler. + + * latex.el (LaTeX-auto-style, LaTeX-auto-arguments) + (LaTeX-auto-optional, LaTeX-auto-env-args): Defvar explicitly + before use. + +2014-01-29 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-command-query): Use default parameter of + `completing-read'. + + * tex.el (TeX-insert-macro): Use default parameter of + `completing-read'. + + * latex.el (LaTeX-environment, TeX-arg-document): Use default + parameter of `completing-read'. + +2014-01-22 Tassilo Horn <tsdh@gnu.org> + + * style/shortvrb.el (LaTeX-shortvrb-chars): Move from + tex-style.el. Set default value to nil because just loading + shortvrb does not make | a shortvrb char. One needs to define it + using \MakeShortVrb{\|}. Extend the docstring so that it tells + that one should usually set this variable only buffer-locally. + (LaTeX-shortvrb-chars): Declare it as safe local variable. + + * font-latex.el (font-latex-add-to-syntax-alist): Call + `font-latex-setup' to make syntactic font-lock changes effective. + +2014-01-21 Berend de Boer <berend@pobox.com> + + * context.el: distinguish between numbered and unnumbered sections. + +2014-01-15 Mosè Giordano <giordano.mose@libero.it> + + * style/babel.el: Update copyright years and specify last `babel' + version supported. + (LaTeX-babel-language-list): Expand language list to all languages + mentioned in the last version of the manual. + (LaTeX-babel-active-languages): Update in order to parse the + `main' option and ignore the modifiers. + (LaTeX-babel-package-options): Turn the variable into a function + because now requires `TeX-read-key-val'. + +2014-01-11 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-current-environment): Make search for `\begin' + and `\end' case sensitive. + (docTeX-in-macrocode-p): Ditto. + (LaTeX-indent-calculate): Ditto. + (LaTeX-find-matching-end): Ditto. + (LaTeX-find-matching-begin): Ditto. + +2014-01-06 Vincent Belaïche <vincentb1@users.sourceforge.net> + + * tex-info.el (Texinfo-reftex-hook): Replace use of + reftex-tables-dirty by that of reftex-default-label-alist-entries + to trigger call to reftex-compile-variables in a standard way. + The problem was that generating a TOC for a Texinfo file and then + for a LaTeX file was not working for the LaTeX file because the + Texinfo file was using LaTeX label style and as such + reftex-ensure-compiled-variables was not calling + reftex-compile-variables, which caused wrong + reftex-everything-regexp for sections. + +2014-01-06 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-math-insert): Use `TeX-electric-math' for + consistency with `TeX-insert-dollar'. + (LaTeX-math-cal): Ditto. + +2013-12-24 Mosè Giordano <giordano.mose@libero.it> + + * tex-style.el (LaTeX-fontspec-arg-font-search): New customizable + variable. + (LaTeX-fontspec-font-list-default): Ditto. + + * style/fontspec.el (LaTeX-fontspec-arg-font): New function. + ("fontspec"): Use it. + + * doc/changes.texi: Mention `LaTeX-fontspec-arg-font-search' and + `LaTeX-fontspec-font-list-default'. + +2013-12-20 Mosè Giordano <giordano.mose@libero.it> + + * style/imakeidx.el ("imakeidx"): Move addition of options to + `LaTeX-imakeidx-indexsetup-options' inside the hook. + + * Makefile.in (STYLESRC): Activate new styles. + + * style/fontspec.el: New style. + + * style/luacode.el: Ditto. + + * style/metalogo.el: Ditto. + + * style/unicode-math.el: Ditto. + +2013-12-18 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-parse-error): Don't confuse ) in package + messages with EOF. + +2013-12-01 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-common-initialization): Move disabling of + `electric-pair-mode' from `VirTeX-common-initialization'. Disable + it only if `LaTeX-electric-left-right-brace' is non-nil. + + * tex.el (VirTeX-common-initialization): See above. + +2013-11-29 Tassilo Horn <tsdh@gnu.org> + + * tex.el (VirTeX-common-initialization): Disable + `electric-pair-mode' (a global minor mode) in auctex buffers + because it interferes with auctex's pairing feature. + +2013-11-23 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-common-initialization): + + * tex.el (VirTeX-common-initialization): Move + `LaTeX-narrow-to-environment' and `TeX-narrow-to-group' bindings + to the AUCTeX maps because `narrow-map' is not defined in GNU + Emacs < 22.2 and XEmacs. Reported by Giacomo Boffi. + +2013-11-13 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el ("biblatex"): Declare expert macros and + environments. + +2013-11-11 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-next-error, TeX-previous-error): Call + `next-error' also if last TeX command was a compile command (e.g., + Check, ChkTeX). + (TeX-run-compile): Save compilation buffer in + `TeX-command-buffer'. + +2013-11-10 Ralf Angeli <angeli@caeruleus.net> + + * bib-cite.el (bib-highlight-mouse): Change regexp to cope with + multiple optional arguments of a macro. + +2013-11-09 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-complete-make-expert-command-functions): Change + signature of declare-expert functions. + + * doc/auctex.texi: Document it. + +2013-11-08 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-complete-expert-commands): New defcustom. + (TeX-complete-make-expert-command-functions): New macro. + (TeX-insert-macro): Restrict completion depending on + `TeX-complete-expert-commands'. + (VirTeX-common-initialization): Ditto. + + * latex.el (LaTeX-environment, LaTeX-common-initialization): + Restrict completion depending on `TeX-complete-expert-commands'. + + * tex-info.el (TeX-texinfo-mode): Restrict completion depending on + `TeX-complete-expert-commands'. + + * doc/auctex.texi: Document normal vs. expert commands for users + and style file authors. + + * doc/changes.texi: Mention normal vs. expert commands. + + * latex.el (LaTeX-common-initialization): Fix void-function + LaTeX-symbol-list error. + +2013-11-05 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Folding): Document `TeX-fold-auto' and + `TeX-fold-unfold-around-mark'. + + * latex.el (TeX-arg-bibliography): Run style files associated to + the bibliography database files. + + * style/biblatex.el ("biblatex"): Do not quote at all + `TeX-arg-key-val' arguments. + (LaTeX-arg-addbibresource): Run style file associated to the + bibliography database file. + +2013-11-03 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el ("biblatex"): Quote `TeX-arg-key-val' + arguments with `quote' special form istead of apostrophe. + +2013-11-02 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-narrow-to-environment): New function, disabled + by default. + (LaTeX-common-initialization): Add key binding for + `LaTeX-narrow-to-environment'. + + * tex.el (VirTeX-common-initialization): Add key binding for + `TeX-narrow-to-group'. + (TeX-narrow-to-group): New function, disabled by default. + + * doc/auctex.texi (Narrowing): Document narrowing commands. + + * doc/changes.texi: Mention narrowing commands. + +2013-10-19 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-arg-file-name): New function. + (TeX-arg-file-name-sans-extension): Ditto. + (TeX-arg-version): Ditto. + (LaTeX-common-initialization): Add completion for + `ProvidesPackage', `ProvidesClass', and `ProvidesFile'. + + * doc/auctex.texi (Adding Macros): Document `TeX-arg-version', + `TeX-arg-file-name', and `TeX-arg-file-name-sans-extension'. + +2013-10-14 Tassilo Horn <tsdh@gnu.org> + + * doc/changes.texi: Mention the enhanced tabular indentation. + + * style/longtable.el ("longtable"): Use `LaTeX-indent-tabular' + also for longtable environment. + + * style/tabularx.el ("tabularx"): Use `LaTeX-indent-tabular' also + for tabularx environment. + + * style/tabulary.el ("tabulary"): Use `LaTeX-indent-tabular' also + for tabulary environment. + + * latex.el (LaTeX-indent-environment-list): Use + `LaTeX-indent-tabular' also for array and eqnarray environments. + +2013-10-14 Oleh Krehel <ohwoeowho@gmail.com> + + * latex.el: `LaTeX-indent-tabular' now indents tabular-like + environments. + (LaTeX--tabular-like-end): new variable. + (LaTeX-indent-environment-list): added `LaTeX-indent-tabular' as + indenter for "tabular" and "align", added a setter that recomputes + `LaTeX--tabular-like-end' + (LaTeX-env-beginning-pos-col): new function. + (LaTeX-hanging-ampersand-position): new function. + (LaTeX-indent-tabular): new function. + + * tests/latex/latex-test.el : added an ERT test for + `LaTeX-indent-tabular' + (LaTeX-indent-tabular-test/in): input filename variable + (LaTeX-indent-tabular-test/out): output filename variable + + * tests/latex/tabular-in.tex: input to latex-test.el + + * tests/latex/tabular-out.tex: input to latex-test.el + + * tex.el (TeX-how-many): added for compatibility with XEmacs. + +2013-10-11 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Quotes): Fix typo. + + * doc/changes.texi: Ditto. + +2013-10-10 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/changes.texi: Document enhanced paired braces feature. + + * doc/auctex.texi: Ditto. + +2013-10-06 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-insert-macro-default-style): Add new possible value + `show-all-optional-args' and update doc-string accordingly. + (TeX-parse-arguments): Use it. + + * doc/auctex.texi (Completion): Document `show-all-optional-args'. + + * doc/changes.texi: Mention `show-all-optional-args'. + + * tex.el (TeX-insert-braces-alist): New customizable variable. + (TeX-insert-braces): Mention it in doc-string. + (TeX-parse-macro): Use `TeX-insert-braces-alist'. + + * style/booktabs.el: Update copyright years. + (LaTeX-booktabs-arg-paren): Let-bind `TeX-arg-opening-brace' and + `TeX-arg-closing-brace' instead of `<' and `>'. + ("booktabs"): Add `toprule', `midrule', and `bottomrule' macros to + `TeX-insert-braces-alist'. + ("booktabs"): Add a dummy `ignore' in `cmidrule' macro in order to + reset `last-optional-rejected' to nil. + + * doc/auctex.texi (Completion): Document + `TeX-insert-braces-alist'. + + * doc/changes.texi: Mention `TeX-insert-braces-alist'. + +2013-09-27 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-arg-insert-braces): : Move + `indent-according-to-mode' after `save-excursion' because + `LaTeX-newline' (used in `save-excursion') deletes trailing + whitespaces. + + * tex-buf.el (TeX-LaTeX-sentinel): Add support for hyperref "Rerun + to get outlines right" messages. + +2013-09-26 Ikumi Keita <ikumi@ikumi.que.jp> + + * latex.el: Enhance brace pairing feature. + (TeX-arg-insert-braces): Extend to be used with \bigl and its + friends. + (TeX-arg-insert-right-brace-maybe): New function. + (LaTeX-insert-left-brace): New function. + (LaTeX-insert-corresponding-right-macro-and-brace): New function. + (LaTeX-find-preceeding-left-macro-name): New function. + (LaTeX-electric-left-right-brace): New customization option. + (LaTeX-left-right-macros-association): New variable. + + * style/amsmath.el ("amsmath"): Make use of the above change. + \lvert and \lVert are paired with \rvert and \rVert, respectively. + +2013-09-19 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el ("siunitx"): Fix `radian' unit name. + +2013-09-17 Fabrice Ben Hamouda <fabrice_102@yahoo.fr> (tiny change) + + * tex-buf.el (TeX-next-error, TeX-active-buffer): Fix a problem + with `TeX-next-error' in multi-file documents. + +2013-09-16 Tassilo Horn <tsdh@gnu.org> + + * tex-info.el (TeX-texinfo-mode): Set + `TeX-sentinel-default-function' to `TeX-TeX-sentinel'. + +2013-09-09 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-check-files): Handle buffers that haven't been + saved yet. + +2013-09-02 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-electric-math): Fix defcustom choices. + + * bib-cite.el (bib-cite-minor-mode): Call `make-local-hook' only + on XEmacs. + +2013-08-03 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-arg-ref): New function. + + * doc/auctex.texi: Replace occurrences of `TeX-arg-label' with + `TeX-arg-ref'. + (Adding Macros): Document `TeX-arg-ref'. + + * style/fancyref.el ("fancyref"): Use `TeX-arg-ref' instead of + `TeX-arg-label'. + + * style/latexinfo.el ("latexinfo"): Ditto. + + * style/nameref.el ("nameref"): Ditto. + + * style/varioref.el ("varioref"): Ditto. + + * style/subfigure.el ("subfigure"): Use `TeX-arg-ref' instead of + `TeX-arg-label' and fix parentheses. + +2013-07-31 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-math-initialize): Refactor top-level code into + function. + (LaTeX-math-list): Call `LaTeX-math-initialize' when setting the + value in order to update the key bindings. + Also shuffle around several definitions in order to get a + declaration-before-use order. + +2013-07-29 Mosè Giordano <giordano.mose@libero.it> + + * doc/changes.texi: Add other changes. + + * doc/auctex.texi (Environments): Fix typo. + +2013-07-27 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (BibTeX-auto-regexp-list): Remove `TeX-token-char' from + the regexp since cite keys can start with non-letter characters, + e.g., bibcodes start with year of publication. + +2013-07-24 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-math-menu-unicode): Enable also on windows + systems as it seems to work there, too. + +2013-07-23 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-clean-default-intermediate-suffixes): Add `.fls', + files created by TeX processors with `-recorder' option, and + `-blx.bib', files created by `bibtex' when using the `biblatex' + package. + + * doc/changes.texi: Document some changes for next release. + +2013-07-22 Mosè Giordano <giordano.mose@libero.it> + + * Makefile.in: Update copyright years. + (GITFILES): Rename from `CVSFILES', adapt to Git. + (COMMITTER): Get user name and email from Git configuration; + escape `<', `>' and spaces. + (install-el): Update reference to Git in comment. + (release-commit): Adapt to Git; make sure committer name and email + are encoded with ISO-8859-1 using the `iconv' program. + (tar-ball): Adapt to Git. + (preview-ball): Ditto. + + * auctex.spec (Provides): Update reference to Git in comment. + + * bib-cite.el: Update AUCTeX repository link in comment. + + * font-latex.el (font-latex-built-in-keyword-classes): Fix + fontification of some biblatex macros. Reported by Christian + Knüpfer. + (font-latex-built-in-keyword-classes): Revert changes made with + commit 7531cca, they were useless. + +2013-07-15 Mads Jensen <mje@inducks.org> + + * style/tabulary.el: New style. + + * Makefile.in (STYLESRC): Activate new style tabulary. + +2013-07-12 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Processor Options): Move + `TeX-source-correlate-method' to `I/O Correlation' section. + +2013-07-11 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Processor Options): Document + `TeX-source-correlate-method'. + +2013-07-09 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-default-tabular-environment): New variable. + (LaTeX-env-figure): Use it instead of hard-coding "tabular". + + * style/tabularx.el ("tabularx"): Set + `LaTeX-default-tabular-environment' to "tabularx". + +2013-06-29 Mosè Giordano <giordano.mose@libero.it> + + * bib-cite.el: Replace `save-excursion'+`set-buffer' with + `with-current-buffer'. + + * tex-bar.el: Ditto. + + * tex-buf.el: Ditto. + + * tex.el: Replace `save-excursion'+`set-buffer' with + `with-current-buffer'. Delete trailing whitespaces. + + * tex-buf.el (TeX-error-file): Fix spelling error. + (TeX-error): Ditto. + + * doc/install.texi (Configure): Update for Git. + + * doc/preview-readme.texi (Availability): Ditto. + + * doc/wininstall.texi: Ditto. + +2013-06-26 Tassilo Horn <tsdh@gnu.org> + + * doc/preview-problems.texi: Rename "Known problems" section to + "Known problems with preview-latex" in rawfile export. Delete + sections "Problems with Ghostscript" and "Emacs problems" because + those are basically ruled out when using the prerequisites + documented in the manual. + + * doc/install.texi: Don't link to ghostscript specific + preview-latex problems section because that has been removed. + + * doc/Makefile.in (DISTTEXTS, ../PROBLEMS.preview): Rename + PROBLEMS to PROBLEMS.preview since it only deals with + preview-latex problems. + + * Makefile.in (DISTTEXTS): Use PROBLEMS.preview instead of + PROBLEMS. + +2013-06-24 Tassilo Horn <tsdh@gnu.org> + + * doc/Makefile.in (DISTTEXTS): Add ../PROBLEMS. + + * Makefile.in (DISTTEXTS): Add PROBLEMS. + + * tex.el (TeX-evince-dbus-p): Require dbus at compile-time. + +2013-06-21 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-evince-dbus-p): Improved DBUS availability check. + +2013-06-21 Rüdiger Sonderfeld <ruediger@c-plusplus.de> + + * tex.el (TeX-doc-backend-alist): Remove unnecessary `info' check. + +2013-06-14 Tassilo Horn <tsdh@gnu.org> + + * tex-jp.el: Change to `coding: iso-2022-jp-unix'. + +2013-06-12 Tassilo Horn <tsdh@gnu.org> + + * tex-jp.el: Add `coding: iso-2022-7bit-unix' file local variable. + +2013-06-11 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-help-error): Let-bind `inhibit-read-only' when + updating the *TeX Help* buffer. + +2013-06-11 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-after-document-hook): New hook. + (TeX-arg-document): Use it. + (LaTeX-after-usepackage-hook): New hook. + (LaTeX-arg-usepackage): Use it, remove babel specific code. + + * style/babel.el: Update copyright years. + (LaTeX-env-babel-lang): New function. + ("babel"): Add `LaTeX-env-babel-lang' to + `LaTeX-after-usepackage-hook'. + +2013-06-08 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-math-close-double-dollar): Remove. + (TeX-math-close-single-dollar): Ditto. + (TeX-electric-dollar): Ditto. + (TeX-electric-math): New customizable variable, supersedes + variables above. + (TeX-insert-dollar): Adapt to `TeX-electric-math'. See + http://thread.gmane.org/gmane.emacs.auctex.devel/3070 + + * doc/auctex.texi (Quotes): Document `TeX-electric-math'. + (Environments): Document `LaTeX-find-matching-begin' and + `LaTeX-find-matching-end'. + +2013-06-02 Mosè Giordano <giordano.mose@libero.it> + + * tex-buf.el: Shorten copyright year ranges and update with + missing years. Delete trailing whitespaces. + (TeX-run-compile): Let-bind `default-directory' to + `TeX-master-directory'. + +2013-05-31 Tassilo Horn <tsdh@gnu.org> + + * autogen.sh: Set LC_ALL=C when looking into ChangeLog for + AUCTEXDATE. + +2013-05-31 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-env-figure): Simplify using `save-excursion' + instead of regexp searches. Fill the caption when + `auto-fill-mode' is on. + +2013-05-30 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-expand-list): Add new expander "%a", it returns the + quoted absolute path of the file visiting current buffer. + (TeX-view-program-list-builtin): Use "%a" expander for forward PDF + search. + +2013-05-28 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-sync-source): Fix docstring. + +2013-05-23 Mosè Giordano <giordano.mose@libero.it> + + * font-latex.el: Update copyright years, there have been + non-trivial changes in 2010, and 2011. + (font-latex-built-in-keyword-classes): Fontify Biblatex multicites + macros up to three mandatory arguments. + + * style/biblatex.el (LaTeX-biblatex-entrytype): New variable. + (LaTeX-biblatex-executebibliographyoptions-options): New variable. + (LaTeX-biblatex-language-list): New variable. + (LaTeX-arg-biblatex-cites): New function. + ("biblatex"): Always set `LaTeX-using-Biber'. Add citation + macros. + (LaTeX-biblatex-package-options-list): Move preamble options to + `LaTeX-biblatex-executebibliographyoptions-options'. + +2013-05-22 Mosè Giordano <giordano.mose@libero.it> + + * latex.el: Replace `delete-backward-char' with `delete-char'. + + * tex.el: Ditto. + + * tex-buf.el: Replace `goto-line' with `goto-char' and + `forward-line'. + +2013-05-19 Mosè Giordano <giordano.mose@libero.it> + + * doc/.gitignore: Rename from .cvsignore. + + * preview/.gitignore: Ditto. + + * preview/latex/.gitignore: Ditto. + +2013-05-18 Mosè Giordano <giordano.mose@libero.it> + + * latex.el: Update copyright years, there have been non-trivial + changes in 1998, 2001, 2002. + (TeX-arg-index-tag): Use `TeX-argument-prompt'. + (TeX-arg-cite): Ditto. + + * tex.el: Update copyright years, there have been non-trivial + changes in 1995, 1998. + (TeX-parse-arguments): Move skipping of optional + arguments inside loop over all arguments, because optional + arguments may not be the first ones. Remove unused let-bound + variable `skip-opt'. + (TeX-arg-literal): Remove FIXME comment, `optional' is the first + argument passed to all functions by `TeX-parse-argument'. + +2013-05-13 Mosè Giordano <giordano.mose@libero.it> + + * style/fancyvrb.el: New style. + + * style/xparse.el: Ditto. + + * Makefile.in (STYLESRC): Add style/fancyvrb.el and + style/xparse.el. + +2013-05-12 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-insert-dollar): Insert just a single dollar when the + point is in a verbatim-like construct. + + * font-latex.el (font-latex-jit-lock-force-redisplay): Don't rely + on existing `jit-lock-force-redisplay' because recent bzr Emacs + broke compatibility changing the number of arguments. Reported by + Robert Goldman. + +2013-05-08 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Environments): Document + `LaTeX-default-document-environment'. + +2013-05-07 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-electric-dollar): New variable. + (TeX-insert-dollar): Use it. + + * doc/auctex.texi (Quotes): Document `TeX-electric-dollar'. + +2013-04-28 Mosè Giordano <giordano.mose@libero.it> + + * tex-bar.el: Update copyright range. + (TeX-bar-LaTeX-button-alist): Change BibTeX button to Biber when + `LaTeX-using-biber' is non-nil. + (LaTeX-install-toolbar): Refresh toolbar after styles update. + +2013-04-25 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-default-document-environment): New buffer-local + variable. + (LaTeX-default-environment): Mention + `LaTeX-default-document-environment' in doc-string. + (LaTeX-environment): Use `LaTeX-default-document-environment'. + + * style/beamer.el ("beamer"): Use + `LaTeX-default-document-environment' instead of + `LaTeX-default-environment'. + + * style/letter.el ("letter"): Ditto. + + * style/slides.el ("slides"): Ditto. + +2013-04-24 Mosè Giordano <giordano.mose@libero.it> + + * style/acro.el (LaTeX-acro-acronym-history): New variable. + (LaTeX-arg-acro-acronym): Use it. + + * style/acronym.el (LaTeX-acronym-acronym-history): New variable. + (LaTeX-arg-acronym-acronym): Use it. + + * style/beamer.el (LaTeX-beamer-frametitle-history): New variable. + ("beamer"): Use it. + (TeX-arg-beamer-frametitle): Ditto. + + * style/siunitx.el (LaTeX-siunitx-unit-history): New variable. + (LaTeX-arg-siunitx-unit): Use it. + +2013-04-21 Mosè Giordano <giordano.mose@libero.it> + + * style/beamer.el ("beamer"): Set `frame' as default environment. + Set `section' as largest sectioning level. Add fontification for + `title', `author', and `date'. + + * style/letter.el ("letter"): Set `letter' as default environment. + Add some macros and fontification. + + * style/slides.el ("slides"): Set `slide' as default environment. + + * latex.el (TeX-arg-insert-braces): Move + `indent-according-to-mode' after `save-excursion' because + `LaTeX-newline' (used in `save-excursion') deletes trailing + whitespaces. + +2013-04-19 Mosè Giordano <giordano.mose@libero.it> + + * style/amsthm.el (LaTeX-amsthm-package-options): New variable. + ("amsthm"): Remove `newtheorem' macro, already defined in + `latex.el'. Use `TeX-arg-define-environment' in `newtheorem*' + macro. Add `qedhere', `swapnumbers', and `newtheoremstyle' + macros. Add `newtheorem*' regexp to match new environments. Add + fontification. + + * style/article.el ("article"): Add counters and pagestyles. + + * style/beamer.el ("beamer"): Ditto. + + * style/book.el ("book"): Ditto. + + * style/letter.el (LaTeX-letter-class-options): New variable. + ("letter"): Add pagestyles. + + * style/report.el ("report"): Add counters and pagestyles. + + * style/slides.el (LaTeX-slides-class-options): New variable. + ("slides"): Add counters and pagestyles. + +2013-04-18 Mosè Giordano <giordano.mose@libero.it> + + * style/beamer.el: Update copyright years and remove trailing + whitespaces. + ("beamer"): Run style hooks for loaded packages. + (LaTeX-beamer-class-options): New function. + + * style/hyperref.el (LaTeX-hyperref-package-options-list): Rename + from `LaTeX-hyperref-package-options' to avoid clash with the + function with the same name. + ("hyperref"): Use it. + (LaTeX-hyperref-package-options): Ditto. + +2013-04-17 Mosè Giordano <giordano.mose@libero.it> + + * plain-tex.el (plain-TeX-common-initialization): Fix typo in + abbrev table name. + +2013-04-16 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-default-author): New customizable variable. + (LaTeX-arg-author): New function. + (LaTeX-common-initialization): Use `LaTeX-arg-author' for the + \author macro. + (LaTeX-default-author): Change default to 'user-full-name (quoted) + and add a new possible value. + (LaTeX-arg-author): Change accordingly. + + * doc/auctex.texi (Itemize-like): Document `TeX-arg-item-label-p' + option. + (Tabular-like): Document `LaTeX-default-width' option. + (Modes and Hooks): Add modes and hooks to indices. + (Adding Macros): Document `TeX-arg-index-tag', `TeX-arg-index', + `TeX-arg-document', `LaTeX-arg-usepackage', `TeX-arg-bibstyle', + `TeX-arg-bibliography', `LaTeX-arg-author', `TeX-read-key-val', + and `TeX-arg-key-val' functions. Mention `TeX-arg-cite-note-p' + and `LaTeX-default-author' options. + (Adding Environments): Use in example code actually present in + `listings.el' file. + +2013-04-16 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-sync-source): Use `raise-frame' + instead of the external wmctrl command to raise the emacs frame. + +2013-04-15 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-read-key-val): Add `prompt' optional argument. + (TeX-arg-key-val): Ditto. + + * tex.el (fboundp): Use `crm-separator' as separator in XEmacs + `TeX-completing-read-multiple' implementation. + + * style/acro.el (LaTeX-arg-acro-key-val): Let-bind keymap with SPC + key binding removed, instead of defining a new key binding for + SPC. Use `TeX-arg-key-val' instead of `multi-prompt-key-value' + and `TeX-argument-insert'. + + * style/pst-node.el (LaTeX-pstnode-env-psmatrix): Replace + `completing-read-multiple' with `TeX-completing-read-multiple'. + + * style/pstricks.el (LaTeX-package-parameters): Ditto. + + * style/siunitx.el (LaTeX-arg-siunitx-unit): Let-bind keymap with + SPC key binding removed, instead of defining a new key binding for + SPC. Replace `completing-read-multiple' with + `TeX-completing-read-multiple'. + +2013-04-15 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-source-correlate-sync-source): Raise frame when + placing point on the source location. + +2013-04-12 Mosè Giordano <giordano.mose@libero.it> + + * Makefile.in (STYLESRC): Add style/acro.el and style/acronym.el. + + * style/acro.el: New style. + + * style/acronym.el: Ditto. + +2013-04-10 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-evince-sync-view): URL-escape pdf file path when + calling evince via DBUS. + (TeX-evince-sync-view): Use 0 as timestamp. + (TeX-source-correlate-sync-source): URL-decode tex file name. + +2013-04-10 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) + + * style/mathtools.el (LaTeX-mathtools-key-val-options): Fix defvar + syntax. + +2013-04-10 Jobst Hoffmann <j.hoffmann@fh-aachen.de> (tiny change) + + * style/lscape.el ("lscape"): Fix typo and parentheses. + +2013-04-09 Tassilo Horn <tsdh@gnu.org> + + * README.GIT: Rename from README.CVS; update contents to Git. + +2013-04-09 Leo Liu <sdl.web@gmail.com> + + * latex.el (LaTeX-outline-level): Make it work for customized + `outline-regexp'. See bug report + http://permalink.gmane.org/gmane.emacs.auctex.bugs/1648. + + * tex.el (TeX-view-program-list-builtin) + (TeX-view-program-selection): Enable commented code to support + darwin system. + + * tex.el (TeX-math-input-method-off-regexp): Improve and fix typo. + See bug http://permalink.gmane.org/gmane.emacs.auctex.devel/2468. + + * font-latex.el (font-latex-add-to-syntax-alist): Fix a bug in + `font-latex-add-to-syntax-alist' where it modified both the buffer + local and global value of `font-latex-syntax-alist'. + +2013-04-08 Tassilo Horn <tsdh@gnu.org> + + * latex.el (LaTeX-style-list): Correct docstring. + +2013-04-06 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-provided-class-options-member): Fix typo. + (LaTeX-arg-usepackage): Provide completion for more than one + package in mandatory argument. + +2013-04-05 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-global-class-files): New variable. + (TeX-arg-document): Provide completion for class options, based on + `LaTeX-arg-usepackage'. Use `LaTeX-global-class-files'. + (LaTeX-style-list): Mention that if `TeX-arg-input-file-search' is + set to `t' this variable will be ignored. + + * tex.el (TeX-normal-mode): Reset `LaTeX-global-class-files' when + ARG is non-nil. + + * style/article.el (LaTeX-article-class-options): New variable. + + * style/book.el (LaTeX-book-class-options): New variable. + + * style/report.el (LaTeX-report-class-options): New variable. + +2013-04-03 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-provided-class-options): New buffer-local + variable. + (LaTeX-provided-class-options-member): New function. + (LaTeX-provided-package-options): New buffer-local variable. + (LaTeX-provided-package-options-member): New function + (LaTeX-auto-cleanup): Rewrite to support + `LaTeX-provided-{class,package}-options' variables. + (LaTeX-arg-usepackage): Ditto. + + * tex.el (TeX-auto-store): Write to parsed file values of + `LaTeX-provided-{class,package}-options' variables. + (TeX-auto-insert): Fix indentation of inserted lines. + (TeX-search-files-by-type): Fix typo in doc-string. + (TeX-add-to-alist): New function. + (TeX-quote-language-alist): Fix typo in doc-string. + + * style/babel.el (LaTeX-babel-package-options): Add missing + languages. + (LaTeX-babel-package-options): Add options other than + languages. + (LaTeX-babel-active-languages): Use + `LaTeX-provided-{class,package}-options'. Loop over actually + used options instead of all babel languages. + ("babel"): Run styles of active languages. + + * style/biblatex.el ("biblatex"): Use + `LaTeX-provided-package-options-member'. + (LaTeX-biblatex-package-options): Consider the `ask' value for + 'TeX-arg-input-file-search'. + + * style/kpfonts.el ("kpfonts"): Use + `LaTeX-provided-package-options-member'. + + * style/siunitx.el: Rename `TeX-siunitx-*' functions to + `LaTeX-siunitx-*' for consistency. + ("siunitx"): Use `LaTeX-provided-package-options-member'. + +2013-03-29 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-arg-document): Search for LaTeX classes. + +2013-03-28 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el (LaTeX-biblatex-package-options): Correct name + of `TeX-read-key-val' argument. + + * latex.el (LaTeX-common-initialization): Remove `addbibresource' + macro. + + * style/biblatex.el (LaTeX-biblatex-addbibresource-options): New + variable. + (LaTeX-arg-addbibresource): New function, based on current + `TeX-arg-bibliography'. + ("biblatex"): Add `addbibresource' macro. + (LaTeX-biblatex-package-options): Use `TeX-read-key-val'. + + * latex.el (TeX-arg-bibliography): Remove `addbibresource' + support. + +2013-03-27 Mosè Giordano <giordano.mose@libero.it> + + * tex.el (TeX-add-local-master): Remove trailing spaces from + inserted lines. + +2013-03-07 Tassilo Horn <tsdh@gnu.org> + + * latex.el (TeX-read-key-val): New function. + (TeX-arg-key-val): Use `TeX-read-key-val'. + + * style/hyperref.el (LaTeX-hyperref-package-options): Use + `TeX-read-key-val' instead of `TeX-arg-key-val' which caused args + to be inserted twice. + + * style/siunitx.el (LaTeX-siunitx-package-options): Ditto. + +2013-03-06 Mads Jensen <mje@inducks.org> + + * style/amsopn.el: Add GPL copyright notice. + ("amsopn"): Add regex for \DeclareMathOperator to + `LaTeX-auto-regexp-list'. Use `TeX-arg-define-macro' for + \DeclareMathOperator. + +2013-03-06 Mads Jensen <mje@inducks.org> + + * tex.el (TeX-command-list): Add support for xindy. + +2013-03-06 Mads Jensen <mje@inducks.org> + + * latex.el (LaTeX-common-initialization): Add regular expression + for thispagestyle and pagestyle to `TeX-complete-list'. + +2013-03-04 Tassilo Horn <tsdh@gnu.org> + + * latex.el (TeX-arg-date): New function. + (LaTeX-common-initialization): Use `TeX-arg-date' for \date macro. + + * doc/auctex.texi: Document `TeX-arg-date'. + + * style/doc.el ("doc"): Use `TeX-arg-date' for the \changes macro. + +2013-02-26 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-run-style-hooks): Guard running style hooks in a + `condition-case' in order not to error in cases the auto file + contains calls to functions that are defined by a style that has + been deactivated in the meantime. + +2013-02-25 Werner Fink <werner@suse.de> + + * style/dinbrief.el ("dinbrief"): Update dinbrief style. + (LaTeX-dinbrief-insert): New macro. + (LaTeX-dinbrief-style): New function. + (LaTeX-dinbrief-env-recipient): Rename from + `LaTeX-recipient-hook'. + (LaTeX-dinbrief-sender): New function. + (LaTeX-dinbrief-recipient): New function. + (LaTeX-dinbrief-today): Rename from `LaTeX-today'. + +2013-02-25 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-parse-macro): Add TeX group characters also in math + environments if there is an active region that should probably + used as argument. + + * latex.el (LaTeX-paragraph-commands-internal): Add \clearpage and + \newpage. + + * style/scrbase.el ("scrbase"): Add \minisec macro to + `LaTeX-paragraph-commands' locally. + +2013-02-23 Mosè Giordano <giordano.mose@libero.it> + + * style/kpfonts.el: New style file. + + * Makefile.in (STYLESRC): Add style/kpfonts.el. + +2013-02-20 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-math-default): Move `digamma' and `varkappa' to + `AMS > Greek Lowercase' menu. + +2013-02-18 Mads Jensen <mje@inducks.org> + + * Makefile.in (STYLESRC): Activate new style array.el. + + * style/array.el: New style. + + * style/tabularx.el: Expand copyright range. + ("tabularx"): The package relies on the array package, so run its + style hook. + +2013-02-18 Tassilo Horn <tsdh@gnu.org> + + * tex.el (require): Require crm. + + * multi-prompt.el (multi-prompt-key-value): Don't require crm here + because it has already been required in tex.el. + +2013-02-16 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el ("biblatex"): Add hooks for loaded packages. + (LaTeX-biblatex-package-options): New function. + (LaTeX-biblatex-package-options-list): Renamed from + `LaTeX-biblatex-package-options' to avoid clash with the function + with the same name. + + * latex.el (LaTeX-search-files-type-alist): Add `bbxinputs'. + (BibLaTeX-global-style-files): New variable. + + * tex.el (BibLaTeX-style-extensions): New variable. + (TeX-normal-mode): Make ARG argument optional. + (TeX-normal-mode): Reset `BibLaTeX-global-style-files' when ARG is + non-nil. + +2013-02-14 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el (LaTeX-siunitx-package-options): New function. + + * style/hyperref.el (LaTeX-hyperref-package-options): New + function. + +2013-02-13 Mads Jensen <mje@inducks.org> + + * style/subfigure.el: Expanded copyright range. + ("subfigure"): Collapsed the two regular expressions for + completion. Added lengths, and commands for fonts. + +2013-02-14 Tassilo Horn <tsdh@gnu.org> + + * style/fancyhdr.el (TeX-arg-fancyhdr-position): Document the + OPTIONAL argument. + +2013-02-14 Mads Jensen <mje@inducks.org> + + * Makefile.in (STYLESRC): Activate new style fancyhdr.el. + + * style/fancyhdr.el: New style. + +2013-02-13 Mosè Giordano <giordano.mose@libero.it> + + * doc/auctex.texi (Quotes): Document + `TeX-math-close-single-dollar'. + (Selecting a Command): Remove reference to + `LaTeX-biblatex-use-Biber'. + (Parsing Files): Document `LaTeX-auto-index-regexp-list', + `LaTeX-auto-class-regexp-list', + `LaTeX-auto-pagestyle-regexp-list', + `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list', + `LaTeX-auto-savebox-regexp-list'. + + * tex.el (TeX-math-close-single-dollar): New variable. + (TeX-insert-dollar): Use it. + +2013-02-13 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Activate new style filecontents.el. + +2013-01-23 Mads Jensen <mje@inducks.org> + + * style/filecontents.el: New style. + +2013-02-13 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Activate new style fancynum.el. + +2013-02-08 Mads Jensen <mje@inducks.org> + + * style/fancynum.el: New style. + +2013-02-13 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Activate new style nameref.el. + +2013-02-13 Mads Jensen <mje@inducks.org> + + * doc/auctex.texi (Adding Macros): Mention that `TeX-arg-savebox' + now supports completion. + + * style/nameref.el: New style. + + * style/hyperref.el ("hyperref"): Run nameref style hook because + hyperref activates nameref. + +2013-02-10 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el ("siunitx-unit"): New type for the parser. + (LaTeX-siunitx-regexp): New variable. + (LaTeX-auto-siunitx-unit): New variable. + (LaTeX-siunitx-prepare): New function. + (LaTeX-siunitx-cleanup): New function. + (TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function. + (TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function. + (TeX-arg-siunitx-unit): New function. + (TeX-arg-define-siunitx-unit): New function. + ("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used + for parsing. + ("siunitx"): Use `TeX-arg-siunitx-unit' and + `TeX-arg-define-siunitx-unit' functions. + ("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit + macros to the list of known units. + +2013-02-08 Mosè Giordano <giordano.mose@libero.it> + + * style/biblatex.el: Update copyright range. + ("biblatex"): Check `backend' option value in + `TeX-active-styles'. + + * tex-style.el: Update copyright years. + (LaTeX-biblatex-use-Biber) Remove unused variable. + + * tex.el: Update copyright range. + (TeX-auto-add-type): Append new type to `TeX-auto-parser' instead + of prepending it. + (TeX-auto-store): Fix indentation of first lines of parsed file. + + * latex.el (LaTeX-auto-cleanup): Append options and styles to + `TeX-auto-file' instead of prepending them. + +2013-01-28 Mads Jensen <mje@inducks.org> + + * doc/todo.texi (Wishlist): Remove "Completion for sboxes". + +2013-01-27 Mads Jensen <mje@inducks.org> + + * latex.el (LaTeX-env-contents): Replaced regular expression with + `LaTeX-header-end', i.e., filecontents environments must go + somewhere in the preamble but not necessarily before the + \documentclass. + +2013-01-26 Mads Jensen <mje@inducks.org> + + * latex.el (LaTeX-auto-savebox-regexp-list): New variable. + (LaTeX-auto-regexp-list): Use `LaTeX-auto-savebox-regexp-list'. + ("savebox"): New type for the parser. + (TeX-arg-savebox): Use `LaTeX-savebox-list' for completion and + `definition' argument. + (LaTeX-common-initialization): Added makeatletter, makeatother, + and jobname macros. + (LaTeX-default-options): Changed documentstyle to documentclass in + docstring. + +2013-01-25 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el ("siunitx"): Add `\gram' and + `\SendSettingsToPgf'. + +2013-01-25 Tassilo Horn <tsdh@gnu.org> + + * tex-buf.el (TeX-output-mode): Make revert-buffer-function buffer + local before setting it to TeX-output-revert-buffer. + +2013-01-24 Ivan Andrus <darthandrus@gmail.com> + + * auctex.texi: Updated documetation about ChkTeX and lacheck. + Fixed typos. + +2013-01-24 Ivan Andrus <darthandrus@gmail.com> + + * tex-buf.el (TeX-output-revert-buffer): New function. + (TeX-special-mode, TeX-output-mode): New major modes. + (TeX-special-mode-map, TeX-output-mode-map): New variables. + +2013-01-21 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Activate new style placeins.el. + +2013-01-21 Ivan Andrus <darthandrus@gmail.com> + + * texmathp.el (texmathp-tex-commands-default): Add \shortintertext. + +2013-01-19 Mads Jensen <mje@inducks.org> + + * style/placeins.el: New style. + +2013-01-17 Tassilo Horn <tsdh@gnu.org> + + * doc/todo.texi: Remove the todo concerning completion for + counters that was implemented by Mosè Giordano on 2013-01-15. + + * doc/auctex.texi: Document `TeX-arg-length' and + `TeX-arg-define-length'. + +2013-01-16 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-auto-length-regexp-list): New variable. + (LaTeX-auto-regexp-list): Use `LaTeX-auto-length-regexp-list'. + ("length"): New type for the parser. + (TeX-arg-length): New function. + (TeX-arg-define-length): New function. + (LaTeX-common-initialization): Initialize some standard LaTeX + lengths and use `TeX-arg-length' and `TeX-arg-define-length' for + completion of some macros. + +2013-01-15 Tassilo Horn <tsdh@gnu.org> + + * doc/auctex.texi: Document that `TeX-arg-counter' does completion + now. + +2013-01-15 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-auto-pagestyle-regexp-list): Fix typo. + (LaTeX-auto-counter-regexp-list): New variable. + (LaTeX-auto-regexp-list): Use `LaTeX-auto-counter-regexp-list'. + ("counter"): New type for the parser. + (TeX-arg-counter): Use `LaTeX-counter-list' function for + completion and `definition' argument. + (TeX-arg-pagestyle): Use `definition' argument. + (LaTeX-common-initialization): Initialize counters. + +2013-01-14 Tassilo Horn <tsdh@gnu.org> + + * style/ulem.el (LaTeX-arg-fontdecl, LaTeX-arg-fontcmd): Fix + declarations. + +2013-01-13 Mads Jensen <mje@inducks.org> + + * style/pstricks.el (LaTeX-pstricks-package-options): New + variable. + + * style/varioref.el: Update copyright range. + ("varioref"): Add more definitions. + (LaTeX-varioref-package-options): Reformat. + + * style/listings.el: Update copyright range. + (LaTeX-listings-key-val-options, "listings") + (LaTeX-listings-package-options): Update to recent listings + version. + +2013-01-14 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Enable memoir.el style. + +2013-01-14 Mads Jensen <mje@inducks.org> + + * style/memoir.el: New style. + +2013-01-14 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (TeX-arg-environment): Fix typo. + +2013-01-10 Mosè Giordano <giordano.mose@libero.it> + + * latex.el: Update copyright range. + (LaTeX-auto-pagestyle-regexp-list): New variable. + (LaTeX-auto-regexp-list): Use `LaTeX-auto-pagestyle-regexp-list'. + ("pagestyle"): New type for the parser. + (LaTeX-pagestyle-list): Remove. + (TeX-arg-pagestyle): Use `LaTeX-pagestyle-list' function for + completing. + (LaTeX-common-initialization): Initialize pagestyles. + + * style/imakeidx.el: Use `LaTeX-pagestyle-list' function to set + `firstpagestyle' option values. + +2013-01-11 Ivan Andrus <darthandrus@gmail.com> + + * tex.el (TeX-command-list): Add command to run ChkTeX. + +2013-01-11 Tassilo Horn <tsdh@gnu.org> + + * Makefile.in (STYLESRC): Add new style files kantlipsum.el, + lipsum.el, and longtable.el. + +2013-01-10 Mosè Giordano <giordano.mose@libero.it> + + * style/kantlipsum.el: New style. + + * style/lipsum.el: Ditto. + + * style/longtable.el: Ditto + +2013-01-10 Mads Jensen <mje@inducks.org> + + * latex.el (LaTeX-env-document): Only insert \documentclass in + case the document does not already contain one. + +2013-01-09 Ralf Angeli <angeli@caeruleus.net> + + * style/epigraph.el ("epigraph"): Do not quote list entries for + `font-latex-add-keywords'. + +2013-01-07 Ralf Angeli <angeli@caeruleus.net> + + * style/mathtools.el ("mathtools"): Prevent amsmath options from + being added multiple times. + + * style/footmisc.el ("footmisc"): Remove fontification settings + for length macros. + +2013-01-06 Ralf Angeli <angeli@caeruleus.net> + + * style/mathtools.el ("mathtools"): Append amsmath options to + mathtools option after the amsmath style file has been loaded. + Remove `function' wrapper. + +2013-01-05 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (STYLESRC): Activate new style files. + + * ChangeLog: Move name of style file contributors to head of + ChangLog entries. + +2013-01-02 Tassilo Horn <tsdh@gnu.org> + + * style/everysel.el: Fix typos. + +2013-01-02 Mads Jensen <mje@inducks.org> + + * style/afterpage.el: New style. + +2012-12-30 Mosè Giordano <giordano.mose@libero.it> + + * latex.el (LaTeX-pagestyle-list): New variable. + (TeX-arg-pagestyle): Use it. + + * style/imakeidx.el: New style. + +2012-12-29 Ikumi Keita <ikumi@ikumi.que.jp> + + * doc/tex-ref.tex: Fix apparent errors and add keybind entries for + C-c ? and `:' (in math mode). + +2012-12-28 Mads Jensen <mje@inducks.org> + + * style/multirow.el: New style. + +2012-12-27 Mosè Giordano <giordano.mose@libero.it> + + * style/siunitx.el (LaTeX-siunitx-package-options): New variable. + ("siunitx"): Use it. + + * style/hyperref.el (LaTeX-hyperref-href-options): New variable. + (LaTeX-hyperref-package-options, "hyperref"): Use it. + +2012-12-27 Mads Jensen <mje@inducks.org> + + * style/mflogo.el: New style. + + * style/epigraph.el: Ditto. + +2012-12-27 Ikumi Keita <ikumi@ikumi.que.jp> + + * amsmath.el ("amsmath"): Add support for the alignedat + and subarray environments. Also, add support for the shoveright + and shoveleft macros. + * font-latex.el (font-latex-math-environments): Add "xxalignat" + and "flalign". + +2012-12-26 Mads Jensen <mje@inducks.org> + + * style/lscape.el: New style. + + * style/amssymb.el: Ditto. + + * style/ragged2e.el: Ditto. + + * style/mathtools.el: Ditto. + + * style/everysel.el: Ditto. + + * style/bigstrut.el: Ditto. + + * style/bigdelim.el: Ditto. + +2012-12-25 Mads Jensen <mje@inducks.org> + + * style/ulem.el: New style. + +2012-12-25 Ikumi Keita <ikumi@ikumi.que.jp> + + * latex.el (LaTeX-math-default): Added unicode character position + to some entries and "mathring" entry. + (LaTeX-common-initialization): Added support for accent macros + \hat, \dot etc and \textasteriskcentered. + +2012-12-24 Mads Jensen <mje@inducks.org> + + * style/footmisc.el: New style. + +2012-12-21 Mosè Giordano <giordano.mose@libero.it> + + * style/bm.el: New style. + + * style/siunitx.el: Ditto. + +2012-12-20 Tassilo Horn <tsdh@gnu.org> + + * tex-bar.el (TeX-bar-LaTeX-buttons, TeX-bar-LaTeX-button-alist): + Also add spell button. + + * images/spell.xpm: New image, copied from Emacs. + + * tex-bar.el (TeX-bar-TeX-button-alist): Use it for the spell + button. + +2012-12-20 Tassilo Horn <tsdh@gnu.org> + + * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-TeX-buttons): Add + `spell' button to run spell-checker. + +2014-05-23 Tassilo Horn <tsdh@gnu.org> + + * texmathp.el (texmathp-tex-commands-default): Recognize + \\shortintertext from mathtools. + +2014-05-16 Stefan Monnier <monnier@iro.umontreal.ca> + + * tex-site.el (TeX-modes-set): Use advice-add if available. + * font-latex.el (font-latex-make-sectioning-faces): Don't rely on + dynamic scoping for `num'. + (font-latex-make-built-in-keywords): Don't use `eval' needlessly. + (font-latex-doctex-syntactic-keywords): Declare before first use. + (font-latex-match-command-with-arguments): + Stay away from `add-to-list' on let-bound variables. + (font-latex-match-command-in-braces): Remove unused var `end'. + +2012-12-04 Tassilo Horn <tsdh@gnu.org> + + Merge revno 314 (Stefan Monnier) from emacs elpa branch: Shorten + copyright year ranges. + + * context.el: + + * doc/auctex.texi: + + * doc/changes.texi: + + * doc/install.texi: + + * font-latex.el: + + * latex.el: + + * style/letter.el: + + * tex-fold.el: + + * tex-jp.el: + + * tex.el: + +2012-11-30 Ralf Angeli <angeli@caeruleus.net> + + * Version 11.87 released. + +2012-11-30 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-evince-dbus-p): Make last change a little more + conventional. + +2012-11-30 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-evince-dbus-p): Check for feature emacs in order not + to signal an error on XEmacs. + +2012-11-29 Ralf Angeli <angeli@caeruleus.net> + + * RELEASE, configure.ac, doc/auctex.texi, doc/changes.texi, + doc/install.texi, doc/tex-ref.tex: Update for upcoming release. + +2012-11-26 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-split-bibs): Add doc string and use variable for + Biber file extensions. + (LaTeX-search-files-type-alist): Add entry for Biber. + (BibTeX-Biber-global-files): Remove. + (BibTeX-global-files): Reintroduce. + (TeX-Biber-global-files): New variable. + (TeX-arg-bibliography): Check if Biber or BibTeX is used and react + accordingly. + + * tex-buf.el (TeX-check-files): Do not check duplicate extensions. + (TeX-command-query, TeX-LaTeX-sentinel): Use separate variables + for BibTeX and Biber file extensions. + (TeX-synchronous-sentinel): Use `let' instead of `let*'. + + * tex.el (TeX-clean-default-intermediate-suffixes): Add suffixes + for biblatex. + (TeX-auto-generate, TeX-auto-generate-global): Use separate + variables for BibTeX and Biber file extensions. + (TeX-Biber-file-extensions): New variable. + (BibTeX-Biber-file-extensions): Remove. + (BibTeX-file-extensions): Reintroduce. + (TeX-search-files-type-alist): Use `BibTeX-file-extensions'. + (TeX-normal-mode): Use separate variables for BibTeX and Biber + global files. + +2012-07-17 Vincent Belaïche <vincentb1@users.sourceforge.net> + + * tex-info.el (Texinfo-reftex-hook): Add function. + (TeX-texinfo-mode): Add RefTeX plugging. + +2012-11-23 Tassilo Horn <tsdh@gnu.org> + + * doc/quickstart.texi (Quick Start): Document that one mustn't + load auctex.el if AUCTeX is installed from ELPA. + + * doc/install.texi (Installation): Mention installation from ELPA. + +2012-11-20 Davide G. M. Salvetti <salve@debian.org> + + * doc/tex-ref.tex (column{preview-latex}): Fix typo. Reported by + Sébastien Villemot. Update copyright information. + +2012-11-14 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-auto-regexp-list): Remove entries for Biber. + (LaTeX-biber): Remove. + (LaTeX-listify-package-options): Rewrite so that the function can + deal with key=value pairs. + (LaTeX-always-use-Biber): Remove. + (LaTeX-using-Biber): Add doc string and make buffer-local. + + * tex-style.el (LaTeX-biblatex-use-Biber): New variable. + + * doc/auctex.texi (top): Remove reference to + `LaTeX-always-use-Biber'. + (Selecting a Command): Mention Biber and + `LaTeX-biblatex-use-Biber'. + + * Makefile.in (STYLESRC): Add style/biblatex.el. + + * style/biblatex.el: New file. + +2012-11-05 Tassilo Horn <tsdh@gnu.org> + + * tex.el (TeX-doc-extensions): Fix typo. This variable was + formerly named TeX-doc-extenstions. + +2012-10-04 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-jp.el: Repair coding from iso-2022-7bit to iso-2022-jp. + +2012-10-03 Ralf Angeli <angeli@caeruleus.net> + + * tex-jp.el: Repair coding. + +2012-10-02 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-jp.el (japanese-TeX-engine-default) + (TeX-engine-alist-builtin, japanese-TeX-use-kanji-opt-flag): + New defcustoms. + (japanese-TeX-coding-ejsu, japanese-TeX-get-encoding-string): + New functions. + (japanese-TeX-command-list): Support %(kanjiopt). + (TeX-expand-list): Support new option kanjiopt, bibtex, makeindex, + mendexkopt, xdvi. + (TeX-view-predicate-list-builtin): Judge paper. + (TeX-view-program-list): Support dviout paper size, and other DVI + previewers in Mac and others. + (TeX-view-program-selection): Add Dviout, TeXworks and Preview. + (LaTeX-command-style): Support uplatex. + (japanese-plain-tex-mode-initialization): Use TeX-engine-set. + (japanese-latex-mode-initialization): Ditto. + + * tex-jp.el: Comment fix. + (TeX-error-description-list): Doc fix. + +2012-09-27 Joost Kremers <joostkremers@fastmail.fm> (tiny change) + + * tex-buf.el (TeX-check-files): Use mapcar instead of cl's map. + +2012-09-16 Philip Kime <Philip@kime.org.uk> (tiny change) + + * tex-buf.el (TeX-LaTeX-sentinel): Detect generic rerun message + from biblatex + +2012-09-14 Ken Brown <kbrown@cornell.edu> (tiny change) + + * doc/auctex.texi (top): Mention LaTeX-always-use-Biber. + + * doc/tex-ref.tex: Add Biber. + +2012-09-13 Tassilo Horn <tsdh@gnu.org> + + Merge Biber support developed by Philip Kime + <philkime@kime.org.uk>. + * doc/changes.texi: Mention Biber support. + + * tex.el (TeX-command-list, TeX-auto-generate) + (TeX-auto-generate-global, TeX-search-files-type-alist) + (TeX-normal-mode): Adapt. + (TeX-command-Biber): New defcustom. + (BibTeX-Biber-file-extensions): Rename from + BibTeX-file-extensions. + + * tex-buf.el (TeX-save-document, TeX-check-files) + (TeX-command-query, TeX-LaTeX-sentinel): Adapt. + (TeX-Biber-sentinel, TeX-run-Biber): New functions. + + * latex.el (LaTeX-auto-regexp-list, LaTeX-auto-cleanup) + (TeX-arg-bibliography, LaTeX-common-initialization): Adapt. + (LaTeX-biber, LaTeX-split-bibs, LaTeX-using-Biber) + (LaTeX-always-use-Biber): New functions and vars. + (BibTeX-Biber-global-files): Rename from BibTeX-global-files. + + * font-latex.el (font-latex-built-in-keyword-classes) + (font-latex-add-keywords): Adapt. + +2012-06-21 Patrice Dumas <pertusus@free.fr> (tiny change) + + * doc/preview-latex.texi (The preview images): Place index command + `@pindex dvipng' on a line of its own. + + * doc/macros.texi: Replace user macro `@sans' by user macro + `@sansserif' and make definition conditional against flag + no-sansserif as `@sansserif' is a Texinfo macro and does not need + to be redefined. + + * doc/macros.texi: Suppress user macro `@LaTeX' as this macro is + already defined in Texinfo. + + * doc/quickstart.texi (Editing Facilities): Use texinfo + `@sansserif' macro rather than user macro `@sans'. + + * doc/auctex.texi (Font Specifiers): Use texinfo `@sansserif' + macro rather than user macro `@sans'. + +2012-08-14 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-determine-method): Match --synctex + as well as -synctex. + +2012-07-04 Tassilo Horn <tassilo@member.fsf.org> + + * doc/changes.texi: Mention Evince forward/backward search + changes. + +2012-07-03 Tassilo Horn <tassilo@member.fsf.org> + + * font-latex.el (byte-code-function-p): Reference the generated + functions with font-latex-match prefix. See Emacs bug 11837. + +2012-06-22 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-evince-dbus-p): Add check for + `dbus-register-signal', which might be unavailable if emacs was + configured with --without-dbus. + +2012-04-26 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-engine-set): Fix docstring leading to a misplaced + interactive spec warning. + +2012-04-25 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-evince-dbus-p): Improve check for emacs's dbus + support. + +2012-04-11 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-evince-sync-view): Work around emacs integer limits. + Also provide the current column to Evince. + (TeX-evince-dbus-p): Also check the signature of Evince's + FindDocument DBUS method, which is only stable since evince 3.0. + +2012-04-10 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-evince-sync-view): Fix arithmetic range error. + (TeX-evince-dbus-p): Add parameter to extend the check depending + on wanted features (e.g., forward search). + (TeX-view-program-list-builtin): Use it. + +2012-04-08 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-evince-dbus-p): New function. + (TeX-evince-sync-view): New function. + (TeX-view-program-list-builtin): Use Evince's DBUS interface for + forward search if available. + (TeX-source-correlate-mode): Use TeX-evince-dbus-p. + +2012-01-11 Ralf Angeli <angeli@caeruleus.net> + + * style/setspace.el ("setspace"): Correct quoting. + +2011-09-18 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Marking): Make a few corrections throughout the + section. + (Adding Macros): Document special values for numbers used together + with `TeX-add-symbols'. + +2011-09-18 Vincent Belaïche <vincentb1@users.sourceforge.net> + + * doc/auctex.texi: Add documentation for functions + LaTeX-mark-section, LaTeX-mark-environment, Texinfo-mark-section, + Texinfo-mark-environment and Texinfo-mark-node. + +2011-08-24 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-synctex-output-page): TeXLive 2011's synctex wants + absolute file names with dot indicating the master, like + /foo/bar/./baz/chap1.tex. So add this as another variant. + (TeX-view-program-list-builtin): Use evince's -i,--page-index + switch instead of -p,--page-label if that evince version supports + it (>=3.0.x). + +2011-08-07 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-move-to-break-point): Take characters after + closing dollar sign into account when deciding to break before + inline math. + +2011-07-12 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-search-files-kpathsea): Check if directories are + accessible. + +2011-07-11 Vincent Belaïche <vincentb1@users.sourceforge.net> + + * tex-info.el (Texinfo-mark-environment, Texinfo-mark-section) + (Texinfo-mark-node): New defun. + (Texinfo-mode-map): added key bindings for + Texinfo-mark-environment, Texinfo-mark-section, and + Texinfo-mark-node. + +2011-06-19 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-engine-alist-builtin): Add --jobname to luatex and + lualatex calls. + (TeX-engine-alist-builtin): Remove --jobname again for luatex but + not for lualatex. + +2011-06-05 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-source-correlate-sync-source): Restore Emacs 21 + compatibility. + +2011-05-26 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-source-correlate-sync-source): Adapt to handle + file:// URLs. + +2011-05-15 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (STYLESRC): Add style/setspace.el. + + * tex.el (TeX-expand-list): Add a safeguard to the %(outpage) + expander for when an output page function returns nil. + +2011-05-09 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-synctex-output-page-1): New function for calling + synctex. + (TeX-synctex-output-page): Use it, and try relative file names + with and without leading ./ when calling synctex before falling + back to page 1. + (TeX-source-correlate-sync-source): Add &rest parameter, because + Evince 3 sends an additional (ignored) parameter via dbus. + +2011-05-01 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-tree-expand): Use a different test to check for an + absolute path on Windows. + + * font-latex.el (font-latex-built-in-keyword-classes): + Add definition for \rule and remove the one for \sbox. + +2011-04-25 Ralf Angeli <angeli@caeruleus.net> + + * style/setspace.el: Add support for changing \displayskipstretch. + +2011-04-25 Mads Jensen <mje@inducks.org> + + * style/setspace.el: New file. + +2011-04-25 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-style-list): Add memoir. + +2011-04-20 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-expand-spec): Make sure the expansion of a + placeholder is not processed again. + +2011-04-15 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-built-in-keyword-classes): Make a few + additions and corrections. + + * latex.el (LaTeX-common-initialization): Prompt for file + extension instead of name when inserting \addcontentsline or + \addtocontents. + +2011-04-10 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-mode): Check for D-Bus session. + +2011-04-10 Antoine Levitt <antoine.levitt@gmail.com> (tiny change) + + * tex.el (TeX-source-correlate-sync-source): Do not use + `goto-line'. + +2011-04-03 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (STYLESRC): Add style/xspace.el. + + * style/xspace.el: Add copyright notice and license blurb. + Correct a few things. + +2011-04-03 Mads Jensen <mje@inducks.org> + + * style/xspace.el: New file. + +2011-03-27 Tassilo Horn <tassilo@member.fsf.org> + + * tex.el (TeX-source-correlate-mode): Add support for I/O + correlation mode inverse search for the Evince document viewer. + +2011-03-23 Ralf Angeli <angeli@caeruleus.net> + + * style/bulgarian.el, style/czech.el, style/danish.el, + style/frenchb.el, style/icelandic.el, style/polish.el, + style/polski.el, style/slovak.el, style/swedish.el: Do not set + `TeX-quote-language' if `override' is in effect. + +2011-03-20 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-synchronous-sentinel): Strip directory part of + master file because we are already in the master directory. + +2011-03-13 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (STYLESRC): Add style/lettrine.el and + style/multicol.el. + + * style/lettrine.el: Add copyright notice and license blurb. + Correct a few things. + + * style/multicol.el: Add copyright notice and license blurb. + Simplify environment definitions. Provide completion for lengths + the package defines. Get rid of indentation and filling barrier. + Remove fontification definitions. + +2011-03-13 Mads Jensen <mje@inducks.org> + + * style/lettrine.el: New file. + + * style/multicol.el: New file. + +2011-02-27 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-common-initialization): Add support for + \ProvidesPackage. + +2011-02-06 Ralf Angeli <angeli@caeruleus.net> + + * style/letter.el (LaTeX-env-recipient): Use \renewcommand instead + of \def to set date. + +2011-01-30 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-parse-macro): Do not insert braces if the argument + is 0 or less. + (TeX-parse-argument): Put both the macro and the marked region in + a TeX group if the argument is less than 0. + + * latex.el (LaTeX-common-initialization): Give macros that change + font size a -1 argument so that braces are added around them if + if there is an active region. + + * doc/auctex.texi (Adding Macros): Document special options 0 and + -1 for number-type specs. + +2011-01-29 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-complete-symbol): Get rid of the window with the + completions when possible. + +2011-01-23 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-post-command): Add `forward-char' and + `backward-char' to commands on which to open an overlay. + + * doc/auctex.texi (Adding Macros): + Mention `TeX-arg-input-file-search'. + +2011-01-22 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-tree-expand): Make `subdirs' parameter optional. + Do not try to call kpsewhich with --expand-braces anymore and adapt + code for handling of results accordingly. + (TeX-doc-extenstions): New variable. + (TeX-tree-roots): New function. + (TeX-tree-roots): New user option. + (TeX-kpathsea-format-alist): Remove. + (TeX-search-files-kpathsea): Add and use `extensions' and `scope' + parameters. + (TeX-search-files): Do not call `TeX-search-files-kpathsea' + anymore. + (TeX-search-files-type-alist): New variable. + (TeX-search-files-by-type): New function. + + * latex.el (LaTeX-arg-usepackage): Let-bind + `TeX-input-file-search'. + (LaTeX-search-files-type-alist): New user option. + (TeX-arg-input-file-search): Doc fix. + (TeX-arg-input-file, TeX-arg-bibstyle, TeX-arg-bibliography): + Use `TeX-search-files-by-type' instead of `TeX-search-files'. + (LaTeX-common-initialization): Set `TeX-search-files-type-alist'. + +2011-01-09 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-common-initialization): Add support for + \settoheight and \settodepth. + +2010-12-26 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Simple Style): Add a note about the naming of + the style file and the style hook. + +2010-12-12 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-env-args): Add the optional argument at the + right position when wrapping the environment around existing text. + +2010-12-05 Ralf Angeli <angeli@caeruleus.net> + + * context.el: Set up abbrev table. + (ConTeXt-mode-common-initialization): Set `local-abbrev-table'. + + * latex.el: Set up abbrev table for LaTeX and docTeX mode. + (docTeX-mode): Set abbrev table. + (LaTeX-common-initialization): Set `local-abbrev-table'. + + * plain-tex.el: Set up abbrev table. + (plain-TeX-common-initialization): Set `local-abbrev-table'. + + * tex.el (TeX-mode-prefix): Add mode parameter. + (VirTeX-common-initialization): Do not set `local-abbrev-table' + anymore. + (TeX-abbrev-mode-setup): New function. + + * doc/changes.texi: Mention change of abbrev handling. + +2010-12-04 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-verbatim-macro-boundaries): Support verbatim + macros with braces. + +2010-12-04 Augusto Ritter Stoffel <arstoffel@inf.ufrgs.br> (tiny change) + + * latex.el (LaTeX-math-keymap): Define a key for the math prefix + only if it has not been used as a prefix after the prefix. + +2010-11-16 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-view-program-list-builtin): Add Okular. + +2010-10-17 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (TeX-arg-input-file-search): New user option. + (TeX-arg-input-file): Use it. + +2010-10-11 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-synctex-output-page): Return "1" if no page number + can be found to prevent an infinite loop in command expansion. + +2010-10-02 Ralf Angeli <angeli@caeruleus.net> + + * style/beamer.el ("beamer"): Prompt for block title. + +2010-09-28 Ralf Angeli <angeli@caeruleus.net> + + * context.el (ConTeXt-extra-paragraph-commands): Remove. + (ConTeXt-language-variable-list): + Add `ConTeXt-extra-paragraph-commands'. + + * context-en.el (ConTeXt-extra-paragraph-commands-en): + New variable. + + * context-nl.el (ConTeXt-extra-paragraph-commands-nl): + New variable. + +2010-09-18 Ralf Angeli <angeli@caeruleus.net> + + * context.el (ConTeXt-expand-options): Eval value from engine + alist. + +2010-09-12 Ralf Angeli <angeli@caeruleus.net> + + * tex-fptex.el: Remove. + + * Makefile.in (AUCSRC): Reflect removal of tex-fptex.el. + + * doc/wininstall.texi: Reflect removal of tex-fptex.el. + + * style/virtex.el: Mention author. Do not unnecessarily protect + `lambda' with `function'. + + * font-latex.el (font-latex-keyword-matcher): Refine last change + to work properly with lists of face symbols. + +2010-09-11 Ralf Angeli <angeli@caeruleus.net> + + * style/natbib.el: Update copyright information. + + * style/letter.el: Update copyright information. + + * style/harvard.el: Update copyright information. + + * style/doc.el: Do not unnecessarily protect `lambda' with + `function'. + +2010-09-06 Arne Jørgensen <arne@arnested.dk> + + * style/danish.el: Changed font-latex-add-quotes from french to + german. + +2010-08-30 Ralf Angeli <angeli@caeruleus.net> + + * style/ngerman.el: Prevent "| from leading to color bleed. + + * style/german.el: Prevent "| from leading to color bleed. + +2010-08-29 Ralf Angeli <angeli@caeruleus.net> + + * doc/preview-dtxdoc.pl: Use explicit variable with split instead + of implicit split to @_ which does not work anymore in Perl 5.12. + +2010-07-11 Ralf Angeli <angeli@caeruleus.net> + + * tex-info.el: Delete trailing whitespace. + +2010-07-04 Ralf Angeli <angeli@caeruleus.net> + + * doc/faq.texi: Update infos about Emacs versions. Add FAQ entry + for file:line:error messages in case `TeX-next-error' fails due to + unbalanced parens. + + * tex.el (TeX-print-command, TeX-queue-command) + (TeX-printer-list): Switch back to Berkeley-style commands. + +2010-06-24 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Texinfo mode): Make a few corrections. + +2010-06-19 Berend de Boer <berend@pobox.com> + + * context.el: proper indent of all macros that can appear inside + an itemize list such as \sym. + +2010-06-12 Ralf Angeli <angeli@caeruleus.net> + + * tex-info.el (Texinfo-find-env-end, Texinfo-find-env-start): + Enable the commands to be used repeatedly without getting stuck at + an environment start or end respectively. + +2010-05-27 Ralf Angeli <angeli@caeruleus.net> + + * autogen.sh: Set LANG=C when looking into ChangeLog for + AUCTEXDATE. + +2010-05-24 Vincent Belaïche <vincent.belaiche@gmail.com> + + * doc/auctex.texi (Texinfo mode): New section. + +2010-05-17 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-math-input-method-off-regexp): Fix regexp. + +2010-04-25 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-print-command): Support printing of Postscript and + PDF files. Doc fix. + (TeX-queue-command): Use lpstat instead of lpq. Doc fix. + (TeX-printer-list): Support printing of Postscript and PDF files. + Make use of System V style commands (lp, lpstat) instead of + Berkeley style (lpr, lpq). + (TeX-printer-default): Doc fix. + +2010-04-17 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-warning): Throw an error with a sensible message + if the file for the warning could not be determined. + +2010-04-13 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-format-filter): Calculate the current column as + difference between line start and end instead of using + `current-column' in order to do the right thing when octal codes + are present. + +2010-04-11 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-keyword-matcher): Quote a list of face + properties but do not to quote a face symbol. + +2010-04-05 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-parse-error): Allow `TeX-error-file' to become + empty. + +2010-03-28 Ralf Angeli <angeli@caeruleus.net> + + * plain-tex.el: New file. + + * tex.el: Move code related to plain TeX to plain-tex.el. + + * Makefile.in (AUCSRC): Add plain-tex.el. + + * context.el: Require `plain-tex'. + +2010-03-27 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-view-program-selection): Doc fix. + (TeX-clean): Regexp-quote the master file name. + +2010-03-20 Ralf Angeli <angeli@caeruleus.net> + + * style/french.el: New file. + + * Makefile.in (STYLESRC): Add style/french.el. + +2010-03-07 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (TeX-arg-key-val): Hint at key=value format in prompt. + (LaTeX-fill-region-as-para-do): Match whitespace without comment + starter at beginning of line when dealing with code comments. + +2010-03-06 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (DIST_PREFIX): Use the working directory for the + folder with distribution files. + (FTPDIR, WWWDIR): Make them subdirectories of `DIST_PREFIX'. + (COMMITTER_NAME, COMMITTER_EMAIL): Remove. + (COMMITTER): New variable. + (.PHONY): Update. + (tar-ball-clean): Use `check-tag'. + (check-tag): New name for `check-dist'. + (dist): Do not call `release-commit' anymore. + (snapshot): Now an alias for `dist'. + (release-commit): Use `COMMITTER'. + (release-sign): New name for `full-release' target. + Generate version 1.1 directive files. + (xemacs-package): Depend on `check-tag'. + (WPACKAGEFILES): Include info files with a numerical supplement to + the .info extension. Depend on `check-tag'. Check for presence + of `WEMACSVER' variable. Try to find a local AUCTeX tar ball + before downloading one. Use `TAG' instead of `WAUCVER'. Put ZIP + archive into `FTPDIR'. + (WAUCVER, WEMACSVER): Remove. + (release-upload): New target. + (www-doc): Depend on `check-tag'. Update URLs for Emacs manuals. + +2010-02-21 Ralf Angeli <angeli@caeruleus.net> + + * Version 11.86 released. + +2010-02-21 Ralf Angeli <angeli@caeruleus.net> + + * RELEASE: Update for upcoming release. + + * doc/install.texi (Prerequisites): Update information about Emacs + distributions. + + * doc/tex-ref.tex: Bump version number. Update section on TeXing + options. + + * configure.ac: Bump version number. + + * auctex.spec (Version): Bump version number. + + * doc/fdl.texi: Switch to GFDL 1.3. + + * doc/auctex.texi: Switch to GFDL 1.3. + + * doc/preview-latex.texi: Switch to GFDL 1.3. + + * doc/changes.texi: Update for next release. + +2010-02-20 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc): Add a fallback in case nothing is found via + the backend list, e.g. when using MiKTeX 2.8. + + * doc/auctex.texi (Documentation): Document change in `TeX-doc'. + +2010-02-14 Ralf Angeli <angeli@caeruleus.net> + + * doc/changes.texi: Mention preview.sty supporting XeTeX. + +2010-02-13 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-XeTeX-command, LaTeX-XeTeX-command): Remove. + (ConTeXt-engine): Doc fix. + (ConTeXt-Omega-engine): Doc fix. Make obsolote. + (TeX-expand-list): Add support for LuaTeX. Adapt to new engine + handling. + (AUC-TeX-version, AUC-TeX-date): Remove. + (TeX-engine-alist-builtin): New variable. + (TeX-engine-alist): Adapt to new engine handling and make it a + defcustom. + (TeX-engine-alist): New function. + (TeX-engine): Adapt to new engine handling and make it + buffer-local. + (LaTeX-engine-alist): Remove. + (TeX-engine-set): Adapt to new engine handling and take care of + TeX PDF mode. + (TeX-clean-default-output-suffixes): Add .xdv. + (TeX-mode-specific-command-menu-entries): Construct list of + engines from `TeX-engine-alist'. + + * context.el (ConTeXt-expand-options): Adapt to new engine + handling. + + * doc/auctex.texi (Processor Options): Document options and + functions of new engine handling. + +2009-12-30 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-view-command-raw): Abort if no matching viewer is + found. + + * doc/preview-faq.texi (Troubleshooting): Add some hints about + preview-latex overwriting output files. + +2009-12-28 Ralf Angeli <angeli@caeruleus.net> + + * style/austrian.el: New file. + + * style/naustrian.el: New file. + + * Makefile.in (STYLESRC): Add style/austrian.el and + style/naustrian.el. + +2009-12-26 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Known problems): New subsection on dealing with + font locking problems. + + * font-latex.el (font-latex-syntax-alist): New variable. + (font-latex-add-to-syntax-alist): New function. + (font-latex-setup): Use `font-latex-syntax-alist'. + + * style/shortvrb.el: New file. + + * Makefile.in (STYLESRC): Add style/shortvrb.el. + + * tex-style.el (LaTeX-shortvrb-chars): New variable. + + * doc/changes.texi: Document changes after 11.85. + + * context.el (ConTeXt-expand-options): Check for XeTeX engine, not + for mode which does not exist anymore. + + * tex.el (plain-TeX-common-initialization): Let commented lines be + matched by `paragraph-separate' in order for commented and + non-commented paragraphs to be filled separately. + +2009-12-12 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-parse-error): Also find quoted file names with + newlines. Remove the newlines from the matched string if + necessary. + +2009-12-07 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-parse-error): Add an alternative in the parser + regexp for quoted file names. Strip the quotation marks if a file + name was found with the alternative. + +2009-12-06 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-command-prefix): New variable. + (TeX-fold-mode): Use it. + (TeX-fold-keymap): Remove prefix strings. + + * tex.el (TeX-fold-menu): Remove hard-coded key binding labels. + + * doc/auctex.texi (Folding): Mention `TeX-fold-command-prefix'. + +2009-11-22 Ralf Angeli <angeli@caeruleus.net> + + * doc/wininstall.texi: Do not refer to Emacs 22 anymore. + Improve the paragraphs about PNG support. + +2009-11-01 Ralf Angeli <angeli@caeruleus.net> + + * style/pstricks.el: Disable key bindings for macro parameter + addition and change. + (LaTeX-pst-color-list, LaTeX-pst-boolean-list) + (LaTeX-pst-fillstyle-list): Remove information for completion + mechanism. + (LaTeX-pst-trimode-list, LaTeX-pst-linestyle-list): Remove. + Handled directly in `LaTeX-pst-basic-parameters-list'. + (LaTeX-pst-basic-parameters-list): New variable. + (LaTeX-pst-parameters): Call `TeX-arg-key-val' instead of + `LaTeX-package-parameters' and thereby use a different completion + mechanism. + (LaTeX-pst-macro-psdots): Do not add a dotstyle parameter. + (LaTeX-pst-env-pspicture): Handle optional parameter via + `multi-prompt-key-value'. + ("pstricks"): Handle arguments of \psdot and \psdots correctly. + +2009-10-31 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-verbatim-p-function): New variable. + (TeX-verbatim-p): New function. + (TeX-in-comment): Use it. + (TeX-brace-count-line): Use `TeX-in-comment' instead of just + checking for a comment character. + + * latex.el (LaTeX-common-initialization): + Set `TeX-verbatim-p-function'. + +2009-10-25 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Starting Viewers): Describe new viewer + selection options. + (Folding): Add some hints on how to do automatic folding. + + * tex.el (TeX-view-predicate-list-builtin) + (TeX-view-predicate-list, TeX-view-program-list): Doc fix. + (TeX-view-program-list-builtin, TeX-view-program-selection): + Conditionalize default value based on system type. Doc fix. + (TeX-synctex-output-page): Do not return random stuff if there was + no match. + (TeX-clean-default-intermediate-suffixes): Remove SyncTeX files as + well. + +2009-10-21 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-synctex-output-page): Handle files in subdirectories + correctly. + +2009-10-18 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-run-discard): Doc fix. + (TeX-run-discard-or-function): New function. + + * tex.el (TeX-command-list): Use `TeX-run-discard-or-function' as + hook for View command and provide it as a customization option. + (TeX-view-program-list): Add the possibility to use a function to + call the viewer. + (TeX-view-command-raw): Support the use of a function to call the + viewer. + +2009-10-11 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-view-predicate-list-builtin): Remove combined + predicates for paper properties and add new predicates testing + only one property. + (TeX-view-program-list-builtin): Use new predicates. + (TeX-view-program-list): Provide the possibility to use a list of + predicates. + +2009-10-10 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-view-program-list): Shave off extra closing paren. + +2009-10-04 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (LaTeX-command-style, TeX-print-style, TeX-view-style): + Doc fix. + (TeX-view-predicate-list-builtin, TeX-view-program-list-builtin): + New variables. + (TeX-view-predicate-list, TeX-view-program-list) + (TeX-view-program-selection): New user options. + (TeX-match-style, TeX-view-match-predicate) + (TeX-view-command-raw): New functions. + (TeX-expand-list): Use `TeX-view-command-raw' for %V expander. + +2009-09-13 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-error): Cater for case of file:line:error + messages without context. + (TeX-parse-error): Add support for quoted file names with + backslashes as path separators. Those might be emitted by MiKTeX + 2.8. + +2009-06-14 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Indenting): Mention `LaTeX-item-regexp'. + (Fontification of math): New section replacing and extending + `Subscript and superscript'. + +2009-04-26 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-mode): Clean `custom-requests' + property. + (VirTeX-common-initialization): Call `TeX-source-correlate-mode' + minor mode function when initializing the mode instead of when + loading the file. + +2009-04-13 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (TeX-arg-key-val): Eval `key-val-alist' argument if it + is a symbol. + + * style/listings.el ("listings"): Do not eval arguments of + `TeX-arg-key-val'. + + * multi-prompt.el (multi-prompt-expand-completion-table): + New function. + (multi-prompt-key-value): Use it. + + * style/pstricks.el: Correct header info. + (LaTeX-pst-input-int, LaTeX-pst-point, LaTeX-pst-angle) + (LaTeX-pst-extdir, LaTeX-pst-arrows, LaTeX-pst-dotstyle-list) + (LaTeX-pst-refpoint-list, LaTeX-pst-refpoint) + (LaTeX-pst-macro-multirputps, LaTeX-pst-env-pspicture): Improve or + correct prompt. + ("pstricks"): Move to the bottom of the file. Do not use + `function' to quote `lambda'. Turn off TeX PDF mode. Use `mapc' + instead of `mapcar'. + +2009-04-05 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-help-error): Make search for help text in log + file more robust. + +2009-04-04 Ralf Angeli <angeli@caeruleus.net> + + * style/listings.el ("listings"): Remove redundant list when + calling `TeX-arg-key-val'. Use `LaTeX-env-args' for lstlisting + environment. + + * latex.el (LaTeX-env-args): New function. + (TeX-arg-conditional, TeX-arg-eval, TeX-arg-label) + (TeX-arg-index-tag, TeX-arg-index, TeX-arg-macro) + (TeX-arg-environment, TeX-arg-cite, TeX-arg-counter) + (TeX-arg-savebox, TeX-arg-file, TeX-arg-define-label) + (TeX-arg-define-macro, TeX-arg-define-environment) + (TeX-arg-define-cite, TeX-arg-define-counter) + (TeX-arg-define-savebox, TeX-arg-document, LaTeX-arg-usepackage) + (TeX-arg-input-file, TeX-arg-bibstyle, TeX-arg-bibliography) + (TeX-arg-corner, TeX-arg-lr, TeX-arg-tb, TeX-arg-pagestyle) + (TeX-arg-verb, TeX-arg-pair, TeX-arg-size, TeX-arg-coordinate) + (TeX-arg-insert-braces): Doc fix. + + * multi-prompt.el (multi-prompt-separator): Remove. + (multi-prompt-key-value-collection-fn): Do not search for + `multi-prompt-separator'. + (crm-local-must-match-map, crm-local-completion-map): Silence the + byte compiler. + (multi-prompt-key-value): Require crm.el here and not at + top-level. + + * tex-info.el (TeX-texinfo-mode): Add @lowersections and + @raisesections. + + * doc/auctex.texi (Adding Environments): Document hooks for + `LaTeX-add-environments'. + +2009-03-29 Ralf Angeli <angeli@caeruleus.net> + + * style/listings.el (LaTeX-listings-key-val-options): + New variable. + ("listings"): Use it. Check for font-latex function, not feature. + + * latex.el (TeX-arg-key-val): New function. + + * multi-prompt.el: Require crm.el. + (multi-prompt-separator, multi-prompt-key-value-sep) + (multi-prompt-completion-table): New variables. + (multi-prompt-key-value-collection-fn, multi-prompt-key-value): + New functions. + +2009-03-22 Ralf Angeli <angeli@caeruleus.net> + + * tex-site.el.in: Revitalize support for completion in \cite + macros via `BibTeX-auto-store'. + +2009-03-02 Holger Sparr <holger.sparr@gmx.net> + + * Makefile.in (STYLESRC): Add style/multido.el; + style/pst-{grad|node|plot|slpe}.el + +2009-03-01 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-verbatim-macro-boundaries): Do step backwards at + beginning of buffer. + (LaTeX-search-forward-comment-start): Treat find of comment at + limit correctly. + + * tex-fold.el (TeX-fold-comment-do): Abort backward search for + comment start at beginning of buffer. Do not fold empty comment. + +2009-02-24 Holger Sparr <holger.sparr@gmx.net> + + * style/multido.el: New file. + + * style/pst-grad.el: New file. + + * style/pst-node.el: New file. + + * style/pst-plot.el: New file. + + * style/pst-slpe.el: New file. + +2009-02-23 Holger Sparr <holger.sparr@gmx.net> + + * style/pstricks.el: Actually implement support for writing + PSTricks code. + +2009-02-22 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Multi-line fontification): Remove. + + * doc/todo.texi (Wishlist): Fix typo. Remove entry which is + already supported. + + * style/tabularx.el: New file. + + * Makefile.in (STYLESRC): Add style/tabularx.el + +2009-02-15 Ralf Angeli <angeli@caeruleus.net> + + * style/natbib.el ("natbib"): Check for font-latex function rather + than feature. Add fontification spec for \cite. + + * doc/auctex.texi (Simple Style): Bring example in line with + reality. + +2009-01-24 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-method): Doc fix. + (TeX-source-correlate-mode): Call minor mode function after file + is loaded. + +2009-01-14 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-babel-insert-hyphen): Put `delete-selection' + property on function symbol. + +2009-01-04 Ralf Angeli <angeli@caeruleus.net> + + * style/CJK.el: New file. + + * style/ruby.el: New file. Correct argument numbers of \rubysize + and \rubysep. + + * style/CJKutf8.el: New file. + + * Makefile.in (STYLESRC): Add style/CJK.el and style/ruby.el. + Add style/CJKutf8.el. + +2009-01-03 Ralf Angeli <angeli@caeruleus.net> + + * style/flashcards.el ("flashcards"): Test for font-latex function + instead of feature. Reflect that \cardbackstyle has an optional + argument. + +2008-12-29 Ralf Angeli <angeli@caeruleus.net> + + * style/hyperref.el ("hyperref"): Test for font-latex function + instead of feature. Activate hyperref referencing style if + possible. + +2008-12-28 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-current-pages): Get rid of trailing periods. + (TeX-LaTeX-sentinel): Add support for longtable warning. Use only + one search per condition. Call `message' like `format'. + +2008-12-22 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Call `TeX-tree-expand' instead + of `TeX-macro-global-internal'. + + * tex-jp.el (TeX-macro-global): Call `TeX-tree-expand' instead of + `TeX-macro-global-internal'. + + * latex.el (LaTeX-env-item): Deactivate the mark before inserting + \item. + (LaTeX-insert-item): Swap point and mark when mark if necessary. + Insert newline only when not at beginning of line. + + * tex.el (TeX-deactivate-mark): New function. + (TeX-parse-argument): Use it. + +2008-12-21 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-auto-private, TeX-style-private): Per default + propose a place in the user's Emacs directory, not in the TeX + tree. + (TeX-style-path): Add values to the end of the list. Doc fix. + + * doc/auctex.texi (Automatic Private): Adjust descriptions of + `TeX-macro-private', `TeX-auto-private', and `TeX-style-private'. + +2008-12-16 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-tree-expand): New name for + `TeX-macro-global-internal'. Adapt parameter list to make it more + flexible. Update doc string. Do not return removed default + argument. + (TeX-macro-global): Change to accomodate new interface of + `TeX-tree-expand'. + (TeX-macro-private): New function. + (TeX-macro-private): Use it to determine variable value. + +2008-12-13 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (plain-TeX-clean-intermediate-suffixes) + (plain-TeX-clean-output-suffixes): New variables. + +2008-12-01 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (VirTeX-common-initialization): Revert last change. + +2008-11-30 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (VirTeX-common-initialization): Do not add call to + `TeX-update-style' to `find-file-hooks' but call it directly. + +2008-11-23 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-determine-method): Use configured + LaTeX command and find -synctex switch even if there are spaces in + front of it, as e.g. with MiKTeX. + (TeX-format-list): Use \subsection and \subsubsection as well to + identify a LaTeX file. + +2008-11-02 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-math-env) + (font-latex-extend-region-backwards-math-env): Do not match + \\[...]. + + * tex-fold.el (TeX-fold-expand-spec): Do not treat `\' special in + replacement text. + +2008-10-26 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (plain-TeX-common-initialization): Respect double dollar, + i.e. "$$", as a paragraph separator. + +2008-10-14 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-current-environment): Fix handling of commented + parts. + + * tex.el (TeX-comment-prefix): Save match data. + +2008-10-13 Ralf Angeli <angeli@caeruleus.net> + + * doc/changes.texi, doc/install.texi, doc/intro.texi, + doc/preview-readme.texi, doc/quickstart.texi: Make some + corrections and updates. + +2008-10-12 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-warning): Fix regexp for detecting bad boxes. + +2008-10-11 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-set-mode-name): Indicate TeX PDF mode as a trailing + flag. + (TeX-engine): Doc fix. + + * doc/auctex.texi: Restructure some parts. Update and extend it a + bit to reflect the recent changes of functionality. + +2008-10-07 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-interactive-mode): Add to `minor-mode-alist'. + ("desktop"): Remove `TeX-interactive-mode' from + `desktop-locals-to-save'. + +2008-10-06 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-paragraph-commands-regexp-make): Make it work + for the case that `LaTeX-paragraph-commands' is set. + +2008-10-05 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-engine): New variable. + (TeX-expand-list): Use it instead of XeTeX and Omega mode + variables. + (hack-one-local-variable): Remove references to XeTeX and Omega + mode variables. + (TeX-set-mode-name): Remove lighters for XeTeX and Omega mode. + (TeX-engine-alist, LaTeX-engine-alist): New variables. + (TeX-engine-set): New function. + (TeX-Omega-mode): Mark as obsolete. Remove defcustom. + (TeX-PDF-mode): Use `TeX-engine' instead of mode variables. + (TeX-XeTeX-mode): Remove. + (TeX-mode-map): Remove key bindings for toggling XeTeX and Omega + mode. + (TeX-mode-specific-command-menu-entries): Use new facilities for + switching TeX engines. + ("desktop"): Remove reference to TeX Omega mode. + + * context.el (ConTeXt-expand-options): Use `TeX-engine' instead of + XeTeX and Omega mode variables. + +2008-09-07 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-PDF-mode): Add to `minor-mode-alist'. Use "" as + lighter. + ("desktop"): Remove `TeX-PDF-mode' from `desktop-locals-to-save'. + + * latex.el (LaTeX-mark-environment): Swap beg and end. + +2008-08-02 Ralf Angeli <angeli@caeruleus.net> + + * tex-bar.el (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): + Mimic the default tool bars more closely. + +2008-08-02 Reiner Steib <reiner.steib@gmx.de> + + * toolbar-x.el (toolbarx-default-toolbar-meaning-alist): + Provide different defaults for different Emacs and XEmacs versions. + Conditionally add a `new-file' entry. + +2008-07-28 Ralf Angeli <angeli@caeruleus.net> + + * toolbar-x.el (toolbarx-image-path): Protect against load-path + items being nil. + + * style/foils.el (LaTeX-style-foils): Silence the byte compiler. + + * style/epsf.el (TeX-arg-epsfsize): Silence the byte compiler. + + * tex.el (TeX-source-specials-view-start-server): Alias only if + `defvaralias' is available. + (TeX-master, TeX-convert-master): Move upwards to prevent some + compiler warnings. + +2008-07-27 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-synctex-tex-flags): New variable. + (TeX-source-correlate-expand-options): Use it. + (TeX-source-specials-tex-flags): Remove possibility to create + lists. + + * context.el (ConTeXt-expand-options): Support TeX XeTeX mode and + TeX Source Correlate mode. + +2008-07-24 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-specials-mode): Fix last change. + +2008-07-23 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-expand-list): Prevent "%(PDF)" expander from + returning "pdf" if `TeX-XeTeX-mode' is active. Make "%(tex)" and + "%(latex)" expanders aware of the XeTeX commands. + (hack-one-local-variable): Cater for `TeX-XeTeX-mode'. + (TeX-set-mode-name): Cater for `TeX-XeTeX-mode'. + (TeX-source-specials-mode): Mark as obsolete. + (TeX-PDF-mode): Disable TeX XeTeX mode if TeX PDF mode is + disabled. + (TeX-Omega-mode): Disable TeX XeTeX mode if TeX Omega mode is to + be enabled. + (TeX-XeTeX-command, LaTeX-XeTeX-command): New variables. + (TeX-XeTeX-mode): New minor mode. + (TeX-mode-map): Define key for TeX XeTeX mode. + (TeX-mode-specific-command-menu-entries): Add entry for TeX XeTeX + mode. Make the engine-related options exclusive by using radio + buttons. Refine the wording for some options. + +2008-07-19 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-correlate-determine-method): Do not error out + if calling the engine fails. + + * latex.el (LaTeX-mark-environment): Keep point upon unsuccessful + search. + +2008-07-19 Vincent Belaïche <vincent.b.1@hotmail.fr> (tiny change) + + * latex.el (LaTeX-mark-environment): Support marking of multiple + nested environments. + +2008-07-17 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-paragraph-commands-regexp-make): + Take `LaTeX-paragraph-commands' into account. + (LaTeX-paragraph-commands-regexp): Move behind + `LaTeX-paragraph-commands' definition. + +2008-07-14 Ralf Angeli <angeli@caeruleus.net> + + * style/pdfsync.el ("pdfsync"): + Use `TeX-source-correlate-output-page-function' rather than + `TeX-sync-output-page-function'. + + * tex.el (TeX-command-list): Remove SyncTeX expanders. + (TeX-expand-list): Adapt function calls. Remove SyncTeX expander. + (hack-one-local-variable, TeX-set-mode-name): + Remove `TeX-synctex-mode' and `TeX-source-specials-mode'. + Add `TeX-source-correlate-mode'. + (TeX-source-correlate-method): New variable. + (TeX-source-correlate-method-active): New variable. + (TeX-source-correlate-output-page-function): Rename from + `TeX-sync-output-page-function'. + (TeX-source-correlate-start-server): Rename from + `TeX-view-start-server'. + (TeX-source-correlate-start-server-asked): Rename from + `TeX-view-start-server-asked'. + (TeX-source-correlate-start-server-flag): Rename from + `TeX-view-start-server-flag'. + (TeX-source-correlate-gnuserv-p): Rename from + `TeX-view-gnuser-p'. + (TeX-source-correlate-server-enabled-p): Rename from + `TeX-view-server-enabled-p'. + (TeX-source-correlate-start-server-maybe): Rename from + `TeX-view-start-server-maybe'. + (TeX-source-specials): Remove custom group. + (TeX-source-correlate-determine-method): New function. + (TeX-source-correlate-expand-options): Rename from + `TeX-source-specials-expand-options'. Support SyncTeX as well. + (TeX-source-correlate-map): Rename from + `TeX-source-specials-map'. + (TeX-source-correlate-mode): Rename from + `TeX-source-specials-mode'. Support SyncTeX as well. + (TeX-source-specials-mode): Now an alias for + `TeX-source-specials-mode'. + (TeX-source-specials-tex-flags, TeX-source-specials-places) + (TeX-source-specials-view-position-flags) + (TeX-source-specials-view-editor-flags) + (TeX-source-specials-view-gnuclient-flags) + (TeX-source-specials-view-emacsclient-flags): Put into `TeX-view' + rather than `TeX-command' group. + (TeX-source-specials-view-expand-options): Adapt for new function + names and distinction between source specials and SyncTeX. + (TeX-synctex-mode): Remove. + (TeX-mode-map): Remove binding for TeX SyncTeX mode. + (TeX-mode-specific-command-menu-entries): Remove menu entry for + TeX SyncTeX mode. Use Source Correlate moniker instead of Source + Specials. + +2008-07-07 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Folding): Fix last change. + +2008-07-06 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Folding): Document folding of math constructs + and the possibilities of providing expanders and alternatives in + replacement specifiers. + + * tex.el (TeX-command-list): Add expanders for SyncTeX. + (TeX-expand-list): Start server if necessary when viewing. + Define expander for SyncTeX. + (hack-one-local-variable): Cater for TeX SyncTeX mode. + (TeX-set-mode-name): Add lighter for TeX SyncTeX mode. + (TeX-view): New customization group. + (TeX-view-start-server): Rename from + `TeX-source-specials-view-start-server'. + (TeX-source-specials-view-start-server): Rename to + `TeX-view-start-server' and define alias. + (TeX-view-start-server-asked): Rename from + `TeX-source-specials-view-start-server-asked'. + (TeX-source-specials-view-start-server-asked): Rename to + `TeX-view-start-server-asked'. + (TeX-view-start-server-flag): New variable. + (TeX-view-gnuserv-p): Rename from + `TeX-source-specials-view-gnuserv-p'. + (TeX-source-specials-view-gnuserv-p): Rename to + `TeX-view-gnuserv-p'. + (TeX-view-server-enabled-p): New function. + (TeX-view-start-server-maybe): New function. + (TeX-source-specials-mode): Set `TeX-view-start-server-flag'. + (TeX-source-specials-view-expand-client): Adapt call to new + function name. + (TeX-source-specials-view-expand-options): Do not try to start the + server here anymore. + (TeX-synctex-mode): New minor mode. + (TeX-synctex-output-page): New function. + (TeX-mode-map): Add key for toggling TeX SyncTeX mode. + (TeX-mode-specific-command-menu-entries): Add menu entry for TeX + SyncTeX mode. + (TeX-math-input-method-off-regexp): New variable. + (TeX-toggle-off-input-method): Remove. + (TeX-math-input-method-off): Do without + `TeX-toggle-off-input-method'. + +2008-07-04 Berend de Boer <berend@pobox.com> + + * context.el, context-en.el: added a few more entries to the menu + to select ConTeXt macro's from. + +2008-06-29 Ralf Angeli <angeli@caeruleus.net> + + * style/bulgarian.el ("bulgarian"): Use value of + `TeX-quote-after-quote' for default quote insertion behavior. + +2008-06-28 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-find-matching-close): Simplify. + There is no need for a general mechanism if the supported chars are + limited at another place. + + * tex.el (TeX-search-syntax-table): Support (...) and <...>. + + * tex-fold.el (TeX-fold-macro-spec-list): New spec for \item. + Adapt doc string to reflect new functionality. + (TeX-fold-macro-nth-arg): New `delims' parameter which can be used + to find other macro args than those enclosed by braces. + (TeX-fold-expand-spec): New function. + (TeX-fold-hide-item): Use it. + + * doc/auctex.texi (European): Document `bulgarian' language + option. + + * Makefile.in (STYLESRC): Add style/bulgarian.el. + + * style/bulgarian.el: New file. + +2008-06-21 Ralf Angeli <angeli@caeruleus.net> + + * style/hyperref.el: New file. + + * Makefile.in (STYLESRC): Add style/hyperref.el. + +2008-06-07 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-make-built-in-keywords): + Distinguish command-type keyword classes from others when creating the + respective variables. + + * doc/auctex.texi (Font Locking): Structure with nodes. + (Fontification of macros): Describe format specifiers for macros + with arguments. + +2008-05-30 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-macro-spec-list): Add some documentation. + (TeX-fold-hide-item): Support replacement of argument specifiers + like "{1}" by the respective argument value in the display string. + +2008-05-30 Joost Kremers <joostkremers@fastmail.fm> (tiny change) + + * tex-fold.el (TeX-fold-macro-spec-list): Add function choice. + (TeX-fold-hide-item): If specifier is a function, call it with all + mandatory arguments of macro. + +2008-05-25 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (docTeX-mode): Add regexp group to value of + `TeX-comment-start-regexp'. + + * style/doc.el (LaTeX-doc-after-insert-macrocode): New function. + ("doc"): Add it to `LaTeX-after-insert-env-hooks'. + + * latex.el: Get rid of some compiler warnings. + (LaTeX-after-insert-env-hooks): New variable. + (LaTeX-insert-environment): Remove docTeX-specific code. + Run `LaTeX-after-insert-env-hooks' + + * style/beamer.el (LaTeX-beamer-after-insert-env): New function. + ("beamer"): Add it to `LaTeX-after-insert-env-hooks'. Get rid of + some compiler warnings. Support the semiverbatim environment. + + * style/dinbrief.el: Get rid of some compiler warnings. + + * style/dk-bib.el: Get rid of some compiler warnings. + + * style/emp.el: Get rid of some compiler warnings. + + * style/epsf.el: Get rid of some compiler warnings. + + * style/foils.el: Get rid of some compiler warnings. + + * style/graphicx.el: Get rid of some compiler warnings. + + * style/letter.el: Get rid of some compiler warnings. + + * style/prosper.el: Get rid of some compiler warnings. + + * style/psfig.el: Get rid of some compiler warnings. + + * texmathp.el: Get rid of some compiler warnings. + + * tex.el: Get rid of some compiler warnings. + + * tex-jp.el: Get rid of some compiler warnings. + + * tex-buf.el: Get rid of some compiler warnings. + + * font-latex.el: Get rid of some compiler warnings. + + * context.el: Get rid of some compiler warnings. + + * context-en.el: Get rid of some compiler warnings. + + * context-nl.el: Get rid of some compiler warnings. + +2008-05-22 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-command-sentinel): Use `TeX-master-file' instead + of `TeX-active-master' for `TeX-transient-master'. + +2008-05-17 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Font Specifiers): Correct argument list of + `TeX-font'. + +2008-05-13 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Font Specifiers): Document `LaTeX-font-list'. + +2008-05-10 Reiner Steib <reiner.steib@gmx.de> + + * tex-bar.el (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): + Add standard Emacs buttons to custom set. + (TeX-bar-TeX-buttons): Use `tex' instead of `latex' in custom set. + +2008-05-04 Ralf Angeli <angeli@caeruleus.net> + + * tex-site.el.in (AUCTeX): Move customization group here from + tex.el and load the main files defining customization options. + + * tex.el (AUCTeX): Move customization group to tex-site.el.in. + (TeX-expand-list): Make %(outpage) default to "1". + +2008-05-01 Ralf Angeli <angeli@caeruleus.net> + + * toolbar-x.el (toolbarx-xemacs-refresh): Only activate the tool + bar if it is already visible. Remove redundant if clause. + + * tex-buf.el (TeX-format-filter): Do not remove linebreak if the + following line starts with an opening parenthesis. + +2008-04-28 Ralf Angeli <angeli@caeruleus.net> + + * doc/Makefile.in (install-auctex): Do not use `-' to suppress + errors within command. + +2008-04-28 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-run-command): disable undo in run buffer + +2008-03-12 Ralf Angeli <angeli@caeruleus.net> + + * style/pdfsync.el (LaTeX-pdfsync-output-page): Kill buffer with + pdfsync file if it was loaded by us. + +2008-03-02 Ralf Angeli <angeli@caeruleus.net> + + * tex-info.el (texinfo-environment-regexp): Terminate. + +2008-03-01 Matan Ninio <emacs@auctexdev.ninio.org> (tiny change) + + * style/pdfsync.el (LaTeX-pdfsync-output-page): Include + subdirectories relative to master file in file names. Searching + for the file entry in the .pdfsync file allows for an optional + `.tex' extension in the filename. Find further p lines if the + current context does not contain any more. + +2008-02-24 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in: Add windows-package target and related variables. + +2008-02-23 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-common-menu-entries): Add exception for docTeX mode + when extending the customization menu. + +2008-02-17 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi: Repeat direntry after each category as per + recommendation of Karl Berry. + + * doc/preview-latex.texi: Repeat direntry after each category as + per recommendation of Karl Berry. + +2008-02-11 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-make-match-defun) + (font-latex-keyword-matcher): Recognize old-style type specs which + could be lists. Prevents "void-function nil" error during font + locking. + +2008-02-10 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (maintainer-clean): Do not depend on distclean. + How did this ever work? + (www-doc): Use release files. Update URLs. Make gendocs.sh use + texi2html. + + * doc/Makefile.in (extradist): Re-add tex-ref.pdf dependency. + (install-auctex): Do not install reference card when producing an + XEmacs package. + +2008-02-10 Ralf Angeli <angeli@caeruleus.net> + + * Version 11.85 released. + +2008-02-10 Ralf Angeli <angeli@caeruleus.net> + + * RELEASE: Update for upcoming release. + + * auctex.spec (Version): Bump version number. + + * configure.ac: Bump version number. + + * doc/todo.texi: Add copyright notice. + (Bugs): Remove entry about XEmacs bug since AUCTeX now helps + XEmacs in doing multi-line font locking. + + * doc/tex-ref.tex: Bump version number. Updated references to + toggles for bad boxes and warning. Mention `Clean' and `Clean + All' commands. + + * doc/install.texi: Add copyright notice. + (Prerequisites): Update information about Emacs 22. + + * doc/wininstall.texi: Update information about requirements, + esp. availability of Emacs 22. + +2008-02-09 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-error, TeX-warning): Handle `expert' option of + `TeX-display-help'. + (TeX-warning): Find error file in same window. + + * tex.el (TeX-display-help): Add `expert' option. + + * doc/auctex.texi (Commands): Add some explanatory text for TeXing + options. Document `TeX-show-compilation'. + (Debugging): Reflect new option of `TeX-display-help'. + + * doc/changes.texi: Add changes for 11.85. Add copyright notice. + +2008-02-08 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-bar.el (LaTeX-symbols-toolbar-visible-flag): Improve doc string. + + * toolbar-x.el (toolbarx-image-path): Improve doc string. + +2008-02-07 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-parse-TeX): Do not pop to output buffer. + (TeX-warning): Since we do not pop to the output buffer, find the + source file in the original window. + +2008-02-05 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-built-in-keyword-classes): Add syntax + alternatives for some commands. + (font-latex-setup): Give ?@ word syntax for font locking. + (font-latex-syntax-error-modes): New variable. + (font-latex-match-command-with-arguments): Use it. + +2008-02-04 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-set-syntactic-keywords): Revert change + from 2007-04-09 because the unbalanced treatment of \begin and + \end may lead to color bleeding. + +2008-02-03 Ralf Angeli <angeli@caeruleus.net> + + * Relicense all "GPLv2 or later" files to "GPLv3 or later". + + * COPYING: Switch to GPLv3. + + * doc/Makefile.in, doc/preview-dtxdoc.pl: Add coypright and + license notices. + + * style/beamer.el, style/scrbook.el: Add license notices. + +2008-02-03 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-info.el (Texinfo-insert-node): Correct name of let-bound + variable. + +2008-02-03 Ralf Angeli <angeli@caeruleus.net> + + * tex-info.el: Make sure the Texinfo mode of AUCTeX is still used + after loading texinfo.el. + +2008-02-02 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in, auctex.spec, autogen.sh, configure.ac: Add + copyright and license notices. + + * texmathp.el, style/amsmath.el, style/amsthm.el, + style/fancyref.el, style/index.el, style/makeidx.el, + style/multind.el, style/varioref.el: Reflect copyright assignment + of Carsten Dominik to FSF in coypright notices and adapt licence + notice accordingly. + +2007-12-28 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-command-expand): Do not evaluate `file' as a + function. + +2007-12-25 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-move-to-break-point): Ignore whitespace + when checking if verbatim macro starts at beginning of line. + +2007-12-08 David Kastrup <dak@gnu.org> + + * texmathp.el (defgroup, defcustom): Remove compatibility cruft. + +2007-11-20 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/install.texi (Prerequisites): Add openSUSE. + +2007-11-20 David Kastrup <dak@gnu.org> + + * doc/install.texi (Prerequisites): Update to reflect current + realities. + +2007-11-03 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-buf.el (TeX-record-buffer): New variable, only in Emacs. + (TeX-pop-to-buffer): New function. + (TeX-recenter-output-buffer, TeX-background-filter) + (TeX-parse-TeX, TeX-parse-error, TeX-help-error): + Use `TeX-pop-to-buffer'. + +2007-10-30 Reiner Steib <Reiner.Steib@gmx.de> + + * toolbar-x.el (toolbarx-find-image): Rename argument. + Improve doc string. + +2007-10-11 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (TeX-arg-verb): Honor active region. + +2007-10-10 Ralf Angeli <angeli@caeruleus.net> + + * style/MinionPro.el ("MinionPro"): Run style hook for amsmath + which is loaded via MnSymbol. + +2007-10-09 Ralf Angeli <angeli@caeruleus.net> + + * style/nomencl.el: New file. + + * Makefile.in (STYLESRC): Add style/nomencl.el. + +2007-10-03 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-user-keyword-classes): Doc fix. + +2007-08-26 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-command-with-args-default-spec): + Default to nil. + +2007-08-24 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-command-with-arguments): + Show error indicator only in LaTeX mode. + +2007-08-23 Ralf Angeli <angeli@caeruleus.net> + + * style/nicefrac.el ("nicefrac"): Fix last change. + +2007-08-22 Ralf Angeli <angeli@caeruleus.net> + + * style/jurabib.el ("jurabib"): Use `font-latex-add-keywords'. + Add syntax information. + +2007-08-21 Ralf Angeli <angeli@caeruleus.net> + + * style/scrreprt.el: Add licence text. + ("scrreprt"): Use `font-latex-add-keywords'. Add syntax + information. + + * style/scrpage2.el: Add licence text. + ("scrpage2"): Use `font-latex-add-keywords'. Add syntax + information. + + * style/scrlttr2.el: Add licence text. + ("scrlttr2"): Use `font-latex-add-keywords'. Add syntax + information. + + * style/scrbook.el ("scrbook"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/scrbase.el ("scrbase"): Use `font-latex-add-keywords'. + Add syntax information. + +2007-08-20 Ralf Angeli <angeli@caeruleus.net> + + * style/url.el ("url"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/subfigure.el ("subfigure"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/csquotes.el ("csquotes"): Update for version 3.7. + Use `font-latex-add-keywords'. Add syntax information. + + * style/MinionPro.el ("MinionPro"): Use `font-latex-add-keywords'. + Add syntax information. + + * font-latex.el (font-latex-built-in-keyword-classes): + Correct syntax spec for \subsubparagraph. + +2007-08-19 Ralf Angeli <angeli@caeruleus.net> + + * style/units.el ("units"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/nicefrac.el ("nicefrac"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/listings.el ("listings"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/flashcards.el ("flashcards"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/comment.el ("comment"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/booktabs.el ("booktabs"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/babel.el ("babel"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/paralist.el ("paralist"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/natbib.el ("natbib"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/mdwlist.el ("mdwlist"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/graphicx.el ("graphicx"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/fancyref.el ("fancyref"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/captcont.el ("captcont"): Use `font-latex-add-keywords'. + Add syntax information. + + * style/beamer.el ("beamer"): Use `font-latex-add-keywords'. + + * font-latex.el (font-latex-add-keywords): New function. + (font-latex-command-with-args-opt-arg-delims): Add parentheses. + +2007-08-14 David Kastrup <dak@gnu.org> + + * tex.el (TeX-insert-backslash): put delete-selection property on. + +2007-08-13 David Kastrup <dak@gnu.org> + + * Makefile.in (all): make new target "docs" as well. Descend for + docs, info and dvi. + Before regenerating extradist documentation, copy version info + from checked-out version (can we do that saner?). + On various targets, replace set -x with a somewhat more elaborate + version that echoes more for make -n. + +2007-08-10 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Delete buffers used for checking + availability of info files. + +2007-08-08 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-TeX-sentinel-check): Shave off quotation marks + from file name if present. + +2007-08-04 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-run-style-hooks): Set `default-directory' to the + directory of the master file. + +2007-07-11 Ralf Angeli <angeli@caeruleus.net> + + * style/pstricks.el ("pstricks"): Do not disable TeX PDF mode if + pst-pdf is used. + +2007-07-10 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-format-filter): Remove line breaks at column 79. + +2007-07-09 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-comment-forward): Call `comment-normalize-vars' if + available. + +2007-07-01 Ralf Angeli <angeli@caeruleus.net> + + * style/verbatim.el: Add copyright notice and licence info. + + * style/paralist.el: Add copyright notice and licence info. + + * style/booktabs.el: Add copyright notice and licence info. + + * style/scrbase.el: Change copyright notice of Mark Trettin to FSF + to reflect the assignment. Add licence info to header. + + * style/subfigure.el: Change copyright notice of Reiner Steib to + FSF to reflect the assignment. Add licence info to header. + + * style/captcont.el: Change copyright notice of Reiner Steib to + FSF to reflect the assignment. Add licence info to header. + + * latex.el (LaTeX-auto-minimal-regexp-list): Match optional + arguments of document style or class macro even if they contain + periods, e.g. in case of "BCOR8.25mm" in KOMA Script classes. + Get rid of superfluous escapes in complemented character alternatives. + + * tex.el (TeX-insert-dollar): Show matching start only if + `blink-matching-paren' is non-nil. + +2007-06-20 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-common-initialization): Turn TeX PDF mode on + when pst-pdf.sty is used. + +2007-06-10 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-common-initialization): Do not add pstricks to + style hooks. + + * style/pstricks.el: New file. + + * Makefile.in (STYLESRC): Add style/pstricks.el. + +2007-05-25 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-command-with-arguments): + Check if `match-beg' is set. + +2007-05-20 Ralf Angeli <angeli@caeruleus.net> + + * style/beamer.el ("beamer"): Use new syntax in format specifier + for frametitle macro. + + * font-latex.el (font-latex-built-in-keyword-classes): Use new + syntax for format specifiers. + (font-latex-user-keyword-classes): Describe new syntax for format + specifiers. + (font-latex-command-with-args-default-spec): Use new syntax for + format specifiers. + (font-latex-command-with-args-opt-arg-delims): New variable. + (font-latex-match-command-with-arguments): Use it. Change format + specifier parsing to support new syntax. + (font-latex-match-mandatory-arg): Remove. + +2007-05-05 Ralf Angeli <angeli@caeruleus.net> + + * doc/faq.texi: Add entry about programs not being found by + ./configure when PATH is not set correctly. + +2007-04-29 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-parse-error): Match any closing parenthesis. + +2007-04-28 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-fontify-region): Force redisplay + instead of setting `jit-lock-context-unfontify-pos'. + (font-latex-command-with-args-default-spec): New variable. + (font-latex-match-command-with-arguments): Use it. + (font-latex-built-in-keyword-classes): Correct some syntax + specifiers. + (font-latex-jit-lock-force-redisplay): New function. + (font-latex-fontify-region): Use it. + (font-latex-doctex-preprocessor-face): Make DocStrip guards stand + out on Emacs 21. + +2007-04-23 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-environment-menu): Support optional arguments + specified by vectors. + + * style/flashcards.el: New file. + + * Makefile.in (STYLESRC): Add style/flashcards.el. + + * doc/auctex.texi (Adding Environments): Document possibility to + specify optional arguments in `LaTeX-add-environments'. + +2007-04-22 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/changes.texi: Add index entries for auctex.el and + tex-site.el. Add references to INSTALL or manual. + + * doc/install.texi (Loading the package): Add index entries for + auctex.el and tex-site.el. + + * doc/wininstall.texi: Add index entries for tex-mik.el and + tex-fptex.el. Clarify loading. + +2007-04-22 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-fontify-region): Force context-related + unfontification only if the region has to be extended. + (font-latex-find-matching-close): Do not look up syntax-table + properties. + (font-latex-extend-region-backwards-command-with-args) + (font-latex-extend-region-backwards-command-in-braces) + (font-latex-extend-region-backwards-math-env) + (font-latex-extend-region-backwards-math-envII) + (font-latex-extend-region-backwards-quotation): Doc fix. + Return nil if no content requiring region extension was found. + +2007-04-16 Ikumi Keita <ikumi@ikumi.que.jp> + + * latex.el (LaTeX-math-default): Add various Greek uppercase + macros provided by amsmath.sty. + +2007-04-15 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-math-envII): Regexp-quote the + string used to look for the environment end in order for starred + environments to be found. + +2007-04-13 Mark Trettin <Mark.Trettin@gmx.de> + + * style/scrbase.el ("scrbase"): Fix typo in prompt. + (TeX-arg-KOMA-fontelements): Add \dictum, \pagination, + \disposition, and \minisec macros. + +2007-04-13 Ralf Angeli <angeli@caeruleus.net> + + * style/beamer.el ("beamer"): Specify syntax of \frametitle macro + for font locking. + +2007-04-12 Ralf Angeli <angeli@caeruleus.net> + + * style/amsmath.el ("amsmath"): Call `reftex-add-to-label-alist' + only if function is bound. + +2007-04-09 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Add --view parameter to texdoc + call since texdoc in MiKTeX fires up a web page not useful for our + purposes otherwise. + + * tex-mik.el: Set `TeX-kpathsea-path-delimiter' to nil since + kpsewhich in MiKTeX (aka findtexmf) does not emit any useful + information if fed with kpathsea-related variables anyway. + This change makes `TeX-doc' work again on MiKTeX. + + * font-latex.el (font-latex-set-syntactic-keywords): Match the + \begin macro of verbatim environments in case it is preceded by + other content than whitespace. + +2007-04-04 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-backward-paragraph): Fix grouping in order to + return the right value when no paragraph command is found. + +2007-04-01 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-help-error): Correct regexp for matching line + indicator. + +2007-03-31 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-verbatim-environments): Fix typo. + (LaTeX-backward-paragraph): Special-case verbatim environments in + order to prevent leading brackets or braces from being interpreted + as part of the \begin macro. Clean up a bit. + +2007-03-24 David Kastrup <dak@gnu.org> + + * context.el (ConTeXt-find-indent): Use `condition-case' rather + than `ignore-errors', and don't barf if at the end of file (like + with an empty file). + +2007-03-23 David Kastrup <dak@gnu.org> + + * context.el (TeX-ConTeXt-sentinel): Fix end-of-run detection. + +2007-03-19 Ralf Angeli <angeli@caeruleus.net> + + * style/comment.el: New file. + + * Makefile.in (STYLESRC): Add style/comment.el. + + * font-latex.el (font-latex-syntactic-keywords-extra): + New variable. + (font-latex-set-syntactic-keywords): Use it. + + * tex-style.el (LaTeX-comment-env-list): New variable. + +2007-03-18 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Commands): Remove dependency on software du + jour from description of `TeX-DVI-via-PDFTeX'. + +2007-03-12 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-quotes): Add nil option. + (font-latex-match-quotation) + (font-latex-extend-region-backwards-quotation): Do nothing if + `font-latex-quotes' is nil. + + * doc/auctex.texi (Font Locking): Document nil option of + `font-latex-quotes'. + +2007-03-11 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fold-math-spec-list): `decode-char' is not + autoloaded in XEmacs. Only use it when it is defined. + + * doc/auctex.texi (European): Document `icelandic' language + option. + + * Makefile.in (STYLESRC): Add style/icelandic.el. + + * style/icelandic.el: New file. + +2007-03-11 David Kastrup <dak@gnu.org> + + * RELEASE (Footnotes): Update Emacs CVS locations. + +2007-03-10 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-auto): Default to nil. + +2007-03-09 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-clean): Catch error on Emacs 21 when only one file + is to be deleted. + +2007-03-06 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-search-syntax-table): Set syntax of ?\( and ?\) + explicitely to whitespace for Emacs 21. + (TeX-search-syntax-table): Clean the syntax table more thoroughly. + +2007-03-04 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-find-macro-boundaries): Make it possible to restrict + the search with new argument `lower-bound'. + (TeX-find-macro-start): Make it possible to restrict the search + with new argument `limit'. + + * font-latex.el: Merge from multiline-font-lock branch. + (font-latex-do-multi-line, font-latex-use-cache): Remove. + (font-latex-multiline-boundary): New variable. + (font-latex-built-in-keyword-classes): Add information about + syntax of macros. Quote face names. + (font-latex-deactivated-keyword-classes): Adapt type to new form + of `font-latex-built-in-keyword-classes'. + (font-latex-make-match-defun): Accept `face' argument. + (font-latex-keyword-matcher): Support up to 8 slots for faces. + (font-latex-make-built-in-keywords): Support new form of keywords + classes. + (font-latex-user-keyword-classes): Provide possibility to specify + macro syntax. + (font-latex-make-user-keywords): Add warning face in relevant + matchers. + (font-latex-extend-region-functions): New variable. + (font-latex-setup): Use it. Clean up. + (font-latex-fontify-region): New function. + (font-latex-unfontify-region): Cater for XEmacs. + (font-lock-after-change-function): Advise function for challenged + editors. + (font-latex-find-matching-close): Use `TeX-search-syntax-table'. + (font-latex-not-on-same-line-as): New function. + (font-latex-set-cache, font-latex-get-cache) + (font-latex-check-cache): Remove. + (font-latex-put-multiline-property-maybe): New function. + (font-latex-match-command-cache): Remove. + (font-latex-matched-faces): New variable. + (font-latex-matched-face): New function. + (font-latex-match-command-with-arguments): Use them. Set warning + face when syntax not correct. + (font-latex-match-in-braces-cache): Remove. + (font-latex-match-mandatory-arg): New function. + (font-latex-extend-region-backwards-command-with-args): + New function. + (font-latex-match-command-in-braces): Set multiline property if + necessary. + (font-latex-extend-region-backwards-command-in-braces): + New function. + (font-latex-match-math-env): Set multiline property if necessary. + (font-latex-extend-region-backwards-math-env): New function. + (font-latex-math-environments): New variable. + (font-latex-match-math-envII): Use it. Set multiline property if + necessary. + (font-latex-extend-region-backwards-math-envII): New function. + (font-latex-update-quote-list): New function. + (font-latex-match-quotation): Use it. Set multiline property if + necessary. + (font-latex-extend-region-backwards-quotation): New function. + +2007-02-25 David Kastrup <dak@gnu.org> + + * tex.el (TeX-read-string): Add new function that will inherit the + input method if feasible. TODO: replace calls of `read-string' + with this wherever it may be appropriate. + +2007-02-20 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-buf.el (TeX-region-file): Doc fix. + +2007-02-15 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex.el (TeX-after-insert-macro-hook): New hook. + (TeX-insert-macro): Use it. + + * tex-fold.el (TeX-fold-auto): New variable. + (TeX-fold-mode): Append auto fold stuff to the end of + `TeX-after-insert-macro-hook'. + +2007-02-13 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-clean): Fix last change. + +2007-02-10 Ralf Angeli <angeli@caeruleus.net> + + * tex-fold.el (TeX-fold-macro-spec-list-internal) + (TeX-fold-env-spec-list-internal) + (TeX-fold-math-spec-list-internal): New variables. + (TeX-fold-region-macro-or-env, TeX-fold-item): Use them. + (TeX-fold-comment-do): Doc fix. + (TeX-fold-mode): Set TeX-fold-*-spec-list-internal variables. + Use <mode-prefix>-fold-*-spec-list variables if bound. + + * latex.el (LaTeX-fold-macro-spec-list) + (LaTeX-fold-env-spec-list, LaTeX-fold-math-spec-list): + New variables. + + * tex.el (TeX-mode-prefix): New function. + (TeX-clean): Use it. + +2007-02-10 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-jp.el (TeX-japanese-process-input-coding-system) + (TeX-japanese-process-output-coding-system): Use system-type + instead of window-system. Suggested by Ikumi Keita + <ikumi@ikumi.que.jp>. + +2007-02-09 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-jp.el (TeX-japanese-process-input-coding-system) + (TeX-japanese-process-output-coding-system): Do not use + default-coding-system to set process-coding-system, anymore. + The value is set to shift_jis or euc-jp depending on window-system. + + * tex-bar.el: Fix typo. Reported by Ikumi Keita + <ikumi@ikumi.que.jp>. + +2007-02-09 Ikumi Keita <ikumi@ikumi.que.jp> + + * tex-jp.el (japanese-TeX-command-list): + Add `TeX-run-discard-foreground' and `TeX-run-function' for + function-item. + (japanese-TeX-set-process-coding-system): New function. + (TeX-after-start-process-function): Use it. Cater for the + accidental case that no-Japanese loads tex-jp.el and his + coding-system is set to unexpected one. + +2007-02-05 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-submit-bug-report): Remove unnecessary code. + Include a plea for upgrading into introductory blurb. + +2007-02-01 Ikumi Keita <ikumi@ikumi.que.jp> + + * latex.el: Move (provide 'latex) to the end of buffer. + (TeX-global-input-files, BibTeX-global-style-files) + (BibTeX-global-files): checkdoc cleaning. + (LaTeX-fill-paragraph, LaTeX-fill-code-comment): Use function + TeX-match-buffer instead of buffer-substring-*. + (LaTeX-209-to-2e): Likewise. + + * tex-buf.el (TeX-command-region, TeX-command-buffer) + (TeX-next-error, TeX-check-files, TeX-command-next) + (TeX-output-extension, TeX-run-set-command, TeX-run-interactive) + (TeX-sentinel-default-function, TeX-region-create, TeX-region) + (TeX-error-file, TeX-error-offset, TeX-parse-TeX) + (TeX-error-description-list): checkdoc cleaning. + (TeX-run-command, TeX-TeX-sentinel-check, TeX-BibTeX-sentinel): + Use substitute-command-keys to message key binding. + (TeX-current-pages): Add doc string. + + * tex.el (TeX-print-command, TeX-queue-command) + (TeX-command-list, TeX-printer-list, TeX-set-mode-name) + (TeX-regexp-group-count): checkdoc cleaning. + (plain-TeX-mode-hook): Declare user option explicitly using + defcustom. + (TeX-search-files-kpathsea): Use TeX-kpathsea-path-delimiter + instead of kpathsea-path-delimiter. + +2007-01-23 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Quotes): + Document `TeX-math-close-double-dollar'. Add subheadings. + +2007-01-22 Ralf Angeli <angeli@caeruleus.net> + + * autogen.sh: Define PDFTEX if empty and pass it to `make dist' in + `doc' directory for documentation generation. + + * doc/Makefile.in (docdir, PACKAGE_TARNAME): New variables. + (dist): Add tex-ref.pdf target. + (extradist): Remove tex-ref.pdf target. + (install-auctex): Add tex-ref.pdf target. Install tex-ref.pdf + into $(docdir). + +2007-01-21 Ralf Angeli <angeli@caeruleus.net> + + * tex-fptex.el: Make calls of start.exe work with quoted file + names. + + * tex-mik.el: Make calls of start.exe work with quoted file names. + +2007-01-21 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-fold.el (TeX-fold-type-list): New new type 'math. + (TeX-fold-math-spec-list): New variable. + (TeX-fold-dwim, TeX-fold-region, TeX-fold-region-macro-or-env) + (TeX-fold-item): Try to fold math macros as well. + (TeX-fold-buffer, TeX-fold-paragraph, TeX-fold-make-overlay) + (TeX-fold-item-end): Mention new type 'math. + (TeX-fold-math): New function. + +2007-01-20 David Kastrup <dak@gnu.org> + + * auctex.spec: Remove unused `%{extraconfig}' argument. + +2007-01-20 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-fold.el (TeX-fold-macro-spec-list): Fold marginpar, eqref, + glossary, copyright, textregistered and texttrademark macros as + well. + +2007-01-18 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-jp.el: Update maintainer email address. + + * style/verbatim.el: Update author email address. + +2007-01-17 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-clean-default-intermediate-suffixes): Add beamer + suffixes. + +2007-01-16 Masayuki Ataka <masayuki.ataka@gmail.com> + + * tex-jp.el (japanese-TeX-command-list): Use "%`" and "%'" magic + to allow file names with spaces. See also change log for + TeX-command-list in tex.el on 2006-10-10. + Reported by Ikumi Keita <ikumi@ikumi.que.jp>. + +2007-01-14 Ralf Angeli <angeli@caeruleus.net> + + * doc/wininstall.texi: Add copyright notice and licence reference. + Mention --infodir. Some clean-ups. + +2007-01-13 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (www-doc): Generate AUCTeX and preview-latex manuals + in single directory. Patch gendocs.sh to use texi2html instead of + makeinfo (patch not included). + +2007-01-12 Ralf Angeli <angeli@caeruleus.net> + + * Version 11.84 released. + +2007-01-12 Ralf Angeli <angeli@caeruleus.net> + + * RELEASE: Update for release. + + * doc/changes.texi: Update for release. + + * auctex.spec (Version): Bump version number. + + * configure.ac: Bump version number. + + * doc/tex-ref.tex: Bump version number. + +2007-01-11 Ralf Angeli <angeli@caeruleus.net> + + * Makefile.in (STYLESRC): Add style/polski.el. + + * RELEASE: Mention support for `polski' LaTeX package. + + * style/polski.el: New file. + + * doc/auctex.texi (European): Mention `polski' language option. + +2007-01-08 Ralf Angeli <angeli@caeruleus.net> + + * RELEASE: Document some new features. + + * style/polish.el: New file. + + * Makefile.in (STYLESRC): Add style/polish.el. + + * doc/auctex.texi (European): Remove references to `plfonts' and + `plhb' styles for typesetting Polish text because they seem to be + out of use. Refer to the `polish' option for the babel LaTeX + package instead. + + * tex.el (TeX-quote-language-alist): Replace references to + `plfonts' and `plhb' by `polish'. + +2007-01-07 Ralf Angeli <angeli@caeruleus.net> + + * doc/wininstall.texi: Refer to up-to-date versions of CVS Emacs. + + * doc/install.texi (Prerequisites): Refer to up-to-date versions + of CVS Emacs. + +2007-01-05 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (European): Improve TeX-quote-language-alist. + + * tex.el (TeX-command-default): Mark as safe-local-variable. + (TeX-quote-language-alist): Improve custom type. Add links to the + manual. Improve doc string. + +2006-12-30 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Folding): Document user-visible changes in the + folding functionality. + +2006-12-29 Ralf Angeli <angeli@caeruleus.net> + + * tex-info.el (TeX-texinfo-mode): Set `comment-use-syntax'. + + * tex-fold.el: Update author email address. + (TeX-fold-type-list): New variable. + (TeX-fold-keymap): Add key binding for `TeX-fold-comment'. + (TeX-fold-dwim): Try to fold comment as well. + (TeX-fold-region): Move implementation of region folding for + macros and environments out into the new function + `TeX-fold-region-macro-or-env' and cater for comments as well. + (TeX-fold-region-macro-or-env, TeX-fold-region-comment) + (TeX-fold-comment, TeX-fold-comment-do): New functions. + + * latex.el (LaTeX-common-initialization): + Set `TeX-search-forward-comment-start-function'. + (LaTeX-fill-region-as-para-do, LaTeX-fill-paragraph) + (LaTeX-fill-code-comment): Call `TeX-search-forward-comment-start' + instead of `LaTeX-search-forward-comment-start'. + + * tex.el (VirTeX-common-initialization): Set `comment-end-skip' + and `comment-use-syntax'. + (TeX-fold-menu): Add entry for folding comments. + (TeX-comment-forward): New compatibility function. + (TeX-comment-or-uncomment-region): Use it. + (TeX-search-forward-comment-start-function): New variable. + (TeX-search-forward-comment-start): New function. + +2006-12-10 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-section-hook): Place into `LaTeX-macro' group. + (LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-braces): Same here. + (LaTeX-verbatim-environments): Place into `LaTeX-environment' + group. + +2006-12-07 Ralf Angeli <angeli@caeruleus.net> + + * tex-bar.el (TeX-install-toolbar, LaTeX-install-toolbar): + Add `toolbarx-refresh' to `TeX-PDF-mode-hook' in the current buffer + only. + +2006-12-06 Ralf Angeli <angeli@caeruleus.net> + + * context-nl.el (ConTeXt-nl-mode-initialization): Use correct + syntax for prompting for an optional argument in case of \items + macro. + + * context-en.el (ConTeXt-en-mode-initialization): Use correct + syntax for prompting for an optional argument in case of \items + macro. + + * context.el (ConTeXt-arg-setup): Capitalize prompt. + +2006-12-04 Miguel Frasson <mvsfrasson@gmail.com> + + * toolbar-x.el (toolbarx-emacs-add-button): + Insert buttons in KEYMAP (new arg). + Unnecessary &optional removed. + Removed broken code for fake-button `:new-line'. + (toolbarx-emacs-refresh-process-button-or-insert-list): + New arg KEYMAP inserted. + Unnecessary &optional removed. + (toolbarx-emacs-refresh): + Fix bug with `tool-bar-map' let-bound and made local variable. + (toolbarx-xemacs-refresh-process-button-or-insert-list): + Docstring improved.. + (toolbarx-xemacs-refresh): + Using `nreverse' directly inside `let'. + `nreverse' is applied to lists generated from actual + data-structures, leaving such data-structures alone. + +2006-11-26 Ralf Angeli <angeli@caeruleus.net> + + * context.el (ConTeXt-texexec-option-nonstop): New variable. + (ConTeXt-expand-options): Use it. + +2006-11-24 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (plain-TeX-enable-toolbar): Rename from + `TeX-enable-toolbar'. + (plain-TeX-maybe-install-toolbar): Rename from + `TeX-maybe-install-toolbar'. + (TeX-plain-tex-mode): Use new names. + + * doc/auctex.texi (Running TeX and friends): Explicitely mention + `plain-TeX-enable-toolbar' and `LaTeX-enable-toolbar'. + +2006-11-16 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-region-as-para-do): Do not break before + code comments if at a commented beginning of a line. + +2006-10-21 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/preview-latex.texi: Fix @node commands. + +2006-10-20 David Kastrup <dak@gnu.org> + + * doc/auctex.texi (top): Mention reference card. + + * doc/Makefile.in (PREVIEWTEXIFILES): Add `version.texi'. + + * doc/auctex.texi: Add formatting emergencystretch. Move macros + input. + (top): Rearrange somewhat. Avoid duplicate contents (?). + + * doc/preview-latex.texi: Restructure and relicense taking + auctex.texi as an example. + + * doc/auctex.texi (top): In the user-visible part of the info + file, move the copying info completely to the "Copying this + manual" section in order to reduce clutter. + +2006-10-19 David Kastrup <dak@gnu.org> + + * RELEASE: Mention previous XEmacs package problems. + +2006-10-16 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-parse-error, TeX-error, TeX-warning): + Replace the error parser basically by what we have in preview-latex. + However, this does not yet do the fine-grained hackery around + possible TeX quote characters that preview-latex employs in order + to get the correct character position in a line even under adverse + conditions. + +2006-10-11 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-error-description-list): Add preview-latex error + pattern here. + + * tex.el (TeX-expand-list): Add "%m" pattern from preview. + (TeX-add-local-master): Make a local variable wrapper more + suitable for docstrip. + +2006-10-10 David Kastrup <dak@gnu.org> + + * RELEASE: Mention space in file names, PostScript stack + tolerance. + + * tex-buf.el (TeX-command-expand): Make `file' self-quoting in + expansion, and trick around with `TeX-command-pos' and other junk + in order to make the quoting stuff of "%`" and "%'" work. + (TeX-view-output-file): Became pretty pointless. Remove. + + * tex.el (TeX-command-list): Use "%`" and "%'" magic to allow file + names with spaces. + (TeX-output-view-style): Don't quote "%s", that's the job of + `TeX-command-expand'. + (TeX-expand-list): Use the `-interaction' option. Define "%`", + " \"\\", "\"" and "%'" patterns. Somebody should probably rather + turn this into external functions in `tex-buf.el': the stuff + really has no business here and does not get byte-compiled. + Use `file' for "%o". + +2006-10-07 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-region-as-paragraph): Match "foo\ %" as + well. + +2006-10-04 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-find-macro-boundaries): Prevent `up-list' and + friends from finding parens in comments if point is not in a + comment and vice versa. + +2006-10-02 David Kastrup <dak@gnu.org> + + * doc/auctex.texi: Change the licensing terms to require no front + and back cover texts, and explicitly exclude the GFDL from being + licensed under the GFDL. + (top): Give a synopsis for the license section in the top menu. + Remove redundant version mentions, remove the explicit exclusion + of the GFDL from GFDL licensing: RMS says it is unnecessary. + +2006-09-29 David Kastrup <dak@gnu.org> + + * autogen.sh: Use `=' instead of `==' in tests. + + * doc/Makefile.in (version.texi): Let version.texi depend rather + on ChangeLog in order not to disturb pregenerated documentation. + + * autogen.sh: Prepare `AUCTEXDATE' and `AUCTEXVERSION' for `make + dist'. + + * Makefile.in (tar-ball): Pass version and date into autogen.sh + + * doc/Makefile.in (AUCTEXDATE, AUCTEXVERSION): get from configure. + (AUCTEXTEXIFILES): Add fdl.texi and version.texi + (version.texi): create depending on Makefile. + (maintainer-clean): Remove version.texi. Should this be in the + distclean target instead? + + * doc/fdl.texi: Add it. + + * Makefile.in (DOCFILES): Remove, unused. + (doc/Makefile): Add target. + (info, dvi, install-man, install-docs, clean, distclean) + (tar-ball): depend on doc/Makefile + + * doc/.cvsignore: Add version.texi, remove unused auto.texi. + + * doc/auctex.texi: Rearrange header material, put under GFDL, add + license, take version numbers from version.texi. + +2006-09-21 David Kastrup <dak@gnu.org> + + * RELEASE: Adapt to upcoming release. + + * doc/install.texi (Configure): Remove reference to + `--with-kpathseasep' option. + + * tex-mik.el (TeX-kpathsea-path-delimiter): initialize to ";". + + * tex-fptex.el (TeX-kpathsea-path-delimiter): initialize to ";". + +2006-09-20 David Kastrup <dak@gnu.org> + + * tex-buf.el: Let `TeX-active-buffer' return nil if there is no + command buffer. Change copyright notice from Kresten Krab Thorup + to reflect assignment to FSF. + + * latex.el: Change copyright notice. + + * tex.el: Change copyright notice. + + * doc/tex-ref.tex: Change copyright notice. + + * doc/auctex.texi: Change copyright notice. + +2006-09-17 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/faq.texi: Fix syntax error. + +2006-09-16 Ralf Angeli <angeli@caeruleus.net> + + * doc/faq.texi: Explain the abbreviation AUC. + +2006-09-13 Reiner Steib <Reiner.Steib@gmx.de> + + * toolbar-x.el (toolbarx-emacs-refresh): Don't modify global value + of `tool-bar-map'. + +2006-09-11 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-math-default): Remove X2ABB for \Pr. + Suggested by Adam Johnson <thu_zh@hotmail.com>. + +2006-09-08 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el: Use read-kbd-macro instead of kbd for LaTeX-math-mode. + (LaTeX-math-default): Add bindings for \var... symbols. + (LaTeX-math-default): Change binding for \vartheta. + +2006-09-08 David Kastrup <dak@gnu.org> + + * latex.el: Allow strings for keys in LaTeX-math-mode. + (LaTeX-math-list): Allow string for key. + +2006-09-06 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (Mathematics): Align description of + `LaTeX-math-list' with reality. + +2006-08-25 David Kastrup <dak@gnu.org> + + * doc/preview-faq.texi (Requirements, Installation Trouble) + (Customization): Update and remove stuff, mostly because + preview-latex is integrated with AUCTeX now. + +2006-08-30 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (TeX-latex-mode): Check if `tool-bar-mode' is bound. + + * tex.el (TeX-plain-tex-mode): Check if `tool-bar-mode' is bound. + +2006-08-26 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (European): Make replacement of + language-specific hyphen strings more obvious. + +2006-08-25 Ralf Angeli <angeli@caeruleus.net> + + * style/csquotes.el: Bring up to par with version 3.5. + +2006-08-17 David Kastrup <dak@gnu.org> + + * doc/auctex.texi (Viewing): Type fix. + +2006-08-05 Berend de Boer <berend@pobox.com> + + * context-en.el: quite a few more English ConTeXt macros made + available in menu. + + * context-nl.el: few more Dutch ConTeXt macros made available in menu. + + * context.el: more ConTeXt macros made available in menu. + +2006-08-02 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-bar.el (TeX-bar-TeX-button-alist, TeX-bar-LaTeX-button-alist): + Make `file' invisible in TeX-PDF-mode. Add clean. + (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): Improve custom type. + +2006-07-27 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-bar.el (TeX-bar-TeX-buttons, TeX-bar-LaTeX-buttons): + Improve wording. + + * doc/changes.texi: Add bug fixes. Add TeX tool bar. + + * doc/auctex.texi (Running TeX and friends): + Add TeX-enable-toolbar. + + * tex-bar.el: Copy of tool bar stuff from LaTeX-*. + (TeX-bar-TeX-buttons, TeX-bar-TeX-all-button-alists) + (TeX-bar-TeX-button-alist): New variables. + (TeX-bar-TeX-buttons, TeX-install-toolbar): New funtions. + (TeX-tool-bar-button-definitions): New custom group + + * tex.el (TeX-enable-toolbar): New variable. + (TeX-maybe-install-toolbar): New function. + (TeX-plain-tex-mode): Add `TeX-maybe-install-toolbar'. + +2006-07-27 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Add explanation of how to augment `PATH'. + + * doc/todo.texi (Mid-term Goals): Typo. + +2006-07-25 David Kastrup <dak@gnu.org> + + * style/doc.el ("doc"): Add macrocode and macrocode* to + indentation-neutral environment list. + + * latex.el (LaTeX-insert-environment): Leave mark at start of + content when inserting around active region. + +2006-07-11 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-font-list): Add `\mathbb' on C-c C-f C-s. + +2006-07-25 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-script): Don't match groups + spanning more than one line in order to avoid visually wrong + indentation in subsequent lines. + (font-latex-match-quotation): Do not match escaped quotation + marks. + +2006-07-23 Ralf Angeli <angeli@caeruleus.net> + + * bib-cite.el, tex-mik.el, doc/changes.texi, doc/history.texi, + doc/wininstall.texi: Fix spelling of MiKTeX. + +2006-07-21 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-script): Fix last check-in. + +2006-07-18 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-script): Apply subscript and + superscript highlighting only once in order to prevent the font + size becoming too small. + +2006-07-15 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-maybe-install-toolbar): Enable tool bar in LaTeX + mode only. + (LaTeX-maybe-install-toolbar): Revert last change. + (TeX-latex-mode): Set `tool-bar-mode-on-hook' buffer-locally + instead. + +2006-07-12 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-move-to-break-point): Fix regexp for + matching whitespace and comment characters at the start of a line. + Simplify forward search. + +2006-07-11 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-find-macro-boundaries, TeX-find-macro-start): + Remove unused argument. + (TeX-find-macro-end-helper): Handle macros at the end of the + buffer correctly. + +2006-07-10 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-math-close-double-dollar): New variable. + (TeX-insert-dollar): Use it. + + * Makefile.in, doc/Makefile.in (datarootdir): New variable used by + autoconf 2.59e. + +2006-07-09 Ralf Angeli <angeli@caeruleus.net> + + * aclocal.m4 (EMACS_CHECK_MULE): Check for EMACS_UNIBYTE + environment variable and do not set MULESRC if it is present. + +2006-07-07 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-normal-mode): Force update of style list. + +2006-07-02 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Explicitely supply doc directory + for non-kpathsea-based TeX systems. + +2006-06-29 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-fill-region-as-paragraph): Fix treatment of code + comments in case of something like "\%}%". + +2006-06-24 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-clean): Delete files in directory of master file. + +2006-06-23 Joshua Buhl <jbuhl_nospam@gmx.de> + + * doc/tex-ref.tex (title{Outlining TeX Documents}): new section. + +2006-06-19 Ralf Angeli <angeli@caeruleus.net> + + * style/amsmath.el ("amsmath"): Prompt for alignment option with + subarray environments. + +2006-06-18 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Preserve window configuration + when checking for info backends. + +2006-06-17 Ikumi Keita <ikumi@revery.net> + + * tex.el (TeX-parse-arguments): Makes to work with proper value of + TeX-insert-macro-default-style. + (TeX-insert-braces): Place braces with right direction with active + region, (related to the case when the region is being marked + backwards). + +2006-06-17 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-clean): Delete generated files associated with + `TeX-region-file'. Suggested by Ikumi Keita <ikumi@revery.net>. + +2006-06-12 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (Info-find-file): Do not autoload. + (TeX-doc-backend-alist): Use a method for checking the presence of + an info file which works in Emacs 21 as well. + +2006-06-11 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-doc-backend-alist): Don't error out if + `Info-find-file' is not available. + (TeX-doc): Use `interactive-p' instead of `called-interactively-p' + which is not available in Emacs 21. + +2006-06-11 Ikumi Keita <ikumi@revery.net> + + * style/amsmath.el ("amsmath"): Docfix for 'uproot'. + (LaTeX-amsmath-env-alignat): Fix typo. + +2006-06-08 David Kastrup <dak@gnu.org> + + * Makefile.in (PREVIEW_BUILD_DIR): New variable for building the + preview standalone bundle. + (preview-ball): New target for creating the preview standalone + bundle for CTAN. + +2006-06-08 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec (%post, %postun): Use mktexlsr instead of texhash. + Only update the relevant ls-R file. + (%install): Add comment about preview.cfg. + (%install, %files): prauctex.cfg is the config file, not + preview.cfg. + +2006-06-07 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-set-paragraph-start): New function. + (LaTeX-paragraph-commands-add-locally) + (LaTeX-common-initialization): Use it. + +2006-06-07 Reiner Steib <Reiner.Steib@gmx.de> + + * Version 11.83 released. + +2006-06-07 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (full-release): Remove duplicate pass phrase prompt. + (release-commit): Only commit ChangeLog. + + * Makefile.in (rpm-packages): Rename from rpm-builds. + + * RELEASE: Fix typo. + + * Makefile.in (rpm-builds): Add preview-tetex. + + * auctex.spec: Add "-n" for preview-tetex. + (%install): Create preview.cfg. + +2006-06-07 David Kastrup <dak@gnu.org> + + * RELEASE: Add info about preview RPM. + + * doc/install.texi (Advice for package providers): Adapt package + advice to what we actually do for RPM files. + + * auctex.spec: attempt to add preview-tetex package. + +2006-06-07 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (XEMACS_BUILD_DIR): New variable. + (xemacs-package): Use it. + (tar-ball-clean): Add XEMACS_BUILD_DIR. + (CP): New variable. + (tar-ball, www-doc): Use it. + + * RELEASE: Update RPM stuff. + + * tex.el (TeX-line-number-at-pos): New compatibility function. + + * style/pdfsync.el (LaTeX-pdfsync-output-page): Use it. + + * auctex.spec (Obsoletes): Remove preview-latex-common. + +2006-06-06 Ralf Angeli <angeli@caeruleus.net> + + * style/pdfsync.el (LaTeX-pdfsync-output-page): + Initialize `sync-record' with a non-nil value. + + * doc/auctex.texi (Viewing): Fix reference to Commands node + looking ugly in info output. Slightly rearrange forward/inverse + search section. Document pdfsync support a bit more in detail. + +2006-06-06 Reiner Steib <Reiner.Steib@gmx.de> + + * RELEASE: Use "SUSE" instead of "SuSE". + + * auctex.spec (Release): Bump to 1. + (%changelog): Add 11.83. + + * doc/changes.texi: Add @xref for pdfsync. + + * doc/auctex.texi (Viewing): Mention pdfsync. + + * doc/todo.texi (Wishlist): Add newline. Mention pdfsync. + +2006-06-06 David Kastrup <dak@gnu.org> + + * RELEASE: Add details about downloadable packages. Beg harder. + +2006-06-05 Reiner Steib <Reiner.Steib@gmx.de> + + * RELEASE: Mention LaTeX tool bar. + +2006-06-05 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-quote-regexp-beg) + (font-latex-quotes-control): Make buffer-local. + (font-latex-add-quotes): Revert last change and do not make + `font-latex-quotes-control' buffer-local which it now already is. + +2006-06-04 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-add-quotes): + Make `font-latex-quote-regexp-beg' buffer-local. + +2006-06-04 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (rpm-builds): New target. + (full-release): Use gpg-agent if available. + (RPM_SIGN): New variable. + (rpm-builds): Use it. + + * doc/install.texi (Advice for non-privileged users): Reword to + avoid underfull hbox. + +2006-06-03 Ralf Angeli <angeli@caeruleus.net> + + * doc/auctex.texi (top): Update master menu. + (Running TeX and friends): Update menu. + (Miscellaneous Commands): Remove. + (Cleaning, Documentation): New nodes. + + * doc/changes.texi: Update references to documentation about + cleaning and documentation access. + +2006-06-02 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (Miscellaneous Commands): New node. + + * doc/changes.texi: Add @xref-s. + +2006-06-02 David Kastrup <dak@gnu.org> + + * doc/changes.texi: Change one ref to xref. + +2006-05-31 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/changes.texi: Conditionalize reference. + + * doc/Makefile.in (MAKEINFO_PLAIN): Remove --no-validate. + + * auctex.spec (%files emacs): Remove %exclude. + +2006-05-30 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/Makefile.in (MAKEINFO_PLAIN): New. Add --no-validate. + + * doc/changes.texi: Add tool bar. + + * doc/auctex.texi (top): Remove tool bar. + (Running TeX and friends): Add tool bar here. Adjust. + +2006-05-25 David Kastrup <dak@gnu.org> + + * RELEASE: Mention file-line-error style messages. + Mention XyMTeX fix. + + * doc/changes.texi: The same. + + +2006-05-25 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-update-style-hook): New variable. + (TeX-update-style): Use it. + (TeX-remove-style): Fix typo. + + * font-latex.el (font-latex-quotes-internal): New variable. + (font-latex-quotes-set-internal): New function. + (font-latex-match-quotation): Use it. + Use `font-latex-quotes-internal' instead of `font-latex-quotes'. + (font-latex-setup): Remove code for figuring out type of + language-specific quotation mark matching which is now in + `font-latex-quotes-set-internal'. + + * RELEASE: Update for 11.83. + + * auctex.spec, configure.ac, doc/auctex.texi, doc/changes.texi, + doc/preview-latex.texi, doc/tex-ref.tex: Bump version number. + + Update address of FSF in GPL notices. + +2006-05-22 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-quotes-fallback) + (font-latex-quote-style-list-french) + (font-latex-quote-style-list-german): New variables. + (font-latex-quotes): Add `auto' option. + (font-latex-setup): Try to derive type of quotation mark matching + from document properties. + + * tex.el (TeX-elt-of-list-member): New function. + + * doc/auctex.texi (Font Locking): Document `auto' option of + `font-latex-quotes'. + +2006-05-21 Ralf Angeli <angeli@caeruleus.net> + + * tex.el (TeX-source-specials-mode): Mark as safe. + (TeX-PDF-mode): Use `TeX-booleanp'. + (TeX-booleanp): New function. + + * font-latex.el (font-latex-quotes): Mark as safe. + (font-latex-fontify-script): Use `TeX-booleanp'. + +2006-05-17 Ralf Angeli <angeli@caeruleus.net> + + * latex.el (LaTeX-forward-paragraph): Make regexp more efficient. + +2006-05-15 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-PDF-mode): Rewrite safe-local-variable property for + Emacs 21 compatibility. + + * font-latex.el (font-latex-fontify-script): Ditto. + +2006-05-10 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-master): Quote safe-local-variable lambda expression + to avoid byte compilation. + +2006-05-08 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-fontify-script): Mark as + safe-local-variable. + +2006-05-07 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-PDF-mode): Mark as safe-local-variable. + (TeX-master): Don't use t in safe-local-variable declaration. + (TeX-doc): Clarify. + +2006-05-07 Ralf Angeli <angeli@caeruleus.net> + + * font-latex.el (font-latex-match-quotation): Do not match + quotation marks in math constructs. + +2006-05-05 Berend de Boer <berend@pobox.com> + + * context.el (ConTeXt-mode-common-initialization): Previous fix + still wrong. Problem is that all local variables were killed, so + added a save/restore around the common initialisation. + +2006-05-04 Berend de Boer <berend@pobox.com> + + * context-nl.el (context-nl-mode) and context-en.el + (context-en-mode): can now assume that ConTeXt-current-interface + is buffer local. + + * context.el (ConTeXt-current-interface): this variable should + always be buffer local. With this and above two changes having + buffers with two interfaces at the same time works correctly + (again?). + +2006-04-26 Ralf Angeli <angeli@caeruleus.net> + + * tex-buf.el (TeX-TeX-sentinel-check, TeX-parse-error): + Support file-line-error error indicators. + +2006-04-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-format-list): Extend regexp for ConTeXt mode. + +2006-04-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (docTeX-mode): Make filling and indentation aware of + DocStrip guards. + +2006-04-20 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-warning): Don't balk if `string' is nil. + +2006-04-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-match-script): Fix matching of nested + braces. + +2006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-babel-insert-hyphen): Do not error out at + beginning of buffer. + +2006-03-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (install-metadata): Do not use an inline test for + checking if preview is enabled. Just to be on the safe side. + +2006-03-27 David Kastrup <dak@gnu.org> + + * doc/intro.texi (Introduction): refer to `below' instead of + probably non-existing `preview/README'. + + * tex.el: tiny typo. + + * latex.el (LaTeX-close-environment): Allow prefix argument to + reopen the environment. + +2006-03-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (install-metadata): Append preview/auto.el to start + file if configured with preview-latex. + +2006-03-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-insert-environment): Do not polute the kill + ring. + +2006-03-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (TeX-latex-mode): Set up tool bar correctly for XEmacs + and activate it for every buffer in Emacs. Run mode hooks as late + as possible. + +2006-03-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Check for `make' and abort if not present. + Use `AC_PROG_MAKE_SET' instead of deprecated `AC_SET_MAKE'. + + * latex.el (LaTeX-common-initialization): Add \dots to supported + TeX symbols. + +2006-03-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-mode-map): Change `C-c ?' binding from + `describe-mode' to `TeX-doc'. + (TeX-common-menu-entries): Add `Find Documentation...' entry for + `TeX-doc'. + (plain-TeX-menu-entries): Remove space before ellipsis. + (TeX-doc-backend-alist): Make texdoc backend available in all + modes. + + * latex.el (LaTeX-mode-menu): Remove space before ellipsis. + + * doc/changes.texi: Advertise cleaning and documentation finding + functionality. + +2006-03-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-next-error, TeX-active-buffer): Get master from + the command buffer. + (TeX-error, TeX-warning): Do not set `TeX-master' but set + `TeX-command-buffer' to the right value instead. + +2006-02-17 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-buf.el (TeX-error-description-list): Fix error messages. + Changed from `documentstyle' to `documentclass'. The duplicated + entries `counter too large' are combined. Add the name of + referenced book and the section number to the entry `Missing \\$ + inserted'. + + * tex-jp.el (TeX-error-description-list): Likewise. + +2006-02-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-master): Mark as safe. + +2006-02-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/wininstall.texi: Intersperse some information about PATH. + +2006-02-08 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-clean-default-intermediate-suffixes): Add .brf and + .out for hyperref. + +2006-02-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-kpathsea-format-alist): Add search specs for + documentation. + (Info-find-file, info-lookup->completions): Autoload. + (TeX-doc-backend-alist): New variable. + (TeX-doc): New function. + + * doc/todo.texi (Wishlist): Add a few words about documentation + lookup for macros. + +2006-02-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-run-ispell-on-document): Reintroduce for + compatibility reasons. + + * tex.el (TeX-command-list): Use `TeX-run-function' instead of + `TeX-run-ispell-on-document' for "Spell" option. Remove + `TeX-run-ispell-on-document' as option for the third element of an + item. + (TeX-ispell-document): Move here from tex-buf.el. + + * tex-buf.el (TeX-run-ispell-on-document): Remove. + (TeX-ispell-document): Move to tex.el. + +2006-02-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-command-list): Remove "ConTeXt Clean". Add general + "Clean" and "Clean All" options. Add `TeX-run-function' as an + option for the third element of an item and document it. + (TeX-clean-default-intermediate-suffixes) + (TeX-clean-default-output-suffixes, TeX-clean-confirm): + New variables. + (dired-mark-pop-up): Autoload. + (TeX-clean): New function. + + * tex-buf.el (TeX-run-function): New function. + + * tex-info.el (Texinfo-clean-intermediate-suffixes) + (Texinfo-clean-output-suffixes): New variables. + + * latex.el (docTeX-clean-intermediate-suffixes) + (docTeX-clean-output-suffixes) + (LaTeX-clean-intermediate-suffixes, LaTeX-clean-output-suffixes): + New variables. + + * context.el (ConTeXt-clean-intermediate-suffixes) + (ConTeXt-clean-output-suffixes): New variables. + +2006-02-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-sectioning-faces): Set the face + size for XEmacs again after `set-face-parent' was called which + erroneously overwrites the original size. Without this fix + sectioning faces may be unscaled after starting XEmacs. + +2006-02-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (top): Add detailed menu for better + accessibility. Fix formatting/usage of references to RefTeX and + preview-latex manuals. + +2006-02-03 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-enable-toolbar): New variable. + (LaTeX-maybe-install-toolbar): New function. + (TeX-latex-mode): Add LaTeX-maybe-install-toolbar to + tool-bar-mode-on-hook. + +2006-01-31 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4: Check for {late,last,early}-package-hiearchies if + `late-packages' is not bound (which indicates we are dealing with + XEmacs 21.5). + +2006-01-28 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (TeX-command-list): Use function ignore insted of nil + for the third element of `separator for command menu' because + defcustom of TeX-command-list requires the third element function. + Reported by Ikumi Keita <ikumi@revery.net>. + +2006-01-28 Ikumi Keita <ikumi@revery.net> + + * tex-buf.el (TeX-run-discard-foreground): Rename from + TeX-run-dviout. + (TeX-run-dviout): alias to TeX-run-discard-foreground. + + * tex.el (TeX-command-list): Use TeX-run-discard-foreground + instead of TeX-run-dviout. + +2006-01-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/csquotes.el (LaTeX-csquotes-insert-environment): + Set prompt for mandatory arguments. + ("csquotes"): Bring up to par with csquotes 3.2. + + * style/url.el ("url"): Support the \path macro. + +2006-01-25 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-buf.el (TeX-run-dviout): Undo previous change. + + * tex.el (TeX-command-list): Ditto. + +2006-01-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-delims-local) + (LaTeX-verbatim-macros-with-braces) + (LaTeX-verbatim-macros-with-braces-local): Doc fix. + (LaTeX-verbatim-environments, LaTeX-verbatim-environments-local): + Doc fix. Make the correct variable buffer-local. + (LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-braces, LaTeX-verbatim-environments): + New functions. + (LaTeX-verbatim-macro-boundaries): Find macro in case point is + just in front of it. + (LaTeX-verbatim-p): Doc fix. Correct macro lookup. + (LaTeX-fill-move-to-break-point): Do not break verbatim macros + with braces across lines (in addition to macros with delimiters). + For example in case of \lstinline{...} this would result in an + error and in case of \url{...} spaces would be messed up (in + conjunction with the `obeyspaces' package option). + + * font-latex.el (font-latex-set-syntactic-keywords): Instead of + appending lists of verbatim macros and environments manually use + new LaTeX-verbatim-* functions. + +2006-01-24 Ikumi Keita <ikumi@revery.net> + + * latex.el (LaTeX-fill-move-to-break-point): Fix previous change. + +2006-01-23 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in: Add CP_A. Add coment on maintainer-only targets. + (xemacs-package): Use CP_A. + +2006-01-22 Ikumi Keita <ikumi@revery.net> + + * latex.el (LaTeX-fill-move-to-break-point): Use TeX-espaced-p to + check TeX escape char. + + * tex.el (TeX-command-list): Remove TeX-run-dviout because dviout + here is only work with Emacs on MS-DOS. + + * tex-buf.el (TeX-run-dviout): Remove. + + * tex-jp.el (japanese-TeX-command-list): Remove TeX-run-dviout. + Commented out easy-menu-define (plain-TeX|LaTeX)-mode-command-nemu. + (japanese-TeX-mode, japanese-plain-tex-mode) + (japanese-latex-mode): Doc fix. + (japanese-TeX-self-insert-command): Rename from + tex-jp-self-insert-command. + (TeX-insert-punctuation): Follow the change. + (TeX-error-description-list): Doc fix. + +2006-01-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-spec-list): Fold pageref macro as + well. + +2006-01-16 David Kastrup <dak@gnu.org> + + * Makefile.in (xemacs-package): Don't clean up after building so + that we have a chance for debugging. + +2006-01-14 David Kastrup <dak@gnu.org> + + * configure.ac: Don't check for INSTALL_INFO if already set. + +2006-01-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Advertize pdfsync support. + + * latex.el (LaTeX-header-end, LaTeX-trailer-start): Do not pick up + commented header end or trailer start respectively. + +2006-01-13 David Kastrup <dak@gnu.org> + + * Makefile.in (xemacs-package): Don't run `install-info' and + `texhash' + +2006-01-11 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Fix use of TAG_EXPORT. + +2006-01-04 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-fold.el (TeX-fold-mode): Autoload as an interactive + function. + +2005-12-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/pdfsync.el: New file. + + * Makefile.in (STYLESRC): Add style/pdfsync.el. + + * tex.el (TeX-output-view-style): Add %(outpage) expander to xpdf + call. Start xpdf in server mode. + (TeX-expand-list): New %(outpage) expander. + (TeX-sync-output-page-function): New variable. + +2005-12-28 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Use TAG_EXPORT for snapshots. + + * auctex.spec (description): Add preview-latex. + (install, files): Don't create preview directory. + +2005-12-21 Ikumi Keita <ikumi@revery.net> + + * latex.el (LaTeX-mark-section): Remove read-only mark `*' from + interactive. + (LaTeX-fill-move-to-break-point): Use `*' instead of `+' for + looking back Japanese Macro in order to prevent breaking line just + after TeX-esc, in other words, not to break TeX command `\JJJ' + into `\' and `JJJ'. Use variable linebeg instead of function + line-beginning-position. + +2005-12-17 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec (Provides): Make emacs/site-lisp/preview. + (Release): Bump to 1. + +2005-12-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Version 11.82 released. + +2005-12-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (COMMITTER_NAME, COMMITTER_EMAIL): New variables. + (release-commit): Use them. + + * auctex.spec, configure.ac, doc/auctex.texi, + doc/preview-latex.texi, doc/tex-ref.tex: Bump version number. + + * doc/changes.texi: Minor rewordings for 11.82. + +2005-12-08 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-completing-read-multiple): Mention the availability + of crm.el in recent XEmacs packages. + +2005-12-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-macro-history): New variable. + (TeX-insert-macro): Use it. + +2005-12-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (TeX-texinfo-mode): Do not add braces around + arguments of commands which do not expect them. + + * latex.el (TeX-arg-free): Move to tex.el. + + * tex.el (TeX-arg-free): Move here from latex.el. + (TeX-insert-dollar): Do not abort with an error with an error if a + dollar is inserted in a math construct not started with a dollar. + Issue a message about the mismatch instead and insert the dollar. + + * font-latex.el (font-latex-quote-list): Add default quotes. + (font-latex-add-quotes): New function. + (font-latex-match-quotation): Remove hard-coded quotation mark + lists and adapt `font-latex-quote-list' to the active quote style + instead. Babel-specific quotation mark strings are now added to + `font-latex-quote-list' by style files. + + * style/slovak.el, style/ngerman.el, style/italian.el, + style/german.el, style/danish.el: Add fontification support for + quotation mark strings provided by babel. + +2005-11-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el: Revert last change because it makes math + switch/toggle matching tricks harder to use. + + * latex.el (LaTeX-listify-package-options): New function. + (LaTeX-auto-cleanup): Use it. + (LaTeX-arg-usepackage): Add \usepackage options to style list. + + * tex.el (TeX-insert-quote): Turn opening/closing quotation mark + into "" if <"> is typed with point behind it and insert " with any + following <"> key type. + +2005-11-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp-in-commented-line, texmathp-in-comment): + New functions. + (texmathp-match-environment): Use them. + (texmathp-match-switch): Make aware of comments. + +2005-11-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/MinionPro.el: New file. Contributed by Mark Trettin. + + * Makefile.in (STYLESRC): Add style/MinionPro.el. + + * doc/changes.texi: Advertise support for MinionPro.sty. + + * RELEASE (IMPORTANT): Add Mark. + +2005-11-25 David Kastrup <dak@gnu.org> + + * doc/todo.texi (Wishlist): Add suggestion about longlines.el. + +2005-11-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-toggle-debug-warnings): Use correct variable for + state indication. + (TeX-kpathsea-format-alist): Add entry for "sty". + Prevents kpathsea-based search from failing e.g. in case of \usepackage + insertion. + + * doc/changes.texi: Document removal of + `font-latex-title-fontify' alias. + + * font-latex.el: Remove alias for `font-latex-title-fontify'. + (font-latex-make-user-keywords): Use hack from tex-mode.el to + fontify the backslash in "\end{verbatim}" and similar correctly. + (font-latex-set-syntactic-keywords): Use the backslash of + "\end{verbatim}" and similar for the syntax property, not the + newline character which led to fontification going wild when text + at the end of the environment was inserted. + +2005-11-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Mention completion support for LaTeX packages. + + * RELEASE: Update for 11.82. + +2005-11-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-site.el.in (tex-site-unload-hook): Don't let it fail on + Emacs 21. + +2005-11-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Fix key binding for + `TeX-toggle-debug-bad-boxes'. + + * doc/auctex.texi (Quotes): Document change of + `TeX-insert-braces'. + (Filling): `M-g' for `LaTeX-fill-region' has been deactivated for + a long time. Reflect that in the documentation. + + * tex.el (TeX-token-char): Doc fix. + (TeX-insert-braces): Do something more sensible if region is + activated. + +2005-11-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-parse-error): Do not match empty strings. + +2005-11-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-toggle-debug-boxes): Move to tex.el. + (TeX-LaTeX-sentinel-has-warnings) + (TeX-LaTeX-sentinel-has-bad-boxes): New functions. + (TeX-LaTeX-sentinel): Check for warnings and bad boxes and inform + the user is the respective options are non-nil. + (TeX-parse-error): Conditionalize checking for warnings and bad + boxes. Find warnings without line numbers as well. + (TeX-warning): Doc fix (no need to return nil anymore). + Support warnings without line numbers. + + * tex.el (TeX-toggle-debug-boxes): Do not autoload. + (TeX-debug-bad-boxes): Doc fix. + (TeX-debug-warnings): New variable. + (TeX-toggle-debug-bad-boxes): Move here from tex-buf.el. + (TeX-toggle-debug-warnings): New function. + (TeX-mode-map): Define new key bindings for + `TeX-toggle-debug-bad-boxes' and `TeX-toggle-debug-warnings'. + (TeX-mode-specific-command-menu-entries): Add or change menu + entries for `TeX-toggle-debug-bad-boxes' and + `TeX-toggle-debug-warnings'. + + * doc/auctex.texi (Debugging): Document debugging support for + warnings and changes of debugging bad boxes. + + * doc/changes.texi: Advertise debugging support for warnings and + changes of debugging bad boxes. + + * font-latex.el (font-latex-set-syntactic-keywords): Doc fix. + Check if LaTeX-specific variables are bound which may be unbound + if font-latex is being used in ConTeXt mode. + +2005-11-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-insert-backslash): Use regular function call instead + of `funcall'. + +2005-11-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-electric-sub-and-superscript): New variable. + (TeX-insert-sub-or-superscript): New function. + (TeX-mode-map): Use `TeX-insert-sub-or-superscript' for `_' and + `^' keys. + (TeX-insert-backslash): New function. + (TeX-mode-map): Use `TeX-insert-backslash' for `\'. + (TeX-electric-escape): Adapt doc string. + + * doc/auctex.texi (Mathematics): + Document `TeX-electric-sub-and-superscript'. + + * doc/changes.texi: Advertise `TeX-electric-sub-and-superscript'. + +2005-10-31 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Do not break lines in + the Japanese Macros. Suggested by Ikumi Keita <ikumi@revery.net>. + +2005-10-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi (Prerequisites): Update information about + development version of Emacs for Debian. + Update information about development version of Emacs for + Mac OS X and Windows. + +2005-10-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/frenchb.el, style/francais.el: Clean up. + +2005-10-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-quote-language-alist, TeX-insert-quote): + Support functions as opening and closing quotation marks. + + * style/frenchb.el: New file. + + * style/francais.el: New file. + + * doc/auctex.texi (European): Document support of French. + + * doc/changes.texi: Advertise support of French. + + * Makefile.in (STYLESRC): Add style/frenchb.el and + style/francais.el. + +2005-10-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi (Configure): Document --with-kpathseasep. + + * doc/auctex.texi (Commands): Add index entry for PDF mode. + + * configure.ac (preview_enabled): Export `TEX' in unquoted form. + +2005-10-23 David Kastrup <dak@gnu.org> + + * style/babel.el (LaTeX-babel-package-options): Only use 2 + argument form of defvaralias in order not to make XEmacs barf. + +2005-10-23 Arne Jørgensen <arne@arnested.dk> + + * style/amstext.el (LaTeX-amstext-package-option): New variable. + + * style/amstex.el (LaTeX-amstex-package-options): New variable. + + * style/amsopn.el (LaTeX-amsopn-package-options): New variable. + + * style/amsmath.el (LaTeX-amsmath-package-options): New variable. + + * style/amsbsy.el (LaTeX-amsbsy-package-options): New variable. + + * style/fancyref.el (LaTeX-fancyref-package-options): + New variable. + + * style/harvard.el: Updated GPL to version 2. Fixed FSF address. + (LaTeX-harvard-package-options): New variable. + + * style/index.el (LaTeX-index-package-options): New variable. + + * style/listings.el (LaTeX-listings-package-options): + New variable. + + * style/makeidx.el (LaTeX-makeidx-package-options): New variable. + + * style/mdwlist.el (LaTeX-mdwlist-package-options): New variable. + + * style/multind.el (LaTeX-multind-package-options): New variable. + + * style/natbib.el (LaTeX-natbib-package-options): New variable. + + * style/nicefrac.el (LaTeX-nicefrac-package-options): + New variable. + + * style/paralist.el (LaTeX-paralist-package-options): + New variable. + + * style/units.el (LaTeX-units-package-options): New variable. + + * style/scrpage2.el (LaTeX-scrpage2-package-options): + New variable. + +2005-10-21 Reiner Steib <Reiner.Steib@gmx.de> + + * toolbar-x.el (toolbarx-find-image): Fix previous commit. + +2005-10-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-mik.el (tex-site): Require 'tex-site no more. + + * doc/changes.texi: Document removal of 'tex-site requirement from + `tex-mik.el'. + + * configure.ac (packagedir): Quote value of `infodir'. + +2005-10-20 David Kastrup <dak@gnu.org> + + * toolbar-x.el: Revert mostly to 2005-05-02 state, but add a + fallback to find-image. + +2005-10-20 Reiner Steib <Reiner.Steib@gmx.de> + + * toolbar-x.el (toolbarx-find-image): Use image-search-load-path + and image-load-path when available. + (toolbarx-find-image): Revert previous fix. Instead, rely on + find-image whenever possible and don't abuse locate-library. + +2005-10-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-user-keywords): Append string + face in order to make string fontification of ``foo $bar$ baz'' + constructs work. + +2005-10-19 Arne Jørgensen <arne@arnested.dk> + + * latex.el (LaTeX-arg-usepackage): + If `LaTeX-<package>-package-options' is bound and nil don't ask for + package options. + + * style/verbatim.el (LaTeX-verbatim-package-options): + New variable. + + * style/varioref.el (LaTeX-varioref-package-options): + New variable. + + * style/url.el (LaTeX-url-package-options): New variable. + + * style/subfigure.el (LaTeX-subfigure-package-options): + New variable. + + * style/inputenc.el (LaTeX-arg-inputenc-inputenc): Doc fix. + (LaTeX-inputenc-package-options): Doc fix. + + * style/dk-bib.el (LaTeX-dk-bib-package-options): Doc fix. + + * style/captcont.el (LaTeX-captcont-package-options): + New variable. + + * style/booktabs.el (LaTeX-booktabs-package-options): + New variable. + + * style/babel.el: Add doc string to `LaTeX-babel-package-options' + and use `defvar' instead of `setq'. + + * style/alltt.el (LaTeX-alltt-package-options): New variable. + +2005-10-13 Reiner Steib <Reiner.Steib@gmx.de> + + * style/dk-bib.el, style/inputenc.el: Add coding cookie. + Delete trailing whitespace. Reindent. + +2005-10-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/dk-bib.el (LaTeX-dk-bib-package-options): Define only + once. + +2005-10-13 Jan-Ake Larsson <jalar@mai.liu.se> + + * tex-buf.el: Change defcustom group from TeX-commands to TeX-command + +2005-10-12 Arne Jørgensen <arne@arnested.dk> + + * tex.el: Provide a `TeX-completing-read-multiple' either by + defalias'ing `completing-read-multiple' or defining a wrapper + around `multi-prompt'. + + * latex.el (LaTeX-arg-usepackage): New function. Asks about what + package to use, loads the AUCTeX style file, and asks about + package options (possibly based on definitions in the AUCTeX + style file). + (LaTeX-common-initialization): Use it. + + * style/babel.el: Define `LaTeX-babel-package-options' to be a + list of languages/options for the babel package. + + * style/inputenc.el: New file. + + * style/dk-bib.el: New file. + + * Makefile.in (STYLESRC): Add style/inputenc.el and + style/dk-bib.el. + +2005-10-10 Arne Jørgensen <arne@arnested.dk> + + * latex.el (LaTeX-auto-regexp-list): Remove spurious characters + in variable definition. + +2005-10-10 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (top): Index "tool bar" and "toolbar". + Use "tool bar" in the text. + + * doc/changes.texi: Use "tool bar". + + * auctex.spec: Install auctex.el and preview-latex.el for SuSE + too. Don't use extraconfig. + +2005-10-07 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Re-add fixed spec file. + +2005-10-07 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-token-char): New variable. + (plain-TeX-auto-regexp-list): Use it. + Suggested by Ikumi Keita <ikumi@revery.net>. + + * latex.el (LaTeX-auto-regexp-list, BibTeX-auto-regexp-list): + Use it. + + * tex-jp.el (LaTeX-auto-regexp-list, plain-TeX-auto-regexp-list) + (BibTeX-auto-regexp-list): Remove. + +2005-10-06 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec: Fixes for Fedora. Create site-start.d and add + files. + +2005-10-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-BibTeX-sentinel): Shorten message in case of + errors. + + * Makefile.in (install-lisp): Use MULESRC instead of MULEELC + because a `c' is already being appended by the installation code. + + * tex-jp.el (japanese-TeX-command-list): Remove obsolete + `TeX-run-LaTeX' option. + + * tex.el (TeX-current-macro): New function. + + * latex.el (LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-delims-local) + (LaTeX-verbatim-macros-with-braces) + (LaTeX-verbatim-macros-with-braces-local) + (LaTeX-verbatim-environments, LaTeX-verbatim-environments-local): + New variables. + (LaTeX-verbatim-macro-boundaries, LaTeX-current-verbatim-macro) + (LaTeX-verbatim-p, LaTeX-search-forward-comment-start): + New functions. + (LaTeX-verbatim-macros): Remove. + (LaTeX-fill-region-as-para-do): Simplify. + (LaTeX-fill-move-to-break-point): + Use `LaTeX-verbatim-macros-with-delims'. + (LaTeX-fill-paragraph, LaTeX-fill-code-comment): Handle comment + starters in verbatim constructs correctly. + + * font-latex.el (font-latex-verbatim-environments) + (font-latex-verbatim-environments-local) + (font-latex-verb-like-commands) + (font-latex-verb-like-commands-local) + (font-latex-verbatim-macros, font-latex-verbatim-macros-local): + Remove. + (font-latex-set-syntactic-keywords): Use new `LaTeX-verbatim-*' + instead of `font-latex-verb*' variables. + + * doc/auctex.texi (Font Locking): Document change of + verbatim-related variables. + + * doc/changes.texi: Document change of verbatim-related variables. + + * style/alltt.el ("alltt"): Use new variables for verbatim + constructs. + + * style/listings.el ("listings"): Use new variables for verbatim + constructs. + + * style/url.el ("url"): Use new variables for verbatim constructs. + + * latex.el (LaTeX-insert-environment): Mostly rewritten. + Improve handling of macrocode environments. + +2005-10-02 Christian Schlauer <cschl@arcor.de> + + * tex-buf.el (TeX-BibTeX-sentinel): Check whether BibTeX reports + any warnings or errors. + + * doc/changes.texi: Mention it. + +2005-10-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp-match-environment): Make aware of + comments. + +2005-09-29 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/install.texi (Customizing): Remove "Contributed files" + section. + Suggested by Ikumi Keita <ikumi@revery.net>. + +2005-09-29 Ikumi Keita <ikumi@revery.net> + + * texmathp.el (texmathp-tex-commands-default): Remove "xxalignat*" + and add "boxed". + +2005-09-27 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec: Add files in %{_datadir}/emacs/site-lisp. + Suggested by Jan-Ake Larsson. Added startfiles. + Exclude %{_infodir}/dir. + +2005-09-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Document option for specifying AUCTeX startfile as + --with-auctexstartfile, not --with-auctex-startfile which does not + work. Note that changing the internal name from `auctexstartfile' + to `auctex-startfile' is not an option because of the `-' in the + name which gives the shell headaches. + + * auctex.spec: Adapt to --with-auctexstartfile and + --with-preview-startfile. + + * doc/install.texi (Configure): Document change from + --with-auctex-startfile to --with-auctex-startfile and + --with-preview-startfile to --with-previewstartfile. + +2005-09-26 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec: Bump version number. Remove install-contrib, use + install-docs. Don't install preview/* because these are not + generated. + +2005-09-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (tar-ball): Don't create WWW directory and don't + copy HTML files. + (www-doc): New target. + +2005-09-25 David Kastrup <dak@gnu.org> + + * Version 11.81 released. + +2005-09-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE, configure.ac, font-latex.el, doc/auctex.texi, + doc/changes.texi, doc/preview-latex.texi, doc preview-readme.texi, + doc/tex-ref.texi, doc/todo.texi: Bump version number. + + * Makefile.in (DISTCLEANFILES): Add tex-site.el.out. + +2005-09-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (tar-ball): Remove dysfunctional spec file from + distribution. + (full-release): Disable RPM creation. + + * doc/auctex.texi: Bump version number. + + * configure.ac: Bump version number. + +2005-09-24 David Kastrup <dak@gnu.org> + + * doc/install.texi (Advice for package providers): + Suggest "anytex" instead of "notex" for without-texmf compilations. + +2005-09-23 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-site.el.in (TeX-modes-set): Add custom group. + +2005-09-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-auto-parse-length, TeX-auto-x-parse-length) + (TeX-auto-x-regexp-list): Doc fix. + +2005-09-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp-tex-commands-default): Add "minipage" as + `env-off' and "\framebox" as `arg-off'. + +2005-09-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Update for upcoming release. + + * doc/changes.texi: Mention `font-latex-slide-title-face' and + `font-latex-match-slide-title-keywords'. + + * doc/auctex.texi (Font Locking): + Document `font-latex-slide-title-face' and + `font-latex-match-slide-title-keywords'. + +2005-09-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-match-defun): Fontify only if + `font-latex-match-*-keywords' and + `font-latex-match-*-keywords-local' are non-empty. + (font-latex-make-match-defun): Revert. + (font-latex-make-built-in-keywords): Do not set + `font-latex-match-*' if there are no keywords. (Nicer solution + than the original change in `font-latex-make-match-defun'.) + +2005-09-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-built-in-keyword-classes): + New `slide-title' class. + (font-latex-slide-title-face): New face. + Specify :size for XEmacs. + + * style/beamer.el ("beamer"): Fontify \frametitle with + `font-latex-slide-title-face'. + +2005-09-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-command): Doc fix. + +2005-09-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp-tex-commands-default): Add "\textrm" as + `arg-off'. + +2005-08-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-font-replace-macro): Compute syntax table. + +2005-08-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-common-initialization): Remove redundant call to + `make-local-variable' for `outline-heading-alist'. + Set `outline-heading-alist' only if it is already defined. + +2005-08-26 Matthieu Moy <Matthieu.Moy@imag.fr> (tiny change) + + * latex.el (LaTeX-common-initialization): + Set `outline-heading-alist'. + +2005-08-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-mark-section): Now marks subsections as well. + Former behavior is available via prefix argument. + + * doc/changes.texi: Mention change of `LaTeX-mark-section'. + +2005-08-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-script): Return face symbols, not + names of non-existent variables. + + * tex.el (TeX-font-replace-macro): Do not use `TeX-find-macro-end' + for it may look too far in cases like "\emph{foo}{}". + Use `forward-sexp' with a stripped syntax table instead. + +2005-08-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/wininstall.texi: New "In a Nutshell" section. + +2005-08-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Quotify `packagelispdir' and `packagedatadir'. + (preview_enabled): Export unquoted variables. + Declare/initialize and export variables separately. + + * Makefile.in (DESCEND): Quote $$OLDPWD. + +2005-08-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (Adding Macros): Remove superfluous entry for + `TeX-arg-file' and correct entry for `TeX-arg-input-file'. + + * latex.el (TeX-arg-input-file): Doc fix. + + * tex.el (TeX-command-list): Remove `TeX-run-LaTeX'. + Add `TeX-run-ispell-on-document' in order to prevent mismatch in + customization buffer. + +2005-08-05 David Kastrup <dak@gnu.org> + + * font-latex.el (font-latex-doctex-preprocessor-face): + Remove `list' from already quoted list. + +2005-08-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-region): In case of single-char non-letter + macros there does not have to be checked for a partial match. + This allows for folding of stuff like \,. + +2005-08-01 Berend de Boer <berend@pobox.com> + + * context-en.el (ConTeXt-setup-list-en): typo fixed. + +2005-07-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-set-syntactic-keywords): Set and + update `font-latex-doctex-syntactic-keywords' here. + (font-latex-doctex-syntactic-keywords): Default to nil. + + * doc/auctex.texi (Japanese): Remove references to contrib make + targets. Minor clean-ups. + + * aclocal.m4 (library): Replace COMPILE_MULE and CONTRIB_MULEELC + with MULESRC and MULEELC. + + * Makefile.in (CONTRIB, CONTRIBELC, CONTRIB_MULE, COMPILE_MULE) + (CONTRIB_MULEELC): Remove. + (MULESRC, MULEELC): New variables. + (AUCSRC): Add bib-cite.el and tex-fptex.el. + (CLEANFILES): Remove CONTRIBELC and CONTRIB_MULEELC. Use MULEELC + instead. + (.PHONY): Remove contrib, install-contrib and install-contrib-el + targets. + (lisp): Depend on STYLESRC and MULESRC. Compile MULESRC as well. + (auto-loads.el): Use MULESRC. + (contrib, install-contrib-el, install-contrib): Remove. + (install-el): Install MULESRC. + (install-lisp): Install MULEELC. + + * style/csquotes.el: Bring up to par with csquotes 3.0. + (LaTeX-csquotes-insert-environment): New function. + +2005-07-15 David Kastrup <dak@gnu.org> + + * doc/preview-todo.texi: Mention that preview.dtx is not a + showpiece for AUCTeX. + +2005-07-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-run-style-hooks): Adjust `default-directory' to + match the directory of the style. + +2005-07-14 David Kastrup <dak@gnu.org> + + * doc/install.texi (Configure): explain about --without-packagedir. + (Advice for package providers): Same here. + + * aclocal.m4 (EMACS_PATH_LISPDIR): Allow packagedir=no with XEmacs. + + * configure.ac: protect against packagedir starting with `-' + +2005-07-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-match-math-envII): Match environment + begin and end with whitespace between macro and argument as well. + + * doc/install.texi (Configure): Add `file' macro. + + * texmathp.el (texmathp-match-environment): Match environment + begin and end with whitespace between macro and argument as well. + +2005-07-12 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: + + * doc/install.texi (Configure): Explain prefix a bit more. + + * doc/Makefile.in (install-man): include tex-ref.tex. + +2005-07-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-insert-quote): Do not inhibit special quote + insertion in docTeX documentation parts. + + * font-latex.el (font-latex-match-command-with-arguments) + (font-latex-match-command-in-braces): Remove call to + `font-latex-commented-outp'. + (font-latex-match-quotation): Do not consider matches in comments + or verbatim-like constructs. Fix typo. + +2005-07-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-move-to-break-point): Make non-MULE + XEmacsen happy. + (LaTeX-fill-paragraph): Don't treat trailing comment starters as + code comments. + + * font-latex.el (font-latex-match-quotation): Always use multibyte + strings for comparison. + + * doc/auctex.texi (top): Make the summary notes appear as + "Executive Summary" in printed output. + + * doc/intro.texi: Main heading in rawtext case should not be + numbered. Main heading in printed output has to be chapter, not + section, in order to fit into the rest of the sectioning + hierarchy. + (Introduction): Add two intermediate headings in order to make the + structure clearer. + + * doc/.cvsignore: Add auto directory. + +2005-07-06 David Kastrup <dak@gnu.org> + + * doc/tex-ref.tex: Rearrange and add information for preview-latex. + +2005-07-05 David Kastrup <dak@gnu.org> + + * doc/preview-latex.texi (Simple customization): Document new + option `preview-preserve-counters'. + + * doc/auctex.texi (top): Mention RefTeX, `LaTeX-install-toolbar' + and preview-latex. + +2005-07-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-submit-bug-report): Mention FAQ section. + + * doc/changes.texi: Advertise inclusion of preview-latex and + overhaul of installation procedures. + + * doc/install.texi (Advice for package providers): Refer to + preview-latex.el file. + + * doc/quickstart.texi (Quick Start): Use (load "auctex.el" nil t + t) instead of (require 'tex-site). + + * doc/faq.texi: Use (load "auctex.el" nil t t) instead of (require + 'tex-site). + + * doc/intro.texi (Introduction): Use (load "auctex.el" nil t t) + instead of (require 'tex-site). + +2005-06-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (Folding): Do not quote `lambda' function. + +2005-06-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-quotes): Get rid of :set function and + move most of its content to `font-latex-match-quotation'. + (font-latex-quotes-control): New variable. Initialize with nil. + (font-latex-match-quotation): Use it. + The whole changeset lets quote matching recognize automatically + when the value of `font-latex-quotes' changed while making sure + that the regexp only has to be rebuilt when a change actually + occured. + + * doc/todo.texi (Mid-term Goals): Update text about integration of + preview-latex. + + * doc/auctex.texi (Floats): Clarify use of + `LaTeX-top-caption-list'. + (Display, Internationalization): Make node and heading clearer. + (European): Describe insertion of multiple consecutive hyphens. + +2005-06-24 David Kastrup <dak@gnu.org> + + * RELEASE: Minor change. + + * configure.ac: Move checks and export for PERL here (needed for + doc of preview-latex). + (preview_enabled): Don't export Info-related variables, as they + are not needed in preview. + + * Makefile.in (AUCTEXVERSION): import. + (info, dvi): No subshell needed. + (auctex.el): Depend on config.status + (install-metadata): pass upstream version into prv-install.el + +2005-06-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (TeX-texinfo-mode): Use `TeX-run-mode-hooks'. + + * latex.el (TeX-latex-mode): Use `TeX-run-mode-hooks'. + + * context.el (ConTeXt-mode-common-initialization): + Use `TeX-run-mode-hooks'. + + * configure.ac: Make info about configuration clearer (in + connection with the message for preview-latex). + + * tex.el (TeX-master-file): `TeX-default-extension' is a variable, + not a function. + (TeX-run-mode-hooks): New function. + (TeX-plain-tex-mode, ams-tex-mode): Use it. + +2005-06-21 David Kastrup <dak@gnu.org> + + * Makefile.in (xemacs-package): reorder args. + + * configure.ac: disable INSTALL_INFO for XEmacs package. + + * doc/Makefile.in (install-man): Use $$i instead of $i. + +2005-06-20 David Kastrup <dak@gnu.org> + + * doc/install.texi (Advice for package providers): Propose package + structure. + + * doc/Makefile.in (install-man): Install sources for texinfo + files. + (.PHONY): Add install-man. + + * Makefile.in (.PHONY): Add install-man and xemacs-package + (install-man): Just descend into doc directory. + (xemacs-package): Try building some XEmacs package. + + * autogen.sh: Don't run distclean, that seems unexpected. + + * RELEASE: Further fold in stuff from preview/RELEASE which is now + deleted. + +2005-06-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-superscript-face) + (font-latex-subscript-face): Add to correct customization group. + (font-latex-match-command-with-arguments) + (font-latex-match-command-in-braces, font-latex-match-math-env): + Don't set a dummy match. Remove unnecessary throw..catch clauses. + +2005-06-18 David Kastrup <dak@gnu.org> + + * RELEASE: Well, the merge with preview-latex is no longer + "planned". + +2005-06-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/preview-faq.texi (Requirements): Denastify. + + * tex.el (TeX-master-file): Don't override existing master with + `TeX-transient-master'. + + * tex-style.el (LaTeX-includegraphics-read-file): Doc fix. + +2005-06-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi (Prerequisites): Denastify. + + * doc/auctex.texi (Font Locking): Fix typo. + + * configure.ac: Use correct variable for --disable-preview switch. + +2005-06-15 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * Makefile.in (auto-loads.el): Auto-load COMPILE_MULE, too. + +2005-06-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Update stuff about fixed bugs and new features. + +2005-06-14 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Spell out file names more explicitly. + Remove any hint of a version that might lead Windows users to + assume this documentation is for some reason more outdated than + year-old stuff they find via Google. + + * Makefile.in (install-docs): Make exit status of test bad-shell + safe. + +2005-06-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (all): Do not depend on `docs' target. + (.PHONY): Remove `docs'. Add `info' and `dvi'. + (docs): Remove. + (info, dvi): New targets. + (tar-ball): Make sure `dist' stuff is up-to-date. + Revert, as it is superfluous. + + * doc/Makefile.in (dist): Correct file name for + preview-latex.info. + (info, dvi): New targets. + (.PHONY): Add them and remove `auctex' and `preview'. + (auctex, preview): Remove. + +2005-06-14 David Kastrup <dak@gnu.org> + + * RELEASE: Adapt RELEASE notes to include preview-latex info. + + * README.CVS: Adapt to reality. + + * doc/Makefile.in (all): Same as dist. + (dist): Just create DISTTEXTS and info files. + (extradist): Additional stuff for ftp site. + (disttexts): Remove target. + (clean): Don't remove info files. + (maintainer-clean): Remove info files. + + * autogen.sh: Add error messages, run autoconf in preview + subdirectory. Heed MAKE variable if set. + + * Makefile.in (CVSFILES): Define files not to use in tarball. + (tar-ball): Remove them. + (tar-ball): Make extradist for additional doc files on ftp. + +2005-06-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-ispell-document): Cater for the case where the + master file is located in a different directory. + (TeX-run-ispell-on-document, TeX-ispell-document): Doc fix. + +2005-06-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-master-file): Check `TeX-transient-master' not only + in the shared case. + + * tex-buf.el (TeX-region-create): Let-bind `TeX-transient-master'. + +2005-06-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (Parsing Files): Fix display of reference. + Get rid of references to \documentstyle. + (Simple Style, Adding Macros, Adding Environments) + (Hacking the Parser): Clean up code examples. + + * tex.el (TeX-master-file-ask): Get rid of "<default>" string as + default for `read-file-name'. Fixes unresponsiveness of Emacs on + Windows and fallback to minibuffer if file is opened via menu and + prevents file history from being cluttered. Use relative file + name for master file. + (TeX-master-file): Get rid of "this file" string as default for + `read-file-name'. + +2005-06-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-ellipsis): New variable. + (TeX-fold-hide-item): Use it. + + * Makefile.in (DESCEND): Make MSYS happy if $(subdirs) is null, + e.g. when --disable-preview is used. + Make the change more safe with regard to the exit code. + +2005-06-09 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Change line endings blurb. Write drive: + everywhere in the example strings. + + * doc/preview-readme.texi (Introduction): Some cosmetic changes to + account for the merge. + + * mkinstalldirs: + + * install-sh: Replace `#/bin/sh' with `:' as this should be more + portable when called from a Bourne shell (which is what the + Makefiles do). + +2005-06-08 David Kastrup <dak@gnu.org> + + * doc/preview-dtxdoc.pl: Replicate possible CR line endings + faithfully, and don't use multiline strings. + +2005-06-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/.cvsignore: Ignore all *.info, *.info-*, and *.pgs files. + + * Makefile.in (preview_enabled): New variable. + (all): Depend on `docs' target. + (.PHONY): Add `docs' target. + (docs): New target. + (install): Depend on `install-docs' instead of `install-info'. + (install-info): Remove. + (install-docs): New target. + + * autogen.sh: Generate preview-latex docs as well. + + * configure.ac: Substitute preview_enabled variable in output + files. + + * doc/.cvsignore: Add relevant preview-latex files. + + * doc/Makefile.in (TEXIFILES): Rename to AUCTEXTEXIFILES. + (PERL, PREVIEWTEXIFILES): New variables. + (all): Now depends on `auctex' and `preview' targets. + Move AUCTeX-specific targets from original to `auctex'. + (install): Now depends on `install-auctex' and `install-preview' + targets. Move AUCTeX-specific targets and content from original + to `install-auctex'. + (.PHONY): Add `auctex', `preview', `install-auctex', and + `install-preview'. + (auctex, install-auctex, preview, install-preview): New targets. + (auctex.dvi, auctex.pdf, auctex.info): Depend on + $(AUCTEXTEXIFILES) instead of $(TEXIFILES). + (preview-latex/index.html, html-docs, preview-dtxdoc.texi) + (preview-latex.dvi, preview-latex.ps, preview-latex.pdf) + (preview-latex.info, ../PROBLEMS): New targets (from + preview/doc/Makefile.in). + (../README, ../TODO, ../FAQ): Create output combined from + respective AUCTeX and preview-latex files. + (clean, maintainer-clean): Cater for preview-latex files. + + * doc/todo.texi (Development): More specific heading for plain + text output. + + * doc/preview-todo.texi: Move here from preview/doc/todo.texi. + + * doc/preview-readme.texi: Move here from preview/doc/readme.texi. + + * doc/preview-problems.texi: Move here from + preview/doc/problems.texi. + + * doc/preview-faq.texi: Moved here from preview/doc/faq.texi. + + * doc/copying.texi, doc/preview-dtxdoc.pl, doc/preview-latex.texi: + Moved here from preview/doc/. + +2005-06-07 David Kastrup <dak@gnu.org> + + * tex.el (TeX-regexp-group-count): New function. + (TeX-auto-parse-region): Rewrite to use hashes and to save overuse + of `looking-at'. We really should keep the relevant information + complete in hashes instead of moving them forward and back between + hashes and lists, but at least this change removes most of the + really evil quadratic behavior while keeping the original API. + Yet. + +2005-06-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-fontify-sectioning): Doc fix. + + * doc/auctex.texi (Font Locking): Document the nature of the + `color' option for `font-latex-fontify-sectioning'. + +2005-06-06 David Kastrup <dak@gnu.org> + + * configure.ac: Remove call of MAKEINFO_CHECK_MACROS: we expect a + recent enough makeinfo version if you want to bootstrap, anyway. + +2005-06-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-bar.el (TeX-bar-LaTeX-button-alist) + (menu-strings-buttons-alist): help-echo functions are called with + arguments. + +2005-06-06 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (TEXINFOINCLUDES): Remove. + (MAKEINFO_MACROS): Remove. + + * tex-buf.el (TeX-format-filter): Don't let match-data generate + markers. This is a terrible performance hog! + (TeX-format-filter): Actually, we don't need to save any + match-data inside of a filter function with current versions of + Emacs and XEmacs. + +2005-06-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/scrbase.el, style/scrbook.el, style/scrreprt.el: Use + `sectioning' instead of `title' for sectioning fontification. + + * doc/changes.texi: Mention change of `title' to `sectioning' for + keyword variables. + + * font-latex.el (font-latex-fontify-sectioning) + (font-latex-built-in-keyword-classes) + (font-latex-keyword-matcher): Use `sectioning' instead of `title'. + (font-latex-deactivated-keyword-classes): New variable. + Don't do extra quoting. + (font-latex-make-built-in-keywords): Remove unnecessary `let'. + Check `font-latex-deactivated-keyword-classes' in generated + `font-latex-match-*-make' functions. + + * tex.el (TeX-quote-language-alist): Do not use `alist' widget + because XEmacs 21.4 does not provide it. Do not use a cons cell + for opening and closing quotation marks in order to simplify + structure. + (TeX-quote-language): Describe structure as in + `TeX-quote-language-alist'. + (TeX-insert-quote): Adapt to new structure of `TeX-quote-language' + and `TeX-quote-language-alist'. + + * doc/auctex.texi (European): Describe new structure of + `TeX-quote-language-alist'. + (Font Locking): Use `sectioning' instead of `title'. + Describe deactivation of built-in keyword classes. + + * style/csquotes.el, style/czech.el, style/danish.el, + style/german.el, style/italian.el, style/ngerman.el, + style/slovak.el, style/swedish.el: Reflect new structure of + `TeX-quote-language'. + +2005-06-04 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (TEXINFOINCLUDES): macros.texi has moved here + from ../preview/doc + (../INSTALL, ../INSTALL.windows, ../README, ../CHANGES, ../TODO) + (../FAQ): Change dependencies accordingly. + + * configure.ac: Rearrange checks for MAKEINFO. + Export more stuff into preview's configure. Maybe this is better + done with use of caches? + + * autogen.sh: Don't look in preview subdirectory. + + * Makefile.in (configure): Depend on local aclocal.m4 + +2005-06-03 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (TEXINFOINCLUDES, TEXIFILES, ../INSTALL) + (../INSTALL.windows, ../README, ../CHANGES, ../TODO, ../FAQ): + Move ../preview/doc/macros.texi to here again. + +2005-06-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (VirTeX-common-initialization): Explicitely make + `find-file-hooks' buffer-local in XEmacs 21.4 which fails to do + this via `add-hook'. + +2005-06-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-backward-paragraph): Use catch..throw instead of + an indicator variable. Don't refer to a saved match data. + Check for `TeX-esc', not specific char. + + * style/babel.el ("babel"): Disable font locking of macros not + handled correctly. + +2005-05-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/babel.el: New file. + + * Makefile.in: Add style/babel.el. + + * doc/changes.texi: Mention babel support. + +2005-05-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-next-error): Call `next-error' as fallback. + (TeX-previous-error): New function. + + * tex.el (TeX-mode-map): Remap bindings of `next-error' and + `previous-error' to `TeX-next-error' and `TeX-previous-error' + respectively. + +2005-05-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-command-list): Remove chktex comment. + + * doc/auctex.texi (Checking): A user should not (have to) edit + tex.el to switch from lacheck to chktex. + + * font-latex.el (font-latex-make-match-defun) + (font-latex-make-built-in-keywords): Do not byte-compile generated + functions here but at the end of font-latex.el. + Prevents byte-compiler warnings due to possibly undefined functions. + +2005-05-24 David Kastrup <dak@gnu.org> + + * configure.ac: Recurse into preview _before_ starting any + AC_SHELL_QUOTIFY business to avoid double quoting. + + * doc/tex-ref.tex (\title{RefTeX (long)}) + (\title{RefTeX (short)}): New columns. One will have to go. + +2005-05-22 David Kastrup <dak@gnu.org> + + * tex.el (TeX-PDF-mode): Use the standard minor mode function + instead of redefining it. + (TeX-PDF-mode-parsed): New function replacing the previous extra + functionality in `TeX-PDF-mode'. + (TeX-PDF-mode-on, TeX-PDF-mode-off): Warn in docstring. + Use `TeX-PDF-mode-parsed'. + +2005-05-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi, doc/wininstall.texi: Small corrections. + + * tex-bar.el (TeX-bar-LaTeX-button-alist): Reenable mode-specific + images for View button. + (LaTeX-install-toolbar): Add `toolbarx-refresh' to + `TeX-PDF-mode-hook'. + + * tex.el (TeX-PDF-mode): Run `TeX-PDF-mode-hook'. + +2005-05-21 David Kastrup <dak@gnu.org> + + * autogen.sh: Remove argument to preview/autogen.sh + + * doc/install.texi: Integrate the installation instructions for + preview-latex. + +2005-05-20 David Kastrup <dak@gnu.org> + + * doc/tex-ref.tex (section{Greek Letters}): Add \Xi. + +2005-05-18 Ikumi Keita <ikumi@revery.net> + + * style/amsmath.el (LaTeX-label-alist): Add "multline" environment. + + * Makefile.in: + * configure.ac: + * preview/Makefile.in: Change "==" to "=" in the argument of + "test" for Bourne shell compatibility. + +2005-05-19 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Rearrange to make suitable for standalone + installation including preview-latex. Adapt to a few + changes (like tex-fptex and tex-mik not being in load-path by + default). + +2005-05-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-site.el.in (tex-site-unload-hook, TeX-modes): Do not use + `dolist'. Prevents console pop-ups with XEmacsen on Windows. + + * latex.el (LaTeX-fill-move-to-break-point): Check for + `charset-after' to make non-MULE XEmacsen happy. + Some reformatting. + +2005-05-18 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-math-default): Add Xi (reported by Uli + Fahrenberg). + +2005-05-17 David Kastrup <dak@gnu.org> + + * Makefile.in (EXTRAFILES): remove. No longer needed. + (auto-loads.el): Undo previous change. Properly group statements. + (install-el): Rewrite condition for some non-Posix shells. + (install-metadata): Rewrite condition for non-Posix. + (tar-ball): Change owner and group to root. This is not portable, + but will be needed only by the maintainers, anyway. + (auto-loads.el): ignore errors also for braindead make. + (install-metadata): Same here. + (clean): Burp if cd doc fails. + (distclean): Same here. + (tar-ball): rewrite for braindead shells. + (tar-ball): make sure doc exists. Why do I bother, actually, the + tarball target is not for public consumption, anyway. + +2005-05-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (auto-loads.el): Don't stop on non-zero exit code. + +2005-05-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-transient-master): New variable. + (TeX-master-file): Use it. + + * tex-buf.el (TeX-command-sentinel): Bind `TeX-transient-master'. + +2005-05-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-babel-hyphen): Doc fix. + (LaTeX-common-initialization): Call `easy-menu-add' as late as + possible. + +2005-05-15 Ikumi Keita <ikumi@revery.net> + + * Makefile.in (CLEANFILES): Add $(CONTRIBELC) and + $(CONTRIB_MULEELC). + (DISTCLEANFILES): Add auctex.el and auto-loads.el. + (auto-loads.el): Add $(COMPILE_MULE) + +2005-05-14 Ikumi Keita <ikumi@revery.net> + + * style/amsopn.el: + * style/amsmath.el: Move "mode"-like entries from amsopn.el to + amsmath.el. + + * style/amsmath.el: Edit entries in TeX-add-symbols. + Remove duplicate entry "raisetag". + Add some new entries. + Make arrow macros like "overleftarrows" to take argument. + Remove accents macros like "Hat" because they are obsolate in + amsmath v2. + (LaTeX-item-list): Add "multline*", "matrix", "pmatrix", + "bmatrix", "Bmatrix", "vmatrix" and "Vmatrix" environment. + (LaTeX-label-alist): Remove "aligned" environment. + + * tex-style.el (LaTeX-amsmath-label): Fix doc. + + * latex.el: (LaTeX-math-default): Remove duplicate entry + "nabla". Remove AMS Accents like "Hat" because they are obsolate + in amsmath v2. + (LaTeX-babel-hyphen): Fix doc. + (LaTeX-common-initialization): Edit some entries in TeX-add-symbols. + +2005-05-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Small corrections. + +2005-05-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-make-overlay): Calculate priority before + the overlay is instantiated. + + * font-latex.el (font-latex-match-command-with-arguments): + Make XEmacs happy. + + * latex.el (LaTeX-fill-newline-hook): New hook. + (LaTeX-fill-newline): Use it. + + * tex-fold.el (TeX-fold-keymap): Remove deprecated key bindings. + (TeX-fold-region, TeX-fold-item): Use `TeX-fold-item-end'. Do not + compute display string (now done in `TeX-fold-hide-item'). + (TeX-fold-make-overlay): Do not mess with display string anymore. + Thereby remove it from list of function arguments. + (TeX-fold-item-end, TeX-fold-overfull-p) + (TeX-fold-update-at-point): New functions. + (TeX-fold-buffer-substring): Get 'display property instead of + 'TeX-fold-display-string which is not used anymore. + (TeX-fold-hide-item): Computation of display string and faces as + well as provisions for overfull lines are done only in this + function now. The 'display property is now set for XEmacs as + well. + (TeX-fold-mode): Add and remove `TeX-fold-update-at-point' to + `LaTeX-fill-newline-hook' respectively. + + * tex.el (TeX-overlay-prioritize): Fix oversight in XEmacs version + of the function. + +2005-05-11 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Allow YYYYMMDD-a TAG for snapshots. + +2005-05-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-set-syntactic-keywords): Don't freak + out if there is whitespace in front of the \begin/\end pair of + verbatim and verbatim-like environments. + + * latex.el (LaTeX-auto-cleanup): Discard only options which + actually include a "=". + + * Makefile.in: Whitespace cleanup. + + * tex.el (TeX-overlay-prioritize): Fix calculation of priority for + in-between overlay. + (TeX-insert-quote): Insert TeX quote if point is just before math, + comment, or verbatim content. + +2005-05-11 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (TEXINFOINCLUDES): Add directory modifier + TEXIPWD. This is ugly. + (html/auctex_toc.html): Use it. + + * Makefile.in (tar-ball): Make tar-ball from exporting, and allow + for TAG being a date specification. + (full-release): Omit release tag check. + +2005-05-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-forward-comment): New function. + Prevent infinite loops and repair regexp. + Simplify. Code mainly by David Kastrup. + (font-latex-match-command-with-arguments): Use it. + Set fontification start of optional argument to opening bracket. + Apply restriction of region more globally. Fix handling of + multiple optional arguments. Break if the end of the first + mandatory argument could not be found. + +2005-05-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-normal-mode): Ask for master file in 'shared case. + + * font-latex.el (font-latex-built-in-keyword-classes): + Doc fix (typo). + (font-latex-match-command-with-arguments): Set macro end before + any comments. Do not move forward over comments if point is over + the limit. + +2005-05-09 David Kastrup <dak@gnu.org> + + * doc/Makefile.in (dist): Use DISTTEXTS instead of explicit list + in this directory. + +2005-05-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (VirTeX-common-initialization): Remove Emacs 20 + compatibility code. Call `TeX-master-file' during load of shared + files as well. + +2005-05-06 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (DOCFILES): Remove macros.texi to make "tar-ball" + work again. + +2005-05-06 David Kastrup <dak@gnu.org> + + * tex.el (TeX-load-style): Fix typo `expand-filename'. + +2005-05-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-local-master-p): Limit search. + + * doc/Makefile.in (TEXINFOINCLUDES): New variable used for file + inclusion with makeinfo, texi2dvi and texi2pdf. + (MAKEINFOINC): Remove. + + * doc/intro.texi (Introduction): Make package activation clearer. + +2005-05-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/intro.texi (Introduction): Be consistent with the display of + commands in the rest of the manual. + + * tex-fold.el (TeX-fold-mode): Improve doc string and add its + first line to the autoload form. + +2005-05-04 David Kastrup <dak@gnu.org> + + * tex-fold.el (TeX-fold-mode): Change autoload cookie because of + XEmacs. + +2005-05-03 David Kastrup <dak@gnu.org> + + * auctex.spec: First attempt + +2005-05-02 David Kastrup <dak@gnu.org> + + * doc/install.texi: + + * doc/intro.texi: + + * doc/wininstall.texi: overhaul. + + * autogen.sh: adapt to auto.texi scheme. + + * toolbar-x.el (toolbarx-install-toolbar): Remove overlong doc + string from autoload. + + * tex-site.el.in (tex-site-unload-hook): Define to remove the + after-load hooks and load-path entry. + (TeX-modes-set): Use defalias instead of fset to allow unloading. + + * README.CVS: Change instructions. + +2005-05-02 David Kastrup <dak@gnu.org> + + * bib-cite.el: Revert 2005-04-19 change: autoloads are not + extracted from CONTRIB packages. + +2005-05-02 David Kastrup <dak@gnu.org> + + * Makefile.in (tex-site.el.out, auctex.el, configure) + (Makefile, config.status): Add targets to get reconfiguration if + necessary. + + * style/url.el: + + * style/ltx-base.el: + + * style/units.el: + + * style/alltt.el: + + * style/alphanum.el: + + * style/jura.el: + + * style/emp.el: + + * style/doc.el: + + * style/slides.el: + + * style/csquotes.el: + + * style/listings.el: + + * style/nicefrac.el: + + * style/ltxdoc.el: + + * style/jurabib.el: + + * style/mdwlist.el: + + * style/amstex.el: Change maintainer address. + + * doc/intro.texi (Introduction): Changes, cleanup, corrections. + +2005-05-01 David Kastrup <dak@gnu.org> + + * doc/install.texi (Prerequisites): Shorten. + (Prerequisites): Mention that one can survive without texinfo. + (Configure): Add prefix information. + (Configure): Sync with preview-latex docs. Mention the + disable-preview option and preview-specific options. + + * configure.ac: Don't use have-preview macro. Conflicts with the + idea of pregenerated docs. + +2005-05-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-match-defun) + (font-latex-make-built-in-keywords): Byte-compile generated + functions. + + * Makefile.in (clean, distclean): Descend. + +2005-05-01 David Kastrup <dak@gnu.org> + + * tex.el (TeX-load-style): Properly expand file names, and fix a + terrible order-of-arguments bug. + + * configure.ac: fix syntax error with MAKEINFO_MACROS + + * tex-site.el.in (TeX-mode-alist): Use correct file name for + texinfo-mode. + + * Makefile.in (AUCSRC): Move tex-style.el before latex.el + + * configure.ac: Add have-preview to macros if we have preview + enabled. + + * doc/Makefile.in (MAKEINFOINC): Use macros.texi in preview/doc + directory. + (auctex.dvi, auctex.pdf, auctex.info, ../INSTALL) + (../INSTALL.windows, ../README, ../CHANGES, ../TODO, ../FAQ): + Use MAKEINFOINC + + * doc/macros.texi: Remove in lieu of version in preview/doc. + + * doc/intro.texi (Introduction): Reorganize, use more of rawfile. + Mention preview-latex. + + * tex-buf.el: + + * tex-fold.el: + + * tex-font.el: + + * tex-fptex.el: + + * tex-info.el: + + * tex-mik.el: Change maintainer to auctex-devel@gnu.org + +2005-04-30 David Kastrup <dak@gnu.org> + + * Makefile.in (install-metadata): Correct version number. + (DESCEND): different quoting. + (install): Same here. + (install-metadata): Don't depend on some exit values. + + * configure.ac: substitute auctexstartfile. Export auctexdir as + `..'. + If installing info into XEmacs package, disable install-info. + If makeinfo is disabled, don't check for macros. + + * Makefile.in (auctexstartfile): autoconf variable. + (subdirs): autoconf variable. + (PACKAGE, PACKAGE_INFO): macros. + (DESCEND): For rebuilding stuff and installing. + (all): descend. + (tex-site.el): don't include autoloads when XEmacs. + (install): descend. + (install-startup): new target + (install-el): don't install tex-site on XEmacs. + (install-el): don't fail on .nosearch not installed. + (install-metadata): new target for XEmacs. + +2005-04-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el: Remove `TeX-doc' for `ams-tex-mode'. + +2005-04-29 David Kastrup <dak@gnu.org> + + * auctex.el.in: + + * context.el: + + * latex.el: + + * tex-jp.el: + + * tex-site.el.in: + + * tex.el: + + * tex-info.el: Remove TeX-doc. + + * tex-info.el (Texinfo-mode): Fix type in alias. + + * tex-site.el.in (tex-site): Provides are added by Makefile. + Remove them here. + + * configure.ac: Generate tex-site.el.out instead of tex-site.el. + + * Makefile.in (AUTOLOAD): New form for autoloads from rest of line. + (all): Make depend on tex-site.el + (lisp): Depend on tex-site.el + (tex-site.el, auto-loads.el): New targets. + +2005-04-28 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-site.el.in (TeX-mode-alist): Exchange value and doc string. + (TeX-modes-set): Check if mode is fbound. + + * doc/changes.texi: Mention changes in sectioning fontification. + + * doc/auctex.texi (Font Locking): Adjust to new sectioning + fontification. + + * font-latex.el: Rename most *-title* stuff to *-sectioning*. + Old names: font-latex-title-%s-face, font-latex-title-fontify, + font-latex-update-title-faces, font-latex-make-title-faces + font-latex-title-max. New names: font-latex-sectioning-%s-face, + font-latex-fontify-sectioning, font-latex-update-sectioning-faces, + font-latex-make-sectioning-faces, font-latex-sectioning-max. + (font-latex-fontify-sectioning): Fix typos in doc string. + +2005-04-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (Development): New name replacing "ToDo". + + * doc/faq.texi, doc/todo.texi: Fix for raw output. + +2005-04-28 David Kastrup <dak@gnu.org> + + * tex-site.el.in (TeX-doc): Use AUCTeX-version. + + * configure.ac: fiddle with relative paths. + + * Makefile.in: several changes to buld structure. + + * auctex.el.in (TeX-doc): Startup file source. + + * doc/wininstall.texi: + + * doc/intro.texi: + + * doc/install.texi: + + * doc/faq.texi: + + * doc/changes.texi: Make the stuff compile cleanly. + + * doc/Makefile.in (DISTTEXTS): list plain text files in parent dir. + (.PHONY): everything needed here. + (auctex.info): don't ignore errors. + (../INSTALL, ../INSTALL.windows, ../README, ../CHANGES) + (../TODO, ../FAQ, disttexts): New targets. + (INSTALL, INSTALL.windows, README, CHANGES, HISTORY, TODO, FAQ): + Remove. + (clean): Don't remove files in this directory. + (maintainer-clean): New target, removes files in parent, too. + + * autogen.sh: Create info files and distribution texts like + preview-latex does, and recurse into preview directory to do the + same. + +2005-04-27 David Kastrup <dak@gnu.org> + + * tex.el (TeX-lisp-directory, TeX-auto-global): + Don't `file-name-as-directory'fy. + (TeX-style-global, TeX-auto-local, TeX-style-local) + (TeX-macro-global, TeX-macro-private): Same here. + (TeX-auto-private): Use expand-file-name. + (TeX-style-private): Same here. + (TeX-check-path): Same. + (TeX-load-style): Adapt. + + * tex-buf.el (TeX-check-files): Be robust against non-slashed + directory names. + (TeX-ispell-document): Same here. + + * tex.el (AUC-TeX-version, AUC-TeX-date): + Protect `make-obsolete-variable' against obsolete Emacsen. + +2005-04-28 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/changes.texi: Mention the fix of Japanese fill problems. + +2005-04-27 David Kastrup <dak@gnu.org> + + * configure.ac: Correct bug reporting address and move stuff over + from preview. + * aclocal.m4: remove, we want the one in preview instead. + + * tex-site.el.in (AUCTeX-version, AUCTeX-date): get via configure. + + * tex.el (info): Add "docTeX" to info prefixes. + (AUCTeX-version, AUCTeX-date): removed to tex-site.el. + (AUC-TeX-version, AUC-TeX-date): Use `make-obsolete-variable'. + Is version 11.50 correct? + + * tex-bar.el (LaTeX-install-toolbar): Adjust toolbarx-image-path. + + * autogen.sh: Use aclocal.m4 from preview subdirectory. + + * tex.el (TeX-submit-bug-report): Add `TeX-command-list' to bug + reports. + +2005-04-23 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-command): Let it accept `TeX-active-master' as + well, by not touching `TeX-current-process-region-p' unless + `TeX-region-file' or `TeX-master-file' have been identified + explicitly. + (TeX-view): Simplify. + (TeX-active-process, TeX-active-buffer): Simplify. + +2005-04-22 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-help-error): Create the correct log file + name corresponding to the current run. + (TeX-error, TeX-warning): Pass runbuffer info into the routines to + get the correct log file name in all circumstances. + +2005-04-20 David Kastrup <dak@gnu.org> + + * configure.ac: don't bother about pre-2.50 autoconf. + Check version more fine-grainedly. + +2005-04-19 David Kastrup <dak@gnu.org> + + * texmathp.el (texmathp-match-switch): Add autoload cookie. + + * tex.el (no-doc): Remove: not needed because autoloads are + documented by the cookie extraction process. + (bibtex-mode-hook): Remove. This will be done by an autoload + cookie from latex.el instead. + (BibTeX-auto-store, LaTeX-math-mode, japanese-plain-tex-mode) + (japanese-latex-mode, texinfo-mode, latex-mode, multi-prompt) + (texmathp, texmathp-match-switch): Remove autoloads since this is + done by cookies extracted into auctex.el. + (TeX-region-create, TeX-save-document, TeX-home-buffer) + (TeX-pin-region, TeX-command-region, TeX-command-buffer) + (TeX-command-master, TeX-command, TeX-kill-job) + (TeX-recenter-output-buffer, TeX-next-error) + (TeX-toggle-debug-boxes, TeX-region-file, TeX-current-offset) + (TeX-process-set-variable, TeX-view): Make comment nil instead of + no-doc. + (font-latex-setup, tex-font-setup): Remove autoloads. Should be + done by cookies instead. + (TeX-tex-mode): rename from tex-mode. + (TeX-plain-tex-mode): rename from plain-tex-mode. + (ams-tex-mode): Change autoload cookie. + + * tex-jp.el (japanese-plain-tex-mode, japanese-latex-mode): + Change autoload cookies. + + * tex-font.el (tex-font-setup): Add autoload cookie. + + * tex-fold.el (TeX-fold-mode, tex-fold-mode): Add autoload + cookies. + + * multi-prompt.el (multi-prompt): Add autoload cookie. + + * latex.el (auto-mode-alist): Add .drv to latex-mode. + (TeX-latex-mode): Change name from latex-mode. + (TeX-doctex-mode): Same here for doctex-mode. Explicitly set + major-mode to doctex-mode: we don't want different modes. + + * tex-info.el (texinfo): Alias texinfo-mode to Texinfo-mode for + symmetry. + (Texinfo-mode): Autoload. + + * context.el (ConTeXt-mode, context-mode): Add definitions and + aliases and autoload cookies. + + * bib-cite.el: Remove autoload from instructions. + + * toolbar-x.el (toolbarx-image-path): New variable. + (toolbarx-make-string-from-symbol) + (toolbarx-make-symbol-from-string, toolbarx-good-option-list-p) + (toolbarx-separate-options, toolbarx-merge-props) + (toolbarx-make-command, toolbarx-emacs-mount-popup-menu) + (toolbarx-xemacs-mount-popup-menu, toolbarx-mount-popup-menu) + (toolbarx-option-value, toolbarx-eval-function-or-symbol) + (toolbarx-test-image-type, toolbarx-test-button-type) + (toolbarx-test-any-type, toolbarx-test-string-or-nil) + (toolbarx-test-toolbar-type, toolbarx-test-dropdown-type) + (toolbarx-test-symbol, toolbarx-test-dropdown-default) + (toolbarx-test-dropdown-save) + (toolbarx-process-group-without-insert, toolbarx-process-group) + (toolbarx-process-symbol, toolbarx-process-dropdown-group) + (toolbarx-find-image, toolbarx-emacs-add-button) + (toolbarx-emacs-refresh-process-button-or-insert-list) + (toolbarx-emacs-refresh, toolbarx-xemacs-image-properties) + (toolbarx-xemacs-button-properties, toolbarx-xemacs-refresh): + Remove autoload cookies. + (toolbarx-find-image): Use `toolbarx-image-path'. + +2005-04-26 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-update-title-faces): Remove unused + variable. Don't call when loading the file. + (font-latex-title-fontify): Document that faces set outside of + customize might be modified. + (font-latex-make-title-faces): Set height or size so that + customize won't complain. + +2005-04-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-interactive-goto-prompt): New function. + (TeX-run-interactive): Use it instead of setting + `comint-scroll-to-bottom-on-output'. Use `add-hook'. + +2005-04-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-update-title-faces): Do not touch + customized faces. + (font-latex-title-fontify): Use `custom-initialize-default'. + (font-latex-make-title-faces): Check for value of `saved-face' + property for determining face customization. + + * tex.el (TeX-find-macro-boundaries): Reimplement. Now handles + \foo{\bar}{ba-!-z} case correctly. + (TeX-find-macro-start-helper): Remove. + +2005-04-22 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-make-title-faces): Define the face, + don't set size. Set parent/inherit conditionally. + (font-latex-update-title-faces): New function. + (font-latex-title-fontify): Add :initialize and :set. + Using `font-latex-update-title-faces' allows changing the height within + an Emacs session. + (font-latex-title-5-face): Rename from title-4-face. + (font-latex-built-in-keyword-classes): Use title-0 and title-5 + faces. + +2005-04-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-run-interactive): Make output buffer scroll. + +2005-04-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-region): Get rid of \_> for matching + macros. It prevents macros immediately followed by numbers from + being found. + +2005-04-17 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/amsmath.el (LaTeX-item-equation): just-one-space before + `\\' at the end of line. + +2005-04-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/harvard.el ("harvard"): Activate harvard citation format + in RefTeX. + +2005-04-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-force-fontify): New variable. + (TeX-fold-buffer): Use it. Make sure the buffer is fontified + before folding is done. + + * doc/auctex.texi (Folding): Mention `TeX-fold-force-fontify'. + + * doc/changes.texi: Mention `TeX-fold-force-fontify'. + +2005-04-14 Ikumi Keita <ikumi@revery.net> + + * style/amsmath.el: Fix comment. + ("amsmath"): Remove duplicate settings of "alignat*" and + "xalignat*" from LaTeX-add-environments. Add "xalignat", + "xalignat*", and "xxalignat" to LaTeX-item-list. + (LaTeX-amsmath-env-alignat): Do not ask label if the tail of ENV + is "*". + +2005-04-14 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Refactoring. + Set third argument of re-search-backward to 'move instead of using + skip-chars-backward. + +2005-04-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-math-abbrev-prefix): Offer only string type for + customization. Add proper :initialize and :set functions to allow + the value to be changed without having to restart Emacs. + + * doc/auctex.texi (Mathematics): Document only the string-nature + of `LaTeX-math-abbrev-prefix'. + +2005-04-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-math-abbrev-prefix): Can now be a string to be + used with `kbd'. + (LaTeX-math-abbrev-prefix): New function. + (LaTeX-math-keymap, LaTeX-math-mode): Use it. + + * doc/auctex.texi (Mathematics): + Explain `LaTeX-math-abbrev-prefix' more verbosely. + +2005-04-12 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-site.el.in (TeX-lisp-directory): Avoid open-parenthesis at + beginning of a line. + + * tex-style.el (LaTeX-beamer-inner-themes) + (LaTeX-beamer-outer-themes, LaTeX-beamer-color-themes) + (LaTeX-beamer-font-themes): New variables for style/beamer.el. + + * style/beamer.el (LaTeX-arg-beamer-inner-theme) + (LaTeX-arg-beamer-outer-theme, LaTeX-arg-beamer-color-theme) + (LaTeX-arg-beamer-font-theme): New functions. + +2005-04-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-parse-argument): Another stab at fixing this + function. The last change from 2005-03-23 broke the insertion of + macros like \footnote with a marked region. This is pure + guesswork. *sigh* + + * latex.el (LaTeX-section-heading): Shorten prompt. + (LaTeX-section-title): Simplify. Shorten prompt. + (LaTeX-auto-minimal-regexp-list): "\" and "." are not special in a + complemented character alternative. + (LaTeX-math-keymap): Define key for prefix insertion inside + defvar. + (math): Use `LaTeX-math-keymap' only. + (LaTeX-math-mode-menu): Use `LaTeX-math-mode-map' (defined by + `define-minor-mode'). + (LaTeX-math-mode): Assign `LaTeX-math-keymap' to + `LaTeX-math-abbrev-prefix'. Use `LaTeX-math-mode-menu' with + `LaTeX-math-mode-map'. + (LaTeX-math-insert-prefix): Remove. + +2005-04-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-match-command-with-arguments): + Skip over comments as well as whitespace. + + * tex.el (TeX-output-extension): Default to nil. + +2005-04-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-output-extension): Set correct default depending on + the value of `TeX-PDF-mode'. + (TeX-output-extension): Revert. + (VirTeX-common-initialization): Set `TeX-output-extension' here. + +2005-04-05 Christian Schlauer <cschl@arcor.de> + + * tex.el (TeX-submit-bug-report): Fix typo in doc string, fill doc + string. + + * latex.el: Change maintainer address. + (LaTeX-section): Fix typo in doc string. Remove code that almost + always inserts a new line. + (LaTeX-section-section): Fix doc string. Add code that + conditionally inserts a new line (which also bundles the + modification of the buffer in this function). + (LaTeX-section-hook): Fix typo in doc string. + (LaTeX-default-position): Use `do not' instead of `don't' in doc + string and customize value menu (as in `LaTeX-float). + (LaTeX-item-list): Fix typo in doc string. + +2005-04-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-PDF-mode, TeX-interactive-mode, TeX-Omega-mode): + Set customization group. + + * latex.el (LaTeX-math-default): New entry and key for \colon. + New "Punctuation" category. Get rid of some entries in + "delimiters" category already defined in "Arrows". Get rid of + "delimiters" category and merge entries defined there into + "Delimiters.". + (LaTeX-math-menu): Remove "delimiters" and add "Punctuation". + +2005-04-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-user-keywords): Make XEmacs + happy. + + * doc/changes.texi: Fix @xref. + + * doc/auctex.texi (Quotes): Fix @xref. + (European): Be more verbose. + + * tex-info.el (texinfo-mode): Get rid of hyphens in prompts. + Add @xref command. + + * latex.el (LaTeX-babel-hyphen, LaTeX-babel-hyphen-after-hyphen): + Doc fix. + (LaTeX-babel-hyphen-language-alist): Use t as default value for + insertion behavior. + + * tex.el (TeX-quote-language-alist): Use t as default value for + insertion behavior. + + * doc/auctex.texi: New tag line. + (Quotes): Replace description about (n)german.sty-specific quote + insertion by a generalized one and refer to section about European + languages. + (European): Add subsections. Add information about new + functionality and customization options for language-specific + quote and hyphen insertion. + (Folding): Add information about help echo. + (Viewing): Add subsection heading. A single one does not really + make sense. + + * doc/changes.texi: Add some news. + +2005-04-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-help-echo-max-length): New variable. + Add :type and :group specs. + (TeX-fold-make-help-echo): New function. + No space before ellipsis. + Okay, color does not look too bad. + (TeX-fold-make-overlay): Use it. + Remove call to `TeX-fold-make-help-echo' again as we have to + recompute the string anyway. + (TeX-fold-hide-item): Set help-echo property. + Recompute help echo string. + (TeX-fold-show-item): Invalidate help-echo property. + +2005-04-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/faq.texi (Frequently Asked Questions About AUCTeX): + Minor enhancements in wording. + + * tex.el (TeX-open-quote, TeX-close-quote) + (TeX-quote-after-quote): Doc fix. + (TeX-quote-language-alist, TeX-quote-language): New variables. + (TeX-insert-quote): Use them. + (TeX-submit-bug-report): Doc fix. + + * latex.el (LaTeX-mode-map): Map "-" to + `LaTeX-babel-insert-hyphen'. + (LaTeX-babel-hyphen, LaTeX-babel-hyphen-after-hyphen) + (LaTeX-babel-hyphen-language-alist, LaTeX-babel-hyphen-language): + New variables. (Moved from tex-style.el and style/german.el + respectively and generalized.) + (LaTeX-babel-insert-hyphen): New function. (Moved from + syle/german.el). + + * tex-style.el (LaTeX-csquotes-open-quote) + (LaTeX-csquotes-close-quote): Doc fix. + (LaTeX-german-quote-after-quote, LaTeX-german-open-quote) + (LaTeX-german-close-quote, LaTeX-german-hyphen) + (LaTeX-german-hyphen-after-hyphen): Remove. + + * style/csquotes.el ("csquotes"): Use `TeX-quote-language'. + + * style/italian.el (LaTeX-italian-open-quote) + (LaTeX-italian-close-quote): Remove. + ("italian"): Use `TeX-quote-language'. + + * style/ngerman.el (LaTeX-german-quote-after-quote) + (LaTeX-german-open-quote, LaTeX-german-close-quote): Remove. + ("ngerman"): Use `TeX-quote-language' and + `LaTeX-babel-hyphen-language'. + + * style/german.el: Move definition of "-" key to latex.el. + (LaTeX-german-hyphen-internal): Move to latex.el as + `LaTeX-babel-hyphen-language'. + (LaTeX-german-insert-hyphen): Move to latex.el as + `LaTeX-babel-insert-hyphen'. + ("german"): Use `TeX-quote-language' and + `LaTeX-babel-hyphen-language'. + + * style/czech.el, style/danish.el, style/slovak.el, + style/swedish.el: Use `TeX-quote-language' and + `LaTeX-babel-hyphen-language' where appropriate. + +2005-03-31 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/faq.texi (Frequently Asked Questions About AUCTeX): + Add general information about how to deal with bugs. Adapt version + numbers for Emacs. + +2005-03-31 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Skip non-space chars + backward if re-search-backward does not find white spaces or + LaTeX-nospace-between-char-regexp. Add mule check before line + break between 2-byte and 1-byte chars. + Reported by Ikumi Keita <ikumi@revery.net>. + Do not move point if re-search-backward didn't find proper line + break point. + +2005-03-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-submit-bug-report): Insert AUCTeX version into mail + subject. + +2005-03-30 Ikumi Keita <ikumi@revery.net> + + * latex.el (LaTeX-env-label): Remove `TeX-toggle-off-input-method' + because `TeX-math-input-method-off' is already called in + `LaTeX-insert-environment'. + +2005-03-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-style.el (LaTeX-german-hyphen): Doc fix. Fix :type. + + * style/german.el (LaTeX-german-insert-hyphen): Do not add "= + repeatedly but stick to - after the first swapping. + +2005-03-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/german.el (LaTeX-mode-map): Bind `-' to + `LaTeX-german-insert-hyphen'. + (LaTeX-german-quote-after-quote, LaTeX-german-open-quote) + (LaTeX-german-close-quote): Move to tex-style.el. + (LaTeX-german-hyphen-internal): New variable. + (LaTeX-german-insert-hyphen): New function. + ("german"): Set `LaTeX-german-hyphen-internal'. + + * tex-style.el (LaTeX-german-quote-after-quote) + (LaTeX-german-open-quote, LaTeX-german-close-quote): Move here + from style/german.el. + (LaTeX-german-hyphen, LaTeX-german-hyphen-after-hyphen): + New variables. + + * doc/auctex.texi (Font Locking): References are now fontified + with `font-lock-constant-face' because `font-lock-reference-face' + is deprecated. + + * font-latex.el: Change maintainer address. + (font-latex-quotes, font-latex-make-built-in-keywords) + (font-latex-user-keyword-classes): Doc fix. (Mention that setting + the variable directly does not take effect.) + (font-latex-make-match-defun, font-latex-make-built-in-keywords) + (font-latex-make-user-keywords): Doc strings of generated + variables and functions now refer to the creating functions. + (font-latex-warning-face, font-latex-sedate-face) + (font-latex-italic-face, font-latex-bold-face) + (font-latex-math-face, font-latex-string-face) + (font-latex-verbatim-face, font-latex-superscript-face) + (font-latex-subscript-face, font-latex-title-1-face) + (font-latex-title-2-face, font-latex-title-3-face) + (font-latex-title-4-face): Remove these face variables. + (font-latex-title-fontify): Remove :set function. + (font-latex-built-in-keyword-classes): + Use `font-lock-constant-face' instead of `font-lock-reference-face' + because the latter is deprecated in Emacs (and only an alias for + the former which will not work if the quoted face name is used). + Use new `title' specifier as type of keyword for the titling + keywords and mention it in the doc string. + (font-latex-keyword-matcher): Quote face specifiers in any case. + (font-latex-make-user-keywords) + (font-latex-syntactic-face-function): Quote face specifiers. + (font-latex-setup): Remove obsolete method for fontifying strings + or math respectively. + +2005-03-28 David Kastrup <dak@gnu.org> + + * tex.el: Change maintainer address. + (TeX-submit-bug-report): Change bug reporting address. + + * doc/wininstall.texi: Change contact info. + + * doc/intro.texi (Introduction): Change contact info. + + * doc/auctex.texi (top): Change contact info. + +2005-03-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-match-simple-command): New function. + (font-latex-make-user-keywords): Use it instead of specifying the + regexp directly. Prevents stuff like "\foo\foo\foo\foo" from + being fontified like a zebra. + (font-latex-match-command-with-arguments): Check for limit when + looking at optional and mandatory arguments. Prevents an infinite + loop in XEmacs when typing the "n" of \begin in "\begi\n[foo]". + (font-latex-user-keyword-classes): Specify a default value for the + list. + +2005-03-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (AUCELC): Derive from AUCSRC. + (STYLEELC, CLEANFILES, DISTCLEANFILES, DISTTEXTS): New variables. + (some): Use STYLEELC. + (clean): Use CLEANFILES. + (distclean): Use CLEANFILES and DISTCLEANFILES. Call distclean + target in doc directory. + (maintainer-clean, extraclean): New targets. + +2005-03-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-parse-argument): Deactivate mark after insertion of + first mandatory argument. Fixes insertion of braces at wrong + places for multi-argument macros like \parbox and \multicolumn. + See also change from 2004-12-01 which obviously did not suffice. + +2005-03-22 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Prevent line break + between 2-byte char an 1 byte-char. + + * latex.el (LaTeX-fill-move-to-break-point): Do not skip + LaTeX-nospace-between-char-regexp. + Reported by Ikumi Keita <ikumi@revery.net>. + +2005-03-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-buffer-substring): Better safe than sorry. + +2005-03-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-title-faces): According to + upstream `font-size' is likely to vanish. So back to + `face-height' but scale it down a bit to better match actual font + size. + +2005-03-17 David Kastrup <dak@gnu.org> + + * tex.el (TeX-overlay-priority-step): New variable, previously in + tex-fold.el under different name. + (TeX-overlay-prioritize): new function in Emacs and XEmacs + variants. + + * tex-fold.el (TeX-fold-make-overlay): Use `TeX-overlay-prioritize'. + (TeX-fold-priority-step, TeX-fold-prioritize): Rename and moved + to tex.el. + + * tex-buf.el (TeX-region-create): + Transfer `buffer-file-coding-system' from master buffer to region. + +2005-03-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-section-list-add-locally) + (LaTeX-largest-level-set): New functions. + (LaTeX-add-environments): Invalidate menu variables instead of + setting `LaTeX-menu-changed'. + (LaTeX-section-menu-entry): Do not enable symbol. + (LaTeX-section-menu-create, LaTeX-menu-changed) + (LaTeX-menu-update): Remove. + (LaTeX-section-menu, LaTeX-environment-menu) + (LaTeX-environment-modify-menu): New variables. + (LaTeX-section-menu-filter, LaTeX-environment-menu-filter): + New functions. + (LaTeX-mode-menu): Use them. + (LaTeX-common-initialization): Move setting of + `LaTeX-largest-level' upwards because it is needed when the menu + is being generated. Do not use `activate-menubar-hook' and + `activate-popup-menu-hook' anymore. + + * tex.el (VirTeX-common-initialization): Force update of style + information. + + * style/scrreprt.el, style/scrbook.el, style/scrbase.el, + style/scrartcl.el, style/report.el, style/jsbook.el, + style/jsarticle.el, style/jreport.el, style/jbook.el, + style/jarticle.el, style/j-report.el, style/j-book.el, + style/j-article.el, style/book.el, style/article.el, + style/alphanum.el: Use new functions for setting + `LaTeX-largest-level' or `LaTeX-section-list' respectively. + +2005-03-16 Ikumi Keita <ikumi@revery.net> + + * latex.el (LaTeX-fill-move-to-break-point): Limit the max number + of characters to look backward for `TeX-looking-at-backward'. + +2005-03-16 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-nospace-between-char-regexp): Change from + defcustom to defvar. + +2005-03-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-title-faces): Deal with the case + that `font-size' returns a number. Or nil. + + * tex.el (TeX-view-style): Remove support for "a4" and "a5". + +2005-03-14 David Kastrup <dak@gnu.org> + + * latex.el (docTeX-indent-inner-fixed) + (LaTeX-indent-calculate-last): Add support for macrocode*, macro*, + environment and environment* environment. + +2005-03-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * context.el (ConTeXt-indent-item-re): Do not treat + \setup... commands like \item. + +2005-03-14 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-fold.el (TeX-fold-prioritize): Cater for preview-latex. + +2005-03-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-paragraph-commands-regexp-make): New function. + (LaTeX-paragraph-commands-regexp, LaTeX-paragraph-commands): + Use it. + (LaTeX-paragraph-commands-add-locally): New function. + + * style/beamer.el ("beamer"): Use it. Newline not needed anymore + because \frametitle is now a paragraph command and will not be + filled together with the other content. + + * context.el (ConTeXt-find-indent): Correct indentation of + environments. + + * latex.el (LaTeX-fill-region-as-para-do): + Use `remove-text-properties' instead of + `remove-list-of-text-properties' because the latter is not + available in Emacs 21. + +2005-03-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/beamer.el ("beamer"): Find the correct start of + environment in case a frame environment is inserted with point on + a non-empty line. Insert an additional newline to set off title + and content. + + * font-latex.el (font-latex-make-title-faces): Use `font-size' + instead of `face-height' to determine the font size because the + latter (as the sum of the face's ascent and descent) returns + inappropriate values. Suggested by Steven E. Harris + <seh@panix.com>. + +2005-03-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-comment-prefix): New function. + + * latex.el (LaTeX-current-environment, LaTeX-find-matching-end) + (LaTeX-find-matching-begin): Rather than using the start or end of + a commented region as a boundary, look further for other commented + regions with the same prefix possibly containing an environment + start or end respectively. + (LaTeX-mode-menu): An empty help string is useless and may lead to + an empty tooltip. + +2005-03-09 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/amsmath.el ("amsmath"): Fix typo: "dotssc" -> "dotsc". + Added symbol "dots" and "dotsi". + + * latex.el (LaTeX-insert-environment): + Call `TeX-math-input-method-off'. + * style/amsmath.el (LaTeX-amsmath-env-alignat) + (LaTeX-amsmath-env-aligned): Do not call + `TeX-math-input-method-off' from here. + Reported by Ikumi Keita <ikumi@revery.net>. + +2005-03-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-current-environment): Doc fix. + + * font-latex.el (font-latex-make-built-in-keywords): Make doc + string of `font-latex-match-*-keywords' more clear. + +2005-03-08 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-toggle-off-input-method): Turn off input method iff + `current-input-method' starts one of "chinese", "japanese", and + "korean". Use `inactivate-input-method' instead of + `toggle-input-method'. Doc fix. + Suggested by Ikumi Keita <ikumi@revery.net>. + +2005-03-07 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-style.el: New file. defcustoms for style/*.el should go + here. + + * latex.el (LaTeX-includegraphics-extensions) + (LaTeX-includegraphics-options-alist) + (LaTeX-includegraphics-strip-extension-flag) + (LaTeX-includegraphics-read-file, LaTeX-beamer-themes): Move to + tex-style.el. + (tex-style): Require. + + * style/amsmath.el (LaTeX-amsmath-label): Move to tex-style.el. + + * style/beamer.el: Remove install instructions. Won't work + properly outside current AUCTeX anymore. Removed CVS Id. + (LaTeX-beamer-section-labels-flag) + (LaTeX-beamer-item-overlay-flag): Move to tex-style.el. + + * style/csquotes.el (LaTeX-csquotes-quote-after-quote) + (LaTeX-csquotes-open-quote, LaTeX-csquotes-close-quote): Move to + tex-style.el. + + * style/emp.el (LaTeX-write18-enabled-p): Move to tex-style.el. + + * Makefile.in (AUCSRC): Add tex-style.el. + +2005-03-07 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-TeX-command-list) + (japanese-TeX-error-messages): Change from defvar to defcustom. + +2005-03-06 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/auctex.texi (I18n): Comment fix. + + * latex.el: Set fill-space nonsticky. + (LaTeX-fill-delete-newlines): Check text property 'fill-space. + +2005-03-04 David Kastrup <dak@gnu.org> + + * Organizational: preview-latex development has been moved from + <URL:http://sourceforge.net/projects/preview-latex> into the + AUCTeX CVS Archive on + <URL:http://savannah.gnu.org/projects/auctex> in subdirectory + auctex/preview. + +2005-03-04 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (I18n): Try to make text more clear. + + * style/beamer.el (LaTeX-beamer-search-themes) + (LaTeX-arg-beamer-theme): New functions adding completion for + \usetheme. + + * latex.el (LaTeX-beamer-themes): New variable. + +2005-03-05 Ikumi Keita <ikumi@revery.net> (tiny change) + + * tex-jp.el (japanese-TeX-command-list): Doc fix. + +2005-03-03 Ikumi Keita <ikumi@revery.net> + + * tex.el (TeX-macro-global-internal): New function. + (TeX-macro-global): Use it. + (TeX-kpathsea-format-alist): Remove duplicate line. + + * tex-jp.el: Use `TeX-macro-global-internal' and append path for + Japanese TeX into TeX-macro-global. Do not override + `TeX-expand-list', no more. + (japanese-TeX-command-list): Add :help string. + Change `TeX-run-LaTeX' to `TeX-run-TeX'. + (japanese-TeX-command-default, japanese-LaTeX-command-default): + Quote symbol TeX-command in doc string. + +2005-03-03 Thomas Baumann <thomas.baumann@ch.tum.de> + + * style/beamer.el (LaTeX-beamer-item-overlay-flag): New variable. + Used for controling the insertion of overlays in + `LaTeX-item-beamer'. + (LaTeX-item-beamer): Use it. + +2005-03-02 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (I18n): Fix some markup errors. + +2005-03-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-title-faces) + (font-latex-title-4-face): Use yellow on terminals with dark + background and blue4 on terminals with light background. + +2005-03-02 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/auctex.texi (Floats): Document `LaTeX-top-caption-list'. + +2005-03-01 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/auctex.texi (I18n): Revised. + +2005-02-28 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (TeX-japanese-process-input-coding-system) + (TeX-japanese-process-output-coding-system): Fix comment. + +2005-02-27 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Cater for kinsoku, + especially for Japanese. + +2005-02-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-common-initialization): Update LaTeX menu when a + popup menu in XEmacs is opened. + +2005-02-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * bib-cite.el: Some doc fixes in the commentary section. + +2005-02-23 Ikumi Keita <ikumi@revery.net> (tiny change) + + * doc/auctex.texi (I18n): Remove FIXME comment. + +2005-02-22 Ikumi Keita <ikumi@revery.net> (tiny change) + + * latex.el (LaTeX-fill-delete-newlines): Call search-forward, + which is copied from `fill-delete-newlines', with BOUND TO. + +2005-02-21 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (Japanese): Fix bogus macro. + +2005-02-21 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/auctex.texi (Japanese): Doc fix. + Suggested by Ikumi Keita <ikumi@revery.net>. + +2005-02-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-nth-arg): Doc fix. + Do not skip more than one closing brace backwards. + Use `TeX-fold-buffer-substring'. + (TeX-fold-prioritize): Doc fix. + (TeX-fold-buffer-substring): New function. + Do not use `dolist' which uses an unwanted local binding of the + list variable. + +2005-02-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-current-environment): New variable. + (LaTeX-indent-calculate, LaTeX-fill-region-as-para-do): Use it. + Improves filling performace by caching current environment. + +2005-02-19 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (TeX-japanese-process-input-coding-system): + Remove garbage code. + Reported by Ikumi Keita <ikumi@revery.net>. + + * latex.el (LaTeX-nospace-between-char-regexp): New variable. + (LaTeX-fill-delete-newlines): Use it. + (LaTeX-fill-move-to-break-point): Ditto. Fix comment. + +2005-02-18 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-delete-newlines): New function. + (LaTeX-fill-region-as-para-do): Use it. + +2005-02-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-set-syntactic-keywords): Give an + escape char at the end of a verbatim construct punctuation syntax. + Prevents wrong fontification of stuff like "\verb|foo\|". + +2005-02-16 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (TeX-after-start-process-function): Remove code for + XEmacs. `set-process-coding-system' is available in XEmacs 21.1. + (TeX-japanese-process-input-coding-system) + (TeX-japanese-process-output-coding-system): Change from defvar to + defcustom. Use `default-process-coding-system'; Old XEmacs + doesn't have the variable? + Suggested by Ikumi Keita <ikumi@revery.net>. + +2005-02-15 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-move-to-break-point): Simplify. + (LaTeX-fill-region-as-para-do): Cater for the situation where + there is a line ending with Japanese characters and the following + line starts with a non-Japanese character. + +2005-02-14 David Kastrup <dak@gnu.org> + + * aclocal.m4 (AC_LISPIFY_DIR): new function. + (AUCTEX_AUTO_DIR): Use it. + + * tex-site.el.in (TeX-lisp-directory, TeX-auto-global): + put autoconfed expression on a line of its own. + +2005-02-14 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-fill-region-as-para-do): Get rid of a space at + eol if the last character of the line is Japanese (e.g. short + Japanese lines). + (LaTeX-fill-move-to-break-point): Do not skip characters if the + text is written in Japanese (e.g. long Japanese line). + Reported by Ikumi Keita <ikumi@revery.net>. + +2005-02-14 Ikumi Keita <ikumi@revery.net> (tiny change) + + * tex-jp.el (LaTeX-auto-regexp-list): + Use `LaTeX-auto-class-regexp-list'. + +2005-02-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (Texinfo-environment, Texinfo-modify-environment): + New functions. + (Texinfo-insert-environment): Not interactive anymore as it is now + called by `Texinfo-environment'. + (Texinfo-mode-map): `C-c C-e' now calls `Texinfo-environment'. + +2005-02-12 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-add-local-master): Insert "japanese-" before mode + name if buffer local variable `japanese-TeX-mode' is non-nil. + Suggested by Ikumi Keita <ikumi@revery.net>. + (japanese-slitex-mode): Remove obsolete autoload of slitex. + + * doc/auctex.texi (Japanese): Doc fix to follow the latest + tex-jp.el. + +2005-02-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-find-macro-boundaries): Return an alist instead of a + list. + (TeX-find-macro-end): With `TeX-find-macro-boundaries' returning + an alist `cdr' is now sufficient. + (TeX-find-macro-end-helper): Save match data. + (TeX-font-replace-macro): Use `TeX-find-macro-end' instead of + `forward-sexp'. Fixes errors e.g. when trying to remove the font + spec of a string like "\textbf{(}". + +2005-02-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-env-figure): Make function aware of active + selections. There are still some indentation issues left. + + * style/epsf.el ("epsf"): Do not add epsffig environment. + Fixes error if latex.el(c) is not loaded. + (LaTeX-env-epsffigure): Remove. + +2005-02-11 David Kastrup <dak@gnu.org> + + * tex-site.el.in (TeX-lisp-directory): Use `@lispauctexdir' + instead of `"@auctexdir@"' and `@lispautodir' instead of + `"@auctexdir_expanded"'. + + * configure.ac (lispauctexdir): create version of `$(auctexdir)' + that is Lisp-quoted, not shell-quoted. + (lispautodir): Similarly. + + * doc/Makefile.in (prefix): Append $(null) to some assignments to + save quoted backslashes at line ends. + + * Makefile.in (prefix): Append $(null) to some variable + assignments to let quoted backslashes at their end remain quoted. + (auctexdir): Get from configure. + +2005-02-10 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el: Fix bug that once japanese-plain-tex-mode entered, + plain-tex-mode do as japanese-plain-tex-mode. + Reported by Ikumi Keita <ikumi@revery.net>. + (japanese-TeX-mode): Doc fix. Make variable buffer local and + permanent-local. + (japanese-plain-tex-mode-initialization) + (japanese-latex-mode-initialization): Do not initialize + japanese-TeX-mode. Use `when' instead of `if'. + +2005-02-09 Peter S Galbraith <psg@debian.org> + + * bib-cite.el (bib-master-file): Apply patch from Peter Heslin. + TeX-master can now have symbol values (other than t or nil). + +2005-02-09 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (LaTeX-auto-regexp-list): Remove `usepackage' because + it is defined in `LaTeX-auto-minimal-regexp-list'. + (plain-TeX-auto-regexp-list): Fix regexp; Use `\\|' instead of `|'. + Fill lines in the same way in tex.el. + (TeX-japanese-process-input-coding-system) + (TeX-japanese-process-output-coding-system): Use if-statement in + defvar instead of outside of defvar. Change default value of FSF + Emacs to 'euc-jp. + (TeX-after-start-process-function): Add code for FSF Emacs. + +2005-02-08 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/alphanum.el: Added `Local Variables'. + Suggested by Ikumi Keita <ikumi@revery.net>. + + * font-latex.el: Fix typo in `Local Variables'. + Reported by Ikumi Keita <ikumi@revery.net>. + +2005-02-07 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/faq.texi (Frequently Asked Questions About AUCTeX): Fix typo + in previous commit. + +2005-02-07 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/jarticle.el ("jarticle"): Use `LaTeX-section-level'. + +2005-02-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-code-comment): Compute the end of the + region to be filled _after_ indentation happened. + +2005-02-07 David Kastrup <dak@gnu.org> + + * doc/faq.texi (Frequently Asked Questions About AUCTeX): Be quite + more verbose about Emacs/XEmacs and versions. + +2005-02-04 David Kastrup <dak@gnu.org> + + * Version 11.55 released. + + * Makefile.in (tar-ball): + + * doc/Makefile.in (clean, html/auctex_toc.html, dist): Move HTML + stuff into html directory. + +2005-02-04 David Kastrup <dak@gnu.org> + + * RELEASE: Some more Emacspeak blurb. + +2005-02-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Make description of changes clearer. + +2005-02-04 David Kastrup <dak@gnu.org> + + * RELEASE (Warning): warn about XEmacs 21.4.16. + +2005-02-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-search-syntax-table): Give ?\" character punctuation + syntax. Prevents parenthetical characters from being hidden from + `TeX-find-opening-brace' if they happen to be enclosed between two + quotation marks. + Better use whitespace syntax for ?\" as this is the equivalent of + a nil entry in the syntax table. + (TeX-search-syntax-table): Remove superfluous possibility to + specify comment and escape characters as arguments. + +2005-02-01 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * doc/changes.texi: Mention support for the jsarticle and jsbook + classes. + + * tex-jp.el (japanese-LaTeX-style-list): + Add jsclasses (jsarticle and jsbook). + +2005-01-31 Ralf Angeli <angeli@iwi.uni-sb.de> + + * configure.ac: Bump version info to 11.55. + + * auctex.spec (Version): Bump to 11.55. + (Release): Reset to 1. + + * doc/tex-ref.tex: Bump version info to 11.55. + (Source Display): Adapt information about key bindings to current + implementation. + + * doc/auctex.texi: Bump version info to 11.55. + + * doc/changes.texi: Add information about changes in AUCTeX 11.55. + + * RELEASE: Add information about fixed bugs in AUCTeX 11.55. + + * latex.el (LaTeX-fill-region-as-para-do): Limit the search for + sentence ends. Fixes erroneous addition of spaces at places + following a paragraph to be filled. + +2005-01-31 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/jsarticle.el: New file. + + * style/jsbook.el: New file. + + * Makefile.in (STYLESRC): Add them. + +2005-01-29 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (LaTeX-fill-region-as-para-do): Remove. + +2005-01-28 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (AUCTeX-date): Use ISO 8601 format. + (TeX-submit-bug-report): Include AUCTeX-date when using a + non-released version. + +2005-01-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el: Do not use whitespace syntax for ?~. Prevents these + characters from being deleted during filling. + +2005-01-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el: Update header. + (TeX-view-output-file): Let `TeX-active-master' return file name + without directory. Fixes viewer not finding output file when + being called in a subdirectory. + (TeX-active-master): Add new parameter `nondirectory'. Doc fix. + +2005-01-21 David Kastrup <dak@gnu.org> + + * auctex.spec (Conflicts): Mention the outdated emacspeak from + FC3. + +2005-01-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-set-syntactic-keywords): Do not call + `regexp-opt' on empty lists. Prevents `regexp-opt-group' from + entering a loop on installations with an outdated regexp-opt.el. + + * tex-buf.el (TeX-command-region): Pass name of region file + without directory to `TeX-command-query' because a test in the + latter expects it like that. + (TeX-command-query): Doc fix. + +2005-01-19 Jan-Ake Larsson <jalar@mai.liu.se> + + * aclocal.m4, configure.ac: A few small changes to allow sync with + preview-latex' aclocal.m4 + +2005-01-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (hack-one-local-variable): Make sure the byte compiler + does not barf on `minor-mode-list' by eliminating the reference to + this variable. + +2005-01-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (top): Restrict to one content listing in HTML + output. + + * doc/todo.texi (Wishlist): Remove bug regarding parsing of LaTeX + class files. + + * tex.el (TeX-macro-global): New function. + (TeX-macro-global): (the variable) Moved here from tex-site.el.in. + Use new `TeX-macro-global' function. + + * aclocal.m4 (library): Remove TEX_INPUT_DIRS function. + + * configure.ac (auctexdir): Remove call to TEX_INPUT_DIRS. + + * lpath.el: Setting `TeX-macro-global' is not necessary anymore as + it now is in tex.el. + + * tex-site.el.in (TeX-macro-global): Move defcustom to tex.el. + + * doc/install.texi (Configure): Remove documentation of + --with-tex-input-dirs. + + * doc/wininstall.texi: Remove documentation of + --with-tex-input-dirs. + + * latex.el (LaTeX-insert-environment): Insert a simple newline + character instead of using `newline'. Fixes insertion of + environment end at wrong place in XEmacs. + (LaTeX-fill-region): Remove superfluous `save-restriction'. + (LaTeX-auto-class-regexp-list): Add patterns for commands + described in "LaTeX2e font selection" (fntguide). + +2005-01-14 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (European): Document all TeX-language-*-hook + variables. Don't document obsolete `dk.sty'. + +2005-01-14 David Kastrup <dak@gnu.org> + + * auctex.spec: Add and remove auctex.info instead of auctex in + info dir. Bump release to 2 to match upload. + +2005-01-13 David Kastrup <dak@gnu.org> + + * font-latex.el (font-latex-set-title-face) + (font-latex-title-fontify): font-latex-title-fontify, not + fontity. fontify, fontify, fontify. + * doc/changes.texi: Ditto. + * doc/auctex.texi (Font Locking): Ditto. + +2005-01-12 David Kastrup <dak@gnu.org> + + * Version 11.54 released. + +2005-01-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/beamer.el: Update copyright information. + General clean-up. + ("beamer"): Support frame environment. + The overprint has an optional "area width" argument, not a + mandatory "overlay" argument. + +2005-01-09 Reiner Steib <Reiner.Steib@gmx.de> + + * RELEASE: Addition to contributors section. + + * tex-bar.el (TeX-bar-LaTeX-button-alist): Use generic "view" + image instead of mode specific. + +2005-01-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Added information about fixed bugs and added features + in AUCTeX 11.54. + + * auctex.spec (Version): Bump to 11.54. + + * configure.ac: Bump version info to 11.54. + + * doc/auctex.texi: Bump version info to 11.54. + + * doc/tex-ref.tex: Bump version info to 11.54. + +2005-01-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-forward-paragraph): Allow finding paragraph + commands even if they are preceded by whitespace and comment + starters. + +2005-01-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-forward-comment-skip): Differentiate prefixes with + whitespace between comment starters. + + * latex.el: Update copyright information. + (LaTeX-indent-calculate-last, LaTeX-fill-region-as-para-do): + Do not widen. + (LaTeX-fill-region-as-paragraph, LaTeX-fill-region-as-para-do): + Use a marker instead of narrowing the region. + (LaTeX-indent-line, LaTeX-indent-inner-do) + (LaTeX-current-indentation, LaTeX-back-to-indentation): + Handle prefixes with whitespace between comment starters correctly. + +2005-01-05 Reiner Steib <Reiner.Steib@gmx.de> + + * style/graphicx.el: Added completion of boxing macros. + Fontify some macros. + + * font-latex.el (font-latex-built-in-keyword-classes): Fix typo + in doc string. + +2005-01-02 Reiner Steib <Reiner.Steib@gmx.de> + + * toolbar-x.el (toolbarx-default-toolbar-meaning-alist): + Some checkdoc related fixes. Still not checkdoc clean. + + * tex-bar.el (Commentary): Don't mention stuff done by + configure/make in the instructions. + (TeX-bar-help-from-command-list): Quote symbols in doc string. + File is checkdoc clean now. + + * doc/auctex.texi: Update copyright. + (Mathematics): Explain how to enable LaTeX-math-mode by default. + Suggested by Chris Wallace <c.wallace@qmul.ac.uk>. + (Filling, Outline): Markup fixes: Use @lisp instead of @example + where appropriate. + +2004-12-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (ConTeXt-find-matching-start): Require 'tex and add + autoloads to make the compiler happy. + + * doc/changes.texi: Add and tweak some stuff for 11.54. + +2004-12-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-auto-parse-region): Do not add element to `symbol' + if it is already contained. + +2004-12-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-indent-outer-do): Remove redundant code. + +2004-12-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Add coding cookie. + (font-latex-quote-end-list): Remove. + (font-latex-quote-list): New variable. + (font-latex-quotes, font-latex-match-quotation): Use it for + generalization. + (font-latex-keyword-matcher): Revert last change. + (font-latex-make-built-in-keywords): Match the empty string only + at the end of multi-char macros. + (font-latex-make-user-keywords): Make sure sedate face is not used + for words right after a "\\". + (font-latex-set-syntactic-keywords): Do not match linebreaks as + delimiters of `verb-like-commands'. + +2004-12-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-keyword-matcher): Highlight only first + matched group. + (font-latex-make-built-in-keywords): Set up grouping for warning + keywords and mark its end with "[^A-Za-z@*]". + +2004-12-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-paragraph): Do not narrow region when code + comments are filled. Fixes wrong indentation if a line with a + code comment following an indented line is filled. + Mark end of current line, not beginning of next. + Jump to start of code comment line after regular filling. + +2004-12-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-built-in-keyword-classes): + Move warning keywords up in order to save them from being covered by + less important faces. Include "include" in warning keywords. + + * aclocal.m4 (TEX_INPUT_DIRS): Change `IFS' temporarily for + tokenizing the string instead of inserting newlines. The latter + did not work anyway because there was one backslash too much in + "\\n". Strip trailing slashes of determined directories before + concatenation. + + * doc/install.texi (Configure): Quote value for + --with-tex-input-dirs. + + * doc/wininstall.texi: Quote value for --with-tex-input-dirs. + + * tex.el (TeX-arg-opening-brace, TeX-arg-closing-brace): + New variables. + (TeX-parse-arguments, TeX-parse-argument, TeX-argument-insert): + Use them. + + * latex.el (TeX-arg-free): Temporarily bind + `TeX-arg-opening-brace' and `TeX-arg-closing-brace'. + +2004-12-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-source-specials-view-position-flags): Fix syntax for + xdvi. + +2004-12-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (top): Duplicate top node and wrap it in @ifinfo + and @ifhtml environments respectively. + +2004-12-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * context.el (ConTeXt-paragraph-commands-regexp): Match any + command starting with "\start" or "\stop" and the respective + language variants. + +2004-12-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-keymap): Change key bindings for clearout + commands. + (TeX-fold-item, TeX-fold-remove-overlays): Doc fix. + + * tex.el (TeX-fold-menu): Change display of key bindings for + clearout commands. + + * doc/auctex.texi (Folding): Document new key bindings for + clearout commands. + +2004-12-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-keymap): Add key binding for + `TeX-fold-dwim'. + (TeX-fold-dwim): New function. + Add support for folding regions. + (TeX-fold-macro, TeX-fold-env): Call `message' here instead of in + `TeX-fold-item' to get the right return value for the latter. + (TeX-fold-item): Move `message' out to get the right return value. + (TeX-fold-remove-overlays): Signal if an overlay was deleted with + the return value. + + * tex.el (TeX-fold-menu): Add menu entry for `Tex-fold-dwim'. + + * doc/auctex.texi (Folding): Document `TeX-fold-dwim'. + Mention support for folding regions with `TeX-fold-dwim'. + + * doc/changes.texi: Advertise folding and unfolding of regions as + well as DWIM functionality. + + * tex-fold.el (TeX-fold-keymap): Add key bindings for + `TeX-fold-region and `TeX-fold-clearout-region'. + (TeX-fold-region): Make interactive. + + * tex.el (TeX-fold-menu): Add menu entries for folding and + unfolding of regions. + + * doc/auctex.texi (Folding): Document folding and unfolding of + regions. + Document `TeX-fold-dwim'. + + * latex.el (LaTeX-fill-code-comment): Do not hardcode tab width. + +2004-12-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-keymap): Add key bindings for + `TeX-fold-paragraph' and `TeX-fold-clearout-paragraph'. + (TeX-fold-buffer): Now calls new `*-region' functions. + (TeX-fold-paragraph): New function. + (TeX-fold-buffer-type): Remove. + (TeX-fold-region): New function. Basically encloses contents of + `TeX-fold-buffer-type' but type parameter is not mandatory + anymore. + (TeX-fold-clearout-buffer): Now calls `TeX-fold-clearout-region'. + (TeX-fold-clearout-paragraph, TeX-fold-clearout-region): + New functions. + + * tex.el (TeX-fold-menu): Add menu entries for folding and + unfolding of paragraphs. + + * doc/auctex.texi (Folding): Document folding and unfolding of + paragraphs. + + * doc/changes.texi: Advertise folding and unfolding of + paragraphs. + + * tex.el (TeX-comment-start-regexp): New variable. + (TeX-comment-or-uncomment-region, TeX-uncomment) + (TeX-forward-comment-skip, TeX-find-macro-end-helper): Use it. + + * latex.el (LaTeX-newline, LaTeX-insert-environment) + (LaTeX-env-item, LaTeX-indent-line, LaTeX-current-indentation) + (LaTeX-fill-region-as-paragraph, LaTeX-fill-region-as-para-do) + (LaTeX-fill-move-to-break-point, LaTeX-fill-paragraph) + (LaTeX-fill-code-comment, LaTeX-fill-region) + (LaTeX-forward-paragraph, LaTeX-backward-paragraph): + Use `TeX-comment-start-regexp' instead of `comment-start'. + (LaTeX-backward-paragraph, LaTeX-indent-line): Simplify. + + * style/mdwlist.el ("mdwlist"): Use `TeX-comment-start-regexp' + instead of `comment-start'. + + * style/doc.el (LaTeX-env-no-comment): + Use `TeX-comment-start-regexp' instead of `comment-start'. + +2004-12-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-buffer-type): Do not ignore case during + search. + + * context.el (ConTeXt-paragraph-commands-regexp): New name for + `ConTeXt-paragraph-commands'. Doc fix. Match escape character at + front as well. + (ConTeXt-mode-common-initialization): Use it. + Set `LaTeX-paragraph-commands-regexp' instead of + `LaTeX-paragraph-commands'. Adapt definition of + `paragraph-start'. + +2004-12-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (hack-one-local-variable): Advise it in order to call + minor mode functions for AUCTeX minor modes activated by + file-local minor mode variables. + + * latex.el (LaTeX-math-mode): Define using `define-minor-mode'. + Make it compatible with older Emacsen. + +2004-12-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/csquotes.el (LaTeX-csquotes-quote-after-quote): + Avoid interference with (n)german.el. + +2004-12-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (distclean): Remove generated `configure' file. + And revert again as it does not comply with the definition of + standard targets in the GNU make manual. + + * style/jurabib.el ("jurabib"): Add further macros. + + * tex.el: Add coding cookie. + Use punctuation syntax for "«" and "»" characters. + (TeX-parse-argument): Deactivate mark after insertion of first + pair of braces. Fixes problems with the insertion of macros with + more than one brace and an active selection. + + * style/csquotes.el (LaTeX-csquotes-open-quote) + (LaTeX-csquotes-close-quote): Doc fix. + ("csquotes"): Repair quoting. Use completing-read where + possible. Use a stricter test for usage of quotes. + + * doc/auctex.texi (Quotes): Document csquotes.el. + +2004-11-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/csquotes.el: New file. + + * Makefile.in (STYLESRC): Add style/csquotes.el. + + * doc/changes.texi: Advertise support for csquotes.sty. + +2004-11-29 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-auto-insert): Add SKIP argument. + (TeX-auto-store): Use it to avoid circular dependencies. + + * style/graphicx.el (LaTeX-arg-includegraphics): Add "page". + + * latex.el (LaTeX-includegraphics-options-alist): Ditto. + +2004-11-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi: Use "auctex.info" instead of "auctex" as info + file name. + + * doc/Makefile.in: Adapt to suit change in info file name from + "auctex" to "auctex.info". + + * doc/.cvsignore: Adapt to suit change in info file name from + "auctex" to "auctex.info". + + * doc/changes.texi: Advertise use of "auctex.info" info file name. + +2004-11-29 Jan-Ake Larsson <jalar@mai.liu.se> + + * configure.ac: Add @command macro test + + * configure.in: Moved to configure.ac + + * configure.ac: Moved from configure.in + + * doc/macros.texi: Add @command macro + + * doc/auctex.texi: Change order of @top and @ifnottex, error + message otherwise. + + * doc/Makefile.in: Add MAKEINFO environment variable for texi2... + usage. Remove old (confusing) messages. + +2004-11-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/intro.texi (Introduction): @/ unfortunately is only + available since Texinfo 4.6. Remove it for now. + + * doc/auctex.texi: Correct some references. + +2004-11-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi: Remove RCS keyword. + Correct subtitle. + Various corrections of filling and capitalization. + Move up installation instructions. + (Display): New node and chapter holding display-related content. + (Font Locking): New node and section. + (Folding): Now a section. Remove the silly first paragraph. + (Outline): Now a section. + + * doc/macros.texi: Add `@fontlatex' macro. + + * doc/install.texi: Specify node unconditionally in the file. + + * doc/intro.texi (Introduction): Use `@email' instead of `@url' + for email addresses. + + * doc/quickstart.texi (Processing): Better heading. + + * font-latex.el: Clean up comments. + (font-latex-built-in-keyword-classes): Add explanation of the + variable structure. + (font-latex-match-command-with-arguments): Change "asterix" to + "asterisk". + +2004-11-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-backward-paragraph): Jump to macro start. D'oh. + + * texmathp.el: Rearrange variable and function definitions in + order to get as few compiler warnings as possible due to the + reintroduction of the :set function in `texmathp-tex-commands'. + Add a dummy `defvar' for `texmathp-tex-commands' to silence the + compiler. + (texmathp-tex-commands): Reintroduce a :set function as advertised + in `texmathp-compile'. + (texmathp): Remove the conditional call to `texmathp-compile' as + this is handled by the :set function in `texmathp-tex-commands' on + load of the file. + + * tex.el: Autoload `texmathp-match-switch'. + +2004-11-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-bold-face, font-latex-italic-face) + (font-latex-math-face, font-latex-string-face) + (font-latex-warning-face, font-latex-verbatim-face): Inherit from + suitable base faces if possible. Doc fix. + (font-latex-sedate-face): Doc fix. + + * latex.el (LaTeX-paragraph-commands): Doc fix. + (LaTeX-backward-paragraph): Do not unnecessarily jump to a (wrong) + position after the macro start. + + * tex.el: Move (nearly all) autoloads to a single place. + Remove redundant autoload for `TeX-region-file'. Add autoload for + `TeX-view'. + (TeX-parse-macro): Doc fix. + Do not add braces for macros defined as `("foo" 0)'. + (TeX-parse-arguments): Do not bind `<' and `>'. + (TeX-parse-argument, TeX-argument-insert): Do not use `<' and `>' + formerly bound by `TeX-parse-arguments'. Fixes some compiler + warnings. + (TeX-auto-list-information): Use `message' correctly. + + * tex-info.el (texinfo-mode): Add `@email' macro. + +2004-11-22 Berend de Boer <berend@pobox.com> + + * context.el (ConTeXt-mode-common-initialization): ConTeXt does + not need italics correction. + +2004-11-20 Christian Schlauer <cschl@arcor.de> + + * doc/auctex.texi (Floats): Update. + + * doc/changes.texi: Mention change of `LaTeX-float'. + + * latex.el (LaTeX-float, LaTeX-env-figure): Implement "do not + prompt" option. `LaTeX-float' has the same customize value menu + like `LaTeX-default-position' now. This implies that the old + meaning nil corresponds to `""' now, while nil means "do not + prompt". + (LaTeX-env-figure): Ask for `Float position' instead of `Float + to'. + (LaTeX-float): New default value "" instead of "htbp" (after a + discussion on the mailing list). + (LaTeX-default-format, LaTeX-default-width) + (LaTeX-default-position): Omit `Specifies the' in doc-string. + +2004-11-19 Miguel Frasson <frasson@math.leidenuniv.nl> + + * tex-buf.el (TeX-run-TeX): Improve comments. + +2004-11-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-TeX-sentinel-check): Use only the letters after + the last dot of a file name for the file extension. + +2004-11-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-move-to-break-point): Search backward for + \verb|...| constructs rather than forward. Fixes cases with more + than one constructs per line. Reported by Christan Schlauer. + +2004-11-16 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Clarify --with-xemacs. + +2004-11-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-paragraph-commands): Now is a customizable list + instead of a regular expression. + (LaTeX-paragraph-commands-internal) + (LaTeX-paragraph-commands-regexp): New variables. + (LaTeX-forward-paragraph, LaTeX-backward-paragraph) + (LaTeX-common-initialization): + Use `LaTeX-paragraph-commands-regexp' instead of + `LaTeX-paragraph-commands'. + +2004-11-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-close-environment): Insert a newline at the end + of the environment if an uncommented line follows a commented one. + +2004-11-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (docTeX-in-macrocode-p): Search backward for an + environment beginning rather than forward for its end. + +2004-11-08 David Kastrup <dak@gnu.org> + + * latex.el (doctex-mode): Set the mode name. + +2004-11-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (texinfo-mode): Add `@command' macro. + + * doc/auctex.texi (Commands): Correct key binding for + `TeX-Omega-mode'. Add index entry. Use `@command' instead of + `@code' where appropriate. + + * font-latex.el (font-latex-built-in-keyword-classes): Use correct + face for `font-latex-match-title-3'. + +2004-11-04 Miguel Frasson <frasson@math.leidenuniv.nl> + + * images/amstex.xpm: Added. Contains symbolic color + 'backgroundToolBarColor', required by (GNU/Linux) XEmacs. + +2004-11-03 Christian Schlauer <cschl@arcor.de> + + * latex.el (LaTeX-env-figure, LaTeX-env-minipage) + (LaTeX-env-tabular*): Do always accept the user's input as the new + buffer-local values for `LaTeX-float' and `LaTeX-default-width', + even if the user entered the empty string. + (LaTeX-env-minipage): Do not ask for the (optional) position if + `LaTeX-default-position' is set to `nil'. Behaviour agrees with + LaTeX-env-array and LaTeX-env-tabular* now. + (LaTeX-env-array, LaTeX-env-tabular*): Change `setq'-assignment + of `LaTeX-default-position' so that it works not only the first + time in buffers with `LaTeX-default-position' set to `nil'. + (LaTeX-env-array, LaTeX-env-minipage, LaTeX-env-tabular*): + Use `LaTeX-optop', `TeX-grop', etc. instead of `{', `['. + (LaTeX-env-picture): Don't delete whitespace after inserting the + environment. Cursor position corresponds to proper indentation + now. + +2004-11-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-delete-dups-by-car): New name for `TeX-delete-dups'. + (TeX-delete-duplicate-strings, TeX-sort-strings): New functions. + Contributed by Reiner Steib and David Kastrup. + + * font-latex.el: Require 'tex. + (font-latex-user-keyword-classes): Enhance :set function to tell + user which entry is duplicated. + + * latex.el (TeX-arg-input-file): Use new name + `TeX-delete-dups-by-car' instead of `TeX-delete-dups'. + + * style/graphicx.el (LaTeX-includegraphics-read-file-TeX): + Use new name `TeX-delete-dups-by-car' instead of `TeX-delete-dups'. + +2004-11-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-user-keywords): Add the "fixed" + matchers here rather than in `font-latex-make-built-in-keywords'. + + * latex.el (LaTeX-math-default, LaTeX-math-menu): Use "Greek + Uppercase" instead of "Greek" and "Greek Lowercase" instead of + "greek". + +2004-11-02 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-paragraph-commands): Make `\maketitle' a + paragraph starter. + +2004-11-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-built-in-keywords) + (font-latex-make-user-keywords): Append rather than prepend + matchers. + +2004-11-01 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbar-x.el + (toolbarx-make-command): Code clean up. + +2004-11-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Change maintainer information. + (font-latex-keywords): New customization group. + (font-latex-built-in-keyword-classes): New variable. + (font-latex-make-match-defun, font-latex-keyword-matcher): + New functions. + (font-latex-make-built-in-keywords): New name for + `font-latex-make-keywords'. + Move default keyword definitions from + `font-latex-match-*-keywords' to + `font-latex-match-*-keywords-local'. + Integrate `font-latex-match-*-keywords-set' function into + `font-latex-match-*-keywords' defcustom. + (font-latex-keywords-1, font-latex-keywords-2): Default to nil. + All matchers are now added in `font-latex-make-built-in-keywords' + and `font-latex-make-user-keywords'. + (font-latex-user-keyword-classes): New variable. + (font-latex-make-user-keywords): New function. + + * doc/changes.texi: Remove duplicate word. + Mention possibility to add new keyword classes. + + * doc/quickstart.texi: Some rewordings, corrections and + enhancements. + +2004-10-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-auto-symbol-check): Use `add-to-list' instead of + `cons' in order to avoid duplicates. + + * latex.el (LaTeX-auto-minimal-regexp-list): Use non-greedy + operators for getting the end of a TeX group. + (LaTeX-auto-cleanup): Use `add-to-list' instead of `cons' in order + to avoid duplicates. + +2004-10-29 Miguel Frasson <frasson@math.leidenuniv.nl> + + * tex-buf.el: Add simple error report system. + (TeX-error-report-switches): New variable (plist). + (TeX-run-TeX), + (TeX-TeX-sentinel-check): Use it, updating error state, + where property is (intern (TeX-master-file)). + + * tex-bar.el: Remove defadvice's to TeX-run-TeX and + TeX-TeX-sentinel-check. + (TeX-bar-error-handling-switches): Remove. + (TeX-bar-LaTeX-button-alist): next-error updated. + +2004-10-28 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-bar.el (TeX-bar-LaTeX-button-alist): Add `TeX-save-document'. + + * doc/changes.texi: Renamed function `LaTeX-install-toolbar'. + + * tex-site.el.in: Ditto. + +2004-10-28 Miguel Frasson <frasson@math.leidenuniv.nl> + + * tex-bar.el: Now requires tex-buf.el, for error handling. + Renamed symbols: + (LaTeX-install-toolbar): New name for `latex-install-toolbar'. + (tex-bar-latex-buttons): New name for `tex-bar-latex-buttons'. + (tex-bar-img-filename): New name for `tex-bar-img-filename'. + (TeX-tool-bar): New name for `tex-tool-bar' group. + (TeX-bar-LaTeX-buttons): New name for `tex-bar-latex-buttons'. + (TeX-bar-LaTeX-all-button-alists): New name for + `tex-bar-latex-all-button-alists'. + (TeX-tool-bar-button-definitions): New name for + `tex-tool-bar-button-definitions'. + (LaTeX-symbols-toolbar-switch-contents): New name for + `latex-symbols-toolbar-switch-contents'. + (LaTeX-symbols-toolbar-contents): New name for + `latex-symbols-toolbar-contents' + (LaTeX-install-toolbar): New name for `latex-install-toolbar'. + + Use separator only in Emacs, while buildin separator is not + implemented for XEmacs. + (TeX-bar-help-from-command-list): New function, that returns the + :help string for ITEM from TeX-command-list. + (TeX-bar-error-handling-switches): New variable. + (TeX-run-TeX [tex-buf.el]): before-adviced to reset error + internals. + (TeX-TeX-sentinel-check [tex-buf.el]): after-adviced to set error + internals when error happens. + (TeX-bar-LaTeX-button-alist): New button next-error, which is + resp. visible/active when error detected on Emacs/XEmacs. + All buttons received :help from TeX-command-list. + (TeX-bar-LaTeX-buttons): next-error is default, and file is no + longer default. + +2004-10-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-auto-class-regexp-list): New variable. + Match "\DeclareRobustCommand\foo" besides + "\DeclareRobustCommand{\foo}" as well. + (LaTeX-auto-regexp-list): Use it. + (LaTeX-auto-cleanup): Do not consider key=value options. + Check for "Package" in addition to "package". + +2004-10-26 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-auto-generate-global): Only parse cls and sty files. + +2004-10-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-match-command-in-braces): + Remove references to non-existent variables. + +2004-10-26 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-math-list): Improve doc string and custom type. + (LaTeX-math-default): Add doc string. + +2004-10-26 Frank Küster <frank@kuesterei.ch> + + * doc/quickstart.texi: Don't use so many nodes. Several fixes. + +2004-10-26 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Don't include CVS stuff. + + * doc/changes.texi: Mention experimental tool bar support. + + * Makefile.in (tar-ball): Include tex-bar images. + +2004-10-25 David Kastrup <dak@gnu.org> + + Toolbar patches by Reiner Steib + * Makefile.in (aucteximagedir): Define. + (AUCSRC, AUCELC): Add toolbar files. + (install-images): new target. + + * tex-site.el.in (TeX-image-directory): Define. + + * tex-bar.el (toolbar-x): require toolbar and latex at runtime. + +2004-10-24 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (DOCFILES): Add doc/quickstart.texi. + +2004-10-23 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbar-x.el: + (toolbarx-emacs-mount-popup-menu): Nil cannot be a menu key + anymore (fixed). + (toolbarx-test-image-type): Improve comments. Add support for + variables defined with `defimage', which are considered a simple + value for the :image property. + (toolbarx-emacs-refresh): Nil cannot be a toolbar (menu) key + anymore (fixed). + (toolbarx-install-toolbar): Improve documentation for the :image + property. + +2004-10-22 Miguel Frasson <frasson@math.leidenuniv.nl> + + * tex-bar.el: Improve comments. Symbol-toolbar code moved to the + bottom of the file. + (tex-bar-latex-buttons): Improve comments. Add custom :type. + (tex-bar-latex-buttons): New command -- display a list of defined + buttons. + (tex-bar-available-meaning-alists): Remove (renamed). + (tex-bar-latex-all-button-alists): New name of + `tex-bar-available-meaning-alists'. Add custom :type. + (tex-bar-meaning-alist): Remove (renamed). + (tex-bar-latex-button-alist): New name of `tex-bar-meaning-alist'. + Add custom :type. Renamed `latex-symbols' button to + `latex-symbols-experimental'. + + * toolbar-x.el: Improve comments. + (toolbarx-process-group-without-insert): Become autoloaded. + (toolbarx-process-group): Code cleanup. + (toolbarx-process-symbol): Code cleanup. + (toolbarx-default-toolbar-meaning-alist): Separator button label + renamed from `:sep' to `separator'. + +2004-10-22 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (European): Adjust to change of + `LaTeX-italian-open-quote'. + +2004-10-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (TEX_INPUT_DIRS): Do not use -e command line option + for grep. + +2004-10-18 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/quickstart.texi: Fix markup. + +2004-10-18 Frank Küster <frank@kuesterei.ch> + + * doc/quickstart.texi: New chapter. + + * doc/changes.texi: Mention `Quick Start'. + + * doc/auctex.texi (Font Specifiers): Add \textrm and \textsf + (Commands): Add TeX-Omega-mode + (top): Print contents near at the beginning. + + * doc/macros.texi: New macro @sans. + + * doc/intro.texi (Introduction): Remove sections obsoleted by + `Quick Start' (Indentation and filling, Completion, Editing your + document, Outlines). + +2004-10-18 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/todo.texi, doc/install.texi, doc/history.texi, + doc/changes.texi, doc/auctex.texi: Remove optional arguments of + all @node commands. + + * doc/Makefile.in (TEXIFILES): Add quickstart.texi. + +2004-10-18 Frank Küster <frank@kuesterei.ch> + + * doc/Makefile.in (TEXIFILES): Add macros.texi. + (auctex.dvi, auctex.pdf): Depend on TEXIFILES. + +2004-10-18 Christian Schlauer <cschl@arcor.de> + + * latex.el (LaTeX-env-figure, LaTeX-env-minipage): Point out to + the user that the placement (figure) and position (minipage) + specifiers are optional arguments. + (LaTeX-env-figure): Simplify. Do not insert the (optional) + placement specifier `LaTeX-float' into the buffer if the user + entered the empty string when asked for `float'. + +2004-10-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-keywords): Correctly evaluate + keywords when making `font-latex-match-*-keywords' defcustom. + +2004-10-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/todo.texi (Bugs): Document some bugs related to font locking + and folding. + + * latex.el (LaTeX-insert-environment): Partial rewrite. Stay in + comments. Do not comment uncommented following lines. Get rid of + redundant comment prefix. + (LaTeX-indent-calculate): Check for beginning of buffer. + (LaTeX-indent-calculate-last): Do not check for beginning of + buffer. Fixes wrong indentation of environments at the top of the + buffer. + +2004-10-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-nth-arg): + Use `TeX-find-closing-brace' instead of `forward-sexp'. + Fixes problems with comment characters in \url macros. + + * latex.el (LaTeX-paragraph-commands): Use `regexp-opt' to + generate the regexp. + (LaTeX-common-initialization): Add support for "$$" to + `paragraph-start'. + + * context.el (ConTeXt-mode-common-initialization): Add support for + "$$" to `paragraph-start'. + + * font-latex.el: Remove change log. + (font-latex-make-keywords): New function. + (font-latex-match-variable-keywords-local) + (font-latex-match-variable-make) + (font-latex-match-variable-keywords-set) + (font-latex-match-variable-keywords, font-latex-match-variable) + (font-latex-match-reference-keywords-local) + (font-latex-match-reference-make) + (font-latex-match-reference-keywords-set) + (font-latex-match-reference-keywords) + (font-latex-match-reference) + (font-latex-match-function-keywords-local) + (font-latex-match-function-make) + (font-latex-match-function-keywords-set) + (font-latex-match-function-keywords, font-latex-match-function) + (font-latex-match-title-1-keywords-local) + (font-latex-match-title-1-make) + (font-latex-match-title-1-keywords-set) + (font-latex-match-title-1-keywords, font-latex-match-title-1) + (font-latex-match-title-2-keywords-local) + (font-latex-match-title-2-make) + (font-latex-match-title-2-keywords-set) + (font-latex-match-title-2-keywords, font-latex-match-title-2) + (font-latex-match-title-3-keywords-local) + (font-latex-match-title-3-make) + (font-latex-match-title-3-keywords-set) + (font-latex-match-title-3-keywords, font-latex-match-title-2) + (font-latex-match-title-4-keywords-local) + (font-latex-match-title-4-make) + (font-latex-match-title-4-keywords-set) + (font-latex-match-title-4-keywords, font-latex-match-title-2) + (font-latex-match-textual-keywords-local) + (font-latex-match-textual-make) + (font-latex-match-textual-keywords-set) + (font-latex-match-textual-keywords, font-latex-match-textual) + (font-latex-match-warning-keywords-local) + (font-latex-match-warning-make) + (font-latex-match-warning-keywords-set) + (font-latex-match-warning-keywords, font-latex-match-warning) + (font-latex-match-warning-function): Now generated by + `font-latex-make-keywords'. + (font-latex-match-bold-command-keywords-local) + (font-latex-match-bold-command-keywords) + (font-latex-match-bold-command) + (font-latex-match-italic-command-keywords-local) + (font-latex-match-italic-command-keywords) + (font-latex-match-italic-command) + (font-latex-match-math-command-keywords-local) + (font-latex-match-math-command-keywords) + (font-latex-match-math-command) + (font-latex-match-type-command-keywords-local) + (font-latex-match-type-command-keywords) + (font-latex-match-type-command) + (font-latex-match-bold-declaration-keywords-local) + (font-latex-match-bold-declaration-keywords) + (font-latex-match-bold-declaration) + (font-latex-match-italic-declaration-keywords-local) + (font-latex-match-italic-declaration-keywords) + (font-latex-match-italic-declaration) + (font-latex-match-type-declaration-keywords-local) + (font-latex-match-type-declaration-keywords) + (font-latex-match-type-declaration): New variables generated by + `font-latex-make-keywords'. + (font-latex-match-bold-command) + (font-latex-match-bold-command-make) + (font-latex-match-bold-command-keywords-set) + (font-latex-match-italic-command) + (font-latex-match-italic-command-make) + (font-latex-match-italic-command-keywords-set) + (font-latex-match-math-command) + (font-latex-match-math-command-make) + (font-latex-match-math-command-keywords-set) + (font-latex-match-type-command) + (font-latex-match-type-command-make) + (font-latex-match-type-command-keywords-set) + (font-latex-match-bold-declaration) + (font-latex-match-bold-declaration-make) + (font-latex-match-bold-declaration-keywords-set) + (font-latex-match-italic-declaration) + (font-latex-match-italic-declaration-make) + (font-latex-match-italic-declaration-keywords-set) + (font-latex-match-type-declaration) + (font-latex-match-type-declaration-make) + (font-latex-match-type-declaration-keywords-set): New functions + generated by `font-latex-make-keywords'. + (font-latex-keywords-1): Use new functions. + (font-latex-bold-command-keywords) + (font-latex-italic-command-keywords) + (font-latex-math-command-keywords) + (font-latex-type-command-keywords) + (font-latex-bold-declaration-keywords) + (font-latex-italic-declaration-keywords) + (font-latex-type-declaration-keywords): Remove. + (font-latex-match-command-with-arguments): New name for + `font-latex-match-command-outside-arguments'. Third argument now + is an integer instead of a binary. It specifies the number of + mandatory arguments of a LaTeX macro. Simplify the function. + (font-latex-match-font-cache) + (font-latex-match-font-outside-braces): Remove. + (font-latex-match-in-brace-cache): New name for + `font-latex-match-infont-cache'. + (font-latex-match-command-in-braces): New name for + `font-latex-match-font-inside-braces'. Generalize, so that it can + be used for any command and does not return a special, complex + match. + (font-latex-set-syntactic-keywords): Try to minimize false + fontifications of macros which may look like \foo{bar} and + \foo{bar{. + (font-latex-commented-outp): Do not consider comment characters in + verbatim content. + +2004-10-15 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-default-format, LaTeX-default-width) + (LaTeX-default-position): Fix doc strings. + +2004-10-14 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-default-width): Make it buffer local. + (LaTeX-env-minipage): Pick up new value of LaTeX-default-width. + +2004-10-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-spec-list): Add starred sectioning + commands. + + * latex.el (LaTeX-fill-region-as-paragraph): Do not add linebreaks + after "$$ " at the end of paragraph filling. + (LaTeX-fill-move-to-break-point): Simplify. Add support for + $$...$$ type display math. + + * style/jurabib.el: New file. + + * Makefile.in (STYLESRC): Add jurabib.el. + + * doc/changes.texi: Mention support for the jurabib package. + +2004-10-14 Miguel Frasson <frasson@math.leidenuniv.nl> + + * auctb.el: Removed (renamed to tex-bar.el) + + * tex-bar.el: Added; (new name of auctb.el). Added support for + buttons and customization. + (install-auctex-toolbar): removed. + (tex-tool-bar): New custom group, inside AUCTeX group. + (tex-tool-bar-button-definitions): New custom group, inside + tex-tool-bar group. + (tex-bar-latex-buttons): New custom variable: buttons in LaTeX + mode. + (tex-bar-meaning-alist): New custom variable. + (tex-bar-available-meaning-alists): New custom variable: + collection of variables for meaning-alists. + (latex-install-toolbar): New function: install the toolbar for + LaTeX mode. + (latex-symbols-toolbar-contents): added separator between symbol + switches and symbols. + + * toolbarx.el: Removed (renamed to toolbar-x.el) + + * toolbar-x.el: Added; (new name of toolbarx.el). + (toolbarx-default-toolbar-meaning-alist) Added `:sep' button. + (toolbarx-emacs-add-button): clean up. + +2004-10-13 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-default-width): New variable. + (LaTeX-env-minipage, LaTeX-env-tabular*): Use it. + (LaTeX-environment): Mention it in the doc string. + (LaTeX-env-label): Reindent. + + * tex.el (TeX-delete-dups): Use our own (faster) version. + + * latex.el (LaTeX-env-array, LaTeX-env-minipage) + (LaTeX-env-tabular*): Don't delete whitespace after inserting the + environment. Cursor position corresponds to proper indentation + now. From Christian Schlauer <cschl@arcor.de> with some + modifications. + +2004-10-12 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (Completion): Mention `C-c RET' for + `TeX-insert-macro'. Fixed typo. + (Parsing Files): Fixed typo. + (European): Improved. + From Frank Küster <frank@kuesterei.ch>, slightly modified. + + * latex.el (LaTeX-common-initialization): Use `LaTeX-env-tabular*' + for "tabular*". + +2004-10-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (Texinfo-insert-node): Emacs 21.3 and earlier + expect a list of lists. + + * tex.el: Cater for `delete-selection-mode'. + `eval-after-load' (used for support of desktop.el) in Emacs 21.3 + and earlier expects a string, not a symbol. + (TeX-point-is-escaped): Remove. Implementation of + `TeX-escaped-p', which does the same, is slightly nicer. + (TeX-insert-dollar): Use `TeX-escaped-p'. + +2004-10-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Small clean-ups and rearrangements. + (font-latex-match-variable-keywords) + (font-latex-match-reference-keywords) + (font-latex-match-function-keywords) + (font-latex-match-title-1-keywords) + (font-latex-match-title-2-keywords) + (font-latex-match-title-3-keywords) + (font-latex-match-title-4-keywords) + (font-latex-match-textual-keywords) + (font-latex-match-warning-keywords): Remove redundant defvars. + (font-latex-match-variable, font-latex-match-reference) + (font-latex-match-function, font-latex-match-title-1) + (font-latex-match-title-2, font-latex-match-title-3) + (font-latex-match-title-4, font-latex-match-textual) + (font-latex-match-warning): Set default values and make + buffer-local. + (font-latex-match-reference): Add doc string. + (font-latex-set-syntactic-keywords): Do not set comment syntax. + +2004-10-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/booktabs.el, style/captcont.el, style/fancyref.el, + style/mdwlist.el, style/natbib.el, style/nicefrac.el, + style/paralist.el, style/scrbase.el, style/scrbook.el, + style/scrlttr2.el, style/scrpage2.el, style/scrreprt.el, + style/subfigure.el, style/units.el (TeX-add-style-hook): Do not + set up font-latex variables if font-latex is not loaded and + enabled. + + * style/alltt.el, style/listings.el, style/url.el + (TeX-add-style-hook): Do not set up font-latex variables if + font-latex is not loaded and enabled. Reinitialize font-lock + defaults. + + * font-latex.el: Do not autoload `texmathp'. + (font-latex-fontify-script): Doc fix. + (font-latex-script): Do without `texmathp'. + (font-latex-syntactic-keywords): Default to nil. + Make buffer-local. + (font-latex-setup): Set syntactic keywords. + +2004-10-08 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-update-style, TeX-parse-arguments) + (TeX-parse-argument, VirTeX-common-initialization) + (TeX-auto-parse-region): Simplify code by using `unless'. + +2004-10-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-search-forward-unescaped) + (TeX-search-backward-unescaped, TeX-re-search-forward-unescaped) + (TeX-search-unescaped, TeX-escaped-p): New functions. + (TeX-find-macro-boundaries): Use `TeX-escaped-p'. + + * latex.el (LaTeX-newline, LaTeX-current-indentation) + (LaTeX-fill-region-as-para-do, LaTeX-fill-move-to-break-point): + Use new search functions from tex.el. + + * tex-fold.el (TeX-fold-make-overlay, TeX-fold-hide-item) + (TeX-fold-show-item): Respect `font-lock-mode'. + + * style/amstex.el: Add copyright and license information. + ("amstex"): Do not load amsmath.el in `plain-tex-mode' or + `ams-tex-mode'. + +2004-10-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp): Limit environment search with result of + macro search if possible. + + * font-latex.el (font-latex-verb-like-commands): New variable. + (font-latex-set-syntactic-keywords): Use it. + (font-latex-match-command-outside-arguments) + (font-latex-match-font-outside-braces) + (font-latex-match-font-inside-braces): Check face at the beginning + of the match to make keyword fontification possible even if a + macro's argument was already fontified due to syntactic keyword + fontification. + + * style/listings.el (TeX-add-style-hook): Suppress indentation in + lstlisting environments. Fontify both \lstinline|...| and + \lstinline{...}. Add lstlisting environment to + `LaTeX-verbatim-regexp'. + + * style/url.el (TeX-add-style-hook): Treat arguments \url|...| and + \url{...} as verbatim. + + * style/alltt.el (TeX-add-style-hook): Use buffer-local variable + `font-latex-verbatim-environments-local'. + +2004-10-05 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbarx.el (toolbarx-default-toolbar-meaning-alist): + New constant, providing a MEANING-ALIST for the insertion of the + default buttons and some extra ones in Emacs and XEmacs. + +2004-10-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-output-view-style): Move more special items upwards. + Remove "a4" and "a5" styles. + +2004-10-04 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbarx.el: + (toolbarx-emacs-add-button) + (toolbarx-test-image-type): Add Emacs `image descriptor' as valid + image specification (Emacs only). + (toolbarx-emacs-add-button): "transp-strip" is new `tranparent + strip' image file. + + * images/bibtex.xpm, images/dvipdf.xpm, images/dvips.xpm, + * images/error.xpm, images/exec.xpm, images/execbibtex.xpm, + * images/execdvips.xpm, images/execerror.xpm, + * images/execpdftex.xpm, images/exectex.xpm, + * images/execviewdvi.xpm, images/execviewpdf.xpm, + * images/execviewps.xpm, images/gv.xpm, images/jumpdvi.xpm, + * images/pdftex.xpm, images/pspdf.xpm, images/sep.xpm, + * images/tex.xpm, images/view.xpm, images/viewdvi.xpm, + * images/viewpdf.xpm, images/viewps.xpm: Add symbolic color + 'backgroundToolBarColor' to make pics work in (GNU/Linux) XEmacs + +2004-10-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Some clean-ups, rearrangements and performance + improvements. + (font-latex-verbatim-face): XEmacs does not like :inherit. + (font-latex-setup): Activate `font-latex-syntactic-face-function'. + (font-latex-faces-present-p): New function. + (font-latex-match-command-outside-arguments): Use it. + (font-latex-bold-command-keywords) + (font-latex-italic-command-keywords) + (font-latex-math-command-keywords) + (font-latex-type-command-keywords): New variables. + (font-latex-match-font-outside-braces): Use them. + Check for comment and verbatim faces. + (font-latex-bold-declaration-keywords) + (font-latex-italic-declaration-keywords) + (font-latex-type-declaration-keywords): New variables. + (font-latex-match-font-inside-braces): Use them. + Check for comment and verbatim faces. + (font-latex-script): Use `font-latex-faces-present-p'. + + * doc/changes.texi: Add some new features and fixed bugs. + +2004-09-29 Miguel Frasson <frasson@math.leidenuniv.nl> + + * images/bibtex.xpm, images/dvipdf.xpm, images/dvips.xpm, + * images/error.xpm, images/exec.xpm, images/execbibtex.xpm, + * images/execdvips.xpm, images/execerror.xpm, + * images/execpdftex.xpm, images/exectex.xpm, + * images/execviewdvi.xpm, images/execviewpdf.xpm, + * images/execviewps.xpm, images/gv.xpm, images/jumpdvi.xpm, + * images/pdftex.xpm, images/pspdf.xpm, images/sep.xpm, + * images/tex.xpm, images/view.xpm, images/viewdvi.xpm, + * images/viewpdf.xpm, images/viewps.xpm: Add designed images for + toolbar buttons. + +2004-09-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-do-multi-line): Add new option and use + it as default value. + (font-latex-use-cache): New variable. + (font-latex-match-command-outside-arguments) + (font-latex-match-font-outside-braces) + (font-latex-match-font-inside-braces): Use it. + (font-latex-check-cache): Do not check if cache is to be used. + (font-latex-setup): Set up multi-line font locking. + +2004-09-28 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbarx.el: Support for grouping `:insert' clauses in the 3 + engines (performance improvement.) Better comments and + docstrings. + (toolbarx-process-symbol): Fix `nreverse'-missing bug. + + * auctb.el: Fix Copyright notice (to FSF). Remove "AMS Special" + from ppup menu. Simplify. Remove garbage comments from end. + (auctb-img-filename): Remove "symb-pics/" from return. + Add "symb-pics/" explicitly where it is needed in the defconst's. + + * images, images/dropdown.xpm, images/ltx-symb-turn-off.xpm, + * images/ltx-symb-turn-on.xpm: Add designed images for symbol + toolbar. + +2004-09-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Add change log entries and bump version. + (font-latex-find-matching-close): Fix typo in last commit. + (font-latex-match-font-inside-braces): Set actual numbers in the + match, not nil. Fixes errors with `font-lock-multiline' enabled. + +2004-09-27 David Kastrup <dak@gnu.org> + + * font-latex.el (font-latex-find-matching-close): Simplify. + + * latex.el (LaTeX-math-default): Use `W in math mode for the Omega + letter. + + * tex.el (TeX-find-macro-start-helper): Simplify. + (TeX-find-macro-end-helper): Simplify. + (TeX-find-macro-end-helper): Stop if `forward-sexp' fails. + + * doc/todo.texi (Wishlist): Macro spell checking mentioned. + +2004-09-26 Miguel Frasson <frasson@math.leidenuniv.nl> + + * toolbarx.el: Add to cvs (first version). + + * auctb.el: Add to cvs (first version); features only a symbol + toolbar. + +2004-09-24 Davide G. M. Salvetti <salve@debian.org> + + * configure.in: Add `--(en|dis)able-build-dir-test' switch to + allow disabling `VALID_BUILD_DIR'. + +2004-09-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (VirTeX-common-initialization): Revert last change. + + * font-latex.el (font-latex-keywords-2): Use function + `font-latex-match-script' instead of regexp directly. + (font-latex-fontify-script): Doc fix. + (font-latex-match-script): Reintroduce. + +2004-09-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-verbatim-macros): New variable. + (LaTeX-fill-move-to-break-point): Do not break inside of macros + defined in `LaTeX-verbatim-macros'. + (LaTeX-fill-newline): Do not trigger auto-fill. + + * style/listings.el (TeX-add-style-hook): Add "lstinline" to + `LaTeX-verbatim-macros'. + + * font-latex.el (font-latex-set-syntactic-keywords): "*" is not + allowed as a \verb delimiter. + + * doc/todo.texi (Bugs): Another bug gone the way of the poodle. + +2004-09-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-indent-line): Use XEmacs' functions to deal with + extents/overlays. Avoids dependence on overlay.el. + (LaTeX-fill-region-as-paragraph): Inhibit filling of "Local + Variables" section, if to be filled as a paragraph. + + * style/url.el: Add some (low-level) symbols for completion and + fontification. + (TeX-arg-urlstyle): New function. + + * doc/todo.texi (Bugs): Remove some obsolete bug descriptions. + +2004-09-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-verbatim-environments): Change from + defvar to defcustom. + (font-latex-verbatim-environments-local) + (font-latex-verbatim-macros) + (font-latex-verbatim-macros-local): New variables. + (font-latex-set-syntactic-keywords): Use them. + + * style/listings.el: New file. + + * Makefile.in (STYLESRC): Add it. + + * doc/changes.texi: Mention support for listings.sty. + +2004-09-16 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/changes.texi: Mention built fixes. + +2004-09-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-commented-outp): Reimplement for + better performance. + + * doc/changes.texi: Streamline documentation of performance + changes. + + * tex.el (TeX-search-syntax-table): Make XEmacs happy. + (VirTeX-common-initialization): Append our stuff to the end of + `find-file-hooks'. Fixes problems with `auto-insert-mode'. + +2004-09-15 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4 (EMACS_LISP): quote ${emacs}, Windows.... + +2004-09-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Add changes from 11.51 up to now. + + * style/url.el: New file. + + * Makefile.in (STYLESRC): Add style/url.el. + +2004-09-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-keywords-1): Add highlighter for math + macros. + (font-latex-keywords-2): Use regexp for matching instead of + `font-latex-match-script'. + (font-latex-match-font-outside-braces): Add support for math, esp. + "\ensuremath". + (font-latex-match-script): Remove. + (font-latex-script): Fix check for present faces. Add `texmathp' + check in case there is no math face present. + +2004-09-09 Reiner Steib <Reiner.Steib@gmx.de> + + * aclocal.m4 (texinputdirs): Strip leading "!!". + +2004-09-08 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (TeX-arg-input-file): Remove duplicates from the + completion list. Simplify code by using `unless'. + +2004-09-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (Texinfo-insert-node): New function. + (Texinfo-mode-map): Use it. + +2004-09-07 Davide G. M. Salvetti <salve@debian.org> + + * aclocal.m4 (EMACS_LISP): Sync echo output with real emacs + invocation. + +2004-09-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (Texinfo-insert-environment): Add a space between + inserted "@end" and environment name in case of active region. + +2004-09-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-search-syntax-table): New function and variable. + (TeX-find-balanced-brace): New function. + (TeX-find-closing-brace): Use `TeX-find-balanced-brace'. + (TeX-find-opening-brace): Ditto. + (TeX-find-macro-boundaries): Add `lower-bound' argument. + (TeX-find-macro-start-helper): Add `limit' argument. + (TeX-find-macro-start): Ditto. + +2004-08-31 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/changes.texi: Add `LaTeX-includegraphics-read-file'. + Mention use of `start' for MikTeX and fpTeX. + + * latex.el (LaTeX-includegraphics-read-file): New variable. + + * tex.el (TeX-delete-dups): New defun or defalias. + + * style/graphicx.el (LaTeX-includegraphics-read-file-TeX): + Rename from `LaTeX-includegraphics-read-file'. Remove duplicates using + `TeX-delete-dups'. + (LaTeX-includegraphics-read-file-relative): Insert relative + filename. From Dan Nicolaescu <dann@ics.uci.edu>. + (LaTeX-arg-includegraphics): Use funcall for image-file. + +2004-08-28 David Kastrup <dak@gnu.org> + + * Version 11.53 released. + +2004-08-28 David Kastrup <dak@gnu.org> + + * doc/tex-ref.tex: Bump version. + + * configure.in: Bump version number. + + * auctex.spec (Version): bump to 11.53. + + * doc/auctex.texi: Bump version to 11.53. + +2004-08-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (install-el): Fix typos. + +2004-08-27 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-kpathsea-format-alist): + Add LaTeX-includegraphics-extensions. + (TeX-search-files): Fix non-kpathsea case. + + * style/graphicx.el (LaTeX-includegraphics-read-file): + Use completion based on TeX-search-files. + +2004-08-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-preserve-comments): New variable. + (TeX-fold-buffer-type): Use it. + + * font-latex.el (font-latex): Add to AUCTeX's customization group. + (font-latex-find-matching-close): Correctly recognize multiple + escape characters. Add missing paren. + +2004-08-26 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-site.el.in (japanese-slitex-mode): Remove obsolete autoload + of slitex. + + * tex-jp.el (japanese-plain-tex-mode, japanese-latex-mode): + Use `TeX-defun' for getting version info into mode doc. + +2004-08-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-mik.el: Use `start' instead of the respective executable for + PostScript, PDF and HTML files. + + * tex-fptex.el: Ditto. + +2004-08-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-find-macro-boundaries): Detect the start of any + macro, not just those consisting of [A-Za-z@]. + Remove some superfluous `goto-char' calls. + (TeX-find-macro-start-helper): Reimplement once again. + Original patch by David Kastrup; slightly modified. Doc fix. + (TeX-find-macro-end-helper): Doc fix. Handle macros not + consisting of [A-Za-z@] correctly. + (TeX-find-opening-brace): Improve performance. + +2004-08-25 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el: Autoload `TeX-process-set-variable' and `TeX-region-file'. + +2004-08-25 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4: EMACS_PATH_LISPDIR: Expand lispdir if relative to + binary. Quote lispdir, and deal with exec_prefix, add missing + bracket. + + * aclocal.m4: Fix xemacs<->emacs mistake, restore path searching + when --without-packagedir is given + + * configure.in: enable --without-packagedir + + * aclocal.m4: Barf if packagedir not found, don't bother with + load-path on xemacs' lispdir + +2004-08-25 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-command): Call `TeX-process-set-variable' with + correct options, so that the viewer command is next unless + overridden. + + * tex.el (TeX-set-mode-name): Set `TeX-command-next' in the + buffers where they actually count. + +2004-08-24 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-math-default): Correctly code "jmath" and + "Bbbk". + +2004-08-24 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (Mathematics): Add `LaTeX-math-menu-unicode'. + (Changes): Refer to `history.texi' _after_ the newer changes. + + * doc/changes.texi: Added versions 11.51-11.53. + +2004-08-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (VirTeX-common-initialization): Use "%" instead of + `comment-start' for `comment-start-skip'. + (TeX-find-opening-brace): Do not use an inverse matcher but negate + the whole expression. + (TeX-find-macro-start-helper): Reimplement. Should be much faster + now. + + * latex.el (LaTeX-current-environment): + Use `buffer-substring-no-properties'. + (LaTeX-indent-line): Revert last change. Only multi-line overlays + at the start of a line are affected by the XEmacs bug. + + * tex-info.el (Texinfo-environment-list): Add "command" macro. + +2004-08-24 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/install.texi (Prerequisites): Add `easy-mmode.el' update for + XEmacs. + +2004-08-23 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-indent-line): Get all overlays, not just one. + (LaTeX-math-default): Add iota. + (LaTeX-math-default): Use different symbol for triangle. + (LaTeX-math-default): Don't use `?\S-e' for `?E'. + + * tex.el (TeX-match-buffer): Use `buffer-substring-no-properties' + (TeX-in-commented-line): Use `skip-chars-forward' and `forward-line'. + (TeX-in-line-comment): Use `forward-line'. + (TeX-brace-count-line): Use `skip-chars-forward'. + + * RELEASE: Some updates. + + * latex.el (LaTeX-section): Use an active region as title if available. + (LaTeX-section-title): Prompt with title if present. Should we + ask at all? + (LaTeX-math-list): Add Unicode code point. + (LaTeX-math-menu-unicode): New customization variable for unicode + in math menu. Only set in GTK Emacs for now. Does not work on + XEmacs. Use it for initializing the menus. Also prefix menu + points with backslash. + + * Makefile.in (.PHONY): Declare a bunch of phony targets to + protect against users making files/directories with that name (in + particular "lisp"). + +2004-08-22 David Kastrup <dak@gnu.org> + + * style/italian.el ("italian"): Don't overwrite existing local + variable settings. + + * style/ngerman.el ("ngerman"): Don't overwrite existing local + variable settings. + + * style/german.el ("german"): Don't overwrite existing local + variable settings. + + * tex.el (TeX-set-mode-name, TeX-PDF-mode): XEmacs needs two + arguments for `local-variable-p'. + +2004-08-20 David Kastrup <dak@gnu.org> + + * tex.el (desktop): Save TeX-Omega-mode, too. + + * Makefile.in (full-release): Source rpm is auctex, not + auctex-emacs. + + * auctex.spec (Provides): Provide auctex as well to satisfy + preview-latex. create package emacs nevertheless. + + * Version 11.52 released. + +2004-08-20 David Kastrup <dak@gnu.org> + + * tex.el (AUCTeX-version): move to front and also eval when + compiling. Other version info moved, too. + (TeX-defun): Macro for putting version info into definition. + (plain-tex-mode): Use `TeX-defun'. + (ams-tex-mode): Use `TeX-defun'. + + * tex-info.el (texinfo-mode): Use `TeX-defun' for getting version + info into mode doc. + + * latex.el (latex-mode): Use `TeX-defun' for getting version info + into mode doc. + + * context.el (context-mode): Use `TeX-defun' for getting version + info into mode doc. + + * auctex.spec (BuildRoot): New naming scheme. + + * RELEASE: Add `DESTDIR' blurb. + +2004-08-19 David Kastrup <dak@gnu.org> + + * auctex.spec: Change `tex-site.el' to overwriting config file + mode. + + * tex.el (plain-tex-mode): Move menu initializiation here instead + of `plain-TeX-common-initialization'. We don't want "TeX" menus + in `ConTeXt-mode' or `AmSTeX-mode'. + (plain-TeX-common-initialization): remove `easy-menu-add' here. + (TeX-common-menu-entries): Change "Customize" strategy again. + (plain-TeX-menu-entries): Move from `plain-TeX-menu'. + (plain-TeX-mode-menu): Use `plain-TeX-menu-entries'. + (AmSTeX-mode-map): Derive from `TeX-mode-map' not + `plain-TeX-mode-map'. + (AmSTeX-mode-menu): Define menu for `AmSTeX-mode'. + (ams-tex-mode): Add menus in proper order. + + * tex-info.el (texinfo-mode): Swap order of `easy-menu-add'. + + * latex.el (LaTeX-common-initialization): Swap order of + `easy-menu-add'. + + * context.el (ConTeXt-mode-common-initialization): Swap order of + `easy-menu-add', move `major-mode' init to front. + + * latex.el (LaTeX-common-initialization): Exchange order of + `easy-menu-add' to get better menu layout in XEmacs. + +2004-08-19 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec (description): Overhauled. + + * doc/install.texi: Markup fixes, see "(texinfo)command". + + * doc/wininstall.texi: Ditto. + +2004-08-19 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-mode-menu): Use `TeX-common-menu-entries'. + + * tex-info.el (Texinfo-mode-menu): Use `TeX-common-menu-entries'. + + * tex.el (ams-tex-mode): Add `plain-TeX-mode-menu' here. Doh. + + * context.el (ConTeXt-mode-menu): Use `TeX-menu-with-help' instead + of `TeX-maybe-remove-help'. + (ConTeXt-mode-menu): Use `TeX-common-menu-entries'. + + * tex.el (TeX-customization-menu): Save the customization menu + here when generated, so that we have it available in all modes. + (TeX-common-menu-entries): The common menu entries for TeX modes. + (plain-TeX-mode-menu): Use `TeX-common-menu-entries'. + + * configure.in: export `localstatedir'. + + * Makefile.in (localstatedir): import `localstatedir'. + +2004-08-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi (Customizing): tex-site.el should be edited no + more. Customize should be used instead. Relevant variables are + determined during configuration now. + Mention build/installation commands for contributed files. + +2004-08-19 Reiner Steib <Reiner.Steib@gmx.de> + + * auctex.spec: Fixes for SuSE. + +2004-08-19 David Kastrup <dak@gnu.org> + + * aclocal.m4: `putative-existing-lisp-dir' is not a package + directory if `lisp' is not a path component. + Normalize whitespace. + Remove trailing slash from packagedir. + + * tex-site.el.in (TeX-macro-global): Don't quote texinputdirs + additionally. + + * aclocal.m4: Really remove trailing slashes/backslashes. + Don't expand `lispdir'. + (library): Surround `texinputdirs' with quotes. Output it + enclosed in parens. + (library): Let `autodir' refer unexpanded to `localstatedir'. + Add some quoting in patterns. + + * doc/Makefile.in (DESTDIR): introduce `DESTDIR' into installation + targets. + + * Makefile.in (DESTDIR): introduce `DESTDIR' into installation + targets. + +2004-08-18 David Kastrup <dak@gnu.org> + + * tex-fold.el (TeX-fold-buffer-type): Don't use `end-of-buffer' as + it plays around with the current window point. + + * Makefile.in (auctexdir, styledir): Use `${...}' for symmetry + with aclocal.m4 + + * aclocal.m4: Use `${...}' instead of `$(...)' everywhere. + +2004-08-18 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4 (EMACS_LISPDIR): Output expanded lispdir + +2004-08-18 David Kastrup <dak@gnu.org> + + * configure.in: Shell-quote autodir. + + * RELEASE: Some minor changes. + +2004-08-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Change version to 11.52. Replace old feature/bug + information. + + * font-latex.el (font-latex-script): Disable raising of characters + for older Emacsen. Original patch by Reiner Steib. + Bump version and add change log entry. + + * tex-fold.el (TeX-fold-unfolded-face): Make it look more blueish + on displays with 24bit color depth. + (TeX-fold-buffer-type): Use either a complemented character + alternative to be on the safe side or "\\_>" on Emacsen which + support it. + +2004-08-17 Reiner Steib <Reiner.Steib@gmx.de> + + * texmathp.el (texmathp-tex-commands-default): Add \label. + Various checkdoc-related fixes. + +2004-08-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-buffer-type): Use alternative way to + determine end of search pattern. Fixes problem with starred + macros. + Fix compile errors and add further match alternatives. + (TeX-fold-item): Recognize starred macros as well. + XEmacs does not know `match-string-no-properties'. + (TeX-fold-make-overlay): Do not alter `display-string' before + `face' is set. + (TeX-fold-hide-item): Get only the string part of + `display-string'. + + * tex.el (TeX-fold-menu): Wrap value in `TeX-menu-with-help'. + Fixes XEmacs start-up error. + + * tex-mik.el: Fix typo in comment. + + * auctex.spec (Version): Change to 11.52. + + * configure.in: Change AUCTeX version to 11.52. + + * doc/tex-ref.tex: Change AUCTeX version to 11.52. + + * doc/auctex.texi: Change AUCTeX version to 11.52. + +2004-08-17 David Kastrup <dak@gnu.org> + + * Makefile.in (full-release): Fix a few things. + + * Version 11.51 released. + +2004-08-17 David Kastrup <dak@gnu.org> + + * aclocal.m4: Quote when expanding and remove trailing backslash, + too. + (library): Don't check for $PWD but for default-directory. + +2004-08-16 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: move --prefix description up, since it + might be the only needed option. + + * doc/tex-ref.tex (section{Font Selection}): Add italic + corrections and small-caps entry. + + * tex.el (info): Add more prefixes to `Info-file-list-for-emacs'. + + * tex-jp.el (japanese-TeX-command-list): Comment addition. + + * RELEASE: Add availability and update release notes. + + * Makefile.in (RPMROOT): New variable. + (tar-ball): Clean up `$(FTPDIR)' and `$(WWWDIR/doc)' before + installation. + (full-release): New target that does RPM building, signing and + other stuff for upload. + (patch): gzip the patch. + + * auctex.spec: Add definition stuff for SuSE. + (BuildRoot): Don't specify infodir when it is not used. + + * bib-cite.el: Fix refTeX link. + +2004-08-16 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4 (EMACS_PROG_EMACS): Add "${prefix}/bin" for Windows users + + * aclocal.m4 (EMACS_LISPDIR): Remove trailing slash from lispdir_expanded elisp string + +2004-08-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (VALID_BUILD_DIR): New function. + + * configure.in: Use it. + Change AUCTeX version to 11.51. + + * doc/tex-ref.tex: Change AUCTeX version to 11.51. + + * doc/auctex.texi: Change AUCTeX version to 11.51. + + * auctex.spec (Version): Change to 11.51. + + * Makefile.in (distclean): Get rid of autom4te.cache. + +2004-08-15 David Kastrup <dak@gnu.org> + + * tex-info.el: Change Copyright notice to FSF + + * tex-mik.el: Change Copyright notice to FSF + + * tex.el: Change Copyright notice to FSF + + * font-latex.el: Change Copyright notice to FSF + + * multi-prompt.el: Change Copyright notice to FSF + + * tex-buf.el: Change Copyright notice to FSF + + * tex-site.el.in: Change Copyright notice to FSF + + * style/scrartcl.el: Change Copyright notice to FSF + + * style/scrbook.el: Change Copyright notice to FSF + + * style/scrlttr2.el: Change Copyright notice to FSF + + * style/scrreprt.el: Change Copyright notice to FSF + + * latex.el: Change Copyright notice to FSF + + * tex-info.el: Change Copyright notice to FSF + + * tex-mik.el: Change Copyright notice to FSF + + * tex.el: Change Copyright notice to FSF + + * bib-cite.el: Change Copyright notice and URLs. + +2004-08-15 Dan Nicolaescu <dann@ics.uci.edu> + + * latex.el (LaTeX-common-initialization): Don't set + `selective-display'. + +2004-08-15 David Kastrup <dak@gnu.org> + + * doc/tex-ref.tex: Add Omega entry, rearrange. + + * tex.el (TeX-print-command): Use `%(o?)'. + (TeX-command, TeX-Omega-command, LaTeX-command) + (LaTeX-Omega-command, ConTeXt-engine, ConTeXt-Omega-engine): + New customization strings to implement various expanders. + (TeX-command-list): Use them. + (LaTeX-command-style): Same here. + (TeX-printer-list, TeX-view-style, TeX-output-view-style): + Use `%(o?)'. + (TeX-expand-list): New entries. + (TeX-PDF-mode): Don't switch on in Omega mode. + (TeX-Omega-mode): New minor mode. + (tex-omega-mode): alias for it. + (TeX-mode-map): Keybinding for it. + (TeX-mode-specific-command-menu-entries): Add quick viewer entry. + (TeX-mode-specific-command-menu-entries): Add Omega toggle and + inactivate PDF when Omega is on. + + * context.el (ConTeXt-expand-options): New function for generating + `texexec' options. + +2004-08-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-fold-menu): New variable. + (plain-TeX-mode-menu): Use it. + + * context.el (ConTeXt-mode-menu): Use `TeX-fold-menu'. + + * latex.el (LaTeX-mode-menu): Use `TeX-fold-menu'. + + * tex-info.el: Change every occurence of "TeXinfo" to "Texinfo". + (Texinfo-environment-list): Add some missing environments. + (Texinfo-find-env-end, Texinfo-find-env-start): New functions. + (Texinfo-mode-menu): Use `TeX-fold-menu'. + + * tex-fold.el (TeX-fold-buffer-type): Support folding of + environments in texinfo-mode. + (TeX-fold-item): Ditto. + (TeX-fold-hide-item): Display an error string if the macro + argument cannot be found. + +2004-08-14 David Kastrup <dak@gnu.org> + + * tex.el (TeX-command-list): rename `%(execmode)' to `%(execopts)' + since it has gotten quite fatter. + (TeX-expand-list): Implement `TeX-PDF-mode', + `TeX-interactive-mode', `TeX-source-specials-mode' for ConTeXt and + pass on `ConTeXt-current-interface'. + +2004-08-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-mik.el: Change `TeX-source-specials-viewer-flags' to + `TeX-source-specials-view-position-flags' as the latter is now + used in tex.el. + Set `TeX-source-specials-view-editor-flags'. + + * tex-fptex.el: Ditto. + +2004-08-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (top): We want the introduction to appear in + HTML output as well. + +2004-08-13 David Kastrup <dak@gnu.org> + + * Version 11.50 released. + +2004-08-13 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4: Add another alternative for lispdir + +2004-08-13 David Kastrup <dak@gnu.org> + + * auctex.spec (Source0): Change source URL. + + * Makefile.in (EXTRAFILES): Add RELEASE and auctex.spec. + (tar-ball): Don't create CHANGES-$(TAG), just CHANGES (as it is + always a longer history). But create RELEASE-$(TAG) instead: + that's release-specific. + +2004-08-13 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Changes to --prefix and --with-auto-dir, + partly by Christian Schlauer. + Add a few words of my own after suggestions. + + * doc/changes.texi, style/units.el, style/nicefrac.el, + Makefile.in: Add contributed styles for units.sty and + nicefrac.sty from Christian Schlauer. + +2004-08-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-unspec-use-name): New variable. + (TeX-fold-item): Use it. + + * RELEASE: Add warning about `TeX-command-list'. + + * doc/auctex.texi (Commands): Add "be". + (Folding): Document `TeX-fold-unspec-use-name'. + +2004-08-13 David Kastrup <dak@gnu.org> + + * Makefile.in (tar-ball): copy only one auctex, add pdf manual and + reference card. + + * doc/Makefile.in (dist): Add tex-ref, and both pdf and ps + (tex-ref.ps, auctex.ps): Use -Ppdf option for better quality. + + * auctex.spec (BuildRoot): Add CHANGES. + + * Makefile.in (release-commit): There are no Version: strings + anymore, don't replace them. + + * tex-fptex.el: customize Queue and Print commands appropriately. + + * tex-mik.el: customize Queue and Print commands appropriately. + + * tex.el (TeX-expand-list): Call TeX-printer-query differently. + (TeX-command-menu-print, TeX-command-menu-printer-entry) + (TeX-command-menu-entry): Implement stuff differently, add "Other" + menu entry. + + * tex-buf.el (TeX-printer-query): Change arguments here. + Reorganize, too. + + * doc/auctex.texi (Commands): Fix a warning. + + * tex-info.el (TeXinfo-mode-menu): Other quoting. + (texinfo-mode): Set `TeX-mode-p', `TeX-base-mode-name', call + `TeX-set-mode-name'. + + * context.el (ConTeXt-mode-menu): Add the environments back to + folding. + + * doc/auctex.texi, doc/faq.texi, doc/install.texi, doc/intro.texi, + doc/todo.texi: various changes and smaller typos corrected. + + * doc/macros.texi fix problems with PDF links and indexing. + + * configure.in: Check for pdftex, dvips, texi2html, texi2dvi, + texi2pdf. + + * doc/Makefile.in (TEXI2HTML, TEXI2DVI, TEXI2PDF): new variables + entered by configure. + (auctex.dvi): Use texi2dvi. + (auctex.pdf): New target. + (clean): Remove PDF files. + +2004-08-12 David Kastrup <dak@gnu.org> + + * tex-jp.el (japanese-TeX-command-list): Fix this to new style. + (LaTeX-command-style): Same here. Hey, this should even make + preview-latex work mostly with Japanese files and PDFTeX. + +2004-08-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-view-extension): Remove. + (TeX-view-output-file): Use the function `TeX-output-extension' + instead of `TeX-view-extension'. + (TeX-run-set-command): Setting `TeX-view-extension' not necessary + anymore. + + * tex.el (TeX-view-extension): Remove. + +2004-08-11 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: explain about tex-mik.el and tex-fptex.el + + * tex-fptex.el: require tex-site. Only set `TeX-lisp-directory' + if it has not been customized. Construct `TeX-command-list' from + its default value. + + * tex-mik.el: same here. + + * tex.el (TeX-mode-specific-command-menu): Tiny optimization. + (TeX-mode-specific-command-menu-entries): Make it legal for + `TeX-command-mode-menu-entry' to return nil for indicating no menu + entry at all (so that entries like "Print" or "Queue" may be + dynamically removed). + +2004-08-11 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/auctex.texi (Commands): Adjust references. + (Viewing): Make source specials a subsection. Adjust references. + + * tex.el (TeX-source-specials-mode): Remove bogus :link. Refer to + viewing node of the manual. + + * doc/changes.texi: Added references. + + * doc/todo.texi (Wishlist): Markup fix. + +2004-08-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auctex.texi (Viewing): Add some information about forward + and inverse search. + + * tex-mik.el: Synchronize `TeX-command-list' with tex.el. + Use gsview32 in `TeX-output-view-style'. + + * tex-fptex.el: Synchronize `TeX-command-list' with tex.el. + +2004-08-11 David Kastrup <dak@gnu.org> + + * doc/tex-ref.tex: Move papersize stuff to the front. + Fiddle somewhat with the sizes, too. + + * auctex.spec (Version): Change version, web sites, some build + stuff (this is not yet finished). + + * auc-old.el: remove. + + * doc/Makefile.in (TEXIFILES): refer to auctex.texi instead of + auc-tex.texi. Change all dependent stuff, too. + + * Makefile.in (DOCFILES): refer to doc/auctex.texi instead of + doc/auc-tex.texi + + * doc/auc-tex.texi: renamed into doc/auctex.texi. + + * doc/auc-tex.texi (Commands): Some rewording. + + * doc/todo.texi (Wishlist): Some rearrangements and additions. + +2004-08-10 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-math-default): Reorder and complete Greek + letters, use Babel transcription conventions for them. + + * doc/tex-ref.tex: Add \sl definition. + (section{Miscellaneous}): Use \string~ for tilde. + (section{Greek Letters}): Reorder and complete Greek letters. + + * tex.el (TeX-PDF-mode): Set `TeX-output-extension' too. + (ams-tex-mode): Move `TeX-set-mode-name' after running hooks. + + * tex-ref.tex: merge math-ref.tex, update a few things, format + stuff. + + * math-ref.tex: removed. + + * doc/Makefile.in (all): Remove math-ref.tex + + * Makefile.in (DOCFILES): Remove math-ref.tex + +2004-08-10 Reiner Steib <Reiner.Steib@gmx.de> + + * RELEASE: Add `volunteers welcome'. + + * doc/auc-tex.texi (Completion): TeX-insert-macro-default-style. + + * tex.el (TeX-source-specials-mode): Add manual link. + + * doc/auc-tex.texi (Commands): Say how to enable + TeX-source-specials-mode permanently. + (Viewing): Describe TeX-view. + +2004-08-10 David Kastrup <dak@gnu.org> + + * tex.el (TeX-maybe-remove-help): convert Emacs' :visible into + XEmacs' :included. + + * latex.el (LaTeX-mode-menu): Change bug submit menu entry. + + * context.el (ConTeXt-mode-menu): Same. + + * tex.el (plain-TeX-mode-menu): Same. + + * tex-info.el (TeXinfo-mode-menu): Same. + + * latex.el (LaTeX-mode-menu): A few changed help strings and other + small fry. + + * context.el (ConTeXt-mode-menu): Rework menu, reorganize it, add + help strings. + +2004-08-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (TeXinfo-mode-menu): Capitalize menu entries. + + * context.el (ConTeXt-project-structure-menu-name) + (ConTeXt-section-block-menu-name, ConTeXt-mode-menu): + Capitalize menu entries. + + * tex-info.el (TeXinfo-mode-menu): Add help strings. + + * tex.el (TeX-command-list): Set a default value which will not + lead to an inactive menu entry. + (plain-TeX-mode-menu): Add some help strings. + Capitalize menu entries. + (tex-source-specials-mode): New alias for + `TeX-source-specials-mode'. + + * latex.el (LaTeX-mode-menu): Rearrange and insert help strings. + Capitalize menu entries. + + * tex-fold.el (tex-fold-mode): New alias for `TeX-fold-mode' used + in tex.el. + (TeX-fold-buffer-type): Support folding of environments in ConTeXt + mode as well. + (TeX-fold-item): Ditto. + + * doc/auc-tex.texi (Commands): Change `TeX-source-specials' to + `TeX-source-specials-mode' where appropriate. + + * RELEASE: Include contributors. (Hopefully I got everybody.) + +2004-08-10 David Kastrup <dak@gnu.org> + + * tex.el (TeX-set-mode-name, TeX-source-specials-map) + (TeX-source-specials-mode, TeX-source-specials-expand-options) + (TeX-source-specials-view-expand-options): + Rename `TeX-source-specials' to `TeX-source-specials-mode'. + (TeX-PDF-mode): Make first arg optional (actually, not sure this + is a good idea). + (tex-pdf-mode): alias for `TeX-PDF-mode'. + (tex-interactive-mode): alias for `TeX-interactive-mode' + (tex-fold-mode): add autoload. + (TeX-mode-map, TeX-mode-specific-command-menu-entries): + rename `TeX-source-specials' to `TeX-source-specials-mode'. + (TeX-command-list): Add help strings. + (TeX-command-menu-entry): Splice help into command entries. + (TeX-mode-specific-command-menu-entries): Remove help in XEmacs. + (TeX-mode-specific-command-list): Save unnecessary copies and + conses. + +2004-08-09 David Kastrup <dak@gnu.org> + + * tex.el (TeX-set-mode-name): Add LOCAL argument. + (TeX-source-specials, TeX-mode-set, TeX-global-PDF-mode) + (TeX-PDF-mode, TeX-interactive-mode): Use it. + (plain-tex-mode): Move `TeX-set-mode-name' to after running the + hooks. + + * latex.el (latex-mode): Move setting the mode name to after + running the hooks. + + * tex.el (TeX-maybe-remove-help): new function (noop on Emacs). + (TeX-menu-with-help): new macro (noop on Emacs). + (TeX-mode-specific-command-menu-entries): Add a lot of help strings. + (plain-TeX-mode-menu): Same here. + + * latex.el (LaTeX-mode-menu): `:visible' is not known in XEmacs, + and I don't want to clutter the menu with "Convert 209 to 2e" when + not necessary. + + * RELEASE (Requirements): some additions. + Incorporate some suggestions from Ralf. + + * tex.el (TeX-set-mode-name): Actually use `reset' (patch by Ralf + Angeli). + + * latex.el (LaTeX-common-initialization): There is no "LaTeX2e" + command anymore, so don't set it. Don't do anything on + "DVIoutput". doc fixes. + + * doc/auc-tex.texi (Commands): Explain `TeX-command-buffer', + `TeX-pin-region', `TeX-PDF-mode', `TeX-interactive-mode', + `TeX-source-specials'. + +2004-08-09 Berend de Boer <berend@pobox.com> + + * context.el (ConTeXt-current-environment): now properly skips + nested environments instead of always returning the last + environment just above the cursor. + +2004-08-08 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-run-set-command): + Initialize `TeX-output-extension' based on `TeX-PDF-mode'. + + * tex.el (TeX-command-output-list): Don't look at pdf* commands. + Don't have default mode "dvi". + (VirTeX-common-initialization): Don't add to + desktop-locals-to-save locally: that's broken. + (desktop): Add stuff into appropriate variables for proper desktop + save/restore. + (TeX-mode-specific-command-menu-entries, plain-TeX-mode-menu): + Reorganize menus. Add font commands into plain TeX menu. + + * tex-info.el (TeXinfo-mode-menu): Reorganize menu. + + * latex.el (LaTeX-mode-menu): Reorganize menu. + + * context.el (ConTeXt-mode-menu): Reorganize menu. + +2004-08-07 David Kastrup <dak@gnu.org> + + * tex.el (TeX-base-mode-name): Make buffer-local (Doh). + (TeX-set-mode-name): Doc fix. + + * doc/todo.texi (Mid-term Goals): Use @previewlatex macro. + (Mid-term Goals): New entries. Should some of them be moved to + wishlist? Remove a few fixed bugs. + + * doc/macros.texi: move @ConTeXt macro out of info-only section. + Typeset @previewlatex differently. + +2004-08-06 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el: Use "gnu.org" instead of "nongnu.org". + + * bib-cite.el: Ditto. Use "AUCTeX", not "auc-tex". + + * lpath.el: Use "AUCTeX". + +2004-08-05 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/macros.texi: New @ConTeXt macro. + + * doc/auc-tex.texi, doc/changes.texi, doc/history.texi, + doc/todo.texi, doc/wininstall.texi: Use macros @AUCTeX, @ConTeXt, + @LaTeX everywhere. + + * doc/auc-tex.texi (European): Mention Emacs 21. Fixed typo. + + * doc/todo.texi: Help for documentation wanted. + + * doc/changes.texi: Some additions: captcont and subfigure, + `LaTeX-includegraphics-options-alist', `LaTeX-default-position', + kpathsea based completion, `TeX-insert-macro-default-style'. + Refer to installation nodes (autoconf installation). + + * tex.el (TeX-submit-bug-report): Add more explanations. + + * latex.el (LaTeX-style-list): Improve doc-string. + + * font-latex.el (font-latex-script-display): New variable. + Make raise of sub-/superscripts customizable. + (font-latex-unfontify-region, font-latex-script): Use it. + +2004-08-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * RELEASE: Improve sectioning and add some more information. + +2004-08-05 David Kastrup <dak@gnu.org> + + * tex-site.el.in: don't require 'tex-mik on Windows, let the user + load it instead of tex-site if he wants to. + + * tex.el (TeX-command-list): Add `%(PDFout)', `%(mode)' and + `%(execmode)'. Remove `TeX Interactive', `LaTeX Interactive' and + `ConTeXt Interactive'. + (LaTeX-command-style): Don't provide a default for a + `LaTeX-version' of "2": people can customize this if necessary + themselves, we would not know a sane default, anyway. + (TeX-expand-list): Support `TeX-DVI-via-PDFTeX', `%(PDFout)', + `%(mode)' and `%(execmode)'. + (TeX-set-mode-name): Add `reset' flag to indicate that the next + step should again be TeXing. Add "I" flag. + (TeX-source-specials): Call `TeX-set-mode-name' with `reset' flag. + (TeX-mode-set): Variable setter for TeX modes. + (TeX-PDF-mode): Make the default value a global mode. + (TeX-global-PDF-mode): Toggle function to change default + `TeX-PDF-mode'. + (TeX-PDF-mode): Remove local binding of `TeX-PDF-mode' in case of + conflicts. Call `TeX-set-mode-name' with `reset' flag. + (TeX-DVI-via-PDFTeX): New customizable variable. + (TeX-interactive-mode): New mode. + (TeX-mode-map): Add binding for `TeX-interactive-mode'. + (TeX-mode-specific-command-menu-entries): Add menu entry for it. + + * tex-buf.el (TeX-command-expand): Document `%%'. + (TeX-run-TeX): If `TeX-interactive-mode' is set, run + `TeX-run-interactive' instead. + +2004-08-04 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-fontify-script): Default to nil in + XEmacs. + +2004-08-04 David Kastrup <dak@gnu.org> + + * tex.el (TeX-base-mode-name, TeX-set-mode-name): Move to front, + add catering for global mode switches. + (TeX-source-specials, global-TeX-PDF-mode): Use this. + + * latex.el (LaTeX-common-initialization): Add style hook for + "ifpdf". + +2004-08-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-unfontify-region): New function. + (font-latex-setup): Use it. + +2004-08-04 David Kastrup <dak@gnu.org> + + * tex-fptex.el (TeX-command-list): Remove PDFTeX calls. + + * tex-mik.el (TeX-command-list): Remove PDFTeX calls. + + * tex.el (TeX-command-list): Use %(PDF) where necessary, drop + PDFTeX entries. + (LaTeX-command-style): Add %(PDF) here. + (TeX-expand-list): Expand %(PDF). + (TeX-mode-p): Move. + (TeX-PDF-mode, global-TeX-PDF-mode): New minor modes. + (TeX-PDF-mode-on, TeX-PDF-mode-off): Shortcuts for calling. + (TeX-PDF-mode-parsed): New variable. + (TeX-set-mode-name): Simplify. + (TeX-mode-map): Add C-c C-t C-p for TeX-PDF-mode. + (TeX-mode-specific-command-menu-entries): Add menu entry for it. + + * latex.el (LaTeX-math-mode): Refresh modeline after generating + it, not before. + (LaTeX-common-initialization): Add style-hooks fo pdftex, dvips + and others. + + * tex.el (TeX-view-style, TeX-output-view-style): Place dvi file + name last. + +2004-08-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-source-specials): New customization group. + (TeX-source-specials, TeX-source-specials-tex-flags) + (TeX-source-specials-places) + (TeX-source-specials-view-start-server): Use it + (TeX-source-specials-view-position-flags) + (TeX-source-specials-view-gnuclient-flags) + (TeX-source-specials-view-emacsclient-flags): Change defvar to + defcustom. + (TeX-source-specials-view-editor-flags): New customize option. + (TeX-source-specials-view-expand-client): Return not only client + but options as well. + (TeX-source-specials-view-expand-options): + Use `TeX-source-specials-view-editor-flags'. + +2004-08-03 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-source-specials-places): Change comment. + +2004-08-03 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-mode-menu): Add "Close Environment" + + * tex.el (TeX-source-specials-view-gnuserv-p): + replaces `TeX-source-specials-view-guess-server'. + (TeX-source-specials-view-expand-client) + (TeX-source-specials-view-expand-options): Use this. + +2004-08-03 Reiner Steib <Reiner.Steib@gmx.de> + + * style/alphanum.el, style/doc.el, style/jura.el, + style/ltx-base.el, style/ltxdoc.el: Added coding cookies. + +2004-08-03 David Kastrup <dak@gnu.org> + + * RELEASE: Change Source Special description and a few other + things. + +2004-08-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-expand-list): New %cS expander for + `TeX-source-specials-view-expand-client'. + (TeX-source-specials-view-start-server): New customize option. + (TeX-source-specials-view-start-server-asked): New variable. + (TeX-source-specials-view-position-flags): New name. + Formerly known as `TeX-source-specials-viewer-flags'. + (TeX-source-specials-view-gnuclient-flags): New variable. + (TeX-source-specials-view-emacsclient-flags): New variable. + (TeX-source-specials-view-expand-client): New function. + (TeX-source-specials-view-expand-options): Expand options for + inverse search as well. + Correct return value. + Use `TeX-source-specials-view-guess-server'. + (TeX-forward-comment-skip): Only consider consecutive comment + characters when comparing the comment prefix. + (TeX-source-specials-view-guess-server): New function. + + * doc/changes.texi: Avoid email addresses. + + * doc/tex-ref.tex: Update to 11.50. + +2004-08-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Advertise support for toggling source + specials. Mention macro completion in docTeX mode and fix for + filling in XEmacs with preview-latex and activated previews. + +2004-08-01 David Kastrup <dak@gnu.org> + + * doc/wininstall.texi: Remove info about manual installation. + Explain about preferred path syntax. + + * doc/install.texi: Move info dor INSTALL.Windows. + +2004-08-01 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fptex.el: Do not overwrite customized variables. + + * tex-mik.el: Ditto. + + * Makefile.in (STYLESRC): Add new style files. + + * aclocal.m4: Synchronize with preview-latex. + + * tex-fold.el (TeX-fold-macro-spec-list): Add references to + default. + (TeX-fold-buffer-type): Additionally pass display string + specification and type to `TeX-fold-make-overlay' + (TeX-fold-item): Ditto. + (TeX-fold-make-overlay): Accept display string specification and + type as arguments and set them accordingly in the overlay. + Do not signal overfullness if the dispay string contains a + linebreak. + (TeX-fold-macro-nth-arg): Make `macro-start' mandatory so that + macro boundaries may be determined even if point is not inside of + a macro. + (TeX-fold-hide-item): Recompute display string on closure if + display string specification is an integer. + + * style/alphanum.el: Add header and reformat. + + * style/jura.el: Add header. + + * style/doc.el: New file. Contributed by Frank Küster + <frank@kuesterei.ch>. + (TeX-add-style-hook): Remove bogus `LaTeX-add-index-entries' call. + + * style/ltx-base.el: New file. Contributed by Frank Küster + <frank@kuesterei.ch>. + + * style/ltxdoc.el: Ditto. + +2004-07-31 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el: Autoload `texmathp'. + (font-latex-keywords-2): Add `font-latex-match-script'. + (font-latex-script-keywords): Remove. + (font-latex-fontify-script): Remove :set function. + (font-latex-match-script): New function. + + * tex-mik.el (TeX-view-style): Remove unconditional source + specials option for yap. + (TeX-output-view-style): Set it. + (TeX-source-specials-viewer-flags): Ditto. + + * tex-fptex.el (TeX-view-style): Adapt options to WinDVI + documentation. + (TeX-output-view-style): Set it. + (TeX-source-specials-viewer-flags): Ditto. + +2004-07-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (tar-ball): Remove warning which often confuses + users. + + * aclocal.m4 (EMACS_MAJOR_VERSION): New test and variable. + + * configure.in: Fix AUCTeX version. + + * tex-site.el.in: At least (X)Emacs 21 is required. + + * tex.el: Ditto. + + * doc/Makefile.in (install): Remove warning which often confuses + users. + + * doc/auc-tex.texi: Fix version numbers. + (Changes): New name. Formerly known as "History". + (ToDo): New heading. + + * doc/changes.texi: Add heading for `rawfile'. Change `section' + to `heading'. + + * doc/faq.texi (Frequently Asked Questions About AUCTeX): + At least (X)Emacs 21 is needed. + + * doc/install.texi (Prerequisites): Ditto. + +2004-07-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-spec-list): Extend default. + Add specification for argument number. + (TeX-fold-env-spec-list): Ditto. + (TeX-fold-folded-face): Rename from + `TeX-fold-display-string-face'. + (TeX-fold-unfolded-face): New face and variable. + (TeX-fold-buffer-type): Move through buffer from bottom to top in + a single run in order to allow easier prioritization of nested + overlays. + (TeX-fold-item): Compute display string via + `TeX-fold-macr-nth-arg'. + (TeX-fold-make-overlay): Consider the length of the display string + as well when judging if a line is overfull. Let priority be + computed by `TeX-fold-macr-nth-arg'. Do not call + `TeX-fold-hide-item'. + (TeX-fold-macro-nth-arg): New function. + (TeX-fold-priority-step): New variable. + (TeX-fold-prioritize): New function. + (TeX-fold-hide-item): Set mouse-face. + (TeX-fold-show-item): Ditto. Do not set face twice. + (TeX-fold-post-command): Recognize mouse clicks as well. + + * tex.el (TeX-find-macro-boundaries): New function. + (TeX-find-macro-end-helper): Find macro arguments with a preceding + linebreak as well. + + * doc/auc-tex.texi (Folding): Document new functionality. + + * latex.el (LaTeX-fill-region): Improve performance by avoiding + unnecessary calls to `LaTeX-forward-paragraph'. + + * font-latex.el (font-latex-fontify-script): Doc fix. + +2004-07-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-make-overlay): New function. + Remove superfluous `let'. + (TeX-fold-buffer-type, TeX-fold-item): Use it. + (TeX-fold-mode): Call `TeX-fold-clearout-buffer' after clearing + `post-command-hook'. + +2004-07-22 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-indent-line): Temporarily make invisible + overlays visible in XEmacs. + + * tex.el (TeX-comment-region): Use a real function instead of an + `fset' and temporarily change `comment-start' for certain XEmacs + releases. + (TeX-comment-or-uncomment-region): Use it. + (TeX-comment-or-uncomment-paragraph): Ditto. + + * doc/changes.texi: Remove warning about TeX-fold not working + correctly on XEmacs. + +2004-07-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-display-string-face): Remove `min-colors' + spec as XEmacs does not like them. + (TeX-fold-hide-item): Set face on the glyph and not on the + overlay/extent in XEmacs. + (TeX-fold-post-command): Do not check detached extents in XEmacs. + + * context.el (ConTeXt-mode-menu): Check if variable is defined. + Necessary for XEmacs compatibility. + (ConTeXt-menu-update): Fix creation of environment menus. + + * latex.el (LaTeX-mode-menu): Check if variable is defined. + Necessary for XEmacs compatibility. + + * tex-info.el (TeXinfo-mode-menu): Ditto. + +2004-07-20 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-set-title-face): New function. + (font-latex-title-fontity): Use it to make customization work + during a session. + (font-latex-title-*-face): Use it to simplify the initialization. + +2004-07-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-macro-spec-list): New name for + `TeX-fold-spec-list'. More unobtrusive default. + (TeX-fold-env-spec-list) + (TeX-fold-unspec-macro-display-string) + (TeX-fold-unspec-env-display-string): New variables. + (TeX-fold-keymap): New key bindings which are more mnemonic and + orient at preview-latex's bindings instead of outline.el. + (TeX-fold-buffer): Transfer contents to `TeX-fold-buffer-type' + which can be used for both macros and environments. + (TeX-fold-buffer-type): New function. + (TeX-fold-macro): Transfer contents to `TeX-fold-item' which can + be used for both macros and environments. + (TeX-fold-env): New function. + (TeX-fold-item): New function. Prioritize overlays. + (TeX-fold-clearout-item): New name for `TeX-fold-clearout-macro'. + (TeX-fold-hide-item, TeX-fold-show-item): Adapt doc string. + + * latex.el (LaTeX-hide-environment): Remove. Functionality is now + provided by TeX-fold. + (LaTeX-show-environment): Ditto. + (LaTeX-mode-map): Remove key bindings for `LaTeX-hide-environment' + and `LaTeX-show-environment'. + (LaTeX-mode-menu): Adapt key bindings for folding. Remove menu + entries for `LaTeX-hide-environment' and `LaTeX-show-environment'. + + * context.el (ConTeXt-mode-menu): Adapt key bindings for folding. + + * tex-info.el (TeXinfo-mode-menu): Ditto. + + * doc/auc-tex.texi (Folding): Document new and changed functions + and variables related to folding environments (new) and macros. + + * doc/changes.texi: Advertise support for folding environments. + +2004-07-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-source-specials): Do not set a lighter in + `minor-mode-alist' but use `TeX-set-mode-name' instead. + (TeX-base-mode-name): New variable. + (TeX-set-mode-name): New function. + (plain-tex-mode): Set `TeX-base-mode-name' instead of `mode-name' + and use `TeX-set-mode-name'. + (ams-tex-mode): Ditto. + + * context-en.el (context-en-mode): Ditto. + + * context-nl.el (context-nl-mode): Ditto. + + * latex.el: Do not add a lighter for `LaTeX-math-mode' in + `minor-mode-alist'. + (LaTeX-math-mode): Use `TeX-set-mode-name'. + (latex-mode): Set `TeX-base-mode-name' instead of `mode-name' and + use `TeX-set-mode-name'. + + * tex-fold.el (TeX-fold-mode): Do not set a lighter in + `minor-mode-alist' but use `TeX-set-mode-name' instead. + +2004-07-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-find-macro-start): Fix handling of nested macros. + (TeX-find-macro-start-helper): New function. + (TeX-find-macro-end-helper): New function. + + * tex-info.el (TeXinfo-mode-menu): Fix extension of customize + menu. + + * latex.el (LaTeX-env-figure): Prevent superfluous blank lines and + give RefTeX a chance to generate a label in environments with a + bottom caption. Patch by Christian Schlauer <cs-usenet@arcor.de>. + (LaTeX-style-list): Add entry for beamer class. + + * context.el (ConTeXt-mode-menu): Add "Show/Hide" submenu. + + * doc/auc-tex.texi (Folding): Document key binding for + `TeX-fold-mode'. + +2004-07-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (TeXinfo-mode-map): Inherit from `TeX-mode-map'. + (texinfo-mode): Enable TeX-master functionality. + + * tex.el (TeX-one-master): Include .texi files. + (TeX-add-local-master): Use "@c " as comment prefix in Texinfo + mode. + + * tex-fold.el (TeX-fold): Move customization group from `LaTeX' to + `AUCTeX'. + + * doc/changes.texi: Advertise folding functionality. + +2004-07-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el (TeX-fold-display-string-face): Cater for display + devices with few colors. + (TeX-fold-keymap): Add key bindings for showing and hiding + individual macros. + (TeX-fold-macro): New function. + (TeX-fold-clearout-buffer): New name for + `TeX-fold-remove-all-overlays'. + (TeX-fold-clearout-macro): New function. + (TeX-fold-remove-overlays): New function. + + * latex.el (LaTeX-mode-menu): Add entries for showing and hiding + individual macros. + + * tex-info.el (TeXinfo-mode-menu): Update and rearrange. + Add entries for "Show/Hide" functionality. + + * doc/auc-tex.texi (Show/Hide): New section. + (Folding): New subsection. + (Outline): Move under "Show/Hide". + +2004-07-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el: Do not require tex-fold.el. + Autoload `TeX-fold-mode'. + (TeX-mode-map): Add keybinding for `TeX-fold-mode'. + + * tex-fold.el: Do not add keybinding for `TeX-fold-mode' with + `TeX-mode-hook'. + (TeX-fold-post-command): Do not hijack other overlays. + +2004-07-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fold.el: New file. + + * Makefile.in (AUCSRC): Add tex-fold.el. + (AUCELC): Add tex-fold.elc. + + * latex.el (LaTeX-find-macro-start): Move to tex.el and rename to + `TeX-find-macro-start'. + (LaTeX-find-macro-end): Analogous. + (LaTeX-forward-paragraph): Change call to `LaTeX-find-macro-*' to + `TeX-find-macro-*'. + (LaTeX-backward-paragraph): Ditto. + (LaTeX-mode-menu): Add submenu "Show/Hide". Add entries for + relevant functions in tex-fold.el and add the show/hide + environment entries which were in "Formatting and Marking" before. + + * tex.el: Require tex-fold.el. + (TeX-find-macro-start): New function. Formerly known as + `LaTeX-find-macro-start' in latex.el. + (TeX-find-macro-end): New function. Formerly known as + `LaTeX-find-macro-end' in latex.el. + +2004-07-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * texmathp.el (texmathp-match-environment): Let environments be + added more than once. + + * font-latex.el (font-latex-superscript-face) + (font-latex-subscript-face): New faces. + (font-latex-script-keywords): New constant. + (font-latex-fontify-script): New customize option. + (font-latex-script): New function. + +2004-07-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-buf.el (TeX-view): Inform the user if the output file is + not present. + + * tex.el (TeX-forward-comment-skip): Fix `count' functionality. + Stop as well at places where the prefix of commented lines + changes. Simplify and improve efficiency by saving current + prefix before while-loop starts. Adapt documentation string. + (TeX-backward-comment-skip): Adapt documentation string. + +2004-06-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * context.el (ConTeXt-environment-menu-name): Make name distinct + from `LaTeX-environment-menu-name'. + (ConTeXt-environment-modify-menu-name): Analogous. + +2004-06-17 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (tar-ball): Change permissions of auctex-$(TAG). + + * tex.el (TeX-source-specials-expand-view-options): New function. + (TeX-expand-list): Add new specifier (%dS) for + `TeX-source-specials-expand-view-options'. + (TeX-view-style, TeX-output-view-style): Add %dS for source + specials in all xdvi calls. + (TeX-expand-list): Remove useless lambda. + + * tex-buf.el (TeX-output-style-check): Remove addition of source + specials. + +2004-06-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-one-master): Add "dtx" extension. + (TeX-add-local-master): Insert \iffalse...\fi in docTeX mode. + (TeX-file-extensions): Add "dtx" extension. + (docTeX-default-extension): New variable. + + * latex.el (LaTeX-find-macro-start): Use next whitespace if the + end of an opened macro cannot be determined. + (doctex-mode): Set `TeX-default-extension' to + `docTeX-default-extension'. + + * doc/changes.texi: Add information about `TeX-newline-function'. + +2004-06-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/mdwlist.el (TeX-add-style-hook): Change variables only + locally. + + * latex.el (LaTeX-default-verb-delimiter): New variable. + (TeX-arg-verb): Use it. + +2004-06-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/mdwlist.el: New header. + (TeX-add-style-hook): Add support for \makecompactlist, \suspend, + and \resume. + +2004-06-14 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-pin-region): Don't balk at unpinning if there + is no pinned region. + + * tex.el (TeX-mode-specific-command-menu-entries): Be more + meticulous about when the pin-region menu entry can be used. + +2004-06-13 David Kastrup <dak@gnu.org> + + * tex.el (TeX-pin-region): Add autoload form. + (TeX-mode-map): Add keybinding for TeX-pin-region. + (TeX-mode-specific-command-menu-entries): Add menu entry for it. + + * tex-buf.el (TeX-command-master, TeX-command-region) + (TeX-command-buffer): Add `override-confirm' prefix argument. + (TeX-pin-region): New function to replace previous interactive + prefix for TeX-command-region. Change TeX-region semantics + accordingly. + +2004-06-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/faq.texi: New file. + + * doc/auc-tex.texi (Filling): Add information about activating + `auto-fill-mode'. + (FAQ): Add node. + + * doc/todo.texi (Bugs): Add bug when fontifying unmatched math + toggles in verbatim-like environments. + + * doc/.cvsignore: Add `FAQ'. + + * doc/Makefile.in (TEXIFILES): Add `faq.texi'. + (FAQ): New target. + (dist): Add `FAQ'. + (clean): Ditto. + + * .cvsignore: Add `FAQ'. + + * Makefile.in (DOCFILES): Add `doc/faq.texi'. + (EXTRAFILES): Remove `PROBLEMS'. + (tar-ball): Add `FAQ'. + + * autogen.sh: Activate creation of `FAQ' from `doc/faq.texi'. + +2004-06-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-fptex.el (TeX-command-list): Use correct expander for + "View PDF". + + * latex.el (LaTeX-fill-region-as-para-do): Fix removal of trailing + whitespace. + (LaTeX-fill-move-to-break-point): Prevent infinite loop in + commented regions. + (LaTeX-fill-newline): Fix compatibility with XEmacs, i.e. use + code related to text properties only for Emacs and reintroduce + insertion of a potential fill prefix for XEmacs. + +2004-06-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Add some news regarding upcoming release. + Try to match former news with actual releases. + +2004-06-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-comment-padding-string): New function. + + * latex.el (LaTeX-newline): Do something sensible if point is + at the start of a commented line or inside of one and right at + the start of another one in the same line. + (LaTeX-insert-environment): Fix insertion of environments if + point is inside or right before a commented line. + (LaTeX-indent-line): Use `TeX-comment-padding-string'. + +2004-06-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-make-title-faces): New function. + (font-latex-title-1-face, font-latex-title-2-face) + (font-latex-title-3-face): Now generated by + `font-latex-make-title-faces' and compatible with XEmacs. + (font-latex-title-4-face): Add face specification for XEmacs. + +2004-06-04 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-view-mouse): New function. + + * tex.el (TeX-source-specials-map): Outcomment madcap mouse + bindings. + (minor-mode-map-alist): Remove TeX-source-specials manually, as I + can't figure out how to not get it placed there by + define-minor-mode. + (TeX-split-string): Correct docs. Simplify. + (TeX-parse-path): Fix pattern. + +2004-06-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-newline): New function. + (TeX-mode-map): Use it. + + * latex.el: Various checkdoc-related fixes. + (LaTeX-forward-paragraph): Check for and cope with multi-line + paragraph commands not only those with a single line. + Check for LaTeX macro at the end of a paragraph command. + (LaTeX-backward-paragraph): Check for and cope with multi-line + paragraph commands not only those with a single line. + (LaTeX-paragraph-command-p): Remove. + (LaTeX-find-macro-start): Find macro start even if point is + already at the start. + + * doc/auc-tex.texi (Marking and formatting): Split into + `Indenting' and `Filling'. + (Indenting): New section. + (Filling): New section. + + * doc/intro.texi: Fix key representations and reference to + `fill-paragraph'. + +2004-06-02 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-format-filter): Don't use split-string which + appears to trigger an XEmacs bug. + +2004-06-02 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-insert-macro-default-style): Fix typo in doc-string. + +2004-06-01 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-no-braces-modes): Remove. Revert unintened + addition from 2004-04-19 commit. + (TeX-insert-macro-default-style): New variable. + (TeX-parse-arguments): Use it. + (TeX-insert-macro): Document dependence on + `TeX-insert-macro-default-style' and prefix. Fix typo in comment. + +2004-05-29 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-source-specials-map): Fix key binding for XEmacs. + +2004-05-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (TEX_INPUT_DIRS): Quote regexps with square brackets. + + * tex.el (TeX-newline-function): Rename. Formerly known as + `TeX-newline'. + (TeX-mode-map): Use new name. + + * doc/auc-tex.texi (Marking and formatting): Rename `TeX-newline' + to `TeX-newline-function'. + +2004-05-26 Reiner Steib <Reiner.Steib@gmx.de> + + * style/graphicx.el (LaTeX-arg-includegraphics): Rewrite. + Optional macro arguments can be controlled by + `LaTeX-includegraphics-options-alist' now. + (LaTeX-includegraphics-extensions) + (LaTeX-includegraphics-read-file): New functions. + (TeX-include-graphics-simple): Remove; use + `LaTeX-includegraphics-options-alist' instead. + (TeX-string-divide-number-unit, TeX-default-unit-for-image): + Move to `tex.el'. + + * latex.el (LaTeX-includegraphics-extensions) + (LaTeX-includegraphics-options-alist) + (LaTeX-includegraphics-strip-extension-flag): New options for + `style/graphicx.el'. + + * tex.el (TeX-kpathsea-path-delimiter): Fix doc-string. + (TeX-insert-macro, TeX-parse-arguments): Skip optional macro + arguments when called with a prefix. + (TeX-string-divide-number-unit, TeX-default-unit-for-image): + From `style/graphicx.el'. + (TeX-arg-maybe): New function. + + * latex.el (LaTeX-common-initialization): Add additional + arguments for \parbox. + +2004-05-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-newline): New name for `TeX-indent-on-newline'. + It now holds function definitions and not mere symbols anymore. + (TeX-mode-map): Use it. + + * doc/auc-tex.texi (Marking and formatting): Remove documentation + for `TeX-indent-on-newline' and document `TeX-newline'. + +2004-05-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-indent-on-newline): New option. + (TeX-mode-map): Use it. + + * doc/auc-tex.texi (Marking and formatting): + Document `TeX-indent-on-newline' plus small corrections. + +2004-05-25 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-command): Add `override-confirm' argument. + (TeX-view): New function, without confirmation. + + * context.el (ConTeXt-mode-map): Inherit keymap instead of + copying. + + * latex.el (LaTeX-mode-map): Inherit keymap instead of copying. + + * tex.el (TeX-source-specials-map): New variable. + (TeX-source-specials): Make a minor mode. + Replaces `TeX-toggle-source-specials' and + `TeX-source-specials-active-flag'. + (TeX-source-specials-expand-options): Adapt to that. + (TeX-electric-macro-map): inherit from + `minibuffer-local-completion-map' instead of copying. + (plain-tex-mode): Help string uses `plain-TeX-mode-map'. + (TeX-mode-p): New variable, set in TeX modes. + (VirTeX-common-initialization): Set it. + (TeX-mode-map): Proper defvar. Add keybindings for + `TeX-source-specials' and `TeX-view'. + (plain-TeX-mode-map): Inherit instead of copy. + (AmSTeX-mode-map): Same here. + + * doc/auc-tex.texi: Change info dir formatting, adapt copyrights + according to the assignment process. + +2004-05-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/install.texi (Configure): Remove unused option + `--with-texmf-dir'. Document new option `--with-tex-input-dirs'. + + * doc/wininstall.texi: Ditto. Add information about new option + `--with-auto-dir'. + + * latex.el (LaTeX-backward-paragraph): Revert check-in of + 2004-05-24. + +2004-05-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-backward-paragraph): Recognize if point is at + the end of a line when the test for a macro following a paragraph + command is carried out. + +2004-05-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-doctex-^^A): Add mistakenly deleted + space again. + +2004-05-21 Reiner Steib <Reiner.Steib@gmx.de> + + * style/graphicx.el (TeX-string-divide-number-unit): Rename from + misspelled `TeX-string-divide-nuber-unit'. Reformat file. + Fix some doc-strings and comments. + +2004-05-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (TEX_INPUT_DIRS): New help string. Better error + handling. + +2004-05-19 David Kastrup <dak@gnu.org> + + * aclocal.m4: Comment EMACS_LISP. + (EMACS_TEST_LISPDIR): remove both trailing backslash and slash. + +2004-05-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-move-to-break-point): Prevent infinite loop + in lines starting with whitespace. + (LaTeX-forward-paragraph): Don't consider paragraph commands + followed directly by a TeX macro as part of an adjacent paragraph. + (LaTeX-backward-paragraph): Ditto. + +2004-05-18 Davide G. M. Salvetti <salve@debian.org> + + * aclocal.m4 (AUCTEX_AUTO_DIR): Change `autodir' default to + `${localstatedir}/auctex' to conform to the GNU Coding Standards. + Add `autodir_expanded' as the properly expanded version of + `autodir'. Inform the user about the check in progress. + * tex-site.el.in (TeX-lisp-directory): Use `@autodir_expanded@'. + +2004-05-17 Reiner Steib <Reiner.Steib@gmx.de> + + * aclocal.m4 (AUCTEX_AUTO_DIR): Avoid AS_HELP_STRING for + compatibility with autoconf < 2.58. + +2004-05-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (TEX_INPUT_DIRS): Use `--expand-braces' instead of + `--show-path' in the kpsewhich calls. Use `--expand-path' as a + fallback e.g. for MikTeX. Assume that we are dealing with a + TDS-compliant TeX system and add "/tex/" and "/bibtex/bst/" + subdirectories to the output of the kpsewhich calls accordingly. + + * latex.el (LaTeX-fill-newline): Don't use code specific to GNU + Emacs for XEmacs. Call `newline-and-indent' instead. + +2004-05-15 Davide G. M. Salvetti <salve@debian.org> + + * aclocal.m4 (AUTO_DIR): Code cleaned; renamed to + `AUCTEX_AUTO_DIR'. + * configure.in: Change `AUTO_DIR' to `AUCTEX_AUTO_DIR'. + +2004-05-14 Davide G. M. Salvetti <salve@debian.org> + + * style/italian.el (LaTeX-italian-open-quote) + (LaTeX-italian-close-quote): Use standard babel syntax rather than + latin1 characters. Patch by David Kastrup <dak@gnu.org>. + +2004-05-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-indent-calculate-last): Ignore commented lines + when called in a non-comment line. + + * style/scrbase.el (TeX-add-style-hook): Fontify \minisec like a + sectioning command. + +2004-05-14 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-auto-generate): Bind `enable-local-eval'. + +2004-05-13 Davide G. M. Salvetti <salve@debian.org> + + * doc/auc-tex.texi (European): Sort languages list alphabetically. + + * doc/install.texi (Configure): Document `--with-auto-dir'. + + * Makefile.in (DOCFILES): Add `doc/macros.texi'. + + * doc/Makefile.in (distclean): New. + +2004-05-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-env-item): Don't eat non-empty lines when + called on a marked region unless they only consist of whitespace + and comment characters. Fill the paragraph of a potentially + outdented line after insertion of \item. + + * aclocal.m4 (TEX_INPUT_DIRS): Repair quoting. + + * tex.el (TeX-kpathsea-format-alist): Rename. Formerly known as + `TeX-kpathsea-directory-alist'. Add information to every format + about the file extensions to be found. + (TeX-search-files-kpathsea): Adapt to new information in + `TeX-kpathsea-format-alist'. + (TeX-mode-specific-command-menu-entries): Move source specials + toggle up to first level of command menu. + +2004-05-12 Davide G. M. Salvetti <salve@debian.org> + + * aclocal.m4 (AUTO_DIR): New function. + * configure.in: Use `AUTO_DIR' to expand `@autodir@' in + `tex-site.el.in'. + * Makefile.in (autodir): Use `@autodir@'. + * tex-site.el.in (TeX-auto-global): Definition moved from + `tex.el'. Use `@autodir@'. + * tex.el (TeX-auto-global): Definition moved to `tex-site.el.in'. + * lpath.el: Bind `TeX-auto-global'. + + * style/italian.el: New file. + * doc/auc-tex.texi (Font Specifiers): Remove two sentences + referring to the old behavior of the short-cuts for easy + insertions of fonts changing macros. (At that time they added + things like `{\it --!--}', now they add things like + `\textit{--!--}'.) + (Marking and formatting): Reflect renaming of + `LaTeX-format-comment-syntax-aware' to `LaTeX-syntactic-comments'. + (European): Document `italian.el'. + * Makefile.in (STYLESRC): Add `italian.el'. + + * lpath.el: Bind `TeX-macro-global'. + * tex.el: No need to `(require 'tex-site)' at compilation time, + see `lpath.el'. + +2004-05-12 David Kastrup <dak@gnu.org> + + * tex.el (TeX-source-specials-active-flag) + (TeX-source-specials-check-function, TeX-source-specials-xdvi-p) + (TeX-source-specials-check-xdvi) + (TeX-mode-specific-command-menu-entries) + (TeX-maybe-set-source-specials, TeX-toggle-source-specials): + Remove all checks for validity of the Source Special options. + Just assume that the user knows what he is asking for. + +2004-05-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * aclocal.m4 (TEX_INPUT_DIRS): Don't use `findtexmf' but a + universal call of `kpsewhich' and unify paths separated by `;' + or `:'. + + * context.el (ConTeXt-mode-menu): Show `TeX-comment-or-uncomment-*' + functions in the menu instead of the comment and uncomment + functions which don't have a key binding. + + * tex.el (plain-TeX-mode-menu): Ditto. + (TeX-mode-map): Move definitions of `C-c ;' and `C-c %' downwards + so that they become visible in the menu. + + * latex.el (LaTeX-fill-region-as-para-do): Remove extra spaces + between words. + (LaTeX-mode-menu): Show `TeX-comment-or-uncomment-*' + functions in the menu instead of the comment and uncomment + functions which don't have a key binding. + +2004-05-11 David Kastrup <dak@gnu.org> + + * style/beamer.el: Updates from Thomas Baumann checked in. + +2004-05-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-doctex-^^A): Add compatibility code + for Emacs 20 and XEmacs to fix compile error. + (font-latex-verbatim-face): Add parentheses to fix error with + Emacs 20. + (font-latex-doctex-preprocessor-face): Ditto. + (font-latex-doctex-documentation-face): Ditto. + + * style/prosper.el (LaTeX-prosper-insert-slide): Don't stay in + comment upon inserting a slide in an overlay. + +2004-05-09 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-source-specials-check-function): Add "Always on" + choice. + +2004-05-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-doctex-syntactic-keywords): Move to + the right place and corrected quoting. + + * context.el (ConTeXt-indent-syntax-table): Create with + `make-syntax-table' instead of `easy-mode-defsyntax' to allow + compilation with Emacs 20. + + * aclocal.m4 (TEX_INPUT_DIRS): New function. + + * configure.in: Use `TEX_INPUT_DIRS' for the expansion of + `@texinputdirs@' in `tex-site.el.in'. + + * tex-site.el.in: Updated header. + (TeX-macro-global): Move here from `tex.el'. + Use `@texinputdirs@'. + + * tex.el: Require `tex-site' at compile time. + (TeX-macro-global): Move to `tex-site.el.in'. + +2004-05-09 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-toggle-source-specials): Add missing call to + `TeX-maybe-set-source-specials' in last commit. + +2004-05-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * font-latex.el (font-latex-verbatim-face) + (font-latex-doctex-preprocessor-face) + (font-latex-doctex-documentation-face): New variables and faces. + (font-latex-verbatim-environments, font-latex-syntactic-keywords) + (font-latex-doctex-syntactic-keywords) + (font-latex-doctex-keywords): New variables. + (font-latex-set-syntactic-keywords) + (font-latex-syntactic-face-function, font-latex-doctex-^^A) + (font-latex-doctex-syntactic-face-function): New functions. + (font-latex-setup): Set special `font-lock-defaults' for docTeX + mode. + (font-latex-commented-outp): Don't classify line comments in + docTeX mode as "real" comments. + + * latex.el (doctex-mode): Call `TeX-install-font-lock' to + activate special fontification in docTeX mode. + + * style/alltt.el (TeX-add-style-hook): Add "alltt" to + `font-latex-verbatim-environments'. + + * context.el: Updated header. + + * context-nl.el: Updated header. + + * context-en.el: Updated header. + (context-en-mode): Set `ConTeXt-current-interface' to "en". + +2004-05-06 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-toggle-source-specials): Simplify the code. + +2004-05-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (DOCFILES): Add `todo.texi'. + +2004-05-05 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-command-list, TeX-source-specials-expand-options) + (plain-tex-mode, TeX-view-extension, ams-tex-mode): Doc fixes. + + * tex.el (TeX-mode-hook, AmS-TeX-mode-hook): Have always been run, + but were not declared with defcustom (or defvar). + + * latex.el (LaTeX-mode-hook): Ditto. + + * Makefile.in (tar-ball-clean): New. + + * autogen.sh: Create README and TODO. + + * .cvsignore, doc/.cvsignore: Add TODO. + +2004-05-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-expand-list): Inserted new expander `%S' for source + specials command line option. + (TeX-command-list): Inserted `%S' for source specials support + where appropriate. + (LaTeX-command-style): Ditto. + (TeX-source-specials-expand-options): New function. + + * tex-buf.el: Updated header. + (TeX-style-check): Remove code specific to source specials and + thereby revert to state before 2004-04-27. + + * tex-jp.el: Updated header. + (japanese-TeX-command-list): Inserted `%S' for source specials + support where appropriate. + + * tex-fptex.el: Updated header. + (TeX-command-list): Inserted `%S' for source specials support + where appropriate. + (LaTeX-command-style): Setting removed. + + * tex-mik.el: Updated header. + (TeX-command-list): Inserted `%S' for source specials support + where appropriate. + (LaTeX-command-style): Setting removed. + + * doc/auc-tex.texi (Checking): Update URL's for lacheck and + chktex. + +2004-05-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el: Header updated. + (TeX-master-file): Remove bogus test for `TeX-header-end'. + + * doc/auc-tex.texi (ToDo): New name for node/section formerly + known as `Projects' or `Wishlist' respectively. + Removed items not relevant anymore and moved the rest to the new + file `doc/todo.texi'. + Removed `Credits' section. + + * doc/Makefile.in (TEXIFILES): New constant. + (auctex): Use it. + (dist): Add `TODO'. + (TODO): New target. + (clean): Add `TODO'. + Some formattig changes. + + * doc/todo.texi: New file. + + * Makefile.in (tar-ball): Add `TODO'. + + * doc/changes.texi: Advertise support for `beamer.cls'. + +2004-04-30 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-command-expand): Add "%%" expansion, make order + of TeX-expand-list irrelevant, make the whole junk work + efficiently. + +2004-04-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el: New header. + (LaTeX-indent-environment-list): Remove `alltt' and add support + for it in `alltt.el' instead. + + * Makefile.in (STYLESRC): Add `alltt.el'. + + * style/alltt.el: New file. + + * doc/changes.texi: Describe changes in quote insertion if + `german.sty' or `ngerman.sty' is used. + Advertise new style files. + +2004-04-29 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-buf.el (TeX-style-check): New optional argument. This fixes + an error in the last commit. + + * tex.el (TeX-expand-list): Use it. + +2004-04-27 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-buf.el (TeX-style-check, TeX-output-style-check): Check for + source special stuff here instead of `TeX-expand-list'. + Honor `TeX-source-specials-places'. + + * tex.el (AUCTeX): Fix URL. + (TeX-default-mode, TeX-force-default-mode, TeX-install-font-lock) + (TeX-source-specials-active-flag): Change custom group. + (TeX-expand-list): Move source special stuff to `TeX-style-check' + and `TeX-output-style-check'. + (TeX-source-specials-tex-flags): Make it customizable. + (TeX-source-specials-places): New variable. + (TeX-source-specials-viewer-flags): No IFS needed anymore. + +2004-04-26 Reiner Steib <Reiner.Steib@gmx.de> + + * context.el (context-guess-current-interface): Simplify code. + +2004-04-25 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (texinfo-mode): Make last change in + `font-lock-defaults' compatible with Emacs 20. + + * latex.el (LaTeX-fill-region-as-paragraph): Indent lines ending + with `\\' upon filling a region. + (LaTeX-fill-region): Prevent infinite loop at end of buffer. + +2004-04-24 David Kastrup <dak@gnu.org> + + * style/natbib.el ("natbib"): Add fontification for regexps. + Patch by Thomas Baumann. + +2004-04-24 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex-info.el (texinfo-mode): Set `font-lock-defaults' as in + `texinfo.el'. This way we get e.g. syntax-highlighting of + comments in Texinfo mode. + +2004-04-24 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-toggle-source-specials) + (TeX-maybe-set-source-specials, TeX-source-specials-check-xdvi): + New (renamed) functions. + (TeX-source-specials-active-flag, TeX-source-specials-tex-flags) + (TeX-source-specials-viewer-flags) + (TeX-source-specials-check-function, TeX-source-specials-xdvi-p): + New (renamed) variables. Tried to clarify doc-strings and + variable names. + +2004-04-23 David Kastrup <dak@gnu.org> + + Source special support by Dan Nicolaescu <dann@ics.uci.edu>: + * tex.el (TeX-command-list): start viewer with TeX-run-discard + (TeX-expand-list): Add source special flags to viewer call. + (TeX-expand-list): Add source special flags to LaTeX call. + Various new functions. + (TeX-current-file-name-master-relative): New function replacing + TeX-current-file-name-nondirectory (which is not really needed, I + guess). This change sole fault of dak. + (TeX-mode-specific-command-menu-entries): Source Special entry. + +2004-04-23 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-region-as-paragraph): Fix call to + `indent-region' for "older" Emacsen. + (LaTeX-mode-menu): Fix menu extension for customization. + + * context.el (ConTeXt-mode-menu): Fix menu extension for + customization. + + * tex-info.el (TeXinfo-insert-environment): Support enclosure of + a selected region by the environment to be inserted. + Don't eat newline at the end of the environment. + (TeXinfo-mode-map): Bind `C-c C-e' to `TeXinfo-insert-environment' + analogous to LaTeX mode. + +2004-04-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/slides.el: Remove obsolete SliTeX-related code and + replace it by minimal support for slides.cls. + + * latex.el: Change spaces to tabs in indentation. + (LaTeX-fill-region-as-paragraph): Filling is disabled for + environments listed in `LaTeX-indent-environment-list'. To be + consistent with filling of other environments where indentation + occurs, at least indent those environments. + + * tex.el: Change spaces to tabs in indentation. + +2004-04-20 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-output-view-style): Move "dvips && gv" element to + the top of the list (not shadowed by a4paper anymore). + Added "pst-" in this element. + +2004-04-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-current-environment): Respect value of + `LaTeX-syntactic-comments' and mode by narrowing the region if + necessary and checking necessary conditions. + Use `TeX-forward-comment-skip' and `TeX-backward-comment-skip' for + narrowing. + (LaTeX-find-matching-end): Ditto. + (LaTeX-find-matching-begin): Ditto. + (docTeX-in-macrocode-p): New function. + + * tex.el: More checkdoc-related fixes. + +2004-04-20 David Kastrup <dak@gnu.org> + + * style/natbib.el: Patch from Thomas Baumann for \bibpunct. + + * Makefile.in (STYLESRC): Add style/beamer.el. + + * style/beamer.el: Support file contributed by Thomas Baumann. + +2004-04-19 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el, latex.el: Make almost checkdoc clean. See "FIXME" for + remaining issues. + + * context.el, context-en.el, context-nl.el: Reindent. + Coding conventions fixes (but files are still far from being checkdoc + clean). + +2004-04-19 Berend de Boer <berend@pobox.com> + + * context-en.el (ConTeXt-default-environment-en): added default + environment for en interface. + + * context-nl.el (ConTeXt-default-environment-nl): added default + environment for nl interface. + + * context.el (ConTeXt-default-environment): now depends on language. + +2004-04-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-view-style): Enhance documentation string. + (TeX-output-view-style): Ditto. + +2004-04-16 Reiner Steib <Reiner.Steib@gmx.de> + + * tex-info.el (TeXinfo-command-menu): + Use `TeX-mode-specific-command-menu'. + + * tex-jp.el (plain-TeX-mode-command-menu) + (LaTeX-mode-command-menu): Ditto. + +2004-04-16 David Kastrup <dak@gnu.org> + + * Makefile.in (STYLESRC): Add jura.el and alphanum.el + style/jura.el, style/alphanum.el: contributed by Frank Küster. + +2004-04-16 Berend de Boer <berend@pobox.com> + + * context.el (context-guess-current-interface): support for + recognizing interface=XX in comment to determine language to use. + + * tex.el (TeX-format-list): recognize ConTeXt dutch interface. + + * Makefile.in: AUCSRC includes the new context-en.el and context-nl.el. + Ditto fo AUCELC. + + * context.el: English interface macro's moved to context-en.el. + All defmacro's are now replaced by defvars which are set to the + proper language dependent interface as a local buffer variable. + Some changes to make the context mode actually multi-lingual. + (ConTeXt-mode-common-initialization): new routine with + initialization common to all ConTeXt modes. + (context-mode): guesses current interface for en and nl interfaces. + (context-guess-current-interface): new routine that determines + what ConTeXt language interface is in use. + + * context-nl.el: new file containing Dutch interfaces macro's + previously in context.el. Use context-nl-mode to activate. + + * context-en.el: new file containing English interfaces macro's + previously in context.el. Use context-en-mode to activate. + +2004-04-15 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-mode-specific-command-menu): Now holds the logic for + returning a Command menu definition suitable for different Emacs + versions. Its original content is now in the function + `TeX-mode-specific-command-menu-entries'. + (TeX-mode-specific-command-menu-entries): New function. + (plain-TeX-mode-command-menu): Simply use + `TeX-mode-specific-command-menu' instead of the logic which now + is part of it. + (AmSTeX-mode-command-menu): Ditto. + + * latex.el (LaTeX-mode-command-menu): Ditto. + + * context.el (ConTeXt-mode-command-menu): Ditto. + +2004-04-14 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/Makefile.in (clean): Remove *.tmp (created with auc-tex.ps). + + * doc/.cvsignore: Added *.tmp. + + * .cvsignore: Revert 2004-04-12 change. Added README. + + * Makefile.in (tar-ball): .nosearch is not useful here. + +2004-04-13 David Kastrup <dak@gnu.org> + + * aclocal.m4: Try something in AC_FULL_EXPAND that does not + require bash. + Replace ' with quote in EMACS_LISP + Correct a few instances of misspelled AUCTeX. + +2004-04-13 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (DOCFILES, EXTRAFILES): Add files needed for the + configure based installation. + +2004-04-12 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (dist): Split into `check-dist', `release-commit' + and `tar-ball'. + (snapshot): New. Use `check-dist' and `tar-ball'. + (release-commit): Fix mail address. + (REMOVE, MINMAPSRC, min-map): Remove. + (DIST_PREFIX): Derive FTPDIR and WWWDIR from this. + + * doc/Makefile.in (dist): Use INSTALL and INSTALL.windows instead + of INSTALLATION. + + * doc/.cvsignore: Added INSTALL, INSTALL.windows, auc-tex.ps + + * .cvsignore: Removed INSTALL, INSTALL.windows. + +2004-04-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-syntactic-comments): New name. Formerly known + as `LaTeX-format-comment-syntax-aware'. This should better + reflect the meaning the variable will receive eventually. + (LaTeX-indent-line): Use new name. + (LaTeX-current-indentation): Ditto. + (LaTeX-back-to-indentation): Ditto. + (LaTeX-fill-paragraph): Ditto. + (doctex-mode): Ditto. + + * context.el (context-mode): Use `LaTeX-syntactic-comments' + instead of `LaTeX-format-comment-syntax-aware'. + +2004-04-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auc-tex.texi (Japanese): Refer to `INSTALL' instead of + `INSTALLATION'. + + * doc/intro.texi: Refer to `INSTALL' and `INSTALL.windows' + instead of `INSTALLATION'. + + * IRIX: Removed. + + * Makefile.in (EXTRAFILES): Remove IRIX. + + * COPYING: Updated to current incarnation. + +2004-04-09 Reiner Steib <Reiner.Steib@gmx.de> + + * Makefile.in (install-el, dist): Add .nosearch in style/ and + auto/. + +2004-04-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * context.el (ConTeXt-current-interface): eval-and-compile instead + of eval-when-compile seems to solve the undefined error message. + +2004-04-08 Peter S Galbraith <psg@debian.org> + + * font-latex.el (font-latex-setup): Bug Fix; was overriding + font-latex-string-face. Thanks to Reuben Thomas for finding the bug. + +2004-04-08 Jan-Åke Larsson <jalar@mai.liu.se> + + * configure.in: Remove sole reference to texmfdir + + * aclocal.m4: Fix --with-lispdir + +2004-04-08 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-paragraph): Fix check for code comment. + (LaTeX-fill-code-comment): Ditto. + + * tex.el (TeX-in-commented-line): Don't alter match data. + Fixes problems with `LaTeX-find-matching-end'. + (TeX-in-line-comment): Ditto. (Prophylactic.) + +2004-04-08 Berend de Boer <berend@pobox.com> + + * latex.el (LaTeX-outline-name): could reach past end of buffer + when an imenu was created and LaTeX-outline-regexp contained a + macro that either didn't take a argument between braces or a macro + was found in the document and the user forgot to specify the + argument. And that macro was after the last 20 characters of the + buffer. + + * context.el (ConTeXt-current-interface): eval-when-compile this + variable fixed another reported compiliation error. + +2004-04-07 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-default-position, LaTeX-env-array) + (LaTeX-env-tabular*): Implement "don't prompt" option. + + * doc/auc-tex.texi (Tabular-like): Add `LaTeX-default-format' + and `LaTeX-default-position'. + +2004-04-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-break-at-separators): New name. + Formerly known as `LaTeX-fill-distinct-contents'. + Changed 'braced and 'math options to various symbols for opening + and closing separators (braces, brackets, math switches) which + can be activated independently. + (LaTeX-fill-move-to-break-point): Use it. + + * doc/auc-tex.texi (Marking and formatting): Reflect change of + `LaTeX-fill-distinct-contents' to + `LaTeX-fill-break-at-separators'. + Describe `LaTeX-fill-break-before-code-comments'. + +2004-04-07 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-run-command): Turn off line number mode in the + run-buffer effectively by setting line-number-display-limit + locally to 0. + (TeX-format-filter): Use a more sophisticated procedure for + fishing out page numbers in order to have fast matches. + +2004-04-07 Berend de Boer <berend@pobox.com> + + * Lots of enhancements to context.el. There is now a ConTeXt + specific menu which lists ConTeXt specific macro's for inserting + start/stop pairs, project structure and setup of things. Menu also + let's you jump to the etexshow definition if you have that + installed. Querying for macro parameters is non-existent or + flaky. outline and imenu support added. You can close an XML tag + if you're editing XML in ConTeXt with C-c /. + List of environments is now complete. + Paragraph formatting works in certain cases, but is really slow or + doesn't work in certain cases. + Indenting the same: works sometimes, but still flaky. + Bugs fix: start/stop insertion works now. + + * documentation now mentions ConTeXt sometimes. + + * context.el (ConTeXt-current-interface): make now doesn't complain + anymore when byte compiling ConTeXt. + + * tex.el now recognizes ConTeXt dutch interface. + +2004-04-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-code-comment): Respect `indent-tabs-mode'. + Fix partially taken from GNU Emacs' fill.el. + + * tex.el (TeX-mode-specific-command-list): New function. + (TeX-mode-specific-command-menu): Use it. + + * tex-buf.el (TeX-command-query): + Use `TeX-mode-specific-command-list' to get a command list specific + to the current mode for command completion. + +2004-04-04 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (docTeX-indent-inner-fixed): New var. + (LaTeX-indent-calculate): Use it. + (LaTeX-indent-calculate-last): Reset indentation to zero after + macrocode environments. + + * style/booktabs.el (TeX-add-style-hook): Add fontification + support. + +2004-04-04 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-find-matching-end, LaTeX-find-matching-end): + Try to keep track of in-comment-ness + +2004-04-03 David Kastrup <dak@gnu.org> + + * Makefile.in (STYLESRC): Add emp.el. + + * style/emp.el: New file contributed from Yvon Hevel. + +2004-04-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-back-to-indentation): Use `beginning-of-line' + instead of `move-to-left-margin' as it is faster and we don't use + the margin anyway. + (LaTeX-fill-region-as-para-do): Use `point-max' for correctly + determining the end of the filling loop in case of a code comment. + Narrow to region in any case to simplify this determination in + case there is no code comment. + (LaTeX-fill-move-to-break-point): Fix compatibility code for + getting the initial break point. In case there is no valid break + point on the way towards the beginning of the line, look down the + line. + +2004-03-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-output-view-style): Remove option for landscape in + case of PDF output. + +2004-03-26 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-fill-region): Correct percentage display. + + * tex-buf.el (TeX-format-filter): Strictly restrict backward + searches for page number patterns. + +2004-03-26 Davide G. M. Salvetti <salve@debian.org> + + * bib-cite.el, latex.el, tex-buf.el, tex-jp.el, tex.el: + Map (function (lambda ...)) to (lambda ...) for better + readability. + + * doc/.cvsignore: Added CHANGES, HISTORY, README, auc-tex*.html. + + * doc/intro.texi: Minor fix. + +2004-03-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-indent-line): Use `looking-at' instead of + `re-search-forward'. Pass indent amount to + `LaTeX-indent-{inner,outer}-do' functions. + (LaTeX-indent-inner-do, LaTeX-indent-outer-do): Let them be called + with an explicit parameter for the indent amount. + (LaTeX-indent-calculate-last): Distinguish a commented and an + uncommented line when skipping backwards to the preceding line. + Move tests for comment skips into the `cond' statement for better + readability. + (LaTeX-fill-break-before-code-comments): New customize option. + (LaTeX-fill-region-as-paragraph): Change the regular expression + which is used for searching for special line ends so that it is + not such a performance hog. Code for determining the region to + fill was adapted accordingly. + (LaTeX-fill-region-as-para-do): Remove trailing whitespace after + newlines were changed to spaces. Reported by Reiner Steib + <Reiner.Steib@gmx.de>. + Use `narrow-to-region' for keeping track of potential code comment + starts. + Break a line at the last non-comment word before a code comment. + This can be configured with + `LaTeX-fill-break-before-code-comments'. + (LaTeX-fill-move-to-break-point): Use `LaTeX-back-to-indentation' + for going to the right start of a line. + (LaTeX-fill-paragraph): `LaTeX-backward-paragraph' does not skip + forward over empty lines itself anymore, so do it here. + (LaTeX-fill-region): Use `LaTeX-forward-paragraph' and + `LaTeX-backward-paragraph' instead of the old code which + determined paragraph boundaries manually. + (LaTeX-forward-paragraph, LaTeX-backward-paragraph): + Improve handling of paragraph commands. + (LaTeX-paragraph-command-p): Get rid of the test for the opening + brace because there doesn't have to be one. + (LaTeX-find-macro-start): New function. + (LaTeX-find-macro-end): New function. + + * .cvsignore: Added `tex-site.el'. + +2004-03-23 David Kastrup <dak@gnu.org> + + * tex.el (VirTeX-common-initialization): Back out last change + about sentence-end-double-space. + +2004-03-22 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4, configure.in: Fix bug for the case $prefix=NONE + + * Makefile.in: distclean target removes tex-site.el + +2004-03-22 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-fill-distinct-contents): Simplify customization + type: nil is a complete list. + +2004-03-21 David Kastrup <dak@gnu.org> + + * tex.el (VirTeX-common-initialization): + Set sentence-end-double-space and sentence-end to more appropriate + values for TeX. + +2004-03-21 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-region-as-paragraph): Fix separation of + lines with code comments looking like " {%". + (LaTeX-fill-move-to-break-point): Fix determination of break point + for an opening brace where there is no break point immediately + after the respective closing brace. + (LaTeX-fill-region-as-para-do): Fix determination of code comment + begin in filling loop. + +2004-03-20 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-region-as-para-do): Fix compatibility code + for older Emacsen. + +2004-03-19 David Kastrup <dak@gnu.org> + + * tex-site.el.in (texinfo-mode): Autoload tex-info again. + I suppose we will get to know why it was disabled when someone + complains. + +2004-03-19 Davide G. M. Salvetti <salve@debian.org> + + * doc/Makefile.in (clean): Add HISTORY. + + * tex.el (TeX-lisp-directory): Remove, it's already defined in + tex-site.el.in. + +2004-03-19 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-current-environment): Use correct regexp for + determination of a comment. + (LaTeX-format-comment-syntax-aware): Rename from + `LaTeX-fill-comment-syntax-aware' because it affects both filling + and indentation. + (LaTeX-indent-line): Add support for doing outer and inner + indentation. + (LaTeX-current-indentation): Ditto. + (LaTeX-back-to-indentation): Ditto. + (LaTeX-indent-calculate): Ditto. + (LaTeX-indent-calculate-last): Ditto. Fix indentation for + environments mentioned in `LaTeX-document-regexp' which use an + unclosed brace in the first line. + (LaTeX-indent-inner-do): New function. + (LaTeX-indent-outer-do): New function. + (LaTeX-fill-region-as-paragraph): Include lines with code comments + in regions to be filled. Recognize lines ending with `\par' as + boundaries for filling. + (LaTeX-fill-region-as-para-do): Better handling of code comments. + (LaTeX-fill-paragraph): Make function more readable by selecting + different filling methods by a `cond' statement and putting code + for the determination of the region to fill in case of + syntax-aware filling into the separate functions + `LaTeX-forward-paragraph' and `LaTeX-backward-paragraph'. + Better handling of code comments. + (LaTeX-fill-code-comment): New function. + (LaTeX-forward-paragraph): New function. + (LaTeX-backward-paragraph): New function. + (LaTeX-paragraph-command-p): New function. + (LaTeX-common-initialization): Let `paragraph-start' handle + comments preceded by whitespace as well. + (LaTeX-fill-move-to-break-point): Support `\[' and `\]' as well + if `LaTeX-fill-distinct-contents' is activated. + + * tex.el (tex-mode): `comment-start-skip' shouldn't match line + beginnings. + (VirTeX-common-initialization): Ditto. + (TeX-in-line-comment): New function. + (TeX-forward-comment-skip): Use correct regexp for determination + of a comment. Fix case where `count' is less than zero, i.e. if + a backward search is performed. + (TeX-backward-comment-skip): New function. + + * doc/auc-tex.texi: Reflect name change of + `LaTeX-fill-comment-syntax-aware' to + `LaTeX-format-comment-syntax-aware'. + +2004-03-18 Jan-Åke Larsson <jalar@mai.liu.se> + + * Makefile.in, configure.in, tex-site.el, tex-site.el.in: + Move tex-site.el to tex-site.el.in, generate tex-site.el at configure + time rather than at install time + +2004-03-18 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-output-view-style): Use `%f' instead of `%s.ps' for + PostScript files. + (TeX-mode-map): Change key binding of `TeX-master-file-ask' to + `C-c_' because `C-c-' is already taken by RefTeX. + + * doc/auc-tex.texi: Change "Formatting" node to "Running TeX and + friends" and use a respective heading. + Adapt key binding for `TeX-master-file-ask'. + + * doc/intro.texi: Correct URLs. + +2004-03-14 David Kastrup <dak@gnu.org> + + * tex.el (TeX-command-list): Change interactive calls to use + \input, so that pdflatex \pdfoutput=0 becomes a legal way to call + LaTeX. + (VirTeX-common-initialization): Save TeX-master if desktop + package is used. + +2004-03-14 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-output-view-style): Fix it after it was accidently + and incorrectly changed with the last check-in. Patch by David + Kastrup <dak@gnu.org>. + (TeX-view-style): Ditto. + +2004-03-11 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-find-opening-brace): Don't match the char before the + brace. This returns the correct position and fixes the handling + of the limit parameter. + + * latex.el (LaTeX-fill-move-to-break-point): Don't match the char + before the char to find in case of backward searches. + (LaTeX-fill-region-as-paragraph): Make the regular expression, + which serves searching for lines with code comments, match the + whole line. + +2004-03-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-move-to-break-point): Use `TeX-esc' in + other, similar places not covered by the last check-in as well. + + * doc/auc-tex.texi: Document `LaTeX-indent-environment-list', + `LaTeX-fill-comment-syntax-aware' and + `LaTeX-fill-distinct-contents' as well as slightly improve some + other parts in the section about `Marking and formatting'. + +2004-03-10 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-fill-move-to-break-point): Use TeX-esc in + regexps to accommodate Texinfo better. + (LaTeX-fill-move-to-break-point): no regexp-quote within braces. + (LaTeX-common-initialization): Correct \multicolumn prompt + +2004-03-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-move-to-break-point): Cope with unmatched + closing braces when `LaTeX-fill-distinct-content' is enabled for + braced content. + +2004-03-09 Jan-Åke Larsson <jalar@mai.liu.se> + + * Makefile.in: Add separate target for .el files to cater for debian + +2004-03-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/booktabs.el: New file. + + * Makefile.in (STYLESRC): Add `booktabs.el'. + + * doc/changes.texi: Advertise support for `booktabs.sty'. + +2004-03-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auc-tex.texi: Small corrections in `Viewing' section. + +2004-03-02 Jan-Åke Larsson <jalar@mai.liu.se> + + * doc/Makefile.in: Add packagedir + +2004-03-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-insert-environment): Fix insertion of newlines + for the case where `LaTeX-insert-into-comments' is activated but + point is not inside a comment. + +2004-02-28 David Kastrup <dak@gnu.org> + + * Makefile.in (install-lisp): Overwrite old tex-site.el if it has + the "Don't edit" comment in it. Rename it otherwise. + Use $(auctexdir) instead of $(lispdir) for replacing @AUCTEX. + + * tex-buf.el (TeX-command-query): Allow doctex-mode for .bbl file + checking. + + * tex-site.el: Discourage customization in-file. + + * latex.el (LaTeX-outline-regexp, LaTeX-environment) + (LaTeX-document-style-hook): Change docs to refer to document + classes instead of document style. + (LaTeX-env-document): Don't insert anything but document class. + (LaTeX-menu-update): Check for doctex-mode. + (doctex-mode): Make it a major mode derived from latex-mode. + +2004-02-28 Ralf Angeli <angeli@iwi.uni-sb.de> + + Merge with new-fill branch. + +2004-02-27 Jan-Åke Larsson <jalar@mai.liu.se> + + * configure.in: Respect --infodir even if using xemacs. + + * aclocal.m4: Add yes/no answer for the MULE check. + + * Makefile.in: Correct xemacs-install. + + * Makefile.in, aclocal.m4, configure.in: If there is a wrongly + installed tex-site.el, use the proper install directory anyway + (i.e., don't be side-tracked), and remove the wrongly installed + tex-site.el. These things are only needed for CVS users who have + used the erroneous xemacs-installation. + +2004-02-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-mode-menu): Insert customize option and + rearrange. + (LaTeX-fill-move-to-break-point): Bandaid for not breaking inside + square brackets where the content fits into one line. + + * tex.el (plain-TeX-mode-menu): Insert customize option. + + * doc/auc-tex.texi: Document options for inserting quotes in files + where `(n)german.sty' is used and the invocation of external + viewers. + +2004-02-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-fill-break-before-macro) + (LaTeX-fill-break-after-macro): Unused, so removed. + (LaTeX-fill-distinct-contents): New name for defcustom + `LaTeX-fill-break-before-and-after'. + (LaTeX-fill-move-to-break-point): Fix filling of nested braces and + math. + (TeX-find-closing-brace, TeX-find-opening-brace) + (TeX-forward-comment-skip): Move to `tex.el'. + + * tex.el (TeX-find-closing-brace, TeX-find-opening-brace) + (TeX-forward-comment-skip): Move from `latex.el'. + +2004-02-26 David Kastrup <dak@gnu.org> + + * latex.el (doctex-mode): Make a minor mode. + + * tex-site.el (doctex-mode): Add autoloads and file extensions. + + * tex.el (TeX-master-file): Don't overwrite TeX-master when not + asking the question. + +2004-02-22 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-newline): New function. Spread it throughout + the code in order to stay in comments for completion and + insertion commands. + (doctex-mode): New function. + +2004-02-19 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-fill-paragraph): Back out changes from + 2003-12-29. + Create separate new-fill branch for Ralf's code. + +2004-02-17 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-title-4-face): Add missing :weight + and :inherit for color displays. + +2004-02-15 Peter S Galbraith <psg@debian.org> + + * bib-cite.el (bib-cite-fontify-help-as-bibtex) + (bib-cite-fontify-help-as-latex): Check existence of + font-lock-unset-defaults; no longer defined in CVS Emacs. + Thanks to Adrian Lanz for reporting the problem. + +2004-02-15 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-title-4-face): Use different colors + depending on background. + +2004-02-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-comment-region): Map to `comment-region' instead of + `TeX-comment-or-uncomment-region'. + (TeX-uncomment-region): New name for `TeX-un-comment-region'. + Not mapped to `TeX-comment-or-uncomment-region' anymore. + (TeX-uncomment): New name for `TeX-un-comment'. + Use `TeX-uncomment-region' instead of `uncomment-region' which is not + available in Emacs 20. + (TeX-comment-or-uncomment-paragraph): New name for + `TeX-comment-paragraph' which explains its function better. + Use new name `TeX-uncomment'. + (TeX-mode-map): Bind key chains to `TeX-comment-or-uncomment-*' + functions. + (plain-TeX-mode-menu): Adapt function calls in menu entries. + + * tex-info.el (TeXinfo-mode-map): Bind key chains to + `TeX-comment-or-uncomment-*' functions. + (TeXinfo-mode-menu): Adapt function calls in menu entries. + + * latex.el (LaTeX-mode-menu): Adapt function calls in menu + entries. Small enhancements. + + * doc/auc-tex.texi (Commenting): Adapt documentation to reflect + changes in commenting interface. + +2004-01-31 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-comment-or-uncomment-region): New function or alias + respectively introduced to obtain compatibility with GNU Emacsen + before 21.4. + (TeX-uncomment-region): New function or alias respectively + introduced to obtain compatibility with GNU Emacsen before + 21(.1?). + (TeX-comment-region): Bound to `TeX-comment-or-uncomment-region'. + (TeX-un-comment-region): Bound to `TeX-comment-or-uncomment-region'. + +2004-01-27 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (TeX-command-list): Fix previous change. + +2004-01-25 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-TeX-command-list): Remove dummy code for + command menu. + +2004-01-23 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-TeX-command-list): Change single quotes to + double. We get reasonable results under both Windows and Unix. + See also log of TeX-command-list in tex.el on 2002-12-19. + + * tex.el (TeX-toggle-off-input-method): Remove some Japanese + input methods (Canna, Wnn, SKK) because their code is copied from + YaTeX, which is not GPL program. Toggle off CJK (Chinese, Japanese, + Korean) input methods in LEIM. + (TeX-math-toggle-off-input-method): Doc fix. + +2004-01-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * latex.el (LaTeX-mode-menu): Remove menu filters in the submenus + for inserting and modifying environments which call + `LaTeX-menu-update'. + (LaTeX-common-initialization): Add `LaTeX-menu-update' to + `activate-menubar-hook' instead. + +2004-01-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-view-style, TeX-output-view-style): Use a regexp + which matches `a5', `a5comb' and `a5paper' instead of the old + which matches only `a5'. + +2004-01-12 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-command-menu-name): New constant. + (TeX-mode-specific-command-menu): Reimplement the loop which + builds the menu. + (TeX-mode-command-menu): Use new constant and call + `TeX-mode-specific-command-menu' via `:filter'. + (AmSTeX-mode-command-menu): Ditto. + + * context.el (ConTeXt-mode-command-menu): Use new constant + `TeX-command-menu-name' and call `TeX-mode-specific-command-menu' + via `:filter'. + + * latex.el (LaTeX-mode-command-menu): Ditto. + + * tex-info.el (TeXinfo-mode-command-menu): Ditto. + + * tex-jp.el (plain-TeX-mode-command-menu) + (LaTeX-mode-command-menu): Ditto. + +2004-01-10 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/changes.texi: Added further news. + +2004-01-09 Ralf Angeli <angeli@iwi.uni-sb.de> + + * doc/auc-tex.texi: AUC TeX to AUCTeX. Use `%%%' instead of a + single `%' character in examples for Local Variables. + Add information about new behavior in respect to the query for the + master file. Explain new function `TeX-master-file-ask'. + + * doc/changes.texi: Advertise new master file behavior. + Remove news about new commenting behavior which is not true anymore. + + * doc/intro.tex.: AUC TeX to AUCTeX. + + * tex.el (TeX-local-master-p): Remove one `%' character in regexp + to let it find "% TeX-master:" as well. + +2004-01-07 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-command-list): Change defcustom definition to one + which allows the specification of several modes for one command + and adapted the defaults to it. Thanks to David Kastrup for most + of the code. + (plain-TeX-command-menu): Adapted the call to + `TeX-mode-specific-command-menu'. + (AmSTeX-mode-command-menu): Ditto. + + * latex.el (LaTeX-mode-command-menu): Adapted the call to + `TeX-mode-specific-command-menu'. + + * context.el (ConTeXt-mode-command-menu): Ditto. + + * tex-info.el (TeXinfo-mode-command-menu): Ditto. + + * tex-jp.el (japanese-TeX-command-list): Adapted list entries + according to defcustom changes in `tex.el'. + (plain-TeX-mode-command-menu): Adapted the call to + `TeX-mode-specific-command-menu'. + (LaTeX-mode-command-menu): Ditto. + + * tex-mik.el (TeX-command-list): Adapted list entries + according to defcustom changes in `tex.el'. + + * tex-fptex.el (TeX-command-list): Ditto. + +2004-01-06 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-command-list): Get rid of the superfluous sixth + element in the defcustom and menu/command definitions. + + * tex-jp.el (japanese-TeX-command-list): Ditto. + + * tex-mik.el (TeX-command-list): Ditto. + + * tex-fptex.el (TeX-command-list): Ditto. + +2004-01-05 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-common-initialization): Add \item to the + paragraph starters. + +2004-01-05 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-mode-specific-command-menu): New function to be used + for generating a mode-specific command menu. + (plain-TeX-mode-map): New map to be used by plain-tex-mode. + (plain-TeX-mode-command-menu): New menu used instead of + `TeX-mode-menu' which utilizes `TeX-mode-specific-command-menu'. + (TeX-mode-menu): Remove in favor of + `plain-TeX-mode-command-menu'. + (AmSTeX-mode-map): New map to be used by ams-tex-mode. + (AmSTeX-mode-command-menu): New menu. + (ams-tex-mode): Move and grouped with other AmSTeX-related code. + Added code to use new menu. + (TeX-command-list): Add new choice for the selection of the mode + for the respective command. Adapted doc string. Added respective + symbols to command definitions. Rearranged command definitions. + Changed `LaTeX PDF' to `PDFLaTeX'. + + * latex.el (LaTeX-mode-command-menu): New menu used instead of + `TeX-mode-menu'. + (LaTeX-common-initialization): Activate it. + + * context.el (ConTeXt-mode-command-menu): New menu used instead of + `TeX-mode-menu'. + (context-mode): Activate it. + + * tex-info.el (TeXinfo-command-menu): Adapted for using + `TeX-mode-specific-command-menu'. + + * tex-jp.el (japanese-TeX-command-list): Add symbols to command + definitions needed for assigning them to the respective mode. + (TeX-mode-menu): Remove. + (plain-TeX-mode-command-menu): New menu utilizing + `TeX-mode-specific-command-menu'. + (LaTeX-mode-command-menu): New menu utilizing + `TeX-mode-specific-command-menu'. + (LaTeX-mode-map): Remove key definition for `TeX-mode-menu'. + + * tex-fptex.el (TeX-command-list): Add symbols to command + definitions needed for assigning them to the respective mode. + Changed `LaTeX PDF' to `PDFLaTeX'. + + * tex-mik.el (TeX-command-list): Ditto. + + * doc/changes.texi: Mention the change to a mode-specific command + menu and the need for the deletion of any former customization of + `TeX-command-list'. + +2004-01-03 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-mode-map): Use `C-c -' as a key binding for + `TeX-master-file-ask' as `C-c !' is already used in `context.el'. + +2004-01-02 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-left-comment-regexp) + (LaTeX-right-comment-regexp, LaTeX-ignore-comment-regexp): revert + an inadvertant change two checkins ago. I was just experimenting + with something that did not yet work (as if the original did) and + did not intend checking it in. + +2003-12-30 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (TeX-master-file): Add new parameter `ask' which is + to be used if the user shall be asked when the function is + called. Took out the code which provides the functionality for + asking the respective question and added it to the newly created + function `TeX-master-file-ask'. + (TeX-master-file-ask): New function. + (TeX-local-master-p): New function. + (tex-mode): Remove the call of `TeX-master-file' via the hook + `hack-local-variables-hook'. + (VirTeX-common-initialization): Add the call to + `TeX-master-file' via the hook `find-file-hooks'. Additionally + `TeX-update-style' will be called to activate the respective style + files. + (TeX-mode-map): Add key binding for calling + `TeX-master-file-ask'. This is a temporary solution. + (TeX-mode-menu): Took out redundant entry for `TeX-home-buffer'. + Added entry "Set Master File" for `TeX-master-file-ask'. + Grouped menu entries relevant for multifile handling. + + * latex.el (LaTeX-mode-menu): Change analogously to + `TeX-mode-menu'. + +2003-12-29 David Kastrup <dak@gnu.org> + + * latex.el: Fix AUCTeX URL. + (LaTeX-fill-paragraph): Skip from inline comments to either line + comments or something that is not merely an inline comment. I am + not even sure that this skipping makes good sense, in particular + since it is followed by `forward-paragraph'. + (LaTeX-common-initialization): Change the definitions of + `paragraph-start' and `paragraph-separate' to something that + makes things like `forward-paragraph' and its ilk behave more + sensibly when in comments. The previous behavior is just awful, + and caused a lot of inadvertant damage when using things like + `fill-paragraph' within comments. + (LaTeX-common-initialization): Remove syntax error, sorry. + +2003-12-29 David Kastrup <dak@gnu.org> + + * latex.el: Fix AUCTeX URL. + (LaTeX-fill-paragraph): Skip from inline comments to either line + comments or something that is not merely an inline comment. I am + not even sure that this skipping makes good sense, in particular + since it is followed by `forward-paragraph'. + (LaTeX-common-initialization): Change the definitions of + `paragraph-start' and `paragraph-separate' to something that + makes things like `forward-paragraph' and its ilk behave more + sensibly when in comments. The previous behavior is just awful, + and caused a lot of inadvertant damage when using things like + `fill-paragraph' within comments. + +2003-12-26 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/scrbase.el (TeX-add-symbols): Remove redundant entries. + + * style/scrlttr2.el (TeX-add-symbols): Remove redundant entry. + + * style/scrpage2.el: Remove unnecessary coding cookie and text in + introductory comment. + +2003-08-02 Mike Sperber <mike@xemacs.org> + + * latex.el (latex-mode): Really turn off filladapt. It just + doesn't work with `LaTeX-fill-paragraph'. + +2003-12-02 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (tex-mode): Let `TeX-master-file' be called upon opening + a file. This shall restore the behaviour before the last change + regarding the question for `TeX-master'. Thanks to Peter + Galbraith for setting the patch right. + +2003-11-28 David Kastrup <dak@gnu.org> + + * tex.el (LaTeX-update): Advice removed because of the following: + + * latex.el (LaTeX-menu-update): Now called via :filter predicate + of menus. + +2003-11-27 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/paralist.el: Removed coding cookie in first line. + Removed obsolete comment regarding placement of file. + (LaTeX-paralist-env-item-opt-label): Rename from + `pl-LaTeX-env-item-opt-label' and changed references accordingly. + Added docstring. + Let `itemize' and `enumerate' environments use this function. + Thanks to Reiner Steib for these suggestions. + +2003-11-26 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-section-label): Add "part" and + "subsubsection". Sync "chapter" with fancyref.sty. + + * style/fancyref.el ("fancyref"): Add font-lock keywords. + +2003-11-25 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-math-default): Add greek \var... symbols. + (LaTeX-common-initialization): Remove "SLiTeX", added spacing + commands and "appendix". + + * font-latex.el (font-latex-match-function-keywords): + Add spacing commands, "nonumber", "centering", "TeX", and "LaTeX". + (font-latex-match-textual-keywords): Add textsuperscript. + +2003-11-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * Makefile.in (STYLESRC): Add scrpage2.el. + +2003-11-17 Peter S Galbraith <psg@debian.org> + + * font-latex.el (font-latex-keywords-2): Had forgotten to set + LAXMATCH on all title matches. Thanks to Ralf Angeli for + reporting the bug. + + * bib-cite.el (bib-cite-file-directory-p): New functions. I had + introduced a call to code from ff-paths.el by mistake. + +2003-11-17 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/scrbase.el (TeX-add-style-hook): Add further symbols to + `TeX-add-symbols' and rearranged them alphabetically. + Added macros with parameters to + `font-latex-match-<type>-keywords-local'. + Added `addsec' and `addpart' to + `font-latex-match-title-<num>-keywords-local'. + + * style/scrbook.el (TeX-add-style-hook): Analogous. + + * style/scrlttr2.el (TeX-add-style-hook): Analogous. + + * style/scrreprt.el (TeX-add-style-hook): Analogous. + + * style/scrpage2.el: New file. + +2003-11-16 Ralf Angeli <angeli@iwi.uni-sb.de> + + * tex.el (VirTeX-common-initialization): Disabled lines which set + `comment-add' to 1 to restore commenting with a single `%'. + (TeX-un-comment-region): Function code removed and function name + mapped to `comment-dwim'. + (TeX-un-comment): Allow searching for commented lines with + potential white space at the beginning. + (TeX-comment-paragraph): Partially rewritten to allow it to be + used for both commenting and uncommenting. + (TeX-in-commented-line): New function used in + `TeX-comment-paragraph'. + + * doc/auc-tex.texi (Commenting): Reflect changes in `tex.el'. + +2003-11-13 Ralf Angeli <angeli@iwi.uni-sb.de> + + * style/paralist.el: New file. + + * Makefile.in (STYLESRC): Add paralist.el. + +2003-10-18 Peter S Galbraith <psg@debian.org> + + * font-latex.el: checkdoc cleaning (almost clean now). + +2003-09-18 Peter S Galbraith <psg@debian.org> + + * font-latex.el (font-latex-quotes): New defcustom to fontify + either french or german quotes. + (font-latex-quote-regexp-beg): New variable. Holds the regexp to + match the beginning of a quote. + (font-latex-quote-end-list): New variable. Holds the list of + strings to end a matched quote. + (font-latex-match-quotation): Fix to use above variables. + +2003-09-18 Peter S Galbraith <psg@debian.org> + + * bib-cite.el: bib-cite-aux-inputs: new defcustom. + Minor code cleanup for `match-string'. + +2003-09-15 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-master-file): Fix 'shared case. + Tiny patch from Shiro Takeda <zbc08106@park.zero.ad.jp>. + +2003-09-08 Peter S Galbraith <psg@debian.org> + + * bib-cite.el: Ripping out off-topic imenu code. + +2003-09-07 Peter S Galbraith <psg@debian.org> + + * font-latex.el: Bug fix when font-lock-multiline is set to t. + +2003-08-21 Reiner Steib <Reiner.Steib@gmx.de> + + * Changelog: Added coding cookie. + + * doc/Makefile.in (install): Check if auctex-* exists. + Needed because default split size changed in texinfo 4.6. + +2003-07-25 Peter S Galbraith <psg@debian.org> + + * font-latex.el: Make & highlighted in font-latex-warning-face. + Better document font-latex-match-*-keywords-local variables. + +2003-07-20 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * configure.in: Use mule support check. + + * Makefile.in (CONTRIB_MULE, COMPILE_MULE, CONTRIB_MULEELC): New macros. + (contrib): Compile CONTRIB and COMPILE_MULE. + (install-contrib): Install CONTRIB_MULE and CONTRIB_MULEELC, too. + + * aclocal.m4 (EMACS_CHECK_MULE): Check (X)Emacs mule supported. + + * Makefile.in (clean): Remove Emacs auto-save files. Remove elc + files in the current and style directory. + +2003-06-21 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * Makefile.in: Delete trailing whitespaces. + + * tex.el (TeX-near-bobp): Undo last change. + + * tex-jp.el: Fix some document. + (AUCTeX-jp): New custom group. + (japanese-TeX-command-default, japanese-LaTeX-command-default) + (japanese-LaTeX-default-style, japanese-LaTeX-style-list): + Support for defcustoms. + +2003-06-14 David Kastrup <dak@gnu.org> (tiny patch from Stephen Gildea) + + * tex.el (TeX-auto-untabify): Change default to nil. + + * doc/auc-tex.texi (Parsing Files): document this. + +2003-06-07 David Kastrup <dak@gnu.org> + + * tex.el (TeX-lisp-directory, TeX-auto-global, TeX-style-global) + (TeX-auto-local, TeX-style-local, TeX-macro-private) + (TeX-load-style, TeX-parse-path, TeX-run-style-hooks) + (TeX-auto-write, TeX-auto-generate, TeX-auto-generate-global) + (TeX-ignore-file, TeX-search-files): try catering with Windows + file names. + (TeX-directory-absolute-p): removed, since file-name-absolute-p + serves the same purpose. + +2003-06-06 Jan-Åke Larsson <jalar@mai.liu.se> + + * Makefile.in: Added datadir + +2003-06-05 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-env-label): Toggle off input method when + entering math mode. + * style/amsmath.el (LaTeX-amsmath-env-alignat) + (LaTeX-amsmath-env-aligned): Ditto. + + * tex.el (TeX-toggle-off-input-method): Remove interactive. + (TeX-math-input-method-off): New function. + (TeX-insert-dollar): Use it. Do not call function + TeX-toggle-off-input-method directly. + +2003-06-03 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-macro): Set group 'AUCTeX. + +2003-06-03 David Kastrup <dak@gnu.org> + + * latex.el (LaTeX-mode-menu): Replace "Change Font" with "Replace + Font" + + * tex-info.el (TeXinfo-mode-menu): Same here. + + * doc/tex-ref.tex (section{Font Selection}): Same here. + +2003-06-03 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-math-toggle-off-input-method): New user option. + (TeX-toggle-off-input-method): New function. + (TeX-insert-dollar): Use it. + +2003-06-02 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-near-bobp): Fix typo in doc-string. + +2003-05-27 Piet van Oostrum <piet@cs.uu.nl> + + * latex.el (LaTeX-auto-minimal-regexp-list): Change regexp to + allow \documentclass[]{someclass}. + +2003-05-02 Patrick Gundlach <patrick@gundla.ch> + + * context.el: ConTeXt-environment can now modify the current + environment. Added preliminary functionality for calling a + function on an environment. ConTeXt-mark-environment, + ConTeXt-find-matching-stop and ConTeXt-find-matching-start + (similar to the ones in latex.el) added. + +2003-04-15 Reiner Steib <Reiner.Steib@gmx.de> + + * doc/wininstall.texi: Fixed typos in configure options. + +2003-04-15 Patrick Gundlach <patrick@gundla.ch> + + * tex.el (TeX-command-list): Change %v to %V in View. Now + TeX-output-view-style is used for setting viewer preferences. See + changes from 2003-02-06 below. + +2003-04-15 Reiner Steib <Reiner.Steib@gmx.de> + + * .cvsignore: Added INSTALL and INSTALL.windows + + * Makefile.in (STYLESRC): Add captcont.el and subfigure.el + +2003-04-15 Jan-Åke Larsson <jalar@mai.liu.se> + + * doc/wininstall.texi: Corrected download info for GNU Emacs + +2003-04-14 Peter S Galbraith <psg@debian.org> + + * font-latex.el (font-latex-match-*-keywords): New user + customizable variables to add fontification keywords. + See `M-x customize-group [RET] font-latex'. + (font-latex-match-*-keywords-local): New buffer-local variables to + be used by elisp style file writers. + (font-latex-match-*-keywords-set): Support for defcustoms. + (font-latex-match-*-make): Build the actual font-lock variables + from the `font-latex-match-*-keywords' defcustoms. + +2003-04-14 David Kastrup <dak@gnu.org> + + * doc/install.texi (Customizing): hilit-LaTeX.el deleted. + +2003-04-14 Jan-Åke Larsson <jalar@mai.liu.se> + + * autogen.sh: Generate INSTALL and INSTALL.windows + + * doc/Makefile.in: Use the configure compatibility test results + + * doc/macros.texi: Compatibility macros, initial version + + * configure.in: Do the makeinfo tests, for compatibility with + texinfo 3.12, test for tex + + * doc/install.texi: Changed to document the autoconf stuff + + * doc/wininstall.texi: Added + +2003-04-10 David Kastrup <dak@gnu.org> + + * tex.el (AUCTeX): Fix URLs. + + * context.el: Fix AUCTeX URL. + Make modification date RCS tag. + +2003-04-09 Patrick Gundlach <patrick@gundla.ch> + + * tex.el (TeX-command-list): Change ConTeXt Clean from purge to + purgeall; I guess this behaves as users would expect. + + * context.el: minor cleanups, switched to the name "AUCTeX" where + not done yet. Made ConTeXt-add-environments able to + byte-compile. Added new copyright statement. + + * Makefile.in: Added context.el(c) + +2003-04-09 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4: More sane emacs-macro path-searching. + +2003-04-07 David Kastrup <dak@gnu.org> + + * tex.el (TeX-kpathsea-directory-alist): Fix bad kpathsea + searchpath name for LaTeX files. + +2003-04-03 Jan-Åke Larsson <jalar@mai.liu.se> + + * aclocal.m4: Make the emacs-macro path-searching tests run, and + make EMACS_PROG_EMACS fail gracefully when no binary executable is + found. + + +2003-03-29 David Kastrup <dak@gnu.org> + + * tex-buf.el (TeX-run-discard): Use `call-process' instead of + `start-process' in order to completely detach a process. + (TeX-region-extra): Make empty by default since code was not + working with plain or ConTeXt. + +2003-03-24 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * Makefile.in (CONTRIB): Remove hilit-LaTeX.el because it is + obsolete. + (contrib): Remove compile code for hilit-LaTeX.el. + +2003-03-13 David Kastrup <dak@gnu.org> + + * style/german.el (LaTeX-german-quote-after-quote) + (LaTeX-german-open-quote, LaTeX-german-close-quote): + New variables to initialize quote stuff from. If you set these in + file local variables, they will propagate accordingly to + `TeX-quote-after-quote' et al. + + * style/ngerman.el (LaTeX-german-quote-after-quote) + (LaTeX-german-open-quote, LaTeX-german-close-quote): the same. + +2003-02-25 David Kastrup <dak@gnu.org> + + * Makefile.in (dist): Version info in tex.el gets automatically + calculated from CVS tags. + + * tex.el: Some changes for dir slashiness. + (TeX-master-directory): return a proper directory name, not a + file name. + + * tex-buf.el (TeX-quote-filename): Return the changed file! + Yikes! How could this ever have worked? + +2003-02-24 David Kastrup <dak@gnu.org> + + * tex.el (AUCTeX-version): Generate automatically from CVS + variables. + (TeX-master-directory): somewhat more defensive version (final + goal is to be able to make a TeX minor mode). + +2003-02-22 David Kastrup <dak@gnu.org> + + * tex-wizard.el: A first sketch of the idea. + +2003-02-17 Piet van Oostrum <piet@cs.uu.nl> + + * tex.el (TeX-arg-literal): Remove illegal and superfluous &optional. + + * latex.el (TeX-arg-free): Remove illegal and superfluous &optional. + +2003-02-17 David Kastrup <dak@gnu.org> + + * font-latex.el (font-latex-find-matching-close): Remove a very + complicated way of doing nothing since the byte compiler warns + about it. + +2003-02-15 David Kastrup <dak@gnu.org> + + * tex.el (LaTeX): Change :prefix field to LaTeX. + (TeX-auto-add-type): Make more readable and place doc string + indicating the origin into generated functions. + + * font-latex.el (font-latex-setup): Try to behave better when the + interesting newlines in verbatim environments get moved. + Probably not the ultimate solution. + + * tex-site.el: AUC TeX to AUCTeX, new header. + + * Makefile.in: AUC TeX to AUCTeX. + + * latex.el: AUC TeX to AUCTeX, new header. + + * tex-buf.el (TeX-quote-filename): New function. + (TeX-region-create): Use it so that Windows can talk about its + master files properly. + (TeX-help-error): Try not to have "log file has changed" + messages. AUC TeX to AUCTeX, new header. + + * tex.el: AUC TeX to AUCTeX, new header. + + * auc-old.el: AUC TeX to AUCTeX, new header. + + * README.CVS: Check in a first version. Ok, it currently + contains a few lies, but the basics are not wrong, and hopefully + we will have soon what it takes to make it true. + + * doc/auc-tex.texi: Name change of AUC TeX to AUCTeX. A few + other cleanups. + + * configure.in, Makefile.in, doc/Makefile.in: everything moves to + autoconf, fix a few things. + + * Makefile, doc/Makefile: deleted. + +2003-02-14 Patrick Gundlach <patrick@gundla.ch> + + * context.el: Added basic environment support (insert-envrionment + and close-environment). Added basic interface support. + + * tex.el, latex.el : moved TeX-arg-literal and TeX-near-bopb from + latex.el to tex.el. More will follow. + +2003-02-13 David Kastrup <dak@gnu.org> + + * Makefile.in (clean): Remove .elc files. + (distclean): new target. + + * aclocal.m4 (EMACS_EXAMINE_PACKAGEDIR): make this work properly + more or less. + (EMACS_CHECK_AUCTEX): use auctexdir instead of AUCTEXDIR (synch + with preview-latex aclocal.m4) and strip trailing slash. + +2003-02-11 Peter S Galbraith <psg@debian.org> + + * hilit-LaTeX.el: Removed. It's obsolete. Use font-latex.el instead. + +2003-02-11 Patrick Gundlach <patrick@gundla.ch> + + * tex.el (TeX-command-list): Change TeX-run-LaTeX to + TeX-run-TeX. + + * tex-buf.el (TeX-run-TeX): TeX-run-TeX gets the + TeX-sentinel-function from the major mode, so TeX-run-LaTeX and + alike won't be needed if they don't need to do something + fancy. Defaliased TeX-run-LaTeX to TeX-run-TeX. + (TeX-run-interactive): Uses TeX-sentinel-default-function + instead of TeX-sentinel-function. + + * latex.el (latex-mode): Sets TeX-sentinel-default-function + instead of TeX-sentinel-function. + + * tex-mik.el (TeX-command-list): Change TeX-run-LaTeX to + TeX-run-TeX. + + * tex-fptex.el (TeX-command-list): Change TeX-run-LaTeX to + TeX-run-TeX. + +2003-02-08 Patrick Gundlach <patrick@gundla.ch> + + * tex-site.el: Added simple ConTeXt support. + + * latex.el (latex-mode): Add explicit set of + TeX-sentinel-function to be used in TeX-run-interactive. + + * tex-buf.el: Added TeX-run-ConTeXt. Removed explicit call to + TeX-LaTeX-sentinel in TeX-run-interactive. The sentinel-function + is now inherited from the buffer calling + TeX-run-interactive. Hopefully this won't break anything. + + * tex.el: Adapted TeX-command-list for ConTeXt + support. Interfaces for texexec and texutil added. Nonstopmode + (texexec) and purge (texutil) won't work right with current + ConTeXt versions. This will be fixed in ConTeXt versions later + than Feb 2003. + + * context.el: basic support for ConTeXt added. New + sentinel-functiont that is different from the LaTeX one. + + +2003-02-08 pvoostrum <pvoostrum@nono.cs.uu.nl> + + * tex.el: Added missing semicolon in TeX-command-output-list. + + * tex.el: Changed defcustom to defvar. + +2003-02-08 Piet van Oostrum <piet@cs.uu.nl> + + * tex.el (TeX-output-extension, TeX-view-extension): + Change defcustom into defvar, as these are intermediate variables. + +2003-02-07 Piet van Oostrum <piet@cs.uu.nl> + + * tex.el (TeX-command-output-list): Corrected customization widget. + +2003-02-06 Piet van Oostrum <piet@cs.uu.nl> + + * tex-buf.el + (TeX-save-document, TeX-command-query) + (TeX-output-style-check, TeX-run-format, TeX-TeX-sentinel-check): + Add support for pdftex (and others) + (TeX-run-set-command, TeX-output-extension) + (TeX-view-extension, TeX-view-output-file): new functions. + + * tex.el (TeX-output-extension, TeX-view-extension) + (TeX-output-view-style, TeX-command-output-list): new variables + (TeX-expand-list): adapted for pdf output. + +2003-01-31 Jan-Åke Larsson <jalar@mai.liu.se> + + * configure.in: Use new lispdir check. + + * aclocal.m4: Some cleaning of macro names. Windows quoting by + David Kastrup <dak@gnu.org>. Also, lispdir now checks (x)emacs + load-path instead of physical disk content. + + * Makefile.in: Fix infodir + +2003-01-30 Piet van Oostrum <piet@cs.uu.nl> + + * tex-buf.el (TeX-parse-error): Exclude { and } from filenames to + improve parsing of error messages from pdftex. + +2003-01-24 Reiner Steib <Reiner.Steib@gmx.de> + + * tex.el (TeX-kpathsea-path-delimiter, TeX-search-files-kpathsea): + Fix braces. + +2003-01-22 David Kastrup <dak@gnu.org> + + * tex.el (TeX-search-files): Check in first version of kpathsea + support. This implementation does not yet cooperate properly + with TeX-auto-generate-* + +2003-01-18 David Kastrup <dak@gnu.org> + + * configure.in: Announce AUC TeX, not preview. + +2003-01-16 Reiner Steib <Reiner.Steib@gmx.de> + + * style/varioref.el ("varioref"): Fix typo. + + * Makefile.in (ELCC): `-no-init-file' is the same as `-q' + +2003-01-15 Jan-Ake Larsson <jalar@mai.liu.se> + + * configure.in, aclocal.m4: Compatibility fix + + * aclocal.m4 (AC_PROG_EMACS): New. File is now identical to that + of preview-latex. + + * configure.in: Use it + +2003-01-08 Jan-Ake Larsson <jalar@mai.liu.se> + + * Makefile.in: From Makefile + + * configure.in, aclocal.m4, autogen.sh: Initial version + + * mkinstalldirs, install-sh: Prepare for autoconf + +2002-12-29 David Kastrup <David.Kastrup@t-online.de> + + * tex.el: Add support for Info-goto-emacs-command-node and + similar. + +2002-12-19 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-home-buffer): Don't home to deleted buffers. + + * tex.el (TeX-command-list): Change single quotes to double. + That way, we will get reasonable results under both Windows and + Unix. File names with double quotes in them will break stuff, + just like file names with single quotes in them did so + previously. Tough. + +2002-12-18 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-run-shell): Start shell from TeX process buffer + in order to inherit environment from there (like cwd). + (TeX-run-discard): Same here. + (TeX-run-shell, TeX-run-discard): Rather let default-directory + temporarily: we may not have a TeX process buffer! + +2002-12-17 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * all.el: Removed. unrelated to TeX mode. + OBSOLETE files (all.el, auc-menu.el, maniac.el, and outln-18.el) + are available at: + <ftp://ftp.dina.kvl.dk/pub/Staff/Per.Abrahamsen/auctex/> + +2002-12-15 David Kastrup <David.Kastrup@t-online.de> + + * Makefile (dist): Correct zip file name. + +2002-12-15 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * Makefile (MINMAPSRC): Remove auc-menu.el, maniac.el, and + outln-18.el. + +2002-12-15 David Kastrup <David.Kastrup@t-online.de> + + * auctex.spec (Release): Well, change version number. retag. + + * Version 11.14 released. + +2002-12-15 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * auc-menu.el: Removed. Taken into Emacs and unused. + + * maniac.el: Ditto. + + * outln-18.el: Ditto. + +2002-12-15 David Kastrup <David.Kastrup@t-online.de> + + * Makefile: some changes for my setup. + +2002-12-14 David Kastrup <David.Kastrup@t-online.de> + + * graphicsx.el: removed. superseded by graphicx.el and unused. + +2002-12-13 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-label): Add completing for labels. + Avoid inserting an empty label. + +2002-12-12 Reiner Steib <Reiner.Steib@gmx.de> + + * style/amsopn.el ("amsopn"): Add \operatorname. + +2002-12-12 David Kastrup <David.Kastrup@t-online.de> + + * doc/auc-tex.texi (top): Change "version 12" to "almost 12". + This is beta, after all. + +2002-12-12 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-LaTeX-style-list): Remove styles overlapped + with LaTeX-style-list. Append values to LaTeX-style-list instead + of overwriting. + (japanese-latex-mode-initialization): Do not overwrite + LaTeX-style-list. + +2002-12-11 Reiner Steib <Reiner.Steib@gmx.de> + + * bib-cite.el: Updated URLs. + + * doc/intro.texi: Ditto. + + * font-latex.el: Ditto. + + * latex.el: Ditto. + + * tex.el: Ditto. + + * style/amsmath.el (LaTeX-amsmath-label): Improve doc-string. + + * doc/auc-tex.texi (Equations): New @subsection documenting + LaTeX-equation-label, LaTeX-eqnarray-label and LaTeX-amsmath-label. + +2002-12-11 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-LaTeX-default-style) + (japanese-LaTeX-style-list): remove buffer-local declarations + where they don't make sense. + +2002-12-10 David Kastrup <David.Kastrup@t-online.de> + + * doc/changes.texi: Some more news. + + * doc/auc-tex.texi: Start talking about version 12 (which will be + the next stable release). + (European): Talk a bit about LaTeX2e stuff, and don't talk about + too ancient XEmacsen. Also mention X-Symbol. + + * doc/Makefile (install): Create infodir if not existent. + +2002-12-10 Reiner Steib <Reiner.Steib@gmx.de> + + * font-latex.el (font-latex-match-textual): Fix typo in doc-string. + + * latex.el (LaTeX-section-label): Fix typos in doc-string. + +2002-12-10 David Kastrup <David.Kastrup@t-online.de> + + * latex.el (LaTeX-label): Fix a thinko/type where label would be + non-nil in cases where a label should not be asked for. + +2002-12-10 Reiner Steib <Reiner.Steib@gmx.de> + + * style/amsmath.el (LaTeX-amsmath-label): New variable. + ("amsmath"): Add environments to LaTeX-label-alist. + +2002-12-10 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el: Remove if statement for Emacs 19. + Fix lots of white spaces. + +2002-12-09 David Kastrup <David.Kastrup@t-online.de> + + * latex.el (LaTeX-optop, LaTeX-optcl, LaTeX-default-options, + LaTeX-figure-label, LaTeX-table-label, LaTeX-equation-label, + LaTeX-eqnarray-label, LaTeX-style-list): remove buffer-local + declarations where they don't make sense. + +2002-12-09 Reiner Steib <Reiner.Steib@gmx.de> + + * latex.el (LaTeX-style-list): Add some supported classes. + Fixed a typo. + + * style/amsmath.el ("amsmath"): environment "xxalignat*" doesn't + exist. + (LaTeX-amsmath-env-alignat): environment "xxalignat" should not + get a \label. + + * Makefile (BATCH): Add `-no-site-file' to batch options. + +2002-12-07 David Kastrup <David.Kastrup@t-online.de> + + * font-latex.el (font-latex-setup): Better stab at verbatim + handling. + + * tex-buf.el (TeX-region-create): Make file name in !name + messages relative to master file directory. + +2002-12-06 David Kastrup <David.Kastrup@t-online.de> + + * latex.el: Lots of doc fixes/white space. Did the mistake of + running checkdoc. Not clean yet, but different. + (LaTeX-label-alist): New buffer-local variable for label prefixes + lookup. + (LaTeX-label): Use it. + +2002-11-25 David Kastrup <David.Kastrup@t-online.de> + + * latex.el (TeX-arg-define-index): correct typo. + +2002-11-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.13 released. + +2002-11-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Fixed CVS merge error. + + * Version 11.12 released. + +2002-10-28 David Kastrup <David.Kastrup@t-online.de> + + * Makefile (prefix): Revert accidental change to + /usr/local/emacs-21 (sorry folks). + +2002-10-26 David Kastrup <David.Kastrup@t-online.de> + + * Makefile (STYLESRC): Add style/scrlttr2.el + +2002-10-26 Mark Trettin <Mark.Trettin@gmx.de> + + * style/scrbase.el: Added optional Argument "Pagenumber" to + \maketitle. Changed \textsubscript from `t' to "Text". + + * style/scrlttr2.el: Initial version. + + * style/scrbase.el: Added additional clearpage commands: + \cleardoublestandardpage \cleardoubleplainpage and + \cleardoubleemptypage + +2002-10-24 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * latex.el (LaTeX-env-contents): New function. + (LaTeX-common-initialization): Add 26 LaTeX commands, 2 LaTeX2e + environments, and 41 LaTeX2e commands. + +2002-10-08 David Kastrup <David.Kastrup@t-online.de> + + * style/scrreprt.el, style/scrbase.el, style/scrartcl.el, + style/scrbook.el: header comments refer to COPYING. + +2002-10-02 David Kastrup <David.Kastrup@t-online.de> + + * Makefile (STYLESRC): Add compilation targets for Komascript + support. + + * Check in Komascript support by Mark Trettin. See below. + +2002-09-28 Mark Trettin <Mark.Trettin@gmx.de> + + * scrbase.el: + First attempt on implementing the `captionbeside'-Environment. I'm not + really satisfied by now. + +2002-09-27 Mark Trettin <Mark.Trettin@gmx.de> + + * scrreprt.el, scrbook.el: Reformatted code. + + * scrbase.el: + Fixed Typos in comments and escape characters in function docstrings. + Thanks to Reiner Steib. + Reformatted code. + + * scrbase.el: + Changed `uppertitleback', `lowertitleback' from asking to just `t' + + * scrbase.el: + Changed `addpart', `addsec' and `minisec' from Macro to sectioning + command. + + * scrreprt.el, scrbook.el: + Changed `addchap' from Macro to sectioning command. + +2002-09-26 Mark Trettin <Mark.Trettin@gmx.de> + + * scrartcl.el: LaTeX-section-list removed. + + * scrartcl.el: Initial version. Testing LaTeX-section-list. + + * scrbase.el: Initial version of the base file. + + * scrreprt.el, scrbook.el: Initial version. + + * scrbook.el, scrbase.el, scrreprt.el, scrartcl.el: + +2002-09-22 David Kastrup <David.Kastrup@t-online.de> + + * tex.el: Apply spelling fixes from "Davide G. M. Salvetti" + <salve@debian.org> to tex.el. + +2002-03-24 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-parse-TeX): Make subordinate files without + major mode default to that of the calling file when doing error + processing. + +2002-03-21 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-site.el (eamcs-major-version): Change if to when. + Suggested by Martin Thornquist <martint@ifi.uio.no>. + +2002-03-15 David Kastrup <David.Kastrup@t-online.de> + + * tex.el (TeX-master-file): Don't make C-c ` bomb out in files + like xxx.gls. Probably a more elaborate way would be to export + the TeX-master variable into files visited by error parsing. + Could be incorrect, however, if more than one file included them. + +2002-02-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-auto-generate): Expand file name. + Suggested by "Dr. Mark A. Friedman" <DrMarkAFriedman@earthlink.net>. + + * latex.el (LaTeX-common-initialization): + Set `fill-paragraph-function'. + (LaTeX-mode-map): Don't bind M-q. + Suggested by Nils Klarlund <klarlund@research.att.com>. + + * tex.el (TeX-printer-list): Fix spelling. + Reported by Nils Klarlund <klarlund@research.att.com>. + +2002-02-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Fixed some spelling errors. + Patch by "Davide G. M. Salvetti" <salve@debian.org>. + +2002-01-24 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.11 released. + +2002-01-24 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-format-list): Support t(article|report|book) class file. + Reported by Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp> + + * tex-jp.el (japanese-TeX-command-list): Undo last change. + (LaTeX-command-style): Support t(article|report|book) class file. + (japanese-LaTeX-style-list): Ditto. + Reported by Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp> + +2002-01-21 Peter S Galbraith <psg@debian.org> + + * font-latex.el: Updated to V0.800. + Added font-lock-syntactic-keywords to font-lock-defaults to handle + verbatim environment, as suggested by Stefan Monnier 5 years ago (!) + * bib-cite.el: Updated to V3.17. + XEmacs has imenu after all. + +2002-01-21 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex.el (TeX-format-list): Fix problem that AUC TeX switch to + JLATEX mode if the class file starts with the letter `j'. + Reported by Joe Reinhardt <jmr@everest.radiology.uiowa.edu>. + + * tex-jp.el (LaTeX-command-style): Support js(article|book). + +2002-01-21 Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp> (tiny change) + + * tex-jp.el (japanese-TeX-command-list): Use `%l' instead + of [pj]latex command. + +2002-01-18 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (LaTeX-command-style): Fix comment. + Reported by Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp> + via. Debian. + + * latex.el (LaTeX-outline-name): Allow longer names. + Reported by "Michael Soulier" <msoulier@nortelnetworks.com> + via. Debian. + +2001-12-22 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-imenu-create-index-function): Strip text + properties. + Reported by Venkatesh Prasad Ranganath <rvprasad@@cis.ksu.edu>. + +2001-12-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/prosper.el: New file. + Contributed by Phillip Lord <p.lord@russet.org.uk>. + * Makefile (STYLESRC): Add it. + +2001-11-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.10 released. + +2001-11-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.09 released. + +2001-11-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * auc-old.el (insert-mode-line): Use `insert' instead of + `insert-string'. + +2001-10-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-ignore-comment-regexp): Doc fix. + Reported by Reuben Thomas <rrt@sc3d.org>. + +2001-11-16 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-process-check): We didn't catch the case where + during the question a different process got started in the + buffer. In that case, we just ask again. + +2001-11-06 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-command-sentinel): insert post-mortem info + before any markers in order to keep markers/point at end of file. + +2001-11-02 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * style/graphicx.el (TeX-arg-includegraphics): Accept prefix + argument and find all files. dvipdfm image file support. + +2001-10-19 Masayuki Ataka <ataka@milk.freemail.ne.jp> + + * tex-jp.el (japanese-TeX-command-list): Fix for mendex. + * doc/auc-tex.texi (Japanese): Doc fix. + +2001-10-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.08 released. + +2001-10-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/intro.texi, doc/install.texi: Updated contact info. + Reported by Henrik Holm <h.holm@spray.no>. + +2001-10-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.07 released. + +2001-10-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (VirTeX-common-initialization): Set `comment-add' in + order to get "%%" by default by comment region like Lisp mode. + Suggested by "Davide G. M. Salvetti" <salve@debian.org>. + Change `comment-indent-hook' to `comment-indent-function'. + + +2001-10-15 Peter S Galbraith <psg@debian.org> + + * font-latex.el: Remove self-installation to LaTeX-mode-hook now + that TeX-install-font-lock does it. + +2001-10-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.06 released. + +2001-10-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Removed font lock support. + (TeX-install-font-lock): New option. + (VirTeX-common-initialization): Call it. + + * tex-font.el: New file. + +2001-10-13 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-current-offset): The number of things that can + go wrong for a simple task like determining the current line + number is simply amazing. count-lines skips over newlines in + intangible text-properties or overlays. Fixed for GNU Emacs, + don't know whether XEmacs has problems with it. + +2001-10-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.05 released. + +2001-10-12 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-run-command): Let the TeX-process-buffer acquire + a buffer-local value of TeX-command-buffer so that its sentinel + will still refer to the right buffer even if another compilation + has been started. + (TeX-run-interactive): Same here. + (TeX-process-check): Don't bomb out when user does not want to + kill a process that has died on its own in the meantime. + +2001-10-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-auto-local, TeX-style-local): Doc fix: Mention that + these should be relative. + Suggested by <lanz+list@wsl.ch>. + +2001-10-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.04 released. + +2001-10-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-view-style): New option. + (TeX-expand-list): Use it. + (TeX-command-list): Use it. + +2001-10-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.03 released. + +2001-10-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/amsmath.el ("amsmath"): More items. + Patch by Masayuki Ataka <ataka@milk.freemail.ne.jp>. + +2001-10-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-LaTeX-sentinel): Use `with-current-buffer'. + + * tex-buf.el (TeX-LaTeX-sentinel): Use the value of + `TeX-command-BibTeX' in `TeX-command-buffer'. + Patch by Katsuaki KAWACHI <kawachi@cim.pe.u-tokyo.ac.jp>. + + * tex-fptex.el: New file. + Contributed by Fabrice Popineau <Fabrice.Popineau@supelec.fr>. + * Makefile (CONTRIB): Add it. + +2001-10-04 Peter S Galbraith <psg@debian.org> + + * multi-prompt.el (multi-prompt-next): fixed for emacs-21. + Use minibuffer-contents-no-properties to get minibuffer contents + if it exists. + +2001-10-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.02 released. + +2001-10-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-top-caption-list): New option. + (LaTeX-env-figure): Use it. + Patch by ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * style/graphicx.el (TeX-string-numberp): New function. + (TeX-arg-includegraphics): Call it. + Patch by ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * style/verbatim.sty: New file. + Contributed by ataka@milk.freemail.ne.jp (Masayuki Ataka). + + * tex-info.el (texinfo-mode): Comment out cindex. + Reported by Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) + + * style/amsmath.el (LaTeX-item-equation, LaTeX-item-equations): + New functions. + ("amsmath"): Add new item types. + Patch by ataka@milk.freemail.ne.jp (Masayuki Ataka). + +2001-10-02 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 11.01 released. + +2001-10-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-submenu-name-format): Fix spelling error. + Reported by Martin.Quinson@ens-lyon.fr. + +2001-10-01 David Kastrup <David.Kastrup@t-online.de> + + * tex-buf.el (TeX-region-create): + Oops, broke more than I fixed. Offset calculation must be for the + line following the offset message. This worked before since we always + were in the middle of a line (only the offset calculation for the C-c + C-r command itself was definitely sometimes wrong). Corrected that. + + * style/graphicx.el (TeX-arg-includegraphics): + Fix an obvious typo complained about by the byte-compiler. + checkdoc removed a few spaces. + + * auc-old.el (TeX-region): Correct offset calculation. + + * tex.el (TeX-current-line): + Correct line number calculation when at beginning of line for %n + flag. Autoload TeX-current-offset for that if necessary. + + * tex-buf.el (TeX-current-offset, TeX-command-region, + TeX-region-create): + Correct offset calculations when not at start of line. New function + TeX-current-offset for that. + +2001-04-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0g released. + +2001-04-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-site.el: Don't enable tex-info.el by default. + + * latex.el (LaTeX-hide-environment): Disabled by default. + Suggested by Christopher Allen <cpcallen@ruah.dyndns.org>. + +2001-03-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0f released. + +2001-03-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (unless): Don't enable Emacs 21 font-lock for Emacs 20. + (VirTeX-common-initialization): Ditto. + +2001-03-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0e released. + +2001-03-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-expand-list): Change default to lazy evaluation of + `TeX-view-style' and `LaTeX-command-style'. + Suggested by Peter Neergaard <turtle@cs.bu.edu>. + + * latex.el (LaTeX-indent-calculate, LaTeX-indent-calculate-last): + Backindent when brace is at the start of a line. + Patch by Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>. + + * doc/auc-tex.texi: Fixed dir entry. + Reported by David Masterson <dmasters@Rational.Com>. + + * tex-info.el (TeXinfo-mode-map): "\e\r" bound to `map', not + `TeXinfo-mode-map'. + Patch by Dan Nicolaescu <dann@godzilla.ICS.UCI.EDU>. + +2001-03-01 Hidenobu Nabetani <nabe@debian.or.jp> + + * tex-jp.el: Don't work correctly in current AucTeX. + Patch by Masayuki Ataka <j1297007@ed.kagu.sut.ac.jp> + and Yuzo Furukawa <hurukawa@kuee.kyoto-u.ac.jp>. + Removed support for NEmacs and Mule1,2 which are based + on Emacs 18 and 19. + Created new variable japanese-TeX-command-list and + added support for mendex. + Updated LaTeX-auto-regexp-list variable. + +2001-01-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * all: Changed `sunsite.auc.dk' to `sunsite.dk'. + +2001-01-02 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0d released. + +2001-01-02 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-mik.el (TeX-command-list): Don't prompt for view. + +2000-12-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0c released. + +2000-12-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Avoid :inherit font property with Emacs 20. + Reported by Damien WYART <wyart@iie.cnam.fr>. + +2000-12-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0b released. + +2000-11-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 10.0a released. + +2000-11-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Copied Emacs 21 font-lock defs here. + (VirTeX-common-initialization): Activate them. + +2000-10-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * PROBLEMS: Updated. + + * WIN-NT: Removed. + * MSDOS: Removed. + * VMS: Removed. + * OS2: Removed. + * Makefile (EXTRAFILES): Remove above files. + +2000-10-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/graphicx.el: Updated by author. + Ryuichi Arafune <arafune@ushioda.riec.tohoku.ac.jp> + +2000-10-19 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/graphics.el: New file. + * Makefile (STYLESRC): Add it. + * style/graphicx.el: Renamed from `style/graphicx.el'. + * Makefile (STYLESRC): Update. + Reported by "Dr. Thomas Baumann" <thomas.baumann@ch.tum.de>. + +2000-10-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10t released. + +2000-10-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-outline-name): Don't escape `{' or `}' in + regexps. + Patch by "Stefan Monnier" <monnier+gnu/emacs/news/@RUM.cs.yale.edu>. + + * tex-mik.el (TeX-command-list): Use `TeX-run-discard' for "View" + command. + Suggested by "Claus Dethlefsen" <c.dethlefsen@lancaster.ac.uk>. + + * latex.el (LaTeX-common-initialization): `\bibitem' starts + paragraphs, just like `\item'. + Reported by Werner LEMBERG <sx0005@sx2.HRZ.Uni-Dortmund.DE>. + +2000-10-06 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-current-line): Return a string, not a number. + Reported by Julia Habel <julia.habel@gmx.de>. + Patch by Dirk.Ullrich@DaimlerChrysler.com. + +2000-06-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-site.el: Require tex-mik after changing load-path. + Reported by "I. Jossang" <ij202@eng.cam.ac.uk>. + +2000-06-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * IRIX: New file. + * Makefile (EXTRAFILES): Add it. + +2000-05-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10s released. + +2000-05-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10r released. + +2000-05-02 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-mode-map): Don't bind `.' and `,' by default. + +2000-05-03 Peter Galbraith <psg@debian.org> + + * font-latex.el: file was broken. Updated to 0.701 (30 Mar 2000). + * bib-cite.el: file was broken. Updated to 3.16 (20 Dec 99). + +2000-04-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10q released. + +2000-03-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/graphicsx.el: New file. + * Makefile (STYLESRC): Add it. + Donated by Ryuichi Arafune <arafune@ushioda.riec.tohoku.ac.jp>. + +2000-04-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10q released. + +2000-03-23 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-keymap): Accept vector for + `LaTeX-math-abbrev-prefix'. + (LaTeX-math-insert-prefix): Better error message if + `LaTeX-math-abbrev-prefix' is not bound. + Reported by Jan Vroonhof <vroonhof@math.ethz.ch>. + +2000-02-23 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-info.el (TeXinfo-environment-list): Add more missing + environments. Patch by Akim Demaille <akim@epita.fr>. + +2000-02-22 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-info.el (TeXinfo-environment-list): Add `group'. + Patch by Akim Demaille <akim@epita.fr>. + +2000-01-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-command-list): Add `makeinfo --html' support. + Suggested by Akim Demaille <akim@epita.fr>. + +2000-01-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-info.el (TeXinfo-mode-map): Add "\e\r" binding for + `texinfo-insert-@item'. + Reported by Akim Demaille <akim@epita.fr>. + (TeXinfo-mode-menu, texinfo-mode): Change menu name and mode name + to `Texinfo'. + Suggested by Akim Demaille <akim@epita.fr>. + +1999-12-21 Per Abrahamsen <abraham@dina.kvl.dk> + + * bib-cite.el: Updated to 3.16 (20 Dec 99). + + * font-latex.el: Updated to 0.700 (20 December 1999). + +2000-03-30 Peter Galbraith <psg@debian.org> + + * font-latex.el: Updated to 0.701 (30 Mar 2000). + +2000-01-14 Peter Galbraith <psg@debian.org> + + * bib-cite.el: Updated to 3.16 (20 Dec 99). + * font-latex.el: Updated to 0.700 (20 Dec 99). + * hilit-LaTeX.el: Changed author email address. + +1999-12-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10p released. + +1999-12-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * bib-cite.el: Updated to 3.15 (20 Dec 99). + + * tex-mik.el (TeX-command-list): Fix default PDF LaTeX command. + Reported by "Christian Schlauer" <Christian.Schlauer@web.de>. + + * Version 9.10o released. + +1999-12-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * bib-cite.el: Updated to 3.13 (20 Dec 99). + +1999-12-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/danish.el ("danish"): Support Danish quotes. + Suggested by arne@daimi.au.dk (Arne Jørgensen). + +1999-12-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-info.el (texinfo-mode): Add `kill-all-local-variables'. + Reported by Stefan Monnier <foo@acm.com>. + + * Version 9.10n released. + +1999-12-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-mik.el: Fixed typo. + Reported by Bernt Guldbrandtsen <bg@rs580.sh.dk> + +1999-12-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10m released. + +1999-12-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (AUCSRC, AUCELC): Add `tex-mik.el'. + +1999-11-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10l released. + +1999-11-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-env-figure): Use `\centering' instead of + `center' environment. + Patch by Stefan Monnier <foo@acm.com>. + +1999-11-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-mik.el (tex-mik): Add provide. + + * tex-site.el: Automatically require `tex-mik.el' under NT. + +1999-11-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-current-file-name-nondirectory): New function. + (TeX-expand-list): Use it. + +1999-11-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/auc-tex.texi: Fixed references. + Patch by Stefan Monnier <foo@acm.com>. + * tex.el (TeX-lisp-directory): Use `locate-library' to find + default under Emacs. + Patch by Stefan Monnier <foo@acm.com>. + (TeX-dwim-master): New function. + (TeX-master-file): Use it. + (TeX-master): Document it. + Patch by Stefan Monnier <foo@acm.com>. + +1999-11-06 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10k released. + +1999-11-06 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el: Use `indent-according-to-mode' instead of + `LaTeX-indent-line'. + (LaTeX-mode-map): Don't remap `TAB'. + Patch by "Stefan Monnier <foo@acm.com>". + +1999-11-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-command-list): Add `LaTeX PDF' command. + +1999-10-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10j released. + +1999-10-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (dist): Create a .nosearch in the style directory. + (install-lisp): Ditto. + Suggested by Markus Rost <rost@IAS.EDU>. + +1999-10-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10i released. + +1999-10-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-master-directory): Call `substitute-in-file-name'. + Patch by Alexander Holt <alexander.holt@ed.ac.uk>. + + * style/ngerman.el: New style. + Suggested by Torsten Schuetze <schuetze@math.tu-dresden.de>. + * Makefile (STYLESRC): Add it. + + * tex-buf.el (TeX-command-query): Add history argument. + Suggested by Werner LEMBERG <sx0005@sx2.HRZ.Uni-Dortmund.DE>. + + * latex.el (LaTeX-environment): Add history argument. + + * tex.el (TeX-add-style-hook): Don't add the same hook twice. + Suggested by Jarl Friis <jarl@diku.dk>. + + * tex.el: Removed portability code for old Emacsen. + +1999-10-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10h released. + +1999-09-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-auto-cleanup): Allow multiple packages for + `usepackage'. + Reported by Torsten Schuetze <schuetze@math.tu-dresden.de>. + (LaTeX-auto-cleanup): Also add "unmangled" documentstyle. + Reported by Cyril Humbert <humbert@phobos.univ-mlv.fr>. + +1999-09-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/mdwlist.el: New file. + Patch by Stephen Heilbronner <heilbron@nm.informatik.uni-muenchen.de>. + * Makefile (STYLESRC): Add it. + +1999-08-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10g released. + +1999-08-20 Hidenobu Nabetani <nabe@debian.or.jp> + + * tex.el (TeX-format-list): Add "JLATEX" and "JTEX" which is needed + to load tex-jp.el automatically. + * tex-jp.el (TeX-format-list): Remove "JLATEX" and "JTEX". + +1999-08-19 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-hide-environment, LaTeX-show-environment): + make them work with new outline mode. + Reported by Thomas Schick <schick@math.psu.edu>. + + * tex.el (match-string): New compatibility function. + Reported by Andrew Edward Santosa <andrews@comp.nus.edu.sg>. + +1999-08-18 Hidenobu Nabetani <nabe@debian.or.jp> + + * tex-jp.el (TeX-command-list): Add "jLaTeX" and "pLaTeX". + (TeX-mode-menu): Fix the problem that menu "TeX" is unchanged. + (TeX-japanese-process-input-coding-system): Update for Emacs 20. + (TeX-japanese-process-output-coding-system): Update for Emacs 20. + (TeX-command-default): Change from "j-article" to "jarticle". + (LaTeX-fill-region-as-para-do): Fix the problem that fill mode + don't work in Emacs 20. + +1999-07-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10f released. + +1999-07-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-auto-minimal-regexp-list): Recognize usepackage + options. + (LaTeX-auto-cleanup): Ditto. + +1999-07-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-ignore-file): Ignore babel, it loads everything. + Reported by Mate Wierdl <mw@wierdlmpc.msci.memphis.edu>. + + * style/foils.el: Removed require 'latex. + * style/natbib.el: Ditto. + * style/harvard.el: Ditto. + * style/slides.el: Ditto. + * style/latexinfo.el: Ditto. + Reported by Mate Wierdl <mw@wierdlmpc.msci.memphis.edu>. + + * Makefile (infodir, lispdir, aucdir, EMACS): Use `standard' values. + Reported by Mate Wierdl <mw@wierdlmpc.msci.memphis.edu>. + + * tex-info.el (texinfo-mode): Fix doc string. + Reported by Bob Weiner <weiner@altrasoft.com>. + +1999-05-17 Jerry James <jerry@cs.ucsb.edu> + + * tex.el: Fix two typos in comments. + (set-text-properties): Protect against possible XEmacs version + 21.13, 22.13, etc. + +1999-05-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-indent-environment-list): Customized. + + * Version 9.10e released. + +1999-05-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: (TeX-auto-generate): Reimplement support for numeric + `TeX-file-recurse'. + (TeX-search-files): Ditto. + +1999-05-03 Rune Kleveland <runekl@math.uio.no> + + * style/amsart.el ("amsart"): Load `amsthm.el'. + * style/amsbook.el ("amsbook"): Ditto. + +1999-03-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10d released. + +1999-03-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/changes.texi: Added extra `@'. + + * Version 9.10c released. + +1999-03-19 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * tex.el (TeX-insert-dollar): Better error message when trying + to insert a dollar in math-mode. + + * texmathp.el (texmathp-tex-commands-default): Add more default + macros. + +1999-03-12 Carsten Dominik <dominik@strw.LeidenUniv.nl> + + * latex.el (TeX-arg-index-tag): New function, to be used by the + index.el and multind.el style files. + (LaTeX-auto-index-regexp-list): Now matches both \index and + \glossary. + (TeX-arg-index): Rename from TeX-arg-define-index. + (TeX-arg-define-index): Now an alias for `TeX-arg-index'. + (LaTeX-common-initialization): Add a regexp for index and + glossary to `TeX-complete-list'. Added entry for glossary with + `Tex-add-symbols'. + * style/index.el: New file. + * style/makeidx.el: New file. + * style/multind.el: New file. + * style/varioref.el: New file. + * style/fancyref.el: New file. + * Makefile (STYLESRC): Add `style/index.el', `style=makeidx.el', + `style/multind.el', `style/varioref.el', `style/fancyref.el'. + +1999-02-23 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-search-files): `nconc' the result. + Reported by Berwin Turlach <bturlach@maths.adelaide.edu.au>. + +1999-02-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.10b released. + +1999-02-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/changes.texi: Typo: @ldots -> @dots. + + * Version 9.10a released. + + * doc/auc-tex.texi: Changed version to 9.10. + * doc/history.texi: Ditto. + * doc/changes.texi: Ditto. + +1999-02-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9p released. + +1999-02-08 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-jp.el (TeX-format-list): Fix JLATEX format. + Patch by Tsutomu OKUMURA <oku@nml.t.u-tokyo.ac.jp>. + + * style/foils.el (LaTeX-style-foils): Remove spurious `\n'. + Reported by Bernt Guldbrandtsen <bernt@jupiter.ansci.iastate.edu>. + +1999-02-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (install-contrib): Add `$(CONTRIBELC)' dependency. + Suggested by Nils Ackermann <Nils.Ackermann@math.uni-giessen.de>. + +1999-01-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-search-files): `mapcar' instead of `mapcan'. + +1999-01-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-font-replace-macro): Rename from + `LaTeX2e-font-replace'. Use `TeX-esc'. + * latex.el (LaTeX-common-initialization): Use it. + * tex-info.el (texinfo-mode): Ditto. + (TeXinfo-font-list): Add `delete'. + Suggested by Christoph Wedler <wedler@fmi.uni-passau.de>. + +1999-01-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9o released. + +1999-01-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-insert-braces, TeX-command-list): Fix custom types. + Patch by Markus Rost <markus.rost@mathematik.uni-regensburg.de>. + +1999-01-09 Christoph Wedler <wedler@fmi.uni-passau.de> + + * latex.el (LaTeX2e-font-replace): Don't use hard-coded regexp for + font commands, use local `TeX-font-list', i.e., `LaTeX-font-list'. + +1999-01-05 Christoph Wedler <wedler@fmi.uni-passau.de> + + * tex.el (TeX-load-style-file): Do not prevent .elc style files to + be loaded if `TeX-byte-compile' is nil, just prevent compilation. + (TeX-lisp-directory): Only use `locate-data-directory' if this + function is defined and AucTeX is installed as an XEmacs package. + +1998-12-12 Christoph Wedler <wedler@fmi.uni-passau.de> + + * tex.el (load-path): Don't add `TeX-lisp-directory'. + (TeX-lisp-directory): Use `locate-data-directory' if present. + +1998-12-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9n released. + +1998-12-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-file-recurse): Add right parenthesis. + Reported by Bernt Guldbrandtsen <bernt@stat.washington.edu>. + +1998-12-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9m released. + +1998-12-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * font-latex.el: Updated. + * bib-cite.el: Ditto. + + * Version 9.9l released. + +1998-12-01 Alastair Burt <burt@dfki.de> + + * doc/auc-tex.texi (Automatic): + + * lisp/tex.el: Extended the semantics of TeX-file-recurse + -- now accepts a positive integer as a bound on the recursion. + Functions TeX-search-files and TeX-auto-generate have been amended + appropriately. + +1998-11-23 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * texmathp.el (texmathp): Add autoload cookie. + +1998-11-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9k released. + +1998-11-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-load-style-file): Protect `byte-compile-file'. + Reported by Kurt Swanson <kurt@dna.lth.se>. + + * latex.el (LaTeX-outline-name): New function. + (LaTeX-imenu-create-index-function): New function. + (LaTeX-common-initialization): Use it. + + * tex-buf.el (TeX-run-interactive): Make sure buffer is writable + (needed in Emacs 20.3). + Reported by many. + +1998-10-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/auc-tex.texi (European): Remove references to obsolete + packages. + +1998-07-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9j released. + +1998-07-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-run-ispell-on-document, TeX-ispell-document): + New functions. + * tex.el (TeX-command-list): Use them. + Patch by Jason Stewart <jasons@cs.unm.edu>. + + * Version 9.9i released. + +1998-07-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-parse-macro, TeX-arg-string, TeX-parse-argument): + If region is active, put it inside empty brackets. + Patch by Peter Thiemann <pjt@cs.nott.ac.uk>. + +1998-07-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (plain-TeX-auto-regexp-list): Add missing \\'es. + Reported by Markus Rost t4287 + <markus.rost@mathematik.uni-regensburg.de>. + +1998-07-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9h released. + +1998-07-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-insert-dollar): Use `string-equal' to compare + strings. + Patch by Carsten Dominik <dominik@strw.leidenuniv.nl>. + +1998-06-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9g released. + +1998-06-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-auto-index-regexp-list): Remove extra quote. + Patch by Carsten Dominik <dominik@strw.leidenuniv.nl>. + +1998-06-24 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9f released. + +1998-06-24 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-auto-index-regexp-list): Fix parentheses. + * texmathp.el (texmathp): Use `if (not' instead of `unless'. + Patch by Carsten Dominik <dominik@strw.leidenuniv.nl>. + +1998-06-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9e released. + +1998-06-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/Makefile (auc-tex.ps): Use `-o' to specify output file. + Suggested by Paul McJones <mcjones@pa.dec.com>. + +1998-06-12 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * latex.el (LaTeX-font-list): Default value now contains special + math font commands. + (LaTeX2e-font-replace): Add support for math fonts. + + * tex.el (TeX-font-list): Docstring changed. Extra prefix and + suffix for math fonts allowed. + (TeX-describe-font-entry): Adapted to extended `TeX-font-list'. + (TeX-font): Detects math mode (using `texmathp') and inserts + special math font commands when available. + +1998-06-11 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * tex.el: (TeX-insert-dollar): Rewritten with `texmathp'. + (TeX-dollar-verify, TeX-locate-delimiter, TeX-bouncing-point): + Obsolete functions removed. + +1998-06-11 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * latex.el: Made index entries available for global completion + like labels and citation keys. + (TeX-arg-index, TeX-arg-define-index): New functions. + +1998-06-10 Carsten Dominik <dominik@strw.leidenuniv.nl> + + * natbib.el ("natbib"): Rewritten to allow for more flexible + control of optional note arguments. New macros in NatBib 6 + supported. Added support for RefTeX. + +1998-06-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9d released. + +1998-06-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * texmathp.el: New version from Dominik. + + * Version 9.9c released. + +1998-06-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (texmathp): Add autoload. + (TeX-math-mode-p): Delete. + (TeX-parse-macro): Use `texmathp' instead of `TeX-math-mode-p'. + + * texmathp.el: New file by Carsten Dominik + <dominik@strw.LeidenUniv.nl>. + * Makefile (AUCSRC): Add. + (AUCELC): Add. + +1998-06-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-expand-list): Add `%n' escape. + (TeX-current-line): New function. + Suggested by "Lee, Sang-Min" <smagus@acorn.snu.ac.kr>. + + * doc/auc-tex.texi: Doc fixes by Gustavo Chaves + <gustavo@cpqd.com.br>. + * doc/intro.texi: Ditto. + * doc/install.texi: Ditto. + +1998-05-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el: Checkdoc'ed. + +1998-04-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/README: Update iesd->sunsite in addresses. + +1998-04-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/Makefile (auc-tex.ps): Cut of the first two lines. + +1998-03-29 Carsten Dominik <dominik@strw.LeidenUniv.nl> + + * latex.el (LaTeX-section-section): When RefTeX is available, + notify it about the new section. + +1998-03-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/math-ref.tex (section{Symbols}): Wrong keybindings. + Reported by "Ron Smith" <rsmith@eel.ufl.edu>. + +1998-02-27 Soren Dayton <csdayton@cs.uchicago.edu> + + * tex.el (TeX-load-style): Also look in master directory. + +1998-02-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-insert-punctuation): Only expand abbrevs when abbrev + mode is on. Suggested by Alastair Burt <alastair.burt@dfki.de>. + +1998-02-25 SL Baur <steve@altair.xemacs.org> + + * doc/auc-tex.texi: Add direntry section for automatic + installation. + +1998-02-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9b released. + +1998-01-02 John Griffith <griffith@sfs.nphil.uni-tuebingen.de> + + * latex.el (LaTeX-auto-regexp-list): Recognize empty optional + arguments and macros in optional arguments. + + * tex.el (TeX-parse-argument): minor spelling correction. + (TeX-argument-insert): ditto + +1998-02-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-match-extension): Fold case when matching + extensions. + +1998-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.9a released. + +1998-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8l released. + +1998-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8k released. + +1998-02-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-list): Make tags match doc string. + +1998-01-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8j released. + +1998-01-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-jp.el: Added credit. + Patch by KOBAYASHI Shinji <koba@flab.fujitsu.co.jp>. + +1997-12-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-site.el: Added `defcustom' kludge to tex-site.el. + Suggested by "Ralph J. Hangleiter" <hangleit@math.uni-goettingen.de>. + +1997-10-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (TeX-arg-input-file): Add trailing slash. + (TeX-arg-bibstyle): Ditto. + (TeX-arg-bibliography): Ditto. + Patch by Ching-Mo Chang <chang@wsu.edu>. + +1997-10-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8i released. + +1997-10-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8h released. + +1997-10-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8g released. + +1997-10-20 Peter S Galbraith <rhogee@mixing.qc.dfo.ca> + + * font-latex.el: Updated to V0.504 (Oct 20 97) + + * bib-cite.el: Updated to 3.04 (Aug 25 97) + + * hilit-LaTeX.el: Updated to V1.17 (Sep 06 95) + +1997-10-01 kifer@CS.SunySB.EDU (Michael Kifer) + + * tex.el (TeX-insert-punctuation): Expand abbrevs in the + beginning. + +1997-09-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-run-silent): New function. + + * tex.el (TeX-command-list): Change default for view from + `TeX-run-background' to `TeX-run-silent'. + +1997-09-10 "Dr. Werner Fink" <werner@suse.de> + + * style/dinbrief.el: Updated. + +1997-09-08 karlheg@inetarena.com (Karl M. Hegbloom) + + * tex-info.el (texinfo-mode): Regexp fix. + +1997-08-29 David J. Rowe <rowe@asys47.wdl.lmco.com> + + * latex.el (LaTeX-auto-regexp-list): Add support so newcommand*, + renewcommand*, providecommand*, newenvironment* and + renewenvironment* are recognized by TeX-auto-generate and + TeX-auto-generate-global. + (LaTeX-common-initialization): Add all of above "starred" + commands to symbol list and added providecommand to symbol list. + +1997-08-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8f released. + +1997-08-29 Carsten Dominik <dominik@strw.LeidenUniv.nl> + + * amsmath.el ("amsmath"): Add environments xalignat and + xxalignat, and starred forms + +1997-08-22 Christoph Wedler <wedler@fmi.uni-passau.de> + + * tex-buf.el (TeX-region-create): Also bind `orig-buffer' which + might be useful in `TeX-region-hook'. + +1997-07-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8e released. + +1997-07-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (STYLESRC): Add `style/natbib.el'. + +1997-07-13 Berwin Turlach <berwin.turlach@anu.edu.au> + + * Added style support for natbib.sty + +1997-07-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8d released. + +1997-07-11 Jan Vroonhof <vroonhof@math.ethz.ch> + + * latex.el (LaTeX-auto-regexp-list): More LaTeX2e support. + +1997-07-05 Berwin Turlach <berwin.turlach@anu.edu.au> + + * latex.el (BibTeX-auto-store): make TeX-master a local variable + and set it to true. + +1997-07-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8c released. + +1997-07-03 Carsten Dominik <dominik@strw.LeidenUniv.nl> + + * style/amsmath.el ("amsmath"): Use `TeX-arg-ref' for eqref. + +1997-06-29 Berwin Turlach <berwin.turlach@anu.edu.au> + + * harvard.el: Updated the support for harvard.el + +1997-06-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8b released. + +1997-06-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-LaTeX-sentinel): `natbib' support. + Patch by Berwin Turlach <berwin.turlach@anu.edu.au>. + +1997-06-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.8a released. + +1997-06-24 Christoph Wedler <wedler@fmi.uni-passau.de> + + * tex.el (TeX-update-style): `TeX-auto-update' could be unbound. + (TeX-auto-x-parse-length): New variable. Allows to use maximimum + = slow parsing for the beginning of a file and minimum = fast + parsing, e.g., just for labels, for the rest of the file. + (TeX-auto-x-regexp-list): Ditto. + (TeX-auto-parse-region): New function. + (TeX-auto-parse): Use them. + + * tex-buf.el (TeX-region-extra): New variable with a value which + redefines \cite for the region file in order get less + warnings. With value "", this variable has no effect. + (TeX-region-hook): New variable. + (TeX-region-create): Use them. + + * latex.el (LaTeX-indent-line): TeX commands are case sensitive. + (LaTeX-find-matching-end): Would not work correctly with more than + one \end in a line. + (LaTeX-find-matching-begin): Would not work correctly with more + than one \begin in a line. + + (LaTeX-menu-max-items): New variable with value 25. Split menu + if number of entries in a menu is larger than this value. If nil, + never split menu into submenus, which is the behaviour before the + introduction of this variable. + (LaTeX-submenu-name-format): New variable. + (LaTeX-split-long-menu): New function using the two new variables. + (LaTeX-menu-update): Use it. + + (LaTeX-document-regexp): New variable. Texts in environments + other than "document", e.g., "letter", could be without initial + indentation. + (LaTeX-verbatim-regexp): New variable. \begin and \end of + environments other than "verbatim\\*?", e.g., "program", could + start at column 0. + (LaTeX-begin-regexp): New variable similar to `LaTeX-item-regexp'. + Commands other than "begin", e.g, "if", could increase the + indentation. + (LaTeX-end-regexp): New variable similar to `LaTeX-item-regexp'. + Commands other than "end", e.g, "fi", could decrease the + indentation. + (LaTeX-indent-comment-start-regexp): New variable. Would allow + you to correct the automatic indentation with commands in special + comments. + (LaTeX-indent-calculate): Use them. + (LaTeX-indent-level-count): Use them. + (LaTeX-indent-calculate-last): Use them. + + (LaTeX-math-insert-function): New variable. + (LaTeX-math-insert): Use it. + +1997-06-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (TeX-arg-ref): New alias. + (LaTeX-common-initialization): Use it. + Patch by Soren Dayton <csdayton@cs.uchicago.edu>. + +1997-06-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-auto-minimal-regexp-list): Add `usepackage'. + (LaTeX-auto-minimal-regexp-list): Ditto. + Patch by Carsten Dominik <dominik@strw.LeidenUniv.nl>. + + * style/amsmath.el: New file. + * style/amstext.el: New file. + * style/amsbsy.el: New file. + * style/amsopn.el : New file. + * style/amsthm.el: New file. + * Makefile (STYLESRC): Add them. + Files provided by Carsten Dominik <dominik@strw.LeidenUniv.nl>. + +1997-06-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/slovak.el: New file. + * style/czech.el: New file. + * Makefile (STYLESRC): Add them. + Files provided by Milan Zamazal <pdm@fi.muni.cz>. + +1997-04-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7p released. + +1997-04-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Added customize information. + * tex-buf.el: Ditto. + * latex.el: Ditto. + +1997-04-06 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7o released. + +1997-04-06 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-equation-label): New variable. + (LaTeX-eqnarray-label): New variable. + (LaTeX-label): Support `figure*', `label*', `equation', and + `eqnarray'. + (LaTeX-env-figure): Support `table*'. + Patch by Joes Staal <staal@geo.tudelft.nl>. + +1997-03-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-down-section): Doc fix. + (LaTeX-section-heading): Ditto. + (LaTeX-section-title): Ditto. + (LaTeX-env-array): Ditto. + (TeX-braces-user-association): Ditto. + (LaTeX-fill-region-as-paragraph): Ditto. + (LaTeX-math-abbrev-prefix): Ditto. + (LaTeX-math-mode): Ditto. + (TeX-arg-right-insert-p): Ditto. + (latex-mode): Ditto. + +1997-03-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7n released. + +1997-03-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-default): Fix hebrew delimiters. + Patch by John Griffith <griffith@sfs.nphil.uni-tuebingen.de>. + +1997-03-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-209-to-2e): Use `buffer-substring-no-properties'. + Reported by Graham Gough <graham@cs.man.ac.uk>. + +1997-03-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7m released. + +1997-03-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-auto-generate): Only generate when needed. + (TeX-auto-generate-global): Ditto. + Patch by Helmut Geyer <Helmut.Geyer@IWR.Uni-Heidelberg.De>. + + * Makefile (install-contrib): Don't move elc files twice. + Patch by Helmut Geyer <Helmut.Geyer@IWR.Uni-Heidelberg.De>. + +1997-03-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/danish.el: Copied from `style/dk.el'. + * Makefile (STYLESRC): Add `style/danish.el'. + Suggested by Lars Frellesen <frelle@math-tech.dk>. + +1997-03-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7l released. + +1997-03-04 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (some): Don't use `style/*.elc'. + +1997-02-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-electric-macro): Default to space after dot. + +1997-02-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7k released. + +1997-02-26 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-submit-bug-report): Fix address (sunsite, not iesd!). + +1997-02-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7j released. + +1997-02-21 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (some): New target. + Suggested by Steven L Baur <steve@miranova.com>. + +1997-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7i released. + +1997-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el: Removed autoloads that conflicts with `tex-mode.el'. + (TeX-lisp-directory): Default to data-directory. + +1997-02-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7h released. + +1997-02-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-lisp-directory): Remove. + +1997-02-07 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7g released. + +1997-02-06 Karl Eichwalder <ke@ke.Central.DE> + + * Makefile (install-lisp): Don't install $(aucdir)/lpath.el and + $(aucdir)/tex-site.el. + (contrib, install-contrib): New targets. + +1997-01-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-default): uparow -> uparrow. + Reported by Kyeong Soo Kim <kks@baekdu.rgit.wustl.edu>. + +1997-01-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (AUCSRC): Remove `ltx-help.el'. + +1997-01-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7f released. + +1997-01-27 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-label-function): New variable. + (LaTeX-label): New function. + (LaTeX-section-label): Use it. + (LaTeX-env-figure): Ditto. + (LaTeX-env-label): Ditto. + Patch supplied by Carsten Dominik <dominik@strw.LeidenUniv.nl> for + better RevTeX.el support. + + * latex.el (LaTeX-env-figure): Don't insert \leavevmode, at the + request of David Carlisle <carlisle@ma.man.ac.uk>. + +1997-01-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7e released. + +1997-01-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-parse-error): Support LaTeX warnings. Patch by + Frederic Devernay <devernay@istar.fr>. + (TeX-warning): Ditto. + +1997-01-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7d released. + +1997-01-17 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-jp.el: XEmacs 20 support by Soren Dayton + <csdayton@cs.uchicago.edu>. + +1997-01-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (CP): Use `cp -p'. Suggested by Graham Gough + <graham@cs.man.ac.uk>. + + * Version 9.7c released. + +1997-01-08 Per Abrahamsen <abraham@dina.kvl.dk> + + * doc/intro.texi: Spelling fixes by Franklin Chen <chen@adi.com>. + + * tex-buf.el (TeX-shell-command-option): Insitialize from + shell-command-switch. Suggested by Fabio@Colorado.EDU (Fabio + Somenzi). + + * latex.el (LaTeX-mode-menu): Add sans serif. Patch by Ralf + Fassel <ralf@atg.venture.de>. + +1997-01-03 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (install-lisp): Also install `.el' files. Requested by + several people. + +1996-12-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (tex.elc): New entry. + (install-lisp): Use it. Trevor Jim <tjim@saul.cis.upenn.edu> + reported that `make install' wouldn't make the elc files. + +1996-12-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.7b released. + +1996-12-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-run-format): Bind `buffer' before `process' to + avoid side effect. Suggested by Frederic Devernay + <devernay@istar.fr>. + + * Version 9.7a released. + +1996-12-10 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-fill-region-as-para-do): Minimal support for + `sentence-end-double-space'. + +1996-12-09 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.6m released. + +1996-12-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.6l released. + +1996-12-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-jp.el: Patch from IKEMOTO Masahiro + <ikeyan@airlab.cs.ritsumei.ac.jp>. + +1996-11-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.6k released. + +1996-11-22 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-mode-menu): Made `LaTeX-math-mode' a toggle. + +1996-11-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.6j released. + +1996-11-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-common-initialization): Add eqref to + LaTeX-label-list. Suggested by Martin Hagstrom + <martinh@sto.foa.se>. + +1996-11-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-region-create): Disable font lock. Suggested by + several, patch by Christoph Wedler <wedler@fmi.uni-passau.de>. + +1996-11-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-file-extensions): Add "texinfo". + +1996-09-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-mode-map): Do not overwrite standard binding of + `M-g'. + + * tex.el (popup-mode-menu): Run `LaTeX-menu-update' if present. + Workaround for bug reported by Hendrik Visage + <hendrikv@di.denel.co.za> and othors. + + * latex.el (LaTeX-float): Allow nil. + (LaTeX-env-figure): Don't insert float if nil. Feature suggested + by Andre Eickler <eickler@db.fmi.uni-passau.de>. + +1996-09-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * Version 9.6i released. + +1996-09-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-mode-syntax-table): Made `$' have the syntax class + `$' at the suggestion of Mats Bengtsson <matsb@s3.kth.se>. + +1996-08-31 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (TeX-arg-cite): Use `multi-prompt' when asking for + entries. + (TeX-arg-bibliography): Ditto. + +1996-08-29 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile: Simplified installation (I hope). + +1996-08-28 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile: Removed lacheck. + +1996-08-23 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-buf.el (TeX-run-command): Change to master directory before + executing command. + (TeX-region-file): Allow dummy second argument. + (TeX-run-background): Run in master directory. + (TeX-run-interactive): Run in master directory. + + * tex.el (TeX-master-file): Allow second argument `NONDIRECTOPRY'. + (TeX-expand-list): Set second argument `NONDIRECTORY' to file + entries. + (TeX-master-directory): New function. + * tex.el (TeX-auto-write): Write in master directory. + +1996-08-22 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-current-environment): Ignore comments. + Reported by Stephen Eglen <stephene@cogs.susx.ac.uk>. + + * tex.el (TeX-directory-absolute-p): Add `windows-nt'. + + * tex-buf.el (TeX-shell): Add `windows-nt'. + (TeX-shell-command-option): Add `emx' and `windows-nt'. + Reported by Ulrich Poetter <poetter@em.uni-frankfurt.d400.de>. + +1996-08-21 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (VirTeX-common-initialization): Remove duplicate + initialization of `words-include-escapes'. Reperted by Mark Hovey + <hovey@math.mit.edu>. + +1996-08-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (CONTRIB): Add `font-latex.el'. + +1996-07-30 Per Abrahamsen <abraham@dina.kvl.dk> + + * Makefile (aucdir): Change `lib' to `share' per new emacs + conventions. Reported by "Edward J. Huff" + <huffe@carbon.chem.nyu.edu>. + +1996-07-16 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-fill-region-as-para-do): Make sure `.}' gets + two spaces at end of sentence when filling. + +1996-07-15 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-parse-path): Ignore tralining //. Suggested by + Göran Uddeborg <Göran.Uddeborg@carmen.se>. + +1996-05-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * all: Use version number instead of CVS id. + + * tex.el (TeX-mode-map): Don't bind `del'. We aren't supposed to + have any tabs in the first place. + +1996-05-02 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-mark-active, TeX-active-mark) [XEmacs]: The + definition of these two were swapped. Bug reported by + Vladimir Alexiev <vladimir@cs.ualberta.ca>. + +1996-04-25 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-update-style): Don't run parent style hooks for + files that doesn't match `TeX-one-master'. Suggested by many + people. + +1996-04-24 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-close-environment): + Bind `next-line-add-newlines' to t. Patch by Fritz Knabe + <knabe@matecumbe.ing.puc.cl>. + +1996-04-01 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-fill-region-as-para-do): Fill `.}' as a sentence + end. Patch by Fritz Knabe <knabe@matecumbe.ing.puc.cl>. + +1996-03-11 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-cal): Use `\mathcal{}' under LaTeX2e. + Reported by Mate Wierdl <wierdlm@zebra.msci.memphis.edu>. + +1996-03-05 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex-info.el (texinfo-mode): Rely on texinfo.el to provide the + outline regexp. + +1996-02-20 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (TeX-command-menu-queue, TeX-command-menu-queue-entry): + New functions supporting printer queue queries from the menu. + By Ulrik Dickow <dickow@nbi.dk> + (TeX-command-menu-entry): Use them. + +1996-02-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * style/swedish.el: Support for Swedish quotation style by "G\vran + Uddeborg" <gvran@uddeborg.pp.se>. + +1995-12-21 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-default): Add more definitions by Mehmet + Balcilar <MBALCIL@econ.wayne.edu>. + +1995-12-18 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-fill-region-as-paragraph): Remove old version. + (LaTeX-math-menu): Redefined the math mode menu. + +1995-12-14 Per Abrahamsen <abraham@dina.kvl.dk> + + * latex.el (LaTeX-math-menu): New variable. + (LaTeX-mode-menu): Use it. Suggested by Peter S Galbraith + <rhogee@mixing.qc.dfo.ca>. + +1995-11-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el (VirTeX-common-initialization): Set `comment-multi-line' + to nil. + +1995-10-13 Per Abrahamsen <abraham@dina.kvl.dk> + + * PROBLEMS: Some easymenu explanations. + + * tex.el: Require easymenu.el instead of auc-menu.el. + * Makefile (AUCSRC): Remove easymenu.el and auc-menu.el. + (MINMAPSRC): Remove easymenu.el, column.el and cpp.el. + * easymenu.el: File deleted. + * column.el: File deleted. + * cpp.el: File deleted. + + * latex.el (LaTeX-math-insert): Don't check if `TeX-insert-macro' + is defined. + (LaTeX-close-environment): Work better when called on an empty + line. Fixed by David Aspinall <da@dcs.ed.ac.uk>. + +1995-10-12 Per Abrahamsen <abraham@dina.kvl.dk> + + * tex.el ('LaTeX-math-mode): Autoload from latex.el instead of + ltx-math.el. Reported by Richard Brankin <richard@num-alg-grp.co.uk>. + +1995-02-14 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-fill-region-as-paragraph): Should now format \\ + correctly. Patch by michal@ellpspace.math.ualberta.ca (Michal + Jaegermann). + (LaTeX-fill-region-as-para-do): New function. + (LaTeX-fill-region-as-paragraph): Do not fill paragraphs inside + special environments. + +1995-02-12 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-byte-compile): Make it default to nil. + Suggested by michal@ellpspace.math.ualberta.ca (Michal Jaegermann). + + * tex-buf.el (TeX-command-query): Also offer to save files when + started from a menu. Reported by wscoas@win.tue.nl (Anton + A. Stoorvogel). + (TeX-LaTeX-sentinel): Don't suggest BibTeX if there is no + bibliographies. Suggested by Piet van Oostrum <piet@cs.ruu.nl>. + +1995-02-11 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-run-format): Protect against being run from a + different buffer. Patch by Michael Kifer + <kifer@sbkifer.cs.sunysb.edu>. + + * latex.el (LaTeX-math-default): Move `Phi' from V to F in + LaTeX-math-mode. Suggested by dak@ind.rwth-aachen.de (David + Kastrup). + * doc/math-ref.tex: Documented it. + +1995-02-02 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-home-buffer): Add interactive, reported by + edavid@lami.univ-evry.fr. + +1995-02-01 Per Abrahamsen <abraham@iesd.auc.dk> + + * hilit-LaTeX.el: Upgraded to 1.06. + + * Makefile (CONTRIB, EXTRAFILES): Move tex-jp.el to CONTRIB. + +1995-01-27 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-paragraph-commands): Incorrectly placed + parenthesis. Reported by mic@cs.ucsd.edu (Michelangelo Grigni). + +1995-01-26 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-fill-region): Use marker to mark end of region + instead of integer, as the formatting may change the size of the + region. + (LaTeX-common-initialization): Fix bug in paragraph definitions. + Reported by Steve Anderson <anderson@sapir.ling.yale.edu>. + + * tex.el (save-match-data): Add by koba@flab.fujitsu.co.jp + (Kobayashi Shinji). + (bibtex-mode-hook): Don't use add-hook yet. + Reported by koba@flab.fujitsu.co.jp (Kobayashi Shinji). + +1995-01-25 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (change-major-mode-hook): Also clear + `LaTeX-environment-list'. + + * Makefile (AUCSRC): Add `auc-menu.el'. + + * tex.el: Use auc-menu instead of easymenu. + + * tex.el: Inserted comment to mark end of site customization. + Suggested by john@minster.york.ac.uk (John A. Murdie). + + * tex.el (change-major-mode-hook): Forgot a set of parentheses. + Reported by Frederic Devernay <Frederic.Devernay@sophia.inria.fr>. + + * tex-buf.el (TeX-current-pages): Remove extra parentheses. + Reported by mic@cs.ucsd.edu (Michelangelo Grigni). + +1995-01-24 Per Abrahamsen (abraham@iesd.auc.dk) + + * tex.el (change-major-mode-hook): Add workaround for error in + XEmacs 19.11's `kill-all-local-variables'. + +1995-01-23 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-common-initialization): Remove unnecessary + regexp quotes of `TeX-esc'. + + * style/amsart.el: Move `eqref' definition to `style/amstex.el' + and load that style hook. + * style/amstex.el: New file. + * Makefile (STYLESRC): Add it. + Suggested by vb1890@PLAY.CS.NYU.EDU (Victor Boyko). + +1995-01-22 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el, ltx-math.el, Makefile: Integrated `ltx-math.el' in + `latex.el'. + * tex-site.el: Removed autoload for `LaTeX-math-mode'. + +1995-01-19 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (latex-mode): Epoch fix by Martin Sjolin + <marsj@ida.liu.se>. + +1995-01-17 Per Abrahamsen <abraham@iesd.auc.dk> + + * bib-cite.el: New file contributed by Peter S. Galbraith + <rhogee@bathybius.meteo.mcgill.ca>. + + * hilit-LaTeX.el: New file contributed by Peter S. Galbraith + <rhogee@bathybius.meteo.mcgill.ca>. + + * Makefile (CONTRIB): New macro for user contributed emacs lisp + packages, initialized with `bib-cite.el' and `hilit-LaTeX.el'. + (EXTRAFILES): Add $(CONTRIB) to the list. + + * tex.el (TeX-directory-absolute-p): Move definition before + `TeX-macro-private'. Reported by Frederic Devernay + <Frederic.Devernay@sophia.inria.fr>. + + * latex.el (LaTeX-common-initialization): Remove extra and wrong + "\\\\par" from `paragraph-separate'. Bug reported by + nijhof@th.rug.nl (Jeroen Nijhof). + +1995-01-11 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-command-region): Comment fix. Patch by + wlang@rs6000.mri.akh-wien.ac.at (Willi Langenberger). + (TeX-region-create): More outline-mode safe. Patch by + wlang@rs6000.mri.akh-wien.ac.at (Willi Langenberger). + + * Makefile (dist): Put version number in WWW page. + Suggested by several people. + + * latex.el (LaTeX-auto-regexp-list): Ignore first optional + argument to newenvironment if there is a second. Problem reported + by schiotz@ltf.dth.dk (Jakob Schiotz). + + * style/amsbook.el: New file. Problem reported by Denby Wong + <3dw16@qlink.queensu.ca>. + +1995-01-04 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-TeX-sentinel-check): New function. Updates + `TeX-current-page' with regexp by dodd@roebling.poly.edu (Lawrence + R. Dodd) + (TeX-current-pages): New function. + (TeX-LaTeX-sentinel, TeX-TeX-sentinel): Use it. + (TeX-format-filter): Remove unnecessary check before assignment. + +1995-01-03 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-LaTeX-sentinel): Write number of pages even + when labels or citations are missing. Patch by + dodd@roebling.poly.edu (Lawrence R. Dodd). + +1994-12-07 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-directory-absolute-p): New function. Should work on + both Unix and MS DOS. Problem reported by schiotz@ltf.dth.dk + (Jakob Schiotz). + (TeX-parse-path): Use it. + (TeX-auto-generate): Use it. + +1994-12-05 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (BibTeX-auto-store): Set TeX-auto-parse-length to + 999999 locally. Problem reported by Christoph Wedler + <wedler@fmi.uni-passau.de>. + +1994-12-02 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-LaTeX-sentinel): Check whether the ".bbl" file + need to be udpated before setting TeX-command-next to "BibTeX". + (TeX-command-query): Remove previous change. + +1994-11-28 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-209-to-2e): New function by + Graham Gough <graham@cs.man.ac.uk>. + + * latex.el (LaTeX-mode-menu): Move many commands to new + "Miscellaneous" submenu. + + * tex-buf.el (TeX-home-buffer): Don't take arg. + + * latex.el (LaTeX-left-right-indent-level): New variable + controling indentation for \left \right blocks. + (LaTeX-indent-level-count): New function. Previously only LaTeX + macros at the beginning of the line would affect indentation. + This problem was reported by many people. + (LaTeX-indent-calculate-last): Call `LaTeX-indent-level-count'. + Take into account that \end and \right at the beginning of the + line has immediate effect. + +1994-11-27 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (TeX-global-input-files): New variable. Idea and + sample code by Christophe Mignot <Christophe.Mignot@loria.fr>. + (TeX-arg-input-file): Use it. + (BibTeX-global-style-files): Mention how it is reset in + `TeX-normal-mode'. + (BibTeX-global-files): Ditto. + + * tex.el (TeX-normal-mode): Reset `BibTeX-global-style-files', + `BibTeX-global-files', and `TeX-global-input-files' if invoked + with an argument. + + * tex-site.el: Ignore trailing `/' when adding TeX-lisp-directory + to load-path. Patch by Michael Ernst + <mernst@research.microsoft.com>. + + * tex-buf.el (TeX-LaTeX-sentinel): Don't rerun LaTeX on missing + references, unless they have changed. Patch by schiotz@ltf.dth.dk + (Jakob Schiotz). + + * latex.el (LaTeX2e-font-replace): New function. + (LaTeX-common-initialization): Set TeX-font-replace-function to + LaTeX2e-font-replace when using latex2e. + + * tex.el (TeX-font-replace-function): New variable. + (TeX-font): Use it. + + TeX-font-replace-function and LaTeX2e-font-replace were + contributed by Peter Thiemann + <thiemann@provence.informatik.uni-tuebingen.de>. + + +1994-11-22 Per Abrahamsen <abraham@iesd.auc.dk> + + * MSDOS: Added. Contributed by schiotz@ltf.dth.dk (Jakob + Schiotz). + + * OEMACS: Removed. + + * tex.el (VirTeX-common-initialization): + Make `words-include-escapes' a local variable before setting it. + Reported by Bo Nygaard Bai <bai@iesd.auc.dk>. + +1994-11-15 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-auto-store): Change to functions that prevent the + auto file buffer from entering emacs-lisp-mode. + (TeX-auto-insert): Don't rely on emacs-lisp-mode for indentation. + Suggested by Stefan Schöf (schoef@informatik.uni-oldenburg.de). + +1994-11-11 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-macro-global): Change to `standard' path. + +1994-11-09 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex-buf.el (TeX-command-query): Suggest TeX-command-default + again if bbl file is newer than dvi file. + +1994-11-07 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-submit-bug-report): Indicate LaTeX-version. + Suggested by schiotz@ltf.dth.dk (Jakob Schiotz). + +1994-10-26 Per Abrahamsen <abraham@iesd.auc.dk> + + * Makefile (dist): Automatically update AUC-TeX-version and + AUC-TeX-date in tex.el + + * tex.el (AUC-TeX-version): Add AUC-TeX-version and + AUC-TeX-date from auc-ver.el. + + * auc-ver.el: File removed. + + * tex.el: Added version specific code from seperate files. + + * tex-19.el, tex-18.el, tex-lcd.el: Files removed. + +1994-10-25 Per Abrahamsen <abraham@iesd.auc.dk> + + * doc/auc-tex.texi (Projects): Remove an implemented item. + + * tex.el (TeX-command-current): New variable. + (TeX-command-select-master): New function. + (TeX-command-select-buffer): New function. + (TeX-command-select-region): New function. + (TeX-command-menu): Use TeX-command-current instead of explicit + file argument. + (TeX-command-menu-print): Remove file argument. + (TeX-command-menu-printer-entry): Don't pass file argument. + (TeX-command-create-menu): Remove. + (TeX-mode-menu): New menu. + (plain-TeX-mode-menu): Remove entries now in TeX-mode-menu. + (plain-TeX-mode-menu): Use `toggle' for bad boxes. + (plain-TeX-common-initialization): Enable TeX-mode-menu. + + * latex.el (LaTeX-mode-menu): Remove entries now in + TeX-mode-menu. + (LaTeX-mode-menu): Use `toggle' for bad boxes. + (LaTeX-common-initialization): Enable TeX-mode-menu. + + * tex-info.el (TeXinfo-command-menu): New menu. + (TeXinfo-mode-menu): Move commands to new menu. + (TeXinfo-mode-menu): Use `toggle' for bad boxes. + (texinfo-mode): Enable TeXinfo-command-menu. + +1994-10-24 Per Abrahamsen <abraham@iesd.auc.dk> + + * Makefile (AUCSRC): Remove auc-menu.el from AUC TeX distribution. + (MINMAPSRC): Add easymenu.el temporarily to min-map distribution. + + * auc-menu.el: Just load easymenu.el when using GNU Emacs. + + * easymenu.el Try to use RMS's easymenu instead of auc-menu. + (easy-menu-define): Call `easy-menu-do-define' to do + the real work. Document XEmacs keyword arguments. + (easy-menu-do-define): New function. + (easy-menu-create-keymaps): Support XEmacs keyword arguments in + menu definition. + (easy-menu-remove): Make is a function instead of a macro. + (easy-menu-add): Ditto. + +1994-10-21 Per Abrahamsen <abraham@iesd.auc.dk> + + * doc/auc-tex.texi (Completion): Less confusing BibTeX advice, I hope. + + * tex-jp.el: Added patch from koba@flab.fujitsu.co.jp (Kobayashi + Shinji). + + * latex.el (TeX-arg-insert-braces): Have \left and \right on + different lines. Patch by thiemann@informatik.uni-tuebingen.de + (Peter Thiemann). + + * Makefile (dist): Add CHANGES and ChangeLog files to the ftp + directory. Suggested by Frederic Devernay + <Frederic.Devernay@sophia.inria.fr>. + + * latex.el (LaTeX-indent-calculate): Allow nil second element in + `LaTeX-indent-environment-list'. + (LaTeX-indent-environment-list): Add special environments + suggested by thiemann@informatik.uni-tuebingen.de (Peter + Thiemann). + +1994-10-20 Per Abrahamsen <abraham@iesd.auc.dk> + + * tex.el (TeX-auto-list-information): Spelling error. + +1994-10-18 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-common-initialization): Make "LaTeX2e" the + default command if you have set `LaTeX-version' to "2" and is + using "\documentclass". + +1994-10-06 Per Abrahamsen <abraham@iesd.auc.dk> + + * latex.el (LaTeX-paragraph-commands): End each word with a "\\b" + to avoid accidentally matching longer macros. + + * tex.el (TeX-add-local-master): Use three %'s when adding buffer + local variables. Suggested by Raymond Toy <toy@rtp.ericsson.se>. + + * tex.el (TeX-format-list): Add entry for AmSTeX by Ulf Juergens + <ulf@Mathematik.Uni-Bielefeld.DE>. + + * tex.el (ams-tex-mode): Run AmS-TeX-mode-hook, not + plain-TeX-mode-hook. Reported by Ulf Juergens + <ulf@Mathematik.Uni-Bielefeld.DE>. + + * tex-buf.el (TeX-format-filter): Add `save-match-data'. Patch by + David Aspinall <da@dcs.edinburgh.ac.uk>. + +1994-09-14 Per Abrahamsen <abraham@iesd.auc.dk> + + * cpp.el: Use RMS's version. + +1994-09-13 Per Abrahamsen <abraham@iesd.auc.dk> + + * doc/history.texi, doc/auc-tex.texi: Fixes from Chris Fearnley + <@vm.uni-c.dk:FEARNLCJ@DUVM>. + +1994-09-09 Per Abrahamsen <abraham@research.att.com> + + * latex.el (LaTeX-insert-environment): Don't fill environments + listed in `LaTeX-indent-environment-list'. Suggestion by Graham + Gough <graham@cs.man.ac.uk>. + + * tex.el (LaTeX-command-style): Made latex2e first in the list. + Suggested by Frederic Devernay <Frederic.Devernay@sophia.inria.fr>. + +1994-09-05 Per Abrahamsen <abraham@research.att.com> + + * tex.el (TeX-file-extensions): Add LaTeX2 `cls' extension after + query by jmv@di.uminho.pt (Jose Manuel Valenca). + +1994-08-30 Per Abrahamsen <abraham@research.att.com> + + * tex-jp.el: New version from koba@flab.fujitsu.co.jp (Kobayashi + Shinji). + + * tex.el (TeX-command-list): Fifth element is now ignored. + + * tex-buf.el (TeX-command-query): Check if region file is newer + than dvi file. + (TeX-command-region): Only query for command _after_ region file + is created. + (TeX-region-create): Only save file if the new content is + different than the original content. + +1994-08-29 Per Abrahamsen (abraham@research.att.com) + + * tex-buf.el (TeX-warning): Use offset for line end. Fixed by + ddw2@sunbim.be (Dominique de Waleffe). + +1994-08-26 Per Abrahamsen (abraham@iesd.auc.dk) + + * doc/auc-tex.texi (Projects): Remove preceding item from + wishlist. + + * latex.el (LaTeX-common-initialization): Fix to comments + separating paragraphs by koba@flab.fujitsu.co.jp (Kobayashi + Shinji). + + * tex-jp.el (LaTeX-fill-region-as-paragraph): New version for MULE + 2.0 by Tomotake FURUHATA <furuhata@trl.ibm.co.jp>. + + * tex.el (TeX-function-p): Spelling error in doc. + +1994-08-23 Per Abrahamsen (abraham@iesd.auc.dk) + + * doc/intro.texi (Contacts): Some reformulations. + +1994-08-21 Per Abrahamsen (abraham@iesd.auc.dk) + + * tex-jp.el (TeX-insert-punctuation): Japanese version from + koba@flab.fujitsu.co.jp (Kobayashi Shinji). + +1994-08-19 Per Abrahamsen (abraham@iesd.auc.dk) + + * doc/install.texi: The `site-lisp' directory is also available in + Lucide Emacs 19.10. Reported by Tim Geisler + <geisler@pms.informatik.uni-muenchen.de>. + +1994-08-18 Per Abrahamsen (abraham@iesd.auc.dk) + + * latex.el (TeX-arg-cite): Prompt for multiple keys. + Suggested by Masahiro Kitagawa <kitagawa@ee.es.osaka-u.ac.jp>. + +1994-08-17 Per Abrahamsen (abraham@iesd.auc.dk) + + * style/german.el ("german"): Use `TeX-quote-after-quote'. + Suggested by te@informatik.uni-hannover.de (Thomas Esser). + + * latex.el (LaTeX-common-initialization): Error in regexp for + multiple arguments to `\cite', reported by Masahiro Kitagawa + <kitagawa@ee.es.osaka-u.ac.jp>. + +1994-08-17 Per Abrahamsen (abraham@iesd.auc.dk) + + * latex.el (LaTeX-env-figure): Put caption inside center + environment. Suggested by Martin Wunderli <wunderli@inf.ethz.ch>. + + * tex.el (TeX-strip-extension): If NODIR is set to `path', remove + the directory part iff it is equal to the current directory, or is + a member of either `TeX-macro-global' or `TeX-macro-private'. + (TeX-master-file): Use `path' for NODIR when querying the user for + a file name. Reported finger@brachio.Informatik.Uni-Dortmund.DE + (Bernd Finger). + +1994-08-16 Per Abrahamsen (abraham@iesd.auc.dk) + + * latex.el (LaTeX-common-initialization): `eqnarray*' should not + have a label. Reported by dodd@roebling.poly.edu (Lawrence R. + Dodd). + +1994-08-11 Per Abrahamsen (abraham@iesd.auc.dk) + + * tex-buf.el (TeX-background-filter): Always show background + output. + +1994-08-10 Per Abrahamsen (abraham@iesd.auc.dk) + + * Makefile (MINMAPSRC): Add `all.el'. + + * all.el: New file. + + * tex-buf.el (TeX-LaTeX-sentinel): Write "some" if + TeX-current-page is nil. Reported by Michail Rozman + <roz@physik.uni-ulm.de>. + +1994-08-09 Per Abrahamsen (abraham@iesd.auc.dk) + + * auc-menu.el (easy-menu-add): Undid previous change. + (top level `cond'): Use Emacs 18 code if `window-system' is nil. + Patch by Patrice Belleville <patrice@cs.sfu.ca>. + +1994-08-08 Per Abrahamsen (abraham@iesd.auc.dk) + + * tex.el (TeX-electric-macro): No electricity after `.' or `\'. + +1994-08-06 Per Abrahamsen (abraham@iesd.auc.dk) + + * latex.el (LaTeX-paragraph-commands): New variable. + (LaTeX-common-initialization): Use it. + Suggested by liyuan@allwise.research.att.com (Yuan P. Li). + + * auc-menu.el (easy-menu-add): Check that `x-popup-menu' is bound + and that we are running under X before calling it. + Reported by Adrian F. Clark <alien@essex.ac.uk> + +1994-08-04 Per Abrahamsen (abraham@iesd.auc.dk) + + * tex-jp.el (LaTeX-fill-region-as-paragraph): Patch for Emacs 19 + regexps by koba@flab.fujitsu.co.jp (Kobayashi Shinji) reported by + Uenami Ken'ichi <uenami@rita.cow.melco.co.jp>. + + * doc/auc-tex.texi (European): Mention `iso-cvt.el' as suggested + by mike@vlsivie.tuwien.ac.at (Michael Gschwind). + +1994-08-03 Per Abrahamsen (abraham@iesd.auc.dk) + + * doc/history.texi: New file. + + * doc/Makefile (HISTORY): Add rule. + + * Makefile (EXTRAFILES): Add `ChangeLog'. + (DOCFILES): Add `history.texi'. + + * doc/auc-tex.texi (History): Made ready for 9.2. Move history to + `history.texi'. + + * doc/changes.texi: Made ready for 9.2. Introduce ChangeLog. + + * Makefile (LispInstall): Use "/bin/pwd" instead of "pwd". + reported by mic@cs.ucsd.edu (Michelangelo Grigni). + + * ChangeLog: New file. + + * Version 9.1 released. + +This file records repository revisions from +commit c865982cacab289f4480f9145b3438ec06824232 (exclusive) to +commit 8eb3cccba9f0085e5d4d1d734abcb9d1dcbf6169 (inclusive). + +;; Local Variables: +;; coding: utf-8 +;; End: + + Copyright (C) 1994-2016 Free Software Foundation, Inc. + + This file is part of GNU AUCTeX. + + GNU AUCTeX is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GNU AUCTeX is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU AUCTeX. If not, see <http://www.gnu.org/licenses/>. diff --git a/elpa/auctex-13.1.3/GNUmakefile b/elpa/auctex-13.1.3/GNUmakefile new file mode 100644 index 0000000..ee77918 --- /dev/null +++ b/elpa/auctex-13.1.3/GNUmakefile @@ -0,0 +1,93 @@ +# Rules to generate the files that need to go into the ELPA package. + +# Files we need to auto-generate: +# dir +# auctex.info +# preview-latex.info +# README +# ChangeLog +# auctex.el (or auctex-pkg.el)? +# tex-site.el +# doc: preview-dtxdoc.texi +# doc: version.texi +# latex: prauctex.cfg +# latex: prauctex.def +# latex: prcounters.def +# latex: preview.sty +# latex: prfootnotes.def +# latex: prlyx.def +# latex: prshowbox.def +# latex: prshowlabels.def +# latex: prtightpage.def +# latex: prtracingall.def + + +MAKEINFO=makeinfo +INSTALL_INFO=install-info +PERL=perl + +MANUALS=auctex preview-latex +INFO_FILES=$(MANUALS:=.info) + +TEXMFGEN:=$(shell sed -n 's/^%<installer>.*file[{]\([^}.]*\.[sdc][tef][yfg]\)[}].*/\1/p' latex/preview.dtx) +LATEX_FILES:=$(patsubst %, latex/%, $(shell echo $$(echo "$(TEXMFGEN)"))) + +GENERATED_FILES=dir \ + $(INFO_FILES) \ + README \ + tex-site.el \ + doc/version.texi \ + doc/preview-dtxdoc.texi \ + $(LATEX_FILES) + +all: $(GENERATED_FILES) + +# We want the tex-site.el target to be always run so that the version +# (especially the release version grabbed from the top of the git +# log/ChangeLog) is correct. +.PHONY: tex-site.el + +clean: + rm -f $(GENERATED_FILES) + +# Copied&adapted from doc/Makefile.in. +MAKEINFO_PLAIN=$(MAKEINFO) -D rawfile --no-headers +README: doc/intro.texi doc/preview-readme.texi doc/macros.texi + (cd doc; $(MAKEINFO_PLAIN) intro.texi --output -) >$@ + (cd doc; $(MAKEINFO_PLAIN) preview-readme.texi --output -) >> $@ + +# Commands copied&adapted from autogen.sh and doc/Makefile.in. +IGNORED:=$(shell rm -f ChangeLog && ./build-aux/gitlog-to-auctexlog && cat ChangeLog.1 >> ChangeLog) +AUCTEXDATE:=$(shell LANG=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog) +THISVERSION:=$(shell sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' ChangeLog) +LASTVERSION:=$(shell sed -n '/.*Version .* released\./{s/.*Version \(.*\) released\..*/\1/p;q}' ChangeLog) +AUCTEXVERSION:=$(if $(THISVERSION),$(THISVERSION),$(LASTVERSION).$(AUCTEXDATE)) + +tex-site.el: tex-site.el.in + sed -e 's|@lisppackagelispdir@|(file-name-directory load-file-name)|'\ + -e 's|@lisppackagedatadir@|(file-name-directory load-file-name)|'\ + -e 's|@lispautodir@|(if (file-writable-p "/usr/local/var/auctex") "/usr/local/var/auctex" "~/.emacs.d/auctex")|'\ + -e 's|@AUCTEXVERSION@|$(AUCTEXVERSION)|'\ + -e 's|@AUCTEXDATE@|$(AUCTEXDATE)|'\ + $< >$@ + +doc/version.texi: ChangeLog + echo @set VERSION $(AUCTEXVERSION) >$@ + echo @set UPDATED $(AUCTEXDATE) >>$@ + +# Copied&adapted from doc/Makefile.in. +doc/preview-dtxdoc.texi: latex/preview.dtx doc/preview-dtxdoc.pl + $(PERL) doc/preview-dtxdoc.pl latex/preview.dtx $@ + +# Copied&adapted from doc/Makefile.in. +TEXI_SOURCES:=$(wildcard doc/*.texi) doc/version.texi doc/preview-dtxdoc.texi +$(INFO_FILES): %.info: $(TEXI_SOURCES) + cd doc; $(MAKEINFO) --no-split $*.texi + mv doc/$*.info $@ + +dir: $(INFO_FILES) + for f in $(INFO_FILES); do $(INSTALL_INFO) --info-dir=. $$f; done + +$(LATEX_FILES): latex/preview.dtx latex/bootstrap.ins + cd latex; $(TEX) '\nonstopmode \input bootstrap.ins' + cd latex; $(TEX) '\nonstopmode \input preview-mk.ins' diff --git a/elpa/auctex-13.1.3/README b/elpa/auctex-13.1.3/README new file mode 100644 index 0000000..d462bfb --- /dev/null +++ b/elpa/auctex-13.1.3/README @@ -0,0 +1,240 @@ +This is the README file for the AUCTeX distribution. + + Copyright (C) 2008, 2017, 2018 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without + modification, are permitted in any medium without royalty provided + the copyright notice and this notice are preserved. + +Introduction to AUCTeX +********************** + +This file gives a brief overview of what AUCTeX is. It is *not* an +attempt to document AUCTeX. Real documentation for AUCTeX is available +in the manual, which should be available as an info file after +installation. + +AUCTeX is a comprehensive customizable integrated environment for +writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using +Emacs. + +It supports you in the insertion of macros, environments, and sectioning +commands by providing completion alternatives and prompting for +parameters. It automatically indents your text as you type it and lets +you format a whole file at once. The outlining and folding facilities +provide you with a focused and clean view of your text. + +AUCTeX lets you process your source files by running TeX and related +tools (such as output filters, post processors for generating indices +and bibliographies, and viewers) from inside Emacs. AUCTeX lets you +browse through the errors TeX reported, while it moves the cursor +directly to the reported error, and displays some documentation for that +particular error. This will even work when the document is spread over +several files. + +One component of AUCTeX that LaTeX users will find attractive is +preview-latex, a combination of folding and in-source previewing that +provides true "What You See Is What You Get" experience in your +sourcebuffer, while letting you retain full control. For more +information, see further below. + +More detailed information about the features and usage of AUCTeX can be +found in the AUCTeX manual. You can access it from within Emacs by +typing 'C-h i d m auctex <RET>'. If you prefer the standalone info +reader, issue the command 'info auctex' in a terminal. + +AUCTeX is written entirely in Emacs Lisp, and hence you can easily add +new features for your own needs. It is a GNU project and distributed +under the 'GNU General Public License Version 3'. + +The most recent version is always available at +<https://ftp.gnu.org/pub/gnu/auctex/>. + +WWW users may want to check out the AUCTeX page at +<https://www.gnu.org/software/auctex/>. + +For comprehensive information about how to install AUCTeX read the file +'INSTALL' or 'INSTALL.windows', respectively. + +If you are considering upgrading AUCTeX, the recent changes are +described in the 'CHANGES' file. + +If you want to discuss AUCTeX with other users or its developers, there +are several mailing lists you can use. + +Send a mail with the subject "subscribe" to <auctex-request@gnu.org> in +order to join the general discussion list for AUCTeX. Articles should +be sent to <auctex@gnu.org>. In a similar way, you can subscribe to the +<info-auctex@gnu.org> list for just getting important announcements +about AUCTeX. The list <bug-auctex@gnu.org> is for bug reports which +you should usually file with the 'M-x TeX-submit-bug-report <RET>' +command. If you want to address the developers of AUCTeX themselves +with technical issues, they can be found on the discussion list +<auctex-devel@gnu.org>. +preview-latex in a nutshell +*************************** + +Does your neck hurt from turning between previewer windows and the +source too often? This AUCTeX component will render your displayed +LaTeX equations right into the editing window where they belong. + +The purpose of preview-latex is to embed LaTeX environments such as +display math or figures into the source buffers and switch conveniently +between source and image representation. + +1 What use is it? +***************** + +WYSIWYG (what you see is what you get) sometimes is considered all the +rage, sometimes frowned upon. Do we really want it? Wrong question. +The right question is _what_ we want from it. Except when finetuning +the layout, we don't want to use printer fonts for on-screen text +editing. The low resolution and contrast of a computer screen render +all but the coarsest printer fonts (those for low-quality newsprint) +unappealing, and the margins and pagination of the print are not wanted +on the screen, either. On the other hand, more complex visual +compositions like math formulas and tables can't easily be taken in when +seen only in the source. preview-latex strikes a balance: it only uses +graphic renditions of the output for certain, configurable constructs, +does this only when told, and then right in the source code. Switching +back and forth between the source and preview is easy and natural and +can be done for each image independently. Behind the scenes of +preview-latex, a sophisticated framework of other programs like +'dvipng', Dvips and Ghostscript are employed together with a special +LaTeX style file for extracting the material of interest in the +background and providing fast interactive response. + +2 Activating preview-latex +************************** + +After installation, the package may need to be activated (and remember +to activate AUCTeX too). If preview-latex is installed via the Emacs +package manager (ELPA), activation should be automatic upon +installation. + +The usual activation (if it is not done automatically) would be + + (load "preview-latex.el" nil t t) + +If you still don't get a "Preview" menu in LaTeX mode in spite of AUCTeX +showing its "Command", your installation is broken. One possible cause +are duplicate Lisp files that might be detectable with 'M-x +list-load-path-shadows <RET>'. + +3 Getting started +***************** + +Once activated, preview-latex and its documentation will be accessible +via its menus (note that preview-latex requires AUCTeX to be loaded). +When you have loaded a LaTeX document (a sample document 'circ.tex' is +included in the distribution, but most documents including math and/or +figures should do), you can use its menu or 'C-c C-p C-d' (for +'Preview/Document'). Previews will now be generated for various objects +in your document. You can use the time to take a short look at the +other menu entries and key bindings in the 'Preview' menu. You'll see +the previewed objects change into a roadworks sign when preview-latex +has determined just what it is going to preview. Note that you can +freely navigate the buffer while this is going on. When the process is +finished you will see the objects typeset in your buffer. + +It is a bad idea, however, to edit the buffer before the roadworks signs +appear, since that is the moment when the correlation between the +original text and the buffer locations gets established. If the buffer +changes before that point of time, the previews will not be placed where +they belong. If you do want to change some obvious error you just +spotted, we recommend you stop the background process by pressing 'C-c +C-k'. + +To see/edit the LaTeX code for a specific object, put the point (the +cursor) on it and press 'C-c C-p C-p' (for 'Preview/at point'). It will +also do to click with the middle mouse button on the preview. Now you +can edit the code, and generate a new preview by again pressing 'C-c C-p +C-p' (or by clicking with the middle mouse button on the icon before the +edited text). + +If you are using the 'desktop' package, previews will remain from one +session to the next as long as you don't kill your buffer. + +4 Basic modes of operation +************************** + +preview-latex has a number of methods for generating its graphics. Its +default operation is equivalent to using the 'LaTeX' command from +AUCTeX. If this happens to be a call of PDFLaTeX generating PDF output +(you need at least AUCTeX 11.51 for this), then Ghostscript will be +called directly on the resulting PDF file. If a DVI file gets produced, +first Dvips and then Ghostscript get called by default. + +The image type to be generated by Ghostscript can be configured with + + M-x customize-option <RET> preview-image-type <RET> + +The default is 'png' (the most efficient image type). A special setting +is 'dvipng' in case you have the 'dvipng' program installed. In this +case, 'dvipng' will be used for converting DVI files and Ghostscript +(with a 'PNG' device) for converting PDF files. 'dvipng' is much faster +than the combination of Dvips and Ghostscript. You can get downloads, +access to its CVS archive and further information from its project site +(https://savannah.nongnu.org/projects/dvipng). + +5 More documentation +******************** + +After the installation, documentation in the form of an info manual will +be available. You can access it with the standalone info reader with + + info preview-latex + +or by pressing 'C-h i d m preview-latex <RET>' in Emacs. Once +preview-latex is activated, you can instead use 'C-c C-p <TAB>' (or the +menu entry 'Preview/Read documentation'). + +Depending on your installation, a printable manual may also be available +in the form of 'preview-latex.pdf'. + +Detailed documentation for the LaTeX style used for extracting the +preview images is placed in 'preview.pdf' in a suitable directory during +installation; on typical TeX Live-based systems, + + texdoc preview + +will display it. + +6 Availability +************** + +The preview-latex project is now part of AUCTeX and accessible as part +of the AUCTeX project page (https://savannah.gnu.org/projects/auctex). +You can get its files from the AUCTeX download area +(https://ftp.gnu.org/pub/gnu/auctex/). As of AUCTeX 11.81, +preview-latex should already be integrated into AUCTeX, so no separate +download will be necessary. + +Anonymous Git is available at <git://git.savannah.gnu.org/auctex.git> or +<https://git.savannah.gnu.org/git/auctex.git>. You can also browse the +repository (https://git.savannah.gnu.org/cgit/auctex.git) via web +interface. + +7 Contacts +********** + +Bug reports should be sent by using 'M-x preview-report-bug <RET>', as +this will fill in a lot of information interesting to us. If the +installation fails (but this should be a rare event), report bugs to +<bug-auctex@gnu.org>. + +There is a general discussion list for AUCTeX which also covers +preview-latex, look at <https://lists.gnu.org/mailman/listinfo/auctex>. +For more information on the mailing list, send a message with just the +word "help" as subject or body to <auctex-request@gnu.org>. For the +developers, there is the <auctex-devel@gnu.org> list; it would probably +make sense to direct feature requests and questions about internal +details there. There is a low-volume read-only announcement list +available to which you can subscribe by sending a mail with "subscribe" +in the subject to <info-auctex-request@gnu.org>. + +Offers to support further development will be appreciated. If you want +to show your appreciation with a donation to the main developer, you can +do so via PayPal to <dak@gnu.org>, and of course you can arrange for +service contracts or for added functionality. Take a look at the 'TODO' +list for suggestions in that area. diff --git a/elpa/auctex-13.1.3/RELEASE b/elpa/auctex-13.1.3/RELEASE new file mode 100644 index 0000000..b254389 --- /dev/null +++ b/elpa/auctex-13.1.3/RELEASE @@ -0,0 +1,229 @@ +Release notes for AUCTeX 13.1 with preview-latex +================================================ + +AUCTeX provides by far the most wide-spread and sophisticated +environment for editing LaTeX, TeX, ConTeXt and Texinfo documents with +Emacs. Combined with packages like RefTeX, flyspell and others it is +pretty much without peer as a comprehensive authoring solution for a +large variety of operating system platforms and TeX distributions. It +supports document-dependent completion and syntax highlighting, easily +accessible menus, jumping to error locations in the source file, a +number of editing shortcuts, intelligent indentation and filling of +text during entry, and WYSIWYG previews of graphical elements like +math formulas right in the Emacs source buffer, by virtue of its +preview-latex component. + +One part of the preview-latex subsystem is the central `preview.sty' +file that is independently useful for a number of applications and is +available in unbundled form from CTAN.[1] + +AUCTeX needs volunteers in particular for non-programming tasks: +documentation writing, tutorials, translations, reference material, +sleuth work, testing. + +New features and fixed bugs in this release +------------------------------------------- + +In math environments 'gather', 'gather*', 'gathered', 'multline' +and 'multline*', fill commands such as 'M-q' and 'C-c C-q C-e' are +disabled. This sorts out the inconsistency between those and +'equation', 'displaymath' environments, in latter of which filling +is already disabled. + +If you want filling in such environments, customize +'LaTeX-indent-environment-list' to remove them. + +Auto fill continues to work in such environment anyway. + +In addition, AUCTeX adds support of alignment at '&' sign in +'align'-like environments such as 'alignat', 'aligned' and so on, +as well as 'matrix'-like environments such as 'pmatrix', 'bmatrix' +and so on. + +Now two commands 'Texindex' and 'Texi2dvi' are available when you +type 'C-c C-c' in Texinfo mode. The command 'Texindex' runs +'texindex' on index files and 'Texi2dvi' runs 'pdftexi2dvi' or +'texi2dvi' according to the value of 'TeX-PDF-mode'. + +So you can typeset Texinfo documents into PDF or DVI format from +within AUCTeX. + +AUCTeX's own help messages for LaTeX errors are now shown only for +LaTeX runs. AUCTeX shows raw error/warning messages found in +'.log' files for runs of formats other than LaTeX, such as plain +TeX, ConTeXt and Texinfo, as it does even for LaTeX runs when it +can't find a matching entry in its own help message catalogue. + +Due to this change, customize option 'TeX-error-description-list' +can no longer have a fallback entry that matches any error. If +your customized value includes such entry, typically '(".*" . "No +help available")', please remove it. + +Two functions 'TeX-split-string' and 'TeX-assoc' are now obsolete +and will be removed in future release. If your personal code uses +these functions, use 'split-string' and 'assoc-string' instead. + +The function 'TeX-read-key-val' now accepts a function call as +second argument. This change should help AUCTeX style writers who +use 'TeX-arg-key-val' and have to deal with dynamic key-values. +Example of usage: + (TeX-add-style-hook "foo" + (lambda () + (TeX-add-symbols + '("bar" (TeX-arg-key-val (function-returning-key-val)))))) + +Since AUCTeX 12.2, 'C-x C-w' accidentally disabled the parse on +save in that buffer, even when you enabled 'TeX-auto-save' option. +This bug was fixed. + +AUCTeX now requires GNU Emacs 24.3 or higher. + +Old implementations for viewers were discarded, as announced long +before. The variables 'TeX-output-view-style' and 'TeX-view-style' +have no effect now. The former placeholders '%v' and '%vv' in +'TeX-command-list' are ignored. + +AUCTeX now uses lexical binding which has been introduced in Emacs +24. This change should have no user-visible effect and require no +manual adaptions except in the following cases. + + - Entries added to the customization variable 'TeX-expand-list' + also had access to variables 'command' and 'pos'. Those are + now properly declared and named 'TeX-expand-command' and + 'TeX-expand-pos'. + + - Entries added to the customization variable 'TeX-expand-list' + had access to a variable 'file' which was bound to + 'TeX-active-master', i.e., it evaluated to either the master + or region file. This usage must be replaced with either + 'TeX-active-master' or 'TeX-active-master-with-quotes'. + + - Viewer entries in 'TeX-view-program-list' also had access to a + variable 'file' which was bound to the name of the master or + region file without extension. Instead, the function + 'TeX-active-master' has to be used now. + + - Macro argument parsing functions could set a variable + 'exit-mark' to the buffer position where point should be left + after all arguments have been read. This variable is now + named 'TeX-exit-mark'. + + - The functions in 'LaTeX-section-hook' had access or modified + the previously undeclared variables 'title', 'name', 'level', + 'done-mark', and 'toc'. These variables are now properly + declared and have the 'LaTeX-' prefix, e.g., + 'LaTeX-done-mark'. + + - The functions in 'ConTeXt-numbered-section-hook' and + 'ConTeXt-unnumbered-section-hook' had access or modified the + previously undeclared variables 'title', 'name', 'level', + 'done-mark', and 'reference'. These variables are now + properly declared and have the 'ConTeXt-' prefix, e.g., + 'ConTeXt-title'. + + - The functions in 'TeX-translate-location-hook' could access + and modify the free variables 'file', 'line', 'error', + 'offset', 'context', and 'string'. Those are now properly + declared variables with the prefix 'TeX-translate-location-', + e.g., 'TeX-translate-location-file'. + +The constant 'LaTeX-dialect' has been renamed to 'TeX-dialect' and +moved from 'latex.el' to 'tex.el'. 'LaTeX-dialect' now is an +obsolete alias. + +The style 'latexinfo.el' is removed from AUCTeX. 'latexinfo.el' +was meant to support latexinfo which in return was a LaTeX-2.09 +extension of Texinfo, but didn't manage to replace Texinfo. + +The style 'siunitx.el' is updated to support package version 3. +Key-value options provided by older package versions are removed, +deprecated macros and units are not supported anymore. + +AUCTeX has preliminary support for LaTeX-hooks. Hooks provided by +LaTeX kernel are known and available for completion in +'\AddToHook', '\RemoveFromHook' and '\AddToHookNext'. + +AUCTeX is now able to place all generated output files, including +those that are produced by applications running under AUCTeX, +temporary files related to region processing and preview-latex +files, in an output directory. To use this feature, set the new +user option 'TeX-output-dir' to the absolute path of the output +directory or a relative path which would be interpreted as being +relative to the master file in a multifile document. + +Note that this feature doesn't work if the document includes sub +file placed in sub directory below the main file via '\include' +command. + +Many other bugs were fixed. + +Requirements +------------ + +It is required that you use at least GNU Emacs 24.3. + +The preview-latex subsystem requires image support. + +You'll also need a working LaTeX installation and Ghostscript. +dvipng[2] (version 1.4 or later), a very fast DVI converter, can be +used to speed up the conversion. + +Availability +------------ + +The easiest way for getting AUCTeX is installing it with GNU ELPA, see +<URL:https://elpa.gnu.org/packages/auctex.html> for more information. +Other download options are available at +<URL:https://ftp.gnu.org/gnu/auctex/>. At release time, we provide the +source tarball. You can also use versions of Emacs that already +include AUCTeX or a software package management system for your +operating system which provides you with the latest release. + +A separate directory for each release contains some stuff from the +tarball, such as ChangeLog, printable manuals, and a reference sheet. +The download area is mirrored to the directory support/auctex on CTAN. +AUCTeX is licensed under the GNU General Public License version 3. + +You'll find more information at the web site of AUCTeX +<URL:https://www.gnu.org/software/auctex/>, including its mailing list +addresses. + +Future development and additional information +--------------------------------------------- + +AUCTeX is proceeding as a GNU project with the long-term intent of +merging it into Emacs. For that reason, all new contributors need to +assign copyright to their contributions to the FSF (the usual +procedure for Emacs contributors). The same holds for past +contributors. The principal authors and maintainers have already done +so, but it would require a diligent and diplomatic volunteer to find +and ask the rest. + +Current AUCTeX managers are Arash Esbati, Mos Giordano, and Tassilo +Horn. Everybody is welcome to contribute to the project by reporting +bugs and suggesting improvements, but the most effective way of +helping AUCTeX development remains volunteering for tasks. + +The following people contributed to this release series (in +alphabetical order): Ivan Andrus, Ralf Angeli, Masayuki Ataka, +Mohammad Hossein Bateni, Fabrice Ben Hamouda, Thomas Baumann, Vincent +Belache, Berend de Boer, Alex Branham, Uwe Brauer, Ken Brown, Joshua +Buhl, Jean-Franois Burnol, Patrice Dumas, Arash Esbati, Werner Fink, +Miguel Frasson, Peter S. Galbraith, Mos Giordano, Andrea Greselin, +Patrick Gundlach, Abdul-Lateef Haji-Ali, Jobst Hoffmann, Tassilo Horn, +Yvon Hevel, Orlando Iovino, Mads Jensen, Arne Jrgensen, Philip +Kaludercic, David Kastrup, Ikumi Keita, Philip Kime, Oleh Krehel, +Joost Kremers, Frank Kster, Jan-ke Larsson, Matthew Leach, Brian +Leung, Antoine Levitt, Leo Liu, Vladimir Lomov, Stefan Monnier, Dan +Nicolaescu, Piet van Oostrum, Pieter Pareit, Nicolas Richard, Augusto +Ritter Stoffel, Florent Rougon, Santiago Saavedra, Davide +G. M. Salvetti, Rdiger Sonderfeld, Holger Sparr, Mike Sperber, Reiner +Steib, Christian Schlauer, Shiro Takeda, Mark Trettin (Please accept +our apologies if we forgot somebody.) + +Footnotes: + +[1] <URL:https://www.ctan.org/pkg/preview> + +[2] dvipng is available via its project page +<URL:https://savannah.nongnu.org/projects/dvipng> and from CTAN. diff --git a/elpa/auctex-13.1.3/auctex-autoloads.el b/elpa/auctex-13.1.3/auctex-autoloads.el new file mode 100644 index 0000000..7d62180 --- /dev/null +++ b/elpa/auctex-13.1.3/auctex-autoloads.el @@ -0,0 +1,401 @@ +;;; auctex-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "bib-cite" "bib-cite.el" (0 0 0 0)) +;;; Generated autoloads from bib-cite.el + +(autoload 'bib-cite-minor-mode "bib-cite" "\ +Toggle bib-cite mode. +When bib-cite mode is enabled, citations, labels and refs are highlighted +when the mouse is over them. Clicking on these highlights with [mouse-2] +runs `bib-find', and [mouse-3] runs `bib-display'. + +\(fn ARG)" t nil) + +(autoload 'turn-on-bib-cite "bib-cite" "\ +Unconditionally turn on Bib Cite mode." nil nil) + +(register-definition-prefixes "bib-cite" '("LaTeX-" "bib-" "create-alist-from-list" "member-cis" "psg-" "search-directory-tree")) + +;;;*** + +;;;### (autoloads nil "context" "context.el" (0 0 0 0)) +;;; Generated autoloads from context.el + +(defalias 'ConTeXt-mode #'context-mode) + +(autoload 'context-mode "context" "\ +Major mode in AUCTeX for editing ConTeXt files. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." t nil) + +(register-definition-prefixes "context" '("ConTeXt-" "TeX-ConTeXt-sentinel" "context-guess-current-interface")) + +;;;*** + +;;;### (autoloads nil "context-en" "context-en.el" (0 0 0 0)) +;;; Generated autoloads from context-en.el + +(autoload 'context-en-mode "context-en" "\ +Major mode for editing files for ConTeXt using its english interface. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." t nil) + +(register-definition-prefixes "context-en" '("ConTeXt-")) + +;;;*** + +;;;### (autoloads nil "context-nl" "context-nl.el" (0 0 0 0)) +;;; Generated autoloads from context-nl.el + +(autoload 'context-nl-mode "context-nl" "\ +Major mode for editing files for ConTeXt using its dutch interface. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." t nil) + +(register-definition-prefixes "context-nl" '("ConTeXt-")) + +;;;*** + +;;;### (autoloads nil "font-latex" "font-latex.el" (0 0 0 0)) +;;; Generated autoloads from font-latex.el + +(autoload 'font-latex-setup "font-latex" "\ +Setup this buffer for LaTeX font-lock. Usually called from a hook." nil nil) + +(register-definition-prefixes "font-latex" '("font-latex-")) + +;;;*** + +;;;### (autoloads nil "latex" "latex.el" (0 0 0 0)) +;;; Generated autoloads from latex.el + +(autoload 'BibTeX-auto-store "latex" "\ +This function should be called from `bibtex-mode-hook'. +It will setup BibTeX to store keys in an auto file." nil nil) + +(add-to-list 'auto-mode-alist '("\\.drv\\'" . latex-mode) t) + +(add-to-list 'auto-mode-alist '("\\.hva\\'" . latex-mode)) + +(autoload 'TeX-latex-mode "latex" "\ +Major mode in AUCTeX for editing LaTeX files. +See info under AUCTeX for full documentation. + +Special commands: +\\{LaTeX-mode-map} + +Entering LaTeX mode calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `LaTeX-mode-hook'." t nil) + +(add-to-list 'auto-mode-alist '("\\.dtx\\'" . doctex-mode)) + +(autoload 'docTeX-mode "latex" "\ +Major mode in AUCTeX for editing .dtx files derived from `LaTeX-mode'. +Runs `LaTeX-mode', sets a few variables and +runs the hooks in `docTeX-mode-hook'. + +\(fn)" t nil) + +(defalias 'TeX-doctex-mode #'docTeX-mode) + +(register-definition-prefixes "latex" '("Bib" "LaTeX-" "TeX-" "docTeX-" "latex-math-mode")) + +;;;*** + +;;;### (autoloads nil "latex-flymake" "latex-flymake.el" (0 0 0 0)) +;;; Generated autoloads from latex-flymake.el + +(register-definition-prefixes "latex-flymake" '("LaTeX-")) + +;;;*** + +;;;### (autoloads nil "multi-prompt" "multi-prompt.el" (0 0 0 0)) +;;; Generated autoloads from multi-prompt.el + +(autoload 'multi-prompt "multi-prompt" "\ +Completing prompt for a list of strings. +The first argument SEPARATOR should be the string (of length 1) to +separate the elements in the list. The second argument UNIQUE should +be non-nil, if each element must be unique. The remaining elements +are the arguments to `completing-read'. See that. + +\(fn SEPARATOR UNIQUE PROMPT TABLE &optional MP-PREDICATE REQUIRE-MATCH INITIAL HISTORY)" nil nil) + +(autoload 'multi-prompt-key-value "multi-prompt" "\ +Read multiple strings, with completion and key=value support. +PROMPT is a string to prompt with, usually ending with a colon +and a space. TABLE is an alist. The car of each element should +be a string representing a key and the optional cdr should be a +list with strings to be used as values for the key. + +See the documentation for `completing-read' for details on the +other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, +DEF, and INHERIT-INPUT-METHOD. + +The return value is the string as entered in the minibuffer. + +\(fn PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)" nil nil) + +(register-definition-prefixes "multi-prompt" '("multi-prompt-")) + +;;;*** + +;;;### (autoloads nil "plain-tex" "plain-tex.el" (0 0 0 0)) +;;; Generated autoloads from plain-tex.el + +(autoload 'TeX-plain-tex-mode "plain-tex" "\ +Major mode in AUCTeX for editing plain TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{plain-TeX-mode-map} + +Entering `plain-tex-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `plain-TeX-mode-hook'." t nil) + +(autoload 'ams-tex-mode "plain-tex" "\ +Major mode in AUCTeX for editing AmS-TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{AmSTeX-mode-map} + +Entering `ams-tex-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `AmS-TeX-mode-hook'." t nil) + +(register-definition-prefixes "plain-tex" '("AmS" "plain-TeX-")) + +;;;*** + +;;;### (autoloads nil "preview" "preview.el" (0 0 0 0)) +;;; Generated autoloads from preview.el + +(autoload 'preview-install-styles "preview" "\ +Installs the TeX style files into a permanent location. +This must be in the TeX search path. If FORCE-OVERWRITE is greater +than 1, files will get overwritten without query, if it is less +than 1 or nil, the operation will fail. The default of 1 for interactive +use will query. + +Similarly FORCE-SAVE can be used for saving +`preview-TeX-style-dir' to record the fact that the uninstalled +files are no longer needed in the search path. + +\(fn DIR &optional FORCE-OVERWRITE FORCE-SAVE)" t nil) + +(autoload 'LaTeX-preview-setup "preview" "\ +Hook function for embedding the preview package into AUCTeX. +This is called by `LaTeX-mode-hook' and changes AUCTeX variables +to add the preview functionality." nil nil) + +(autoload 'preview-report-bug "preview" "\ +Report a bug in the preview-latex package." t nil) + +(register-definition-prefixes "preview" '("TeX-" "desktop-buffer-preview" "preview-")) + +;;;*** + +;;;### (autoloads nil "tex" "tex.el" (0 0 0 0)) +;;; Generated autoloads from tex.el + +(autoload 'TeX-tex-mode "tex" "\ +Major mode in AUCTeX for editing TeX or LaTeX files. +Tries to guess whether this file is for plain TeX or LaTeX. + +The algorithm is as follows: + + 1) if the file is empty or `TeX-force-default-mode' is not set to nil, + `TeX-default-mode' is chosen + 2) If \\documentstyle or \\begin{, \\section{, \\part{ or \\chapter{ is + found, `latex-mode' is selected. + 3) Otherwise, use `plain-tex-mode'" t nil) + +(autoload 'TeX-auto-generate "tex" "\ +Generate style file for TEX and store it in AUTO. +If TEX is a directory, generate style files for all files in the directory. + +\(fn TEX AUTO)" t nil) + +(autoload 'TeX-auto-generate-global "tex" "\ +Create global auto directory for global TeX macro definitions." t nil) + +(autoload 'TeX-submit-bug-report "tex" "\ +Submit a bug report on AUCTeX via mail. + +Don't hesitate to report any problems or inaccurate documentation. + +If you don't have setup sending mail from Emacs, please copy the +output buffer into your mail program, as it gives us important +information about your AUCTeX version and AUCTeX configuration." t nil) + +(register-definition-prefixes "tex" '("Bib" "ConTeXt-" "LaTeX-" "TeX-" "VirTeX-common-initialization" "docTeX-default-extension" "plain-TeX-auto-regexp-list" "tex-")) + +;;;*** + +;;;### (autoloads nil "tex-bar" "tex-bar.el" (0 0 0 0)) +;;; Generated autoloads from tex-bar.el + +(autoload 'TeX-install-toolbar "tex-bar" "\ +Install toolbar buttons for TeX mode." t nil) + +(autoload 'LaTeX-install-toolbar "tex-bar" "\ +Install toolbar buttons for LaTeX mode." t nil) + +(register-definition-prefixes "tex-bar" '("TeX-bar-")) + +;;;*** + +;;;### (autoloads nil "tex-fold" "tex-fold.el" (0 0 0 0)) +;;; Generated autoloads from tex-fold.el + +(autoload 'TeX-fold-mode "tex-fold" "\ +Minor mode for hiding and revealing macros and environments. + +Called interactively, with no prefix argument, toggle the mode. +With universal prefix ARG (or if ARG is nil) turn mode on. +With zero or negative ARG turn mode off. + +\(fn &optional ARG)" t nil) + +(defalias 'tex-fold-mode #'TeX-fold-mode) + +(register-definition-prefixes "tex-fold" '("TeX-fold-")) + +;;;*** + +;;;### (autoloads nil "tex-font" "tex-font.el" (0 0 0 0)) +;;; Generated autoloads from tex-font.el + +(autoload 'tex-font-setup "tex-font" "\ +Setup font lock support for TeX." nil nil) + +(register-definition-prefixes "tex-font" '("tex-")) + +;;;*** + +;;;### (autoloads nil "tex-info" "tex-info.el" (0 0 0 0)) +;;; Generated autoloads from tex-info.el + +(defalias 'Texinfo-mode #'texinfo-mode) + +(autoload 'TeX-texinfo-mode "tex-info" "\ +Major mode in AUCTeX for editing Texinfo files. + +Special commands: +\\{Texinfo-mode-map} + +Entering Texinfo mode calls the value of `text-mode-hook' and then the +value of `Texinfo-mode-hook'." t nil) + +(register-definition-prefixes "tex-info" '("Texinfo-" "texinfo-environment-regexp")) + +;;;*** + +;;;### (autoloads nil "tex-ispell" "tex-ispell.el" (0 0 0 0)) +;;; Generated autoloads from tex-ispell.el + +(register-definition-prefixes "tex-ispell" '("TeX-ispell-")) + +;;;*** + +;;;### (autoloads nil "tex-jp" "tex-jp.el" (0 0 0 0)) +;;; Generated autoloads from tex-jp.el + +(autoload 'japanese-plain-tex-mode "tex-jp" "\ +Major mode in AUCTeX for editing Japanese plain TeX files. +Set `japanese-TeX-mode' to t, and enter `TeX-plain-tex-mode'." t nil) + +(autoload 'japanese-latex-mode "tex-jp" "\ +Major mode in AUCTeX for editing Japanese LaTeX files. +Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'." t nil) + +(register-definition-prefixes "tex-jp" '("TeX-" "japanese-")) + +;;;*** + +;;;### (autoloads nil "tex-site" "tex-site.el" (0 0 0 0)) +;;; Generated autoloads from tex-site.el + (require 'tex-site) + +(register-definition-prefixes "tex-site" '("AUCTeX-" "TeX-" "preview-TeX-style-dir")) + +;;;*** + +;;;### (autoloads nil "tex-style" "tex-style.el" (0 0 0 0)) +;;; Generated autoloads from tex-style.el + +(register-definition-prefixes "tex-style" '("LaTeX-")) + +;;;*** + +;;;### (autoloads nil "tex-wizard" "tex-wizard.el" (0 0 0 0)) +;;; Generated autoloads from tex-wizard.el + +(register-definition-prefixes "tex-wizard" '("TeX-wizard")) + +;;;*** + +;;;### (autoloads nil "texmathp" "texmathp.el" (0 0 0 0)) +;;; Generated autoloads from texmathp.el + +(autoload 'texmathp "texmathp" "\ +Determine if point is inside (La)TeX math mode. +Returns t or nil. Additional info is placed into `texmathp-why'. +The functions assumes that you have (almost) syntactically correct (La)TeX in +the buffer. +See the variable `texmathp-tex-commands' about which commands are checked." t nil) + +(autoload 'texmathp-match-switch "texmathp" "\ +Search backward for any of the math switches. +Limit searched to BOUND. + +\(fn BOUND)" nil nil) + +(register-definition-prefixes "texmathp" '("texmathp-")) + +;;;*** + +;;;### (autoloads nil "toolbar-x" "toolbar-x.el" (0 0 0 0)) +;;; Generated autoloads from toolbar-x.el + (autoload 'toolbarx-install-toolbar "toolbar-x") + +(register-definition-prefixes "toolbar-x" '("toolbarx-")) + +;;;*** + +;;;### (autoloads nil nil ("auctex-pkg.el" "auctex.el" "tex-mik.el") +;;;;;; (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; auctex-autoloads.el ends here diff --git a/elpa/auctex-13.1.3/auctex-pkg.el b/elpa/auctex-13.1.3/auctex-pkg.el new file mode 100644 index 0000000..4e86eac --- /dev/null +++ b/elpa/auctex-13.1.3/auctex-pkg.el @@ -0,0 +1,2 @@ +;; Generated package description from auctex.el -*- no-byte-compile: t -*- +(define-package "auctex" "13.1.3" "Integrated environment for *TeX*" '((emacs "25.1")) :commit "b91f15b3a375445985143ed1d6e41490ea62780a" :maintainer '(nil . "auctex-devel@gnu.org") :keywords '("tex" "latex" "texinfo" "context" "doctex" "preview-latex") :url "https://www.gnu.org/software/auctex/") diff --git a/elpa/auctex-13.1.3/auctex.el b/elpa/auctex-13.1.3/auctex.el new file mode 100644 index 0000000..5e6c00f --- /dev/null +++ b/elpa/auctex-13.1.3/auctex.el @@ -0,0 +1,45 @@ +;;; auctex.el --- Integrated environment for *TeX* -*- lexical-binding: t; -*- + +;; Copyright (C) 2014-2021 Free Software Foundation, Inc. + +;; Version: 13.1.3 +;; URL: https://www.gnu.org/software/auctex/ +;; Maintainer: auctex-devel@gnu.org +;; Notifications-To: auctex-diffs@gnu.org +;; Package-Requires: ((emacs "25.1")) +;; Keywords: TeX LaTeX Texinfo ConTeXt docTeX preview-latex + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This can be used for starting up AUCTeX. The following somewhat +;; strange trick causes tex-site.el to be loaded in a way that can be +;; safely undone using (unload-feature 'tex-site). + +;; FIXME: I don't quite understand in which way this is better than less +;; strange code such as +;; (require 'tex-site (expand-file-name "tex-site.el" +;; (file-name-directory load-file-name)) + +;;; Code: + +(autoload 'TeX-load-hack + (expand-file-name "tex-site.el" + (file-name-directory load-file-name))) +(TeX-load-hack) + +;;; auctex.el ends here diff --git a/elpa/auctex-13.1.3/auctex.elc b/elpa/auctex-13.1.3/auctex.elc Binary files differnew file mode 100644 index 0000000..e8292f7 --- /dev/null +++ b/elpa/auctex-13.1.3/auctex.elc diff --git a/elpa/auctex-13.1.3/auctex.info b/elpa/auctex-13.1.3/auctex.info new file mode 100644 index 0000000..b9ac9ee --- /dev/null +++ b/elpa/auctex-13.1.3/auctex.info @@ -0,0 +1,9633 @@ +This is auctex.info, produced by makeinfo version 6.8 from auctex.texi. + +This manual is for AUCTeX (version 13.1.3 from 2022-04-16), a +sophisticated TeX environment for Emacs. + + Copyright (C) 1992-1995, 2001, 2002, 2004-2022 Free Software +Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and no + Back-Cover Texts. A copy of the license is included in the section + entitled "GNU Free Documentation License." +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +END-INFO-DIR-ENTRY + +INFO-DIR-SECTION TeX +START-INFO-DIR-ENTRY +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +END-INFO-DIR-ENTRY + + +File: auctex.info, Node: Top, Next: Copying, Up: (dir) + +AUCTeX +****** + +This manual may be copied under the conditions spelled out in *note +Copying this Manual::. + + AUCTeX is an integrated environment for editing LaTeX, ConTeXt, +docTeX, Texinfo, and TeX files. + + Although AUCTeX contains a large number of features, there are no +reasons to despair. You can continue to write TeX and LaTeX documents +the way you are used to, and only start using the multiple features in +small steps. AUCTeX is not monolithic, each feature described in this +manual is useful by itself, but together they provide an environment +where you will make very few LaTeX errors, and makes it easy to find the +errors that may slip through anyway. + + It is a good idea to make a printout of AUCTeX's reference card +'tex-ref.tex' or one of its typeset versions. + + If you want to make AUCTeX aware of style files and multifile +documents right away, insert the following in your init file (usually +'~/.emacs.d/init.el'). + + (setq TeX-auto-save t) + (setq TeX-parse-self t) + (setq-default TeX-master nil) + + Another thing you should enable is RefTeX, a comprehensive solution +for managing cross references, bibliographies, indices, document +navigation and a few other things. (*Note (reftex)Installation::.) + + For detailed information about the preview-latex subsystem of AUCTeX, +see *note Introduction: (preview-latex)Top. + + There is a mailing list for general discussion about AUCTeX: write a +mail with "subscribe" in the subject to <auctex-request@gnu.org> to join +it. Send contributions to <auctex@gnu.org>. + + Bug reports should go to <bug-auctex@gnu.org>, suggestions for new +features, and pleas for help should go to either <auctex-devel@gnu.org> +(the AUCTeX developers), or to <auctex@gnu.org> if they might have +general interest. Please use the command 'M-x TeX-submit-bug-report +<RET>' to report bugs if possible. You can subscribe to a low-volume +announcement list by sending "subscribe" in the subject of a mail to +<info-auctex-request@gnu.org>. + +* Menu: + +* Copying:: Copying +* Introduction:: Introduction to AUCTeX +* Editing:: Editing the Document Source +* Display:: Controlling Screen Display +* Processing:: Starting Processors, Viewers and Other Programs +* Customization:: Customization and Extension +* Appendices:: Copying, Changes, Development, FAQ, Texinfo mode +* Indices:: Indices + + -- The Detailed Node Listing -- + +Introduction + +* Summary:: Overview of AUCTeX +* Installation:: Installing AUCTeX +* Quick Start:: Quick Start + +Editing the Document Source + +* Quotes:: Inserting double quotes +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking + +Inserting Environment Templates + +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments + +Controlling Screen Display + +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document +* Narrowing:: Restricting display and editing to a portion of the buffer +* Prettifying:: Displaying Greek and math macros as Unicode characters + +Font Locking + +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex +* Known problems:: Known fontification problems + +Starting Processors, Viewers and Other Programs + +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging TeX and LaTeX output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. + +Viewing the Formatted Output + +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search + +Catching the errors + +* Ignoring warnings:: Controlling warnings to be reported +* Error overview:: List of all errors and warnings + +Customization and Extension + +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of TeX Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support + +Language Support + +* European:: Using AUCTeX with European Languages +* Japanese:: Using AUCTeX with Japanese + +Automatic Customization + +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory + +Writing Your Own Style Support + +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding or Examining Other Information +* Hacking the Parser:: Automatic Extraction of New Things + +Copying, Changes, Development, FAQ + +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: +* Texinfo mode:: + +Copying this Manual + +* GNU Free Documentation License:: License for copying this manual. + +Indices + +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: + + + +File: auctex.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top + +Copying +******* + +AUCTeX primarily consists of Lisp files for Emacs, but there are also +installation scripts and files and TeX support files. All of those are +"free"; this means that everyone is free to use them and free to +redistribute them on a free basis. The files of AUCTeX are not in the +public domain; they are copyrighted and there are restrictions on their +distribution, but these restrictions are designed to permit everything +that a good cooperating citizen would want to do. What is not allowed +is to try to prevent others from further sharing any version of these +programs that they might get from you. + + Specifically, we want to make sure that you have the right to give +away copies of the files that constitute AUCTeX, that you receive source +code or else can get it if you want it, that you can change these files +or use pieces of them in new free programs, and that you know you can do +these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of parts of AUCTeX, you must give the recipients all the rights +that you have. You must make sure that they, too, receive or can get +the source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone +finds out that there is no warranty for AUCTeX. If any parts are +modified by someone else and passed on, we want their recipients to know +that what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + + The precise conditions of the licenses for the files currently being +distributed as part of AUCTeX are found in the General Public Licenses +that accompany them. This manual specifically is covered by the GNU +Free Documentation License (*note Copying this Manual::). + + +File: auctex.info, Node: Introduction, Next: Editing, Prev: Copying, Up: Top + +1 Introduction +************** + +* Menu: + +* Summary:: Overview of AUCTeX +* Installation:: Installing AUCTeX +* Quick Start:: Quick Start + + +File: auctex.info, Node: Summary, Next: Installation, Up: Introduction + +1.1 Overview of AUCTeX +====================== + +AUCTeX is a comprehensive customizable integrated environment for +writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX using +Emacs. + + It supports you in the insertion of macros, environments, and +sectioning commands by providing completion alternatives and prompting +for parameters. It automatically indents your text as you type it and +lets you format a whole file at once. The outlining and folding +facilities provide you with a focused and clean view of your text. + + AUCTeX lets you process your source files by running TeX and related +tools (such as output filters, post processors for generating indices +and bibliographies, and viewers) from inside Emacs. AUCTeX lets you +browse through the errors TeX reported, while it moves the cursor +directly to the reported error, and displays some documentation for that +particular error. This will even work when the document is spread over +several files. + + One component of AUCTeX that LaTeX users will find attractive is +preview-latex, a combination of folding and in-source previewing that +provides true "What You See Is What You Get" experience in your +sourcebuffer, while letting you retain full control. + + More detailed information about the features and usage of AUCTeX can +be found in the remainder of this manual. + + AUCTeX is written entirely in Emacs Lisp, and hence you can easily +add new features for your own needs. It is a GNU project and +distributed under the 'GNU General Public License Version 3'. + + The most recent version is always available at +<https://ftp.gnu.org/pub/gnu/auctex/>. + + WWW users may want to check out the AUCTeX page at +<https://www.gnu.org/software/auctex/>. + + For comprehensive information about how to install AUCTeX *Note +Installation::, or *note Installation under MS Windows::, respectively. + + If you are considering upgrading AUCTeX, the recent changes are +described in *note Changes::. + + If you want to discuss AUCTeX with other users or its developers, +there are several mailing lists you can use. + + Send a mail with the subject "subscribe" to <auctex-request@gnu.org> +in order to join the general discussion list for AUCTeX. Articles +should be sent to <auctex@gnu.org>. In a similar way, you can subscribe +to the <info-auctex@gnu.org> list for just getting important +announcements about AUCTeX. The list <bug-auctex@gnu.org> is for bug +reports which you should usually file with the 'M-x +TeX-submit-bug-report <RET>' command. If you want to address the +developers of AUCTeX themselves with technical issues, they can be found +on the discussion list <auctex-devel@gnu.org>. + + +File: auctex.info, Node: Installation, Next: Quick Start, Prev: Summary, Up: Introduction + +1.2 Installing AUCTeX +===================== + +The modern and strongly recommended way of installing AUCTeX is by using +the Emacs package manager integrated in Emacs 24 and greater (ELPA). +Simply do 'M-x list-packages <RET>', mark the auctex package for +installation with 'i', and hit 'x' to execute the installation +procedure. That's all. + + 'use-package' users can use this simple recipe in their +'user-init-file' which essentially does the same as the manual +installation explained above. + + (use-package tex + :ensure auctex) + + Using the ELPA version has several advantages. Besides being +platform and OS independent, you will receive intermediate bugfix +releases between major AUCTeX releases conveniently. For past ELPA +releases, see <https://elpa.gnu.org/packages/auctex.html>. Once the +installation is completed, you can skip the rest of this section and +proceed to *note Quick Start::. + + The remainder of this section is about installing AUCTeX from a +release tarball or from a checkout of the AUCTeX repository. + + Installing AUCTeX should be simple: merely './configure', 'make', and +'make install' for a standard site-wide installation (most other +installations can be done by specifying a '--prefix=...' option). + + On many systems, this will already activate the package, making its +modes the default instead of the built-in modes of Emacs. If this is +not the case, consult *note Loading the package::. Please read through +this document fully before installing anything. The installation +procedure has changed as compared to earlier versions. Users of +MS Windows are asked to consult *Note Installation under MS Windows::. + +* Menu: + +* Prerequisites:: +* Configure:: +* Build/install and uninstall:: +* Loading the package:: +* Advice for package providers:: +* Advice for non-privileged users:: +* Installation under MS Windows:: +* Customizing:: + + +File: auctex.info, Node: Prerequisites, Next: Configure, Up: Installation + +1.2.1 Prerequisites +------------------- + + * GNU Emacs 25.1 or higher + + Using preview-latex requires a version of Emacs compiled with image + support. + + Windows + Precompiled versions are available from + <https://ftp.gnu.org/gnu/emacs/windows/>. + macOS + For an overview of precompiled versions of Emacs for macOS see + for example <https://www.emacswiki.org/emacs/EmacsForMacOS>. + GNU/Linux + Most GNU/Linux distributions nowadays provide a recent variant + of Emacs via their package repositories. + Self-compiled + Compiling Emacs yourself requires a C compiler and a number of + tools and development libraries. Details are beyond the scope + of this manual. Instructions for checking out the source code + can be found at <https://savannah.gnu.org/git/?group=emacs>. + + * A working TeX installation + + Well, AUCTeX would be pointless without that. Processing + documentation requires TeX, LaTeX and Texinfo during installation. + preview-latex requires Dvips or 'dvipng' for its operation in DVI + mode. The default configuration of AUCTeX is tailored for + TeX Live-based distributions, but can be adapted easily. + + * A recent Ghostscript + + This is needed for operation of preview-latex in both DVI and PDF + mode. Ghostscript version 7.07 or newer is required. + + * GNU make + + Recent AUCTeX uses GNU make specific capabilities in the Makefiles. + If your OS's default 'make' command is not GNU make, you have to + obtain it in order to build AUCTeX by yourself. GNU make is + sometimes provided under the name 'gmake' in your OS's binary + package system. + + * The Texinfo package + + Strictly speaking, you can get away without it if you are building + from the distribution tarball, have not modified any files and + don't need a printed version of the manual: the pregenerated info + file is included in the tarball. At least version 4.0 is required. + + For some known issues with various software, see *note +(preview-latex)Known problems::. + + +File: auctex.info, Node: Configure, Next: Build/install and uninstall, Prev: Prerequisites, Up: Installation + +1.2.2 Configure +--------------- + +The first step is to configure the source code, telling it where various +files will be. To do so, run + + ./configure OPTIONS + + (Note: if you have fetched AUCTeX from Git rather than a regular +release, you will have to first follow the instructions in +'README.GIT'). + + On many machines, you will not need to specify any options, but if +'configure' cannot determine something on its own, you'll need to help +it out with one of these options: + +'--prefix=PREFIX' + All automatic placements for package components will be chosen from + sensible existing hierarchies below this: directories like 'man', + 'share' and 'bin' are supposed to be directly below PREFIX. + + Only if no workable placement can be found there, in some cases an + alternative search will be made in a prefix deduced from a suitable + binary. + + '/usr/local' is the default PREFIX, intended to be suitable for a + site-wide installation. If you are packaging this as an operating + system component for distribution, the setting '/usr' will probably + be the right choice. See *note Advice for package providers:: for + detail. + + If you are planning to install the package as a single + non-priviledged user, you will typically set PREFIX to your home + directory. Consult *note Advice for non-privileged users:: for + addtional instructions. + +'--with-emacs=/PATH/TO/EMACS' + If you are using a pretest which isn't in your 'PATH', or + 'configure' is not finding the right Emacs executable, you can + specify it with this option. + +'--with-lispdir=LISPDIR' + This option specifies the location of the 'site-lisp' directory + within 'load-path' under which the files will get installed (the + bulk will get installed in a subdirectory). './configure' should + figure this out by itself. + +'--with-auctexstartfile=auctex.el' +'--with-previewstartfile=preview-latex.el' + This is the name of the respective startup files. If LISPDIR + contains a subdirectory 'site-start.d', the start files are placed + there, and 'site-start.el' should load them automatically. Please + be aware that you must not move the start files after installation + since other files are found _relative_ to them. + +'--with-packagelispdir=auctex' + This is the directory where the bulk of the package gets located. + The startfile adds this into 'load-path'. + +'--with-auto-dir=/DIR' + You can use this option to specify the directory containing + automatically generated information by 'M-x + TeX-auto-generate-global <RET>'. It is not necessary for most TeX + installs, but may be used if you don't like the directory that + configure is suggesting. + +'--help' + This is not an option specific to AUCTeX. A number of standard + options to 'configure' exist, and we do not have the room to + describe them here; a short description of each is available, using + '--help'. + +'--disable-preview' + This disables configuration and installation of preview-latex. + This option is not actually recommended. If your Emacs does not + support images, you should really upgrade to a newer version. + Distributors should, if possible, refrain from distributing AUCTeX + and preview-latex separately in order to avoid confusion and + upgrade hassles if users install partial packages on their own. + +'--with-texmf-dir=/DIR' +'--without-texmf-dir' + This option is used for specifying a TDS-compliant directory + hierarchy. Using '--with-texmf-dir=/DIR' you can specify where the + TeX TDS directory hierarchy resides, and the TeX files will get + installed in '/DIR/tex/latex/preview/'. + + If you use the '--without-texmf-dir' option, the TeX-related files + will be kept in the Emacs Lisp tree, and at runtime the 'TEXINPUTS' + environment variable will be made to point there. You can install + those files into your own TeX tree at some later time with 'M-x + preview-install-styles <RET>'. + +'--with-tex-dir=/DIR' + If you want to specify an exact directory for the preview TeX + files, use '--with-tex-dir=/DIR'. In this case, the files will be + placed in '/DIR', and you'll also need the following option: + +'--with-doc-dir=/DIR' + This option may be used to specify where the TeX documentation + goes. It is to be used when you are using '--with-tex-dir=/DIR', + but is normally not necessary otherwise. + + +File: auctex.info, Node: Build/install and uninstall, Next: Loading the package, Prev: Configure, Up: Installation + +1.2.3 Build/install and uninstall +--------------------------------- + +Once 'configure' has been run, simply enter + + make + +at the prompt to byte-compile the lisp files, extract the TeX files and +build the documentation files. To install the files into the locations +chosen earlier, type + + make install + +You may need special privileges to install, e.g., if you are installing +into system directories. + + Should you want to completely remove the installed package, in the +same directory you built AUCTeX run + + make uninstall + +You will need administration privileges if you installed the package +into system directories. + + +File: auctex.info, Node: Loading the package, Next: Advice for package providers, Prev: Build/install and uninstall, Up: Installation + +1.2.4 Loading the package +------------------------- + +You can detect the successful activation of AUCTeX and preview-latex in +the menus after loading a LaTeX file like 'circ.tex': AUCTeX then gives +you a 'Command' menu, and preview-latex gives you a 'Preview' menu. + + With Emacs (or if you explicitly disabled use of the package system), +the startup files 'auctex.el' and 'preview-latex.el' may already be in a +directory of the 'site-start.d/' variety if your Emacs installation +provides it. In that case they should be automatically loaded on +startup and nothing else needs to be done. If not, they should at least +have been placed somewhere in your 'load-path'. You can then load them +by placing the lines + + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) +into your init file such as 'init.el' or '.emacs'. + + If you explicitly used '--with-lispdir', you may need to add the +specified directory into Emacs' 'load-path' variable by adding something +like + + (add-to-list 'load-path "~/elisp") +before the above lines into your Emacs startup file. + + For site-wide activation in GNU Emacs, see *Note Advice for package +providers::. + + Once activated, the modes provided by AUCTeX are used per default for +all supported file types. If you want to change the modes for which it +is operative instead of the default, use + M-x customize-option <RET> TeX-modes <RET> + + If you want to remove a preinstalled AUCTeX completely before any of +its modes have been used, + (unload-feature 'tex-site) +should accomplish that. + + +File: auctex.info, Node: Advice for package providers, Next: Advice for non-privileged users, Prev: Loading the package, Up: Installation + +1.2.5 Providing AUCTeX as a package +----------------------------------- + +As a package provider, you should make sure that your users will be +served best according to their intentions, and keep in mind that a +system might be used by more than one user, with different preferences. + + There are people that prefer the built-in Emacs modes for editing TeX +files, in particular plain TeX users. There are various ways to tell +AUCTeX even after auto-activation that it should not get used, and they +are described in *note Introduction to AUCTeX: Introduction. + + So if you have users that don't want to use the preinstalled AUCTeX, +they can easily get rid of it. Activating AUCTeX by default is +therefore a good choice. + + If the installation procedure did not achieve this already by placing +'auctex.el' and 'preview-latex.el' into a possibly existing +'site-start.d' directory, you can do this by placing + + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) + +in the system-wide 'site-start.el'. + + The '--without-texmf-dir' option can be convenient for systems that +are intended to support more than a single TeX distribution. Since more +often than not TeX packages for operating system distributions are +either much more outdated or much less complete than separately provided +systems like TeX Live, this method may be generally preferable when +providing packages. + + The following package structure would be adequate for a typical fully +supported Unix-like installation: + +'preview-tetex' + Style files and documentation for 'preview.sty', placed into a TeX + tree where it is accessible from the teTeX executables usually + delivered with a system. If there are other commonly used TeX + system packages, it might be appropriate to provide separate + packages for those. +'auctex-emacs-tetex' + This package will require the installation of 'preview-tetex' and + will record in 'TeX-macro-global' where to find the TeX tree. It + is also a good idea to run + emacs -batch -f TeX-auto-generate-global + when either AUCTeX or teTeX get installed or upgraded. If your + users might want to work with a different TeX distribution + (nowadays pretty common), instead consider the following: +'auctex-emacs' + This package will be compiled with '--without-texmf-dir' and will + consequently contain the 'preview' style files in its private + directory. It will probably not be possible to initialize + 'TeX-macro-global' to a sensible value, so running + 'TeX-auto-generate-global' does not appear useful. This package + would neither conflict with nor provide 'preview-tetex'. + + +File: auctex.info, Node: Advice for non-privileged users, Next: Installation under MS Windows, Prev: Advice for package providers, Up: Installation + +1.2.6 Installation for non-privileged users +------------------------------------------- + +Often people without system administration privileges want to install +software for their private use. In that case you need to pass more +options to the 'configure' script. + + The main expedient is using the '--prefix' option to the 'configure' +script, and let it point to the personal home directory. In that way, +resulting binaries will be installed under the 'bin' subdirectory of +your home directory, manual pages under 'man' and so on. It is +reasonably easy to maintain a bunch of personal software, since the +prefix argument is supported by most 'configure' scripts. + + You often need to specify '--with-lispdir' option as well. If you +haven't installed Emacs under your home directory and use Emacs +installed in system directories, the 'configure' script might not be +able to figure out suitable place to install lisp files under your home +directory. In that case, the 'configure' script would silently choose, +by default, the 'site-lisp' directory within 'load-path' for the place, +where administration privileges are usually required to put relevant +files. Thus you will have to tell the 'configure' script explicitly +where to put those files by, e.g., +'--with-lispdir='/home/myself/share/emacs/site-lisp''. + + You'll have to add something like +'/home/myself/share/emacs/site-lisp' to your 'load-path' variable, if it +isn't there already. + + In addition, you will have to tell 'configure' script where to +install TeX-related files such as 'preview.sty' if preview-latex isn't +disabled. It is enough to specify '--with-texmf-dir=$HOME/texmf' for +most typical cases, but you have to create the direcotry '$HOME/texmf' +in advance if it doesn't exist. If this prescription doesn't work, +consider using one or more of the options '--with-texmf-dir=/DIR', +'--without-texmf-dir', '--with-tex-dir=/DIR' and '--with-doc-dir=/DIR'. +See *note Configure:: for detail of these options. + + Now here is another thing to ponder: perhaps you want to make it easy +for other users to share parts of your personal Emacs configuration. In +general, you can do this by writing '~myself/' anywhere where you +specify paths to something installed in your personal subdirectories, +not merely '~/', since the latter, when used by other users, will point +to non-existent files. + + For yourself, it will do to manipulate environment variables in your +'.profile' resp. '.login' files. But if people will be copying just +Elisp files, their copies will not work. While it would in general be +preferable if the added components where available from a shell level, +too (like when you call the standalone info reader, or try using +'preview.sty' for functionality besides of Emacs previews), it will be a +big help already if things work from inside of Emacs. + + Here is how to do the various parts: + +Making the Elisp available +.......................... + +In GNU Emacs, it should be sufficient if people just do + + (load "~myself/share/emacs/site-lisp/auctex.el" nil t t) + (load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t) +where the path points to your personal installation. The rest of the +package should be found relative from there without further ado. + +Making the Info files available +............................... + +For making the info files accessible from within Elisp, something like +the following might be convenient to add into your or other people's +startup files: + + (eval-after-load 'info + '(add-to-list 'Info-directory-list "~myself/info")) + +Making the LaTeX style available +................................ + +If you want others to be able to share your installation, you should +configure it using '--without-texmf-dir', in which case things should +work as well for them as for you. + +1.2.6.1 Using AUCTeX from local Git repo +........................................ + +With the techniques described above, it is also possible to use AUCTeX +directly from a local Git repository. Let's assume you have your Git +repositories under '~/development/'. + + First, you have to fetch a copy of the AUCTeX Git repository. In a +shell, change directory to '~/development/' and do: + git clone https://git.savannah.gnu.org/git/auctex.git + + Now change directory to '~/development/auctex' and run +'./autogen.sh'. Next thing is to run 'configure' like this: + ./configure --without-texmf-dir --with-lispdir=. + +When finished, simply enter + make +and you're finished. Note that the 'make install' step is not +necessary. + + Now you have to tell Emacs about the plan. The following variables +must be set in your init file because their normal values are only +correct when AUCTeX is installed: + (setq TeX-data-directory "~/development/auctex" + TeX-lisp-directory TeX-data-directory) + +The info files will be available with this: + (eval-after-load 'info + '(add-to-list 'Info-additional-directory-list + "~/development/auctex/doc")) + +Now you're ready to load 'auctex.el' and 'preview-latex.el' out of this +directory: + (load "~/development/auctex/auctex.el" nil t t) + (load "~/development/auctex/preview-latex.el" nil t t) + + +File: auctex.info, Node: Installation under MS Windows, Next: Customizing, Prev: Advice for non-privileged users, Up: Installation + +1.2.7 Installation under MS Windows +----------------------------------- + +In a Nutshell +............. + +The following are brief installation instructions for the impatient. In +case you don't understand some of this, run into trouble of some sort, +or need more elaborate information, refer to the detailed instructions +further below. + + 1. Install the prerequisites, i.e. GNU Emacs, MSYS or Cygwin, a TeX + system, and Ghostscript. + + 2. Open the MSYS shell or a Cygwin shell and change to the directory + containing the unzipped file contents. + + 3. Configure AUCTeX: + + For Emacs: Many people like to install AUCTeX into the pseudo file + system hierarchy set up by the Emacs installation. Assuming Emacs + is installed in 'C:/Program Files/Emacs' and the directory for + local additions of your TeX system, e.g. MiKTeX, is + 'C:/localtexmf', you can do this by typing the following statement + at the shell prompt: + + ./configure --prefix='C:/Program Files/Emacs' \ + --infodir='C:/Program Files/Emacs/info' \ + --with-texmf-dir='C:/localtexmf' + + The commands above is example for common usage. More on + configuration options can be found in the detailed installation + instructions below. + + If the configuration script failed to find all required programs, + make sure that these programs are in your system path and add + directories containing the programs to the 'PATH' environment + variable if necessary. Here is how to do that in W2000/XP: + + 1. On the desktop, right click "My Computer" and select + properties. + 2. Click on "Advanced" in the "System Properties" window. + 3. Select "Environment Variables". + 4. Select "path" in "System Variables" and click "edit". Move to + the front in the line (this might require scrolling) and add + the missing path including drive letter, ended with a + semicolon. + + 4. If there were no further error messages, type + + make + + In case there were, please refer to the detailed description below. + + 5. Finish the installation by typing + + make install + +Detailed Installation Instructions +.................................. + +Installation of AUCTeX under Windows is in itself not more complicated +than on other platforms. However, meeting the prerequisites might +require more work than on some other platforms, and feel less natural. + + If you are experiencing any problems, even if you think they are of +your own making, be sure to report them to <auctex-devel@gnu.org> so +that we can explain things better in future. + + Windows is a problematic platform for installation scripts. The main +problem is that the installation procedure requires consistent file +names in order to find its way in the directory hierarchy, and Windows +path names are a mess. + + The installation procedure tries finding stuff in system search paths +and in Emacs paths. For that to succeed, you have to use the same +syntax and spelling and case of paths everywhere: in your system search +paths, in Emacs' 'load-path' variable, as argument to the scripts. If +your path names contain spaces or other 'shell-unfriendly' characters, +most notably backslashes for directory separators, place the whole path +in '"double quote marks"' whenever you specify it on a command line. + + Avoid 'helpful' magic file names like '/cygdrive/c' and +'C:\PROGRA~1\' like the plague. It is quite unlikely that the scripts +will be able to identify the actual file names involved. Use the full +paths, making use of normal Windows drive letters like ' 'C:/Program +Files/Emacs' ' where required, and using the same combination of upper- +and lowercase letters as in the actual files. File names containing +shell-special characters like spaces or backslashes (if you prefer that +syntax) need to get properly quoted to the shell: the above example used +single quotes for that. + + Ok, now here are the steps to perform: + + 1. You need to unpack the AUCTeX distribution (which you seemingly + have done since you are reading this). It must be unpacked in a + separate installation directory outside of your Emacs file + hierarchy: the installation will later copy all necessary files to + their final destination, and you can ultimately remove the + directory where you unpacked the files. + + Line endings are a problem under Windows. The distribution + contains only text files, and theoretically most of the involved + tools should get along with that. However, the files are processed + by various utilities, and it is conceivable that not all of them + will use the same line ending conventions. If you encounter + problems, it might help if you try unpacking (or checking out) the + files in binary mode, if your tools allow that. + + If you don't have a suitable unpacking tool, skip to the next step: + this should provide you with a working 'unzip' command. + + 2. The installation of AUCTeX will require the MSYS tool set from + <http://www.mingw.org/> or the Cygwin tool set from + <https://cygwin.com/>. The latter is slower and larger (the + download size of the base system is about 15 MB) but comes with a + package manager that allows for updating the tool set and + installing additional packages like, for example, the spell checker + aspell. + + If Cygwin specific paths like '/cygdrive/c' crop up in the course + of the installation, using a non-Cygwin Emacs could conceivably + cause trouble. Using Cygwin either for everything or nothing might + save headaches, _if_ things don't work out. + + 3. Install a current version of Emacs from + <https://ftp.gnu.org/gnu/emacs/windows/>. + + 4. You need a working TeX installation. One popular installation + under Windows is MiKTeX (https://miktex.org/). Another much more + extensive system is TeX Live (https://www.tug.org/texlive/) which + is rather close to its Unix cousins. + + 5. A working copy of Ghostscript (https://www.ghostscript.com/) is + required for preview-latex operation. Examining the output from + gswin32c -h + on a Windows command line should tell you whether your Ghostscript + supports the 'png16m' device needed for PNG support. MiKTeX + apparently comes with its own Ghostscript called 'mgs.exe'. + + 6. Perl (https://www.perl.org/) is needed for rebuilding the + documentation if you are working with a copy from Git or have + touched documentation source files in the preview-latex part. If + the line endings of the file 'preview/latex/preview.dtx' don't + correspond with what Perl calls '\n' when reading text files, + you'll run into trouble. + + 7. Now the fun stuff starts. If you have not yet done so, unpack the + AUCTeX distribution into a separate directory after rereading the + instructions for unpacking above. + + 8. Ready for takeoff. Start some shell (typically 'bash') capable of + running 'configure', change into the installation directory and + call './configure' with appropriate options. + + Typical options you'll want to specify will be + '--prefix=DRIVE:/PATH/TO/EMACS-HIERARCHY' + which tells 'configure' where to perform the installation. It + may also make 'configure' find Emacs automatically; if this + doesn't happen, try '--with-emacs' as described below. All + automatic detection of files and directories restricts itself + to directories below the PREFIX or in the same hierarchy as + the program accessing the files. Usually, directories like + 'man', 'share' and 'bin' will be situated right under PREFIX. + + This option also affects the defaults for placing the Texinfo + documentation files (see also '--infodir' below) and + automatically generated style hooks. + + If you have a central directory hierarchy (not untypical with + Cygwin) for such stuff, you might want to specify its root + here. You stand a good chance that this will be the only + option you need to supply, as long as your TeX-related + executables are in your system path, which they better be for + AUCTeX's operation, anyway. + + '--with-emacs' + if you are installing for a version of Emacs. You can use + '--with-emacs=DRIVE:/PATH/TO/EMACS' to specify the name of the + installed Emacs executable, complete with its path if + necessary (if Emacs is not within a directory specified in + your 'PATH' environment setting). + + '--with-lispdir=DRIVE:/PATH/TO/SITE-LISP' + This option tells a place in 'load-path' below which the files + are situated. The startup files 'auctex.el' and + 'preview-latex.el' will get installed here unless a + subdirectory 'site-start.d' exists which will then be used + instead. The other files from AUCTeX will be installed in a + subdirectory called 'auctex'. + + If you think that you need a different setup, please refer to + the full installation instructions in *note Configure::. + + '--infodir=DRIVE:/PATH/TO/INFO/DIRECTORY' + If you are installing into an Emacs directory, info files have + to be put into the 'info' folder below that directory. The + configuration script will usually try to install into the + folder 'share/info', so you have to override this by + specifying something like '--infodir='C:/Program Files/info'' + for the configure call. + + '--with-auto-dir=DRIVE:/DIR' + Directory containing automatically generated information. You + should not normally need to set this, as '--prefix' should + take care of this. + + '--disable-preview' + Use this option if your Emacs version is unable to support + image display. + + '--with-texmf-dir=DRIVE:/DIR' + This will specify the directory where your TeX installation + sits. If your TeX installation does not conform to the TDS + (TeX directory standard), you may need to specify more options + to get everything in place. + + For more information about any of the above and additional options, + see *note Configure::. + + Some executables might not be found in your path. That is not a + good idea, but you can get around by specifying environment + variables to 'configure': + GS="DRIVE:/PATH/TO/GSWIN32C.EXE" ./configure ... + should work for this purpose. 'gswin32c.exe' is the usual name for + the required _command line_ executable under Windows; in contrast, + 'gswin32.exe' is likely to fail. + + As an alternative to specifying variables for the 'configure' call + you can add directories containing the required executables to the + 'PATH' variable of your Windows system. This is especially a good + idea if Emacs has trouble finding the respective programs later + during normal operation. + + 9. Run 'make' in the installation directory. + + 10. Run 'make install' in the installation directory. + + 11. With Emacs, activation of AUCTeX and preview-latex depends on a + working 'site-start.d' directory or similar setup, since then the + startup files 'auctex.el' and 'preview-latex.el' will have been + placed there. If this has not been done, you should be able to + load the startup files manually with + (load "auctex.el" nil t t) + (load "preview-latex.el" nil t t) + in either a site-wide 'site-start.el' or your personal startup file + (usually accessible as '~/.emacs' or '~/.emacs.d/init.el' from + within Emacs). + + The default configuration of AUCTeX is probably not the best fit + for Windows systems with MiKTeX. You might want to add + (require 'tex-mik) + after loading 'auctex.el' and 'preview-latex.el' in order to get + more appropriate values for some customization options. + + You can always use + + M-x customize-group <RET> AUCTeX <RET> + + in order to customize more stuff, or use the 'Customize' menu. + + 12. Load 'circ.tex' into Emacs and see if you get the 'Command' menu. + Try using it to LaTeX the file. + + 13. Check whether the 'Preview' menu is available in this file. Use + it to generate previews for the document. + + If this barfs and tells you that image type 'png' is not supported, + you can either add PNG support to your Emacs installation or choose + another image format to be used by preview-latex. + + Adding support for an image format usually involves the + installation of a library, e.g. from <http://gnuwin32.sf.net/>. If + you got your Emacs from <https://www.gnu.org/> you might want to + check its README file + (https://ftp.gnu.org/gnu/emacs/windows/README) for details. + + A different image format can be chosen by setting the variable + 'preview-image-type'. While it is recommended to keep the 'dvipng' + or 'png' setting, you can temporarily select a different format + like 'pnm' to check if the lack of PNG support is the only problem + with your Emacs installation. + + Try adding the line + + (setq preview-image-type 'pnm) + + to your init file for a quick test. You should remove the line + after the test again, because PNM files take away *vast* amounts of + disk space, and thus also of load/save time. + + Well, that about is all. Have fun! + + +File: auctex.info, Node: Customizing, Prev: Installation under MS Windows, Up: Installation + +1.2.8 Customizing +----------------- + +Most of the site-specific customization should already have happened +during configuration of AUCTeX. Any further customization can be done +with customization buffers directly in Emacs. Just type 'M-x +customize-group <RET> AUCTeX <RET>' to open the customization group for +AUCTeX or use the menu entries provided in the mode menus. Editing the +file 'tex-site.el' as suggested in former versions of AUCTeX should not +be done anymore because the installation routine will overwrite those +changes. + + You might check some options with a special significance. They are +accessible directly by typing 'M-x customize-option <RET> <option> +<RET>'. + + -- User Option: TeX-macro-global + Directories containing the site's TeX style files. + + Normally, AUCTeX will only allow you to complete macros and +environments which are built-in, specified in AUCTeX style files or +defined by yourself. If you issue the 'M-x TeX-auto-generate-global' +command after loading AUCTeX, you will be able to complete on all macros +available in the standard style files used by your document. To do +this, you must set this variable to a list of directories where the +standard style files are located. The directories will be searched +recursively, so there is no reason to list subdirectories explicitly. +Automatic configuration will already have set the variable for you if it +could use the program 'kpsewhich'. In this case you normally don't have +to alter anything. + + +File: auctex.info, Node: Quick Start, Prev: Installation, Up: Introduction + +1.3 Quick Start +=============== + +AUCTeX is a powerful program offering many features and configuration +options. If you are new to AUCTeX this might be deterrent. Fortunately +you do not have to learn everything at once. This Quick Start Guide +will give you the knowledge of the most important commands and enable +you to prepare your first LaTeX document with AUCTeX after only a few +minutes of reading. + + In this introduction, we assume that AUCTeX is already installed on +your system. If this is not the case, you should read the file +'INSTALL' in the base directory of the unpacked distribution tarball. +These installation instructions are available in this manual as well, +*note Installation::. We also assume that you are familiar with the way +keystrokes are written in Emacs manuals. If not, have a look at the +Emacs Tutorial in the Help menu. + + If AUCTeX is installed in any other way than from the Emacs package +manager (ELPA), you might still need to activate it, by inserting + + (load "auctex.el" nil t t) +in your user init file.(1) + + If AUCTeX is installed from ELPA, the installation procedure already +cares about loading AUCTeX correctly and you *must not* have the line +above in your init file. Note that this also applies if you have the +following line in your init file + + (package-initialize) + + In order to get support for many of the LaTeX packages you will use +in your documents, you should enable document parsing as well, which can +be achieved by putting + + (setq TeX-auto-save t) + (setq TeX-parse-self t) +into your init file. Finally, if you often use '\include' or '\input', +you should make AUCTeX aware of the multifile document structure. You +can do this by inserting + + (setq-default TeX-master nil) + + into your init file. Each time you open a new file, AUCTeX will then +ask you for a master file. + +* Menu: + +* Editing Facilities:: Functions for editing TeX files +* Processing Facilities:: Creating and viewing output, debugging + + ---------- Footnotes ---------- + + (1) This usually is a file in your home directory called '.emacs', or +'.emacs.d/init.el'. + + +File: auctex.info, Node: Editing Facilities, Next: Processing Facilities, Up: Quick Start + +1.3.1 Functions for editing TeX files +------------------------------------- + +1.3.1.1 Making your TeX code more readable +.......................................... + +AUCTeX can do syntax highlighting of your source code, that means +commands will get special colors or fonts. This is enabled by default. +You can disable it locally by typing 'M-x font-lock-mode <RET>'. + + AUCTeX will indent new lines to indicate their syntactical +relationship to the surrounding text. For example, the text of a +'\footnote' or text inside of an environment will be indented relative +to the text around it. If the indenting has gotten wrong after adding +or deleting some characters, use <TAB> to reindent the line, 'M-q' for +the whole paragraph, or 'M-x LaTeX-fill-buffer <RET>' for the whole +buffer. + +1.3.1.2 Entering sectioning commands +.................................... + +Insertion of sectioning macros, that is '\chapter', '\section', +'\subsection', etc. and accompanying '\label' commands may be eased by +using 'C-c C-s'. You will be asked for the section level. As nearly +everywhere in AUCTeX, you can use the <TAB> or <SPC> key to get a list +of available level names, and to auto-complete what you started typing. +Next, you will be asked for the printed title of the section, and last +you will be asked for a label to be associated with the section. + +1.3.1.3 Inserting environments +.............................. + +Similarly, you can insert environments, that is '\begin{}'-'\end{}' +pairs: Type 'C-c C-e', and select an environment type. Again, you can +use <TAB> or <SPC> to get a list, and to complete what you type. +Actually, the list will not only provide standard LaTeX environments, +but also take your '\documentclass' and '\usepackage' commands into +account if you have parsing enabled by setting 'TeX-parse-self' to 't'. +If you use a couple of environments frequently, you can use the <up> and +<down> arrow keys (or 'M-p' and 'M-n') in the minibuffer to get back to +the previously inserted commands. + + Some environments need additional arguments. Often, AUCTeX knows +about this and asks you to enter a value. + +1.3.1.4 Inserting macros +........................ + +'C-c C-m', or simply 'C-c RET' will give you a prompt that asks you for +a LaTeX macro. You can use <TAB> for completion, or the <up>/<down> +arrow keys (or 'M-p' and 'M-n') to browse the command history. In many +cases, AUCTeX knows which arguments a macro needs and will ask you for +that. It even can differentiate between mandatory and optional +arguments--for details, see *note Completion::. + + An additional help for inserting macros is provided by the +possibility to complete macros right in the buffer. With point at the +end of a partially written macro, you can complete it by typing +'M-<TAB>'. + +1.3.1.5 Changing the font +......................... + +AUCTeX provides convenient keyboard shortcuts for inserting macros which +specify the font to be used for typesetting certain parts of the text. +They start with 'C-c C-f', and the last 'C-' combination tells AUCTeX +which font you want: + +'C-c C-f C-b' + Insert bold face '\textbf{-!-}' text. + +'C-c C-f C-i' + Insert italics '\textit{-!-}' text. + +'C-c C-f C-e' + Insert _emphasized_ '\emph{-!-}' text. + +'C-c C-f C-s' + Insert slanted '\textsl{-!-}' text. + +'C-c C-f C-r' + Insert roman '\textrm{-!-}' text. + +'C-c C-f C-f' + Insert sans serif '\textsf{-!-}' text. + +'C-c C-f C-t' + Insert typewriter '\texttt{-!-}' text. + +'C-c C-f C-c' + Insert SMALL CAPS '\textsc{-!-}' text. + +'C-c C-f C-d' + Delete the innermost font specification containing point. + + If you want to change font attributes of existing text, mark it as an +active region, and then invoke the commands. If no region is selected, +the command will be inserted with empty braces, and you can start typing +the changed text. + + Most of those commands will also work in math mode, but then macros +like '\mathbf' will be inserted. + +1.3.1.6 Other useful features +............................. + +AUCTeX also tries to help you when inserting the right "quote" signs for +your language, dollar signs to typeset math, or pairs of braces. It +offers shortcuts for commenting out text ('C-c ;' for the current region +or 'C-c %' for the paragraph you are in). The same keystrokes will +remove the % signs, if the region or paragraph is commented out yet. +With 'TeX-fold-mode', you can hide certain parts (like footnotes, +references etc.) that you do not edit currently. Support for Emacs' +outline mode is provided as well. And there's more, but this is beyond +the scope of this Quick Start Guide. + + +File: auctex.info, Node: Processing Facilities, Prev: Editing Facilities, Up: Quick Start + +1.3.2 Creating and viewing output, debugging +-------------------------------------------- + +1.3.2.1 One Command for LaTeX, helpers, viewers, and printing +............................................................. + +If you have typed some text and want to run LaTeX (or TeX, or other +programs--see below) on it, type 'C-c C-c'. If applicable, you will be +asked whether you want to save changes, and which program you want to +invoke. In many cases, the choice that AUCTeX suggests will be just +what you want: first 'latex', then a viewer. If a 'latex' run produces +or changes input files for 'makeindex', the next suggestion will be to +run that program, and AUCTeX knows that you need to run 'latex' again +afterwards--the same holds for BibTeX. + + When no processor invocation is necessary anymore, AUCTeX will +suggest to run a viewer, or you can chose to create a PostScript file +using 'dvips', or to directly print it. + + Actually, there is another command which comes in handy to compile +documents: type 'C-c C-a' ('TeX-command-run-all') and AUCTeX will +compile the document for you until it is ready and then run the viewer. +This is the same as issuing repeatedly 'C-c C-c' and letting AUCTeX +guess the next command to run. + + At this place, a warning needs to be given: First, although AUCTeX is +really good in detecting the standard situations when an additional +'latex' run is necessary, it cannot detect it always. Second, the +creation of PostScript files or direct printing currently only works +when your output file is a DVI file, not a PDF file. + + Ah, you didn't know you can do both? That brings us to the next +topic. + +1.3.2.2 Choosing an output format +................................. + +From a LaTeX file, you can produce DVI output, or a PDF file directly +via 'pdflatex'. You can switch on source specials for easier navigation +in the output file, or tell 'latex' to stop after an error (usually +'--noninteractive' is used, to allow you to detect all errors in a +single run). + + These options are controlled by toggles, the keystrokes should be +easy to memorize: + +'C-c C-t C-p' + This command toggles between DVI and PDF output + +'C-c C-t C-i' + toggles interactive mode + +'C-c C-t C-s' + toggles SyncTeX (or source specials) support + +'C-c C-t C-o' + toggles usage of Omega/lambda. + + There is also another possibility: compile the document with 'tex' +(or 'latex') and then convert the resulting DVI file to PDF using +'dvips'-'ps2pdf' sequence or 'dvipdfmx' command. If you want to go by +this route, customize 'TeX-PDF-from-DVI' option. Then AUCTeX will +suggest you to run the appropriate command when you type 'C-C C-c'. For +details, see *note Processor Options::. + +1.3.2.3 Debugging LaTeX +....................... + +When AUCTeX runs a program, it creates an output buffer in which it +displays the output of the command. If there is a syntactical error in +your file, 'latex' will not complete successfully. AUCTeX will tell you +that, and you can get to the place where the first error occured by +pressing 'C-c `' (the last character is a backtick). The view will be +split in two windows, the output will be displayed in the lower buffer, +and both buffers will be centered around the place where the error +ocurred. You can then try to fix it in the document buffer, and use the +same keystrokes to get to the next error. This procedure may be +repeated until all errors have been dealt with. By pressing 'C-c C-w' +('TeX-toggle-debug-boxes') you can toggle whether AUCTeX should notify +you of overfull and underfull boxes in addition to regular errors. + + Issue 'M-x TeX-error-overview <RET>' to see a nicely formatted list +of all errors and warnings reported by the compiler. + + If a command got stuck in a seemingly infinite loop, or you want to +stop execution for other reasons, you can use 'C-c C-k' (for "kill"). +Similar to 'C-l', which centers the buffer you are in around your +current position, 'C-c C-l' centers the output buffer so that the last +lines added at the bottom become visible. + +1.3.2.4 Running LaTeX on parts of your document +............................................... + +If you want to check how some part of your text looks like, and do not +want to wait until the whole document has been typeset, then mark it as +a region and use 'C-c C-r'. It behaves just like 'C-c C-c', but it only +uses the document preamble and the region you marked. + + If you are using '\include' or '\input' to structure your document, +try 'C-c C-b' while you are editing one of the included files. It will +run 'latex' only on the current buffer, using the preamble from the +master file. + + +File: auctex.info, Node: Editing, Next: Display, Prev: Introduction, Up: Top + +2 Editing the Document Source +***************************** + +The most commonly used commands/macros of AUCTeX are those which simply +insert templates for often used TeX, LaTeX, or ConTeXt constructs, like +font changes, handling of environments, etc. These features are very +simple, and easy to learn, and help you avoid mistakes like mismatched +braces, or '\begin{}'-'\end{}' pairs. + + Apart from that this chapter contains a description of some features +for entering more specialized sorts of text, for formatting the source +by indenting and filling and for navigating through the document. + +* Menu: + +* Quotes:: Inserting quotes, dollars, and braces +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Marking:: Marking Environments, Sections, or Texinfo Nodes +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking + + +File: auctex.info, Node: Quotes, Next: Font Specifiers, Up: Editing + +2.1 Insertion of Quotes, Dollars, and Braces +============================================ + +Quotation Marks +--------------- + +In TeX, literal double quotes '"like this"' are seldom used, instead two +single quotes are used '``like this'''. To help you insert these +efficiently, AUCTeX allows you to continue to press '"' to insert two +single quotes. To get a literal double quote, press '"' twice. + + -- Command: TeX-insert-quote COUNT + ('"') Insert the appropriate quote marks for TeX. + + Inserts the value of 'TeX-open-quote' (normally '``') or + 'TeX-close-quote' (normally '''') depending on the context. With + prefix argument, always inserts '"' characters. + + -- User Option: TeX-open-quote + String inserted by typing '"' to open a quotation. (*Note + European::, for language-specific quotation mark insertion.) + + -- User Option: TeX-close-quote + String inserted by typing '"' to close a quotation. (*Note + European::, for language-specific quotation mark insertion.) + + -- User Option: TeX-quote-after-quote + Determines the behavior of '"'. If it is non-nil, typing '"' will + insert a literal double quote. The respective values of + 'TeX-open-quote' and 'TeX-close-quote' will be inserted after + typing '"' once again. + + The 'babel' package provides special support for the requirements of +typesetting quotation marks in many different languages. If you use +this package, either directly or by loading a language-specific style +file, you should also use the special commands for quote insertion +instead of the standard quotes shown above. AUCTeX is able to recognize +several of these languages and will change quote insertion accordingly. +*Note European::, for details about this feature and how to control it. + + In case you are using the 'csquotes' package, you should customize +'LaTeX-csquotes-open-quote', 'LaTeX-csquotes-close-quote' and +'LaTeX-csquotes-quote-after-quote'. The quotation characters will only +be used if both variables--'LaTeX-csquotes-open-quote' and +'LaTeX-csquotes-close-quote'--are non-empty strings. But then the +'csquotes'-related values will take precedence over the +language-specific ones. + +Dollar Signs +------------ + +In AUCTeX, dollar signs should match like they do in TeX. This has been +partially implemented, we assume dollar signs always match within a +paragraph. By default, the first '$' you insert in a paragraph will do +nothing special. The second '$' will match the first. This will be +indicated by moving the cursor temporarily over the first dollar sign. + + -- Command: TeX-insert-dollar ARG + ('$') Insert dollar sign. + + Show matching dollar sign if this dollar sign end the TeX math + mode. + + With optional ARG, insert that many dollar signs. + + TeX and LaTeX users often look for a way to insert inline equations +like '$...$' or '\(...\)' simply typing '$'. AUCTeX helps them through +the customizable variable 'TeX-electric-math'. + + -- User Option: TeX-electric-math + If the variable is non-nil and you type '$' outside math mode, + AUCTeX will automatically insert the opening and closing symbols + for an inline equation and put the point between them. The opening + symbol will blink when 'blink-matching-paren' is non-nil. If + 'TeX-electric-math' is nil, typing '$' simply inserts '$' at point, + this is the default. + + Besides 'nil', possible values for this variable are '(cons "$" + "$")' for TeX inline equations '$...$', and '(cons "\\(" "\\)")' + for LaTeX inline equations '\(...\)'. + + If the variable is non-nil and point is inside math mode right + between a couple of single dollars, pressing '$' will insert + another pair of dollar signs and leave the point between them. + Thus, if 'TeX-electric-math' is set to '(cons "$" "$")' you can + easily obtain a TeX display equation '$$...$$' by pressing '$' + twice in a row. (Note that you should not use double dollar signs + in LaTeX because this practice can lead to wrong spacing in typeset + documents.) + + In addition, when the variable is non-nil and there is an active + region outside math mode, typing '$' will put around the active + region symbols for opening and closing inline equation and keep the + region active, leaving point after the closing symbol. By pressing + repeatedly '$' while the region is active you can toggle between an + inline equation, a display equation, and no equation. To be + precise, '$...$' is replaced by '$$...$$', whereas '\(...\)' is + replaced by '\[...\]'. + + If you want to automatically insert '$...$' in plain TeX files, and +'\(...\)' in LaTeX files by pressing '$', add the following to your init +file + (add-hook 'plain-TeX-mode-hook + (lambda () (set (make-local-variable 'TeX-electric-math) + (cons "$" "$")))) + (add-hook 'LaTeX-mode-hook + (lambda () (set (make-local-variable 'TeX-electric-math) + (cons "\\(" "\\)")))) + + Note that Texinfo mode does nothing special for '$'. It inserts +dollar sign(s) just in the same way as the other normal keys do. + +Braces +------ + +To avoid unbalanced braces, it is useful to insert them pairwise. You +can do this by typing 'C-c {'. + + -- Command: TeX-insert-braces + ('C-c {') Make a pair of braces and position the cursor to type + inside of them. If there is an active region, put braces around it + and leave point after the closing brace. + + When writing complex math formulas in LaTeX documents, you sometimes +need to adjust the size of braces with pairs of macros like +'\left'-'\right', '\bigl'-'\bigr' and so on. You can avoid unbalanced +pairs with the help of 'TeX-insert-macro', bound to 'C-c C-m' or 'C-c +<RET>' (*note Completion::). If you insert left size adjusting macros +such as '\left', '\bigl' etc. with 'TeX-insert-macro', it asks for left +brace to use and supplies automatically right size adjusting macros such +as '\right', '\bigr' etc. and corresponding right brace in addtion to +the intended left macro and left brace. + + The completion by 'TeX-insert-macro' also applies when entering +macros such as '\langle', '\lfloor' and '\lceil', which produce the left +part of the paired braces. For example, inserting '\lfloor' by 'C-c +C-m' is immediately followed by the insertion of '\rfloor'. In +addition, if the point was located just after '\left' or its friends, +the corresponding '\right' etc. will be inserted in front of '\rfloor'. +In both cases, active region is honored. + + As a side effect, when 'LaTeX-math-mode' (*note Mathematics::) is on, +just typing '`(' inserts not only '\langle', but also '\rangle'. + + If you do not like such auto completion at all, it can be disabled by +a user option. + + -- User Option: TeX-arg-right-insert-p + If this option is turned off, the automatic supply of the right + macros and braces is suppressed. + + When you edit LaTeX documents, you can enable automatic brace pairing +when typing '(', '{' and '['. + + -- User Option: LaTeX-electric-left-right-brace + If this option is on, just typing '(', '{' or '[' immediately adds + the corresponding right brace ')', '}' or ']'. The point is left + after the opening brace. If there is an active region, braces are + put around it. + + They recognize the preceding backslash or size adjusting macros + such as '\left', '\bigl' etc., so the following completions will + occur: + + * (when typing single left brace) + + - '(' -> '()' + + - '{' -> '{}' + + - '[' -> '[]' + + * (when typing left brace just after a backslash) + + - '\(' -> '\(\)' + + - '\{' -> '\{\}' + + - '\[' -> '\[\]' + + * (when typing just after '\left' or '\bigl') + + - '\left(' -> '\left(\right)' + + - '\bigl[' -> '\bigl[\bigr]' + + * (when typing just after '\Bigl\') + + - '\Bigl\{' -> '\Bigl\{\Bigr\}' + + This auto completion feature may be a bit annoying when editing an + already existing LaTeX document. In that case, use 'C-u 1' or + 'C-q' before typing '(', '{' or '['. Then no completion is done + and just a single left brace is inserted. In fact, with optional + prefix ARG, just that many open braces are inserted without any + completion. + + +File: auctex.info, Node: Font Specifiers, Next: Sectioning, Prev: Quotes, Up: Editing + +2.2 Inserting Font Specifiers +============================= + +Perhaps the most used keyboard commands of AUCTeX are the short-cuts +available for easy insertion of font changing macros. + + If you give an argument (that is, type 'C-u') to the font command, +the innermost font will be replaced, i.e. the font in the TeX group +around point will be changed. The following table shows the available +commands, with '-!-' indicating the position where the text will be +inserted. + +'C-c C-f C-b' + Insert bold face '\textbf{-!-}' text. + +'C-c C-f C-m' + Insert medium face '\textmd{-!-}' text. + +'C-c C-f C-i' + Insert italics '\textit{-!-}' text. + +'C-c C-f C-e' + Insert _emphasized_ '\emph{-!-}' text. + +'C-c C-f C-s' + Insert slanted '\textsl{-!-}' text. + +'C-c C-f C-r' + Insert roman '\textrm{-!-}' text. + +'C-c C-f C-f' + Insert sans serif '\textsf{-!-}' text. + +'C-c C-f C-t' + Insert typewriter '\texttt{-!-}' text. + +'C-c C-f C-c' + Insert SMALL CAPS '\textsc{-!-}' text. + +'C-c C-f C-l' + Insert upper lower case '\textulc{-!-}' text. + +'C-c C-f C-w' + Insert SWASH '\textsw{-!-}' text. + +'C-c C-f C-n' + Insert normal '\textnormal{-!-}' text. + +'C-c C-f C-d' + Delete the innermost font specification containing point. + + -- Command: TeX-font REPLACE WHAT + ('C-c C-f') Insert template for font change command. + + If REPLACE is not nil, replace current font. WHAT determines the + font to use, as specified by 'TeX-font-list'. + + -- User Option: TeX-font-list + List of fonts used by 'TeX-font'. + + Each entry is a list with three elements. The first element is the + key to activate the font. The second element is the string to + insert before point, and the third element is the string to insert + after point. An optional fourth element means always replace if + not nil. + + -- User Option: LaTeX-font-list + List of fonts used by 'TeX-font' in LaTeX mode. It has the same + structure as 'TeX-font-list'. + + +File: auctex.info, Node: Sectioning, Next: Environments, Prev: Font Specifiers, Up: Editing + +2.3 Inserting chapters, sections, etc. +====================================== + +Insertion of sectioning macros, that is '\chapter', '\section', +'\subsection', etc. and accompanying '\label''s may be eased by using +'C-c C-s'. This command is highly customizable, the following describes +the default behavior. + + When invoking you will be asked for a section macro to insert. An +appropriate default is automatically selected by AUCTeX, that is either: +at the top of the document; the top level sectioning for that document +style, and any other place: The same as the last occurring sectioning +command. + + Next, you will be asked for the actual name of that section, and last +you will be asked for a label to be associated with that section. The +label will be prefixed by the value specified in 'LaTeX-section-hook'. + + -- Command: LaTeX-section ARG + ('C-c C-s') Insert a sectioning command. + + Determine the type of section to be inserted, by the argument ARG. + + * If ARG is nil or missing, use the current level. + * If ARG is a list (selected by C-u), go downward one level. + * If ARG is negative, go up that many levels. + * If ARG is positive or zero, use absolute level: + + 0 : part + + 1 : chapter + + 2 : section + + 3 : subsection + + 4 : subsubsection + + 5 : paragraph + + 6 : subparagraph + + The following variables can be set to customize the function. + + 'LaTeX-section-hook' + Hooks to be run when inserting a section. + 'LaTeX-section-label' + Prefix to all section references. + + The precise behavior of 'LaTeX-section' is defined by the contents of +'LaTeX-section-hook'. + + -- User Option: LaTeX-section-hook + List of hooks to run when a new section is inserted. + + The following variables are set before the hooks are run + + 'LaTeX-level' + Numeric section level, default set by prefix arg to + 'LaTeX-section'. + 'LaTeX-name' + Name of the sectioning command, derived from 'LaTeX-level'. + 'LaTeX-title' + The title of the section, default to an empty string. + 'LaTeX-toc' + Entry for the table of contents list, default nil. + 'LaTeX-done-mark' + Position of point afterwards, default nil meaning after the + inserted text. + + A number of hooks are already defined. Most likely, you will be + able to get the desired functionality by choosing from these hooks. + + 'LaTeX-section-heading' + Query the user about the name of the sectioning command. + Modifies 'LaTeX-level' and 'LaTeX-name'. + 'LaTeX-section-title' + Query the user about the title of the section. Modifies + 'LaTeX-title'. + 'LaTeX-section-toc' + Query the user for the toc entry. Modifies 'LaTeX-toc'. + 'LaTeX-section-section' + Insert LaTeX section command according to 'LaTeX-name', + 'LaTeX-title', and 'LaTeX-toc'. If 'LaTeX-toc' is nil, no toc + entry is inserted. If 'LaTeX-toc' or 'LaTeX-title' are empty + strings, 'LaTeX-done-mark' will be placed at the point they + should be inserted. + 'LaTeX-section-label' + Insert a label after the section command. Controlled by the + variable 'LaTeX-section-label'. + + To get a full featured 'LaTeX-section' command, insert + + (setq LaTeX-section-hook + '(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-toc + LaTeX-section-section + LaTeX-section-label)) + + in your init file such as 'init.el' or '.emacs'. + + The behavior of 'LaTeX-section-label' is determined by the variable +'LaTeX-section-label'. + + -- User Option: LaTeX-section-label + Default prefix when asking for a label. + + If it is a string, it is used unchanged for all kinds of sections. + If it is nil, no label is inserted. If it is a list, the list is + searched for a member whose car is equal to the name of the + sectioning command being inserted. The cdr is then used as the + prefix. If the name is not found, or if the cdr is nil, no label + is inserted. + + By default, chapters have a prefix of 'cha:' while sections and + subsections have a prefix of 'sec:'. Labels are not automatically + inserted for other types of sections. + + +File: auctex.info, Node: Environments, Next: Mathematics, Prev: Sectioning, Up: Editing + +2.4 Inserting Environment Templates +=================================== + +A large apparatus is available that supports insertions of environments, +that is '\begin{}' -- '\end{}' pairs. + + AUCTeX is aware of most of the actual environments available in a +specific document. This is achieved by examining your '\documentclass' +command, and consulting a precompiled list of environments available in +a large number of styles. + + Most of these are described further in the following sections, and +you may easily specify more. *Note Customizing Environments::. + + You insert an environment with 'C-c C-e', and select an environment +type. Depending on the environment, AUCTeX may ask more questions about +the optional parts of the selected environment type. With 'C-u C-c C-e' +you will change the current environment. + + -- Command: LaTeX-environment ARG + ('C-c C-e') AUCTeX will prompt you for an environment to insert. + At this prompt, you may press <TAB> or <SPC> to complete a + partially written name, and/or to get a list of available + environments. After selection of a specific environment AUCTeX may + prompt you for further specifications. + + If the optional argument ARG is non-nil (i.e. you have given a + prefix argument), the current environment is modified and no new + environment is inserted. + + AUCTeX helps you adding labels to environments which use them, such +as 'equation', 'figure', 'table', etc... When you insert one of the +supported environments with 'C-c C-e', you will be automatically +prompted for a label. You can select the prefix to be used for such +environments with the 'LaTeX-label-alist' variable. + -- User Option: LaTeX-label-alist + List the prefixes to be used for the label of each supported + environment. + + This is an alist whose car is the environment name, and the cdr + either the prefix or a symbol referring to one. + + If the name is not found, or if the cdr is nil, no label is + automatically inserted for that environment. + + If you want to automatically insert a label for a environment but + with an empty prefix, use the empty string '""' as the cdr of the + corresponding entry. + + As a default selection, AUCTeX will suggest the environment last +inserted or, as the first choice the value of the variable +'LaTeX-default-environment'. + + -- User Option: LaTeX-default-environment + Default environment to insert when invoking 'LaTeX-environment' + first time. When the current environment is 'document', it is + overriden by 'LaTeX-default-document-environment'. + + -- Variable: LaTeX-default-document-environment + Default environment when invoking 'LaTeX-environment' and the + current environment is 'document'. It is intended to be used in + LaTeX class style files. For example, in 'beamer.el' it is set to + 'frame', in 'letter.el' to 'letter', and in 'slides.el' to 'slide'. + + If the document is empty, or the cursor is placed at the top of the +document, AUCTeX will default to insert a 'document' environment +prompting also for the insertion of '\documentclass' and '\usepackage' +macros. You will be prompted for a new package until you enter nothing. +If you do not want to insert any '\usepackage' at all, just press <RET> +at the first 'Packages' prompt. + + AUCTeX distinguishes normal and expert environments. By default, it +will offer completion only for normal environments. This behavior is +controlled by the user option 'TeX-complete-expert-commands'. + + -- User Option: TeX-complete-expert-commands + Complete macros and environments marked as expert commands. + + Possible values are nil, t, or a list of style names. + + nil + Don't complete expert commands (default). + t + Always complete expert commands. + (STYLES ...) + Only complete expert commands of STYLES. + +* Menu: + +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments + + You can close the current environment with 'C-c ]', but we suggest +that you use 'C-c C-e' to insert complete environments instead. + + -- Command: LaTeX-close-environment + ('C-c ]') Insert an '\end' that matches the current environment. + + AUCTeX offers keyboard shortcuts for moving point to the beginning +and to the end of the current environment. + -- Command: LaTeX-find-matching-begin + ('C-M-a') Move point to the '\begin' of the current environment. + + If this command is called inside a comment and + 'LaTeX-syntactic-comments' is enabled, try to find the environment + in commented regions with the same comment prefix. + + -- Command: LaTeX-find-matching-end + ('C-M-e') Move point to the '\end' of the current environment. + + If this command is called inside a comment and + 'LaTeX-syntactic-comments' is enabled, try to find the environment + in commented regions with the same comment prefix. + + +File: auctex.info, Node: Equations, Next: Floats, Up: Environments + +2.4.1 Equations +--------------- + +When inserting equation-like environments, the '\label' will have a +default prefix, which is controlled by the following variables: + + -- User Option: LaTeX-equation-label + Prefix to use for 'equation' labels. + + -- User Option: LaTeX-eqnarray-label + Prefix to use for 'eqnarray' labels. + + -- User Option: LaTeX-amsmath-label + Prefix to use for amsmath equation labels. Amsmath equations + include 'align', 'alignat', 'xalignat', 'multline', 'flalign' and + 'gather'. + + +File: auctex.info, Node: Floats, Next: Itemize-like, Prev: Equations, Up: Environments + +2.4.2 Floats +------------ + +Figures and tables (i.e., floats) may also be inserted using AUCTeX. +After choosing either 'figure' or 'table' in the environment list +described above, you will be prompted for a number of additional things. + +FLOAT POSITION + This is the optional argument of float environments that controls + how they are placed in the final document. In LaTeX this is a + sequence of the letters 'htbp' as described in the LaTeX manual. + The value will default to the value of 'LaTeX-float'. + +CAPTION + This is the caption of the float. The default is to insert the + caption at the bottom of the float. You can specify floats where + the caption should be placed at the top with + 'LaTeX-top-caption-list'. + +SHORT CAPTION + If the specified caption is greater than a specific length, then a + short caption is prompted for and it is inserted as an optional + argument to the '\caption' macro. The length that a caption needs + to be before prompting for a short version is controlled by + 'LaTeX-short-caption-prompt-length'. + +LABEL + The label of this float. The label will have a default prefix, + which is controlled by the variables 'LaTeX-figure-label' and + 'LaTeX-table-label'. + + Moreover, you will be asked if you want the contents of the float +environment to be horizontally centered. Upon a positive answer a +'\centering' macro will be inserted at the beginning of the float +environment. + + -- User Option: LaTeX-float + Default placement for floats. + + -- User Option: LaTeX-figure-label + Prefix to use for figure labels. + + -- User Option: LaTeX-table-label + Prefix to use for table labels. + + -- User Option: LaTeX-top-caption-list + List of float environments with top caption. + + -- User Option: LaTeX-short-caption-prompt-length + Number of chars a caption should be before prompting for a short + caption. + + +File: auctex.info, Node: Itemize-like, Next: Tabular-like, Prev: Floats, Up: Environments + +2.4.3 Itemize-like Environments +------------------------------- + +In an itemize-like environment, nodes (i.e., '\item's) may be inserted +using 'C-c <LFD>'. + + -- Command: LaTeX-insert-item + ('C-c <LFD>') Close the current item, move to the next line and + insert an appropriate '\item' for the current environment. That + is, 'itemize' and 'enumerate' will have '\item ' inserted, while + 'description' will have '\item[] ' inserted. + + -- User Option: TeX-arg-item-label-p + If non-nil, you will always be asked for optional label in items. + Otherwise, you will be asked only in description environments. + + +File: auctex.info, Node: Tabular-like, Next: Customizing Environments, Prev: Itemize-like, Up: Environments + +2.4.4 Tabular-like Environments +------------------------------- + +When inserting Tabular-like environments, that is, 'tabular' 'array' +etc., you will be prompted for a template for that environment. Related +variables: + + -- User Option: LaTeX-default-format + Default format string for array and tabular environments. + + -- User Option: LaTeX-default-width + Default width for minipage and tabular* environments. + + -- User Option: LaTeX-default-position + Default position string for array and tabular environments. If + nil, act like the empty string is given, but don't prompt for a + position. + + AUCTeX calculates the number of columns from the format string and +inserts the suitable number of ampersands. + + You can use 'C-c <LFD>' ('LaTeX-insert-item') to terminate rows in +these environments. It supplies line break macro '\\' and inserts the +suitable number of ampersands on the next line. AUCTeX also supports +the '*{num}{cols}' notation (which may contain another '*'-expression) +in the format string when calculating the number of ampersands. Please +note that 'num' and 'cols' must be enclosed in braces; expressions like +'*2l' are not recognized correctly by the algorithm. + + -- Command: LaTeX-insert-item + ('C-c <LFD>') Close the current row with '\\', move to the next + line and insert an appropriate number of ampersands for the current + environment. + + Similar supports are provided for various amsmath environments such +as 'align', 'gather', 'alignat', 'matrix' etc. Try typing 'C-c <LFD>' +in these environments. It recognizes the current environment and does +the appropriate job depending on the context. + + +File: auctex.info, Node: Customizing Environments, Prev: Tabular-like, Up: Environments + +2.4.5 Customizing Environments +------------------------------ + +*Note Adding Environments::, for how to customize the list of known +environments. + + +File: auctex.info, Node: Mathematics, Next: Completion, Prev: Environments, Up: Editing + +2.5 Entering Mathematics +======================== + +TeX is written by a mathematician, and has always contained good support +for formatting mathematical text. AUCTeX supports this tradition, by +offering a special minor mode for entering text with many mathematical +symbols. You can enter this mode by typing 'C-c ~'. + + -- Command: LaTeX-math-mode + ('C-c ~') Toggle LaTeX Math mode. This is a minor mode rebinding + the key 'LaTeX-math-abbrev-prefix' to allow easy typing of + mathematical symbols. '`' will read a character from the keyboard, + and insert the symbol as specified in 'LaTeX-math-default' and + 'LaTeX-math-list'. If given a prefix argument, the symbol will be + surrounded by dollar signs. + + You can use another prefix key (instead of '`') by setting the +variable 'LaTeX-math-abbrev-prefix'. + + To enable LaTeX Math mode by default, add the following in your init +file such as 'init.el' or '.emacs': + (add-hook 'LaTeX-mode-hook #'LaTeX-math-mode) + + -- User Option: LaTeX-math-abbrev-prefix + A string containing the prefix of 'LaTeX-math-mode' commands; This + value defaults to '`'. + + The string has to be a key or key sequence in a format understood + by the 'kbd' macro. This corresponds to the syntax usually used in + the manuals for Emacs Lisp. + + The variable 'LaTeX-math-list' allows you to add your own mappings. + + -- User Option: LaTeX-math-list + A list containing user-defined keys and commands to be used in + LaTeX Math mode. Each entry should be a list of two to four + elements. + + First, the key to be used after 'LaTeX-math-abbrev-prefix' for + macro insertion. The key can be a character (e.g. '?o') for a + single stroke or a string (e.g. '"o a"') for a multi-stroke + binding. If it is nil, the symbol has no associated keystroke (it + is available in the menu, though). + + Second, a string representing the name of the macro (without a + leading backslash.) + + Third, a string representing the name of a submenu the command + should be added to. Use a list of strings in case of nested menus. + + Fourth, the position of a Unicode character to be displayed in the + menu alongside the macro name. This is an integer value. + + -- User Option: LaTeX-math-menu-unicode + Whether the LaTeX Math menu should try using Unicode for effect. + Your Emacs built must be able to display include Unicode characters + in menus for this feature. + + AUCTeX's reference card 'tex-ref.tex' includes a list of all math +mode commands. + + AUCTeX can help you write subscripts and superscripts in math +constructs by automatically inserting a pair of braces after typing <_> +or <^> respectively and putting point between the braces. In order to +enable this feature, set the variable 'TeX-electric-sub-and-superscript' +to a non-nil value. + + -- User Option: TeX-electric-sub-and-superscript + If non-nil, insert braces after typing <^> and <_> in math mode. + + You can automatically turn off input methods, used to input non-ascii +characters, when you begin to enter math constructs. + + -- User Option: TeX-math-input-method-off-regexp + Input method matching this regular expression is turned off when + '$' is typed to begin math mode or a math environment is inserted + by 'C-c C-e' ('LaTeX-environment'). + + +File: auctex.info, Node: Completion, Next: Marking, Prev: Mathematics, Up: Editing + +2.6 Completion +============== + +Emacs lisp programmers probably know the 'lisp-complete-symbol' command +which was bound to 'M-<TAB>' until completion-at-point became the new +standard completion facility (see below). Users of the wonderful ispell +mode know and love the 'ispell-complete-word' command from that package. +Similarly, AUCTeX has a 'TeX-complete-symbol' command, by default bound +to 'M-<TAB>' which is equivalent to 'C-M-i'. Using +'TeX-complete-symbol' makes it easier to type and remember the names of +long LaTeX macros. + + In order to use 'TeX-complete-symbol', you should write a backslash +and the start of the macro. Typing 'M-<TAB>' will now complete as much +of the macro, as it unambiguously can. For example, if you type +''\renewc'' and then 'M-<TAB>', it will expand to ''\renewcommand''. +But there's more: if point is just after '\begin{', then +'TeX-complete-symbol' will complete LaTeX environments, etc. This is +controlled by 'TeX-complete-list'. + + -- Command: TeX-complete-symbol + ('M-<TAB>') Complete TeX symbol before point. + + -- Variable: TeX-complete-list + List of ways to complete the preceding text. + + Each entry is a list with the following elements: + + 1. Regexp matching the preceding text or a predicate of arity 0 + which returns non-nil and sets 'match-data' appropriately if + it is applicable. + 2. A number indicating the subgroup in the regexp containing the + text. + 3. A function returning an alist of possible completions. + 4. Text to append after a succesful completion. + + Or alternatively: + + 1. Regexp matching the preceding text. + 2. Function to do the actual completion. + + More recent Emacs versions have a new completion mechanism. Modes +may define and register custom 'completion-at-point' functions and when +the user invokes 'completion-at-point' (usually bound to 'M-<TAB>'), all +such registered functions are consulted for checking for possible +completions. Modern completion UIs like company-mode support this +completion-at-point facility. + + -- Function: TeX--completion-at-point + AUCTeX's completion-at-point function which is automatically added + to 'completion-at-point-functions' in TeX and LaTeX buffers. + + It offers the same completion candidates as would + 'TeX-complete-symbol' (and is also controlled by + 'TeX-complete-list') except that it doesn't fall back on + 'ispell-complete-word' which would be awkward with completion UIs + like company-mode. + + A more direct way to insert a macro is with 'TeX-insert-macro', bound +to 'C-c C-m' which is equivalent to 'C-c <RET>'. It has the advantage +over completion that it knows about the argument of most standard LaTeX +macros, and will prompt for them. It also knows about the type of the +arguments, so it will for example give completion for the argument to +'\include'. Some examples are listed below. + + -- Command: TeX-insert-macro + ('C-c C-m' or 'C-c <RET>') Prompt (with completion) for the name of + a TeX macro, and if AUCTeX knows the macro, prompt for each + argument. + + As a default selection, AUCTeX will suggest the macro last inserted +or, as the first choice the value of the variable 'TeX-default-macro'. + + -- User Option: TeX-default-macro + Default macro to insert when invoking 'TeX-insert-macro' first + time. + + -- User Option: TeX-insert-macro-default-style + Specifies whether 'TeX-insert-macro' will ask for all optional + arguments. + + If set to the symbol 'show-optional-args', 'TeX-insert-macro' asks + for optional arguments of TeX marcos, unless the previous optional + argument has been rejected. If set to 'show-all-optional-args', + 'TeX-insert-macro' asks for all optional arguments. + 'mandatory-args-only', 'TeX-insert-macro' asks only for mandatory + arguments. When 'TeX-insert-macro' is called with prefix argument + ('C-u'), it's the other way round. + + Note that for some macros, there are special mechanisms, e.g. + 'TeX-arg-cite-note-p' and 'LaTeX-includegraphics-options-alist'. + + A faster alternative is to enable the option 'TeX-electric-escape'. + + -- User Option: TeX-electric-escape + If this is non-nil, typing the TeX escape character '\' will invoke + the command 'TeX-electric-macro'. + + In Texinfo mode, the command is invoked by '@' instead. + + The difference between 'TeX-insert-macro' and 'TeX-electric-macro' is +that space key <SPC> will complete and exit from the minibuffer in +'TeX-electric-macro'. Use <TAB> if you merely want to complete. + + -- Command: TeX-electric-macro + Prompt (with completion) for the name of a TeX macro, and if AUCTeX + knows the macro, prompt for each argument. Space (<SPC>) will + complete and exit. + + By default AUCTeX will put an empty set braces '{}' after a macro +with no arguments to stop it from eating the next whitespace. This is +suppressed inside math mode and can be disabled totally by setting +'TeX-insert-braces' to nil. + + -- User Option: TeX-insert-braces + If non-nil, append a empty pair of braces after inserting a macro + with no arguments. + + -- User Option: TeX-insert-braces-alist + Control the insertion of a pair of braces after a macro on a per + macro basis. + + This variable is an alist. Each element is a cons cell, whose car + is the macro name, and the cdr is non-nil or nil, depending on + whether a pair of braces should be, respectively, appended or not + to the macro. + + If a macro has an element in this variable, AUCTeX will use its + value to decide what to do, whatever the value of the variable + 'TeX-insert-braces'. + + Completions work because AUCTeX can analyze TeX files, and store +symbols in Emacs Lisp files for later retrieval. *Note Automatic::, for +more information. + + AUCTeX distinguishes normal and expert macros. By default, it will +offer completion only for normal commands. This behavior can be +controlled using the user option 'TeX-complete-expert-commands'. + + -- User Option: TeX-complete-expert-commands + Complete macros and environments marked as expert commands. + + Possible values are nil, t, or a list of style names. + + nil + Don't complete expert commands (default). + t + Always complete expert commands. + (STYLES ...) + Only complete expert commands of STYLES. + + AUCTeX will also make completion for many macro arguments, for +example existing labels when you enter a '\ref' macro with +'TeX-insert-macro' or 'TeX-electric-macro', and BibTeX entries when you +enter a '\cite' macro. For this kind of completion to work, parsing +must be enabled as described in *note Parsing Files::. For '\cite' you +must also make sure that the BibTeX files have been saved at least once +after you enabled automatic parsing on save, and that the basename of +the BibTeX file does not conflict with the basename of one of TeX files. + + +File: auctex.info, Node: Marking, Next: Commenting, Prev: Completion, Up: Editing + +2.7 Marking Environments, Sections, or Texinfo Nodes +==================================================== + +You can mark the current environment by typing 'C-c .', or the current +section by typing 'C-c *'. + + In Texinfo documents you can type 'C-M-h' to mark the current node. + + When the region is set, the point is moved to its beginning and the +mark to its end. + +* Menu: + +* Marking (LaTeX):: LaTeX Commands for Marking Environments and Sections +* Marking (Texinfo):: Texinfo Commands for Marking Environments, Sections, and Nodes + + +File: auctex.info, Node: Marking (LaTeX), Next: Marking (Texinfo), Up: Marking + +2.7.1 LaTeX Commands for Marking Environments and Sections +---------------------------------------------------------- + + -- Command: LaTeX-mark-section + ('C-c *') Set mark at end of current logical section, and point at + top. + + With a non-nil prefix argument, mark only the region from the + current section start to the next sectioning command. Thereby + subsections are not being marked. Otherwise, any included + subsections are also marked along with current section. + + -- Command: LaTeX-mark-environment + ('C-c .') Set mark to the end of the current environment and point + to the matching beginning. + + If a prefix argument is given, mark the respective number of + enclosing environments. The command will not work properly if + there are unbalanced begin-end pairs in comments and verbatim + environments. + + +File: auctex.info, Node: Marking (Texinfo), Prev: Marking (LaTeX), Up: Marking + +2.7.2 Texinfo Commands for Marking Environments and Sections +------------------------------------------------------------ + + -- Command: Texinfo-mark-section + ('C-c *') Mark the current section, with inclusion of any + containing node. + + The current section is detected as starting by any of the + structuring commands matched by the regular expression in the + variable 'outline-regexp' which in turn is a regular expression + matching any element of the variable 'texinfo-section-list'. + + With a non-nil prefix argument, mark only the region from the + current section start to the next sectioning command. Thereby + subsections are not being marked. Otherwise, any included + subsections are also marked. + + Note that when the current section is starting immediately after a + node command, then the node command is also marked as part of the + section. + + -- Command: Texinfo-mark-environment + ('C-c .') Set mark to the end of the current environment and point + to the matching beginning. + + If a prefix argument is given, mark the respective number of + enclosing environments. The command will not work properly if + there are unbalanced begin-end pairs in comments and verbatim + environments. + + -- Command: Texinfo-mark-node + ('C-M-h') Mark the current node. This is the node in which point + is located. It is starting at the previous occurrence of the + keyword '@node' and ending at next occurrence of the keywords + '@node' or '@bye'. + + +File: auctex.info, Node: Commenting, Next: Indenting, Prev: Marking, Up: Editing + +2.8 Commenting +============== + +It is often necessary to comment out temporarily a region of TeX or +LaTeX code. This can be done with the commands 'C-c ;' and 'C-c %'. +'C-c ;' will comment out all lines in the current region, while 'C-c %' +will comment out the current paragraph. Type 'C-c ;' again to uncomment +all lines of a commented region, or 'C-c %' again to uncomment all +comment lines around point. These commands will insert or remove a +single '%' respectively. + + -- Command: TeX-comment-or-uncomment-region + ('C-c ;') Add or remove '%' from the beginning of each line in the + current region. Uncommenting works only if the region encloses + solely commented lines. If AUCTeX should not try to guess if the + region should be commented or uncommented the commands + 'TeX-comment-region' and 'TeX-uncomment-region' can be used to + explicitly comment or uncomment the region in concern. + + -- Command: TeX-comment-or-uncomment-paragraph + ('C-c %') Add or remove '%' from the beginning of each line in the + current paragraph. When removing '%' characters the paragraph is + considered to consist of all preceding and succeeding lines + starting with a '%', until the first non-comment line. + + +File: auctex.info, Node: Indenting, Next: Filling, Prev: Commenting, Up: Editing + +2.9 Indenting +============= + +Indentation means the addition of whitespace at the beginning of lines +to reflect special syntactical constructs. This makes it easier to see +the structure of the document, and to catch errors such as a missing +closing brace. Thus, the indentation is done for precisely the same +reasons that you would indent ordinary computer programs. + + Indentation is done by LaTeX environments and by TeX groups, that is +the body of an environment is indented by the value of +'LaTeX-indent-level' (default 2). Also, items of an 'itemize-like' +environment are indented by the value of 'LaTeX-item-indent', default +-2. (Items are identified with the help of 'LaTeX-item-regexp'.) If +more environments are nested, they are indented 'accumulated' just like +most programming languages usually are seen indented in nested +constructs. + + You can explicitly indent single lines, usually by pressing <TAB>, or +marked regions by calling 'indent-region' on it. If you have +'auto-fill-mode' enabled and a line is broken while you type it, Emacs +automatically cares about the indentation in the following line. If you +want to have a similar behavior upon typing <RET>, you can customize the +variable 'TeX-newline-function' and change the default of 'newline' +which does no indentation to 'newline-and-indent' which indents the new +line or 'reindent-then-newline-and-indent' which indents both the +current and the new line. + + There are certain LaTeX environments which should be indented in a +special way, like 'tabular' or 'verbatim'. Those environments may be +specified in the variable 'LaTeX-indent-environment-list' together with +their special indentation functions. Taking the 'verbatim' environment +as an example you can see that 'current-indentation' is used as the +indentation function. This will stop AUCTeX from doing any indentation +in the environment if you hit <TAB> for example. + + There are environments in 'LaTeX-indent-environment-list' which do +not bring a special indentation function with them. This is due to the +fact that first the respective functions are not implemented yet and +second that filling will be disabled for the specified environments. +This shall prevent the source code from being messed up by accidently +filling those environments with the standard filling routine. If you +think that providing special filling routines for such environments +would be an appropriate and challenging task for you, you are invited to +contribute. (*Note Filling::, for further information about the filling +functionality.) + + The check for the indentation function may be enabled or disabled by +customizing the variable 'LaTeX-indent-environment-check'. + + For tabular-like environments, AUCTeX has a built-in function to +indent according to preceding '&' signs and assigns it to all known +tabular-like environments in the default value of +'LaTeX-indent-environment-list'. + + As a side note with regard to formatting special environments: Newer +Emacsen include 'align.el' and therefore provide some support for +formatting 'tabular' and 'tabbing' environments with the function +'align-current' which will nicely align columns in the source code. + + AUCTeX is able to format commented parts of your code just as any +other part. This means LaTeX environments and TeX groups in comments +will be indented syntactically correct if the variable +'LaTeX-syntactic-comments' is set to t. If you disable it, comments +will be filled like normal text and no syntactic indentation will be +done. + + Following you will find a list of most commands and variables related +to indenting with a small summary in each case: + +'<TAB>' + 'LaTeX-indent-line' will indent the current line. + +'<LFD>' +'C-j' + 'newline-and-indent' inserts a new line (much like <RET>) and moves + the cursor to an appropriate position by the left margin. + + Most keyboards nowadays lack a linefeed key and 'C-j' may be + tedious to type. Therefore you can customize AUCTeX to perform + indentation upon typing <RET> as well. The respective option is + called 'TeX-newline-function'. + + -- User Option: LaTeX-indent-environment-list + List of environments with special indentation. The second element + in each entry is the function to calculate the indentation level in + columns. + + -- User Option: LaTeX-indent-level + Number of spaces to add to the indentation for each '\begin' not + matched by a '\end'. + + -- User Option: LaTeX-item-indent + Number of spaces to add to the indentation for '\item''s in list + environments. + + -- User Option: TeX-brace-indent-level + Number of spaces to add to the indentation for each '{' not matched + by a '}'. + + -- User Option: LaTeX-syntactic-comments + If non-nil comments will be filled and indented according to LaTeX + syntax. Otherwise they will be filled like normal text. + + -- User Option: TeX-newline-function + Used to specify the function which is called when <RET> is pressed. + This will normally be 'newline' which simply inserts a new line. + In case you want to have AUCTeX do indentation as well when you + press <RET>, use the built-in functions 'newline-and-indent' or + 'reindent-then-newline-and-indent'. The former inserts a new line + and indents the following line, i.e. it moves the cursor to the + right position and therefore acts as if you pressed <LFD>. The + latter function additionally indents the current line. If you + choose 'Other', you can specify your own fancy function to be + called when <RET> is pressed. + + AUCTeX treats by default '\[...\]' math mode as a regular environment +and indents it accordingly. If you do not like such behavior you only +need to remove '\|\[' and '\|\]' from 'LaTeX-begin-regexp' and +'LaTeX-end-regexp' variables respectively. + + A closely related topic is indenting of text enclosed in square +brackets, parentheses and other pairs. AUCTeX offers two variables +which control if indentation happens inside these pairs. + + -- User Option: TeX-indent-open-delimiters + This variable contains additional opening delimiters which increase + indentation. For example add '[' to this variable to get text + after a square bracket indented. + + -- User Option: TeX-indent-close-delimiters + This is the accompanying variable to 'TeX-indent-open-delimiters' + decreasing the indentation again. This variable should contain ']' + if 'TeX-indent-open-delimiters' is set like described above. + +Note that this is an opt-in feature, both variables are initially set to +an empty string. That is because it introduces non-trivial side effects +to include '[' and ']' in 'TeX-indent-open-delimiters' and +'TeX-indent-close-delimiters'; if you only have an opening square +bracket in your text without closing it, wrong indentation persists in +the following text. For example, in math expression, half-open +intervals are frequently written as '[0,10)' or '[0,10['. In such +cases, you can put the closing part as a comment in the same line in +order to have correct indentation after that: + $[0,10)$ % ] + $[0,10[$ % ]] + + Another example is '\left'-'\right' pair in equations. Similar +workarounds are available: + \begin{equation} + \left[ % ] + xyz + \right] % [ + abc + \end{equation} + + You can include parens '()' also in 'TeX-indent-open-delimiters' and +'TeX-indent-close-delimiters' to enable indent inside them. Be prepared +for similar side effects when you do. + + Note that commented curly braces '{' and '}' aren't counted when +AUCTeX computes indentation. + + +File: auctex.info, Node: Filling, Prev: Indenting, Up: Editing + +2.10 Filling +============ + +Filling deals with the insertion of line breaks to prevent lines from +becoming wider than what is specified in 'fill-column'. The linebreaks +will be inserted automatically if 'auto-fill-mode' is enabled. In this +case the source is not only filled but also indented automatically as +you write it. + + 'auto-fill-mode' can be enabled for AUCTeX by calling +'turn-on-auto-fill' in one of the hooks AUCTeX is running. *Note Modes +and Hooks::. As an example, if you want to enable 'auto-fill-mode' in +'LaTeX-mode', put the following into your init file: + + (add-hook 'LaTeX-mode-hook #'turn-on-auto-fill) + + You can manually fill explicitly marked regions, paragraphs, +environments, complete sections, or the whole buffer. (Note that manual +filling in AUCTeX will indent the start of the region to be filled in +contrast to many other Emacs modes.) + + There are some syntactical constructs which are handled specially +with regard to filling. These are so-called "code comments" and +"paragraph commands". + + Code comments are comments preceded by code or text in the same line. +Upon filling a region, code comments themselves will not get filled. +Filling is done from the start of the region to the line with the code +comment and continues after it. In order to prevent overfull lines in +the source code, a linebreak will be inserted before the last +non-comment word by default. This can be changed by customizing +'LaTeX-fill-break-before-code-comments'. If you have overfull lines +with code comments you can fill those explicitly by calling +'LaTeX-fill-paragraph' or pressing 'M-q' with the cursor positioned on +them. This will add linebreaks in the comment and indent subsequent +comment lines to the column of the comment in the first line of the code +comment. In this special case 'M-q' only acts on the current line and +not on the whole paragraph. + + Lines with '\par' are treated similarly to code comments, i.e. '\par' +will be treated as paragraph boundary which should not be followed by +other code or text. But it is not treated as a real paragraph boundary +like an empty line where filling a paragraph would stop. + + Paragraph commands like '\section' or '\noindent' (the list of +commands is defined by 'LaTeX-paragraph-commands') are often to be +placed in their own line(s). This means they should not be consecuted +with any preceding or following adjacent lines of text. AUCTeX will +prevent this from happening if you do not put any text except another +macro after the end of the last brace of the respective macro. If there +is other text after the macro, AUCTeX regards this as a sign that the +macro is part of the following paragraph. + + Here are some examples: + + \begin{quote} + text text text text + + \begin{quote}\label{foo} + text text text text + + If you press 'M-q' on the first line in both examples, nothing will +change. But if you write + + \begin{quote} text + text text text text +and press 'M-q', you will get + + \begin{quote} text text text text text + + Besides code comments and paragraph commands, another speciality of +filling in AUCTeX involves commented lines. You should be aware that +these comments are treated as islands in the rest of the LaTeX code if +syntactic filling is enabled. This means, for example, if you try to +fill an environment with 'LaTeX-fill-environment' and have the cursor +placed on a commented line which does not have a surrounding environment +inside the comment, AUCTeX will report an error. + + The relevant commands and variables with regard to filling are: + +'C-c C-q C-p' + 'LaTeX-fill-paragraph' will fill and indent the current paragraph. + +'M-q' + Alias for 'C-c C-q C-p' + +'C-c C-q C-e' + 'LaTeX-fill-environment' will fill and indent the current + environment. This may e.g. be the 'document' environment, in which + case the entire document will be formatted. + +'C-c C-q C-s' + 'LaTeX-fill-section' will fill and indent the current logical + sectional unit. + +'C-c C-q C-r' + 'LaTeX-fill-region' will fill and indent the current region. + + -- User Option: LaTeX-fill-break-at-separators + List of separators before or after which respectively linebreaks + will be inserted if they do not fit into one line. The separators + can be curly braces, brackets, switches for inline math ('$', '\(', + '\)') and switches for display math ('\[', '\]'). Such formatting + can be useful to make macros and math more visible or to prevent + overfull lines in the LaTeX source in case a package for displaying + formatted TeX output inside the Emacs buffer, like preview-latex, + is used. + + -- User Option: LaTeX-fill-break-before-code-comments + Code comments are comments preceded by some other text in the same + line. When a paragraph containing such a comment is to be filled, + the comment start will be seen as a border after which no line + breaks will be inserted in the same line. If the option + 'LaTeX-fill-break-before-code-comments' is enabled (which is the + default) and the comment does not fit into the line, a line break + will be inserted before the last non-comment word to minimize the + chance that the line becomes overfull. + + -- User Option: LaTeX-fill-excluded-macros + A list of macro names (without leading backslash) for whose + arguments filling should be disabled. Typically, you will want to + add macros here which have long, multi-line arguments. An example + is '\pgfplotstabletypeset' from the pgfplotstable package which is + used as shown in the following listing: + + \pgfplotstabletypeset[skip first n=4]{% + XYZ Format, + Version 1.234 + Date 2010-09-01 + @author Mustermann + A B C + 1 2 3 + 4 5 6 + } + + +File: auctex.info, Node: Display, Next: Processing, Prev: Editing, Up: Top + +3 Controlling Screen Display +**************************** + +It is often desirable to get visual help of what markup code in a text +actually does without having to decipher it explicitly. For this +purpose Emacs and AUCTeX provide font locking (also known as syntax +highlighting) which visually sets off markup code like macros or +environments by using different colors or fonts. For example text to be +typeset in italics can be displayed with an italic font in the editor as +well, or labels and references get their own distinct color. + + While font locking helps you grasp the purpose of markup code and +separate markup from content, the markup code can still be distracting. +AUCTeX lets you hide those parts and show them again at request with its +built-in support for hiding macros and environments which we call +folding here. + + Besides folding of macros and environments, AUCTeX provides support +for Emacs' outline mode which lets you narrow the buffer content to +certain sections of your text by hiding the parts not belonging to these +sections. + + Moreover, you can focus in a specific portion of the code by +narrowing the buffer to the desired region. AUCTeX provides also +functions to narrow the buffer to the current group and to LaTeX +environments. + + AUCTeX also provides some WYSIWYG features. + + First, you can customize 'font-latex-fontify-script' to enable +special formatting of '^' superscripts and '_' subscripts (*note Font +Locking::). + + Secondly, AUCTeX with GNU Emacs 25 or later can display certain math +macros using Unicode characters, e.g., '\alpha' as α. This is called +prettification and is lightweight and reasonable robust (*note +Prettifying::). + + A more accurate approach is provided by preview-latex, a subsystem of +AUCTeX, see *note Introduction: (preview-latex)Top. This system uses +LaTeX to generate images that are then displayed in your buffer. It is +extremely accurate but can be fragile with some packages (like older pgf +versions). + + Please note that you can use prettification and preview-latex +together. + +* Menu: + +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document +* Narrowing:: Restricting display and editing to a portion of the buffer +* Prettifying:: Displaying Greek and math macros as Unicode characters + + +File: auctex.info, Node: Font Locking, Next: Folding, Up: Display + +3.1 Font Locking +================ + +Font locking is supposed to improve readability of the source code by +highlighting certain keywords with different colors or fonts. It +thereby lets you recognize the function of markup code to a certain +extent without having to read the markup command. For general +information on controlling font locking with Emacs' Font Lock mode, see +*note Font Lock Mode: (emacs)Font Lock. + + -- User Option: TeX-install-font-lock + Once font locking is enabled globally or for the major modes + provided by AUCTeX, the font locking patterns and functionality of + font-latex are activated by default. You can switch to a different + font locking scheme or disable font locking in AUCTeX by + customizing the variable 'TeX-install-font-lock'. + + Besides font-latex AUCTeX ships with a scheme which is derived from + Emacs' default LaTeX mode and activated by choosing + 'tex-font-setup'. Be aware that this scheme is not coupled with + AUCTeX's style system and not the focus of development. Therefore + and due to font-latex being much more feature-rich the following + explanations will only cover font-latex. + + In case you want to hook in your own fontification scheme, you can + choose 'other' and insert the name of the function which sets up + your font locking patterns. If you want to disable fontification + in AUCTeX completely, choose 'ignore'. + + font-latex provides many options for customization which are +accessible with 'M-x customize-group <RET> font-latex <RET>'. For this +description the various options are explained in conceptional groups. + +* Menu: + +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex +* Known problems:: Known fontification problems + + +File: auctex.info, Node: Fontification of macros, Next: Fontification of quotes, Up: Font Locking + +3.1.1 Fontification of macros +----------------------------- + +Highlighting of macros can be customized by adapting keyword lists which +can be found in the customization group 'font-latex-keywords'. + + Three types of macros can be handled differently with respect to +fontification: + + 1. Commands of the form '\foo[bar]{baz}' which consist of the macro + itself, optional arguments in square brackets and mandatory + arguments in curly braces. For the command itself the face + 'font-lock-keyword-face' will be used and for the optional + arguments the face 'font-lock-variable-name-face'. The face + applied to the mandatory argument depends on the macro class + represented by the respective built-in variables. + 2. Declaration macros of the form '{\foo text}' which consist of the + macro which may be enclosed in a TeX group together with text to be + affected by the macro. In case a TeX group is present, the macro + will get the face 'font-lock-keyword-face' and the text will get + the face configured for the respective macro class. If no TeX + group is present, the latter face will be applied to the macro + itself. + 3. Simple macros of the form '\foo' which do not have any arguments or + groupings. The respective face will be applied to the macro + itself. + + Customization variables for '\foo[bar]{baz}' type macros allow both +the macro name and the sequence of arguments to be specified. The +latter is done with a string which can contain the characters +'*' + indicating the existence of a starred variant for the macro, +'[' + for optional arguments in brackets, +'{' + for mandatory arguments in braces, +'\' + for mandatory arguments consisting of a single macro and +'|' + as a prefix indicating that two alternatives are following. + For example the specifier for '\documentclass' would be '[{' because +the macro has one optional followed by one mandatory argument. The +specifier for '\newcommand' would be '*|{\[[{' because there is a +starred variant, the mandatory argument following the macro name can be +a macro or a TeX group which can be followed by two optional arguments +and the last token is a mandatory argument in braces. + + Customization variables for the '{\foo text}' and '\foo' types are +simple lists of strings where each entry is a macro name (without the +leading backslash). + +General macro classes +--------------------- + +font-latex provides keyword lists for different macro classes which are +described in the following table: + +'font-latex-match-function-keywords' + Keywords for macros defining or related to functions, like + '\newcommand'. + Type: '\macro[...]{...}' + Face: 'font-lock-function-name-face' + +'font-latex-match-reference-keywords' + Keywords for macros defining or related to references, like '\ref'. + Type: '\macro[...]{...}' + Face: 'font-lock-constant-face' + +'font-latex-match-textual-keywords' + Keywords for macros specifying textual content, like '\caption'. + Type: '\macro[...]{...}' + Face: 'font-lock-type-face' + +'font-latex-match-variable-keywords' + Keywords for macros defining or related to variables, like + '\setlength'. + Type: '\macro[...]{...}' + Face: 'font-lock-variable-name-face' + +'font-latex-match-warning-keywords' + Keywords for important macros, e.g. affecting line or page break, + like '\clearpage'. + Type: '\macro' + Face: 'font-latex-warning-face' + +Sectioning commands +------------------- + +Sectioning commands are macros like '\chapter' or '\section'. For these +commands there are two fontification schemes which may be selected by +customizing the variable 'font-latex-fontify-sectioning'. + + -- User Option: font-latex-fontify-sectioning + Per default sectioning commands will be shown in a larger, + proportional font, which corresponds to a number for this variable. + The font size varies with the sectioning level, e.g. '\part' + ('font-latex-sectioning-0-face') has a larger font than + '\paragraph' ('font-latex-sectioning-5-face'). Typically, values + from 1.05 to 1.3 for 'font-latex-fontify-sectioning' give best + results, depending on your font setup. If you rather like to use + the base font and a different color, set the variable to the symbol + 'color'. In this case the face 'font-lock-type-face' will be used + to fontify the argument of the sectioning commands. + + You can make font-latex aware of your own sectioning commands be +adding them to the keyword lists: +'font-latex-match-sectioning-0-keywords' +('font-latex-sectioning-0-face') ... +'font-latex-match-sectioning-5-keywords' +('font-latex-sectioning-5-face'). + + Related to sectioning there is special support for slide titles which +may be fontified with the face 'font-latex-slide-title-face'. You can +add macros which should appear in this face by customizing the variable +'font-latex-match-slide-title-keywords'. + +Commands for changing fonts +--------------------------- + +LaTeX provides various macros for changing fonts or font attributes. +For example, you can select an italic font with '\textit{...}' or bold +with '\textbf{...}'. An alternative way to specify these fonts is to +use special macros in TeX groups, like '{\itshape ...}' for italics and +'{\bfseries ...}' for bold. As mentioned above, we call the former +variants commands and the latter declarations. + + Besides the macros for changing fonts provided by LaTeX there is an +infinite number of other macros--either defined by yourself for logical +markup or defined by macro packages--which affect the font in the +typeset text. While LaTeX's built-in macros and macros of packages +known by AUCTeX are already handled by font-latex, different keyword +lists per type style and macro type are provided for entering your own +macros which are listed in the table below. + +'font-latex-match-bold-command-keywords' + Keywords for commands specifying a bold type style. + Face: 'font-latex-bold-face' +'font-latex-match-italic-command-keywords' + Keywords for commands specifying an italic font. + Face: 'font-latex-italic-face' +'font-latex-match-math-command-keywords' + Keywords for commands specifying a math font. + Face: 'font-latex-math-face' +'font-latex-match-type-command-keywords' + Keywords for commands specifying a typewriter font. + Face: 'font-lock-type-face' +'font-latex-match-bold-declaration-keywords' + Keywords for declarations specifying a bold type style. + Face: 'font-latex-bold-face' +'font-latex-match-italic-declaration-keywords' + Keywords for declarations specifying an italic font. + Face: 'font-latex-italic-face' +'font-latex-match-type-declaration-keywords' + Keywords for declarations specifying a typewriter font. + Face: 'font-latex-type-face' + +Deactivating defaults of built-in keyword classes +------------------------------------------------- + +font-latex ships with predefined lists of keywords for the classes +described above. You can disable these defaults per class by +customizing the variable 'font-latex-deactivated-keyword-classes'. This +is a list of strings for keyword classes to be deactivated. Valid +entries are "warning", "variable", "biblatexnoarg", "biblatex", +"reference", "function" , "sectioning-0", "sectioning-1", +"sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5", +"slide-title", "textual", "bold-command", "italic-command", +"math-command", "type-command", "bold-declaration", +"italic-declaration", "type-declaration". + + You can also get rid of certain keywords only. For example if you +want to remove highlighting of footnotes as references you can put the +following stanza into your init file: + + (eval-after-load "font-latex" + '(setq-default + font-latex-match-reference-keywords-local + (remove (assoc-string "footnote" + font-latex-match-reference-keywords-local) + font-latex-match-reference-keywords-local))) + + But note that this means fiddling with font-latex's internals and is +not guaranteed to work in future versions of font-latex. + +User-defined keyword classes +---------------------------- + +In case the customization options explained above do not suffice for +your needs, you can specify your own keyword classes by customizing the +variable 'font-latex-user-keyword-classes'. + + -- User Option: font-latex-user-keyword-classes + Every keyword class consists of four parts, a name, a list of + keywords, a face and a specifier for the type of macros to be + highlighted. + + When adding new entries, you have to use unique values for the + class names, i.e. they must not clash with names of the built-in + keyword classes or other names given by you. Additionally the + names must not contain spaces. + + The list of keywords defines which commands and declarations should + be covered by the keyword class. A keyword can either be a simple + command name omitting the leading backslash or a list consisting of + the command name and a string specifying the sequence of arguments + for the command. + + The face argument can either be an existing face or face attributes + made by you. + + There are three alternatives for the type of keywords--"Command + with arguments", "Declaration inside TeX group" and "Command + without arguments"--which correspond with the macro types explained + above. + + +File: auctex.info, Node: Fontification of quotes, Next: Fontification of math, Prev: Fontification of macros, Up: Font Locking + +3.1.2 Fontification of quotes +----------------------------- + +Text in quotation marks is displayed with the face +'font-latex-string-face'. Besides the various forms of opening and +closing double and single quotation marks, so-called guillemets (<<, >>) +can be used for quoting. Because there are two styles of using +them--French style: << text >>; German style: >>text<<--you can +customize the variable 'font-latex-quotes' to tell font-latex which type +you are using if the correct value cannot be derived from document +properties. + + -- User Option: font-latex-quotes + The default value of 'font-latex-quotes' is 'auto' which means that + font-latex will try to derive the correct type of quotation mark + matching from document properties like the language option supplied + to the babel LaTeX package. + + If the automatic detection fails for you and you mostly use one + specific style you can set it to a specific language-dependent + value as well. Set the value to 'german' if you are using >>German + quotes<< and to 'french' if you are using << French quotes >>. + font-latex will recognize the different ways these quotes can be + given in your source code, i.e. ('"<', '">'), ('<<', '>>') and the + respective 8-bit variants. + + If you set 'font-latex-quotes' to nil, quoted content will not be + fontified. + + +File: auctex.info, Node: Fontification of math, Next: Verbatim content, Prev: Fontification of quotes, Up: Font Locking + +3.1.3 Fontification of mathematical constructs +---------------------------------------------- + +In LaTeX mathematics can be indicated by a variety of different methods: +toggles (like dollar signs), macros and environments. Math constructs +known by font-latex are displayed with the face 'font-latex-math-face'. +Support for dollar signs and shorthands like '\(...\)' or '\[...\]' is +built-in and not customizable. Support for other math macros and +environments can be adapted by customizing the variables +'font-latex-match-math-command-keywords' and 'texmathp-tex-commands' +respectively. It is no longer recommended to customize +'font-latex-math-environments'. + + To convert your customization in 'font-latex-math-environments' into +'texmathp-tex-commands', please register your own math environments, +together with starred variants if any, as entries of 'env-on' type in +'texmathp-tex-commands', then clear out 'font-latex-math-environments'. +You have to restart Emacs for this new customization to take effect for +fontification. + + In order to make math constructs more readable, font-latex displays +subscript and superscript parts in a smaller font and raised or lowered +respectively. This fontification feature can be controlled with the +variables 'font-latex-fontify-script' and 'font-latex-script-display'. + + -- User Option: font-latex-fontify-script + If non-nil, fontify subscript and superscript strings. Concretely, + this means that the scripts are raised or lowered. + + Another possiblity is setting this variable to the symbol + 'multi-level'. In this case, in a formula x^{y^z}, y is raised + above and smaller than x, and z is raised above and smaller than y. + With many script levels, the text might become too small to be + readable. (See 'font-latex-fontify-script-max-level' below.) + + Lastly, you can set this variable to 'invisible' whose behavior is + like 'multi-level', and in addition the super-/subscript characters + ^ and _ are not displayed. + + -- User Option: font-latex-fontify-script-max-level + Maximum scriptification level for which script faces are applied. + + The faces 'font-latex-superscript-face' and + 'font-latex-subscript-face' define custom ':height' values < 1.0. + Therefore, scripts are displayed with a slightly smaller font than + normal math text. If 'font-latex-fontify-script' is 'multi-level' + or 'invisible', the font size becomes too small to be readable + after a few levels. This option allows to specify the maximum + level after which the size of the script text won’t be shrunken + anymore. + + For example, in the expression x^{y^{z^a_b}}, x has scriptification + level 0, y has level 1, z has level 2, and both a and b have + scriptification level 3. + + If 'font-latex-fontify-script-max-level' was 2, then z, a, and b + would have the same font size. If it was 3 or more, then a and b + were smaller than z just in the same way as z is smaller than y and + y is smaller than x. + + The script characters '^' and '_' themselves are also fontified with +an own face named 'font-latex-script-char-face'. + + -- User Option: font-latex-script-display + Display specification for subscript and superscript content. The + car is used for subscript, the cdr is used for superscript. The + feature is implemented using so-called display properties. For + information on what exactly to specify for the values, see *note + Other Display Specifications: (elisp)Other Display Specs. + + +File: auctex.info, Node: Verbatim content, Next: Faces, Prev: Fontification of math, Up: Font Locking + +3.1.4 Verbatim macros and environments +-------------------------------------- + +Usually it is not desirable to have content to be typeset verbatim +highlighted according to LaTeX syntax. Therefore this content will be +fontified uniformly with the face 'font-latex-verbatim-face'. + + font-latex differentiates three different types of verbatim +constructs for fontification. Macros with special characters like | as +delimiters, macros with braces, and environments. Which macros and +environments are recognized is controlled by the variables +'LaTeX-verbatim-macros-with-delims', +'LaTeX-verbatim-macros-with-braces', and 'LaTeX-verbatim-environments' +respectively. + + +File: auctex.info, Node: Faces, Next: Known problems, Prev: Verbatim content, Up: Font Locking + +3.1.5 Faces used by font-latex +------------------------------ + +In case you want to change the colors and fonts used by font-latex +please refer to the faces mentioned in the explanations above and use +'M-x customize-face <RET> <face> <RET>'. All faces defined by +font-latex are accessible through a customization group by typing 'M-x +customize-group <RET> font-latex-highlighting-faces <RET>'. + + +File: auctex.info, Node: Known problems, Prev: Faces, Up: Font Locking + +3.1.6 Known fontification problems +---------------------------------- + +In certain cases the fontification machinery fails to interpret buffer +contents correctly. This can lead to color bleed, i.e. large parts of a +buffer get fontified with an inappropriate face. A typical situation +for this to happen is the use of a dollar sign ('$') in a verbatim macro +or environment. If font-latex is not aware of the verbatim construct, +it assumes the dollar sign to be a toggle for mathematics and fontifies +the following buffer content with the respective face until it finds a +closing dollar sign or till the end of the buffer. + + As a remedy you can make the verbatim construct known to font-latex +(*note Verbatim content::). If this is not possible, you can insert a +commented dollar sign ('%$') at the next suitable end of line as a quick +workaround. In docTeX documents, '^^A$' is also available for similar +purpose. + + +File: auctex.info, Node: Folding, Next: Outline, Prev: Font Locking, Up: Display + +3.2 Folding Macros and Environments +=================================== + +A popular complaint about markup languages like TeX and LaTeX is that +there is too much clutter in the source text and that one cannot focus +well on the content. There are macros where you are only interested in +the content they are enclosing, like font specifiers where the content +might already be fontified in a special way by font locking. Or macros +the content of which you only want to see when actually editing it, like +footnotes or citations. Similarly you might find certain environments +or comments distracting when trying to concentrate on the body of your +document. + + With AUCTeX's folding functionality you can collapse those items and +replace them by a fixed string, the content of one of their arguments, +or a mixture of both. If you want to make the original text visible +again in order to view or edit it, move point sideways onto the +placeholder (also called display string) or left-click with the mouse +pointer on it. The macro or environment will unfold automatically, stay +open as long as point is inside of it and collapse again once you move +point out of it. (Note that folding of environments currently does not +work in every AUCTeX mode.) + + In order to use this feature, you have to activate 'TeX-fold-mode' +which will activate the auto-reveal feature and the necessary commands +to hide and show macros and environments. You can activate the mode in +a certain buffer by typing the command 'M-x TeX-fold-mode <RET>' or +using the keyboard shortcut 'C-c C-o C-f'. If you want to use it every +time you edit a LaTeX document, add it to a hook: + + (add-hook 'LaTeX-mode-hook (lambda () + (TeX-fold-mode 1))) + + If it should be activated in all AUCTeX modes, use 'TeX-mode-hook' +instead of 'LaTeX-mode-hook'. + + Once the mode is active there are several commands available to hide +and show macros, environments and comments: + + -- Command: TeX-fold-buffer + ('C-c C-o C-b') Hide all foldable items in the current buffer + according to the setting of 'TeX-fold-type-list'. + + If you want to have this done automatically every time you open a + file, add it to a hook and make sure the function is called after + font locking is set up for the buffer. The following code should + accomplish this: + + (add-hook 'find-file-hook #'TeX-fold-buffer t) + + The command can be used any time to refresh the whole buffer and + fold any new macros and environments which were inserted after the + last invocation of the command. + + -- User Option: TeX-fold-type-list + List of symbols determining the item classes to consider for + folding. This can be macros, environments and comments. Per + default only macros and environments are folded. + + -- User Option: TeX-fold-force-fontify + In order for all folded content to get the right faces, the whole + buffer has to be fontified before folding is carried out. + 'TeX-fold-buffer' therefore will force fontification of unfontified + regions. As this will prolong the time folding takes, you can + prevent forced fontification by customizing the variable + 'TeX-fold-force-fontify'. + + -- User Option: TeX-fold-auto + By default, a macro inserted with 'TeX-insert-macro' ('C-c C-m') + will not be folded. Set this variable to a non-nil value to + aumatically fold macros as soon as they are inserted. + + -- User Option: TeX-fold-preserve-comments + By default items found in comments will be folded. If your + comments often contain unfinished code this might lead to problems. + Give this variable a non-nil value and foldable items in your + comments will be left alone. + + -- User Option: TeX-fold-unfold-around-mark + When this variable is non-nil and there is an active regione, text + around the mark will be kept unfolded. + + -- Command: TeX-fold-region + ('C-c C-o C-r') Hide all configured macros in the marked region. + + -- Command: TeX-fold-paragraph + ('C-c C-o C-p') Hide all configured macros in the paragraph + containing point. + + -- Command: TeX-fold-macro + ('C-c C-o C-m') Hide the macro on which point currently is located. + If the name of the macro is found in 'TeX-fold-macro-spec-list', + the respective display string will be shown instead. If it is not + found, the name of the macro in sqare brackets or the default + string for unspecified macros + ('TeX-fold-unspec-macro-display-string') will be shown, depending + on the value of the variable 'TeX-fold-unspec-use-name'. + + -- Command: TeX-fold-env + ('C-c C-o C-e') Hide the environment on which point currently is + located. The behavior regarding the display string is analogous to + 'TeX-fold-macro' and determined by the variables + 'TeX-fold-env-spec-list' and 'TeX-fold-unspec-env-display-string' + respectively. + + -- Command: TeX-fold-math + Hide the math macro on which point currently is located. If the + name of the macro is found in 'TeX-fold-math-spec-list', the + respective display string will be shown instead. If it is not + found, the name of the macro in sqare brackets or the default + string for unspecified macros + ('TeX-fold-unspec-macro-display-string') will be shown, depending + on the value of the variable 'TeX-fold-unspec-use-name'. + + -- Command: TeX-fold-comment + ('C-c C-o C-c') Hide the comment point is located on. + + -- Command: TeX-fold-clearout-buffer + ('C-c C-o b') Permanently unfold all macros and environments in the + current buffer. + + -- Command: TeX-fold-clearout-region + ('C-c C-o r') Permanently unfold all macros and environments in the + marked region. + + -- Command: TeX-fold-clearout-paragraph + ('C-c C-o p') Permanently unfold all macros and environments in the + paragraph containing point. + + -- Command: TeX-fold-clearout-item + ('C-c C-o i') Permanently show the macro or environment on which + point currently is located. In contrast to temporarily opening the + macro when point is moved sideways onto it, the macro will be + permanently unfolded and will not collapse again once point is + leaving it. + + -- Command: TeX-fold-dwim + ('C-c C-o C-o') Hide or show items according to the current + context. If there is folded content, unfold it. If there is a + marked region, fold all configured content in this region. If + there is no folded content but a macro or environment, fold it. + + In case you want to use a different prefix than 'C-c C-o' for these +commands you can customize the variable 'TeX-fold-command-prefix'. +(Note that this will not change the key binding for activating the +mode.) + + The commands above will only take macros or environments into +consideration which are specified in the variables +'TeX-fold-macro-spec-list' or 'TeX-fold-env-spec-list' respectively. + + -- User Option: TeX-fold-macro-spec-list + List of replacement specifiers and macros to fold. The specifier + can be a string, an integer or a function symbol. + + If you specify a string, it will be used as a display replacement + for the whole macro. Numbers in braces, brackets, parens or angle + brackets will be replaced by the respective macro argument. For + example '{1}' will be replaced by the first mandatory argument of + the macro. One can also define alternatives within the specifier + which are used if an argument is not found. Alternatives are + separated by '||'. They are most useful with optional arguments. + As an example, the default specifier for '\item' is '[1]:||*' which + means that if there is an optional argument, its value is shown + followed by a colon. If there is no optional argument, only an + asterisk is used as the display string. + + If you specify a number as the first element, the content of the + respective mandatory argument of a LaTeX macro will be used as the + placeholder. + + If the first element is a function symbol, the function will be + called with all mandatory arguments of the macro and the result of + the function call will be used as a replacement for the macro. + + The placeholder is made by copying the text from the buffer + together with its properties, i.e. its face as well. If + fontification has not happened when this is done (e.g. because of + lazy font locking) the intended fontification will not show up. As + a workaround you can leave Emacs idle a few seconds and wait for + stealth font locking to finish before you fold the buffer. Or you + just re-fold the buffer with 'TeX-fold-buffer' when you notice a + wrong fontification. + + -- User Option: TeX-fold-env-spec-list + List of display strings or argument numbers and environments to + fold. Argument numbers refer to the '\begin' statement. That + means if you have e.g. '\begin{tabularx}{\linewidth}{XXX} ... + \end{tabularx}' and specify 3 as the argument number, the resulting + display string will be "XXX". + + -- User Option: TeX-fold-math-spec-list + List of display strings and math macros to fold. + + The variables 'TeX-fold-macro-spec-list', 'TeX-fold-env-spec-list', +and 'TeX-fold-math-spec-list' apply to any AUCTeX mode. If you want to +make settings which are only applied to LaTeX mode, you can use the +mode-specific variables 'LaTeX-fold-macro-spec-list', +'LaTeX-fold-env-spec-list', and 'LaTeX-fold-math-spec-list' + + -- User Option: TeX-fold-unspec-macro-display-string + Default display string for macros which are not specified in + 'TeX-fold-macro-spec-list'. + + -- User Option: TeX-fold-unspec-env-display-string + Default display string for environments which are not specified in + 'TeX-fold-env-spec-list'. + + -- User Option: TeX-fold-unspec-use-name + If non-nil the name of the macro or environment surrounded by + square brackets is used as display string, otherwise the defaults + specified in 'TeX-fold-unspec-macro-display-string' or + 'TeX-fold-unspec-env-display-string' respectively. + + When you hover with the mouse pointer over folded content, its +original text will be shown in a tooltip or the echo area depending on +Tooltip mode being activate. In order to avoid exorbitantly big +tooltips and to cater for the limited space in the echo area the content +will be cropped after a certain amount of characters defined by the +variable 'TeX-fold-help-echo-max-length'. + + -- User Option: TeX-fold-help-echo-max-length + Maximum length of original text displayed in a tooltip or the echo + area for folded content. Set it to zero in order to disable this + feature. + + +File: auctex.info, Node: Outline, Next: Narrowing, Prev: Folding, Up: Display + +3.3 Outlining the Document +========================== + +AUCTeX supports the standard outline minor mode using LaTeX/ConTeXt +sectioning commands as header lines. *Note Outline Mode: (emacs)Outline +Mode. + + You can add your own headings by setting the variable +'TeX-outline-extra'. + + -- Variable: TeX-outline-extra + List of extra TeX outline levels. + + Each element is a list with two entries. The first entry is the + regular expression matching a header, and the second is the level + of the header. A '^' is automatically prepended to the regular + expressions in the list, so they must match text at the beginning + of the line. + + See 'LaTeX-section-list' or 'ConTeXt-INTERFACE-section-list' for + existing header levels. + + The following example add '\item' and '\bibliography' headers, with +'\bibliography' at the same outline level as '\section', and '\item' +being below '\subparagraph'. + + (setq TeX-outline-extra + '(("[ \t]*\\\\\\(bib\\)?item\\b" 7) + ("\\\\bibliography\\b" 2))) + + You may want to check out the unbundled 'out-xtra' package for even +better outline support. It is available from your favorite emacs lisp +archive. + + +File: auctex.info, Node: Narrowing, Next: Prettifying, Prev: Outline, Up: Display + +3.4 Narrowing +============= + +Sometimes you want to focus your attention to a limited region of the +code. You can do that by restricting the text addressable by editing +commands and hiding the rest of the buffer with the narrowing functions, +*note (emacs)Narrowing::. In addition, AUCTeX provides a couple of +other commands to narrow the buffer to a group, i.e. a region enclosed +in a pair of curly braces, and to LaTeX environments. + + -- Command: TeX-narrow-to-group + ('C-x n g') Make text outside current group invisible. + + -- Command: LaTeX-narrow-to-environment COUNT + ('C-x n e') Make text outside current environment invisible. With + optional argument COUNT keep visible that number of enclosing + environmens. + + Like other standard narrowing functions, the above commands are +disabled. Attempting to use them asks for confirmation and gives you +the option of enabling them; if you enable the commands, confirmation +will no longer be required for them. + + +File: auctex.info, Node: Prettifying, Prev: Narrowing, Up: Display + +3.5 Prettifying +=============== + +Emacs 25 is able to prettify symbols in programming language buffers, +*note (emacs)Misc for Programs::. The canonical example is to display +'(lambda () ...)' as '(λ () ...)' in Lisp buffers. + + AUCTeX can use this feature in order to display certain math macros +and greek letters using their Unicode representation, too. For example, +the TeX code '\alpha \times \beta' will be displayed as 'α × β'. When +point is on one of the characters, it'll be unprettified automatically, +meaning you see the verbatim text again. For this behaviour however you +need to set 'prettify-symbols-unprettify-at-point' to t or 'right-edge' +which will unprettify the symbol when point moves into or near it. + + To enable prettification in AUCTeX, simply add +'prettify-symbols-mode' to 'TeX-mode-hook'. If you enabled +prettification globally with 'global-prettify-symbols-mode', then it's +automatically enabled in AUCTeX, too. + + You can also add custom symbol unicode-character pairs for +prettification by adding to 'tex--prettify-symbols-alist'. Note that +this variable is part of Emacs' stock 'tex-mode.el' and used by that and +AUCTeX. + + +File: auctex.info, Node: Processing, Next: Customization, Prev: Display, Up: Top + +4 Starting Processors, Viewers and Other Programs +************************************************* + +The most powerful features of AUCTeX may be those allowing you to run +TeX, LaTeX, ConTeXt and other external commands like BibTeX and +'makeindex' from within Emacs, viewing and printing the results, and +moreover allowing you to _debug_ your documents. + + AUCTeX comes with a special tool bar for TeX and LaTeX which provides +buttons for the most important commands. You can enable or disable it +by customizing the options 'plain-TeX-enable-toolbar' and +'LaTeX-enable-toolbar' in the 'TeX-tool-bar' customization group. You +can also customize the buttons by the options 'TeX-bar-TeX-buttons', +'TeX-bar-TeX-all-button-alists', 'TeX-bar-LaTeX-buttons' and +'TeX-bar-LaTeX-button-alist'. + +* Menu: + +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging TeX and LaTeX output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. + + +File: auctex.info, Node: Commands, Next: Viewing, Up: Processing + +4.1 Executing Commands +====================== + +Formatting the document with TeX, LaTeX or ConTeXt, viewing with a +previewer, printing the document, running BibTeX, making an index, or +checking the document with 'lacheck' or 'chktex' all require running an +external command. + +* Menu: + +* Starting a Command:: Starting a Command on a Document or Region +* Selecting a Command:: Selecting and Executing a Command +* Processor Options:: Options for TeX Processors + + +File: auctex.info, Node: Starting a Command, Next: Selecting a Command, Up: Commands + +4.1.1 Starting a Command on a Document or Region +------------------------------------------------ + +There are two ways to run an external command, you can either run it on +the current document with 'TeX-command-master', or on the current region +with 'TeX-command-region'. A special case of running TeX on a region is +'TeX-command-buffer' which differs from 'TeX-command-master' if the +current buffer is not its own master file. + + -- Command: TeX-command-master + ('C-c C-c') Query the user for a command, and run it on the master + file associated with the current buffer. The name of the master + file is controlled by the variable 'TeX-master'. The available + commands are controlled by the variable 'TeX-command-list'. + + -- Command: TeX-command-region + ('C-c C-r') Query the user for a command, and run it on the + contents of the selected region. The region contents are written + into the region file, after extracting the header and trailer from + the master file. If mark is inactive (which can happen with + Transient Mark mode), use the old region. See also the command + 'TeX-pin-region' about how to fix a region. + + The name of the region file is controlled by the variable + 'TeX-region'. The name of the master file is controlled by the + variable 'TeX-master'. The header is all text up to the line + matching the regular expression 'TeX-header-end'. The trailer is + all text from the line matching the regular expression + 'TeX-trailer-start'. The available commands are controlled by the + variable 'TeX-command-list'. + + -- Command: TeX-command-buffer + ('C-c C-b') Query the user for a command, and apply it to the + contents of the current buffer. The buffer contents are written + into the region file, after extracting the header and trailer from + the master file. The command is then actually run on the region + file. See above for details. + + -- Command: LaTeX-command-section + ('C-c C-z') Query the user for a command, and apply it to the + current section (or part, chapter, subsection, paragraph, or + subparagraph). What makes the current section is determined by + 'LaTeX-command-section-level' which can be enlarged/shrunken using + 'LaTeX-command-section-change-level' ('C-c M-z'). The given + numeric prefix arg is added to the current value of + 'LaTeX-command-section-level'. By default, + 'LaTeX-command-section-level' is initialized with the current + document's 'LaTeX-largest-level'. The buffer contents are written + into the region file, after extracting the header and trailer from + the master file. The command is then actually run on the region + file. See 'TeX-command-region' for details. + + It is also possible to compile automatically the whole document until +it is ready with a single command: 'TeX-command-run-all'. + + -- Command: TeX-command-run-all + ('C-c C-a') Compile the current document until an error occurs or + it is finished. If compilation finishes successfully, run the + viewer at the end. + + Here are some relevant variables. + + -- User Option: TeX-region + The name of the file for temporarily storing the text when + formatting the current region. + + -- User Option: TeX-header-end + A regular expression matching the end of the header. By default, + this is '\begin{document}' in LaTeX mode and '%**end of header' in + plain TeX mode. + + -- User Option: TeX-trailer-start + A regular expression matching the start of the trailer. By + default, this is '\end{document}' in LaTeX mode and '\bye' in plain + TeX mode. + + If you want to change the values of 'TeX-header-end' and +'TeX-trailer-start' you can do this for all files by setting the +variables in a mode hook or per file by specifying them as file +variables (*note (emacs)File Variables::). + + -- Command: TeX-pin-region + ('C-c C-t C-r') If you don't have a mode like Transient Mark mode + active, where marks get disabled automatically, the region would + need to get properly set before each call to 'TeX-command-region'. + If you fix the current region with 'C-c C-t C-r', then it will get + used for more commands even though mark and point may change. An + explicitly activated mark, however, will always define a new region + when calling 'TeX-command-region'. + + If the last process you started was on the region, the commands +described in *note Debugging:: and *note Control:: will work on that +process, otherwise they will work on the process associated with the +current document. + + Don't run more than one process at the same time. AUCTeX doesn't +support simultaneous typeset including region typeset. Wait for the +previous process to finish before you start a new process, in particular +when you are editing multiple documents in parallel. This limitation +applies for preview by preview-latex as well. + + +File: auctex.info, Node: Selecting a Command, Next: Processor Options, Prev: Starting a Command, Up: Commands + +4.1.2 Selecting and Executing a Command +--------------------------------------- + +Once you started the command selection with 'C-c C-c', 'C-c C-r' or 'C-c +C-b' you will be prompted for the type of command. AUCTeX will try to +guess which command is appropriate in the given situation and propose it +as default. Usually this is a processor like 'TeX' or 'LaTeX' if the +document was changed or a viewer if the document was just typeset. +Other commands can be selected in the minibuffer with completion support +by typing <TAB>. + + The available commands are defined by the variable +'TeX-command-list'. Per default it includes commands for typesetting +the document (e.g. 'LaTeX'), for viewing the output ('View'), for +printing ('Print'), for generating an index ('Index') or for spell +checking ('Spell') to name but a few. You can also add your own +commands by adding entries to 'TeX-command-list'. Refer to its doc +string for information about its syntax. You might also want to look at +'TeX-expand-list' to learn about the expanders you can use in +'TeX-command-list'. + + Note that the default of the variable occasionally changes. +Therefore it is advisable to add to the list rather than overwriting it. +You can do this with a call to 'add-to-list' in your init file. For +example, if you wanted to add a command for running a program called +'foo' on the master or region file, you could do this with the following +form. + + (eval-after-load "tex" + '(add-to-list 'TeX-command-list + '("Foo" "foo %s" TeX-run-command t t :help "Run foo") + t)) + + As mentioned before, AUCTeX will try to guess what command you want +to invoke. If you want to use another command than 'TeX', 'LaTeX' or +whatever processor AUCTeX thinks is appropriate for the current mode, +set the variable 'TeX-command-default'. You can do this for all files +by setting it in a mode hook or per file by specifying it as a file +variable (*note (emacs)File Variables::). + + -- User Option: TeX-command-default + The default command to run in this buffer. Must be an entry in + 'TeX-command-list'. + + In case you use biblatex in a document, when automatic parsing is +enabled AUCTeX checks the value of 'backend' option given to biblatex at +load time to decide whether to use BibTeX or Biber for bibliography +processing. Should AUCTeX fail to detect the right backend, you can use +the file local 'LaTeX-biblatex-use-Biber' variable. + -- Variable: LaTeX-biblatex-use-Biber + If this boolean variable is set as file local, it tells to AUCTeX + whether to use Biber with biblatex. In this case, the + autodetection of the biblatex backend will be overridden. You may + want to set locally this variable if automatic parsing is not + enabled. + + After confirming a command to execute, AUCTeX will try to save any +buffers related to the document, and check if the document needs to be +reformatted. If the variable 'TeX-save-query' is non-nil, AUCTeX will +query before saving each file. By default AUCTeX will check emacs +buffers associated with files in the current directory, in one of the +'TeX-macro-private' directories, and in the 'TeX-macro-global' +directories. You can change this by setting the variable +'TeX-check-path'. + + -- User Option: TeX-check-path + Directory path to search for dependencies. + + If nil, just check the current file. Used when checking if any + files have changed. + + When performing spell checking on a document or a region (invoked +through AUCTeX's 'Spell' command or 'M-x ispell <RET>'), you want the +spell checking program to skip certain macro arguments and environments, +most notably the arguments of referencing macros and the contents of +verbatim environments. The skipped parts are controlled by variable +'ispell-tex-skip-alists' provided by 'ispell.el'. AUCTeX has a library +which can be added to this variable depending on the value of +'TeX-ispell-extend-skip-list' which is set to 't' by default. + + -- User Option: TeX-ispell-extend-skip-list + This boolean option controls whether AUCTeX activates its extension + for skipping certain macro arguments and environments when spell + checking. + + When non-'nil', AUCTeX loads the file 'tex-ispell.el' and adds its + content to 'ispell-tex-skip-alists'. This library can and will + never be complete, but the interface can be used to add selected + and private macro names within your init file or on a file local + basis. + + 'ispell-tex-skip-alists' has the following structure: + (defvar ispell-tex-skip-alists + '((;; First list + ("\\\\addcontentsline" ispell-tex-arg-end 2) + ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) + ("\\\\makebox" ispell-tex-arg-end 0) + ("\\\\documentclass" . "\\\\begin{document}")) + (;; Second list + ("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0) + ("list" ispell-tex-arg-end 2) + ("verbatim\\*?" . "\\\\end{verbatim\\*?}"))) + "Lists of regions to be skipped in TeX mode. + First list is used raw. + Second list has key placed inside \\begin{}.") + Each item is an alist and the structure of it is described in + 'ispell-skip-region-alist': + (defvar ispell-skip-region-alist + '((...)) + "Alist expressing beginning and end of regions not to spell check. + The alist key must be a regular expression. + Valid forms include: + (KEY) - just skip the key. + (KEY . REGEXP) - skip to the end of REGEXP. + REGEXP may be string or symbol. + (KEY REGEXP) - skip to end of REGEXP. REGEXP must be a string. + (KEY FUNCTION ARGS) - FUNCTION called with ARGS + returns end of region.") + + Let's go through the first list of 'ispell-tex-skip-alists' line by + line: + ("\\\\addcontentsline" ispell-tex-arg-end 2) + 'KEY' is the string '"\\\\addcontentsline"', 'FUNCTION' is + 'ispell-tex-arg-end' called with 'ARGS', here '2'. + 'ispell-tex-arg-end' is a function provided by 'ispell.el' which + skips as many subsequent optional arguments in square brackets as + it sees and then skips 'ARGS' number of mandatory arguments in + braces. Omitting 'ARGS' means skip '1' mandatory argument. In + practice, when you have something like this in your document: + \addcontentsline{toc}{chapter}{Some text} + The first two arguments are left out and 'Some text' will be spell + checked. For the next line + ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) + the name of the counter as argument is skipped. Next line is + ("\\\\makebox" ispell-tex-arg-end 0) + where only optional arguments are skipped, the first mandatory + argument is checked, e.g. + \makebox[0pt][l]{Some text} + Finally, the next line + ("\\\\documentclass" . "\\\\begin{document}")) + ensures that the entire preamble of a document is discarded. + Second list works the same; it is more convenient for environments + since 'KEY' is wrapped inside '\begin{}'. + + AUCTeX provides two functions to add items to car and cdr of + 'ispell-tex-arg-end', namely 'TeX-ispell-skip-setcar' and + 'TeX-ispell-skip-setcdr'. The argument of these functions is + exactly as in 'ispell-tex-skip-alists'. Additions can be done via + init file, e.g.: + (eval-after-load "tex-ispell" + '(progn + (TeX-ispell-skip-setcar + '(("\\\\mymacro" ispell-tex-arg-end))) + (TeX-ispell-skip-setcdr + '(("myverbatim" . "\\\\end{myverbatim}"))))) + + Another possibility is to use file local additions at the end of + your TeX file, e.g.: + %%% Local Variables: + %%% mode: latex + %%% TeX-master: t + %%% eval: (TeX-ispell-skip-setcar '(("\\\\mymacro" . "{[-0-9]+}"))) + %%% End: + + Finally, AUCTeX provides a function called 'TeX-ispell-tex-arg-end' + which sees more arguments than 'ispell-tex-arg-end'. Refer to its + doc string for more information. + + AUCTeX also provides a facility to skip the argument of in-line +verbatim macros like '\Verb' from 'fancyvrb.sty' or '\mintinline' from +'minted.sty'. Characters delimiting the verbatim text are stored in +'TeX-ispell-verb-delimiters'. + + -- User Option: TeX-ispell-verb-delimiters + String with delimiters recognized for in-line verbatim macros. + This variable is initialized to '!|#~"*/+^-'. Since this string is + used to build a character alternative inside a regular expression, + special characters '^' and '-' should come last. Other characters + like opening brace '{', asterisk '*' or at sign '@' should be + avoided as they are not recognized by 'font-latex.el'. + + +File: auctex.info, Node: Processor Options, Prev: Selecting a Command, Up: Commands + +4.1.3 Options for TeX Processors +-------------------------------- + +There are some options you can customize affecting which processors are +invoked or the way this is done and which output they produce as a +result. These options control if DVI or PDF output should be produced, +if TeX should be started in interactive or nonstop mode, if source +specials or a SyncTeX file should be produced for making inverse and +forward search possible or which TeX engine should be used instead of +regular TeX, like PDFTeX, Omega or XeTeX, and the style error messages +are printed with. + + -- Command: TeX-PDF-mode + ('C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a + buffer-local minor mode which is enabled by default. You can + customize 'TeX-PDF-mode' to give it a different default or set it + as a file local variable on a per-document basis. This option + usually results in calling either PDFTeX or ordinary TeX. + + -- User Option: TeX-DVI-via-PDFTeX + If this is set, DVI will also be produced by calling PDFTeX, + setting '\pdfoutput=0'. This makes it possible to use PDFTeX + features like character protrusion even when producing DVI files. + Contemporary TeX distributions do this anyway, so that you need not + enable the option within AUCTeX. + + -- Command: TeX-interactive-mode + ('C-c C-t C-i') This command toggles the interactive mode of + AUCTeX, a global minor mode. You can customize + 'TeX-interactive-mode' to give it a different default. In + interactive mode, TeX will pause with an error prompt when errors + are encountered and wait for the user to type something. + + -- Command: TeX-source-correlate-mode + ('C-c C-t C-s') Toggles support for forward and inverse search. + Forward search refers to jumping to the place in the previewed + document corresponding to where point is located in the document + source and inverse search to the other way round. *Note I/O + Correlation::. + + You can permanently activate 'TeX-source-correlate-mode' by + customizing the variable 'TeX-source-correlate-mode'. There is a + bunch of customization options for the mode, use 'M-x + customize-group <RET> TeX-view <RET>' to find out more. + + AUCTeX is aware of three different means to do I/O correlation: + source specials (only DVI output), the pdfsync LaTeX package (only + PDF output) and SyncTeX. The choice between source specials and + SyncTeX can be controlled with the variable + 'TeX-source-correlate-method'. + + Should you use source specials it has to be stressed _very_ + strongly however, that source specials can cause differences in + page breaks and spacing, can seriously interfere with various + packages and should thus _never_ be used for the final version of a + document. In particular, fine-tuning the page breaks should be + done with source specials switched off. + + Sometimes you are requested, by journal rules or packages, to compile +the document into DVI output. Thus, if you want a PDF document in the +end you can either use XeTeX engine, see below for information about how +to set engines, or compile the document with 'tex' and then convert to +PDF with 'dvips'-'ps2pdf' before viewing it. In addition, current +Japanese TeX engines cannot generate PDF directly so they rely on +DVI-to-PDF converters. Usually 'dvipdfmx' command is used for this +purpose. You can use the 'TeX-PDF-from-DVI' variable to let AUCTeX know +you want to generate the final PDF by converting a DVI file. + + -- User Option: TeX-PDF-from-DVI + This option controls if and how to produce a PDF file by converting + a DVI file. + + When 'TeX-PDF-mode' is non-nil, if 'TeX-PDF-from-DVI' is non-nil + too the document is compiled to DVI instead of PDF. When the + document is ready, 'C-c C-c' will suggest to run the converter to + PDF or an intermediate format. + + If non-nil, 'TeX-PDF-from-DVI' should be the name of the command in + 'TeX-command-list', as a string, used to convert the DVI file to + PDF or to an intermediate format. Values currently supported are: + * '"Dvips"': the DVI file is converted to PS with 'dvips'. + After successfully running it, 'ps2pdf' will be the default + command to convert the PS file to PDF. + * '"Dvipdfmx"': the DVI file is converted to PDF with + 'dvipdfmx'. + (case is significant; note the uppercase 'D' in both strings) When + the PDF file is finally ready, the next suggested command will be + 'View' to open the viewer. + + This option can also be set as a file local variable, in order to + use this conversion on a per-document basis. + + Recall the whole sequence of 'C-c C-c' commands can be replaced by + the single 'C-c C-a'. + + AUCTeX also allows you to easily select different TeX engines for +processing, either by using the entries in the 'TeXing Options' submenu +below the 'Command' menu or by calling the function 'TeX-engine-set'. +These eventually set the variable 'TeX-engine' which you can also modify +directly. + + -- User Option: TeX-engine + This variable allows you to choose which TeX engine should be used + for typesetting the document, i.e. the executables which will be + used when you invoke the 'TeX' or 'LaTeX' commands. The value + should be one of the symbols defined in 'TeX-engine-alist-builtin' + or 'TeX-engine-alist'. The symbols 'default', 'xetex', 'luatex' + and 'omega' are available from the built-in list. + + Note that 'TeX-engine' is buffer-local, so setting the variable +directly or via the above mentioned menu or function will not take +effect in other buffers. If you want to activate an engine for all +AUCTeX modes, set 'TeX-engine' in your init file, e.g. by using 'M-x +customize-option <RET>'. If you want to activate it for a certain +AUCTeX mode only, set the variable in the respective mode hook. If you +want to activate it for certain files, set it through file variables +(*note (emacs)File Variables::). + + Should you need to change the executable names related to the +different engine settings, there are some variables you can tweak. +Those are 'TeX-command', 'LaTeX-command', 'TeX-Omega-command', +'LaTeX-Omega-command', 'ConTeXt-engine' and 'ConTeXt-Omega-engine'. The +rest of the executables is defined directly in +'TeX-engine-alist-builtin'. If you want to override an entry from that, +add an entry to 'TeX-engine-alist' that starts with the same symbol as +that the entry in the built-in list and specify the executables you want +to use instead. You can also add entries to 'TeX-engine-alist' in order +to add support for engines not covered per default. + + -- User Option: TeX-engine-alist + Alist of TeX engines and associated commands. Each entry is a list + with a maximum of five elements. The first element is a symbol + used to identify the engine. The second is a string describing the + engine. The third is the command to be used for plain TeX. The + fourth is the command to be used for LaTeX. The fifth is the + command to be used for the '--engine' parameter of ConTeXt's + 'texexec' program. Each command can either be a variable or a + string. An empty string or nil means there is no command + available. + + In some systems, Emacs cannot inherit the 'PATH' environment variable +from the shell and thus AUCTeX may not be able to run TeX commands. +Before running them, AUCTeX checks if it is able to find those commands +and will warn you in case it fails. You can skip this test by changing +the option 'TeX-check-TeX'. + + -- User Option: TeX-check-TeX + If non-nil, AUCTeX will check if it is able to find a working TeX + distribution before running TeX, LaTeX, ConTeXt, etc. It actually + checks if can run 'TeX-command' command or the shell returns a + command not found error. The error code returned by the shell in + this case can be set in 'TeX-check-TeX-command-not-found' option. + + Some LaTeX packages requires the document to be compiled with a +specific engine. Notable examples are 'fontspec' and 'polyglossia' +packages, which require LuaTeX and XeTeX engines. If you try to compile +a document which loads one of such packages and the set engine is not +one of those allowed you will be asked to select a different engine +before running the LaTeX command. If you do not want to be warned by +AUCTeX in these cases, customize the option 'TeX-check-engine'. + + -- User Option: TeX-check-engine + This boolean option controls whether AUCTeX should check the + correct engine has been set before running LaTeX commands. + + As shown above, AUCTeX handles in a special way most of the main +options that can be given to the TeX processors. When you need to pass +to the TeX processor arbitrary options not handled by AUCTeX, you can +use the file local variable 'TeX-command-extra-options'. + -- User Option: TeX-command-extra-options + String with the extra options to be given to the TeX processor. + For example, if you need to enable the shell escape feature to + compile a document, add the following line to the list of local + variables of the source file: + %%% TeX-command-extra-options: "-shell-escape" + By default this option is not safe as a file-local variable because + a specially crafted document compiled with shell escape enabled can + be used for malicious purposes. + + You can customize AUCTeX to show the processor output as it is +produced. + + -- User Option: TeX-show-compilation + If non-nil, the output of TeX compilation is shown in another + window. + + You can instruct TeX to print error messages in the form +'file:line:error' which is similar to the way many compilers format +them. + + -- User Option: TeX-file-line-error + If non-nil, TeX will produce 'file:line:error' style error + messages. + + ConTeXt users can choose between Mark II and Mark IV versions. This +is controlled by 'ConTeXt-Mark-version' option. + + -- User Option: ConTeXt-Mark-version + This variables specifies which version of Mark should be used. + Values currently supported are '"II"', the default, and '"IV"'. It + can be set globally using customization interface or on a per-file + basis, by specifying it as a file variable. + + +File: auctex.info, Node: Viewing, Next: Debugging, Prev: Commands, Up: Processing + +4.2 Viewing the Formatted Output +================================ + +AUCTeX allows you to start external programs for previewing the +formatted output of your document. + +* Menu: + +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search + + +File: auctex.info, Node: Starting Viewers, Next: I/O Correlation, Up: Viewing + +4.2.1 Starting Viewers +---------------------- + +Viewers are normally invoked by pressing 'C-c C-c' once the document is +formatted, which will propose the 'View' command, or by activating the +respective entry in the Command menu. Alternatively you can type 'C-c +C-v' which calls the function 'TeX-view'. + + -- Command: TeX-view + ('C-c C-v') Start a viewer without confirmation. The viewer is + started either on a region or the master file, depending on the + last command issued. This is especially useful for jumping to the + location corresponding to point in the viewer when using + 'TeX-source-correlate-mode'. + + AUCTeX will try to guess which type of viewer (DVI, PostScript or +PDF) has to be used and what options are to be passed over to it. This +decision is based on the output files present in the working directory +as well as the class and style options used in the document. For +example, if there is a DVI file in your working directory, a DVI viewer +will be invoked. In case of a PDF file it will be a PDF viewer. If you +specified a special paper format like 'a5paper' or use the 'landscape' +option, this will be passed to the viewer by the appropriate options. +Especially some DVI viewers depend on this kind of information in order +to display your document correctly. In case you are using 'pstricks' or +'psfrag' in your document, a DVI viewer cannot display the contents +correctly and a PostScript viewer will be invoked instead. + + The association between the tests for the conditions mentioned above +and the viewers is made in the variable 'TeX-view-program-selection'. +Therefore this variable is the starting point for customization if you +want to use other viewers than the ones suggested by default. + + -- User Option: TeX-view-program-selection + This is a list of predicates and viewers which is evaluated from + front to back in order to find out which viewer to call under the + given conditions. In the first element of each list item you can + reference one or more predicates defined in + 'TeX-view-predicate-list' or 'TeX-view-predicate-list-builtin'. In + the second element you can reference a viewer defined in + 'TeX-view-program-list' or 'TeX-view-program-list-builtin'. The + viewer of the first item with a positively evaluated predicate is + selected. + + So 'TeX-view-program-selection' only contains references to the +actual implementations of predicates and viewer commands respectively +which can be found elsewhere. AUCTeX comes with a set of preconfigured +predicates and viewer commands which are stored in the variables +'TeX-view-predicate-list-builtin' and 'TeX-view-program-list-builtin' +respectively. If you are not satisfied with those and want to overwrite +one of them or add your own definitions, you can do so via the variables +'TeX-view-predicate-list' and 'TeX-view-program-list'. + + -- User Option: TeX-view-predicate-list + This is a list of predicates for viewer selection and invocation. + The first element of each list item is a symbol and the second + element a Lisp form to be evaluated. The form should return nil if + the predicate is not fulfilled. + + A built-in predicate from 'TeX-view-predicate-list-builtin' can be + overwritten by defining a new predicate with the same symbol. + + -- User Option: TeX-view-program-list + This is a list of viewer specifications each consisting of a + symbolic name and either a command line or a function to be invoked + when the viewer is called. If a command line is used, parts of it + can be conditionalized by prefixing them with predicates from + 'TeX-view-predicate-list' or 'TeX-view-predicate-list-builtin'. + (See the doc string for the exact format to use.) The command line + can also contain placeholders as defined in 'TeX-expand-list' and + 'TeX-expand-list-builtin' which are expanded before the viewer is + called. + + The third element of each item is a string, or a list of strings, + with the name of the executable, or executables, needed to open the + output file in the viewer. Placeholders defined in + 'TeX-expand-list' and 'TeX-expand-list-builtin' can be used here. + This element is optional and is used to check whether the viewer is + actually available on the system. + + A built-in viewer spec from 'TeX-view-program-list-builtin' can be + overwritten by defining a new viewer spec with the same name. + + After the viewer is called via either the 'View' command or the key +stroke 'C-c C-v', the window system focus goes and stays on the viewer. +If you prefer that the focus is pulled back to Emacs immediately after +that and you are using evince-compatible viewer, customize the option +'TeX-view-enince-keep-focus'. + + -- User Option: TeX-view-evince-keep-focus + When this option is non-nil and the viewer is compatible with + evince, the focus is pulled back to Emacs immediately after the + viewer is invoked or refreshed from within AUCTeX. + + Note that the viewer selection and invocation as described above will +only work if certain default settings in AUCTeX are intact. For one, +the whole viewer selection machinery will only be triggered if there is +no '%V' expander in 'TeX-expand-list'. So if you have trouble with the +viewer invocation you might check if there is an older customization of +the variable in place. In addition, the use of a function in +'TeX-view-program-list' only works if the 'View' command in +'TeX-command-list' makes use of the hook 'TeX-run-discard-or-function'. + + +File: auctex.info, Node: I/O Correlation, Prev: Starting Viewers, Up: Viewing + +4.2.2 Forward and Inverse Search +-------------------------------- + +Forward and inverse search refer to the correlation between the document +source in the editor and the typeset document in the viewer. Forward +search allows you to jump to the place in the previewed document +corresponding to a certain line in the document source and inverse +search vice versa. + + AUCTeX supports three methods for forward and inverse search: source +specials (only DVI output), the pdfsync LaTeX package (only PDF output) +and SyncTeX (any type of output). If you want to make use of forward +and inverse searching with source specials or SyncTeX, switch on +'TeX-source-correlate-mode'. *Note Processor Options::, on how to do +that. The use of the pdfsync package is detected automatically if +document parsing is enabled. Customize the variable +'TeX-source-correlate-method' to select the method to use. + + -- User Option: TeX-source-correlate-method + Method to use for enabling forward and inverse search. This can be + 'source-specials' if source specials should be used, 'synctex' if + SyncTeX should be used, or 'auto' if AUCTeX should decide. + + When the variable is set to 'auto', AUCTeX will always use SyncTeX + if your 'latex' processor supports it, source specials otherwise. + You must make sure your viewer supports the same method. + + It is also possible to specify a different method depending on the + output, either DVI or PDF, by setting the variable to an alist of + the kind + ((dvi . '<source-specials or synctex>') + (pdf . '<source-specials or synctex>')) + in which the CDR of each entry is a symbol specifying the method to + be used in the corresponding mode. The default value of the + variable is + ((dvi . source-specials) + (pdf . synctex)) + which is compatible with the majority of viewers. + + Forward search happens automatically upon calling the viewer, e.g. by +typing 'C-c C-v' ('TeX-view'). This will open the viewer or bring it to +front and display the output page corresponding to the position of point +in the source file. AUCTeX will automatically pass the necessary +command line options to the viewer for this to happen. + + You can also make special mouse event do forward search at the +clicked position. Use 'TeX-source-correlate-map'(1) and +'TeX-view-mouse' like this: + (eval-after-load "tex" + '(define-key TeX-source-correlate-map [C-down-mouse-1] + #'TeX-view-mouse)) + This example binds 'C-down-mouse-1', which usually opens a concise +menu to select buffer, to the command to do forward search. + + Upon opening the viewer you will be asked if you want to start a +server process (Gnuserv or Emacs server) which is necessary for inverse +search. This happens only if there is no server running already. You +can customize the variable 'TeX-source-correlate-start-server' to +inhibit the question and always or never start the server respectively. + + -- User Option: TeX-source-correlate-start-server + If 'TeX-source-correlate-mode' is active and a viewer is invoked, + the default behavior is to ask if a server process should be + started. Set this variable to 't' if the question should be + inhibited and the server should always be started. Set it to 'nil' + if the server should never be started. Inverse search will not be + available in the latter case. + + Inverse search, i.e. jumping to the part of your document source in +Emacs corresponding to a certain position in the viewer, is triggered +from the viewer, typically by a mouse click. Refer to the documentation +of your viewer to find out how it has to be configured and what you have +to do exactly. In xdvi you normally have to use 'C-down-mouse-1'. + + Note that inverse search with the Evince PDF viewer or its MATE fork +Atril might fail in raising the Emacs frame after updating point in your +document's buffer. There is simply no way to raise the Emacs frame +reliably accross different operating systems and different window +managers with their different focus stealing policies. If the Emacs +frame is not raised after performing an inverse search from Evince or +Atril, you can customize the following option. + + -- User Option: TeX-raise-frame-function + A function that will be called after performing an inverse search + from Evince or Atril in order to raise the current Emacs frame. + + If your Emacs frame is already raised in that situation, just leave + this variable set to its default value 'raise-frame'. Otherwise, + here are some alternative settings that work for some users. + + ;; Alternative 1: For some users, `x-focus-frame' works. + (setq TeX-raise-frame-function #'x-focus-frame) + + ;; Alternative 2: Under GNOME 3.20 (and probably others), it + ;; seems some focus stealing prevention policy prohibits that + ;; some window gets the focus immediately after the user has + ;; clicked in some other window. Here waiting a bit before + ;; issuing the request seems to work. + (setq TeX-raise-frame-function + (lambda () + (run-at-time 0.5 nil #'x-focus-frame))) + + ;; Alternative 3: Use the external wmctrl tool in order to + ;; force Emacs into the focus. + (setq TeX-raise-frame-function + (lambda () + (call-process + "wmctrl" nil nil nil "-i" "-R" + (frame-parameter (selected-frame) 'outer-window-id)))) + + ---------- Footnotes ---------- + + (1) The keymap name is 'TeX-source-correlate-map', not +'TeX-source-correlate-mode-map'. Actually, this keymap isn't +implemented as minor mode map of 'TeX-source-correlate-mode', in order +that its bindings don't affect buffers outside of AUCTeX. + + +File: auctex.info, Node: Debugging, Next: Checking, Prev: Viewing, Up: Processing + +4.3 Catching the errors +======================= + +Once you've formatted your document you may 'debug' it, i.e. browse +through the errors (La)TeX reported. You may also have a look at a +nicely formatted list of all errors and warnings reported by the +compiler. + + -- Command: TeX-next-error ARG REPARSE + ('C-c `') Go to the next error reported by TeX. The view will be + split in two, with the cursor placed as close as possible to the + error in the top view. In the bottom view, the error message will + be displayed along with some explanatory text. + + An optional numeric ARG, positive or negative, specifies how many + error messages to move. A negative ARG means to move back to + previous error messages, see also 'TeX-previous-error'. + + The optional REPARSE argument makes AUCTeX reparse the error + message buffer and start the debugging from the first error. This + can also be achieved by calling the function with a prefix argument + ('C-u'). + + -- Command: TeX-previous-error ARG + ('M-g p') Go to the previous error reported by TeX. An optional + numeric ARG specifies how many error messages to move backward. + This is like calling 'TeX-next-error' with a negative argument. + + The command 'TeX-previous-error' works only if AUCTeX can parse the +whole TeX log buffer. This is controlled by the 'TeX-parse-all-errors' +variable. + + -- User Option: TeX-parse-all-errors + If t, AUCTeX automatically parses the whole output log buffer right + after running a TeX command, in order to collect all warnings and + errors. This makes it possible to navigate back and forth between + the error messages using 'TeX-next-error' and 'TeX-previous-error'. + This is the default. If nil, AUCTeX does not parse the whole + output log buffer and 'TeX-previous-error' cannot be used. + + As default, AUCTeX will display a special help buffer containing the +error reported by TeX along with the documentation. There is however an +'expert' option, which allows you to display the real TeX output. + + -- User Option: TeX-display-help + If t AUCTeX will automatically display a help text whenever an + error is encountered using 'TeX-next-error' ('C-c `'). If nil a + terse information about the error is displayed in the echo area. + If 'expert' AUCTeX will display the output buffer with the raw TeX + output. + +* Menu: + +* Ignoring warnings:: Controlling warnings to be reported +* Error overview:: List of all errors and warnings + + +File: auctex.info, Node: Ignoring warnings, Next: Error overview, Up: Debugging + +4.3.1 Controlling warnings to be reported +----------------------------------------- + +Normally AUCTeX will only report real errors, but you may as well ask it +to report 'bad boxes' and warnings as well. + + -- Command: TeX-toggle-debug-bad-boxes + ('C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes + (i.e. overfull and underfull boxes) as well as normal errors. The + boolean option 'TeX-debug-bad-boxes' is set accordingly. + + -- Command: TeX-toggle-debug-warnings + ('C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as + well as normal errors. The boolean option 'TeX-debug-warnings' is + set accordingly. + + While many users desire to have warnings reported after compilation, +there are certain warnings that are considered unimportant and users +want to ignore them. For a more fine-grained control of what kinds of +warnings should be shown after compilation, AUCTeX provides other +options. + + -- User Option: TeX-ignore-warnings + Controls which warnings are to be ignored. + + It can be a regexp matching the message of the warnings to be + ignored. + + More advanced users can set also this option to a symbol with the + name of a custom function taking as arguments all the information + of the warning listed in 'TeX-error-list' variable, except the last + one about whether to ignore the warning. See the code of + 'TeX-warning' function and the documentation of 'TeX-error-list' + for more details. + + -- Command: TeX-toggle-suppress-ignored-warnings + ('C-c C-t C-x') Toggle whether AUCTeX should actually hide the + ignored warnings specified with 'TeX-ignore-warnings'. The boolean + option 'TeX-suppress-ignored-warnings' is set accordingly. If this + is nil, all warnings are shown, even those matched by + 'TeX-ignore-warnings', otherwise these are hidden. + + Note that 'TeX-debug-warnings' takes the precedence: if it is nil, + all warnings are hidden in any case. + + +File: auctex.info, Node: Error overview, Prev: Ignoring warnings, Up: Debugging + +4.3.2 List of all errors and warnings +------------------------------------- + +When the option 'TeX-parse-all-errors' is non-nil, you will be also able +to open an overview of all errors and warnings reported by the TeX +compiler. + + -- Command: TeX-error-overview + Show an overview of the errors and warnings occurred in the last + TeX run. + + In this window you can visit the error on which point is by + pressing <RET>, and visit the next or previous issue by pressing + <n> or <p> respectively. A prefix argument to these keys specifies + how many errors to move forward or backward. You can visit an + error also by clicking on its message. Jump to error point in the + source code with <j>, and use <l> see the error in the log buffer. + In addition, you can toggle visibility of bad boxes, generic + warnings, and ignored warnings with <b>, <w>, and <x>, respectively + (see *note Ignoring warnings:: for details). Press <q> to quit the + overview. + + -- User Option: TeX-error-overview-open-after-TeX-run + When this boolean variable is non-nil, the error overview will be + automatically opened after running TeX if there are errors or + warnings to show. + + The error overview is opened in a new window of the current frame by +default, but you can change this behavior by customizing the option +'TeX-error-overview-setup'. + + -- User Option: TeX-error-overview-setup + Controls the frame setup of the error overview. The possible value + is: 'separate-frame'; with a nil value the current frame is used + instead. + + The parameters of the separate frame can be set with the + 'TeX-error-overview-frame-parameters' option. + + If the display does not support multi frame, the current frame will + be used regardless of the value of this variable. + + +File: auctex.info, Node: Checking, Next: Control, Prev: Debugging, Up: Processing + +4.4 Checking for problems +========================= + +Running TeX or LaTeX will only find regular errors in the document, not +examples of bad style. Furthermore, description of the errors may often +be confusing. The utilities 'lacheck' and 'chktex' can be used to find +style errors, such as forgetting to escape the space after an +abbreviation or using '...' instead of '\ldots' and other similar +problems. You start 'lacheck' with 'C-c C-c Check <RET>' and 'chktex' +with 'C-c C-c ChkTeX <RET>'. The result will be a list of errors in the +'*compilation*' buffer. You can go through the errors with 'C-x `' +('next-error', *note (emacs)Compilation::), which will move point to the +location of the next error. + + Alternatively, you may want in-buffer notation. AUCTeX provides +support for this using the Flymake package in Emacs 26 or newer (*note +(Flymake)Using Flymake:: for details). To enable, call 'M-x +flymake-mode <RET>' in the buffer or enable it in all buffers by adding +this to your init file: + (add-hook 'LaTeX-mode-hook #'flymake-mode) + Note that AUCTeX currently only provides support for using 'chktex' +as the flymake backend. + + Each of the two utilities 'lacheck' and 'chktex' will find some +errors the other doesn't, but 'chktex' is more configurable, allowing +you to create your own errors. You may need to install the programs +before using them. You can get 'lacheck' from +URL:<https://www.ctan.org/pkg/lacheck> and 'chktex' from +URL:<https://www.ctan.org/pkg/chktex>. TeX Live contains both. + + +File: auctex.info, Node: Control, Next: Cleaning, Prev: Checking, Up: Processing + +4.5 Controlling the output +========================== + +A number of commands are available for controlling the output of an +application running under AUCTeX + + -- Command: TeX-kill-job + ('C-c C-k') Kill currently running external application. This may + be either of TeX, LaTeX, previewer, BibTeX, etc. + + -- Command: TeX-recenter-output-buffer + ('C-c C-l') Recenter the output buffer so that the bottom line is + visible. + + -- Command: TeX-home-buffer + ('C-c ^') Go to the 'master' file in the document associated with + the current buffer, or if already there, to the file where the + current process was started. + + Additionally, output files produced by AUCTeX can be placed in a +separate directory. + + -- User Option: TeX-output-dir + Set this option to the path of a directory where output files will + be placed. The output files include those that are produced by + applications running under AUCTeX, temporary files related to + region processing and the preview-latex files. If a relative path + is specified, it is interpreted as being relative to the master + file in a mutlifile document. + + This is a buffer local variable and must be set separately for all + documents and all files in a multifile document. For example, + + %%% Local Variables: + %%% mode: latex + %%% TeX-output-dir: "build" + %%% End: + + Alternatively, you may use 'setq-default' to set the default value + of this option or set it as a directory local variable (*note + (emacs)Directory Variables::). + + Note that a non-nil value of 'TeX-output-dir' might be incompatible + with some TeX commands and macros. In particular, the LaTeX macro + '\include' is known to not work with this option. Some TeX + packages which produce intermediary files might also be + incompatible. A possible workaround for those packages is to + append the value of 'TeX-output-dir' to the environment variables + 'TEXINPUTS' and 'BIBINPUTS'. + + +File: auctex.info, Node: Cleaning, Next: Documentation, Prev: Control, Up: Processing + +4.6 Cleaning intermediate and output files +========================================== + + -- Command: TeX-clean + Remove generated intermediate files. In case a prefix argument is + given, remove output files as well. + + Canonical access to the function is provided by the 'Clean' and + 'Clean All' entries in 'TeX-command-list', invokable with 'C-c C-c' + or the Command menu. + + The patterns governing which files to remove can be adapted + separately for each AUCTeX mode by means of the following + variables: + * 'plain-TeX-clean-intermediate-suffixes' + * 'plain-TeX-clean-output-suffixes' + * 'LaTeX-clean-intermediate-suffixes' + * 'LaTeX-clean-output-suffixes' + * 'docTeX-clean-intermediate-suffixes' + * 'docTeX-clean-output-suffixes' + * 'Texinfo-clean-intermediate-suffixes' + * 'Texinfo-clean-output-suffixes' + * 'ConTeXt-clean-intermediate-suffixes' + * 'ConTeXt-clean-output-suffixes' + * 'AmSTeX-clean-intermediate-suffixes' + * 'AmSTeX-clean-output-suffixes' + + -- User Option: TeX-clean-confirm + Control if deletion of intermediate and output files has to be + confirmed before it is actually done. If non-nil, ask before + deleting files. + + +File: auctex.info, Node: Documentation, Prev: Cleaning, Up: Processing + +4.7 Documentation about macros and packages +=========================================== + + -- Command: TeX-documentation-texdoc + ('C-c ?') Get documentation about the packages installed on your + system, using 'texdoc' to find the manuals. The function will + prompt for the name of packages. If point is on a word, this will + be suggested as default. + + If the command is called with a prefix argument, you will be shown + a list of manuals of the given package among to choose. + + The command can be invoked by the key binding mentioned above as + well as the 'Find Documentation...' entry in the mode menu. + + +File: auctex.info, Node: Customization, Next: Appendices, Prev: Processing, Up: Top + +5 Customization and Extension +***************************** + +* Menu: + +* Modes and Hooks:: Modes and Hooks +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of TeX Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support + + +File: auctex.info, Node: Modes and Hooks, Next: Multifile, Up: Customization + +5.1 Modes and Hooks +=================== + +AUCTeX supports a wide variety of derivatives and extensions of TeX. +Besides plain TeX those are LaTeX, AMS-TeX, ConTeXt, Texinfo and docTeX. +For each of them there is a separate major mode in AUCTeX and each major +mode runs 'text-mode-hook', 'TeX-mode-hook' as well as a hook special to +the mode in this order. (As an exception, Texinfo mode does not run +'TeX-mode-hook'.) The following table provides an overview of the +respective mode functions and hooks. + +Type Mode function Hook +------------------------------------------------------- +Plain TeX 'plain-tex-mode' 'plain-TeX-mode-hook' +LaTeX 'latex-mode' 'LaTeX-mode-hook' +AMS-TeX 'ams-tex-mode' 'AmS-TeX-mode-hook' +ConTeXt 'context-mode' 'ConTeXt-mode-hook' +Texinfo 'texinfo-mode' 'Texinfo-mode-hook' +DocTeX 'doctex-mode' 'docTeX-mode-hook' + + If you need to make a customization via a hook which is only relevant +for one of the modes listed above, put it into the respective mode hook, +if it is relevant for any AUCTeX mode, add it to 'TeX-mode-hook' and if +it is relevant for all text modes, append it to 'text-mode-hook'. + + Other useful hooks are listed below. + + -- Variable: TeX-after-compilation-finished-functions + Hook which is run after the TeX/LaTeX processor has successfully + finished compiling your document. (*Note Processing::, for finding + out how to compile your document.) Each function in the hook is + run with the compiled output document as its argument. + + This is useful for automatically refreshing the viewer after + re-compilation especially when using Emacs viewers such as DocView + or PDF Tools. The function 'TeX-revert-document-buffer' can be + added to the hook for this purpose. + + +File: auctex.info, Node: Multifile, Next: Parsing Files, Prev: Modes and Hooks, Up: Customization + +5.2 Multifile Documents +======================= + +You may wish to spread a document over many files (as you are likely to +do if there are multiple authors, or if you have not yet discovered the +power of the outline commands (*note Outline::)). This can be done by +having a "master" file in which you include the various files with the +TeX macro '\input' or the LaTeX macro '\include'. These files may also +include other files themselves. However, to format the document you +must run the commands on the top level master file. + + When you, for example, ask AUCTeX to run a command on the master +file, it has no way of knowing the name of the master file. By default, +it will assume that the current file is the master file. If you insert +the following in your init file ('init.el' or '.emacs'), AUCTeX will use +a more advanced algorithm. + + (setq-default TeX-master nil) ; Query for master file. + + In this case, AUCTeX will ask for the name of the master file +associated with the buffer. To avoid asking you again, AUCTeX will +automatically insert the name of the master file as a file variable +(*note (emacs)File Variables::). You can also insert the file variable +yourself, by putting the following text at the end of your files. + + %%% Local Variables: + %%% TeX-master: "master" + %%% End: + + You should always set this variable to the name of the top level +document. If you always use the same name for your top level documents, +you can set 'TeX-master' in your init file such as 'init.el' or +'.emacs'. + + (setq-default TeX-master "master") ; All master files called "master". + + -- User Option: TeX-master + The master file associated with the current buffer. If the file + being edited is actually included from another file, then you can + tell AUCTeX the name of the master file by setting this variable. + If there are multiple levels of nesting, specify the top level + file. + + If this variable is 'nil', AUCTeX will query you for the name. + + If the variable is 't', then AUCTeX will assume the file is a + master file itself. + + If the variable is 'shared', then AUCTeX will query for the name, + but will not change the file. + + If the variable is 'dwim', AUCTeX will try to avoid querying by + attempting to "do what I mean"; and then change the file. + + -- User Option: TeX-one-master + Regular expression matching ordinary TeX files. + + You should set this variable to match the name of all files, for + which it is a good idea to append a 'TeX-master' file variable + entry automatically. When AUCTeX adds the name of the master file + as a file variable, it does not need to ask next time you edit the + file. + + If you dislike AUCTeX automatically modifying your files, you can + set this variable to '"<none>"'. By default, AUCTeX will modify + any file with an extension of '.tex', '.texi' or '.dtx'. + + -- Command: TeX-master-file-ask + ('C-c _') Query for the name of a master file and add the + respective File Variables (*note (emacs)File Variables::) to the + file for setting this variable permanently. + + AUCTeX will not ask for a master file when it encounters existing + files. This function shall give you the possibility to insert the + variable manually. + + AUCTeX keeps track of macros, environments, labels, and style files +that are used in a given document. For this to work with multifile +documents, AUCTeX has to have a place to put the information about the +files in the document. This is done by having an 'auto' subdirectory +placed in the directory where your document is located. Each time you +save a file, AUCTeX will write information about the file into the +'auto' directory. When you load a file, AUCTeX will read the +information in the 'auto' directory about the file you loaded _and the +master file specified by 'TeX-master'_. Since the master file (perhaps +indirectly) includes all other files in the document, AUCTeX will get +information from all files in the document. This means that you will +get from each file, for example, completion for all labels defined +anywhere in the document. + + AUCTeX will create the 'auto' directory automatically if +'TeX-auto-save' is non-nil. Without it, the files in the document will +not know anything about each other, except for the name of the master +file. *Note Automatic Local::. + + -- Command: TeX-save-document + ('C-c C-d') Save all buffers known to belong to the current + document. + + -- User Option: TeX-save-query + If non-nil, then query the user before saving each file with + 'TeX-save-document'. + + +File: auctex.info, Node: Parsing Files, Next: Internationalization, Prev: Multifile, Up: Customization + +5.3 Automatic Parsing of TeX Files +================================== + +AUCTeX depends heavily on being able to extract information from the +buffers by parsing them. Since parsing the buffer can be somewhat slow, +the parsing is initially disabled. You are encouraged to enable them by +adding the following lines to your init file such as 'init.el' or +'.emacs'. + + (setq TeX-parse-self t) ; Enable parse on load. + (setq TeX-auto-save t) ; Enable parse on save. + + The latter command will make AUCTeX store the parsed information in +an 'auto' subdirectory in the directory each time the TeX files are +stored, *note Automatic Local::. If AUCTeX finds the pre-parsed +information when loading a file, it will not need to reparse the buffer. +The information in the 'auto' directory is also useful for multifile +documents, *note Multifile::, since it allows each file to access the +parsed information from all the other files in the document. This is +done by first reading the information from the master file, and then +recursively the information from each file stored in the master file. + + The variables can also be set on a per file basis, by changing the +file local variables. + + %%% Local Variables: + %%% TeX-parse-self: t + %%% TeX-auto-save: t + %%% End: + + Even when you have disabled the automatic parsing, you can force the +generation of style information by pressing 'C-c C-n'. This is often +the best choice, as you will be able to decide when it is necessary to +reparse the file. + + -- User Option: TeX-parse-self + Parse file after loading it if no style hook is found for it. + + -- User Option: TeX-auto-save + Automatically save style information when saving the buffer. + + -- Command: TeX-normal-mode ARG + ('C-c C-n') Remove all information about this buffer, and apply the + style hooks again. Save buffer first including style information. + With optional argument, also reload the style hooks. + + When AUCTeX saves your buffer, it can optionally convert all tabs in +your buffer into spaces. Tabs confuse AUCTeX's error message parsing +and so should generally be avoided. However, tabs are significant in +some environments, and so by default AUCTeX does not remove them. To +convert tabs to spaces when saving a buffer, insert the following in +your init file such as 'init.el' or '.emacs': + + (setq TeX-auto-untabify t) + + -- User Option: TeX-auto-untabify + Automatically remove all tabs from a file before saving it. + + Instead of disabling the parsing entirely, you can also speed it +significantly up by limiting the information it will search for (and +store) when parsing the buffer. You can do this by setting the default +values for the buffer local variables 'TeX-auto-regexp-list' and +'TeX-auto-parse-length' in your init file such as 'init.el' or '.emacs'. + + ;; Only parse LaTeX class and package information. + (setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list) + ;; The class and package information is usually near the beginning. + (setq-default TeX-auto-parse-length 2000) + + This example will speed the parsing up significantly, but AUCTeX will +no longer be able to provide completion for labels, macros, +environments, or bibitems specified in the document, nor will it know +what files belong to the document. + + These variables can also be specified on a per file basis, by +changing the file local variables. + + %%% Local Variables: + %%% TeX-auto-regexp-list: TeX-auto-full-regexp-list + %%% TeX-auto-parse-length: 999999 + %%% End: + + -- User Option: TeX-auto-regexp-list + List of regular expressions used for parsing the current file. + + -- User Option: TeX-auto-parse-length + Maximal length of TeX file that will be parsed. + + The pre-specified lists of regexps are defined below. You can use +these before loading AUCTeX by quoting them, as in the example above. + + -- Constant: TeX-auto-empty-regexp-list + Parse nothing + + -- Constant: LaTeX-auto-minimal-regexp-list + Only parse LaTeX class and packages. + + -- Constant: LaTeX-auto-label-regexp-list + Only parse LaTeX labels. + + -- Constant: LaTeX-auto-index-regexp-list + Only parse LaTeX index and glossary entries. + + -- Constant: LaTeX-auto-class-regexp-list + Only parse macros in LaTeX classes and packages. + + -- Constant: LaTeX-auto-pagestyle-regexp-list + Only parse LaTeX pagestyles. + + -- Constant: LaTeX-auto-counter-regexp-list + Only parse LaTeX counters. + + -- Constant: LaTeX-auto-length-regexp-list + Only parse LaTeX lengths. + + -- Constant: LaTeX-auto-savebox-regexp-list + Only parse LaTeX saveboxes. + + -- Constant: LaTeX-auto-regexp-list + Parse common LaTeX commands. + + -- Constant: plain-TeX-auto-regexp-list + Parse common plain TeX commands. + + -- Constant: TeX-auto-full-regexp-list + Parse all TeX and LaTeX commands that AUCTeX can use. + + +File: auctex.info, Node: Internationalization, Next: Automatic, Prev: Parsing Files, Up: Customization + +5.4 Language Support +==================== + +TeX and Emacs are usable for European (Latin, Cyrillic, Greek) based +languages. Some LaTeX and EmacsLisp packages are available for easy +typesetting and editing documents in European languages. + + All Emacs versions supported by current AUCTeX can handle CJK +(Chinese, Japanese, and Korean) languages by default. + + In most cases, special versions of TeX engines are needed for +high-quality typesetting of CJK languages: CTeX and ChinaTeX for +Chinese, ASCII pTeX, upTeX and NTT jTeX for Japanese, HLaTeX and kTeX +for Korean. They are necessary as well when you want to typeset +documents saved in their domestic encodings such as 'Shift-JIS'. +Currently, AUCTeX offers native support for pTeX, upTeX and jTeX only. + + If you don't need fine tuning in the result with respect to the +typesetting rules of their respective national standards, most unicode +based TeX engines, e.g. LuaTeX and XeTeX, can handle CJK languages by +default if they are encoded in UTF-8. The CJK-LaTeX package is provided +for supporting CJK scripts in a standard LaTeX document. + +* Menu: + +* European:: Using AUCTeX with European Languages +* Japanese:: Using AUCTeX with Japanese + + +File: auctex.info, Node: European, Next: Japanese, Up: Internationalization + +5.4.1 Using AUCTeX with European Languages +------------------------------------------ + +5.4.1.1 Typing and Displaying Non-ASCII Characters +.................................................. + +First you will need a way to write non-ASCII characters. You can either +use macros, or teach TeX about the ISO character sets. I prefer the +latter, it has the advantage that the usual standard emacs word movement +and case change commands will work. + + Recommended encoding for LaTeX document is UTF-8. Recent LaTeX2e has +native support for UTF-8. If your LaTeX2e is not recent enough, just +add '\usepackage[utf8]{inputenc}'. + + You can still use ISO 8859 Latin 1 encoding with +'\usepackage[latin1]{inputenc}'. + + To be able to display non-ASCII characters you will need an +appropriate font. All Emacs versions supported by current AUCTeX can +display 8-bit characters, provided that suitable fonts are installed. + + A compromise is to use an European character set when editing the +file, and convert to TeX macros when reading and writing the files. + +'iso-cvt.el' + Much like 'iso-tex.el' but is bundled with Emacs 19.23 and later. + +'X-Symbol' + a much more complete package for Emacs that can also handle a lot + of mathematical characters and input methods. + +5.4.1.2 Style Files for Different Languages +........................................... + +AUCTeX supports style files for several languages. Each style file may +modify AUCTeX to better support the language, and will run a language +specific hook that will allow you to for example change ispell +dictionary, or run code to change the keyboard remapping. The following +will for example choose a Danish dictionary for documents including +'\usepackage[danish]{babel}'. This requires parsing to be enabled, +*note Parsing Files::. + + (add-hook 'TeX-language-dk-hook + (lambda () (ispell-change-dictionary "danish"))) + + The following style files are recognized: + +'brazilian' +'brazil' + Runs style hook 'TeX-language-pt-br-hook'. Gives '"' word syntax, + makes the <"> key inserts '``' or '''' depending on context. + Typing <"> twice will insert a literal '"'. Typing <-> twice will + insert '"=', three times '--'. + +'bulgarian' + Runs style hook 'TeX-language-bg-hook'. Gives '"' word syntax, + makes the <"> key insert a literal '"'. Typing <"> twice will + insert '"`' or '"'' depending on context. Typing <-> twice will + insert '"=', three times '--'. + +'czech' + Runs style hook 'TeX-language-cz-hook'. Pressing <"> will insert + '\uv{' and '}' depending on context. + +'danish' + Runs style hook 'TeX-language-dk-hook'. Pressing <"> will insert + '"`' and '"'' depending on context. Typing <-> twice will insert + '"=', i.e. a hyphen string allowing hyphenation in the composing + words. + +'dutch' + Runs style hook 'TeX-language-nl-hook'. + +'english' +'australian' +'canadian' +'newzealand' + Runs style hook 'TeX-language-en-hook'. + +'frenchb' +'francais' + Runs style hook 'TeX-language-fr-hook'. Pressing <"> will insert + '\og' and '\fg' depending on context. Note that the language name + for customizing 'TeX-quote-language-alist' is 'french'. + +'german' +'ngerman' + Runs style hook 'TeX-language-de-hook'. Gives '"' word syntax, + makes the <"> key insert a literal '"'. Pressing the key twice + will give you opening or closing German quotes ('"`' or '"''). + Typing <-> twice will insert '"=', three times '--'. + +'icelandic' + Runs style hook 'TeX-language-is-hook'. Gives '"' word syntax, + makes the <"> key insert a literal '"'. Typing <"> twice will + insert '"`' or '"'' depending on context. Typing <-> twice will + insert '"=', three times '--'. + +'italian' + Runs style hook 'TeX-language-it-hook'. Pressing <"> will insert + '"<' and '">' depending on context. + +'polish' + Runs style hook 'TeX-language-pl-hook'. Gives '"' word syntax and + makes the <"> key insert a literal '"'. Pressing <"> twice will + insert '"`' or '"'' depending on context. + +'polski' + Runs style hook 'TeX-language-pl-hook'. Makes the <"> key insert a + literal '"'. Pressing <"> twice will insert ',,' or '''' depending + on context. + +'portuguese' +'portuges' + Runs style hook 'TeX-language-pt-hook'. Gives '"' word syntax, + makes the <"> key inserts '"<' or '">' depending on context. + Typing <"> twice will insert a literal '"'. Typing <-> twice will + insert '"=', three times '--'. Note that the language name for + customizing 'TeX-quote-language-alist' is 'portuguese'. + +'slovak' + Runs style hook 'TeX-language-sk-hook'. Pressing <"> will insert + '\uv{' and '}' depending on context. + +'swedish' + Runs style hook 'TeX-language-sv-hook'. Pressing <"> will insert + ''''. Typing <-> twice will insert '"=', three times '--'. + + Replacement of language-specific hyphen strings like '"=' with dashes +does not require to type <-> three times in a row. You can put point +after the hypen string anytime and trigger the replacement by typing +<->. + + In case you are not satisfied with the suggested behavior of quote +and hyphen insertion you can change it by customizing the variables +'TeX-quote-language-alist' and 'LaTeX-babel-hyphen-language-alist' +respectively. + + -- User Option: TeX-quote-language-alist + Used for overriding the default language-specific quote insertion + behavior. This is an alist where each element is a list consisting + of four items. The first item is the name of the language in + concern as a string. See the list of supported languages above. + The second item is the opening quotation mark. The third item is + the closing quotation mark. Opening and closing quotation marks + can be specified directly as strings or as functions returning a + string. The fourth item is a boolean controlling quote insertion. + It should be non-nil if if the special quotes should only be used + after inserting a literal '"' character first, i.e. on second key + press. + + -- User Option: LaTeX-babel-hyphen-language-alist + Used for overriding the behavior of hyphen insertion for specific + languages. Every element in this alist is a list of three items. + The first item should specify the affected language as a string. + The second item denotes the hyphen string to be used as a string. + The third item, a boolean, controls the behavior of hyphen + insertion and should be non-nil if the special hyphen should be + inserted after inserting a literal '-' character, i.e. on second + key press. + + The defaults of hyphen insertion are defined by the variables +'LaTeX-babel-hyphen' and 'LaTeX-babel-hyphen-after-hyphen' respectively. + + -- User Option: LaTeX-babel-hyphen + String to be used when typing <->. This usually is a hyphen + alternative or hyphenation aid provided by 'babel' and the related + language style files, like '"=', '"~' or '"-'. + + Set it to an empty string or nil in order to disable + language-specific hyphen insertion. + + -- User Option: LaTeX-babel-hyphen-after-hyphen + Control insertion of hyphen strings. If non-nil insert normal + hyphen on first key press and swap it with the language-specific + hyphen string specified in the variable 'LaTeX-babel-hyphen' on + second key press. If nil do it the other way round. + + +File: auctex.info, Node: Japanese, Prev: European, Up: Internationalization + +5.4.2 Using AUCTeX with Japanese TeX +------------------------------------ + +To write Japanese text with AUCTeX, you need the versions of TeX and +Emacs that support Japanese. AUCTeX supports three Japanese TeX engines +by default: NTT jTeX, ASCII pTeX and upTeX. + + Activate 'japanese-plain-tex-mode' or 'japanese-latex-mode' to use +the Japanese TeX engines. If it doesn't work, send mail to Masayuki +Ataka <masayuki.ataka@gmail.com> or Ikumi Keita +<ikumikeita@jcom.home.ne.jp>, who currently concern with stuff related +to Japanese in AUCTeX. None of the primary AUCTeX maintainers +understand Japanese, so they cannot help you. + + It is recommended to enable 'TeX-parse-self' for typical Japanese +LaTeX users. When enabled, 'japanese-latex-mode' selects the suitable +Japanese TeX engine automatically based on the class file name (such as +'jbook', 'jsarticle' and 'tjreport') and its option. *Note Parsing +Files::. + + It is important to select the suitable Japanese TeX engine because +the selected engine determines the command name such as 'platex' and +'uptex' to typeset the document. If you find that wrong command is +used, check the value of 'TeX-engine' on that buffer. If the value does +not suit the current document, change the value by the 'TeXing Options' +submenu below the 'Command' menu. *Note Processor Options::. + + To make the selected engine to persist across Emacs sessions, there +are two ways from which you can choose one according to your needs: + + 1. If you use a specific engine (almost) exclusively, customize the + option 'japanese-TeX-engine-default'. + + -- User Option: japanese-TeX-engine-default + The default 'TeX-engine' in Japanese TeX mode. + + The default value is 'ptex'. + 2. If you want to set the engine on a per file basis, use the file + local variables to set 'TeX-engine'. + + Here is a sample code to set 'TeX-engine' to 'uptex': + + %%% Local Variables: + %%% mode: japanese-latex + %%% TeX-engine: uptex + %%% End: + + In the both cases above, the valid value is one of 'ptex', 'jtex' and +'uptex'. + + You can override the command names associated with the above three +engines or define your own engine by customizing 'TeX-engine-alist'. +*Note Processor Options::. + + It is sometimes necessary to use an engine which differs from the one +AUCTeX selects automatically. For example, even when you want to use +'j-article' document class deliberately with ASCII pLaTeX, AUCTeX +selects NTT jLaTeX command if 'TeX-parse-self' is enabled, because +'j-article' originally belongs to NTT jLaTeX. In such cases, use the +file local variable method above to select the engine you intend to use. + + If you usually use AUCTeX in Japanese, setting the following +variables is useful. + + -- User Option: TeX-default-mode + Mode to enter for a new file when it cannot be determined whether + the file is plain TeX or LaTeX or what. + + If you want to enter Japanese LaTeX mode whenever this may happen, + set the variable like this: + (setq TeX-default-mode 'japanese-latex-mode) + + -- User Option: japanese-LaTeX-default-style + The default style/class when creating a new Japanese LaTeX + document. + + The default value is '"jarticle"'. + + It is recommended also for Japanese users to customize the option +'TeX-PDF-from-DVI' to '"Dvipdfmx"'. *Note Processor Options::. + + There are three customize options with regard to the encoding of +Japanese text. + + -- User Option: japanese-TeX-use-kanji-opt-flag + If non-nil, AUCTeX adds '-kanji' option to the typesetting command + when 'TeX-engine' is 'ptex'. + + Usually AUCTeX guesses the right coding systems for input to and +output from the Japanese TeX process, but you can override them by the +following two customize options. + + -- User Option: TeX-japanese-process-input-coding-system + If non-nil, used for encoding input to Japanese TeX process. When + 'nil', AUCTeX tries to choose suitable coding system. + + -- User Option: TeX-japanese-process-output-coding-system + If non-nil, used for decoding output from Japanese TeX process. + When 'nil', AUCTeX tries to choose suitable coding system. + + The former customize options 'japanese-TeX-command-default', +'japanese-LaTeX-command-default' and 'japanese-TeX-command-list' are +removed from AUCTeX. Use 'japanese-TeX-engine-default' instead. If you +need to customize the executable file name such as '"latex"', the +options for them, or both, customize 'TeX-engine-alist'. + + The following two additional font commands are available in LaTeX +mode buffer. + +'C-c C-f g' + Insert gothic font command '\textgt{-!-}' or '\mathgt{-!-}' + depending on the context. + +'C-c C-f m' + Insert mincho font command '\textmc{-!-}' or '\mathmc{-!-}' + depending on the context. + + Although they are meaningful only with 'ptex' and 'uptex' engines, it +won't matter in buffers with other engines. + + See 'tex-jp.el' for more information. + + +File: auctex.info, Node: Automatic, Next: Style Files, Prev: Internationalization, Up: Customization + +5.5 Automatic Customization +=========================== + +Since AUCTeX is so highly customizable, it makes sense that it is able +to customize itself. The automatic customization consists of scanning +TeX files and extracting symbols, environments, and things like that. + + The automatic customization is done on three different levels. The +global level is the level shared by all users at your site, and consists +of scanning the standard TeX style files, and any extra styles added +locally for all users on the site. The private level deals with those +style files you have written for your own use, and use in different +documents. You may have a '~/lib/TeX/' directory where you store useful +style files for your own use. The local level is for a specific +directory, and deals with writing customization for the files for your +normal TeX documents. + + If compared with the environment variable 'TEXINPUTS', the global +level corresponds to the directories built into TeX. The private level +corresponds to the directories you add yourself, except for '.', which +is the local level. + +* Menu: + +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory + + By default AUCTeX will search for customization files in all the +global, private, and local style directories, but you can also set the +path directly. This is useful if you for example want to add another +person's style hooks to your path. Please note that all matching files +found in 'TeX-style-path' are loaded, and all hooks defined in the files +will be executed. + + -- User Option: TeX-style-path + List of directories to search for AUCTeX style files. + + By default, when AUCTeX searches a directory for files, it will +recursively search through subdirectories. + + -- User Option: TeX-file-recurse + Whether to search TeX directories recursively: nil means do not + recurse, a positive integer means go that far deep in the directory + hierarchy, t means recurse indefinitely. + + By default, AUCTeX will ignore files named '.', '..', 'SCCS', 'RCS', +and 'CVS'. + + -- User Option: TeX-ignore-file + Regular expression matching file names to ignore. + + These files or directories will not be considered when searching + for TeX files in a directory. + + +File: auctex.info, Node: Automatic Global, Next: Automatic Private, Up: Automatic + +5.5.1 Automatic Customization for the Site +------------------------------------------ + +Assuming that the automatic customization at the global level was done +when AUCTeX was installed, your choice is now: will you use it? If you +use it, you will benefit by having access to all the symbols and +environments available for completion purposes. The drawback is slower +load time when you edit a new file and perhaps too many confusing +symbols when you try to do a completion. + + You can disable the automatic generated global style hooks by setting +the variable 'TeX-auto-global' to nil. + + -- User Option: TeX-macro-global + Directories containing the site's TeX style files. + + -- User Option: TeX-style-global + Directory containing hand generated TeX information. + + These correspond to TeX macros shared by all users of a site. + + -- User Option: TeX-auto-global + Directory containing automatically generated information. + + For storing automatic extracted information about the TeX macros + shared by all users of a site. + + +File: auctex.info, Node: Automatic Private, Next: Automatic Local, Prev: Automatic Global, Up: Automatic + +5.5.2 Automatic Customization for a User +---------------------------------------- + +You should specify where you store your private TeX macros, so AUCTeX +can extract their information. The extracted information will go to the +directories listed in 'TeX-auto-private' + + Use 'M-x TeX-auto-generate <RET>' to extract the information. + + -- User Option: TeX-macro-private + Directories where you store your personal TeX macros. The value + defaults to the directories listed in the 'TEXINPUTS' and + 'BIBINPUTS' environment variables or to the respective directories + in '$TEXMFHOME' of 'kpsewhich' setting if no results can be + obtained from the environment variables. + + -- User Option: TeX-auto-private + List of directories containing automatically generated AUCTeX style + files. These correspond to the personal TeX macros. + + -- Command: TeX-auto-generate TEX AUTO + ('M-x TeX-auto-generate <RET>') Generate style hook for TEX and + store it in AUTO. If TEX is a directory, generate style hooks for + all files in the directory. + + -- User Option: TeX-style-private + List of directories containing hand generated AUCTeX style files. + These correspond to the personal TeX macros. + + +File: auctex.info, Node: Automatic Local, Prev: Automatic Private, Up: Automatic + +5.5.3 Automatic Customization for a Directory +--------------------------------------------- + +AUCTeX can update the style information about a file each time you save +it, and it will do this if the directory 'TeX-auto-local' exists. +'TeX-auto-local' is by default set to '"auto"', so simply creating an +'auto' directory will enable automatic saving of style information. + + The advantage of doing this is that macros, labels, etc. defined in +any file in a multifile document will be known in all the files in the +document. The disadvantage is that saving will be slower. To disable, +set 'TeX-auto-local' to nil. + + -- User Option: TeX-style-local + Directory containing hand generated TeX information. + + These correspond to TeX macros found in the current directory. + + -- User Option: TeX-auto-local + Directory containing automatically generated TeX information. + + These correspond to TeX macros found in the current directory. + + +File: auctex.info, Node: Style Files, Prev: Automatic, Up: Customization + +5.6 Writing Your Own Style Support +================================== + +*Note Automatic::, for a discussion about automatically generated +global, private, and local style files. The hand generated style files +are equivalent, except that they by default are found in 'style' +directories instead of 'auto' directories. + +* Menu: + +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding or Examining Other Information +* Hacking the Parser:: Automatic Extraction of New Things + + If you write some useful support for a public TeX style file, please +send it to us. + + +File: auctex.info, Node: Simple Style, Next: Adding Macros, Up: Style Files + +5.6.1 A Simple Style File +------------------------- + +Here is a simple example of a style file. + + ;;; book.el - Special code for book style. + + (TeX-add-style-hook + "book" + (lambda () + (LaTeX-largest-level-set "part")) + TeX-dialect) + + The example is from the AUCTeX sources and is loaded for any LaTeX +document using the book document class (or style before LaTeX2e). (Note +that the above code is much simplified for explanatory purpose.) The +file specifies that the largest kind of section in such a document is +'part'. The interesting thing to notice is that the style file defines +an (anonymous) function, and adds it to the list of loaded style hooks +by calling 'TeX-add-style-hook'. + + The first time the user indirectly tries to access some +style-specific information, such as the largest sectioning command +available, the style hooks for all files directly or indirectly read by +the current document are executed. The actual files will only be +evaluated once, but the hooks will be called for each buffer using the +style file. + + Note that the basename of the style file and the name of the style +hook should usually be identical. + + -- Function: TeX-add-style-hook STYLE HOOK &optional DIALECT-EXPR + Add HOOK to the list of functions to run when we use the TeX file + STYLE and the current dialect is one in the set derived from + DIALECT-EXPR. When DIALECT-EXPR is omitted, then HOOK is allowed + to be run whatever the current dialect is. + + DIALECT-EXPR may be one of: + + * A symbol indicating a singleton containing one basic TeX + dialect, this symbol shall be selected among: + ':latex' + For all files in LaTeX mode, or any mode derived thereof. + ':bibtex' + For all files in BibTeX mode, or any mode derived + thereof. + ':texinfo' + For all files in Texinfo mode. + ':plain-tex' + For all files in plain-TeX mode, or any mode derived + thereof. + ':context' + For all files in ConTeXt mode. + ':classopt' + For class options of LaTeX document. This is provided as + pseudo-dialect for style hooks associated with class + options. + * A logical expression like: + '(or DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)' + For union of the sets of dialects corresponding to + DIALECT-EXPRESSION1 through DIALECT-EXPRESSION_N + '(and DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)' + For intersection of the sets of dialects corresponding to + DIALECT-EXPRESSION1 through DIALECT-EXPRESSION_N + '(nor DIALECT-EXPRESSION1 ... DIALECT-EXPRESSION_N)' + For complement of the union sets of dialects + corresponding to DIALECT-EXPRESSION1 through + DIALECT-EXPRESSION_N relatively to the set of all + supported dialects + '(not DIALECT-EXPR)' + For complement set of dialect corresponding to + DIALECT-EXPR relatively to the set of all supported + dialects + + In case of adding a style hook for LaTeX, when calling function +'TeX-add-style-hook' it is thought more futureproof for argument +DIALECT-EXPR to pass constant 'TeX-dialect' currently defined to +':latex', rather than passing ':latex' directly. + + -- Constant: TeX-dialect + Default dialect for use with function 'TeX-add-style-hook' for + argument DIALECT-EXPR when the hook is to be run only on LaTeX + file, or any mode derived thereof. + + +File: auctex.info, Node: Adding Macros, Next: Adding Environments, Prev: Simple Style, Up: Style Files + +5.6.2 Adding Support for Macros +------------------------------- + +The most common thing to define in a style hook is new symbols (TeX +macros). Most likely along with a description of the arguments to the +function, since the symbol itself can be defined automatically. + + Here are a few examples from 'latex.el'. + + (TeX-add-style-hook + "latex" + (lambda () + (TeX-add-symbols + '("arabic" TeX-arg-counter) + '("label" TeX-arg-define-label) + '("ref" TeX-arg-ref) + '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t) + '("newtheorem" TeX-arg-define-environment + [ TeX-arg-environment "Numbered like" ] + t [ TeX-arg-counter "Within counter" ])))) + + -- Function: TeX-add-symbols SYMBOL ... + Add each SYMBOL to the list of known symbols. + + Each argument to 'TeX-add-symbols' is a list describing one symbol. +The head of the list is the name of the symbol, the remaining elements +describe each argument. + + If there are no additional elements, the symbol will be inserted with +point inside braces. Otherwise, each argument of this function should +match an argument of the TeX macro. What is done depends on the +argument type. + + If a macro is defined multiple times, AUCTeX will choose the one with +the longest definition (i.e. the one with the most arguments). + + Thus, to overwrite + '("tref" 1) ; one argument + you can specify + '("tref" TeX-arg-ref ignore) ; two arguments + + 'ignore' is a function that does not do anything, so when you insert +a 'tref' you will be prompted for a label and no more. + + You can use the following types of specifiers for arguments: + +'string' + Use the string as a prompt to prompt for the argument. + +'number' + Insert that many braces, leave point inside the first. 0 and -1 + are special. 0 means that no braces are inserted. -1 means that + braces are inserted around the macro and an active region (e.g. + '{\tiny foo}'). If there is no active region, no braces are + inserted. + +'nil' + Insert empty braces. + +'t' + Insert empty braces, leave point between the braces. + +'other symbols' + Call the symbol as a function. You can define your own hook, or + use one of the predefined argument hooks. + +'list' + If the car is a string, insert it as a prompt and the next element + as initial input. Otherwise, call the car of the list with the + remaining elements as arguments. + +'vector' + Optional argument. If it has more than one element, parse it as a + list, otherwise parse the only element as above. Use square + brackets instead of curly braces, and is not inserted on empty user + input. + + A lot of argument hooks have already been defined. The first +argument to all hooks is a flag indicating if it is an optional +argument. It is up to the hook to determine what to do with the +remaining arguments, if any. Typically the next argument is used to +overwrite the default prompt. + +'TeX-arg-conditional' + Implements if EXPR THEN ELSE. If EXPR evaluates to true, parse + THEN as an argument list, else parse ELSE as an argument list. + +'TeX-arg-literal' + Insert its arguments into the buffer. Used for specifying extra + syntax for a macro. + +'TeX-arg-free' + Parse its arguments but use no braces when they are inserted. + +'TeX-arg-eval' + Evaluate arguments and insert the result in the buffer. + +'TeX-arg-label' + Prompt for a label completing with known labels. If RefTeX is + active, prompt for the reference format. + +'TeX-arg-ref' + Prompt for a label completing with known labels. If RefTeX is + active, do not prompt for the reference format. Usually, reference + macros should use this function instead of 'TeX-arg-label'. + +'TeX-arg-index-tag' + Prompt for an index tag. This is the name of an index, not the + entry. + +'TeX-arg-index' + Prompt for an index entry completing with known entries. + +'TeX-arg-length' + Prompt for a LaTeX length completing with known lengths. + +'TeX-arg-macro' + Prompt for a TeX macro with completion. + +'TeX-arg-date' + Prompt for a date, defaulting to the current date. The format of + the date is specified by the 'TeX-date-format' option. If you want + to change the format when the 'babel' package is loaded with a + specific language, set 'TeX-date-format' inside the appropriate + language hook (for details *note European::). + +'TeX-arg-version' + Prompt for the version of a file, using as initial input the + current date. + +'TeX-arg-environment' + Prompt for a LaTeX environment with completion. + +'TeX-arg-cite' + Prompt for a BibTeX citation. If the variable + 'TeX-arg-cite-note-p' is non-nil, ask also for optional note in + citations. + +'TeX-arg-counter' + Prompt for a LaTeX counter completing with known counters. + +'TeX-arg-savebox' + Prompt for a LaTeX savebox completing with known saveboxes. + +'TeX-arg-file' + Prompt for a filename in the current directory, and use it with the + extension. + +'TeX-arg-file-name' + Prompt for a filename and use as initial input the name of the file + being visited in the current buffer, with extension. + +'TeX-arg-file-name-sans-extension' + Prompt for a filename and use as initial input the name of the file + being visited in the current buffer, without extension. + +'TeX-arg-input-file' + Prompt for the name of an input file in TeX's search path, and use + it without the extension. Run the style hooks for the file. (Note + that the behavior (type of prompt and inserted file name) of the + function can be controlled by the variable + 'TeX-arg-input-file-search'.) + +'TeX-arg-define-label' + Prompt for a label completing with known labels. Add label to list + of defined labels. + +'TeX-arg-define-length' + Prompt for a LaTeX length completing with known lengths. Add + length to list of defined lengths. + +'TeX-arg-define-macro' + Prompt for a TeX macro with completion. Add macro to list of + defined macros. + +'TeX-arg-define-environment' + Prompt for a LaTeX environment with completion. Add environment to + list of defined environments. + +'TeX-arg-define-cite' + Prompt for a BibTeX citation. + +'TeX-arg-define-counter' + Prompt for a LaTeX counter. + +'TeX-arg-define-savebox' + Prompt for a LaTeX savebox. + +'TeX-arg-document' + Prompt for a LaTeX document class, using 'LaTeX-default-style' as + default value and 'LaTeX-default-options' as default list of + options. If the variable 'TeX-arg-input-file-search' is t, you + will be able to complete with all LaTeX classes available on your + system, otherwise classes listed in the variable 'LaTeX-style-list' + will be used for completion. It is also provided completion for + options of many common classes. + +'LaTeX-arg-usepackage' + Prompt for LaTeX packages. If the variable + 'TeX-arg-input-file-search' is t, you will be able to complete with + all LaTeX packages available on your system. It is also provided + completion for options of many common packages. + +'TeX-arg-bibstyle' + Prompt for a BibTeX style file completing with all style available + on your system. + +'TeX-arg-bibliography' + Prompt for BibTeX database files completing with all databases + available on your system. + +'TeX-arg-corner' + Prompt for a LaTeX side or corner position with completion. + +'TeX-arg-lr' + Prompt for a LaTeX side with completion. + +'TeX-arg-tb' + Prompt for a LaTeX side with completion. + +'TeX-arg-pagestyle' + Prompt for a LaTeX pagestyle with completion. + +'TeX-arg-verb' + Prompt for delimiter and text. + +'TeX-arg-verb-delim-or-brace' + Prompt for delimiter and text. This function is similar to + 'TeX-arg-verb', but is intended for macros which take their + argument enclosed in delimiters or in braces. + +'TeX-arg-pair' + Insert a pair of numbers, use arguments for prompt. The numbers + are surrounded by parentheses and separated with a comma. + +'TeX-arg-size' + Insert width and height as a pair. No arguments. + +'TeX-arg-coordinate' + Insert x and y coordinates as a pair. No arguments. + +'LaTeX-arg-author' + Prompt for document author, using 'LaTeX-default-author' as initial + input. + +'TeX-read-hook' + Prompt for a LaTeX hook and return it. + +'TeX-arg-hook' + Prompt for a LaTeX hook and insert it as a TeX macro argument. + +'TeX-read-key-val' + Prompt for a 'key=value' list of options and return them. + +'TeX-arg-key-val' + Prompt for a 'key=value' list of options and insert it as a TeX + macro argument. + + If you add new hooks, you can assume that point is placed directly +after the previous argument, or after the macro name if this is the +first argument. Please leave point located after the argument you are +inserting. If you want point to be located somewhere else after all +hooks have been processed, set the value of 'TeX-exit-mark'. It will +point nowhere, until the argument hook sets it. + + Some packages provide macros that are rarely useful to non-expert +users. Those should be marked as expert macros using +'TeX-declare-expert-macros'. + + -- Function: TeX-declare-expert-macros STYLE MACROS... + Declare MACROS as expert macros of STYLE. + + Expert macros are completed depending on + 'TeX-complete-expert-commands'. + + +File: auctex.info, Node: Adding Environments, Next: Adding Other, Prev: Adding Macros, Up: Style Files + +5.6.3 Adding Support for Environments +------------------------------------- + +Adding support for environments is very much like adding support for TeX +macros, except that each environment normally only takes one argument, +an environment hook. The example is again a short version of +'latex.el'. + + (TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("document" LaTeX-env-document) + '("enumerate" LaTeX-env-item) + '("itemize" LaTeX-env-item) + '("list" LaTeX-env-list)))) + + It is completely up to the environment hook to insert the +environment, but the function 'LaTeX-insert-environment' may be of some +help. The hook will be called with the name of the environment as its +first argument, and extra arguments can be provided by adding them to a +list after the hook. + + For simple environments with arguments, for example defined with +'\newenvironment', you can make AUCTeX prompt for the arguments by +giving the prompt strings in the call to 'LaTeX-add-environments'. The +fact that an argument is optional can be indicated by wrapping the +prompt string in a vector. + + For example, if you have defined a 'loop' environment with the three +arguments FROM, TO, and STEP, you can add support for them in a style +file. + + %% loop.sty + + \newenvironment{loop}[3]{...}{...} + + ;; loop.el + + (TeX-add-style-hook + "loop" + (lambda () + (LaTeX-add-environments + '("loop" "From" "To" "Step")))) + + If an environment is defined multiple times, AUCTeX will choose the +one with the longest definition. Thus, if you have an enumerate style +file, and want it to replace the standard LaTeX enumerate hook above, +you could define an 'enumerate.el' file as follows, and place it in the +appropriate style directory. + + (TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("enumerate" LaTeX-env-enumerate foo)))) + + (defun LaTeX-env-enumerate (environment &optional _ignore) ...) + + The symbol 'foo' will be passed to 'LaTeX-env-enumerate' as the +second argument, but since we only added it to overwrite the definition +in 'latex.el' it is just ignored. + + -- Function: LaTeX-add-environments ENV ... + Add each ENV to list of loaded environments. + + -- Function: LaTeX-insert-environment ENV [ EXTRA ] + Insert environment of type ENV, with optional argument EXTRA. + + Following is a list of available hooks for 'LaTeX-add-environments': + +'LaTeX-env-item' + Insert the given environment and the first item. + +'LaTeX-env-figure' + Insert the given figure-like environment with a caption and a + label. + +'LaTeX-env-array' + Insert the given array-like environment with position and column + specifications. + +'LaTeX-env-label' + Insert the given environment with a label. + +'LaTeX-env-list' + Insert the given list-like environment, a specifier for the label + and the first item. + +'LaTeX-env-minipage' + Insert the given minipage-like environment with position and width + specifications. + +'LaTeX-env-tabular*' + Insert the given tabular*-like environment with width, position and + column specifications. + +'LaTeX-env-picture' + Insert the given environment with width and height specifications. + +'LaTeX-env-bib' + Insert the given environment with a label for a bibitem. + +'LaTeX-env-contents' + Insert the given environment with a filename as its argument. + +'LaTeX-env-args' + Insert the given environment with arguments. You can use this as a + hook in case you want to specify multiple complex arguments just + like in elements of 'TeX-add-symbols'. This is most useful if the + specification of arguments to be prompted for with strings and + strings wrapped in a vector as described above is too limited. + + Here is an example from 'listings.el' which calls a function with + one argument in order to prompt for a 'key=value' list to be + inserted as an optional argument of the 'lstlisting' environment: + + (LaTeX-add-environments + '("lstlisting" LaTeX-env-args + [TeX-arg-key-val LaTeX-listings-key-val-options])) + + Some packages provide environments that are rarely useful to +non-expert users. Those should be marked as expert environments using +'LaTeX-declare-expert-environments'. + + -- Function: LaTeX-declare-expert-environments STYLE ENVIRONMENTS... + Declare ENVIRONMENTS as expert environments of STYLE. + + Expert environments are completed depending on + 'TeX-complete-expert-commands'. + + +File: auctex.info, Node: Adding Other, Next: Hacking the Parser, Prev: Adding Environments, Up: Style Files + +5.6.4 Adding or Examining Other Information +------------------------------------------- + +5.6.4.1 Adding bibliographies in style hooks +............................................ + +You can also specify bibliographical databases and labels in the style +file. This is probably of little use, since this information will +usually be automatically generated from the TeX file anyway. + + -- Function: LaTeX-add-bibliographies BIBLIOGRAPHY ... + Add each BIBLIOGRAPHY to list of loaded bibliographies. + + -- Function: LaTeX-add-labels LABEL ... + Add each LABEL to the list of known labels. + +5.6.4.2 Examining Package/Class Options +....................................... + +In LaTeX documents, style hooks can find the package names and those +options given as optional argument(s) of '\usepackage' in +'LaTeX-provided-package-options'. + + -- Variable: LaTeX-provided-package-options + Buffer local variable holding alist of options provided to LaTeX + packages. Each element is a cons cell '(PACKAGE . OPTION-LIST)'. + For example, its value will be + (("babel" . ("german")) + ("geometry" . ("a4paper" "top=2cm" "left=2.5cm" "right=2.5cm")) + ...) + + You can examine whether there is a specific package-option pair by +'LaTeX-provided-package-options-member'. + + -- Function: LaTeX-provided-package-options-member PACKAGE OPTION + Return non-'nil' if OPTION has been given to PACKAGE. The value is + actually the tail of the list of options given to PACKAGE. + + There are similar facilities for class names and those options given +in '\documentclass' declaration. + + -- Variable: LaTeX-provided-class-options + Buffer local variable holding alist of options provided to LaTeX + classes. Each element is a cons cell '(CLASS . OPTION-LIST)'. For + example, its value will be + (("book" . ("a4paper" "11pt" "openany" "fleqn")) + ...) + + -- Function: LaTeX-provided-class-options-member CLASS OPTION + Return non-'nil' if OPTION has been given to CLASS. The value is + actually the tail of the list of options given to CLASS. + + -- Function: LaTeX-match-class-option REGEXP + Check if a documentclass option matching REGEXP is active. Return + first found class option matching REGEXP, or nil if not found. + + These functions are also useful to implement customized predicate(s) +in 'TeX-view-predicate-list'. *Note Starting Viewers::. + +5.6.4.3 Adding Support for Option Completion +............................................ + +When the user inserts '\usepackage' by 'C-c C-m', AUCTeX asks for the +optional arguments after the package name is given. The style file of +that package can provide completion support for the optional arguments. + + -- Variable: LaTeX-PACKAGENAME-package-options + List of optional arguments available for the package. + + Here is an excerption from 'acronym.el': + (defvar LaTeX-acronym-package-options + '("footnote" "nohyperlinks" "printonlyused" "withpage" + "smaller" "dua" "nolist") + "Package options for the acronym package.") + + When the package accepts key-value style optional arguments, more +sophisticated completion support is needed. The package style file can +provide dynamic completion support by custom elisp function. + + -- Function: LaTeX-PACKAGENAME-package-options + This function should ask the user for optional arguments and return + them as a string, instead of built-in option query facility. When + this function is defined, AUCTeX calls it with no argument. + + Here is an excerption from 'acro.el': + (defun LaTeX-acro-package-options () + "Prompt for package options for the acro package." + (TeX-read-key-val t LaTeX-acro-package-options-list)) + + As you can see in the above example, a utility function +'TeX-read-key-val' is available to read key-value pair(s) from users. + + Note that 'defvar' or 'defun' of 'LaTeX-PACKAGENAME-package-options' +should be at the top level of the style file and not inside the style +hook, because the style hook is not yet called when the user inputs the +optional arguments in response to 'C-c C-m'. + + There are similar facilities for class options. When the user +inserts '\documentclass' by 'C-c C-e', the respective class style file +can provide completion support for the optional arguments. + + -- Variable: LaTeX-CLASSNAME-class-options + List of optional arguments available for the class. + + -- Function: LaTeX-CLASSNAME-class-options + Which see. + + +File: auctex.info, Node: Hacking the Parser, Prev: Adding Other, Up: Style Files + +5.6.5 Automatic Extraction of New Things +---------------------------------------- + +The automatic TeX information extractor works by searching for regular +expressions in the TeX files, and storing the matched information. You +can add support for new constructs to the parser, something that is +needed when you add new commands to define symbols. + + For example, in the file 'macro.tex' I define the following macro. + + \newcommand{\newmacro}[5]{% + \def#1{#3\index{#4@#5~cite{#4}}\nocite{#4}}% + \def#2{#5\index{#4@#5~cite{#4}}\nocite{#4}}% + } + + AUCTeX will automatically figure out that 'newmacro' is a macro that +takes five arguments. However, it is not smart enough to automatically +see that each time we use the macro, two new macros are defined. We can +specify this information in a style hook file. + + ;;; macro.el --- Special code for my own macro file. + + ;;; Code: + + (defvar TeX-newmacro-regexp + '("\\\\newmacro{\\\\\\([a-zA-Z]+\\)}{\\\\\\([a-zA-Z]+\\)}" + (1 2) TeX-auto-multi) + "Matches \\newmacro definitions.") + + (defvar TeX-auto-multi nil + "Temporary for parsing \\newmacro definitions.") + + (defun TeX-macro-cleanup () + "Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'." + (mapc (lambda (list) + (mapc (lambda (symbol) + (setq TeX-auto-symbol + (cons symbol TeX-auto-symbol))) + list)) + TeX-auto-multi)) + + (defun TeX-macro-prepare () + "Clear `Tex-auto-multi' before use." + (setq TeX-auto-multi nil)) + + (add-hook 'TeX-auto-prepare-hook #'TeX-macro-prepare) + (add-hook 'TeX-auto-cleanup-hook #'TeX-macro-cleanup) + + (TeX-add-style-hook + "macro" + (lambda () + (TeX-auto-add-regexp TeX-newmacro-regexp) + (TeX-add-symbols '("newmacro" + TeX-arg-macro + (TeX-arg-macro "Capitalized macro: \\") + t + "BibTeX entry: " + nil)))) + + ;;; macro.el ends here + + When this file is first loaded, it adds a new entry to +'TeX-newmacro-regexp', and defines a function to be called before the +parsing starts, and one to be called after the parsing is done. It also +declares a variable to contain the data collected during parsing. +Finally, it adds a style hook which describes the 'newmacro' macro, as +we have seen it before. + + So the general strategy is: Add a new entry to 'TeX-newmacro-regexp'. +Declare a variable to contain intermediate data during parsing. Add +hook to be called before and after parsing. In this case, the hook +before parsing just initializes the variable, and the hook after parsing +collects the data from the variable, and adds them to the list of +symbols found. + + -- Variable: TeX-auto-regexp-list + List of regular expressions matching TeX macro definitions. + + The list has the following format ((REGEXP MATCH TABLE) ...), that + is, each entry is a list with three elements. + + REGEXP. Regular expression matching the macro we want to parse. + + MATCH. A number or list of numbers, each representing one + parenthesized subexpression matched by REGEXP. + + TABLE. The symbol table to store the data. This can be a + function, in which case the function is called with the argument + MATCH. Use 'TeX-match-buffer' to get match data. If it is not a + function, it is presumed to be the name of a variable containing a + list of match data. The matched data (a string if MATCH is a + number, a list of strings if MATCH is a list of numbers) is put in + front of the table. + + -- Variable: TeX-auto-prepare-hook nil + List of functions to be called before parsing a TeX file. + + -- Variable: TeX-auto-cleanup-hook nil + List of functions to be called after parsing a TeX file. + + +File: auctex.info, Node: Appendices, Next: Indices, Prev: Customization, Up: Top + +Appendix A Copying, Changes, Development, FAQ, Texinfo Mode +*********************************************************** + +* Menu: + +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: +* Texinfo mode:: + + +File: auctex.info, Node: Copying this Manual, Next: Changes, Up: Appendices + +A.1 Copying this Manual +======================= + +The copyright notice for this manual is: + + This manual is for AUCTeX (version 13.1.3 from 2022-04-16), a +sophisticated TeX environment for Emacs. + + Copyright (C) 1992-1995, 2001, 2002, 2004-2022 Free Software +Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and no + Back-Cover Texts. A copy of the license is included in the section + entitled "GNU Free Documentation License." + + The full license text can be read here: + +* Menu: + +* GNU Free Documentation License:: License for copying this manual. + + +File: auctex.info, Node: GNU Free Documentation License, Up: Copying this Manual + +A.1.1 GNU Free Documentation License +------------------------------------ + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software + Foundation, Inc. <https://fsf.org/> + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + <https://www.gnu.org/licenses/>. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +---------------------------------------------------- + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: auctex.info, Node: Changes, Next: Development, Prev: Copying this Manual, Up: Appendices + +A.2 Changes and New Features +============================ + +News since last release +----------------------- + + * AUCTeX now requires GNU Emacs 25.1 or higher. + + * AUCTeX tracks the change in Emacs where initial inputs in the + minibuffer during queries are getting phased out. Queries for the + mandatory arguments of macros and environments are adjusted where + applicable. The value which will be used after hitting 'RET' + without other input is shown in the prompt in parentheses prefixed + with 'default'. For this change the signature of the function + 'TeX-arg-length' is altered. The old argument list was: + (defun TeX-arg-length (optional &optional prompt + initial-input definition default) + + whereas the new one is: + (defun TeX-arg-length (optional &optional prompt + default initial-input definition) + + Note the position change of 'DEFAULT'. + + * Indenting of conditionals is improved. Code inside constructs like + '\ifx . \else . \fi' is correctly indented. An interface for style + files is also introduced which can add their macros to the + indentation engine. Check the file 'algpseudocode.el' for an + example. + + * You can optionally enable indent inside square brackets '[]' by new + user options 'TeX-indent-open-delimiters' and + 'TeX-indent-close-delimiters'. *Note Indenting::. + + * Now 'tex-buf.el' is merged into 'tex.el' and no longer exists. If + your personal code has '(require 'tex-buf)', one of the following + prescriptions would serve. + 1. Remove '(require 'tex-buf)'. + 2. Replace it with '(require 'tex)'. + 3. Replace it with '(require 'latex)'. + +News in 13.1 +------------ + + * In math environments 'gather', 'gather*', 'gathered', 'multline' + and 'multline*', fill commands such as 'M-q' and 'C-c C-q C-e' are + disabled. This sorts out the inconsistency between those and + 'equation', 'displaymath' environments, in latter of which filling + is already disabled. + + If you want filling in such environments, customize + 'LaTeX-indent-environment-list' to remove them. + + Auto fill continues to work in such environment anyway. + + In addition, AUCTeX adds support of alignment at '&' sign in + 'align'-like environments such as 'alignat', 'aligned' and so on, + as well as 'matrix'-like environments such as 'pmatrix', 'bmatrix' + and so on. + + * Now two commands 'Texindex' and 'Texi2dvi' are available when you + type 'C-c C-c' in Texinfo mode. The command 'Texindex' runs + 'texindex' on index files and 'Texi2dvi' runs 'pdftexi2dvi' or + 'texi2dvi' according to the value of 'TeX-PDF-mode'. + + So you can typeset Texinfo documents into PDF or DVI format from + within AUCTeX. + + * AUCTeX's own help messages for LaTeX errors are now shown only for + LaTeX runs. AUCTeX shows raw error/warning messages found in + '.log' files for runs of formats other than LaTeX, such as plain + TeX, ConTeXt and Texinfo, as it does even for LaTeX runs when it + can't find a matching entry in its own help message catalogue. + + Due to this change, customize option 'TeX-error-description-list' + can no longer have a fallback entry that matches any error. If + your customized value includes such entry, typically '(".*" . "No + help available")', please remove it. + + * Two functions 'TeX-split-string' and 'TeX-assoc' are now obsolete + and will be removed in future release. If your personal code uses + these functions, use 'split-string' and 'assoc-string' instead. + + * The function 'TeX-read-key-val' now accepts a function call as + second argument. This change should help AUCTeX style writers who + use 'TeX-arg-key-val' and have to deal with dynamic key-values. + Example of usage: + (TeX-add-style-hook "foo" + (lambda () + (TeX-add-symbols + '("bar" (TeX-arg-key-val (function-returning-key-val)))))) + + * Since AUCTeX 12.2, 'C-x C-w' accidentally disabled the parse on + save in that buffer, even when you enabled 'TeX-auto-save' option. + This bug was fixed. + + * AUCTeX now requires GNU Emacs 24.3 or higher. + + * Old implementations for viewers were discarded, as announced long + before. The variables 'TeX-output-view-style' and 'TeX-view-style' + have no effect now. The former placeholders '%v' and '%vv' in + 'TeX-command-list' are ignored. + + * AUCTeX now uses lexical binding which has been introduced in Emacs + 24. This change should have no user-visible effect and require no + manual adaptions except in the following cases. + + - Entries added to the customization variable 'TeX-expand-list' + also had access to variables 'command' and 'pos'. Those are + now properly declared and named 'TeX-expand-command' and + 'TeX-expand-pos'. + + - Entries added to the customization variable 'TeX-expand-list' + had access to a variable 'file' which was bound to + 'TeX-active-master', i.e., it evaluated to either the master + or region file. This usage must be replaced with either + 'TeX-active-master' or 'TeX-active-master-with-quotes'. + + - Viewer entries in 'TeX-view-program-list' also had access to a + variable 'file' which was bound to the name of the master or + region file without extension. Instead, the function + 'TeX-active-master' has to be used now. + + - Macro argument parsing functions could set a variable + 'exit-mark' to the buffer position where point should be left + after all arguments have been read. This variable is now + named 'TeX-exit-mark'. + + - The functions in 'LaTeX-section-hook' had access or modified + the previously undeclared variables 'title', 'name', 'level', + 'done-mark', and 'toc'. These variables are now properly + declared and have the 'LaTeX-' prefix, e.g., + 'LaTeX-done-mark'. + + - The functions in 'ConTeXt-numbered-section-hook' and + 'ConTeXt-unnumbered-section-hook' had access or modified the + previously undeclared variables 'title', 'name', 'level', + 'done-mark', and 'reference'. These variables are now + properly declared and have the 'ConTeXt-' prefix, e.g., + 'ConTeXt-title'. + + - The functions in 'TeX-translate-location-hook' could access + and modify the free variables 'file', 'line', 'error', + 'offset', 'context', and 'string'. Those are now properly + declared variables with the prefix 'TeX-translate-location-', + e.g., 'TeX-translate-location-file'. + + * The constant 'LaTeX-dialect' has been renamed to 'TeX-dialect' and + moved from 'latex.el' to 'tex.el'. 'LaTeX-dialect' now is an + obsolete alias. + + * The style 'latexinfo.el' is removed from AUCTeX. 'latexinfo.el' + was meant to support latexinfo which in return was a LaTeX-2.09 + extension of Texinfo, but didn't manage to replace Texinfo. + + * The style 'siunitx.el' is updated to support package version 3. + Key-value options provided by older package versions are removed, + deprecated macros and units are not supported anymore. + + * AUCTeX has preliminary support for LaTeX-hooks. Hooks provided by + LaTeX kernel are known and available for completion in + '\AddToHook', '\RemoveFromHook' and '\AddToHookNext'. + + * AUCTeX is now able to place all generated output files, including + those that are produced by applications running under AUCTeX, + temporary files related to region processing and preview-latex + files, in an output directory. To use this feature, set the new + user option 'TeX-output-dir' to the absolute path of the output + directory or a relative path which would be interpreted as being + relative to the master file in a multifile document. + + Note that this feature doesn't work if the document includes sub + file placed in sub directory below the main file via '\include' + command. + + * Many other bugs were fixed. + +News in 12.3 +------------ + + * Support for 'PSTricks' is now PDF-oriented. AUCTeX no longer turns + off PDF mode for 'PSTricks' documents even without 'pst-pdf'. It + now sets up 'TeX-PDF-from-DVI' option so that PDF output is + generated when 'TeX-PDF-mode' is enabled (default). Users who want + DVI output should disable PDF mode explicitly by file local + variable, or customize 'TeX-PDF-mode' to 'nil'. + + * The function 'font-latex-update-font-lock' has been obsoleted in + order to fix 'bug#37945'. That function was used by several style + files in order to refresh fontification after adding new symbols or + verbatim constructs. It is better to call 'font-lock-flush' in the + former case and 'font-latex-set-syntactic-keywords' in the latter + case. The function 'font-latex-update-font-lock' still exists as a + no-op which only shows a warning explaining how to update font-lock + as mentioned above. + + * Math expression highlighting was improved. Highlighting for + documents with a lot of inline math expressions '$...$' won't get + scrambled now ('bug#33139'). + + In addition, it is no longer recommended to customize + 'font-latex-math-environments'. Use 'texmathp-tex-commands' + instead. *Note Fontification of math::. + + * AUCTeX tracks changes in LaTeX2e 2020-02-02 release. AUCTeX + supports the improvements to LaTeX font selection mechanism (NFSS). + New macros like '\textsw' or '\textulc' are added to font insertion + keyboard commands. *Note Font Specifiers::, for details. Further, + the entries in the menu 'LaTeX', 'Insert Font' are reorganized and + adjusted accordingly. + + Macros previously provided by 'textcomp.sty' are now part of LaTeX + kernel. AUCTeX tracks this change as well and support for the new + macro '\legacyoldstylenums' is added. + + * Insertion of environments in LaTeX documents (i.e. 'C-c C-e') was + improved. The former code had a few bugs, which sometimes resulted + in either spurious empty line or spurious comment prefix, or both, + especially when the region is active. Those bugs are now fixed. + + * More bugs fixed, other minor features implemented. + +News in 12.2 +------------ + + * AUCTeX reflects the changes in LaTeX2e 2019-10-01 release. + 'filecontents' environment now takes an optional argument and can + be used anywhere in a document. The macros '\Ref' and + '\labelformat' are moved from 'varioref.sty' to LaTeX kernel. + 'amsmath' has a new macro '\overunderset'. + + * A new method is implemented in preview-latex to adjust the + foreground colors of generated images to those of Emacs, when the + LaTeX command produces PDF. The traditional method became invalid + because of the change introduced in Ghostscript 9.27. + Unfortunately, the new method doesn't work due to a bug in + Ghostscript 9.27 and is valid only for Ghostscript > 9.27. There + is also a fallback method for gs 9.27 users which displays plain + "black on white" images. For successful function of preview-latex, + the users are encouraged to set up the new user option + 'preview-pdf-color-adjust-method' to choose appropriate option + among the three: new, traditional and fallback method. + + * AUCTeX has support for the Flymake package in Emacs 26 or newer. + To enable, call 'M-x flymake-mode <RET>' or add this to your + '.emacs' file: + (add-hook 'LaTeX-mode-hook #'flymake-mode) + + * The way the option 'TeX-record-buffer' is used was corrected. It + was used in just the opposite way as the document says. Erase the + customization if you have customized this option since it now acts + in reverse to your expectation. + + * A former customize option 'japanese-TeX-command-list' is removed. + Use 'japanese-TeX-engine-default', or if it's really necessary, + customize 'TeX-command-list' directly if the task which the option + used to carry is required. + + * Support for standard LaTeX without e-TeX extension is now very + limited. It doesn't work if raw TeX code is put on the command + line to invoke 'latex' command. It also fails for region + compilation ('C-c C-r' and so on) with documents of non-ascii file + name. In addition, it no longer works with preview-latex. We + consider this incompatibility is permissible because e-TeX + extension is enabled for standard LaTeX by default long ago. LaTeX + variants such as XeLaTeX and LuaLaTeX are not affected. + + * Key binds in Texinfo mode are improved. Typing '$', '^', '_' and + '\' now just self-inserts without pointless side effects in Texinfo + mode. + + In addition, the option 'TeX-electric-escape' is now effective in + Texinfo mode. When it is enabled, typing '@' will invoke + 'TeX-electric-macro' offering completion in similar style with + other TeX modes of AUCTeX. + + * Fontification support for 'biblatex' package is improved and + updated to macros provided by package version 3.12. For qualified + lists, at least 2 mandatory arguments are fontified. + + * Support for column specifiers 'w' and 'W' provided by 'array' + package is added to 'array.el'. The correct counting of columns + only works when the 'align' parameter is enclosed in braces, e.g., + 'w{l}{3cm}'. The short version 'wl{3cm}' is not supported. + + * Entries for 'PDF Tools' are added in + 'TeX-view-program-list-builtin' for Windows and macOS. This viewer + can be configured under these operating systems with an entry like + this in an init file: + (setq TeX-view-program-selection '((output-pdf "PDF Tools"))) + + * Several other bugs were fixed, many minor features were added. + +News in 12.1 +------------ + + * AUCTeX now requires GNU Emacs 24 or higher. Support for XEmacs has + been dropped. + + * Besides the change in the supported version of Emacs, there has + been no functional change in this release, which is equivalent to + version 11.92. + +News in 11.92 +------------- + + * preview-latex is compatible with Ghostscript 9.22 where the + operator '.runandhide' is removed. All occurrences of + '.runandhide' in preview-latex are replaced by alternative code + making it work with Ghostscript 9.22 again. + + * AUCTeX has a new customize option + 'TeX-math-input-method-off-regexp'. When you begin to input a math + formula, the current input method is turned off if its name matches + this regular expression. + + In fact this variable was introduced long before, but has not been + documented in info files nor turned into a customize option with + 'defcustom' until this release. + + * The window system focus is pulled back to Emacs when viewing with + evince-compatible viewers if a new customize option + 'TeX-view-evince-keep-focus' is non-nil. + + * The usual dose of bug fixes was administered. + +News in 11.91 +------------- + + * Now AUCTeX has a logo. The LaTeX code to create it is available in + the 'etc/' directory of the package. + + * Add support for 'upmendex', an extension of 'makeindex' capable of + sorting indexes by unicode based ICU. + + * Fix preview-latex to interact correctly with Japanese LaTeX. The + parsing routine was made robust not to be confused by the 7-bit + encoding of Japanese text and the necessary option to LaTeX command + is kept even when preamble caching is enabled. + + * The new "Glossaries" entry in 'TeX-command-list' runs the command + 'makeglossaries'. + + * Fontification of control symbols has been improved. Characters + defined in 'font-latex-match-simple-exclude-list' do not receive + any fontification. In DocTeX mode, the character '_' is removed + from 'font-latex-match-simple-exclude-list' in order to fontify + macros like '\__module_foo:nnn' correctly. + + * Fontification of math environments has been improved. Optional + and/or mandatory argument(s) to environments are not fontified. + + * 'preview.sty' loads 'luatex85.sty' if possible and should be + compatible with newer luaTeX versions. + + * AUCTeX has a new customize option 'TeX-ispell-verb-delimiters'. + This string contains usual characters used as delimiters for + in-line verbatim macros like '\verb'. Text between delimiters + after an in-line verbatim macro will be skipped during spell + checking. + + * Fontification of in-line verbatim macros has been improved. + 'font-latex.el' recognizes an optional or a mandatory argument for + macros like '\Verb' from 'fancyvrb.sty', '\mint' and '\mintinline' + from 'minted.sty' and fontifies verbatim content correctly. + + * AUCTeX can put and parse labels in optional argument of + environments. Inserting labels is done by new function + 'LaTeX-env-label-as-keyval'. A new customize option + 'LaTeX-listing-label' is available as prefix to labels in code + typesetting environments, e.g. 'lstlisting' environment provided by + 'listings' package. 'LaTeX-listing-label' defaults to 'lst:'. + Parsing of labels for later referencing relies on two requirements: + 1. Label should come as last key-value argument, and + 2. label must be enclosed in braces, e.g. + \begin{lstlisting}[caption=Some Caption,label={lst:foo}] + ... + \end{lstlisting} + + * The function 'LaTeX-label' now takes a second optional argument + 'NO-INSERT'. When non-'nil', 'LaTeX-label' reads a label and + returns it as a string. This argument is also passed to any + function bound to 'LaTeX-label-function' (see next item). + + * *Incompatible change:* The signature for the function passed with + the customize option 'LaTeX-label-function' has changed. The + function bound to this variable is now expected to take an optional + second argument 'NO-INSERT'. When this argument is non-'nil', the + function should read and only return a label as a string; insertion + is done by another function. + + * Directory local variables were ineffective for + 'japanese-latex-mode' and 'japanese-plain-tex-mode'. This bug was + fixed. (This was actually done in AUCTeX 11.90, but not + advertised) + + * The output of Japanese text from Japanese TeX engines is decoded + correctly for most cases, according to the encoding of the TeX + documents and the locale. The difference between MS Windows, macOS + and unix-like OS is taken into account. (This was actually done in + AUCTeX 11.90, but not advertised) + + * Quite a few new LaTeX packages are supported. + + * As usual, many bugs were fixed. + +News in 11.90 +------------- + + * In addition to the completion performed by 'TeX-complete-symbol', + AUCTeX now also supports the new Emacs standard completion-at-point + facility (see the Emacs command 'completion-at-point'). This also + means that modern completion UIs like company-mode work out of the + box in TeX and LaTeX buffers. *Note Completion::, for details. + + * Completion is now aware of being inside a math environment and then + completes math macros. + + * AUCTeX is able to display several levels of super- and subscripts, + each one raised above and a bit smaller than its basis. For this + feature, have a look at the customize options + 'font-latex-fontify-script' (especially the new values + 'multi-level' and 'invisible') and + 'font-latex-fontify-script-max-level'. Also, the script characters + '^' and '_' are also fontified with a special face named + 'font-latex-script-char-face'. *Note Fontification of math::, for + details. + + * Parsing of format specification in various tabular environments has + been improved. The function 'LaTeX-insert-item' ('C-c <LFD>') + inserts suitable number of ampersands for '*{num}{cols}' + constructs. Style files for LaTeX packages 'tabularx', 'tabulary', + 'longtable', 'dcolumn' and 'siunitx' are adapted to take advantage + of this improvement. + + * AUCTeX has a new Ispell dictionary 'tex-ispell.el' for macros and + environments which will be skipped during spell checking. The + activiation of this feature is controlled by a new customize option + 'TeX-ispell-extend-skip-list', which is set to 't' and activated by + default. + + * AUCTeX has a new customize option 'TeX-raise-frame-function' that + is currently only used by Evince and Atril inverse search to raise + the Emacs frame. + + * When inserting a new float, AUCTeX will now prompt for a + short-caption if the length of the caption provided is greater than + a certain size. This size is controlled via a new user option + 'LaTeX-short-caption-prompt-length'. + + * Parsing of the compilation log has been reworked. You should + encounter fewer mistaken files while navigating through errors and + warnings. + + * Two new user options, 'TeX-ignore-warnings' and + 'TeX-suppress-ignored-warnings', allow ignoring certain warnings + after compilation of the document. *Note Ignoring warnings::, for + details. + + * A new option, 'TeX-PDF-from-DVI', controls if and how to produce a + PDF file by converting a DVI file. This supersedes + 'TeX-PDF-via-dvips-ps2pdf' which is still recognized but marked as + obsolete and may be removed in future releases. + + * Support for a number of external viewers has been added: + * Atril viewer. Forward and inverse search requires version + 1.9.1 or later to work. + + * dviout viewer on Windows. Note that this setup works when + 'TeX-source-correlate-method' is set to use 'source-specials' + for DVI, e.g.: + (setq TeX-source-correlate-method + '((dvi . source-specials) + (pdf . synctex))) + which is the default. + + * SumatraPDF viewer on Windows. + + * Zathura viewer. Forward and inverse search requires a recent + version of the program to work (3.4 or later). + + * A new function, 'TeX-documentation-texdoc', for reading + documentation with 'texdoc' has been added. 'TeX-doc' is still + available but now 'C-c ?' runs 'TeX-documentation-texdoc'. + + * AUCTeX has a new custom option + 'LaTeX-reftex-cite-format-auto-activate' which controls the + automatic activation of citation formats provided by RefTeX when a + style file is loaded and RefTeX is enabled. Currently, + 'biblatex.el', 'harvard.el', 'jurabib.el' and 'natbib.el' use this + feature. If you have customized 'reftex-cite-format' and want to + use your settings, you should set this variable to 'nil'. + + * AUCTeX now has limited support for the TikZ package. For the + moment, this includes some basic support for prompting the user of + arguments to the '\draw' macro. + + * The style 'graphicx.el' went through a bigger overhaul. The + optional argument of command '\includegraphics' now supports + key-val query; keys can independently be chosen anytime by pressing + the <,> key. As a side effect, the variable + 'LaTeX-includegraphics-options-alist' is now no-op and is removed + from 'tex-style.el'. You can safely remove any customization of it + from your init file. The mandatory argument of '\includegraphics' + knows about image file extensions supported by the used engine and + offers them for inclusion. + + * Support for other LaTeX packages was improved, and style files for + several new packages were added. + + * Many bugs were crushed along the way. + +News in 11.89 +------------- + + * You can now run all commands needed to compile a document and then + open the viewer with a single command: 'TeX-command-run-all', bound + to 'C-c C-a'. + + * Commands such as 'LaTeX' and 'View' can now be executed + conveniently on the current section (or part, chapter, subsection, + etc). See 'LaTeX-command-section' and + 'LaTeX-command-section-change-level'. *Note Starting a Command::, + for details. + + * Forward and backward search with Evince now also work when only a + region of the document is compiled/viewed. + + * To open the PDF output file you can now use also PDF Tools, a + document viewer for Emacs. With it, as a plus, forward and + backward search is accurate at word level. + + * With new option 'TeX-PDF-via-dvips-ps2pdf' it is possible to + compile a document to DVI and then convert it to PDF using + 'dvips'-'ps2pdf' before viewing it. + + * New option 'TeX-file-line-error' allows to select file:line:error + style for error messages. + + * Indent '\[...\]' math mode as a regular environment by default. + + * Now AUCTeX suggests to run 'makeindex' when appropriate. + + * 'TeX-view-program-list' can contain, as third optional element of + each item, the name of the executable(s) needed to open the viewer. + + * 'TeX-expand-list' variable has been split into 'TeX-expand-list' + and 'TeX-expand-list-builtin'. Only the former is intended to be + customized by the user, the latter contains built-in expanders. + You might want to keep in 'TeX-expand-list' only new expansion + strings. + + * Before running commands like TeX and LaTeX, now AUCTeX performs + some checks. If 'TeX-check-TeX' is non-nil, it will test whether a + working TeX distribution is actually present in the system and + available to Emacs. Instead, when 'TeX-check-engine' is non-nil, + before running LaTeX commands AUCTeX will check whether the correct + engine has been set, based upon known restrictions posed by LaTeX + packages. + + * Basic support to ConTeXt Mark IV has been added. Users can now + select the Mark version to be used with new option + 'ConTeXt-Mark-version', and AUCTeX is able to catch error messages + in the output log of a Mark IV document. + + * Support for tons of LaTeX packages has been added. + + * Numbers of bugs have been fixed, many minor features have been + added. + +News in 11.88 +------------- + + * 'TeX-PDF-mode' is now enabled by default. + + * Now 'TeX-previous-error' works with TeX commands if the new option + 'TeX-parse-all-errors' is non-nil, which is the default. When this + option is non-nil, an overview of errors and warnings reported by + the TeX compiler can be opened with 'M-x TeX-error-overview <RET>'. + *Note Debugging::, for details. + + * Style file authors are encouraged to distinguish common from expert + macros and environments, and mark the latter using + 'TeX-declare-expert-macros' and + 'LaTeX-declare-expert-environments'. + + Users can then restrict completion using + 'TeX-complete-expert-commands'. + + * Management of LaTeX package options in the parser was improved. + You might need to reparse your documents, especially if you loaded + the 'babel' package with language options. + + * Now you can insert '$...$' or '\(...\)' by typing a single '$'. To + do this, customize the new option 'TeX-electric-math'. + 'TeX-math-close-double-dollar' was removed. *Note Quotes::, for + details. + + * 'C-c <RET> documentclass <RET>' completes with all available LaTeX + classes, if the 'TeX-arg-input-file-search' variable is non-nil. + Completion for class options of the standard LaTeX classes is + provided as well. + + * New user options 'LaTeX-default-author', + 'LaTeX-fontspec-arg-font-search', + 'LaTeX-fontspec-font-list-default', 'TeX-date-format', and + 'TeX-insert-braces-alist'. A new possible value + ('show-all-optional-args') for 'TeX-insert-macro-default-style' was + added. The default value of 'TeX-source-correlate-method' has been + changed. + + * 'biblatex' support was greatly expanded. If parsing is enabled, + AUCTeX looks at 'backend' option to decide whether to use Biber or + BibTeX. The 'LaTeX-biblatex-use-Biber' variable was changed to be + file local only and is no more customizable. + + * With some LaTeX classes, the default environment suggested by + 'LaTeX-environment' ('C-c C-e') when the current environment is + 'document' was changed. With 'beamer' class the default + environment is 'frame', with 'letter' it is 'letter', with 'slides' + it is 'slide'. + + * Brace pairing feature was enhanced in LaTeX documents. Support for + '\bigl', '\Bigl', '\biggl' and '\Biggl', the same as the one for + '\left', was added to 'TeX-insert-macro'. For example, 'C-c <RET> + bigl <RET> ( <RET>' inserts '\bigl(\bigr)'. + + You can insert brace pair '()', '{}' and '[]' by typing a single + left brace if the new user option 'LaTeX-electric-left-right-brace' + is enabled. + + Macros '\langle', '\lfloor' and '\lceil', which produce the left + part of the paired braces, are treated similarly as '(', '{' and + '[' during the course of 'TeX-insert-macro'. *Note Quotes::, for + details. + + * Support for dozens of LaTeX packages was added. + + * Tabular-like environments ('tabular', 'tabular*', 'tabularx', + 'tabulary', 'array', 'align', ...) are indented in a nicer and + more informative way when the column values of a table line are + written across multiple lines in the tex file. + + * The suitable number of ampersands are inserted when you insert + 'array', 'tabular' and 'tabular*' environments with 'C-c C-e'. + Similar experience is obtained if you terminate rows in these + environments with 'C-c <LFD>'. It supplies line break macro '\\' + and inserts the suitable number of ampersands on the next line. + + Similar supports are provided for various 'amsmath' environments. + + *Note Tabular-like::, for details. + + * Commands for narrowing to a group ('TeX-narrow-to-group') and to + LaTeX environments ('LaTeX-narrow-to-environment') were added. + + * Now arbitrary options can be passed to the TeX processor on a per + file basis using the 'TeX-command-extra-options' option. *Note + Processor Options::, for details. + + * Now 'C-c C-e document <RET>', in an empty document, prompts for + '\usepackage' macros in addition to '\documentclass'. + + * 'TeX-add-style-hook' has now a third argument to tell AUCTeX for + which dialect (LaTeX, Texinfo or BibTeX) the style hook is + registers. Labelling style hook by dialect will avoid applying + them not in the right context. + + * There have been lots of bug fixes and feature additions. + +News in 11.87 +------------- + + * AUCTeX now supports Biber in conjunction with biblatex in addition + to BibTeX. + + * Each AUCTeX mode now has its own abbrev table. On Emacsen which + provide the possibility to inherit abbrevs from other tables, the + abbrevs from the Text mode abbrev table are available as well. + Newly defined abbrevs are written to the mode-specific tables, + though. + + * The file 'tex-fptex.el' was removed. + + * Forward/backward search for Evince has been improved. If Emacs is + compiled with DBUS support and a recent Evince version (3.x) is + installed, the communication goes over the desktop bus instead of + the command line, resulting in more accurate positioning of point + in Emacs and highlighting of the target paragraph in Evince. + + * A problem where Ghostscript threw an '/invalidfileaccess' error + when running preview-latex was fixed. + + * A lot of smaller fixes and additions have been made. + +News in 11.86 +------------- + + * Parsing of LaTeX output was improved. It is now less likely that + AUCTeX opens a non-existent file upon calling 'TeX-next-error'; a + problem for example encountered when using MiKTeX 2.8. In addition + quoted file names as emitted by MiKTeX are now supported. + + * A new framework for the definition and selection of viewers was + implemented. If you have customizations regarding viewers you will + have to redo them in this new framework or reenable the old one. + *Note Starting Viewers::, for details. + + * Comprehensive editing support for PSTricks was added. + + * Support for various LaTeX packages was added, e.g. 'tabularx', + 'CJK', and 'hyperref'. + + * An easy way to switch between TeX engines (PDFTeX, LuaTeX, XeTeX, + Omega) was added. + + * Support for SyncTeX was added. This involves the command line + options for LaTeX and the viewer. + + * Folding can now be customized to use macro arguments as replacement + text. + + * 'preview.sty' now works with XeTeX. + + * A lot of smaller and larger bugs have been squashed. + +News in 11.85 +------------- + + * Font locking has been improved significantly. It is now less prone + to color bleeding which could lead to high resource usage. In + addition it now includes information about LaTeX macro syntax and + can indicate syntactically incorrect macros in LaTeX mode. + + * The license was updated to GPLv3. + + * Support for the nomencl, flashcards and comment LaTeX packages as + well as the Icelandic language option of babel were added. + + * Support for folding of math macros was added. + + * Lots of minor bugs in features and documentation fixed. + +News in 11.84 +------------- + + * There have been problems with the '-without-texmf-dir' option to + 'configure' when the value of '-with-kpathsea-sep' was set or + determined for an installation system with a default different from + that of the runtime system. 'with-kpathsea-sep' has been removed; + the setting is now usually determined at runtime. + + Due to this and other problems, preview-latex in the released + XEmacs package failed under Windows or with anything except recent + 21.5 XEmacsen. + + * AUCTeX and preview-latex have been changed in order to accommodate + file names containing spaces. preview-latex now tolerates bad + PostScript code polluting the stack (like some Omega fonts). + + * 'preview.sty' had in some cases failed to emit PostScript header + specials. + + * Support for folding of comments was added. + + * The 'polish' language option of the babel LaTeX package as well as + the polski LaTeX package are now supported. Most notably this + means that AUCTeX will help to insert quotation marks as defined by + 'polish.sty' ('"`..."'') and 'polski.sty' (',,...'''). + + * The TeX tool bar is now available and enabled by default in plain + TeX mode. *Note Processing Facilities::. + + * Bug fix in the display of math subscripts and superscripts. + + * Bug fix 'TeX-doc' for Emacs 21. + + * There has been quite a number of other bug fixes to various + features and documentation across the board. + +News in 11.83 +------------- + + * The new function 'TeX-doc' provides easy access to documentation + about commands and packages or information related to TeX and + friends in general. *Note Documentation::. + + * You can now get rid of generated intermediate and output files by + means of the new 'Clean' and 'Clean All' entries in + 'TeX-command-list' accessible with 'C-c C-c' or the Command menu. + *Note Cleaning::. + + * Support for forward search with PDF files was added. That means + you can jump to a place in the output file corresponding to the + position in the source file. *Note Viewing::. + + Adding support for this feature required the default value of the + variable 'TeX-output-view-style' to be changed. Please make sure + you either remove any customizations overriding the new default or + incorporate the changes into your customizations if you want to use + this feature. + + * TeX error messages of the '-file-line-error' kind are now + understood in AUCTeX and preview-latex (parsers are still + separate). + + * Bug fix in XyMTeX support. + + * The LaTeX tool bar is now enabled by default. *Note Processing + Facilities::. + +News in 11.82 +------------- + + * Support for the MinionPro LaTeX package was added. + + * Warnings and underfull/overfull boxes are now being indicated in + the echo area after a LaTeX run, if the respective debugging + options are activated with 'TeX-toggle-debug-warnings' ('C-c C-t + C-w') or 'TeX-toggle-debug-bad-boxes' ('C-c C-t C-b'). In this + case 'TeX-next-error' will find these warnings in addition to + normal errors. + + The key binding 'C-c C-w' for 'TeX-toggle-debug-bad-boxes' (which + was renamed from 'TeX-toggle-debug-boxes') now is deprecated. + + * AUCTeX now can automatically insert a pair of braces after typing + <_> or <^> in math constructs if the new variable + 'TeX-electric-sub-and-superscript' is set to a non-nil value. + + * Some language-specific support for French was added. There now is + completion support for the commands provided by the 'frenchb' (and + 'francais') options of the babel LaTeX package and easier input of + French quotation marks ('\og ...\fg') which can now be inserted by + typing <">. + + * Completion support for options of some LaTeX packages was added. + + * Already in version 11.81 the way to activate AUCTeX changed + substantially. This should now be done with '(load "auctex.el" nil + t t)' instead of the former '(require 'tex-site)'. Related to this + change 'tex-mik.el' does not load 'tex-site.el' anymore. That + means if you used only '(require 'tex-mik)' in order to activate + AUCTeX, you have to add '(load "auctex.el" nil t t)' before the + latter statement. *Note Loading the package::. + + * Handling of verbatim constructs was consolidated across AUCTeX. + This resulted in the font-latex-specific variables + 'font-latex-verb-like-commands', 'font-latex-verbatim-macros', and + 'font-latex-verbatim-environments' being removed and the more + general variables 'LaTeX-verbatim-macros-with-delims', + 'LaTeX-verbatim-macros-with-braces', and + 'LaTeX-verbatim-environments' being added. + + * The output of a BibTeX run is now checked for warnings and errors, + which are reported in the echo area. + + * The aliases for 'font-latex-title-fontify' were removed. Use + 'font-latex-fontify-sectioning' instead. + + * The problem that Japanese macros where broken across lines was + fixed. + + * Various bug fixes. + +News in 11.81 +------------- + + * 'LaTeX-mark-section' now marks subsections of a given section as + well. The former behavior is available via the prefix argument. + + * preview-latex which was previously available separately became a + subsystem of AUCTeX. There is no documented provision for building + or installing preview-latex separately. It is still possible to + use and install AUCTeX without preview-latex, however. + + * The installation procedures have been overhauled and now also + install startup files as part of the process (those had to be + copied manually previously). You are advised to remove previous + installations of AUCTeX and preview-latex before starting the + installation procedure. A standard installation from an unmodified + tarball no longer requires Makeinfo or Perl. + + Also note that the way AUCTeX is supposed to be activated changed. + Instead of '(require 'tex-site)' you should now use '(load + "auctex.el" nil t t)'. While the former method may still work, the + new method has the advantage that you can deactivate a preactivated + AUCTeX with the statement '(unload-feature 'tex-site)' before any + of its modes have been used. This may be important especially for + site-wide installations. + + * Support for the babel LaTeX package was added. + + * Folding a buffer now ensures that the whole buffer is fontified + before the actual folding is carried out. If this results in + unbearably long execution times, you can fall back to the old + behavior of relying on stealth font locking to do this job in the + background by customizing the variable 'TeX-fold-force-fontify'. + + * Folded content now reveals part of its original text in a tooltip + or the echo area when hovering with the mouse pointer over it. + + * The language-specific insertion of quotation marks was generalized. + The variables 'LaTeX-german-open-quote', + 'LaTeX-german-close-quote', 'LaTeX-german-quote-after-quote', + 'LaTeX-italian-open-quote', 'LaTeX-italian-close-quote', and + 'LaTeX-italian-quote-after-quote' are now obsolete. If you are not + satisfied with the default settings, you should customize + 'TeX-quote-language-alist' instead. + + * Similar to language-specific quote insertion, AUCTeX now helps you + with hyphens in different languages as well. *Note European::, for + details. + + * Fill problems in Japanese text introduced in AUCTeX 11.55 were + fixed. AUCTeX tries not to break lines between 1-byte and 2-byte + chars. These features will work in Chinese text, too. + + * The scaling factor of the fontification of sectioning commands can + now be customized using the variable + 'font-latex-fontify-sectioning'. This variable was previously + called 'font-latex-title-fontify'; In this release we provide an + alias but this will disappear in one of the the next releases. The + faces for the sectioning commands are now called + 'font-latex-sectioning-N-face' (N=0...5) instead of + 'font-latex-title-N-face' (N=1...4). Analogously the names of the + variables holding the related keyword lists were changed from + 'font-latex-title-N-keywords' to + 'font-latex-sectioning-N-keywords'. *Note Font Locking::, for + details. Make sure to adjust your customizations. + + * Titles in beamer slides marked by the "\frametitle" command are + know displayed with the new face 'font-latex-slide-title-face'. + You can add macros to be highlighted with this face to + 'font-latex-match-slide-title-keywords'. + + * Of course a lot of bugs have been fixed. + +News in 11.55 +------------- + + * A bug was fixed which lead to the insertion of trailing whitespace + during filling. In particular extra spaces were added to sentence + endings at the end of lines. You can make this whitespace visible + by setting the variable 'show-trailing-whitespace' to 't'. If you + want to delete all trailing whitespace in a buffer, type 'M-x + delete-trailing-whitespace <RET>'. + + * A bug was fixed which lead to a '*Compile-Log*' buffer popping up + when the first LaTeX file was loaded in an Emacs session. + + * On some systems the presence of an outdated Emacspeak package lead + to the error message 'File mode specification error: (error + "Variable binding depth exceeds max-specpdl-size")'. Precautions + were added which prevent this error from happening. But + nevertheless, it is advised to upgrade or uninstall the outdated + Emacspeak package. + + * The value of 'TeX-macro-global' is not determined during + configuration anymore but at load time of AUCTeX. Consequently the + associated configuration option '--with-tex-input-dirs' was + removed. + + * Support for the LaTeX Japanese classes 'jsarticle' and 'jsbook' was + added. + +News in 11.54 +------------- + + * The parser (used e.g. for 'TeX-auto-generate-global') was extended + to recognize keywords common in LaTeX packages and classes, like + "\DeclareRobustCommand" or "\RequirePackage". Additionally a bug + was fixed which led to duplicate entries in AUCTeX style files. + + * Folding can now be done for paragraphs and regions besides single + constructs and the whole buffer. With the new 'TeX-fold-dwim' + command content can both be hidden and shown with a single key + binding. In course of these changes new key bindings for unfolding + commands where introduced. The old bindings are still present but + will be phased out in future releases. + + * Info files of the manual now have a .info extension. + + * There is an experimental tool bar support now. It is not activated + by default. If you want to use it, add + (add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) + to your init file. + + * The manual now contains a new chapter "Quick Start". It explains + the main features and how to use them, and should be enough for a + new user to start using AUCTeX. + + * A new section "Font Locking" was added to the manual which explains + syntax highlighting in AUCTeX and its customization. Together with + the sections related to folding and outlining, the section is part + of the new chapter "Display". + + * Keywords for syntax highlighting of LaTeX constructs to be typeset + in bold, italic or typewriter fonts may now be customized. Besides + the built-in classes, new keyword classes may be added by + customizing the variable 'font-latex-user-keyword-classes'. The + customization options can be found in the customization group + 'font-latex-keywords'. + + * Verbatim content is now displayed with the 'fixed-pitch' face. + (GNU Emacs only) + + * Syntax highlighting should not spill out of verbatim content + anymore. (GNU Emacs only) + + * Verbatim commands like '\verb|...|' will not be broken anymore + during filling. + + * You can customize the completion for graphic files with + 'LaTeX-includegraphics-read-file'. + + * Support for the LaTeX packages 'url', 'listings', 'jurabib' and + 'csquotes' was added with regard to command completion and syntax + highlighting. + + * Performance of fontification and filling was improved. + + * Insertion of nodes in Texinfo mode now supports completion of + existing node names. + + * Setting the variable 'LaTeX-float' to 'nil' now means that you will + not be prompted for the float position of figures and tables. You + can get the old behaviour of 'nil' by setting the variable to '""', + i.e. an empty string. See also *note Floats::. + + * The XEmacs-specific bug concerning 'overlays-at' was fixed. + + * Lots of bug fixes. + +News in 11.53 +------------- + + * The LaTeX math menu can include Unicode characters if your Emacs + built supports it. See the variable 'LaTeX-math-menu-unicode', + *note Mathematics::. + + * Bug fixes for XEmacs. + + * Completion for graphic files in the TeX search path has been added. + + * 'start' is used for the viewer for MiKTeX and fpTeX. + + * The variable 'TeX-fold-preserve-comments' can now be customized to + deactivate folding in comments. + +News in 11.52 +------------- + + * Installation and menus under XEmacs work again (maybe for the first + time). + + * Fontification of subscripts and superscripts is now disabled when + the fontification engine is not able to support it properly. + + * Bug fixes in the build process. + +News in 11.51 +------------- + + * PDFTeX and Source Special support did not work with ConTeXt, this + has been fixed. Similar for Source Special support under Windows. + + * Omega support has been added. + + * Bug fixes in the build process. + + * 'TeX-fold' now supports folding of environments in Texinfo mode. + +News in 11.50 +------------- + + * The use of source specials when processing or viewing the document + can now be controlled with the new 'TeX-source-specials' minor mode + which can be toggled via an entry in the Command menu or the key + binding 'C-c C-t C-s'. If you have customized the variable + 'TeX-command-list', you have to re-initialize it for this to work. + This means to open a customization buffer for the variable by + typing 'M-x customize-variable <RET> TeX-command-list <RET>', + selecting "Erase Customization" and do your customization again + with the new default. + + * The content of the command menu now depends on the mode (plain TeX, + LaTeX, ConTeXt etc.). Any former customization of the variable + 'TeX-command-list' has to be erased. Otherwise the command menu + and the customization will not work correctly. + + * Support for hiding and auto-revealing macros, e.g. footnotes or + citations, and environments in a buffer was added, *note Folding::. + + * You can now control if indentation is done upon typing <RET> by + customizing the variable 'TeX-newline-function', *note Indenting::. + + * Limited support for 'doc.sty' and 'ltxdoc.cls' ('dtx' files) was + added. The new docTeX mode provides functionality for editing + documentation parts. This includes formatting (indenting and + filling), adding and completion of macros and environments while + staying in comments as well as syntax highlighting. (Please note + that the mode is not finished yet. For example syntax highlighting + does not work yet in XEmacs.) + + * For macro completion in docTeX mode the AUCTeX style files + 'doc.el', 'ltxdoc.el' and 'ltx-base.el' were included. The latter + provides general support for low-level LaTeX macros and may be used + with LaTeX class and style files as well. It is currently not + loaded automatically for those files. + + * Support for ConTeXt with a separate ConTeXt mode is now included. + Macro definitions for completion are available in Dutch and + English. + + * The filling and indentation code was overhauled and is now able to + format commented parts of the source syntactically correct. Newly + available functionality and customization options are explained in + the manual. + + * Filling and indentation in XEmacs with preview-latex and activated + previews lead to the insertion of whitespace before multi-line + previews. AUCTeX now contains facilities to prevent this problem. + + * If 'TeX-master' is set to 't', AUCTeX will now query for a master + file only when a new file is opened. Existing files will be left + alone. The new function 'TeX-master-file-ask' (bound to 'C-c _' is + provided for adding the variable manually. + + * Sectioning commands are now shown in a larger font on display + devices which support such fontification. The variable + 'font-latex-title-fontify' can be customized to restore the old + appearance, i.e. the usage of a different color instead of a change + in size. + + * Support for 'alphanum.sty', 'beamer.cls', 'booktabs.sty', + 'captcont.sty', 'emp.sty', 'paralist.sty', 'subfigure.sty' and + 'units.sty'/'nicefrac.sty' was added. Credits go to the authors + mentioned in the respective AUCTeX style files. + + * Inserting graphics with 'C-c <RET> includegraphics <RET>' was + improved. See the variable 'LaTeX-includegraphics-options-alist'. + + * If 'LaTeX-default-position' is 'nil', don't prompt for position + arguments in Tabular-like environments, see *note Tabular-like::. + + * Completion for available packages when using 'C-c <RET> usepackage + <RET>' was improved on systems using the kpathsea library. + + * The commenting functionality was fixed. The separate functions for + commenting and uncommenting were unified in one function for + paragraphs and regions respectively which do both. + + * Syntax highlighting can be customized to fontify quotes delimited + by either >>German<< or <<French>> quotation marks by changing the + variable 'font-latex-quotes'. + + * Certain TeX/LaTeX keywords for functions, references, variables and + warnings will now be fontified specially. You may add your own + keywords by customizing the variables + 'font-latex-match-function-keywords', + 'font-latex-match-reference-keywords', + 'font-latex-match-variable-keywords' and + 'font-latex-match-warning-keywords'. + + * If you include the style files 'german' or 'ngerman' in a document + (directly or via the 'babel' package), you should now customize + 'LaTeX-german-open-quote', 'LaTeX-german-close-quote' and + 'LaTeX-german-quote-after-quote' instead of 'TeX-open-quote', + 'TeX-close-quote' and 'TeX-quote-after-quote' if you want to + influence the type of quote insertion. + + * Upon viewing an output file, the right viewer and command line + options for it are now determined automatically by looking at the + extension of the output file and certain options used in the source + file. The behavior can be adapted or extended respectively by + customizing the variable 'TeX-output-view-style'. + + * You can control whether 'TeX-insert-macro' ('C-c <RET>') ask for + all optional arguments by customizing the variable + 'TeX-insert-macro-default-style', *note Completion::. + + * 'TeX-run-discard' is now able to completely detach a process that + it started. + + * The build process was enhanced and is now based on 'autoconf' + making installing AUCTeX a mostly automatic process. See *note + Installation:: and *note Installation under MS Windows:: for + details. + +News in 11.14 +------------- + + * Many more LaTeX and LaTeX2e commands are supported. Done by + Masayuki Ataka <ataka@milk.freemail.ne.jp> + +News in 11.12 +------------- + + * Support for the KOMA-Script classes. Contributed by Mark Trettin + <Mark.Trettin@gmx.de>. + +News in 11.11 +------------- + + * Support for 'prosper.sty', see <http://prosper.sourceforge.net/>. + Contributed by Phillip Lord <p.lord@russet.org.uk>. + +News in 11.10 +------------- + + * 'comment-region' now inserts %% by default. Suggested by "Davide + G. M. Salvetti" <salve@debian.org>>. + +News in 11.06 +------------- + + * You can now switch between using the 'font-latex' (all emacsen), + the 'tex-font' (Emacs 21 only) or no special package for font + locking. Customize 'TeX-install-font-lock' for this. + +News in 11.04 +------------- + + * Now use -t landscape by default when landscape option appears. + Suggested by Erik Frisk <frisk@isy.liu.se>. + +News in 11.03 +------------- + + * Use 'tex-fptex.el' for fpTeX support. Contributed by Fabrice + Popineau <Fabrice.Popineau@supelec.fr>. + +News in 11.02 +------------- + + * New user option 'LaTeX-top-caption-list' specifies environments + where the caption should go at top. Contributed by + <ataka@milk.freemail.ne.jp> (Masayuki Ataka). + + * Allow explicit dimensions in 'graphicx.sty'. Contributed by + <ataka@milk.freemail.ne.jp> (Masayuki Ataka). + + * Limited support for 'verbatim.sty'. Contributed by + <ataka@milk.freemail.ne.jp> (Masayuki Ataka). + + * Better support for amsmath items. Patch by + <ataka@milk.freemail.ne.jp> (Masayuki Ataka). + + * More accurate error parsing. Added by David Kastrup + <David.Kastrup@t-online.de>. + +News in 11.01 +------------- + + * Bug fixes. + +Older versions +-------------- + +See the file 'history.texi' for older changes. + + +File: auctex.info, Node: Development, Next: FAQ, Prev: Changes, Up: Appendices + +A.3 Future Development +====================== + +The following sections describe future development of AUCTeX. Besides +mid-term goals, bug reports and requests we cannot fix or honor right +away are being gathered here. If you have some time for Emacs Lisp +hacking, you are encouraged to try to provide a solution to one of the +following problems. If you don't know Lisp, you may help us to improve +the documentation. It might be a good idea to discuss proposed changes +on the mailing list of AUCTeX first. + +* Menu: + +* Mid-term Goals:: +* Wishlist:: +* Bugs:: + + +File: auctex.info, Node: Mid-term Goals, Next: Wishlist, Up: Development + +A.3.1 Mid-term Goals +-------------------- + + * Integration of preview-latex into AUCTeX + + As of AUCTeX 11.81 preview-latex is a part of AUCTeX in the sense + that the installation routines were merged and preview-latex is + being packaged with AUCTeX. + + Further integration will happen at the backend. This involves + folding of error parsing and task management of both packages which + will ease development efforts and avoid redundant work. + + * Error help catalogs + + Currently, the help for errors is more or less hardwired into + 'latex.el'. For supporting error help in other languages, it would + be sensible to instead arrange error messages in language-specific + files, make a common info file from all such catalogs in a given + language and look the error texts up in an appropriate index. The + user would then specify a preference list of languages, and the + errors would be looked up in the catalogs in sequence until they + were identified. + + * Combining 'docTeX' with RefTeX + + Macro cross references should also be usable for document + navigation using RefTeX. + + * Fix remove-style feature + + Currently 'TeX-remove-style' implementation isn't good. It is + common practice that major mode functions directly add macros and + environments via 'TeX-add-symbols' and 'LaTeX-add-environments', + but those macros and environments are lost once 'TeX-remove-style' + runs. It is necessary to run major mode function, by e.g. + 'normal-mode', again to recover them, but that makes no point in + running 'TeX-remove-style' itself because major mode function kills + all buffer-local variables. + + As of AUCTeX 12.3, 'TeX-remove-style' is no longer used by any + other codes. + + * Document 'LaTeX-insert-into-commments', + 'TeX-translate-location-hook', and usage of ConTeXt mode. + + +File: auctex.info, Node: Wishlist, Next: Bugs, Prev: Mid-term Goals, Up: Development + +A.3.2 Wishlist +-------------- + + * Simplify tool bar implementation. The library 'toolbar-x.el' was + developed as an abstraction layer to absorb difference between + XEmacs and GNU Emacs. Now that XEmacs is no longer supported, the + library, together with 'tex-bar.el' as a whole, can be much + simplified (or even unified). + + * Documentation lookup for macros + + A parser could gather information about which macros are defined in + which LaTeX packages and store the information in a hashtable which + can be used in a backend for 'TeX-doc' in order to open the + matching documentation for a given macro. The information could + also be used to insert an appropriate '\usepackage' statement if + the user tries to insert a macro for which the respective package + has not been requested yet. + + * Improvements to error reporting + + Fringe indicators for errors in the main text would be nice. + + * A math entry grid + + A separate frame with a table of math character graphics to click + on in order to insert the respective sequence into the buffer (cf. + the "grid" of 'x-symbol'). + + * Crossreferencing support + + It would be nice if you could index process your favorite + collection of '.dtx' files (such as the LaTeX source), just call a + command on arbitrary control sequence, and get either the DVI + viewer opened right at the definition of that macro (using Source + Specials), or the source code of the '.dtx' file. + + * Better plain TeX support + + For starters, 'LaTeX-math-mode' is not very LaTeX-specific in the + first place, and similar holds for indentation and formatting. + + * Page count when compiling should (optionally) go to modeline of the + window where the compilation command was invoked, instead of the + output window. Suggested by Karsten Tinnefeld + <tinnefeld@irb.informatik.uni-dortmund.de>. + + * Command to insert a macrodefinition in the preamble, without moving + point from the current location. Suggested by "Jeffrey C. Ely" + <ely@nwu.edu>. + + * A database of all commands defined in all stylefiles. When a + command or environment gets entered that is provided in one of the + styles, insert the appropriate '\usepackage' in the preamble. + + * A way to add and overwrite math mode entries in style files, and to + decide where they should be. Suggested by Remo Badii + <Remo.Badii@psi.ch>. + + * Create template for (first) line of tabular environment. + + * I think prompting for the master is the intended behaviour. It + corresponds to a 'shared' value for 'TeX-master'. + + There should probably be a 'none' value which wouldn't query for + the master, but instead disable all features that relies on + 'TeX-master'. + + This default value for 'TeX-master' could then be controled with + mapping based on the extension. + + * Use index files (when available) to speed up 'C-c C-m include + <RET>'. + + * Option not to calculate very slow completions like for 'C-c C-m + include <RET>'. + + * Font menu should be created from 'TeX-font-list'. + + * Installation procedure written purely in emacs lisp. + + * Included PostScript files should also be counted as part of the + document. + + * A nice hierarchical by-topic organization of all officially + documented LaTeX macros, available from the menu bar. + + * 'TeX-command-default' should be set from the master file, if not + set locally. Suggested by Peter Whaite <peta@cim.mcgill.ca>. + + * Make AUCTeX work with 'crypt++'. Suggested by Chris Moore + <Chris.Moore@src.bae.co.uk>. + + * Make AUCTeX work with 'longlines'. This would also apply to + preview-latex, though it might make sense to unify error processing + before attempting this. + + * The 'Spell' command should apply to all files in a document. Maybe + it could try to restrict to files that have been modified since + last spell check? Suggested by Ravinder Bhumbla + <rbhumbla@ucsd.edu>. + + * Make <.> check for abbreviations and sentences ending with capital + letters. + + * Use Emacs 19 minibuffer history to choose between previewers, and + other stuff. Suggested by John Interrante + <interran@uluru.Stanford.EDU>. + + * Documentation of variables that can be set in a style hook. + + We need a list of what can safely be done in an ordinary style + hook. You can not set a variable that AUCTeX depends on, unless + AUCTeX knows that it has to run the style hooks first. + + Here is the start of such a list. + + 'LaTeX-add-environments' + + 'TeX-add-symbols' + + 'LaTeX-add-labels' + + 'LaTeX-add-bibliographies' + + 'LaTeX-largest-level' + + * Outline should be (better) supported in TeX mode. + + At least, support headers, trailers, as well as + 'TeX-outline-extra'. + + * 'TeX-header-start' and 'TeX-trailer-end'. + + We might want these, just for fun (and outlines) + + * Plain TeX and LaTeX specific header and trailer expressions. + + We should have a way to globally specify the default value of the + header and trailer regexps. + + * Get closer to original 'TeX-mode' keybindings. + + A third initialization file ('tex-mode.el') containing an emulator + of the standard 'TeX-mode' would help convince some people to + change to AUCTeX. + + * Use markers in 'TeX-error-list' to remember buffer positions in + order to be more robust with regard to line numbers and changed + files. + + * Finish the Texinfo mode. For one thing, many Texinfo mode commands + do not accept braces around their arguments. + + * Hook up the letter environment with 'bbdb.el'. + + +File: auctex.info, Node: Bugs, Prev: Wishlist, Up: Development + +A.3.3 Bugs +---------- + + * The style hooks automatically generated by parsing files for + 'example.dtx', 'example.sty', 'example.drv' and 'example.bib' all + clash. Bad. Clash with hand-written style hooks should be removed + by dialect discrimination -- to be checked. + + * 'C-c `' should always stay in the current window, also when it + finds a new file. + + * Do not overwrite emacs warnings about existing auto-save files when + loading a new file. + + * Maybe the regexp for matching a TeX symbol during parsing should be + '"\\\\\\([a-zA-Z]+\\|.\\)"' -- + <thiemann@informatik.uni-tuebingen.de> Peter Thiemann. + + * AUCTeX should not parse verbatim environments. + + * Make '`' check for math context in 'LaTeX-math-mode'. and simply + self insert if not in a math context. + + * Make 'TeX-insert-dollar' more robust. Currently it can be fooled + by '\mbox''es and escaped double dollar for example. + + * Correct indentation for tabbing, table, and math environments. + + +File: auctex.info, Node: FAQ, Next: Texinfo mode, Prev: Development, Up: Appendices + +A.4 Frequently Asked Questions +============================== + + 1. Something is not working correctly. What should I do? + + Well, you might have guessed it, the first place to look is in the + available documentation packaged with AUCTeX. This could be the + release notes (in the 'RELEASE' file) or the news section of the + manual in case you are experiencing problems after an upgrade, the + 'INSTALL' file in case you are having problems with the + installation, the section about bugs in the manual in case you + encountered a bug or the relevant sections in the manual for other + related problems. + + If this did not help, you can send a bug report to the AUCTeX bug + reporting list by using the command 'M-x TeX-submit-bug-report + <RET>'. But before you do this, you can try to get more + information about the problem at hand which might also help you + locate the cause of the error yourself. + + First, you can try to generate a so-called backtrace which shows + the functions involved in a program error. In order to do this, + start Emacs with the command line 'emacs --debug-init' and/or put + the line + + (setq debug-on-error t) + + as the first line into your init file. After Emacs has started, + you can load a file which triggers the error and a new window + should pop up showing the backtrace. If you get such a backtrace, + please include it in the bug report. + + Second, you can try to figure out if something in your personal or + site configuration triggers the error by starting Emacs without + such customizations. You can do this by invoking Emacs with the + following command line, depending on the installation scheme of + AUCTeX and your OS: + * If you installed AUCTeX from ELPA, use 'emacs -q -no-site-file + --eval "(progn (setq package-load-list '((auctex t))) + (package-initialize))"'. The '--eval' option activates only + AUCTeX among all installed EPLA packages. + * If you installed AUCTeX via traditional 'configure'-'make' + scheme, use 'emacs -q -no-site-file -l auctex'. The '-l' + option loads 'auctex.el' which you normally do in your init + file. + * In both above cases, use 'runemacs' instead of 'emacs' on + windows. + + After you have started Emacs like this, you can load the file + triggering the error. If everything is working now, you know that + you have to search either in the site configuration file or your + personal init file for statements related to the problem. + + 2. What versions of Emacs are supported? + + AUCTeX was tested with GNU Emacs 25.1. Older versions may work but + are unsupported. + + 3. What should I do when './configure' does not find programs like + 'latex'? + + This is problem often encountered on Windows. Make sure that the + 'PATH' environment variable includes the directories containing the + relevant programs, as described in *note (auctex)Installation under + MS Windows::. + + 4. Why doesn't the completion, style file, or multifile stuff work? + + It must be enabled first, insert this in your init file: + + (setq-default TeX-master nil) + (setq TeX-parse-self t) + (setq TeX-auto-save t) + + Read also the chapters about parsing and multifile documents in the + manual. *Note Parsing Files:: and *note Multifile::. + + 5. Why doesn't 'TeX-save-document' work? + + 'TeX-check-path' has to contain "'./'" somewhere. + + 6. Why is the information in 'foo.tex' forgotten when I save + 'foo.bib'? + + For various reasons, AUCTeX ignores the extension when it stores + information about a file, so you should use unique base names for + your files. E.g. rename 'foo.bib' to 'foob.bib'. + + 7. Why doesn't AUCTeX signal when processing a document is done? + + If the message in the minibuffer stays "Type 'C-c C-l' to display + results of compilation.", you probably have a misconfiguration in + your init file ('.emacs', 'init.el' or similar). To track this + down either search in the '*Messages*' buffer for an error message + or put '(setq debug-on-error t)' as the first line into your init + file, restart Emacs and open a LaTeX file. Emacs will complain + loudly by opening a debugging buffer as soon as an error occurs. + The information in the debugging buffer can help you find the cause + of the error in your init file. + + 8. Why does 'TeX-next-error' ('C-c `') fail? + + If 'TeX-file-line-error' is set to nil (not the default), these + sort of failures might be related to the the fact that when writing + the log file, TeX puts information related to a file, including + error messages, between a pair of parentheses. In this scenario + AUCTeX determines the file where the error happened by parsing the + log file and counting the parentheses. This can fail when there + are other, unbalanced parentheses present. + + Activating so-called 'file:line:error' messages for the log file + usually solves this issue, as these kind of messages are are easier + to parse; however, they may lack some details. Activation can be + done either in the configuration of your TeX system (consult its + manual to see where this is) or by simply keeping the variable + 'TeX-file-line-error' to the default value of non-nil. + + 9. What does 'AUC' stand for? + + AUCTeX came into being at Aalborg University in Denmark. Back then + the Danish name of the university was Aalborg Universitetscenter; + 'AUC' for short. + + +File: auctex.info, Node: Texinfo mode, Prev: FAQ, Up: Appendices + +A.5 Features specific to AUCTeX's Texinfo major mode +==================================================== + +AUCTeX includes a major mode for editting Texinfo files. This major +mode is not the same mode as the native Texinfo mode (*note +(texinfo)Texinfo Mode::) of Emacs, although they have the same name. +However, AUCTeX still relies on a number of functions from the native +Texinfo mode. + + The following text describes which functionality is offered by AUCTeX +and which by the native Texinfo mode. This should enable you to decide +when to consult the AUCTeX manual and when the manual of the native +mode. And in case you are a seasoned user of the native mode, the +information should help you to swiftly get to know the AUCTeX-specific +commands. + +* Menu: + +* Exploiting:: How AUCTeX and the native mode work together +* Superseding:: Where the native mode is superseded +* Mapping:: Where key bindings are mapped to the native mode +* Unbinding:: Which native mode key bindings are missing + + +File: auctex.info, Node: Exploiting, Next: Superseding, Up: Texinfo mode + +A.5.1 How AUCTeX and the native mode work together +-------------------------------------------------- + +In a nutshell the split between AUCTeX Texinfo mode, and native Texinfo +mode is as follows: + + * Most of the editing (environment creation, commenting, font command + insertions) and/or processing commands (e.g. compiling or printing) + which are available in other AUCTeX modes are also handled by + AUCTeX in Texinfo mode. + + * Texinfo-related features (e.g. info node linkage or menu creation) + rely on the commands provided by the native Texinfo mode. AUCTeX + provides the key bindings to reach these functions, keeping the + same keys as in native Texinfo whenever possible, or similar ones + otherwise. + + +File: auctex.info, Node: Superseding, Next: Mapping, Prev: Exploiting, Up: Texinfo mode + +A.5.2 Where the native mode is superseded +----------------------------------------- + +This section is directed to users of the native Texinfo mode switching +to AUCTeX. It follows the summary of the native mode (*note +(texinfo)Texinfo Mode Summary::) and lists which of its commands are no +longer of use. + +Insert commands + In the native Texinfo mode, frequently used Texinfo commands can be + inserted with key bindings of the form 'C-c C-c K' where K differs + for each Texinfo command; 'c' inserts '@code', 'd' inserts '@dfn', + 'k' '@kbd', etc. + + In AUCTeX commands are inserted with the key binding 'C-c C-m' + instead which prompts for the macro to be inserted. For font + selection commands (like '@b', '@i', or '@emph') and a few related + ones (like '@var', '@key' or '@code') there are bindings which + insert the respective macros directly. They have the form 'C-c C-f + K' or 'C-c C-f C-K' and call the function 'TeX-font'. Type 'C-c + C-f <RET>' to get a list of supported commands. + + Note that the prefix argument is not handled the same way by + AUCTeX. Note also that the node insertion command from the native + mode ('texinfo-insert-@node') can still accessed from the Texinfo + menu in AUCTeX. + +Insert braces + In AUCTeX braces can be inserted with the same key binding as in + the native Texinfo mode: 'C-c {'. But AUCTeX uses its own function + for the feature: 'TeX-insert-braces'. + +Insert environments + The native Texinfo mode does not insert full environments. + Instead, it provides the function 'texinfo-insert-@end' (mapped to + 'C-c C-c e') for closing an open environment with a matching '@end' + statement. + + In AUCTeX you can insert full environments, i.e. both the opening + and closing statements, with the function 'Texinfo-environment' + (mapped to 'C-c C-e'). + +Format info files with makeinfo and TeX + In the native Texinfo mode there are various functions and bindings + to format a region or the whole buffer for info or to typeset the + respective text. For example, there is 'makeinfo-buffer' (mapped + to 'C-c C-m C-b') which runs 'makeinfo' on the buffer or there is + 'texinfo-tex-buffer' (mapped to 'C-c C-t C-b') which runs TeX on + the buffer in order to produce a DVI file. + + In AUCTeX different commands for formatting or typesetting can be + invoked through the function 'TeX-command-master' (mapped to 'C-c + C-c'). After typing 'C-c C-c', you can select the desired command, + e.g 'Makeinfo' or 'TeX', through a prompt in the mini buffer. Note + that you can make, say 'Makeinfo', the default by adding this + statement in your init file: + + (add-hook 'Texinfo-mode-hook + (lambda () (setq TeX-command-default "Makeinfo"))) + + Note also that 'C-c C-c Makeinfo <RET>' is not completely + functionally equivalent to 'makeinfo-buffer' as the latter will + display the resulting info file in Emacs, showing the node + corresponding to the position in the source file, just after a + successful compilation. This is why, while using AUCTeX, invoking + 'makeinfo-buffer' might still be more convenient. + + Note also that in the case of a multifile document, 'C-c C-c' in + AUCTeX will work on the whole document (provided that the file + variable 'TeX-master' is set correctly), while 'makeinfo-buffer' in + the native mode will process only the current buffer, provided at + the '@setfilename' statement is provided. + +Produce indexes and print + The native Texinfo mode provides the binding 'C-c C-t C-i' + ('texinfo-texindex') for producing an index and the bindings 'C-c + C-t C-p' ('texinfo-tex-print') and 'C-c C-t C-q' + ('tex-show-print-queue') for printing and showing the printer + queue. These are superseded by the respective commands available + through 'C-c C-c' ('TeX-command-master') in AUCTeX: 'Texindex', + 'Print', and 'Queue'. + +Kill jobs + The command 'C-c C-t C-k' ('tex-kill-job') in the native mode is + superseded by 'C-c C-k' ('TeX-kill-job') in AUCTeX. + + +File: auctex.info, Node: Mapping, Next: Unbinding, Prev: Superseding, Up: Texinfo mode + +A.5.3 Where key bindings are mapped to the native mode +------------------------------------------------------ + +This node follows the native Texinfo mode summary (*note +(texinfo)Texinfo Mode Summary::) and lists only those commands to which +AUCTeX provides a keybinding. + + Basically all commands of the native mode related to producing menus +and interlinking nodes are mapped to same or similar keys in AUCTeX, +while a few insertion commands are mapped to AUCTeX-like keys. + +'@item' insertion + The binding 'C-c C-c i' for the insertion of '@item' in the native + mode is mapped to 'M-<RET>' or 'C-c C-j' in AUCTeX, similar to + other AUCTeX modes. + +'@end' insertion + The binding 'C-c C-c e' for closing a '@FOO' command by a + corresponding '@end FOO' statement in the native mode is mapped to + 'C-c ]' in AUCTeX, similar to other AUCTeX modes. + +Move out of balanced braces + The binding 'C-c }' ('up-list') is available both in the native + mode and in AUCTeX. (This is because the command is not + implemented in either mode but a native Emacs command.) However, + in AUCTeX, you cannot use 'C-c ]' for this, as it is used for + '@end' insertion. + +Update pointers + The bindings 'C-c C-u C-n' ('texinfo-update-node') and 'C-c C-u + C-e' ('texinfo-every-node-update') from the native mode are + available in AUCTeX as well. + +Update menus + The bindings 'C-c C-u m' ('texinfo-master-menu'), 'C-c C-u C-m' + ('texinfo-make-menu'), and 'C-c C-u C-a' + ('texinfo-all-menus-update') from the native mode are available in + AUCTeX as well. The command 'texinfo-start-menu-description', + bound to 'C-c C-c C-d' in the native mode, is bound to 'C-c C-u + C-d' in AUCTeX instead. + + +File: auctex.info, Node: Unbinding, Prev: Mapping, Up: Texinfo mode + +A.5.4 Which native mode key bindings are missing +------------------------------------------------ + +The following commands from the native commands might still be useful +when working with AUCTeX, however, they are not accessible with a key +binding any longer. + +'@node' insertion + The node insertion command, mapped to 'C-c C-c n' in the native + mode, is not mapped to any key in AUCTeX. You can still access it + through the Texinfo menu, though. Another alternative is to use + the 'C-c C-m' binding for macro insertion in AUCTeX. + +Show the section structure + The command 'texinfo-show-structure' ('C-c C-s') from the native + mode does not have a key binding in AUCTeX. The binding is used by + AUCTeX for sectioning. + + +File: auctex.info, Node: Indices, Prev: Appendices, Up: Top + +Indices +******* + +* Menu: + +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: + + +File: auctex.info, Node: Key Index, Next: Function Index, Up: Indices + +Key Index +========= + + +* Menu: + +* ": Quotes. (line 15) +* $: Quotes. (line 61) +* (: Quotes. (line 154) +* [: Quotes. (line 154) +* ^: Mathematics. (line 64) +* _: Mathematics. (line 64) +* {: Quotes. (line 154) +* C-c %: Commenting. (line 23) +* C-c *: Marking (LaTeX). (line 7) +* C-c * <1>: Marking (Texinfo). (line 7) +* C-c .: Marking (LaTeX). (line 16) +* C-c . <1>: Marking (Texinfo). (line 25) +* C-c ;: Commenting. (line 15) +* C-c ?: Documentation. (line 7) +* C-c C-a: Starting a Command. (line 59) +* C-c C-b: Starting a Command. (line 35) +* C-c C-c: Starting a Command. (line 13) +* C-c C-d: Multifile. (line 99) +* C-c C-e: Environments. (line 23) +* C-c C-f: Font Specifiers. (line 55) +* C-c C-f C-b: Editing Facilities. (line 72) +* C-c C-f C-b <1>: Font Specifiers. (line 16) +* C-c C-f C-c: Editing Facilities. (line 93) +* C-c C-f C-c <1>: Editing Facilities. (line 96) +* C-c C-f C-c <2>: Font Specifiers. (line 40) +* C-c C-f C-c <3>: Font Specifiers. (line 52) +* C-c C-f C-e: Editing Facilities. (line 78) +* C-c C-f C-e <1>: Font Specifiers. (line 25) +* C-c C-f C-f: Editing Facilities. (line 87) +* C-c C-f C-f <1>: Font Specifiers. (line 34) +* C-c C-f C-i: Editing Facilities. (line 75) +* C-c C-f C-i <1>: Font Specifiers. (line 22) +* C-c C-f C-l: Font Specifiers. (line 43) +* C-c C-f C-m: Font Specifiers. (line 19) +* C-c C-f C-n: Font Specifiers. (line 49) +* C-c C-f C-r: Editing Facilities. (line 84) +* C-c C-f C-r <1>: Font Specifiers. (line 31) +* C-c C-f C-s: Editing Facilities. (line 81) +* C-c C-f C-s <1>: Font Specifiers. (line 28) +* C-c C-f C-t: Editing Facilities. (line 90) +* C-c C-f C-t <1>: Font Specifiers. (line 37) +* C-c C-f C-w: Font Specifiers. (line 46) +* C-c C-f g: Japanese. (line 113) +* C-c C-f m: Japanese. (line 117) +* C-c C-k: Control. (line 10) +* C-c C-l: Control. (line 14) +* C-c C-m: Completion. (line 69) +* C-c C-n: Parsing Files. (line 45) +* C-c C-o b: Folding. (line 121) +* C-c C-o C-b: Folding. (line 43) +* C-c C-o C-c: Folding. (line 118) +* C-c C-o C-e: Folding. (line 102) +* C-c C-o C-f: Folding. (line 31) +* C-c C-o C-m: Folding. (line 93) +* C-c C-o C-o: Folding. (line 140) +* C-c C-o C-p: Folding. (line 89) +* C-c C-o C-r: Folding. (line 86) +* C-c C-o i: Folding. (line 133) +* C-c C-o p: Folding. (line 129) +* C-c C-o r: Folding. (line 125) +* C-c C-q C-e: Filling. (line 90) +* C-c C-q C-p: Filling. (line 84) +* C-c C-q C-r: Filling. (line 99) +* C-c C-q C-s: Filling. (line 95) +* C-c C-r: Starting a Command. (line 19) +* C-c C-s: Sectioning. (line 22) +* C-c C-t C-b: Ignoring warnings. (line 10) +* C-c C-t C-i: Processing Facilities. + (line 53) +* C-c C-t C-i <1>: Processor Options. (line 30) +* C-c C-t C-o: Processing Facilities. + (line 59) +* C-c C-t C-p: Processing Facilities. + (line 50) +* C-c C-t C-p <1>: Processor Options. (line 16) +* C-c C-t C-r: Starting a Command. (line 85) +* C-c C-t C-s: Processing Facilities. + (line 56) +* C-c C-t C-s <1>: Processor Options. (line 37) +* C-c C-t C-w: Ignoring warnings. (line 15) +* C-c C-t C-x: Ignoring warnings. (line 39) +* C-c C-v: Starting Viewers. (line 12) +* C-c C-z: Starting a Command. (line 42) +* C-c <LFD>: Itemize-like. (line 10) +* C-c <LFD> <1>: Tabular-like. (line 33) +* C-c ]: Environments. (line 102) +* C-c ^: Control. (line 18) +* C-c _: Multifile. (line 71) +* C-c `: Debugging. (line 12) +* C-c {: Quotes. (line 122) +* C-c ~: Mathematics. (line 12) +* C-j: Indenting. (line 78) +* C-M-a: Environments. (line 107) +* C-M-e: Environments. (line 114) +* C-M-h: Marking (Texinfo). (line 34) +* C-x n e: Narrowing. (line 17) +* C-x n g: Narrowing. (line 14) +* <LFD>: Indenting. (line 78) +* M-g p: Debugging. (line 27) +* M-q: Filling. (line 87) +* M-<TAB>: Completion. (line 24) +* <TAB>: Indenting. (line 74) + + +File: auctex.info, Node: Function Index, Next: Variable Index, Prev: Key Index, Up: Indices + +Function Index +============== + + +* Menu: + +* align-current: Indenting. (line 58) +* ams-tex-mode: Modes and Hooks. (line 22) +* auto-fill-mode: Filling. (line 6) +* context-mode: Modes and Hooks. (line 22) +* doctex-mode: Modes and Hooks. (line 22) +* indent-region: Indenting. (line 29) +* japanese-latex-mode: Japanese. (line 6) +* japanese-plain-tex-mode: Japanese. (line 6) +* LaTeX-add-bibliographies: Adding Other. (line 13) +* LaTeX-add-environments: Adding Environments. (line 66) +* LaTeX-add-labels: Adding Other. (line 16) +* LaTeX-arg-author: Adding Macros. (line 244) +* LaTeX-arg-usepackage: Adding Macros. (line 200) +* LaTeX-CLASSNAME-class-options: Adding Other. (line 107) +* LaTeX-close-environment: Environments. (line 101) +* LaTeX-command-section: Starting a Command. (line 41) +* LaTeX-declare-expert-environments: Adding Environments. (line 128) +* LaTeX-env-args: Adding Environments. (line 109) +* LaTeX-env-array: Adding Environments. (line 81) +* LaTeX-env-bib: Adding Environments. (line 103) +* LaTeX-env-contents: Adding Environments. (line 106) +* LaTeX-env-figure: Adding Environments. (line 77) +* LaTeX-env-item: Adding Environments. (line 74) +* LaTeX-env-label: Adding Environments. (line 85) +* LaTeX-env-list: Adding Environments. (line 88) +* LaTeX-env-minipage: Adding Environments. (line 92) +* LaTeX-env-picture: Adding Environments. (line 100) +* LaTeX-env-tabular*: Adding Environments. (line 96) +* LaTeX-environment: Environments. (line 22) +* LaTeX-fill-environment: Filling. (line 79) +* LaTeX-fill-environment <1>: Filling. (line 90) +* LaTeX-fill-paragraph: Filling. (line 84) +* LaTeX-fill-region: Filling. (line 99) +* LaTeX-fill-section: Filling. (line 95) +* LaTeX-find-matching-begin: Environments. (line 106) +* LaTeX-find-matching-end: Environments. (line 113) +* LaTeX-indent-line: Indenting. (line 74) +* LaTeX-insert-environment: Adding Environments. (line 69) +* LaTeX-insert-item: Itemize-like. (line 9) +* LaTeX-insert-item <1>: Tabular-like. (line 32) +* LaTeX-mark-environment: Marking (LaTeX). (line 15) +* LaTeX-mark-section: Marking (LaTeX). (line 6) +* LaTeX-match-class-option: Adding Other. (line 55) +* LaTeX-math-mode: Mathematics. (line 11) +* latex-mode: Modes and Hooks. (line 22) +* LaTeX-narrow-to-environment: Narrowing. (line 16) +* LaTeX-PACKAGENAME-package-options: Adding Other. (line 82) +* LaTeX-provided-class-options-member: Adding Other. (line 51) +* LaTeX-provided-package-options-member: Adding Other. (line 37) +* LaTeX-section: Sectioning. (line 21) +* LaTeX-section-heading: Sectioning. (line 69) +* LaTeX-section-label: Sectioning. (line 83) +* LaTeX-section-section: Sectioning. (line 77) +* LaTeX-section-title: Sectioning. (line 72) +* LaTeX-section-toc: Sectioning. (line 75) +* plain-tex-mode: Modes and Hooks. (line 22) +* TeX--completion-at-point: Completion. (line 51) +* TeX-add-style-hook: Simple Style. (line 34) +* TeX-add-symbols: Adding Macros. (line 24) +* TeX-arg-bibliography: Adding Macros. (line 210) +* TeX-arg-bibstyle: Adding Macros. (line 206) +* TeX-arg-cite: Adding Macros. (line 136) +* TeX-arg-conditional: Adding Macros. (line 86) +* TeX-arg-coordinate: Adding Macros. (line 241) +* TeX-arg-corner: Adding Macros. (line 214) +* TeX-arg-counter: Adding Macros. (line 141) +* TeX-arg-date: Adding Macros. (line 122) +* TeX-arg-define-cite: Adding Macros. (line 182) +* TeX-arg-define-counter: Adding Macros. (line 185) +* TeX-arg-define-environment: Adding Macros. (line 178) +* TeX-arg-define-label: Adding Macros. (line 166) +* TeX-arg-define-length: Adding Macros. (line 170) +* TeX-arg-define-macro: Adding Macros. (line 174) +* TeX-arg-define-savebox: Adding Macros. (line 188) +* TeX-arg-document: Adding Macros. (line 191) +* TeX-arg-environment: Adding Macros. (line 133) +* TeX-arg-eval: Adding Macros. (line 97) +* TeX-arg-file: Adding Macros. (line 147) +* TeX-arg-file-name: Adding Macros. (line 151) +* TeX-arg-file-name-sans-extension: Adding Macros. (line 155) +* TeX-arg-free: Adding Macros. (line 94) +* TeX-arg-hook: Adding Macros. (line 251) +* TeX-arg-index: Adding Macros. (line 113) +* TeX-arg-index-tag: Adding Macros. (line 109) +* TeX-arg-input-file: Adding Macros. (line 159) +* TeX-arg-key-val: Adding Macros. (line 257) +* TeX-arg-label: Adding Macros. (line 100) +* TeX-arg-length: Adding Macros. (line 116) +* TeX-arg-literal: Adding Macros. (line 90) +* TeX-arg-lr: Adding Macros. (line 217) +* TeX-arg-macro: Adding Macros. (line 119) +* TeX-arg-pagestyle: Adding Macros. (line 223) +* TeX-arg-pair: Adding Macros. (line 234) +* TeX-arg-ref: Adding Macros. (line 104) +* TeX-arg-savebox: Adding Macros. (line 144) +* TeX-arg-size: Adding Macros. (line 238) +* TeX-arg-tb: Adding Macros. (line 220) +* TeX-arg-verb: Adding Macros. (line 226) +* TeX-arg-verb-delim-or-brace: Adding Macros. (line 229) +* TeX-arg-version: Adding Macros. (line 129) +* TeX-auto-generate: Automatic Private. (line 23) +* TeX-clean: Cleaning. (line 6) +* TeX-command-buffer: Starting a Command. (line 34) +* TeX-command-master: Starting a Command. (line 12) +* TeX-command-region: Starting a Command. (line 18) +* TeX-command-run-all: Starting a Command. (line 58) +* TeX-comment-or-uncomment-paragraph: Commenting. (line 22) +* TeX-comment-or-uncomment-region: Commenting. (line 14) +* TeX-complete-symbol: Completion. (line 23) +* TeX-declare-expert-macros: Adding Macros. (line 272) +* TeX-documentation-texdoc: Documentation. (line 6) +* TeX-electric-macro: Completion. (line 107) +* TeX-error-overview: Error overview. (line 10) +* TeX-fold-buffer: Folding. (line 42) +* TeX-fold-clearout-buffer: Folding. (line 120) +* TeX-fold-clearout-item: Folding. (line 132) +* TeX-fold-clearout-paragraph: Folding. (line 128) +* TeX-fold-clearout-region: Folding. (line 124) +* TeX-fold-comment: Folding. (line 117) +* TeX-fold-dwim: Folding. (line 139) +* TeX-fold-env: Folding. (line 101) +* TeX-fold-macro: Folding. (line 92) +* TeX-fold-math: Folding. (line 108) +* TeX-fold-mode: Folding. (line 31) +* TeX-fold-paragraph: Folding. (line 88) +* TeX-fold-region: Folding. (line 85) +* TeX-font: Font Specifiers. (line 54) +* TeX-home-buffer: Control. (line 17) +* TeX-insert-braces: Quotes. (line 121) +* TeX-insert-dollar: Quotes. (line 60) +* TeX-insert-macro: Completion. (line 68) +* TeX-insert-quote: Quotes. (line 14) +* TeX-interactive-mode: Processor Options. (line 29) +* TeX-ispell-skip-setcar: Selecting a Command. (line 147) +* TeX-ispell-skip-setcdr: Selecting a Command. (line 147) +* TeX-ispell-tex-arg-end: Selecting a Command. (line 167) +* TeX-kill-job: Control. (line 9) +* TeX-master-file-ask: Multifile. (line 70) +* TeX-narrow-to-group: Narrowing. (line 13) +* TeX-next-error: Debugging. (line 11) +* TeX-normal-mode: Parsing Files. (line 44) +* TeX-PDF-mode: Processor Options. (line 15) +* TeX-pin-region: Starting a Command. (line 84) +* TeX-previous-error: Debugging. (line 26) +* TeX-read-hook: Adding Macros. (line 248) +* TeX-read-key-val: Adding Macros. (line 254) +* TeX-recenter-output-buffer: Control. (line 13) +* TeX-revert-document-buffer: Modes and Hooks. (line 39) +* TeX-save-document: Multifile. (line 98) +* TeX-source-correlate-mode: Processor Options. (line 36) +* TeX-source-correlate-mode <1>: I/O Correlation. (line 12) +* TeX-toggle-debug-bad-boxes: Ignoring warnings. (line 9) +* TeX-toggle-debug-warnings: Ignoring warnings. (line 14) +* TeX-toggle-suppress-ignored-warnings: Ignoring warnings. (line 38) +* TeX-view: Starting Viewers. (line 11) +* TeX-view <1>: I/O Correlation. (line 42) +* TeX-view-mouse: I/O Correlation. (line 48) +* Texinfo-mark-environment: Marking (Texinfo). (line 24) +* Texinfo-mark-node: Marking (Texinfo). (line 33) +* Texinfo-mark-section: Marking (Texinfo). (line 6) +* texinfo-mode: Modes and Hooks. (line 22) +* turn-on-auto-fill: Filling. (line 6) + + +File: auctex.info, Node: Variable Index, Next: Concept Index, Prev: Function Index, Up: Indices + +Variable Index +============== + + +* Menu: + +* AmS-TeX-mode-hook: Modes and Hooks. (line 22) +* AmSTeX-clean-intermediate-suffixes: Cleaning. (line 7) +* AmSTeX-clean-output-suffixes: Cleaning. (line 7) +* ConTeXt-clean-intermediate-suffixes: Cleaning. (line 7) +* ConTeXt-clean-output-suffixes: Cleaning. (line 7) +* ConTeXt-engine: Processor Options. (line 121) +* ConTeXt-Mark-version: Processor Options. (line 200) +* ConTeXt-mode-hook: Modes and Hooks. (line 22) +* ConTeXt-Omega-engine: Processor Options. (line 121) +* docTeX-clean-intermediate-suffixes: Cleaning. (line 7) +* docTeX-clean-output-suffixes: Cleaning. (line 7) +* docTeX-mode-hook: Modes and Hooks. (line 22) +* fill-column: Filling. (line 6) +* font-latex-deactivated-keyword-classes: Fontification of macros. + (line 162) +* font-latex-fontify-script: Fontification of math. + (line 28) +* font-latex-fontify-script-max-level: Fontification of math. + (line 42) +* font-latex-fontify-sectioning: Fontification of macros. + (line 95) +* font-latex-match-bold-command-keywords: Fontification of macros. + (line 137) +* font-latex-match-bold-declaration-keywords: Fontification of macros. + (line 137) +* font-latex-match-function-keywords: Fontification of macros. + (line 60) +* font-latex-match-italic-command-keywords: Fontification of macros. + (line 137) +* font-latex-match-italic-declaration-keywords: Fontification of macros. + (line 137) +* font-latex-match-math-command-keywords: Fontification of macros. + (line 137) +* font-latex-match-math-command-keywords <1>: Fontification of math. + (line 6) +* font-latex-match-reference-keywords: Fontification of macros. + (line 60) +* font-latex-match-sectioning-0-keywords: Fontification of macros. + (line 107) +* font-latex-match-sectioning-1-keywords: Fontification of macros. + (line 107) +* font-latex-match-sectioning-2-keywords: Fontification of macros. + (line 107) +* font-latex-match-sectioning-3-keywords: Fontification of macros. + (line 107) +* font-latex-match-sectioning-4-keywords: Fontification of macros. + (line 107) +* font-latex-match-sectioning-5-keywords: Fontification of macros. + (line 107) +* font-latex-match-slide-title-keywords: Fontification of macros. + (line 114) +* font-latex-match-textual-keywords: Fontification of macros. + (line 60) +* font-latex-match-type-command-keywords: Fontification of macros. + (line 137) +* font-latex-match-type-declaration-keywords: Fontification of macros. + (line 137) +* font-latex-match-variable-keywords: Fontification of macros. + (line 60) +* font-latex-match-warning-keywords: Fontification of macros. + (line 60) +* font-latex-math-environments: Fontification of math. + (line 6) +* font-latex-quotes: Fontification of quotes. + (line 15) +* font-latex-script-char-face: Fontification of math. + (line 63) +* font-latex-script-display: Fontification of math. + (line 66) +* font-latex-sectioning-0-face: Fontification of macros. + (line 96) +* font-latex-sectioning-1-face: Fontification of macros. + (line 96) +* font-latex-sectioning-2-face: Fontification of macros. + (line 96) +* font-latex-sectioning-3-face: Fontification of macros. + (line 96) +* font-latex-sectioning-4-face: Fontification of macros. + (line 96) +* font-latex-sectioning-5-face: Fontification of macros. + (line 96) +* font-latex-slide-title-face: Fontification of macros. + (line 114) +* font-latex-subscript-face: Fontification of math. + (line 42) +* font-latex-superscript-face: Fontification of math. + (line 42) +* font-latex-user-keyword-classes: Fontification of macros. + (line 194) +* japanese-LaTeX-default-style: Japanese. (line 75) +* japanese-TeX-engine-default: Japanese. (line 36) +* japanese-TeX-mode: Japanese. (line 6) +* japanese-TeX-use-kanji-opt-flag: Japanese. (line 87) +* LaTeX-amsmath-label: Equations. (line 15) +* LaTeX-auto-class-regexp-list: Parsing Files. (line 106) +* LaTeX-auto-counter-regexp-list: Parsing Files. (line 112) +* LaTeX-auto-index-regexp-list: Parsing Files. (line 103) +* LaTeX-auto-label-regexp-list: Parsing Files. (line 100) +* LaTeX-auto-length-regexp-list: Parsing Files. (line 115) +* LaTeX-auto-minimal-regexp-list: Parsing Files. (line 97) +* LaTeX-auto-pagestyle-regexp-list: Parsing Files. (line 109) +* LaTeX-auto-regexp-list: Parsing Files. (line 121) +* LaTeX-auto-savebox-regexp-list: Parsing Files. (line 118) +* LaTeX-babel-hyphen: European. (line 168) +* LaTeX-babel-hyphen-after-hyphen: European. (line 176) +* LaTeX-babel-hyphen-language-alist: European. (line 155) +* LaTeX-begin-regexp: Indenting. (line 119) +* LaTeX-biblatex-use-Biber: Selecting a Command. (line 52) +* LaTeX-CLASSNAME-class-options: Adding Other. (line 104) +* LaTeX-clean-intermediate-suffixes: Cleaning. (line 7) +* LaTeX-clean-output-suffixes: Cleaning. (line 7) +* LaTeX-command: Processor Options. (line 121) +* LaTeX-csquotes-close-quote: Quotes. (line 43) +* LaTeX-csquotes-open-quote: Quotes. (line 43) +* LaTeX-csquotes-quote-after-quote: Quotes. (line 43) +* LaTeX-default-author: Adding Macros. (line 245) +* LaTeX-default-document-environment: Environments. (line 61) +* LaTeX-default-environment: Environments. (line 56) +* LaTeX-default-format: Tabular-like. (line 10) +* LaTeX-default-options: Adding Macros. (line 192) +* LaTeX-default-position: Tabular-like. (line 16) +* LaTeX-default-style: Adding Macros. (line 192) +* LaTeX-default-width: Tabular-like. (line 13) +* LaTeX-done-mark: Sectioning. (line 62) +* LaTeX-electric-left-right-brace: Quotes. (line 157) +* LaTeX-enable-toolbar: Processing. (line 11) +* LaTeX-end-regexp: Indenting. (line 119) +* LaTeX-eqnarray-label: Equations. (line 12) +* LaTeX-equation-label: Equations. (line 9) +* LaTeX-figure-label: Floats. (line 32) +* LaTeX-figure-label <1>: Floats. (line 42) +* LaTeX-fill-break-at-separators: Filling. (line 101) +* LaTeX-fill-break-before-code-comments: Filling. (line 111) +* LaTeX-fill-excluded-macros: Filling. (line 121) +* LaTeX-float: Floats. (line 14) +* LaTeX-float <1>: Floats. (line 39) +* LaTeX-fold-env-spec-list: Folding. (line 197) +* LaTeX-fold-macro-spec-list: Folding. (line 197) +* LaTeX-fold-math-spec-list: Folding. (line 197) +* LaTeX-font-list: Font Specifiers. (line 69) +* LaTeX-indent-environment-check: Indenting. (line 51) +* LaTeX-indent-environment-list: Indenting. (line 37) +* LaTeX-indent-environment-list <1>: Indenting. (line 48) +* LaTeX-indent-environment-list <2>: Indenting. (line 86) +* LaTeX-indent-level: Indenting. (line 19) +* LaTeX-indent-level <1>: Indenting. (line 91) +* LaTeX-item-indent: Indenting. (line 19) +* LaTeX-item-indent <1>: Indenting. (line 95) +* LaTeX-item-regexp: Indenting. (line 19) +* LaTeX-label-alist: Environments. (line 38) +* LaTeX-level: Sectioning. (line 53) +* LaTeX-math-abbrev-prefix: Mathematics. (line 26) +* LaTeX-math-default: Mathematics. (line 6) +* LaTeX-math-list: Mathematics. (line 36) +* LaTeX-math-menu-unicode: Mathematics. (line 56) +* LaTeX-mode-hook: Modes and Hooks. (line 22) +* LaTeX-name: Sectioning. (line 56) +* LaTeX-Omega-command: Processor Options. (line 121) +* LaTeX-PACKAGENAME-package-options: Adding Other. (line 69) +* LaTeX-paragraph-commands: Filling. (line 54) +* LaTeX-provided-class-options: Adding Other. (line 44) +* LaTeX-provided-package-options: Adding Other. (line 26) +* LaTeX-section-hook: Sectioning. (line 40) +* LaTeX-section-hook <1>: Sectioning. (line 48) +* LaTeX-section-label: Sectioning. (line 42) +* LaTeX-section-label <1>: Sectioning. (line 101) +* LaTeX-short-caption-prompt-length: Floats. (line 27) +* LaTeX-short-caption-prompt-length <1>: Floats. (line 51) +* LaTeX-style-list: Adding Macros. (line 192) +* LaTeX-syntactic-comments: Indenting. (line 68) +* LaTeX-syntactic-comments <1>: Indenting. (line 103) +* LaTeX-table-label: Floats. (line 32) +* LaTeX-table-label <1>: Floats. (line 45) +* LaTeX-title: Sectioning. (line 58) +* LaTeX-toc: Sectioning. (line 60) +* LaTeX-top-caption-list: Floats. (line 20) +* LaTeX-top-caption-list <1>: Floats. (line 48) +* LaTeX-verbatim-environments: Verbatim content. (line 10) +* LaTeX-verbatim-macros-with-braces: Verbatim content. (line 10) +* LaTeX-verbatim-macros-with-delims: Verbatim content. (line 10) +* outline-regexp: Marking (Texinfo). (line 10) +* plain-TeX-auto-regexp-list: Parsing Files. (line 124) +* plain-TeX-clean-intermediate-suffixes: Cleaning. (line 7) +* plain-TeX-clean-output-suffixes: Cleaning. (line 7) +* plain-TeX-enable-toolbar: Processing. (line 11) +* plain-TeX-mode-hook: Modes and Hooks. (line 22) +* TeX-after-compilation-finished-functions: Modes and Hooks. (line 30) +* TeX-after-compilation-finished-functions <1>: Modes and Hooks. + (line 40) +* TeX-arg-cite-note-p: Adding Macros. (line 137) +* TeX-arg-input-file-search: Adding Macros. (line 160) +* TeX-arg-input-file-search <1>: Adding Macros. (line 192) +* TeX-arg-input-file-search <2>: Adding Macros. (line 201) +* TeX-arg-item-label-p: Itemize-like. (line 15) +* TeX-arg-right-insert-p: Quotes. (line 150) +* TeX-auto-cleanup-hook: Hacking the Parser. (line 100) +* TeX-auto-empty-regexp-list: Parsing Files. (line 94) +* TeX-auto-full-regexp-list: Parsing Files. (line 127) +* TeX-auto-global: Automatic Global. (line 24) +* TeX-auto-local: Automatic Local. (line 21) +* TeX-auto-parse-length: Parsing Files. (line 88) +* TeX-auto-prepare-hook: Hacking the Parser. (line 97) +* TeX-auto-private: Automatic Private. (line 19) +* TeX-auto-regexp-list: Parsing Files. (line 85) +* TeX-auto-regexp-list <1>: Hacking the Parser. (line 78) +* TeX-auto-save: Parsing Files. (line 41) +* TeX-auto-untabify: Parsing Files. (line 58) +* TeX-bar-LaTeX-button-alist: Processing. (line 11) +* TeX-bar-LaTeX-buttons: Processing. (line 11) +* TeX-bar-TeX-all-button-alists: Processing. (line 11) +* TeX-bar-TeX-buttons: Processing. (line 11) +* TeX-brace-indent-level: Indenting. (line 99) +* TeX-check-engine: Processor Options. (line 164) +* TeX-check-path: Selecting a Command. (line 68) +* TeX-check-TeX: Processor Options. (line 149) +* TeX-check-TeX-command-not-found: Processor Options. (line 150) +* TeX-clean-confirm: Cleaning. (line 30) +* TeX-close-quote: Quotes. (line 25) +* TeX-command: Processor Options. (line 121) +* TeX-command <1>: Processor Options. (line 150) +* TeX-command-default: Selecting a Command. (line 43) +* TeX-command-extra-options: Processor Options. (line 172) +* TeX-command-list: Starting a Command. (line 16) +* TeX-command-list <1>: Starting a Command. (line 32) +* TeX-command-list <2>: Selecting a Command. (line 14) +* TeX-complete-expert-commands: Environments. (line 78) +* TeX-complete-expert-commands <1>: Completion. (line 142) +* TeX-complete-list: Completion. (line 26) +* TeX-date-format: Adding Macros. (line 123) +* TeX-debug-bad-boxes: Ignoring warnings. (line 10) +* TeX-debug-warnings: Ignoring warnings. (line 15) +* TeX-default-macro: Completion. (line 76) +* TeX-default-mode: Japanese. (line 6) +* TeX-default-mode <1>: Japanese. (line 67) +* TeX-dialect: Simple Style. (line 82) +* TeX-display-help: Debugging. (line 47) +* TeX-DVI-via-PDFTeX: Processor Options. (line 22) +* TeX-electric-escape: Completion. (line 97) +* TeX-electric-math: Quotes. (line 72) +* TeX-electric-sub-and-superscript: Mathematics. (line 70) +* TeX-engine: Processor Options. (line 104) +* TeX-engine <1>: Japanese. (line 6) +* TeX-engine-alist: Processor Options. (line 121) +* TeX-engine-alist <1>: Processor Options. (line 132) +* TeX-engine-alist <2>: Japanese. (line 6) +* TeX-engine-alist-builtin: Processor Options. (line 121) +* TeX-error-overview-frame-parameters: Error overview. (line 43) +* TeX-error-overview-open-after-TeX-run: Error overview. (line 25) +* TeX-error-overview-setup: Error overview. (line 34) +* TeX-expand-list: Selecting a Command. (line 14) +* TeX-file-line-error: Processor Options. (line 193) +* TeX-file-recurse: Automatic. (line 44) +* TeX-fold-auto: Folding. (line 70) +* TeX-fold-command-prefix: Folding. (line 145) +* TeX-fold-env-spec-list: Folding. (line 187) +* TeX-fold-force-fontify: Folding. (line 62) +* TeX-fold-help-echo-max-length: Folding. (line 224) +* TeX-fold-macro-spec-list: Folding. (line 154) +* TeX-fold-math-spec-list: Folding. (line 194) +* TeX-fold-preserve-comments: Folding. (line 75) +* TeX-fold-type-list: Folding. (line 57) +* TeX-fold-unfold-around-mark: Folding. (line 81) +* TeX-fold-unspec-env-display-string: Folding. (line 207) +* TeX-fold-unspec-macro-display-string: Folding. (line 203) +* TeX-fold-unspec-use-name: Folding. (line 211) +* TeX-font-list: Font Specifiers. (line 60) +* TeX-header-end: Starting a Command. (line 32) +* TeX-header-end <1>: Starting a Command. (line 69) +* TeX-ignore-file: Automatic. (line 52) +* TeX-ignore-warnings: Ignoring warnings. (line 25) +* TeX-indent-close-delimiters: Indenting. (line 133) +* TeX-indent-open-delimiters: Indenting. (line 128) +* TeX-insert-braces: Completion. (line 117) +* TeX-insert-braces-alist: Completion. (line 121) +* TeX-insert-macro-default-style: Completion. (line 80) +* TeX-install-font-lock: Font Locking. (line 13) +* TeX-interactive-mode: Processor Options. (line 30) +* TeX-ispell-extend-skip-list: Selecting a Command. (line 83) +* TeX-ispell-verb-delimiters: Selecting a Command. (line 176) +* TeX-japanese-process-input-coding-system: Japanese. (line 95) +* TeX-japanese-process-output-coding-system: Japanese. (line 99) +* TeX-language-bg-hook: European. (line 51) +* TeX-language-cz-hook: European. (line 51) +* TeX-language-de-hook: European. (line 51) +* TeX-language-dk-hook: European. (line 51) +* TeX-language-en-hook: European. (line 51) +* TeX-language-is-hook: European. (line 51) +* TeX-language-it-hook: European. (line 51) +* TeX-language-nl-hook: European. (line 51) +* TeX-language-pl-hook: European. (line 51) +* TeX-language-pt-br-hook: European. (line 51) +* TeX-language-pt-hook: European. (line 51) +* TeX-language-sk-hook: European. (line 51) +* TeX-language-sv-hook: European. (line 51) +* TeX-macro-global: Customizing. (line 19) +* TeX-macro-global <1>: Automatic Global. (line 16) +* TeX-macro-private: Automatic Private. (line 12) +* TeX-master: Starting a Command. (line 16) +* TeX-master <1>: Starting a Command. (line 32) +* TeX-master <2>: Multifile. (line 39) +* TeX-math-input-method-off-regexp: Mathematics. (line 76) +* TeX-newline-function: Indenting. (line 29) +* TeX-newline-function <1>: Indenting. (line 107) +* TeX-Omega-command: Processor Options. (line 121) +* TeX-one-master: Multifile. (line 57) +* TeX-open-quote: Quotes. (line 21) +* TeX-outline-extra: Outline. (line 13) +* TeX-output-dir: Control. (line 25) +* TeX-parse-all-errors: Debugging. (line 35) +* TeX-parse-self: Parsing Files. (line 38) +* TeX-parse-self <1>: Japanese. (line 6) +* TeX-PDF-from-DVI: Processor Options. (line 71) +* TeX-PDF-mode: Processor Options. (line 16) +* TeX-quote-after-quote: Quotes. (line 29) +* TeX-quote-language-alist: European. (line 142) +* TeX-raise-frame-function: I/O Correlation. (line 85) +* TeX-region: Starting a Command. (line 32) +* TeX-region <1>: Starting a Command. (line 65) +* TeX-save-query: Multifile. (line 102) +* TeX-show-compilation: Processor Options. (line 185) +* TeX-source-correlate-map: I/O Correlation. (line 48) +* TeX-source-correlate-method: Processor Options. (line 48) +* TeX-source-correlate-method <1>: I/O Correlation. (line 21) +* TeX-source-correlate-mode: Processor Options. (line 37) +* TeX-source-correlate-start-server: I/O Correlation. (line 57) +* TeX-source-correlate-start-server <1>: I/O Correlation. (line 63) +* TeX-source-correlate-start-server <2>: I/O Correlation. (line 77) +* TeX-style-global: Automatic Global. (line 19) +* TeX-style-local: Automatic Local. (line 16) +* TeX-style-path: Automatic. (line 38) +* TeX-style-private: Automatic Private. (line 28) +* TeX-suppress-ignored-warnings: Ignoring warnings. (line 39) +* TeX-trailer-start: Starting a Command. (line 32) +* TeX-trailer-start <1>: Starting a Command. (line 74) +* TeX-view-evince-keep-focus: Starting Viewers. (line 92) +* TeX-view-predicate-list: Starting Viewers. (line 56) +* TeX-view-program-list: Starting Viewers. (line 65) +* TeX-view-program-selection: Starting Viewers. (line 36) +* Texinfo-clean-intermediate-suffixes: Cleaning. (line 7) +* Texinfo-clean-output-suffixes: Cleaning. (line 7) +* Texinfo-mode-hook: Modes and Hooks. (line 22) +* texinfo-section-list: Marking (Texinfo). (line 10) +* texmathp-tex-commands: Fontification of math. + (line 6) +* texmathp-tex-commands-default: Fontification of math. + (line 6) + + +File: auctex.info, Node: Concept Index, Prev: Variable Index, Up: Indices + +Concept Index +============= + + +* Menu: + +* .emacs: Loading the package. (line 6) +* \begin: Environments. (line 6) +* \chapter: Editing Facilities. (line 24) +* \chapter <1>: Sectioning. (line 6) +* \cite, completion of: Completion. (line 154) +* \emph: Editing Facilities. (line 78) +* \emph <1>: Font Specifiers. (line 25) +* \end: Environments. (line 6) +* \include: Multifile. (line 6) +* \input: Multifile. (line 6) +* \item: Itemize-like. (line 6) +* \label: Editing Facilities. (line 24) +* \label <1>: Sectioning. (line 6) +* \label, completion: Completion. (line 154) +* \mathgt: Japanese. (line 113) +* \mathmc: Japanese. (line 117) +* \ref, completion: Completion. (line 154) +* \section: Editing Facilities. (line 24) +* \section <1>: Sectioning. (line 6) +* \subsection: Editing Facilities. (line 24) +* \subsection <1>: Sectioning. (line 6) +* \textbf: Editing Facilities. (line 72) +* \textbf <1>: Font Specifiers. (line 16) +* \textgt: Japanese. (line 113) +* \textit: Editing Facilities. (line 75) +* \textit <1>: Font Specifiers. (line 22) +* \textmc: Japanese. (line 117) +* \textmd: Font Specifiers. (line 19) +* \textnormal: Font Specifiers. (line 49) +* \textrm: Editing Facilities. (line 84) +* \textrm <1>: Font Specifiers. (line 31) +* \textsc: Editing Facilities. (line 93) +* \textsc <1>: Font Specifiers. (line 40) +* \textsf: Editing Facilities. (line 87) +* \textsf <1>: Font Specifiers. (line 34) +* \textsl: Editing Facilities. (line 81) +* \textsl <1>: Font Specifiers. (line 28) +* \textsw: Font Specifiers. (line 46) +* \texttt: Editing Facilities. (line 90) +* \texttt <1>: Font Specifiers. (line 37) +* \textulc: Font Specifiers. (line 43) +* Abbreviations: Mathematics. (line 6) +* Adding a style hook: Simple Style. (line 6) +* Adding bibliographies: Adding Other. (line 6) +* Adding environments: Adding Environments. (line 6) +* Adding labels: Adding Other. (line 6) +* Adding macros: Adding Macros. (line 6) +* Adding other information: Adding Other. (line 6) +* Adding support for completion of package/class options: Adding Other. + (line 6) +* Adding to PATH in Windows: Installation under MS Windows. + (line 42) +* align.el: Indenting. (line 58) +* amsmath: Equations. (line 6) +* amsmath <1>: Tabular-like. (line 6) +* Arguments to TeX macros: Completion. (line 6) +* ASCII pTeX: Internationalization. + (line 6) +* ASCII pTeX <1>: Japanese. (line 6) +* auctex.el: Loading the package. (line 10) +* auctex.el <1>: Changes. (line 841) +* auto directories.: Automatic. (line 6) +* auto-fill-mode: Indenting. (line 29) +* Auto-Reveal: Folding. (line 6) +* Automatic: Automatic. (line 6) +* Automatic Customization: Automatic. (line 6) +* Automatic Parsing: Parsing Files. (line 6) +* Automatic updating style hooks: Automatic Local. (line 6) +* Bad boxes: Debugging. (line 6) +* Biber: Selecting a Command. (line 47) +* biblatex: Selecting a Command. (line 47) +* Bibliographies, adding: Adding Other. (line 6) +* Bibliography: Commands. (line 6) +* bibliography, completion: Completion. (line 154) +* BibTeX: Commands. (line 6) +* BibTeX, completion: Completion. (line 154) +* book.el: Simple Style. (line 6) +* Braces: Quotes. (line 6) +* Brackets: Quotes. (line 6) +* Brazilian Portuguese: European. (line 51) +* Bulgarian: European. (line 51) +* Changing font: Font Specifiers. (line 6) +* Changing the parser: Hacking the Parser. (line 6) +* Chapters: Editing Facilities. (line 24) +* Chapters <1>: Sectioning. (line 6) +* Checking: Checking. (line 6) +* ChinaTeX: Internationalization. + (line 6) +* chktex: Checking. (line 6) +* citations, completion of: Completion. (line 154) +* cite, completion of: Completion. (line 154) +* CJK language: Internationalization. + (line 6) +* CJK-LaTeX: Internationalization. + (line 6) +* Cleaning: Cleaning. (line 6) +* Commands: Commands. (line 6) +* Completion: Completion. (line 6) +* Controlling the output: Control. (line 6) +* Copying: Copying. (line 6) +* Copyright: Copying. (line 6) +* CTeX: Internationalization. + (line 6) +* Current file: Control. (line 6) +* Customization: Customizing. (line 6) +* Customization, personal: Customizing. (line 6) +* Customization, site: Customizing. (line 6) +* Czech: European. (line 51) +* Danish: European. (line 51) +* Debugging: Debugging. (line 6) +* Default command: Commands. (line 6) +* Defining bibliographies in style hooks: Adding Other. (line 6) +* Defining environments in style hooks: Adding Environments. (line 6) +* Defining labels in style hooks: Adding Other. (line 6) +* Defining macros in style hooks: Adding Macros. (line 6) +* Defining other information in style hooks: Adding Other. (line 5) +* Deleting fonts: Editing Facilities. (line 96) +* Deleting fonts <1>: Font Specifiers. (line 52) +* Descriptions: Itemize-like. (line 6) +* Display math mode: Quotes. (line 6) +* Distribution: Copying. (line 6) +* Documentation: Documentation. (line 6) +* Documents: Multifile. (line 6) +* Documents with multiple files: Multifile. (line 6) +* Dollar signs, color bleed with: Known problems. (line 6) +* Dollars: Quotes. (line 6) +* Double quotes: Quotes. (line 6) +* Dutch: European. (line 51) +* English: European. (line 51) +* Enumerates: Itemize-like. (line 6) +* Environments: Environments. (line 6) +* Environments, adding: Adding Environments. (line 6) +* Eqnarray: Equations. (line 6) +* Equation: Equations. (line 6) +* Equations: Equations. (line 6) +* Errors: Debugging. (line 6) +* Europe: European. (line 6) +* European Characters: European. (line 6) +* Examining package/class options: Adding Other. (line 6) +* Example of a style file.: Simple Style. (line 6) +* Expansion: Completion. (line 6) +* External Commands: Commands. (line 6) +* Extracting TeX symbols: Automatic. (line 6) +* Faces: Faces. (line 6) +* FDL, GNU Free Documentation License: GNU Free Documentation License. + (line 6) +* Figure environment: Floats. (line 6) +* Figures: Floats. (line 6) +* Filling: Filling. (line 6) +* Finding errors: Checking. (line 6) +* Finding the current file: Control. (line 6) +* Finding the master file: Control. (line 6) +* Floats: Floats. (line 6) +* Flymake: Checking. (line 6) +* Folding: Folding. (line 6) +* Folding <1>: Outline. (line 6) +* Font Locking: Font Locking. (line 6) +* Font macros: Font Specifiers. (line 6) +* font-latex: Font Locking. (line 6) +* Fonts: Font Specifiers. (line 6) +* Formatting: Indenting. (line 6) +* Formatting <1>: Filling. (line 6) +* Formatting <2>: Commands. (line 6) +* Forward search: I/O Correlation. (line 6) +* Free: Copying. (line 6) +* Free software: Copying. (line 6) +* General Public License: Copying. (line 6) +* Generating symbols: Automatic. (line 6) +* German: European. (line 51) +* Global directories: Automatic Global. (line 6) +* Global macro directory: Automatic Global. (line 6) +* Global style hook directory: Automatic Global. (line 6) +* Global TeX macro directory: Automatic Global. (line 6) +* GPL: Copying. (line 6) +* Header: Commands. (line 6) +* Headers: Outline. (line 6) +* Hide Macros: Folding. (line 6) +* HLaTeX: Internationalization. + (line 6) +* I/O correlation: Processor Options. (line 36) +* I/O correlation <1>: I/O Correlation. (line 6) +* Including: Multifile. (line 6) +* Indentation: Indenting. (line 6) +* Indenting: Indenting. (line 6) +* Indexing: Commands. (line 6) +* init.el: Loading the package. (line 6) +* Initialization: Customizing. (line 6) +* input method: Mathematics. (line 73) +* Inputing: Multifile. (line 6) +* Installation: Build/install and uninstall. + (line 6) +* Internationalization: Internationalization. + (line 6) +* Inverse search: I/O Correlation. (line 6) +* ISO 8859 Latin 1: European. (line 6) +* ISO Character set: European. (line 6) +* iso-cvt.el: European. (line 29) +* ispell: Selecting a Command. (line 74) +* ispell <1>: European. (line 38) +* Italian: European. (line 51) +* Itemize: Itemize-like. (line 6) +* Items: Itemize-like. (line 6) +* Japan: Japanese. (line 6) +* Japanese: Japanese. (line 6) +* jLaTeX: Japanese. (line 6) +* jTeX: Internationalization. + (line 6) +* jTeX <1>: Japanese. (line 6) +* Killing a process: Control. (line 6) +* kTeX: Internationalization. + (line 6) +* Label prefix: Sectioning. (line 111) +* Label prefix <1>: Floats. (line 32) +* Labels: Sectioning. (line 111) +* Labels <1>: Floats. (line 32) +* Labels, adding: Adding Other. (line 6) +* labels, completion of: Completion. (line 154) +* lacheck: Checking. (line 6) +* Language Support: Internationalization. + (line 6) +* LaTeX: Commands. (line 6) +* Latin 1: European. (line 5) +* License: Copying. (line 6) +* Literature: Commands. (line 6) +* Local style directory: Automatic Local. (line 6) +* Local style hooks: Automatic Local. (line 6) +* Local style hooks <1>: Automatic Local. (line 6) +* Macro arguments: Completion. (line 6) +* Macro completion: Completion. (line 6) +* Macro expansion: Completion. (line 6) +* macro.el: Hacking the Parser. (line 6) +* macro.tex: Hacking the Parser. (line 6) +* Macros, adding: Adding Macros. (line 6) +* Make: Build/install and uninstall. + (line 6) +* makeindex: Commands. (line 6) +* Making a bibliography: Commands. (line 6) +* Making an index: Commands. (line 6) +* Many Files: Multifile. (line 6) +* Master file: Control. (line 6) +* Master file <1>: Multifile. (line 6) +* Matching dollar signs: Quotes. (line 6) +* Math mode delimiters: Quotes. (line 6) +* Math, fontification of: Fontification of math. + (line 6) +* Math, fontification problems with: Known problems. (line 6) +* Mathematics: Mathematics. (line 6) +* Multifile Documents: Multifile. (line 6) +* Multiple Files: Multifile. (line 6) +* Next error: Debugging. (line 6) +* Nippon: Japanese. (line 6) +* NTT jTeX: Internationalization. + (line 6) +* NTT jTeX <1>: Japanese. (line 6) +* Other information, adding: Adding Other. (line 6) +* Outlining: Folding. (line 6) +* Outlining <1>: Outline. (line 6) +* Output: Control. (line 6) +* Overfull boxes: Debugging. (line 6) +* Overview: Outline. (line 6) +* package/class options, Examining: Adding Other. (line 6) +* Parsing errors: Debugging. (line 6) +* Parsing LaTeX errors: Debugging. (line 6) +* Parsing new macros: Hacking the Parser. (line 6) +* Parsing TeX: Parsing Files. (line 6) +* Parsing TeX <1>: Automatic. (line 6) +* Parsing TeX output: Debugging. (line 6) +* PATH in Windows: Installation under MS Windows. + (line 42) +* PDF mode: Processor Options. (line 16) +* PDFSync: Processor Options. (line 36) +* PDFSync <1>: I/O Correlation. (line 6) +* Personal customization: Customizing. (line 6) +* Personal information: Automatic Private. (line 6) +* Personal macro directory: Automatic Private. (line 6) +* Personal TeX macro directory: Automatic Private. (line 6) +* pLaTeX: Japanese. (line 6) +* Polish: European. (line 51) +* Portuguese: European. (line 51) +* Prefix for labels: Sectioning. (line 111) +* Prefix for labels <1>: Floats. (line 32) +* preview-install-styles: Configure. (line 85) +* Previewing: Viewing. (line 6) +* Printing: Commands. (line 6) +* Private directories: Automatic Private. (line 6) +* Private macro directory: Automatic Private. (line 6) +* Private style hook directory: Automatic Private. (line 6) +* Private TeX macro directory: Automatic Private. (line 6) +* Problems: Checking. (line 6) +* Processes: Control. (line 6) +* pTeX: Internationalization. + (line 6) +* pTeX <1>: Japanese. (line 6) +* Quotes: Quotes. (line 6) +* Quotes, fontification of: Fontification of quotes. + (line 6) +* Redisplay output: Control. (line 6) +* Refilling: Filling. (line 6) +* Reformatting: Indenting. (line 6) +* Reformatting <1>: Filling. (line 6) +* Region: Commands. (line 6) +* Region file: Commands. (line 6) +* Reindenting: Indenting. (line 6) +* Reveal: Folding. (line 6) +* Right: Copying. (line 6) +* Running BibTeX: Commands. (line 6) +* Running chktex: Checking. (line 6) +* Running commands: Commands. (line 6) +* Running Flymake: Checking. (line 6) +* Running lacheck: Checking. (line 6) +* Running LaTeX: Commands. (line 6) +* Running makeindex: Commands. (line 6) +* Running TeX: Commands. (line 6) +* Sample style file: Simple Style. (line 6) +* Sectioning: Editing Facilities. (line 24) +* Sectioning <1>: Sectioning. (line 6) +* Sectioning commands, fontification of: Fontification of macros. + (line 91) +* Sections: Editing Facilities. (line 24) +* Sections <1>: Sectioning. (line 6) +* Sections <2>: Outline. (line 6) +* Setting the default command: Commands. (line 6) +* Setting the header: Commands. (line 6) +* Setting the trailer: Commands. (line 6) +* Site customization: Customizing. (line 6) +* Site information: Automatic Global. (line 6) +* Site initialization: Customizing. (line 6) +* Site macro directory: Automatic Global. (line 6) +* Site TeX macro directory: Automatic Global. (line 6) +* Slovak: European. (line 51) +* Source specials: Processor Options. (line 36) +* Source specials <1>: I/O Correlation. (line 6) +* Specifying a font: Font Specifiers. (line 6) +* Starting a previewer: Viewing. (line 6) +* Stopping a process: Control. (line 6) +* Style: Checking. (line 6) +* style: Style Files. (line 6) +* Style file: Simple Style. (line 6) +* Style files: Style Files. (line 6) +* Style hook: Simple Style. (line 6) +* Style hooks: Style Files. (line 6) +* subscript: Mathematics. (line 64) +* Subscript, fontification of: Fontification of math. + (line 6) +* superscript: Mathematics. (line 64) +* Superscript, fontification of: Fontification of math. + (line 6) +* support for completion of package/class options, Adding: Adding Other. + (line 6) +* Swedish: European. (line 51) +* Symbols: Mathematics. (line 6) +* SyncTeX: Processor Options. (line 36) +* SyncTeX <1>: I/O Correlation. (line 6) +* Syntax Highlighting: Font Locking. (line 6) +* Tabify: Parsing Files. (line 6) +* Table environment: Floats. (line 6) +* Tables: Floats. (line 6) +* Tabs: Parsing Files. (line 6) +* TeX: Commands. (line 6) +* TeX parsing: Automatic. (line 6) +* tex-jp.el: Japanese. (line 6) +* tex-mik.el: Installation under MS Windows. + (line 252) +* tex-site.el: Loading the package. (line 10) +* tex-site.el <1>: Customizing. (line 6) +* tex-site.el <2>: Changes. (line 841) +* tool bar, toolbar: Processing. (line 11) +* Trailer: Commands. (line 6) +* Underfull boxes: Debugging. (line 6) +* Uninstallation: Build/install and uninstall. + (line 6) +* Untabify: Parsing Files. (line 6) +* Updating style hooks: Automatic Local. (line 6) +* upLaTeX: Japanese. (line 6) +* upTeX: Internationalization. + (line 6) +* upTeX <1>: Japanese. (line 6) +* Verbatim, fontification of: Verbatim content. (line 6) +* Viewer predicates: Adding Other. (line 6) +* Viewing: Viewing. (line 6) +* Warranty: Copying. (line 6) +* Writing to a printer: Commands. (line 6) +* X-Symbol: European. (line 32) + + + +Tag Table: +Node: Top917 +Node: Copying7373 +Node: Introduction9318 +Node: Summary9588 +Node: Installation12321 +Node: Prerequisites14294 +Node: Configure16493 +Node: Build/install and uninstall21071 +Node: Loading the package21824 +Node: Advice for package providers23517 +Node: Advice for non-privileged users26322 +Node: Installation under MS Windows31668 +Node: Customizing45290 +Node: Quick Start46875 +Ref: Quick Start-Footnote-148996 +Node: Editing Facilities49090 +Node: Processing Facilities53785 +Node: Editing58514 +Node: Quotes59844 +Node: Font Specifiers68284 +Node: Sectioning70352 +Node: Environments74871 +Node: Equations80024 +Node: Floats80616 +Node: Itemize-like82620 +Node: Tabular-like83342 +Node: Customizing Environments85115 +Node: Mathematics85355 +Node: Completion88791 +Node: Marking95822 +Node: Marking (LaTeX)96446 +Node: Marking (Texinfo)97388 +Node: Commenting98999 +Node: Indenting100324 +Node: Filling108018 +Node: Display113888 +Node: Font Locking116383 +Node: Fontification of macros118462 +Node: Fontification of quotes127978 +Node: Fontification of math129472 +Node: Verbatim content133140 +Node: Faces133914 +Node: Known problems134411 +Node: Folding135408 +Node: Outline146181 +Node: Narrowing147460 +Node: Prettifying148529 +Node: Processing149766 +Node: Commands151094 +Node: Starting a Command151650 +Node: Selecting a Command156666 +Node: Processor Options165785 +Node: Viewing176178 +Node: Starting Viewers176552 +Node: I/O Correlation182202 +Ref: I/O Correlation-Footnote-1187878 +Node: Debugging188128 +Node: Ignoring warnings190746 +Node: Error overview192805 +Node: Checking194713 +Node: Control196329 +Node: Cleaning198438 +Node: Documentation199797 +Node: Customization200512 +Node: Modes and Hooks201005 +Node: Multifile202893 +Node: Parsing Files207625 +Node: Internationalization212614 +Node: European213962 +Node: Japanese221441 +Node: Automatic226505 +Node: Automatic Global228996 +Node: Automatic Private230128 +Node: Automatic Local231464 +Node: Style Files232495 +Node: Simple Style233301 +Node: Adding Macros237022 +Node: Adding Environments246521 +Node: Adding Other251185 +Node: Hacking the Parser255785 +Node: Appendices259774 +Node: Copying this Manual260070 +Node: GNU Free Documentation License260953 +Node: Changes286073 +Node: Development340925 +Node: Mid-term Goals341571 +Node: Wishlist343539 +Node: Bugs349299 +Node: FAQ350379 +Node: Texinfo mode356099 +Node: Exploiting357233 +Node: Superseding358051 +Node: Mapping362282 +Node: Unbinding364117 +Node: Indices364938 +Node: Key Index365101 +Node: Function Index372630 +Node: Variable Index384608 +Node: Concept Index409749 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/auctex-13.1.3/bib-cite.el b/elpa/auctex-13.1.3/bib-cite.el new file mode 100644 index 0000000..a640504 --- /dev/null +++ b/elpa/auctex-13.1.3/bib-cite.el @@ -0,0 +1,2337 @@ +;; bib-cite.el - Display \cite, \ref or \label / Extract refs from BiBTeX file. -*- lexical-binding: t; -*- + +;; Copyright (C) 1994-1999, 2001, 2003-2005, 2014-2022 Free Software Foundation, Inc. + +;; Author: Peter S. Galbraith <psg@debian.org> +;; Created: 06 July 1994 +;; Version: 3.28 (Feb 23 2005) +;; Keywords: bibtex, cite, auctex, emacs + +;;; This file is not part of GNU Emacs. + +;; This package is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This package is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;; LCD Archive Entry: +;; bib-cite|Peter Galbraith|GalbraithP@dfo-mpo.gc.ca| +;; Display \cite, \ref or \label / Extract refs from BiBTeX file.| +;; 21-May-1997|3.01|~/misc/bib-cite.el.gz| + +;; ---------------------------------------------------------------------------- +;;; Commentary: +;; This minor-mode is used in various TeX modes to display or edit references +;; associated with \cite commands, or matching \ref and \label commands. + +;; New versions of this package (if they exist) may be found at: +;; https://people.debian.org/~psg/elisp/bib-cite.el +;; and in AUCTeX's Git archive at +;; https://git.savannah.gnu.org/cgit/auctex.git + +;; Operating Systems: +;; Works in unix, DOS and OS/2. Developped under Linux. + +;; AUCTeX users: +;; AUCTeX is a super-charged LaTeX mode for emacs. Get it at: +;; +;; https://ftp.gnu.org/pub/gnu/auctex/ +;; +;; WWW users may want to check out the AUCTeX page at +;; https://www.gnu.org/software/auctex/ +;; +;; bib-cite.el is included in the AUCTeX distribution. Therefore, if +;; you use AUCTeX and didn't obtained bib-cite.el separately, make sure +;; that you are actually using the more recent version. + +;; RefTeX users: +;; RefTeX is a package with similar functions to bib-cite. +;; http://www.astro.uva.nl/~dominik/Tools/reftex/ +;; RefTeX is bundled and preinstalled with Emacs since version 20.2. +;; It was also bundled with XEmacs 19.16--20.x. +;; +;; I suggest that you use RefTeX to help you type-in text as it's functions +;; are better suited to this task than bib-cite, and use bib-cite's features +;; when you proof-read the text. +;; If you wish bib-cite to use RefTeX's reftex-view-crossref command to +;; display and find \label's and \cite bibliography entries, set the variable +;; bib-cite-use-reftex-view-crossref to t. + +;; MS-DOS users: +;; Multifile documents are supported by bib-cite by using etags (TAGS files) +;; which contains a bug for MSDOS (at least for emacs 19.27 it does). +;; Get the file +;; https://people.debian.org/~psg/elisp/bib-cite.etags-bug-report +;; to see what patches to make to etags.c to fix it. + +;; Description: +;; ~~~~~~~~~~~ +;; This package is used in various TeX modes to display or edit references +;; associated with \cite commands, or matching \eqref, \ref and \label +;; commands (so I actually overstep BiBTeX bounds here...). +;; +;; These are the functions: +;; +;; bib-display bib-display-mouse +;; - Display citation, \ref or \label under point +;; bib-find bib-find-mouse +;; - Edit citation, \ref or \label under point +;; bib-find-next - Find next occurrence of a \ref or \eqref +;; bib-make-bibliography - Make BiBTeX file containing only cite keys used. +;; bib-apropos - Search BiBTeX source files for keywords. +;; bib-etags - Refreshes (or builds) the TAGS files for +;; multi-file documents. +;; bib-create-auto-file - Used in bibtex-mode to create cite key +;; completion .el file for AUCTeX. +;; bib-highlight-mouse - Highlight \cite, \ref and \label commands in +;; green when the mouse is over them. + +;; About Cite Commands and related functions: +;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +;; Various flavors of \cite commands are allowed (as long as they contain +;; the word `cite') and they may optionally have bracketed [] options. +;; Bibtex Cross-references are displayed, and @string abbreviations are +;; substituted or included. +;; +;; The \cite text is found (by emacs) in the bibtex source files listed in the +;; \bibliography command. The BiBTeX files can be located in a search path +;; defined by an environment variable (typically BIBINPUTS, but you can change +;; this). +;; +;; All citations used in a buffer can also be listed in a new bibtex buffer by +;; using bib-make-bibliography. This is useful to make a bibtex file for a +;; document from a large bibtex database. In this case, cross-references are +;; included, as well as the @string commands used. The @string abbreviations +;; are not substituted. +;; +;; The bibtex files can also be searched for entries matching a regular +;; expression using bib-apropos. + +;; Usage instructions: +;; ~~~~~~~~~~~~~~~~~~ +;; bib-display Bound to Mouse-3 when specially highlighted. +;; In Hyperbole, bound to the Assist key. +;; Bound to `\C-c b d' +;; +;; bib-display will show the bibtex entry or the corresponding label or +;; ref commands from anywhere within a document. +;; With cursor on the \cite command itslef +;; -> display all citations of the cite command from the BiBTeX source. +;; With cursor on a particular cite key within the brackets +;; -> display that citation's text from the BiBTeX source file(s). +;; +;; Example: +;; +;; \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94} +;; ^Cursor -> Display-all-citations ^Cursor -> Display-this-citation +;; +;; With cursor on a \label command +;; -> Display first matching \ref command in the document +;; With cursor on a \ref command +;; -> Display environment associated with the matching \label command. +;; +;; Finding a ref or label within a multi-file document requires a TAGS file, +;; which is automatically generated for you. This enables you to then use +;; any tags related emacs features. +;; +;; bib-find Bound to Mouse-2 when specially highlighted. +;; In Hyperbole, bound to the Action key. +;; Bound to `\C-c b f' +;; +;; bib-find will select the buffer and move point to the BiBTeX source file +;; at the proper citation for a cite command, or move point to anywhere +;; within a document for a label or ref command. The ref chosen is the +;; first occurrance within a document (using a TAGS file). If point is +;; moved within the same buffer, mark is set before the move and a message +;; stating so is given. If point is moved to another file, this is done in +;; a new window using tag functions. +;; +;; The next occurrence of a \ref or \eqref command may be found by invoking +;; bib-find-next, usually bound to `C-c b n'. +;; +;; For multi-file documents, you must be using AUCTeX (so that bib-cite can +;; find the master file) and all \input and \include commands must be first +;; on a line (not preceeded by any non-white text). +;; +;; bib-make-bibliography: Bound to `\C-c b m' +;; +;; Extract citations used in the current document from the \bibliography{} +;; file(s). Put them into a new suitably-named buffer. In a AUCTeX +;; multi-file document, the .aux files are used to find the cite keys (for +;; speed). You will be warned if these are out of date. +;; +;; This buffer is not saved to a file. It is your job to save it to whatever +;; name you wish. Note that AUCTeX has a unique name space for LaTeX and +;; BiBTeX files, so you should *not* name the bib file associated with +;; example.tex as example.bib! Rather, name it something like +;; example-bib.bib. +;; +;; bib-apropos: Bound to `\C-c b a' +;; +;; Searches the \bibliography{} file(s) for entries containing a keyword and +;; display them in the *help* buffer. You can trim down your search by using +;; bib-apropos in the *Help* buffer after the first invocation. the current +;; buffer is also searched for keyword matches if it is in bibtex-mode. +;; +;; It doesn't display cross-references nor does it substitute or display +;; @string commands used. It could easily be added, but it's faster this +;; way. Drop me a line if this would be a useful addition. +;; +;; If you find yourself entering a cite command and have forgotten which key +;; you want, but have entered a few initial characters as in `\cite{Gal', +;; then invoke bib-apropos. It will take that string (in this case `Gal') as +;; an initial response to the apropos prompt. You are free to edit it, or +;; simply press carriage return. +;; +;; bib-etags: Bound to `\C-c b e' +;; +;; Creates a TAGS file for AUCTeX's multi-file document (or refreshes it). +;; This is used by bib-find when editing multi-file documents. The TAGS file +;; is created automatically, but it isn't refreshed automatically. So if +;; bib-find can't find something, try running bib-etags again. +;; +;; bib-create-auto-file: +;; +;; Use this when editing a BiBTeX buffer to generate the AUCTeX .el file +;; which tell emacs about all its cite keys. I've added this command to +;; bibtex-mode pull-down menu. +;; +;; bib-highlight-mouse: Bound to `\C-c b h' +;; +;; Highlights \cite, \ref and \label commands in green when the mouse is over +;; them. By default, a call to this function is added to LaTeX-mode-hook +;; (via bib-cite-initialize) if you set bib-highlight-mouse-t to true. But +;; you may want to run this command to refresh the highlighting for newly +;; edited text. + +;; Installation instructions: +;; ~~~~~~~~~~~~~~~~~~~~~~~~~ +;; bib-cite is a minor-mode, so you could invoke it in a LaTeX-mode hook. +;; e.g. If you are using AUCTeX (https://www.gnu.org/software/auctex/), you +;; could use: +;; +;; (autoload 'turn-on-bib-cite "bib-cite") +;; (add-hook 'LaTeX-mode-hook 'turn-on-bib-cite) +;; +;; If you are using Emacs' regular LaTeX-mode, use instead: +;; +;; (autoload 'turn-on-bib-cite "bib-cite") +;; (add-hook 'latex-mode-hook 'turn-on-bib-cite) +;; +;; bib-cite can be used with AUCTeX, or stand-alone. If used with AUCTeX on a +;; multi-file document (and AUCTeX's parsing is used), then all \bibliography +;; commands in the document will be found and used. +;; --- +;; The following variable can be unset (like shown) to tell bib-cite to +;; not give advice messages about which commands to use to find the next +;; occurrence of a search: +;; +;; (setq bib-novice nil) +;; --- +;; If you wish bib-cite to use RefTeX's reftex-view-crossref command to +;; display and find \label's and \cite bibliography entries, set the variable +;; bib-cite-use-reftex-view-crossref to t: +;; +;; (setq bib-cite-use-reftex-view-crossref t) +;; --- +;; The following variable determines whether we will attempt to highlight +;; citation, ref and label commands in green when they are under the +;; mouse. When highlighted, the mouse keys work to call bib-display +;; (bound to [mouse-3]) and bib-find (bound to [mouse-2]). If you use a +;; mode other than LaTeX-mode, you'll want to call bib-highlight-mouse with +;; a hook (See how we do this at the end of this file with the add-hook +;; command). +;; +;; (setq bib-highlight-mouse-t nil) +;; --- +;; The variable bib-switch-to-buffer-function sets the function used to +;; select buffers (if they differ from the original) in bib-cite commands +;; bib-make-bibliography, bib-display, bib-find +;; You may use `switch-to-buffer' `switch-to-buffer-other-window' or +;; `switch-to-buffer-other-frame'. +;; --- +;; If you use DOS or OS/2, you may have to set the following variable: +;; +;; (setq bib-dos-or-os2-variable t) +;; +;; if bib-cite.el fails to determine that you are using DOS or OS/2. +;; Try `C-h v bib-dos-or-os2-variable' to see if it needs to be set manually. +;; --- +;; bib-cite needs to call the etags program with its output file option +;; and also with the append option (usually -a). +;; I figured that DOS and OS/2 would use "etags /o=" instead of the unix +;; variant "etags -o ", but users have reported differently. So while the +;; unix notation is used here, you can reset it if you need to like so: +;; +;; (setq bib-etags-command "etags /r='/.*\\\(eq\|page\|[fvF]\)ref.*/' /o=") +;; (setq bib-etags-append-command +;; "etags /r='/.*\\\(eq\|page\|[fvF]\)ref.*/' /a /o=") +;; --- +;; For multi-file documents, a TAGS file is generated by etags. +;; By default, its name is TAGS. You can change this like so: +;; +;; (setq bib-etags-filename "TAGSLaTeX") +;; --- +;; If your environment variable to find BiBTeX files is not BIBINPUTS, then +;; reset it with the following variable (here, assuming it's TEXBIB instead): +;; +;; (setq bib-bibtex-env-variable "TEXBIB") +;; +;; Note that any directory ending in a double slash will cause bib-cite to +;; search recursively through subdirectories for your .bib files. This can +;; be slow, so use this judiciously. +;; e.g. setenv BIBINPUTS .:/home/psg/LaTeX/bibinputs// +;; -> all directories below /home/psg/LaTeX/bibinputs/ will be +;; searched. +;; +;; If your bibtex setup works but Emacs can't see the environment variable +;; correctly (Check `C-h v process-environment'), then customize the +;; variable `bib-cite-inputs' (e.g. `M-x customize-variable bib-cite-imputs') +;; +;; --- +;; If you do not wish bib-display to substitute @string abbreviations, +;; then set the following variable like so: +;; +;; (setq bib-substitute-string-in-display nil) +;; --- +;; Warnings are given when @string abbreviations are not defined in your bib +;; files. The exception is for months, usually defined in style files. If you +;; use other definitions in styles file (e.g. journals), then you may add them +;; to the `bib-substitute-string-in-display' list variable. + +;; If you find circumstances in which this package fails, please let me know. + +;; Things for me to do in later versions: +;; - treat @Strings correctly, not just in isolation. +;; - use `kpsewhich -expand-path='$BIBINPUTS'` instead of BIBINPUTS. +;; - jmv@di.uminho.pt (Jose Manuel Valenca) wants: +;; - prompt for \cite as well as \label and \ref +;; (and use AUCTeX's completion list) +;; - implement string concatenation, with #[ \t\n]*STRING_NAME +;; - Create new command to substitute @string text in any bibtex buffer. +;; ---------------------------------------------------------------------------- +;;; Change log: +;; V3.28 Feb 23 2005 - Ralf Angeli +;; - Some doc fixes in the commentary section. +;; V3.27 Feb 09 2005 - PSG +;; - Patch from Peter Heslin. TeX-master can now have symbol values. +;; V3.26 Aug 06 2004 - Reiner Steib +;; - Changed URL of AUCTeX. Use "AUCTeX", not "auc-tex" (skipped Change log). +;; V3.25 Feb 15 2004 - PSG +;; - Check existence of font-lock-unset-defaults; no longer defined in CVS +;; Emacs. Thanks to Adrian Lanz for reporting the problem. +;; V3.24 Oct 28 2003 - PSG +;; - bib-cite-file-directory-p: new function to replace ff-paths code. +;; V3.23 Oct 09 2003 - PSG +;; - some checkdoc cleanup; not yet complete. +;; V3.22 Sep 17 2003 - PSG +;; - bib-cite-aux-inputs: new defcustom. +;; - minor cleanup for `match-string'. +;; V3.21 Sep 08 2003 - PSG +;; - Ripping out off-topic imenu code. +;; V3.20 Aug 14 2003 - PSG +;; - psg-checkfor-file-list: Allow for relative directoties as entries in +;; BIBINPUTS. +;; - bib-cite-inputs: new defcustom equivalent to BIBINPUTS. +;; - bib-label-help-echo-format: fixed defcustom. +;; - psg-list-env: code cleanup. +;; - trailing whitespace cleanup. +;; V3.19 Apr 06 2003 - PSG +;; Remove code that ran when defcustom not present. +;; Remove hilit19 obsolete code. +;; V3.18 Mar 27 2003 - Bruce Ravel <ravel@phys.washington.edu> +;; Play well with the varioref and fancyref latex styles (vref, fref, Fref). +;; V3.17 May 01 2001 - (RCS V1.38) +;; - XEmacs has imenu after all. +;; V3.16 Dec 20 99 - (RCS V1.37) +;; - Added customize support. +;; V3.15 Dec 20 99 - (RCS V1.36) +;; - Removed stupid debugging code that I had left in. +;; V3.14 Dec 20 99 - +;; - New variable bib-ref-regexp for \ref regexp to match \label constructs +;; and added \pageref. (RCS V1.34) +;; - Edited bib-etags-command snd bib-etags-append-command to match. +;; V3.13 Dec 20 99 - (RCS V1.32) +;; - License changed to GPL. +;; - Kai Engelhardt <ke@socs.uts.edu.au> bib-master-file takes .ltx extension +;; - imenu--create-LaTeX-index-for-document and bib-document-TeX-files +;; edited to accept .ltx extension. +;; - Michael Steiner <steiner@cs.uni-sb.de> added journals to @string +;; abbrevs and contributed `member-cis' to complaces @strings in a +;; case-insensitive manner. +;; V3.12 Dec 10 98 - Bruce Ravel <bruce.ravel@nist.gov> (RCS V1.30) +;; Fixed bib-label-help. +;; V3.11 Oct 06 98 - PSG (RCS V1.29) +;; Quote \ character fot replace-match; +;; Applies to: @String{JGR = "J. Geophys.\ Res."} +;; V3.10 Sep 21 98 - Matt Hodges <mph1002@cam.ac.uk> (RCS V1.28) +;; Removed instance of expand-file-name due to new behaviour in Emacs-20.3. +;; V3.09 Sep 09 98 - PSG (RCS V1.27) +;; Added support for \eqref; Added bib-find-next. +;; V3.08 Aug 20 98 - PSG (RCS V1.26) +;; Fixed imenu bug (prev-pos (point-max)) +;; V3.07 Nov 20 97 - Christoph Wedler <wedler@fmi.uni-passau.de> (RCS V1.24) +;; bib-ext-list variable made permanent-local, otherwise VC registration +;; would use two extents for each reference etc. This was not a visible bug. +;; V3.06 Nov 12 97 - PSG (RCS V1.23) +;; Support use of reftex's reftex-view-crossref command. +;; V3.05 Nov 12 97 - Vladimir Alexiev <vladimir@cs.ualberta.ca> (RCS V1.22) +;; regexp-quote the bibliography keys so a key like galbraith+kelley97 works +;; V3.04 Aug 25 97 - Christoph Wedler <wedler@fmi.uni-passau.de> (RCS V1.20) +;; (bib-highlight-mouse): Would bug out on detached extents, +;; e.g. when killing a whole citation. +;; V3.03 Jul 16 97 - Christoph Wedler <wedler@fmi.uni-passau.de> (RCS V1.18) +;; turn-on-bib-cite back to non-interactive. +;; V3.02 Jul 11 97 - Christoph Wedler <wedler@fmi.uni-passau.de> (RCS V1.17) +;; * auctex/bib-cite.el (turn-on-bib-cite): Make interactive. +;; Argument to `bib-cite-minor-mode' is 1. +;; (bib-label-help-echo-format): New variable. +;; (bib-label-help-echo): New function. +;; (bib-label-help): Addition argument format. +;; (bib-highlight-mouse): Set extent property `help-echo' for XEmacs. +;; V3.01 May 22 97 - Diego Calvanese <calvanes@dis.uniroma1.it> (RCS V1.16) +;; bib-make-bibliography handles commas separated citations in aux files. +;; V3.00 May 16 97 - Peter Galbraith (RCS V1.15) +;; bib-cite is now a minor mode. +;; V2.32 Apr 30 97 - Anders Stenman <stenman@isy.liu.se> (RCS V1.14) +;; - Support for balloon-help. +;; V2.31 Mar 20 97 - Christoph Wedler <wedler@fmi.uni-passau.de> (RCS V1.12) +;; - Better fontification of help buffer as bibtex or latex for XEmacs. +;; V2.30 Feb 10 97 - Peter Galbraith (RCS V1.11) +;; - Better fontification of help buffer as bibtex or latex. +;; V2.29 Jan 29 97 - Peter Galbraith (RCS V1.10) +;; - imenu looks for `\label{stuff}' instead of `\label' +;; V2.28 Jan 22 97 - Peter Galbraith (RCS V1.9) +;; - Bug in bib-create-auto-file. +;; V2.27 Dec 31 96 - Peter Galbraith (RCS V1.8) +;; - allow spaces between cite keys. +;; - Vladimir Alexiev <vladimir@cs.ualberta.ca> +;; Allow () delimiters as well as {}. +;; Better check on bibtex-menu +;; Erase *bibtex-bibliography* buffer. +;; V2.26 Sep 24 96 - Peter Galbraith (RCS V1.7) +;; imenu bug fix. +;; V2.25 Sep 23 96 - Anders Stenman <stenman@isy.liu.se> (RCS V1.6) +;; XEmacs bib-cite-fontify-help-as-latex bug fix. +;; V2.24 Aug 19 96 - Peter Galbraith (RCS V1.3) +;; XEmacs bug fix, minor defvars - Vladimir Alexiev <vladimir@cs.ualberta.ca> +;; V2.23 Aug 13 96 - Peter Galbraith (RCS V1.2) +;; XEmacs - Add bib-cite entries to bibtex-mode popup menu. +;; V2.22 July 22 96 - Peter Galbraith (RCS V1.1) +;; local-map has `m' for bib-make-bibliography instead of `b' +;; set-buffer-menubar in XEmacs so that menu disappears after use. +;; V2.21 July 12 96 - Peter Galbraith +;; Define `\C-c b' keymap for both plain tex and auctex, in XEmacs and emacs. +;; Separate menu-bar menu in gnu emacs. +;; font-lock support for bib-display'ed citations (bibtex fontification) +;; and for matching \ref{} and \labels (latex fontification). +;; buffer-substring-no-properties in bib-apropos +;; (bug in completing-read with mouse faces) +;; imenu-sort-function made local and nil. +;; imenu--LaTeX-name-and-position fixed for section name containing "\" +;; Various other things... (whitespace within label strings, etc...) +;; V2.20 June 25 96 - Peter Galbraith +;; imenu fixed for emacs-19.31. +;; V2.19 May 13 96 +;; PSG: +;; - @string substitution fixed; bib-edit-citation fixed when buffer exists; +;; Christoph Wedler <wedler@fmi.uni-passau.de>: +;; - Added bib-switch-to-buffer-function +;; - (setq tags-always-exact nil) for xemacs +;; - removed eval-after-load foe xemacs +;; V2.18 May 06 96 - PSG +;; New eval-after-load from Fred Devernay <Frederic.Devernay@sophia.inria.fr> +;; V2.17 May 03 96 - PSG +;; Fixed bug introduced in V2.16, reported by Dennis Dams <wsindd@win.tue.nl> +;; V2.16 May 02 96 - Vladimir Alexiev <vladimir@cs.ualberta.ca> +;; - somewhat compatible with Hyperbole by binding bib-find and bib-display to +;; the Action and Assist keys inside the bib-highlight-mouse-keymap. +;; - makes more liberal provisions for users with a tty. +;; V2.15 Apr 09 96 - +;; - fix "Buffer read-only" error caused by mouse-face text properties +;; patch by Piet van Oostrum <piet@cs.ruu.nl> +;; - Use tmm non-X menu, patch by Vladimir Alexiev <vladimir@cs.ualberta.ca> +;; - input{file.txt} would not work. +;; bug report: David Kastrup <dak@pool.informatik.rwth-aachen.de> +;; V2.14 Feb 26 96 - PSG - define eval-after-load for xemacs +;; Frederic Devernay's <Frederic.Devernay@sophia.inria.fr> suggestion. +;; V2.13 Feb 08 96 - Peter Galbraith - Fixed recursive use of bib-apropos. +;; V2.12 Jan 19 96 - Peter Galbraith +;; emacs-19.30's [down-mouse-1] is defined (rather than [mouse-1]), so +;; bib-highlight-mouse-keymap now has [down-mouse-1] defined to override it. +;; V2.11 Nov 21 95 - Peter Galbraith +;; - Fixed bib-create-auto-file when bib file loaded before LaTeX file. +;; - Michal Mnuk's better imenu labels menu <Michal.Mnuk@risc.uni-linz.ac.at> +;; - [mouse-1] and [mouse-2] key defs for highlighted regions. +;; - Improve X menus. +;; - Skip over style files in bib-document-TeX-files. +;; - Add menus and mouse highlighting for xemacs +;; Anders Stenman <stenman@isy.liu.se> Dima Barsky <D.Barsky@ee.surrey.ac.uk> +;; - Check bib-use-imenu before calling LaTeX-hook-setq-imenu. +;; From: Kurt Hornik <hornik@ci.tuwien.ac.at> +;; - Remove mouse face properties before inserting new ones. +;; From: Peter Whaite <peta@Whippet.McRCIM.McGill.EDU> +;; V2.10 Aug 17 95 - Peter Galbraith - fatal bugs in bib-make-bibliography. +;; V2.09 Jul 19 95 - Peter Galbraith +;; - Had introduced bug in search-directory-tree. synced with ff-paths.el. +;; V2.08 Jul 13 95 - Peter Galbraith +;; Fred Douglis <douglis@research.att.com> says etags should be required +;; V2.07 Jul 04 95 - Peter Galbraith +;; - Minor changes with filename manipulations (careful with DOS...) +;; - Problem if auc-tex not already loaded -> LaTeX-mode-map +;; V2.06 Jul 03 95 - Peter Galbraith - Added recursion through BIBINPUTS path. +;; V2.05 Jun 22 95 - Peter Galbraith Bug: Hanno Wirth <wirth@jake.igd.fhg.de> +;; bib-get-citations would truncate @String{KEY ="J. {\"u} Res."} +;; V2.04 Jun 19 95 - Peter Galbraith - +;; - use bibtex-mode syntax table in bib buffer, else bib-apropos truncates +;; an article if it contains an unbalanced closing parenthesis. +;; - bib-highlight-mouse would mark a buffer modified +;; V2.03 May 16 95 - Peter Galbraith - +;; auc-tec menu compatible with old "AUC TeX" pull-down name +;; V2.02 May 10 95 - Peter Galbraith - +;; bug report by Bodo Huckestein <bh@thp.Uni-Koeln.DE> (getenv env) under DOS +;; V2.01 Mar 27 95 - Peter Galbraith - No imenu on xemacs; check BIBINPUT also +;; V2.00 Mar 27 95 - Peter Galbraith +;; - bib-find and bib-display replace bib-edit-citation and +;; bib-display-citation +;; - bib-apropos now take initial guess from start of cite argument at point. +;; - Multi-file support for bib-make-bibliography using .aux files. +;; - \label and \ref functionality for bib-find and bib-display: +;; - \label may appear within an \begin\end or to label a (sub-)section. +;; - Cursor on \label, goto first \ref, set next i-search to pattern. +;; - Cursor on \ref, goto \label or display it's environment or section. +;; - Works on hidden code! +;; V1.08 Jan 16 95 - Peter Galbraith +;; bib-apropos can be used within *Help* buffer to trim a search. +;; V1.07 Dec 13 94 - Peter Galbraith +;; - Fixed: multi-line @string commands in non-inserted display. +;; - Fixed: quoted \ character in @string commands. +;; - BiBTeX comments should not affect bib-cite +;; - Fixed bib-apropos (from Christoph Wedler <wedler@fmi.uni-passau.de>) +;; Faster now, and avoids infinite loops. +;; - Added bib-edit-citation to edit a bibtex files about current citation. +;; - Allow space and newlines between citations: \cite{ entry1, entry2} +;; - Added bib-substitute-string-in-display, bib-string-ignored-warning +;; and bib-string-regexp. +;; - bib-display-citation (from Markus Stricker <stricki@vision.ee.ethz.ch>) +;; Could not find entry with trailing spaces +;; V1.06 Nov 20 94 - Peter Galbraith +;; - Fixed bib-apropos for: +;; hilighting without invoking bibtex mode. +;; display message when no matches found. +;; would search only last bib file listed (forgot to `goto-char 1') +;; - Fixed bib-make-bibliography that would only see first citation in a +;; multi-key \cite command (found by Michail Rozman <roz@physik.uni-ulm.de> +;; - bib-make-bibliography didn't see \cite[A-Z]* commands. +;; Found by Richard Stanton <stanton@haas.berkeley.edu> +;; ************************************************** +;; - * Completely rewritten code to support crossrefs * +;; ************************************************** +;; - autodetection of OS/2 and DOS for bib-dos-or-os2-variable +;; - Created bib-display-citation-mouse +;; - bib-apropos works in bibtex-mode on the current buffer +;; - bibtex entry may have comma on next line (!) +;; @ARTICLE{Kiryati-91 +;; , YEAR = {1991 } +;; ... +;; V1.05 Nov 02 94 - Peter Galbraith +;; - bug fix by rossmann@TI.Uni-Trier.DE (Jan Rossmann) +;; for (boundp 'TeX-check-path) instead of fboundp. Thanks! +;; - Translate environment variable set by bib-bibtex-env-variable. +;; (suggested by Richard Stanton <stanton@haas.berkeley.edu>) +;; - add bib-dos-or-os2-variable to set environment variable path separator +;; - Add key-defs for any tex-mode and auc-tex menu-bar entries. +;; [in auc-tec TeX-mode-map is common to both TeX and LaTeX at startup +;; (but TeX-mode-map is only copied to LaTeX-mode-map at initilisation) +;; in plain emacs, use tex-mode-map for both TeX and LaTeX.] +;; - Add key def for bibtex-mode to create auc-tex's parsing file. +;; - Fix bugs found by <thompson@loon.econ.wisc.edu> +;; - fix bib-get-citation for options +;; - fix bib-get-citation for commas preceeded citation command +;; - better regexp for citations and their keys. +;; - Added @string support for any entry (not just journal entries). +;; (I had to disallow numbers in @string keys because of years. +;; Is that ok?) +;; - added bib-apropos +;; V1.04 Oct 24 94 - Peter Galbraith +;; - Don't require dired-aux, rather define the function we need from it. +;; - Regexp-quote the re-search for keys. +;; - Name the bib-make-bibliography buffer diffently than LaTeX buffer +;; because auc-tex's parsing gets confused if same name base is used. +;; V1.03 Oct 24 94 - Peter Galbraith - require dired-aux for dired-split +;; V1.02 Oct 19 94 - Peter Galbraith +;; - If using auc-tex with parsing activated, use auc-tex's functions +;; to find all \bibliography files in a multi-file document. +;; - Find bib files in pwd, BIBINPUTS environment variable path and +;; TeX-check-path elisp variable path. +;; - Have the parser ignore \bibliography that is on a commented `%' line. +;; (patched by Karl Eichwalder <karl@pertron.central.de>) +;; - Allow for spaces between entry type and key in bib files: +;; (e.g @Article{ key} ) +;; (suggested by Nathan E. Doss <doss@ERC.MsState.Edu>) +;; - Allows options in \cite command (e.g. agu++ package \cite[e.g.][]{key}) +;; - Includes @String{} abbreviations for `journal' entries +;; V1.01 July 07 94 - Peter Galbraith - \bibliography command may have list of +;; BibTeX files. All must be readable. +;; V1.00 July 06 94 - Peter Galbraith - Created +;; ---------------------------------------------------------------------------- +;;; Code: + +(require 'tex) +(require 'latex) +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function reftex-view-crossref "ext:reftex-dcr" + (&optional arg auto-how fail-quietly)) + +(defgroup bib-cite nil + "bib-cite, LaTeX minor-mode to display \\cite, \\ref and \\label commands." + :group 'tex) + +(defcustom bib-cite-use-reftex-view-crossref nil + "Non-nil means, RefTeX will be used to find cross references. +When this variable is non-nil, both `bib-find' and `bib-display' will +call a function in RefTeX to find or display the cross reference of a +\\ref or \\cite macro at point." + :type 'boolean) + +(defcustom bib-novice t + "Give advice to novice users about what commands to use next." + :type 'boolean) + +(defcustom bib-switch-to-buffer-function #'switch-to-buffer + "Function used to select buffers if they differ from the original. +You may use `switch-to-buffer' `switch-to-buffer-other-window' or +`switch-to-buffer-other-frame'." + :type '(choice (function-item switch-to-buffer) + (function-item switch-to-buffer-other-window) + (function-item switch-to-buffer-other-frame))) + +(defcustom bib-highlight-mouse-t t + "Call bib-highlight-mouse from `LaTeX-mode-hook' to add green highlight." + :type 'boolean) + +(defcustom bib-bibtex-env-variable "BIBINPUTS" + "Environment variable setting the path where BiBTeX input files are found. +BiBTeX 0.99b manual says this should be TEXBIB. +Another version says it should BSTINPUTS. I don't know anymore! + +The colon character (:) is the default path separator in unix, but you may +use semi-colon (;) for DOS or OS/2 if you set `bib-dos-or-os2-variable' to t." + :type 'string) + +(defcustom bib-cite-inputs nil + "List of directories to search for .bib files. +This is in addition to those listed in the environment variable specified by +`bib-bibtex-env-variable'." + :type '(repeat (file :format "%v"))) + +(defcustom bib-cite-aux-inputs nil + "List of directories to search for .aux files. +MiKTeX has the LaTeX option -aux-directory to store .aux files in an alternate +directory. You may set this variable to let bib-cite find these .aux files." + :type '(repeat (file :format "%v"))) + +(defcustom bib-dos-or-os2-variable (or (equal 'emx system-type) + (equal 'ms-dos system-type)) + ;; Under OS/2 system-type equals emx + ;; Under DOS system-type equals ms-dos + "Whether you use DOS or OS/2 for bib-make-bibliography/bib-display. + +It tells `bib-make-bibliography' and `bib-display' to translate +the BIBINPUTS environment variable using the \";\" character as +a path separator and to translate DOS' backslash to slash. + +e.g. Use a path like \"c:\\emtex\\bibinput;c:\\latex\\bibinput\" + +\(You can change the environment variable which is searched by +setting the elisp variable `bib-bibtex-env-variable')" + :type 'boolean) + +(defcustom bib-etags-command "etags -r '/.*\\\\\\(eq\\|page\\|[fvF]\\)ref.*/' -o " + "Variable for the etags command and its output option. +In unix, this is usually \"etags -r '/.*\\\\\\(eq\\|page\\|[fvF]\\)ref.*/' -o \" +\(we use the -r option to tell etags to list AMS-LaTeX's \\eqref command.) +In DOS and OS/2, this *may* be different, e.g. using slashes like \"etags /o=\" +If so, set it this variable." + :type 'string) + +(defcustom bib-etags-append-command "etags -r '/.*\\\\\\(eq\\|page\\|[fvF]\\)ref.*/' -a -o " + "Variable for the etags command and its append and output option. +In unix, this is usually \"etags -r '/.*\\\\\\(eq\\|page\\|[fvF]\\)ref.*/' -a -o \" +In DOS and OS/2, this *may* be \"etags /a /o=\" If so, set it this variable." + :type 'string) + +(defcustom bib-etags-filename "TAGS" + "Variable for the filename generated by etags, by defaults this TAGS. +but you may want to change this to something like TAGSLaTeX such that it can +coexist with some other tags file in your master file directory." + :type 'string) + +(defcustom bib-ref-regexp "\\\\\\(eq\\|page\\|[fvF]\\)?ref" + "Regular expression for \\ref LaTeX commands that have a matching \\label. +without the curly bracket. + +If you change this variable and you use multi-file documents, make sure you +also edit the variables `bib-etags-command' and `bib-etags-append-command'." + :type 'regexp) + +(defcustom bib-substitute-string-in-display t + "Determines if `bib-display' will substitute @string definitions. +If t, then the @string text is substituted. +If nil, the text is not substituted but the @string entry is included." + :type 'boolean) + +(defcustom bib-string-ignored-warning + '("jan" "feb" "mar" "apr" "may" "jun" "jul" "aug" "sep" "sept" "oct" "nov" + "dec" "acmcs" "acta" "cacm" "ibmjrd" "ibmjs" "ieeese" "ieeetcad" + "ieeetc" "ipl" "jacm" "jcss" "scp" "sicomp" "tcs" "tocs" "tods" "tog" + "toms" "toois" "toplas" ) + "@string abbreviations for which a warning is not given if not defined. +These are usually month abbreviations (or journals) defined in a style file." + :type '(repeat (string :tag "Entry"))) + +;;<<<<<<User-Modifiable variables end here. + +(defvar bib-ref-regexpc (concat bib-ref-regexp "{") + "Regular expression for \\ref LaTeX commands that have a matching \\label. +A opening curly bracket is appended to the regexp.") + +(defvar bib-cite-minor-mode nil) + +(defvar bib-highlight-mouse-keymap (make-sparse-keymap) + "Keymap for mouse bindings in highlighted texts in bicite.") + +(defvar bib-cite-minor-mode-menu nil) + +;;;###autoload +(defun bib-cite-minor-mode (arg) + "Toggle bib-cite mode. +When bib-cite mode is enabled, citations, labels and refs are highlighted +when the mouse is over them. Clicking on these highlights with [mouse-2] +runs `bib-find', and [mouse-3] runs `bib-display'." + (interactive "P") + (set (make-local-variable 'bib-cite-minor-mode) + (if arg + (> (prefix-numeric-value arg) 0) + (not bib-cite-minor-mode))) + (cond + (bib-cite-minor-mode ;Setup the minor-mode + ;; Christoph Wedler's <wedler@fmi.uni-passau.de> suggestion for xemacs + ;; Added for version 2.19 + (if (boundp 'tags-always-exact) + (progn + (set (make-local-variable 'tags-always-exact) nil))) + ;; mouse overlay + (if bib-highlight-mouse-t + (progn + (bib-cite-setup-highlight-mouse-keymap) + (bib-highlight-mouse) + (add-hook 'after-change-functions + #'bib-cite-setup-mouse-function nil t)))) + (t + ;;;Undo the minor-mode + ;; mouse overlay + (remove-hook 'after-change-functions #'bib-cite-setup-mouse-function t) + (let ((before-change-functions) (after-change-functions)) + ;; FIXME This detroys all mouse-faces and local-maps! + ;; FIXME Hope no other package is using them in this buffer! + (remove-text-properties (point-min) (point-max) + '(mouse-face t local-map t)))))) + +;;This must be eval'ed when the LaTeX mode is in use. +;; bib-highlight-mouse-keymap is a local variable so each buffer can have it's +;; own. +(defun bib-cite-setup-highlight-mouse-keymap () + "Set up the bib-cite text in the current buffer to be clickable." + (set (make-local-variable 'bib-highlight-mouse-keymap) + ;; First, copy the local keymap so we don't have `disappearing' menus + ;; when the mouse is moved over a \ref, \label or \cite command. + + ;; FIXME: Check out (mouse-major-mode-menu) to see how it grabs the local + ;; menus to display. Maybe on `highlighted' commands we could + ;; only display the bib-cite stuff (or a subset of it). + (let ((m (copy-keymap (current-local-map)))) + (define-key m [down-mouse-3] #'bib-display-mouse) + (define-key m [mouse-2] #'bib-find-mouse) + m))) + +;;;###autoload +(defun turn-on-bib-cite () + "Unconditionally turn on Bib Cite mode." + (bib-cite-minor-mode 1)) + +(defun bib-cite-setup-mouse-function (beg end _old-len) + (save-excursion + (save-match-data + (save-restriction + (narrow-to-region + (progn (goto-char beg) (beginning-of-line) (point)) + (progn (goto-char end) (forward-line 1) (point))) + (bib-highlight-mouse))))) + +(defvar bib-cite-minor-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-cba" #'bib-apropos) + (define-key map "\C-cbb" #'bib-make-bibliography) + (define-key map "\C-cbd" #'bib-display) + (define-key map "\C-cbe" #'bib-etags) + (define-key map "\C-cbf" #'bib-find) + (define-key map "\C-cbn" #'bib-find-next) + (define-key map "\C-cbh" #'bib-highlight-mouse) + map) + "Bib-cite minor-mode keymap.") + +(easy-menu-define + bib-cite-minor-mode-menu bib-cite-minor-mode-map "Menu keymap for bib-cite." + '("BCite" + ["Make BibTeX bibliography buffer" bib-make-bibliography t] + ["Display citation or matching \\ref or \\label" bib-display t] + ["Find BibTeX citation or matching \\ref or \\label" bib-find t] + ["Search apropos BibTeX files" bib-apropos t] + ["Build TAGS file for multi-file document" bib-etags (bib-master-file)] + ["Refresh \\cite, \\ref and \\label mouse highlight" + bib-highlight-mouse t])) + +;; Install ourselves: +(or (assq 'bib-cite-minor-mode minor-mode-alist) + (setq minor-mode-alist + (cons '(bib-cite-minor-mode " BCite") minor-mode-alist))) +(or (assq 'bib-cite-minor-mode minor-mode-map-alist) + (setq minor-mode-map-alist + (cons (cons 'bib-cite-minor-mode bib-cite-minor-mode-map) + minor-mode-map-alist))) + + +;; Following from bibtex.el +(defvar + bib-cite-bibtex-font-lock-keywords + '(("^\\( \\|\t\\)*\\(@[A-Za-z]+\\)[ \t]*[({]\\([][A-Za-z0-9.:;?!`'()/*@_+=|<>-]+\\)?" + (2 font-lock-function-name-face) + (3 font-lock-reference-face nil t)) + ;; reference type and reference label + ("^[ \t]*\\(OPT[^\"#%'(),={} \t\n0-9][^\"#%'(),={} \t\n]*\\)[ \t]*=" + 1 font-lock-comment-face) + ;; optional field names (treated as comments) + ("^[ \t]*\\([^\"#%'(),={} \t\n0-9][^\"#%'(),={} \t\n]*\\)[ \t]*=" + 1 font-lock-variable-name-face) + ;; field names + "Default expressions to fontify in BibTeX mode.")) + +(defvar bib-cite-bibtex-mode-syntax-table + (let ((st (make-syntax-table))) + ;; [alarson:19920214.1004CST] make double quote a string quote + (modify-syntax-entry ?\" "\"" st) + (modify-syntax-entry ?$ "$$ " st) + (modify-syntax-entry ?% "< " st) + (modify-syntax-entry ?' "w " st) + (modify-syntax-entry ?@ "w " st) + (modify-syntax-entry ?\\ "\\" st) + (modify-syntax-entry ?\f "> " st) + (modify-syntax-entry ?\n "> " st) + (modify-syntax-entry ?~ " " st) + st)) +;; Code from bibtex.el ends + +;; @string starts with a letter and does not contain any of ""#%'(),={} +;; Here we do not check that the field contains only one string field and +;; nothing else. +(defvar bib-string-regexp + "^[, \t]*[a-zA-Z]+[ \t]*=[ \t]*\\([a-zA-Z][^#%'(),={}\" \t\n]*\\)" + "Regular expression for field containing a @string.") + +(defun bib-cite--kind () + (save-excursion + (if (not (looking-at "\\\\")) + (search-backward "\\" nil t)) + (if (looking-at bib-ref-regexpc) + 'ref + (if (looking-at "\\\\label{") + 'label + 'cite)))) + +(defun bib-display () + "Display BibTeX citation or matching \\ref or \\label command under point. + +If text under cursor is a \\cite command, then display its BibTeX info from +\\bibliography input file. + Example with cursor located over cite command or arguments: + \\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94} + ^Display-all-citations ^Display-this-citation + +If text under cursor is a \\ref command, then display environment associated +with its matching \\label command. + +If text under cursor is a \\label command, then display the text around +the first matching \\ref command. + +The user is prompted for a \\label or \\ref is nothing suitable is found under +the cursor. The first prompt is for a label. If you answer with an empty +string, a second prompt for a ref will be given. + +A TAGS file is created and used for multi-file documents under auctex." + (interactive) + (let ((kind (bib-cite--kind))) + (cond + ;; reftex doesn't handle label->ref + ((and bib-cite-use-reftex-view-crossref + (memq kind '(ref cite))) + ;;;FIXME: reftex doesn't want point on \ref or \cite part, but on keyword + (require 'reftex) + (reftex-view-crossref nil)) + ((eq kind 'cite) + (bib-display-citation)) + (t + (bib-display-label))))) + +(defun bib-find () + "Edit BibTeX citation or find matching \\ref or \\label command under point. + +For multi-entry cite commands, the cursor should be on the actual cite key +desired (otherwise a random entry will be selected). +e.g.: \\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94} + ^Display-this-citation + +If text under cursor is a \\ref command, then point is moved to its matching +\\label command. + +If text under cursor is a \\label command, then point is moved to the first +matching \\ref command. + +The user is prompted for a \\label or \\ref is nothing suitable is found under +the cursor. The first prompt is for a label. If you answer with an empty +string, a second prompt for a ref will be given. + +A TAGS file is created and used for multi-file documents under auctex." + (interactive) + (let ((kind (bib-cite--kind))) + (cond + ;; reftex doesn't handle label->ref + ((and bib-cite-use-reftex-view-crossref + (memq kind '(ref cite))) + (require 'reftex) + (reftex-view-crossref t)) + ((eq kind 'cite) + (bib-edit-citation)) + (t + (bib-find-label))))) + +(defvar bib-cite-search-ring nil + "Bib-cite intenal variable to hold last \\ref or \\eqref find.") + +(defun bib-find-next (&optional prev-p) + "Find next occurrence of a \\ref or \\eqref. +This is made necessary because we now use a regexp to find tags in multi-file +documents, and the Emacs command `find-tag' doesn't allow to interactively +find the next occurrence of a regexp." + (interactive "P") + (if (bib-master-file) ;Multi-file document + ;; FIXME: `find-tag' is replaced by `xref-find-definitions' in + ;; Emacs 25.1. AUCTeX should track this change, sometime ... + (find-tag t (if prev-p '- t) t) + (if bib-cite-search-ring + ;;FIXME: Should first make sure I move off initial \ref{}. + (let ((regexp (concat bib-ref-regexpc bib-cite-search-ring "}"))) + (if prev-p + (if (not (re-search-backward regexp nil t)) + (message "No previous occurrence of reference %s" + bib-cite-search-ring)) + (if (not (re-search-forward regexp nil t)) + (message "No next occurrence of reference %s" + bib-cite-search-ring)))) + (message "Sorry, no previous reference to find. Use bib-find?")))) + +(defun bib-display-mouse (EVENT) + "Display BibTeX citation or matching \\ref or \\label under mouse EVENT. +See bib-display." + (interactive "e") + (mouse-set-point EVENT) + (bib-display)) + +(defun bib-find-mouse (EVENT) + "Edit BibTeX citation or find matching \\ref or \\label under mouse EVENT. +See bib-find." + (interactive "e") + (mouse-set-point EVENT) + (bib-find)) + +(defun bib-apropos () + "Display BibTeX entries containing a keyword from bibliography file. +The files specified in the \\bibliography command are searched unless +the current buffer is in `bibtex-mode' or is the Help buffer. In those +cases, *it* is searched. This allows you to trim down a search further +by using bib-apropos sequentially." + ;;(interactive "sBibTeX apropos: ") + (interactive) + (let* ((keylist (and (boundp 'TeX-mode-p) + (or TeX-mode-p + (eq major-mode 'bibtex-mode)) ;Avoid error in FRAMEPOP + (fboundp 'LaTeX-bibitem-list) ;Use this if using auctex + (LaTeX-bibitem-list))) + (keyword (bib-apropos-keyword-at-point)) + (keyword (completing-read "BiBTeX apropos: " keylist nil nil keyword)) + (the-text)(key-point)(start-point) + (new-buffer-f (and (not (string-match "^bib" mode-name)) + (not (string-equal "*Help*" (buffer-name))))) + (bib-buffer (or (and new-buffer-f (bib-get-bibliography nil)) + (current-buffer)))) + (with-current-buffer bib-buffer + (goto-char (point-min)) + (while (and (re-search-forward "^[ \t]*@" nil t) + (re-search-forward keyword nil t)) + (setq key-point (point)) ;To make sure this is within entry + (re-search-backward "^[ \t]*@" nil t) + (setq start-point (point)) + (forward-list 1) + (if (< (point) key-point) ;And this is that test... + (goto-char key-point) ;Not within entry, skip it. + (setq the-text + (cons (concat (buffer-substring start-point (point)) "\n") + the-text)))) + (if (not the-text) + (message "Sorry, no matches found.") + (with-output-to-temp-buffer "*Help*" + (mapc #'princ (nreverse the-text))) + (bib-cite-fontify-help-as-bibtex) + (if bib-novice + (message + (substitute-command-keys + (concat "Use \\[bib-apropos] again in the *help* buffer" + " to trim the search"))))) + (if new-buffer-f + (kill-buffer bib-buffer))))) + +(defvar bib-document-citekeys-obarray-warnings nil + "Bib-cite internal variable.") + +(defun bib-make-bibliography () + "Extract citations used in the current document from \\bibliography{} file(s). +Put them into a buffer named after the current buffer, with extension .bib. + +In an AUCTeX multi-file document, parsing must be on and the citation keys +are extracted from the .aux files. + +In a plain LaTeX buffer (not multi-file), the cite keys are extracted from +the text itself. Therefore the text need not have been previously processed +by LaTeX. + +This function is useful when you want to share a LaTeX file, and therefore want +to create a bibtex file containing only the references used in the document." + (interactive) + (let* ((the-keys-obarray (or (bib-document-citekeys-obarray) + (bib-buffer-citekeys-obarray))) + ;1st in case of error + (new-buffer + (create-file-buffer + (concat (substring (buffer-name) 0 + (or (string-match "\\." (buffer-name)) + (length (buffer-name)))) + "-bib.bib"))) + (bib-buffer (bib-get-bibliography nil)) + (the-warnings (bib-get-citations the-keys-obarray + bib-buffer + new-buffer + nil))) + (kill-buffer bib-buffer) +;;; (switch-to-buffer new-buffer) + (funcall bib-switch-to-buffer-function new-buffer) + (bibtex-mode) + (if (or bib-document-citekeys-obarray-warnings + the-warnings) + (progn + (cond + ((and bib-document-citekeys-obarray-warnings the-warnings) + (with-output-to-temp-buffer "*Help*" + (princ bib-document-citekeys-obarray-warnings the-warnings))) + (bib-document-citekeys-obarray-warnings + (with-output-to-temp-buffer "*Help*" + (princ bib-document-citekeys-obarray-warnings))) + (the-warnings + (with-output-to-temp-buffer "*Help*" (princ the-warnings)))) + (setq bib-document-citekeys-obarray-warnings nil) ;Reset + (bib-cite-fontify-red))) + (if bib-novice + (message + (substitute-command-keys + "Use \\[save-buffer] to save this buffer to a file."))))) + +(defun bib-cite-fontify-red (&optional limit) + "Fontify *Help* buffer in red-bold up to optional LIMIT." + (if (and window-system ;Not exactly correct for XEmacs + (not (facep 'red-bold))) + (progn + (copy-face 'bold 'red-bold) + (set-face-foreground 'red-bold "red"))) + (with-current-buffer "*Help*" + (let ((before-change-functions) (after-change-functions)) + (put-text-property (point-min)(or limit (point-max)) + 'face 'red-bold)))) + +(defun bib-cite--fontify-help () + ;; FIXME: This looks ugly and incorrect. + (if font-lock-mode + (font-lock-mode -1) + (if (fboundp 'font-lock-unset-defaults) (font-lock-unset-defaults)) + (font-lock-unfontify-buffer)) + (if (fboundp 'font-lock-ensure) + (font-lock-ensure) + (with-no-warnings (font-lock-fontify-buffer)))) + +(defun bib-cite-fontify-help-as-bibtex () + (cond + ((not (featurep 'font-lock)) + nil) ;No font-lock! Stop here. + (t + ;; Emacs + (with-current-buffer "*Help*" + (let ((font-lock-defaults + '(bib-cite-bibtex-font-lock-keywords + nil t ((?$ . "\"")(?\" . "."))))) + (bib-cite--fontify-help)))))) + +(defun bib-cite-fontify-help-as-latex () + (cond + ((not (featurep 'font-lock)) + nil) ;No font-lock! Stop here. + (t + ;; Emacs + (with-current-buffer "*Help*" + ;; Actually, don't want to `permanently' affect *Help* buffer... + ;;(if (featurep 'font-latex) + ;; (font-latex-setup) + ;; Rather I should deal with this in the `let' form: + ;; (make-local-variable 'font-lock-string-face) + ;; (setq font-lock-string-face font-latex-math-face + ;; font-latex-string-face (default-value 'font-lock-string-face)) + (let ((font-lock-defaults + (if (featurep 'font-latex) + '((font-latex-keywords font-latex-keywords-1 + font-latex-keywords-2) + nil nil ((?\( . ".") (?\) . ".") (?$ . "\"")) nil + (font-lock-comment-start-regexp . "%") + (font-lock-mark-block-function . mark-paragraph)) + '(tex-font-lock-keywords nil nil ((?$ . "\"")))))) + (bib-cite--fontify-help)))))) + +(defvar bib-document-TeX-files-warnings nil + "Bib-cite internal variable.") + +(defun bib-etags (&optional masterdir) + "Invoke etags on all tex files of the document in directory MASTERDIR. +Store the TAGS file in the master-directory. +Expect errors if you use this outside of auctex or within a plain +single-file document. Also makes sure that the TAGS buffer is updated. +See variables `bib-etags-command' and `bib-etags-filename'." + (interactive) + (require 'etags) + (let* ((the-file-list (bib-document-TeX-files)) + (the-file (car the-file-list)) + (dir (or masterdir (bib-master-directory))) + (the-tags-file (expand-file-name bib-etags-filename dir)) + (the-tags-buffer (get-file-buffer the-tags-file))) + ;; Create TAGS file with first TeX file (master file) + (shell-command (concat bib-etags-command the-tags-file " " the-file)) + (setq the-file-list (cdr the-file-list)) + ;; Append to TAGS file for all other TeX files. + (while the-file-list + (setq the-file (car the-file-list)) + (shell-command + (concat bib-etags-append-command the-tags-file " " the-file)) + (setq the-file-list (cdr the-file-list))) + (if the-tags-buffer ;buffer existed; we must refresh it. + (with-current-buffer the-tags-buffer + (revert-buffer t t))) + + ;; Check value of tags-file-name against the-tags-file + (or (equal the-tags-file tags-file-name) ;make sure it's current + (visit-tags-table the-tags-file)) + + ;(set (make-local-variable 'tags-file-name) the-tags-file)) + ;; above should not be needed + + ;; Weird Bug: + ;; (visit-tags-table-buffer) seems to get called twice when called by + ;; find-tag on an undefined tag. The second time, it's in the TAGS + ;; buffer and returns an error because TAGS buffer does have + ;; tags-file-name set. + ;; To get around this. I'm setting this variable in the TAGS buffer. + ;; (Changed by Anders Stenman) + (if (get-file-buffer the-tags-file) + (with-current-buffer (get-file-buffer the-tags-file) + (set (make-local-variable 'tags-file-name) the-tags-file)))) + + + (if bib-document-TeX-files-warnings ;free variable loose in emacs! + (progn + (with-output-to-temp-buffer "*Help*" + (princ bib-document-TeX-files-warnings)) + (setq bib-document-TeX-files-warnings nil) ;Reset + (bib-cite-fontify-red)))) + +(defun bib-Is-hidden () + "Return true is current point is hidden." + (if (not selective-display) + nil ;Not hidden if not using this... + (save-excursion + (if (not (re-search-backward "[\n\^M]" nil t)) + nil ;Play safe + (if (string-equal (match-string 0) "\n") + nil + t))))) + +(defun bib-highlight-mouse () + "Make that nice green highlight when the mouse is over LaTeX commands." + (interactive) + ;;Comment this out. User should be able to use bib-highlight-mouse + ;;to try it out regardless of bib-highlight-mouse-t. + ;;Check bib-highlight-mouse-t only in automated cases. + ;; + ;; (if (and bib-highlight-mouse-t + ;; ;;window-system) ;Do nothing unless under X + ;; ) + ;; *all of code was here* + ;; ) + (save-excursion + (let ((s)(e) + (inhibit-read-only t) + (modified (buffer-modified-p))) ;put-text-property changing this? + ;; * peta Wed Nov 8 16:27:29 1995 -- better remove the mouse face + ;; properties first. + ;; Remove properties for regular emacs + ;; FIXME This detroys all mouse-faces and local-maps! + ;; FIXME Hope no other package is using them in this buffer! + (let ((before-change-functions) (after-change-functions)) + (remove-text-properties (point-min) (point-max) + '(mouse-face t local-map t))) + (goto-char (point-min)) + (while + (re-search-forward + (concat + "\\\\\\(" (substring bib-ref-regexp 2) + "\\|label\\|[A-Za-z]*cite[A-Za-z]*\\(\\[[^]]*\\]\\)*\\){[^}]*}") + nil t) + (setq s (match-beginning 0)) + (setq e (match-end 0)) + (let ((before-change-functions) (after-change-functions) + ;;(this-overlay (make-overlay s e)) + ) +;;; Even using overlays doesn't help here. If bib-highlight-mouse-keymap +;;; does not include the AucTeX menus, then these disappear when we click +;;; onto a \cite command. Perhaps using bib-cite as a minor mode will fix +;;; this? For now, bib-cite must be loaded after these menus are built. +;;; It must therefore be loaded in a mode-hook. + (put-text-property s e 'local-map bib-highlight-mouse-keymap) + (put-text-property s e 'mouse-face 'highlight) + ;;(overlay-put this-overlay 'local-map bib-highlight-mouse-keymap) + ;;(overlay-put this-overlay 'mouse-face 'highlight) + )) + (set-buffer-modified-p modified)))) + +(defun bib-toggle-highlight () + "Toggle the enabling of bib-cite entries as clickable things." +;; FIXME: do something about after-change stuff? + (interactive) + (if (setq bib-highlight-mouse-t (not bib-highlight-mouse-t)) + (bib-highlight-mouse) + (let ((modified (buffer-modified-p)) + (inhibit-read-only t)) + (let ((before-change-functions) (after-change-functions)) + (remove-text-properties (point-min) (point-max) + '(mouse-face local-map))) + (set-buffer-modified-p modified)))) + +;;---------------------------------------------------------------------------- +;; Routines to display or edit a citation's bibliography + +(defun bib-display-citation () + "Do the displaying of cite info. Return t if found cite key, nil otherwise. +Example with cursor located over cite command or arguments: +\\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94} + ^Display-all-citations ^Display-this-citation" + (save-excursion + (let* ((the-keys-obarray (bib-get-citekeys-obarray)) ;1st in case of error + (work-buffer (get-buffer-create "*bibtex-work*")) + (bib-buffer (bib-get-bibliography nil)) + (the-warnings (bib-get-citations + the-keys-obarray + bib-buffer + work-buffer + bib-substitute-string-in-display)) + (the-warn-point)) + (if the-warnings + (progn + (set-buffer work-buffer) + (goto-char 1) + (insert the-warnings) + (setq the-warn-point (point)))) + (with-output-to-temp-buffer + "*Help*" + (set-buffer work-buffer) + (princ (buffer-substring 1 (point-max)))) + (bib-cite-fontify-help-as-bibtex) + (if the-warn-point + (bib-cite-fontify-red the-warn-point)) + (kill-buffer bib-buffer) + (kill-buffer work-buffer)))) + +(defun bib-edit-citation () + "Do the edit of cite info. Return t if found cite key, nil otherwise. +Find and and put edit point in bib file associated with a BibTeX citation +under cursor from \\bibliography input file. +In a multi-entry cite command, the cursor should be on the actual cite key +desired (otherwise a random entry will be selected). +e.g.: \\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94} + ^Display-this-citation" + (let ((the-keys-obarray (bib-get-citekeys-obarray)) ;1st in case of error + (bib-buffer (bib-get-bibliography t)) + (the-key)(the-file)) + (save-excursion + (mapatoms ;Do this for each cite-key found... + (lambda (cite-key) + (setq the-key (symbol-name cite-key))) + the-keys-obarray) + (set-buffer bib-buffer) + (goto-char (point-min)) + (if (not (re-search-forward + (concat "@[^{(]+[{(][\t ]*" (regexp-quote the-key) "[ ,\n]") + nil t)) + (progn + (kill-buffer bib-buffer) + (error "Sorry, could not find bib entry for %s" the-key)) + (re-search-backward "%%%Filename: \\([^\n]*\\)" nil t) + (setq the-file (match-string 1)) + (kill-buffer bib-buffer))) +;;; (find-file the-file) + (funcall bib-switch-to-buffer-function (find-file-noselect the-file)) + (goto-char (point-min)) ;V2.19 fix + (re-search-forward (concat "@[^{(]+[{(][\t ]*" + (regexp-quote the-key) + "[ ,\n]") nil t))) + +;;-------------------------------------------------------------------------- +;; Function for bib-apropos + +(defun bib-apropos-keyword-at-point () + "Return the keyword under point for initial input to bib-apropos prompt." + (save-excursion + (let ((here (point))) + (cond + ((and (re-search-backward "[\n{, ]" nil t) + (string-equal "{" (buffer-substring (match-beginning 0) + (match-end 0)))) + (buffer-substring-no-properties (1+ (point)) here)))))) + +;;-------------------------------------------------------------------------- +;; Functions for Displaying or moving to matching \ref or \label command + +(defun bib-display-label () +"Display environment or first ref associated with a label. +The label or ref name is extracted from the text under the cursor, or the +user is prompted is nothing suitable is found. The first prompt is for a +label. If you answer with an empty string, a second prompt for a ref will +be given." + (let ((the-regexp (bib-guess-or-prompt-for-label))) + (if (not the-regexp) + (message "No name given") + (bib-display-or-find-label the-regexp t)))) + +(defun bib-find-label () + "Move to a label, or the first occurance of a ref. +The label or ref name is extracted from the text under the cursor. +If nothing suitable is found, the user is prompted. The first prompt is for a +label. If you answer with an empty string, a second prompt for a ref will be +given. + +If within a single file document: + You can move back with C-xC-x as the mark is set before moving. + You can search for next occurrances of a ref command with C-sC-s. + +If within a multi-file document (in AUCTeX only) + You can move back with C-xC-x if within the same buffer. If not, just + select your previous buffer. + You can search for next occurrences of a ref command with tag commands: + C-u M-. Find next alternate definition of last tag specified. + C-u - M-. Go back to previous tag found." + ;; FIXME: The last 3 lines of the above doc string no longer hold + ;; since M-. is now bound to `xref-find-definitions'. + (let ((the-regexp (bib-guess-or-prompt-for-label))) + (if (not the-regexp) + (message "No name given") + (bib-display-or-find-label the-regexp nil)))) + +;;-------------------------------------------------------------------------- +;; Functions for Displaying or moving to matching \ref or \label command + +(defun bib-display-or-find-label (the-regexp displayf) +;; work horse for bib-find-label and bib-display-label + (let* ((masterfile (bib-master-file)) + (masterdir (and masterfile + (file-name-directory masterfile))) + (new-point)(new-buffer)) + (save-excursion + ;; Now we are either in a simple file, or with a multi-file document + (cond + (masterfile ;Multi-file document + (cond + (displayf ;Display only + (set-buffer (bib-etags-find-noselect the-regexp masterdir)) + (re-search-forward the-regexp nil t) + ;; ...because tags puts point on beginning of line + (if (string-match "^\\\\\\\\label" the-regexp) + (bib-display-this-environment) ;display the label's environment + (bib-display-this-ref))) ; display the ref's context + (t ;Move to it + (setq new-buffer (bib-etags-find-noselect the-regexp masterdir)) + (if bib-novice + (message + (substitute-command-keys + (concat "Use \\[bib-find-next] to find the next occurrence " + "and C-u \\[bib-find-next] to find previous.")))) + (if (equal new-buffer (current-buffer)) + (setq new-point (point)))))) ;Moving with the same buffer + (t ;Single-file document + (goto-char (point-min)) + (cond + ((re-search-forward the-regexp nil t) + (if displayf + (if (string-match "^\\\\label" the-regexp) + (bib-display-this-environment) ;Display the environment + (bib-display-this-ref)) ; display the ref's context + (setq new-point (match-beginning 0)) ;or move there + (if (string-match "{\\(.*\\)}" the-regexp) + (setq bib-cite-search-ring (match-string 1 the-regexp))) + (if bib-novice + (message + (substitute-command-keys + (concat "Use \\[bib-find-next] to find the next occurrence " + "and C-u \\[bib-find-next] to find previous.")))))) + (t + (message "Sorry, cannot find it (%s)" the-regexp)))))) + (if new-point + (progn + (push-mark (point) t nil) ;We've moving there... push mark + (goto-char new-point)) + (if new-buffer ;We've changing buffer + ;;(switch-to-buffer new-buffer) + (funcall bib-switch-to-buffer-function new-buffer))) + (if (bib-Is-hidden) + (save-excursion + (beginning-of-line) + ;; COMPATIBILITY for emacs<25. + (if (fboundp 'outline-show-entry) + (outline-show-entry) + (with-no-warnings + (show-entry))))))) + +(defvar bib-label-prompt-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-completion-map) + (define-key map " " #'self-insert-command) + map)) + +(defun bib-guess-or-prompt-for-label () + "Guess from context, or prompt the user for a label command." + (save-excursion + (if (not (looking-at "\\\\")) ;If not on beginning of a command + (re-search-backward "[\\]" + (save-excursion (beginning-of-line)(point)) + t)) + (cond + ((looking-at bib-ref-regexpc) ;On \ref, looking for matching \label + (let ((b (progn (search-forward "{" nil t)(forward-char -1)(point))) + (e (progn (forward-sexp 1)(point)))) + (concat "\\\\label" (regexp-quote (buffer-substring b e))))) + ((looking-at "\\\\label{") ;On \label, looking for matching \ref + (let ((b (progn (search-forward "{" nil t)(forward-char -1)(point))) + (e (progn (forward-sexp 1)(point)))) + (concat bib-ref-regexp (regexp-quote (buffer-substring b e))))) + (t ;Prompt the user + (let* ((minibuffer-local-completion-map bib-label-prompt-map) + (the-alist (create-alist-from-list + (cdr (reverse LaTeX-label-list)))) + ;;; LaTeX-label-list example: + ;;; '(("label3" "label4")("label1" "label2") nil) + ;; so let's get rid of that nil part in embedded list. + (the-name + (completing-read "Label: " the-alist nil nil nil + 'LaTeX-find-label-hist-alist))) + (if (not (equal the-name "")) + (concat "\\\\label{" (regexp-quote the-name) "}") + ;; else try to get a \ref + (setq the-name (completing-read "Ref: " the-alist nil nil nil + 'LaTeX-find-label-hist-alist)) + (if (not (equal the-name "")) + (concat bib-ref-regexpc (regexp-quote the-name) "}") + nil))))))) + +(defun bib-display-this-ref () + "Display a few lines around current point." + (cond + ((bib-Is-hidden) + (with-output-to-temp-buffer "*BiBTemp*" + (princ + (buffer-substring + (save-excursion + (let ((i 3)) + (while (and (> i 0) + (re-search-backward "[\n\^M]" nil t) + (setq i (1- i))))) + (point)) + (save-excursion + (let ((i 3)) + (while (and (> i 0) + (re-search-forward "[\n\^M]" nil t) + (setq i (1- i))))) + (point))))) + (set-buffer "*BiBTemp*") + (while (search-forward "\^M" nil t) + (replace-match "\n" nil t)) + (goto-char 1) + (if (looking-at "\n") ;Remove first empty line... + (delete-char 1)) + (with-output-to-temp-buffer "*Help*" + (princ (buffer-substring (point-min) (point-max)))) + (bib-cite-fontify-help-as-latex) + (kill-buffer "*BiBTemp*")) + (t + (with-output-to-temp-buffer ; display the ref's context + "*Help*" + (princ + (buffer-substring (save-excursion (forward-line -2)(point)) + (save-excursion (forward-line 3)(point))))) + (bib-cite-fontify-help-as-latex)))) + +(defun bib-display-this-environment () + "Display the environment associated with a label, or its section name. +Assumes point is already on the label. +Does not save excursion." +;; Bugs: The method used here to detect the environment is *not* foolproof. +;; It will get confused, for example, between two figure environments, +;; picking out both instead of the section label above them. But since +;; users typically puts their labels next to the section declaration, +;; I'm satisfied with this... for now. +;; I could have used the following AUCTeX functions: +;; LaTeX-current-environment +;; Function: Return the name (a string) of the enclosing LaTeX environment. +;; LaTeX-current-section +;; Function: Return the level of the section that contain point. +;; but then this code would only work as part of AUCTeX... + (let ((the-point (point)) + (end-point (point)) + (the-environment)(foundf)) + (while (and (not foundf) + (goto-char end-point) ;Past end of last search + (re-search-forward "\\(^\\|\^M\\)[ \t]*\\\\end{\\([^}]*\\)}" + nil t)) + (setq end-point (point)) + (setq the-environment (match-string 2)) + (and (not (string-match "document" the-environment)) + (re-search-backward (concat "\\(^\\|\^M\\)[ \t]*\\\\begin{" + (regexp-quote the-environment) "}")) + (<= (point) the-point) + (setq foundf t))) + (if foundf ;A good environment + (progn + (cond ((bib-Is-hidden) ;Better way is: replace-within-string + (with-output-to-temp-buffer "*BiBTemp*" + (princ (buffer-substring (point) end-point))) + (set-buffer "*BiBTemp*") + (while (search-forward "\^M" nil t) + (replace-match "\n" nil t)) + (goto-char 1) + (if (looking-at "\n") ;Remove first empty line... + (delete-char 1)) + (with-output-to-temp-buffer "*Help*" + (princ (buffer-substring 1 (point-max)))) + (kill-buffer "*BiBTemp*")) + (t + (with-output-to-temp-buffer "*Help*" + (princ (buffer-substring (point) end-point))))) + (bib-cite-fontify-help-as-latex)) + ;; Just find the section declaration + (goto-char the-point) + (if (re-search-backward +;;; "\\(^\\|\^M\\)[ \t]*\\\\\\(sub\\)*section{\\([^}]*\\)}" nil t) +;;; Michael Steiner <steiner@cs.uni-sb.de> patch + "\\(^\\|\^M\\)[ \t]*\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*?\ +{\\([^}]*\\)}" + nil t) + (message (match-string 0)) + (error + "Sorry, could not find an environment or section declaration"))))) + +(defvar LaTeX-find-label-hist-alist nil "History list for LaTeX-find-label.") +(defvar LaTeX-label-list nil "Used by AUCTeX to store label names.") + + +(defun create-alist-from-list (the-list) + "Return a single list from a THE-LIST that may contain either items or lists. +e.g. turns +'((\"label3\" \"label4\")(\"label1\" \"label2\") \"label\") +into +'((\"label3\") (\"label4\") (\"label1\") (\"label2\") (\"label\"))" + (mapcar #'list (bib-cite-mh-list-to-string the-list))) + +;; +;; Following two functions from mh-utils.el (part of GNU emacs) +;; I have changed the names in case these functions change what they do. +;; + +(defun bib-cite-mh-list-to-string (l) + "Flattens the list L and make every element of the new list into a string." + (nreverse (bib-cite-mh-list-to-string-1 l))) + +(defun bib-cite-mh-list-to-string-1 (l) + (let ((new-list nil)) + (while l + (cond ((null (car l))) + ((symbolp (car l)) + (setq new-list (cons (symbol-name (car l)) new-list))) + ((numberp (car l)) + (setq new-list (cons (int-to-string (car l)) new-list))) + ((equal (car l) "")) + ((stringp (car l)) (setq new-list (cons (car l) new-list))) + ((listp (car l)) + (setq new-list (nconc (bib-cite-mh-list-to-string-1 (car l)) + new-list))) + (t (error "Bad element in mh-list-to-string: %s" (car l)))) + (setq l (cdr l))) + new-list)) + +;; ------------------------------------------------------------------------- +;; Routines to extract cite keys from text + +;; ... is truly remarkable, as shown in \citeN{Thomson77,Test56}. Every +;; \cite[{\it e.g.}]{Thomson77,Test56} + +(defun bib-get-citations (keys-obarray bib-buffer new-buffer substitute) + "Put citations of KEYS-OBARRAY from BIB-BUFFER into NEW-BUFFER. +Substitute strings if SUBSTITUTE is t +Return the-warnings as text." + (let ((the-warnings) ;The only variable to remember... + (case-fold-search t)) ;All other results go into new-buffer + ;; bibtex is not case-sensitive for keys. + (save-excursion + (let ((the-text)) + (set-buffer bib-buffer) + (mapatoms ;Do this for each cite-key found... + (lambda (cite-key) + (goto-char (point-min)) + (if (re-search-forward + (concat "@[^{(]+[{(][\t ]*" + (regexp-quote (symbol-name cite-key)) + "\\([, ]\\\|$\\)") + ;; ^^ ^ comma, space or end-of-line + nil t) + (setq the-text (concat the-text + (buffer-substring + (progn (beginning-of-line)(point)) + (progn (forward-sexp 2)(point))) + "\n\n")) + (setq the-warnings (concat the-warnings + "Cannot find entry for: " + (symbol-name cite-key) "\n")))) + keys-obarray) + (if (not the-text) + (error "Sorry, could not find any of the references")) + ;; Insert the citations in the new buffer + (set-buffer new-buffer) + (insert the-text) + (goto-char 1)) + + ;; We are at beginning of new-buffer. + ;; Now handle crossrefs + (let ((crossref-obarray (make-vector 201 0))) + (while (re-search-forward + "[, \t]*crossref[ \t]*=[ \t]*\\(\"\\|\{\\)" nil t) + ;;handle {text} or "text" cases + (if (string-equal "{" (match-string 1)) + (re-search-forward "[^\}]+" nil t) + (re-search-forward "[^\"]+" nil t)) + (intern (match-string 0) crossref-obarray)) + ;; Now find the corresponding keys, + ;; but add them only if not already in `keys-obarray' + (set-buffer bib-buffer) + (goto-char 1) + (let ((the-text)) + (mapatoms ;Do this for each crossref key found... + (lambda (crossref-key) + (if (not (intern-soft (symbol-name crossref-key) keys-obarray)) + (progn + ;; Not in keys-obarray, so not yet displayed. + (goto-char (point-min)) + (if (re-search-forward + (concat "@[^{(]+[{(][\t ]*" + (regexp-quote (symbol-name crossref-key)) + "\\(,\\|$\\)") + nil t) + (setq the-text + (concat the-text + (buffer-substring + (progn (beginning-of-line)(point)) + (progn (forward-sexp 2)(point))) + "\n\n")) + (setq the-warnings + (concat the-warnings + "Cannot find crossref entry for: " + (symbol-name crossref-key) "\n")))))) + crossref-obarray) + ;; Insert the citations in the new buffer + (set-buffer new-buffer) + (goto-char (point-max)) + (if the-text + (insert the-text))) + (goto-char 1)) + + ;; Now we have all citations in new-buffer, collect all used @String keys + ;; Ex: journal = JPO, + (let ((strings-obarray (make-vector 201 0))) + (while (re-search-forward bib-string-regexp nil t) + (intern (match-string 1) strings-obarray)) + ;; Now find the corresponding @String commands + ;; Collect either the @string commands, or the string to substitute + (set-buffer bib-buffer) + (goto-char 1) + (let ((string-alist) + (the-text)) + (mapatoms ;Do this for each string-key found... + (lambda (string-key) + (goto-char (point-min)) + ;; search for @string{ key = {text}} or @string{ key = "text"} + (if (re-search-forward + (concat "^[ \t]*@string[{(]" + (regexp-quote (symbol-name string-key)) + "[\t ]*=[\t ]*\\(\"\\|\{\\)") + nil t) + (let ((the-string-start (1- (match-end 1))) ;catch bracket + ;;handle {text} or "text" cases + (the-string-end + (cond + ((string-equal "\"" (match-string 1)) + (re-search-forward "[^\\]\"" nil t) + (point)) + (t + (forward-char -1) + (forward-list 1) + (point))))) + (if substitute ;Collect substitutions + (setq string-alist + (append + string-alist + (list + (cons (symbol-name string-key) + ;(regexp-quote + (buffer-substring the-string-start + the-string-end)))));) + ;;Collect the strings command themseves + (setq the-text + (concat the-text + (buffer-substring + (progn (forward-char 1)(point)) + (re-search-backward "^[ \t]*@string[{(]" + nil t)) + "\n")))) + ;; @string entry not found + (if (not (member-cis (symbol-name string-key) + bib-string-ignored-warning)) + (setq the-warnings + (concat the-warnings + "Cannot find @String entry for: " + (symbol-name string-key) "\n"))))) + strings-obarray) + ;; Now we have `the-text' of @string commands, + ;; or the `string-alist' to substitute. + (set-buffer new-buffer) + (if substitute + (while string-alist + (goto-char 1) + (let* ((the-key (car (car string-alist))) + (the-string (cdr (car string-alist))) + (slashed-string ; "J. of Geo.\" -> "J. of Geo.\\\\" + (replace-regexp-in-string + "\\\\" "\\\\" the-string t t))) + + (while (re-search-forward + (concat "\\(^[, \t]*[a-zA-Z]+[ \t]*=[ \t]*\\)" + (regexp-quote the-key) + "\\([, \t\n]\\)") + nil t) + (replace-match (concat "\\1" slashed-string "\\2") t nil))) + (setq string-alist (cdr string-alist))) + ;; substitute is nil; Simply insert text of @string commands + (goto-char 1) + (if the-text + (insert the-text "\n"))) + (goto-char 1)))) + + ;; We are done! + ;; Return the warnings... + the-warnings)) + +;; Following contributed by Michael Steiner <steiner@cs.uni-sb.de> The +;; @string abbreviation are not case-sensitive, so we replaced the `member' +;; test above with `member-cis' defined here: +(defun member-cis (ELT LIST) + "Return non-nil if ELT is an element of LIST. +All elements should be strings. +Comparison is case-insensitive." + ;; If list is exhausted, + (if (null LIST) + nil ;; if null then we haven't found the element ... + ;; else split list and ... + (let((listelt (car LIST))(listrest (cdr LIST))) + ;; see if car is equal to ELT + (if (string-equal (downcase ELT) (downcase listelt)) + t ;; if so return true + ;; else recurse for rest of list + (member-cis ELT listrest))))) + +(defun bib-get-citekeys-obarray () + "Return obarray of citation key (within curly brackets) under cursor." + (save-excursion + ;; First find *only* a key *within a cite command + (let ((the-point (point)) + (keys-obarray (make-vector 201 0))) + ;; First try to match a cite command + (if (and (skip-chars-backward "a-zA-Z") ;Stops on \ or { + (looking-at "[a-zA-Z]*cite[a-zA-Z]*")) + (progn + ;;skip over any optional arguments to \cite[][]{key} command + (skip-chars-forward "a-zA-Z") + (while (looking-at "\\[") + (forward-list 1)) + (re-search-forward "{[ \n]*\\([^,} \n]+\\)" nil t) + (intern (match-string 1) keys-obarray) + (while (and (skip-chars-forward " \n") ;no effect on while + (looking-at ",")) + (forward-char 1) + ;;The following re-search skips over leading spaces + (re-search-forward "\\([^,} \n]+\\)" nil t) + (intern (match-string 1) keys-obarray))) + ;; Assume we are on the keyword + (goto-char the-point) + (let ((the-start (re-search-backward "[\n{, ]" nil t)) + (the-end (progn (goto-char the-point) + (re-search-forward "[\n}, ]" nil t)))) + (if (and the-start the-end) + (intern (buffer-substring (1+ the-start) (1- the-end)) + keys-obarray) + ;; Neither... + (error "Sorry, can't find a reference here")))) + keys-obarray))) + +(defun bib-buffer-citekeys-obarray () + "Extract citations keys used in the current buffer." + (let ((keys-obarray (make-vector 201 0))) + (save-excursion + (goto-char (point-min)) + ;; Following must allow for \cite[e.g.][]{key} !!! + ;; regexp for \cite{key1,key2} was "\\\\[a-Z]*cite[a-Z]*{\\([^,}]+\\)" + (while (re-search-forward "\\\\[a-zA-Z]*cite[a-zA-Z]*\\(\\[\\|{\\)" + nil t) + (backward-char 1) + (while (looking-at "\\[") ; ...so skip all bracketted options + (forward-sexp 1)) + ;; then lookup first key + (if (looking-at "{[ \n]*\\([^,} \n]+\\)") + (progn + (intern (match-string 1) keys-obarray) + (goto-char (match-end 1)) + (while (and (skip-chars-forward " \n") + (looking-at ",")) + (forward-char 1) + (re-search-forward "\\([^,} \n]+\\)" nil t) + (intern (match-string 1) keys-obarray))))) + (if keys-obarray + keys-obarray + (error "Sorry, could not find any citation keys in this buffer"))))) + +;;--------------------------------------------------------------------------- +;; Multi-file document programming requirements: +;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +;; bib-make-bibliography +;; bib-document-citekeys-obarray needs the master .aux file to extract +;; citation keys. +;; Included .aux files (corresponding to \include'd LaTeX files) are +;; then specified relative to the master-file-directory. +;; +;; bib-get-bibliography (used by interactive commands to extract bib sources) +;; +;; bibtex source filenames are returned from (LaTeX-bibliography-list) +;; unformatted. Since only a single \bibliogragrphy command is allowed +;; by BiBTeX in a document, it is safe to assume that their path is +;; relative to the master file's directory (since the path is relative +;; to where the BiBTeX program is actually ran). +;; + +;; (See TeX-check-files, used in TeX-save-document. All documents related +;; files are returned by (TeX-style-list) and stored in TeX-active-styles. +;; Original idea was to search TeX-check-path for files listed in +;; TeX-active-styles (with possible relative or full paths) that end in .tex.) + +(defun bib-master-directory () + "Return the directory associated with the master file. +If no master file, then return current default." + (let ((masterfile (bib-master-file))) + (if masterfile + (file-name-directory (expand-file-name (TeX-master-file))) + default-directory))) + +(defun bib-master-file () + "Return master file full path, or nil if not a multi-file document." +;; I wish there were a better way to tell about non multi-file documents... + (let ((master + (cond + ((not (boundp 'TeX-master)) + ;; This buffer doesn't know what a master file is, so return now. + nil) + ((and TeX-master ;Set, but not to t + (not (symbolp TeX-master))) ; then we have an actual name + (expand-file-name TeX-master)) + ((and (eq TeX-master 't) ;Test if master file itself + (progn ;But also require at least one \include + (save-excursion + (goto-char 1) ;Too bad I have to do this search... + ;; Require that user uses \input{file} + ;; rather than \input file + (re-search-forward "^[ \t]*\\\\\\(include\\|input\\){" + nil t)))) + (buffer-file-name)) + (t + nil)))) + (cond + ((not master) + nil) + ((string-match ".\\(tex\\|ltx\\)$" master) + master) + ((file-readable-p (concat master ".ltx")) + (concat master ".ltx")) + (t + (concat master ".tex"))))) + +;; I don't use this one because files are not returned in order... +;; (defun bib-document-TeX-files () +;; ;; Return all tex input files associated with a known multi-file document. +;; (let ((master-directory (bib-master-directory)) +;; (the-list (cons (file-name-nondirectory (TeX-master-file)) +;; (TeX-style-list))) +;; ;; TeX-style-list returns "../master" for the main file if TeX-master +;; ;; was set like that. "../master" would not be found relative +;; ;; to the master-directory! So let's add it to the list w/o directory. +;; (the-result) +;; (the-file)) +;; (while the-list +;; (setq the-file (expand-file-name (car the-list) master-directory)) +;; (setq the-list (cdr the-list)) +;; (and (not (string-match ".tex$" the-file)) +;; (setq the-file (concat the-file ".tex"))) +;; (and (file-readable-p the-file) +;; (not (member the-file the-result)) ;listed already? +;; (setq the-result (cons the-file the-result)))) +;; the-result)) + +(defun bib-document-TeX-files () + "Return all tex input files associated with a *known* multi-file document. +For a multi-file document in auctex only. +No checking is done that this is a real multi-file document. +Sets global variable bib-document-TeX-files-warnings." + (setq bib-document-TeX-files-warnings nil) + (let* ((masterfile (bib-master-file)) + (dir (and masterfile (file-name-directory masterfile))) + (tex-buffer (get-buffer-create "*tex-document*")) + (the-list (list masterfile))) + (if (not masterfile) + (progn + (kill-buffer tex-buffer) + (error + "Sorry, but this is not a multi-file document (Try C-u C-c C-n if using AUCTeX)"))) + (with-current-buffer tex-buffer + ;; set its directory so relative includes work without expanding + (setq default-directory dir) + (insert-file-contents masterfile) + (goto-char (point-min)) + (while (re-search-forward "^[ \t]*\\\\\\(input\\|include\\){\\(.*\\)}" + nil t) + (let ((the-file (match-string 2))) + (if (string-match ".sty$" the-file) ;Skip over style files! + nil + (if (and (not (file-readable-p (expand-file-name the-file dir))) + (not (string-match ".ltx$" the-file)) + (file-readable-p + (expand-file-name (concat the-file ".ltx") dir))) + (setq the-file (concat the-file ".ltx"))) + (if (and (not (file-readable-p (expand-file-name the-file dir))) + (not (string-match ".tex$" the-file))) + (setq the-file (concat the-file ".tex"))) + (setq the-file (expand-file-name the-file dir)) + (if (not (file-readable-p the-file)) + (setq bib-document-TeX-files-warnings + (concat + bib-document-TeX-files-warnings + (format "Warning: File not found: %s" the-file))) + (setq the-list (cons (expand-file-name the-file dir) the-list)) + (end-of-line)(insert "\n") + (insert-file-contents the-file)))))) + (kill-buffer tex-buffer) + (nreverse the-list))) + +(defun bib-document-citekeys-obarray () + "Return cite keys obarray for multi-file document. +Return nil if not a multi-file document. +This is a AUCTeX supported feature only. +Also, see `bib-buffer-citekeys-obarray'. +Set global variable `bib-document-citekeys-obarray-warnings'." + (setq bib-document-citekeys-obarray-warnings nil) + (let ((master-tex (bib-master-file)) + (master-aux)) + (if (not master-tex) + nil ;Not a multifile document. No need... + (setq master-aux (bib-return-aux-file-from-tex master-tex "aux")) + (or (file-readable-p master-aux) + (error "Sorry, cannot read file %s" master-aux)) + (and (file-newer-than-file-p master-tex master-aux) + (setq bib-document-citekeys-obarray-warnings + (format "Warning: %s is out of date relative to %s.\n" + master-aux master-tex))) + (let ((work-buffer (get-buffer-create "*bib-cite-work*")) + (keys-obarray (make-vector 201 0))) + (with-current-buffer work-buffer + (insert-file-contents master-aux) + ;; Because we will be looking for \input statements, we need to set + ;; the default directory to that of the master file. + (setq default-directory (file-name-directory master-tex)) + ;; bib-make-bibliography will need this also to find .bib files + ;; look for \@input{chap1/part1.aux} + (while (re-search-forward "^\\\\@input{\\(.*\\)}$" nil t) + (let* ((auxfile (match-string 1)) + (texfile (bib-return-aux-file-from-tex auxfile "tex"))) + (if (not (file-readable-p auxfile)) + (setq bib-document-citekeys-obarray-warnings + (concat + bib-document-citekeys-obarray-warnings + (format "Warning: %s is not found or readable.\n" + auxfile))) + (if (file-newer-than-file-p texfile auxfile) + (setq bib-document-citekeys-obarray-warnings + (concat + bib-document-citekeys-obarray-warnings + (format + "Warning: %s is out of date relative to %s.\n" + auxfile texfile)))) + (end-of-line)(insert "\n") + (insert-file-contents auxfile)))) + (goto-char 1) + +;;; Patched by calvanes@dis.uniroma1.it (Diego Calvanese) +;;; ;; look for \citation{gertsenshtein59} +;;; (while (re-search-forward "^\\\\citation{\\(.*\\)}$" nil t) +;;; (intern (buffer-substring (match-beginning 1)(match-end 1)) +;;; keys-obarray)) + ;; look for \citation{gertsenshtein59,vardi88,...,ullmann90} + ;; comma-separation generated by certain LaTeX styles. + (while (re-search-forward "^\\\\citation{\\(.*\\)}$" nil t) + (let ((string (match-string 1)) + (start 0)) + (while (string-match "\\([^,\n]+\\)" string start) + (intern (substring string (match-beginning 1) (match-end 1)) + keys-obarray) + (setq start (match-end 0)))))) + (kill-buffer work-buffer) + keys-obarray)))) + +(defun bib-return-aux-file-from-tex (texname ext) + "Given name.name.XXX in TEXNAME return name.name.EXT." +;; FIXME: Check if in ./, else search + (let* ((filename (if (string-match "\\(.*\\)\\.[^\\.]+" texname) + (concat (match-string 1 texname) "." ext) + (concat texname "." ext))) + (sansdir (file-name-nondirectory filename))) + (if (file-exists-p filename) + filename + ;; Search bib-cite-aux-inputs path + (let ((filename (psg-checkfor-file-list sansdir bib-cite-aux-inputs))) + (if (and filename (file-exists-p filename)) + filename + (error "Could not find file %s" sansdir)))))) + +(defun bib-etags-find-noselect (tag &optional masterdir) + "Returns a buffer with point on TAG. +Buffer is not selected. +Makes sure TAGS file exists, etc." + (require 'etags) + (let* ((master (or masterdir (bib-master-directory))) + (the-buffer (current-buffer)) + (new-buffer) + (the-tags-file-name (expand-file-name bib-etags-filename master))) + (or (file-exists-p the-tags-file-name) ;make sure TAGS exists + (bib-etags master)) + (or (equal the-tags-file-name tags-file-name) ;make sure it's current + (visit-tags-table the-tags-file-name)) + ;; find-tag-noselect should set the TAGS file for the new buffer + ;; that's what C-h f visit-tags-table says... + (setq new-buffer (find-tag-noselect tag nil t)) + ; -> Seems to set buffer to TAGS + (set-buffer the-buffer) + new-buffer)) + +;; -------------------------------------------------------------------------- +;; The following routines make a temporary bibliography buffer +;; holding all bibtex files found. + +(defun bib-get-bibliography (include-filenames-f) + "Returns a new bibliography buffer holding all bibtex files in the document. + +If using AUCTeX, and either TeX-parse-self is set or C-c C-n is used to +parse the document, then the entire multifile document will be searched +for \\bibliography commands. + +If this fails, the current buffer is searched for the first \\bibliography +command. + +If include-filenames-f is true, include as a special header the filename +of each bib file. + +Puts the buffer in text-mode such that forward-sexp works with german \" +accents embeded in bibtex entries." + (let ((bib-list (or (and (fboundp 'LaTeX-bibliography-list) + (boundp 'TeX-mode-p) TeX-mode-p + (LaTeX-bibliography-list)) +;; LaTeX-bibliography-list (if bound) returns an unformatted list of +;; bib files used in the document, but only if parsing is turned on +;; or C-c C-n was used. + (bib-bibliography-list))) + (bib-buffer (get-buffer-create "*bibtex-bibliography*")) + ;; Path is relative to the master directory + (default-directory (bib-master-directory)) + (the-name)(the-warnings)(the-file)) + (with-current-buffer bib-buffer + ;; such that forward-sexp works with embeeded \" in german, + ;; and unbalanced () + (erase-buffer) + (set-syntax-table text-mode-syntax-table) +;; (if (boundp 'bibtex-mode-syntax-table) +;; (set-syntax-table bibtex-mode-syntax-table) +;; (text-mode)) + ) + ;;We have a list of bib files + ;;Search for them, include them, list those not readable + (while bib-list + (setq the-name (car (car bib-list))) ;Extract the string only + (setq bib-list (cdr bib-list)) + (setq the-name + (substring the-name + (string-match "[^ ]+" the-name) ;remove leading spaces + (string-match "[ ]+$" the-name))) ;remove trailing space + (if (not (string-match "\\.bib$" the-name)) + (setq the-name (concat the-name ".bib"))) + (setq the-file + (or (and (file-readable-p the-name) the-name) + (psg-checkfor-file-list + the-name (psg-list-env bib-bibtex-env-variable)) + ;; Check for BIBINPUT env variable as well (by popular demand!) + (psg-checkfor-file-list the-name (psg-list-env "BIBINPUT")) + (and bib-cite-inputs + (psg-checkfor-file-list the-name bib-cite-inputs)) + (and (boundp 'TeX-check-path) + (psg-checkfor-file-list the-name TeX-check-path)))) + (if the-file + (with-current-buffer bib-buffer + (goto-char (point-max)) + (if include-filenames-f + (insert "%%%Filename: " the-file "\n")) + (insert-file-contents the-file nil) + (goto-char 1)) + (setq the-warnings + (concat the-warnings "Could not read file: " the-name "\n")))) + (if the-warnings + (progn + (with-output-to-temp-buffer "*Help*" + (princ the-warnings)) + (kill-buffer bib-buffer) + (error + "Sorry, can't find all bibtex files in \\bibliography command")) + bib-buffer))) + +(defun bib-bibliography-list () + "Return list of bib files listed in first \\bibliography command in buffer. +Similar output to AUCTeX's LaTeX-bibliography-list +The first element may contain trailing whitespace (if there was any in input) +although BiBTeX doesn't allow it!" + (save-excursion + (goto-char 1) + (if (not (re-search-forward "^[ \t]*\\\\bibliography{[ \t]*\\([^},]+\\)" + nil t)) + (error "Sorry, can't find \\bibliography command anywhere") + (let ((the-list (list (match-string 1))) + (doNext t)) + (while doNext + (if (looking-at ",") + (setq the-list + (append the-list + (list (buffer-substring + (progn (skip-chars-forward ", ")(point)) + (progn (re-search-forward "[,}]" nil t) + (backward-char 1) + (skip-chars-backward ", ") + (point)))))) + (setq doNext nil))) + (mapcar #'list the-list))))) + +(defvar TeX-auto-save) +(defvar TeX-auto-regexp-list) + +;; BibTeX-mode key def to create AUCTeX's parsing file. +(defun bib-create-auto-file () + "Force the creation of the AUCTeX auto file for a bibtex buffer." + (interactive) + (if (not (require 'latex)) + (error "Sorry, This is only useful if you have AUCTeX")) + (let ((TeX-auto-save t) + (TeX-auto-regexp-list BibTeX-auto-regexp-list)) + ;; TeX-auto-write + ;; -> calls TeX-auto-store + ;; -> calls TeX-auto-parse + ;; clears LaTeX-auto-bibtem (temporary holding space for bibitems) + ;; searches buffer using regexp in TeX-auto-regexp-list + ;; -> if LaTeX-auto-bibtem (the temporary holding space for bibitems) + ;; holds stuffs like + ;; ("Zimmermann:1991" "Anger_et_al:1993") + ;; as determined by + ;; (member nil (mapcar 'TeX-auto-entry-clear-p TeX-auto-parser)) + ;; then it creates the auto file. + + ;; TeX-auto-write may call TeX-master-file which may fail if + ;; TeX-header-end is unset (by LaTeX-common-initialization in latex-mode) + (if (not TeX-header-end) + (setq TeX-header-end LaTeX-header-end)) + + (TeX-auto-write))) + +;; -------------------------------------------------------------------------- +;; The following routines are also defined in other packages... + +(defun psg-checkfor-file-list (filename list) + "Check for presence of FILENAME in directory LIST. Return 1st found path." + ;;USAGE: (psg-checkfor-file-list "gri" (psg-list-env "PATH")) + ;;USAGE: (psg-checkfor-file-list "gri-mode.el" load-path) + ;;USAGE: (psg-checkfor-file-list "gri.cmd" (psg-translate-ff-list "gri.tmp")) + (let ((the-list list) + (filespec)) + (while the-list + (if (not (car the-list)) ; it is nil + (setq filespec (expand-file-name filename)) + (setq filespec + (concat + (expand-file-name (file-name-as-directory (car the-list))) + filename))) + (if (file-exists-p filespec) + (setq the-list nil) + (setq filespec nil) + (setq the-list (cdr the-list)))) + (if filespec + filespec + ;; If I have not found a file yet, then check if some directories + ;; ended in // and recurse through them. + (let ((the-list list)) + (while the-list + (if (not (string-match "//$" (car the-list))) nil + (setq filespec (car + (search-directory-tree + (substring (car the-list) 0 (match-beginning 0)) + (concat "^" filename "$") + t + t))) + (if filespec ;Success! + (setq the-list nil))) + (setq the-list (cdr the-list))) + filespec)))) + + +(defun search-directory-tree (directories extension-regexp recurse first-file) + "Return a list of all reachable files in DIRECTORIES ending with EXTENSION. +DIRECTORIES is a list or a single-directory string +EXTENSION-REGEXP is actually (any) regexp, usually \\\\.bib$ +If RECURSE is t, then we will recurse into the directory tree, + nil, we will only search the list given. +If FIRST-FILE is t, stop after first file is found." + (or (listp directories) + (setq directories (list directories))) + + (let (match) + (while directories + (let* ((directory (file-name-as-directory (car directories))) + (content (and directory + (file-readable-p directory) + (file-directory-p directory) + (directory-files directory)))) + (setq directories (cdr directories)) + (while content + (let ((file (expand-file-name (car content) directory))) + (cond ((string-match "[.]+$" (car content))) ;This or parent dir + ((not (file-readable-p file))) + ((and recurse + (file-directory-p file)) + (setq directories + (cons (file-name-as-directory file) directories))) + ((string-match extension-regexp + (file-name-nondirectory file)) + (and first-file + (setq content nil + directories nil)) + (setq match (cons file match))))) + (setq content (cdr content))))) + + match)) + +;; (defun psg-checkfor-file-list (filename list) +;; (let ((the-list list) +;; (filespec)) +;; (while the-list +;; (if (not (car the-list)) ; it is nil +;; (setq filespec (concat "~/" filename)) +;; (setq filespec +;; (concat (file-name-as-directory (car the-list)) filename))) +;; (if (file-exists-p filespec) +;; (setq the-list nil) +;; (setq filespec nil) +;; (setq the-list (cdr the-list)))) +;; filespec)) + +(defun bib-cite-file-directory-p (file) + "Like default `file-directory-p' but allow FILE to end in // for ms-windows." + (save-match-data + (if (string-match "\\(.*\\)//$" file) + (file-directory-p (match-string 1 file)) + (file-directory-p file)))) + +(defun psg-list-env (env) + "Return a list of directory elements in ENV variable (w/o leading $) +argument may consist of environment variable plus a trailing directory, e.g. +HOME or HOME/bin (trailing directory not supported in dos or OS/2). + +`bib-dos-or-os2-variable' affects: + path separator used (: or ;) + whether backslashes are converted to slashes" + (if (not (getenv env)) + nil ;Because replace-regexp-in-string fails + (let* ((value (if bib-dos-or-os2-variable + (replace-regexp-in-string "\\\\" "/" (getenv env) t t) + (getenv env))) + (sep-char (or (and bib-dos-or-os2-variable ";") ":")) + (entries (split-string value sep-char))) + (cl-loop for x in entries if (bib-cite-file-directory-p x) collect x)))) + +(provide 'bib-cite) +;;; bib-cite.el ends here diff --git a/elpa/auctex-13.1.3/bib-cite.elc b/elpa/auctex-13.1.3/bib-cite.elc Binary files differnew file mode 100644 index 0000000..b1254b7 --- /dev/null +++ b/elpa/auctex-13.1.3/bib-cite.elc diff --git a/elpa/auctex-13.1.3/circ.tex b/elpa/auctex-13.1.3/circ.tex new file mode 100644 index 0000000..48a177e --- /dev/null +++ b/elpa/auctex-13.1.3/circ.tex @@ -0,0 +1,479 @@ +\documentclass[a4paper,twocolumn]{article} +\usepackage[german]{babel} +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\usepackage[showlabels,sections,floats,textmath,displaymath]{preview} +\newbox\chaos +\newdimen\tdim +\def\fframe{% +\tdim=\columnwidth +\advance\tdim by -2\fboxsep +\advance\tdim by -2\fboxrule +\setbox\chaos=\hbox\bgroup\begin{minipage}{\tdim}} +\def\endfframe{\end{minipage}\egroup\fbox{\box\chaos}} +\unitlength 1mm +\newcount\fives +\fives 14 +\newcount\ones +\ones\fives +\multiply \ones by 5 +\newsavebox{\raster} +\savebox{\raster}(\ones,\ones) +{\thicklines + \put(0,0){\line(0,1){\ones}} + \put(0,0){\line(1,0){\ones}} + \multiput(0,0)(5,0){\fives} + {\begin{picture}(0,0) + \put(5,0){\line(0,1){\ones}} + \thinlines\multiput(1,0)(1,0){4}{\line(0,1){\ones}} + \end{picture}} + \multiput(0,0)(0,5){\fives} + {\begin{picture}(0,0) + \put(0,5){\line(1,0){\ones}} + \thinlines\multiput(0,1)(0,1){4}{\line(1,0){\ones}} + \end{picture}} +} +\begin{document} +\title{Einfache Kurven auf Rastergrafiken} +\author{David Kastrup} +\maketitle + +\begin{abstract} +Es sollen hier einfache Methoden vorgestellt werden, um auf einer +Rastereinheit verschiedene Kurven darzustellen. Vorgestellt werden +Zeichenalgorithmen fr Linien, Kreise und Hyperbeln. Die hier +hergeleiteten Gleichungen sind auch unter dem Namen {\tt DDA}s bekannt. +\end{abstract} + +\section{Einfhrung} +Bei den hier vorgestellten Algorithmen werden zunchst nur +Kurvenstcke betrachtet, die die folgenden Eigenschaften besitzen: +\begin{enumerate} +\item Sie lassen sich als Funktion $y = f(x)$ darstellen. +\item $y$ ist im betrachteten Bereich monoton, das heit, entweder + durchgehend steigend oder durchgehend fallend. +\item Wenn $x$ sich um $1$ ndert, so ndert sich $y$ betragsmig + hchstens um $1$ + ($\left|\frac{\partial y}{\partial x}\right| \leq 1$). +\end{enumerate} + +\section{Die gerade Linie} +Wir betrachten hier zunchst nur die gerade Linie im ersten Oktanten, +die durch den Punkt $0 \choose 0$ geht. Alle anderen Linien lassen +sich durch Vertauschen von $x$ und~$y$ sowie Vorzeichenwechsel +erzeugen. Im ersten Oktanten gilt $x \geq y \geq 0$. Zum Zeichnen +einer Linie gengt es also, $x$ durchlaufen zu lassen und fr $y$ die +dazugehrigen Werte zu berechnen und zu runden. + +Die Gleichung einer Geraden durch $\Delta x \choose \Delta y$ lautet: +\begin{equation} +\label{lgi} +y = \frac{\Delta y}{\Delta x}x +\end{equation} +% +Nun stellen wir $y$ als Summe eines ganzzahligen Wertes $e$ und eines +gebrochenen Wertes $f$ dar, fr den gilt: $-0.5 \leq f < 0.5$. Somit +stellt dann $e$ den gewnschten, auf die nchste ganze Zahl gerundeten +$y$-Wert dar. Jetzt formen wir (\ref{lgi}) um: +\begin{eqnarray} +e + f &=& x \frac{\Delta y}{\Delta x}\nonumber\\ +e \Delta x + f \Delta x &=& x \Delta y\nonumber\\ +f \Delta x - \left\lceil\frac{\Delta x}2\right\rceil &=& +x \Delta y - e \Delta x - \left\lceil\frac{\Delta x}2\right\rceil \label{lgii} +\end{eqnarray} +% +Den linken Ausdruck in (\ref{lgii}) bezeichnen wir jetzt mit $d$. Fr +positive gerade Werte von $\Delta x$ ist offensichtlich $d < 0$ eine +zu~$f < 0.5$ equivalente Bedingung. + +Fr ungerade Werte von~$\Delta x$ ist $f < 0.5$ equivalent zu +$d + 0.5 < 0$. +Da $d$ stets eine ganze Zahl ist, ist dies wieder zu $d < 0$ +equivalent. + +% INTENTIONAL ERRORS! INTENTIONAL ERRORS! INTENTIONAL ERRORS! +% +% The following line should flag a PostScript error when previewing, +% but processing of other previews should continue. +% +Wird nun $\ifPreview\special{ps: junk}\fi f \geq 0.5$, wie sich durch +den Vergleich $d \stackrel{?}{<} 0$ feststellen lt, so mu man +korrigieren, indem man $f$ um~1 erniedrigt und $e$ um~$1$ erhht. +% +% The following line will make Ghostscript abort unexpectedly when +% previewing, but processing of other previews should continue. +% +$\ifPreview\special{ps: quit}\fi d$ mu dann auch entsprechend +angepat werden. + +Mit den angegebenen Formeln ergibt sich jetzt bei Bercksichtigung der +Einflsse von $x$ und $e$ auf $d$ der in Tabelle~\ref{linalg} +angegebene Algorithmus. Eine optimierte C-function, die die +Oktantenaufteilung bercksichtigt, ist in Tabelle~\ref{linc} zu +finden. Einige hiermit gezeichnete Linien sind in +Abbildung~\ref{linpict} zu sehen. +\begin{table} + \caption{Linienzugalgorithmus} \label{linalg} + \begin{fframe} + \begin{enumerate} + \item Setze $x \gets 0$, $y \gets 0$, $d \gets + -\left\lceil\frac{\Delta x}2\right\rceil$ + \item Wiederhole bis $x = \Delta x$ + \begin{enumerate} + \item Zeichne Punkt an $x \choose y$ + \item Setze $x \gets x + 1$, $d \gets d + \Delta y$ + \item Falls $d \geq 0$ + \begin{enumerate} + \item Setze $d \gets d - \Delta x$ + \item Setze $y \gets y + 1$ + \end{enumerate} + \end{enumerate} + \end{enumerate} + \end{fframe} +\end{table} +\begin{table} +\caption{Linienziehen in C} \label{linc} +\begin{fframe} +\small +\begin{verbatim} +extern int x,y; +/* (x,y) ist Koordinate des nicht + * gezeichneten Startpunktes, zeigt + * nachher auf gezeichneten Endpunkt + */ +#define doline(dx,dy,advx,advy) { \ + d = -(((i = dx) + 1) >> 1); \ + while (i--) { \ + advx; \ + if ((d += dy) >= 0) { \ + d -= dx; advy; \ + } \ + dot(x,y); \ + } \ + return; \ +} /* Grundalgorithmus 1. Oktant */ +/* dx ist Distanz in unabh. Richtung, * + * dy in abh. Richtung, advx geht * + * in unabh. Richtung, advy in abh. */ + +#define docond(cond,advx,advy) { \ + if (cond) doline(dx,dy,advx,advy) \ + doline(dy,dx,advy,advx) \ +} /* Grundalgorithmus 1./2. Oktant */ +/* cond ist true falls |dx| > |dy| */ + +void +linedraw(int dx, int dy) +/* Von (x,y) nach (x+dx, y+dx). */ +{ + int i; + + if (dx >= 0) { + if (dy >= 0) + docond(dx > dy, ++x, ++y) + docond(dx > (dy = -dy), ++x, --y) + } + if (dy >= 0) + docond((dx = -dx) > dy,--x,++y) + docond((dx = -dx) > (dy = -dy), + --x, --y ) +} +\end{verbatim} +\end{fframe} +\end{table} +\begin{figure} + \begin{picture}(\ones,\ones) \put(0,0){\usebox{\raster}} + \newcount\x + \newcount\y + \newcount\d + \newcount\dx + \newcount\dy + \x 0 + \y 0 + \dx \ones + \dy \ones + \loop %{ + \d -\dx + \divide \d by 2 %} + \ifnum \dy > 0 %{ + {\loop %{ + \put(\x,\y){\circle*{1}}%} + \ifnum \x < \ones %{ + \advance \x by 1 + \advance \d by \dy %} + \ifnum \d > -1 %{ + \advance \y by 1 + \advance \d by -\dx %} + \fi %}} + \repeat} + \advance \x by 5 + \advance \dx by -5 + \advance \dy by -15 %} + \repeat + \end{picture} +\caption{Einige Linien}\label{linpict} +\end{figure} + +\section{Der Kreis} +Wir betrachten hier nur den Achtelkreis im zweiten Oktanten +($y \geq x \geq 0$). Hier gelten die oben angegebenen Beziehungen. +Alle anderen Achtelkreise lassen sich durch elementare Spiegelungen +erzeugen. + +Die Gleichung eines Kreises ist hier +\begin{equation} +y = \sqrt{r^2 - x^2} +\end{equation} + +Der Wert $y$ lt sich darstellen als Summe einer ganzen Zahl $e$ und +einem Wert $f$ mit $-0.5 \leq f < 0.5$. Der Wertebereich von $f$ ist +so gewhlt worden, damit $e$ einen auf ganze Zahlen gerundeten Wert +fr $y$ darstellt. + +Nun gilt: +\begin{eqnarray} +e + f&=&\sqrt{r^2 - x^2}\nonumber\\ +\label{ggg}e^2 + 2ef + f^2&=&r^2 - x^2 +\end{eqnarray} +% +Die Gleichung (\ref{ggg}) hat fr $x+1$ folgende Form: +\begin{eqnarray} +\label{hhh}e'^2 + 2e'f' + f'^2&=&r^2 - x^2 - 2x -1 +\end{eqnarray} +% +Zieht man die Gleichung (\ref{ggg}) von (\ref{hhh}) ab, so ergibt sich +nach Umsortieren: +\begin{eqnarray*} + e' = e:\\ + 2e'f' + f'^2&=&2ef+f^2-2x-1\\ + e' = e-1:\\ + 2e'f' + f'^2&=&2ef+f^2+2e-2x-2 +\end{eqnarray*} +% +Jetzt wird $2ef + f^2$ mit $m$ getauft. Also: +\begin{eqnarray*} + e' = e:\\ + m'&=&m -2x-1\\ + e' = e-1:\\ + m'&=&m +2e-1 -2x-1 +\end{eqnarray*} +Wie gro ist jetzt $m$? Fr $x=0$ ist es sicher $0$. Solange $e$ +konstant bleibt, schrumpft $f$ stetig. Fllt $f$ unter $-0.5$, so +fllt $m$ (unter Vernachlssigung von $f^2$) unter $-e$. Dies wird +jetzt als Kriterium fr einen Unterlauf von $f$ verwendet. Tritt +dieser auf, so mu $f$ um $1$ erhht und $e$ um $1$ erniedrigt werden. + +Um die Abfragebedingung zu vereinfachen, setzt man jetzt $q$ = $m+e$. +Der resultierende Algorithmus ist in Tabelle \ref{alg}, ein +optimiertes C-Programm ist in Tabelle \ref{prog} zu finden. +\begin{table} + \caption{Kreiszeichenalgorithmus}\label{alg} + \begin{fframe} + \begin{enumerate} + \item Setze $x\gets 0$, $y\gets r$, $q\gets r$ + \item Wiederhole bis $x>y$: + \begin{enumerate} + \item Setze einen Punkt an $x \choose y$. + \item Setze $q\gets q-2x-1$ + \item Falls $q<0$ + \begin{enumerate} + \item Setze $q\gets q + 2y-2$ + \item Setze $y\gets y-1$ + \end{enumerate} + \item Setze $x\gets x+1$ + \end{enumerate} + \end{enumerate} + \end{fframe} +\end{table} +\begin{table} + \caption{Kreiszeichenprogramm}\label{prog} + \begin{fframe} + \small +\begin{verbatim} +void +fourfold(int x0, int y0, int x, int y) +/* Zeichne in Oktant 1,3,5,7 */ +/* Wird benutzt, um Anfangs- und End- * + * Punkte nicht zweimal zu zeichnen */ +{ + dot(x0+x,y0+y); + dot(x0-y,y0+x); + dot(x0-x,y0-y); + dot(x0+y,y0-x); +} + +void +eightfold(int x0, int y0, int x, int y) +/* Zeichne in allen Quadranten */ +{ + fourfold(x0,y0,x,y); /* 1357 */ + fourfold(x0,y0,x,-y); /* 8642 */ +} + +void +circle(int x0, int y0, int r) +{ + fourfold(x0,y0,0,r); + /* Die ersten vier Punkte */ + for (x=0, y=q=r;; ) { + if ((q -= 2* x++ + 1) < 0) + q += 2* --y; + if (x >= y) + break; + eightfold(x0,y0,x,y); + } + if (x==y) + fourfold(x0,y0,x,y); + /* Eventuell die letzten vier */ +} +\end{verbatim} + \end{fframe} +\end{table} +\begin{figure} + \begin{picture}(\ones,\ones) + \put(0,0){\usebox{\raster}} + \newcount\x + \newcount\y + \newcount\q + \loop + {\x 0 + \y \ones + \q \ones + \loop + \put(\x,\y){\circle*{1}} + \put(\y,\x){\circle*{1}} + \advance \q by -\x + \advance \x by 1 + \advance \q by -\x + \ifnum \x < \y + \ifnum \q < 0 + \advance \y by -1 + \advance \q by \y + \advance \q by \y + \fi + \repeat} + \advance \ones by -10 + \ifnum \ones > 0 + \repeat + \end{picture} + \caption{Viertelkreise}\label{zeich} +\end{figure} + +\section{Einfache Hyperbeln} +Als letztes Beispiel betrachten wir hier Hyperbeln, die der Formel +$y = r^2\!/x$ gengen, und zwar im Bereich~$x \geq r$. + +Mit dem Ansatz $y = e + f$ ergibt sich: +\begin{eqnarray} + e+f &=& r^2\!/x\nonumber\\ + ex + fx &=& r^2\nonumber\\ + fx &=& r^2 - ex\label{phyp} +\end{eqnarray} +\pagebreak[2] +Fr $x' = x+1$ hat nun (\ref{phyp}) die Form +\begin{eqnarray*} + e' = e:\\ + f'x' &=& r^2 - ex - e\\ + e' = e - 1:\\ + f'x' &=& r^2 - ex - e + x + 1 +\end{eqnarray*} +Setzt man jetzt $d = (2f + 1)x$, so ist $f < -0.5$ mit~$d < 0$ +equivalent. Erreicht man diesen Fall unter Verwendung der Annahme +$e' = e$, +dann mu in bekannter Weise $f$ um~$1$ erhht und $e$ um~$1$ +vermindert werden. + +\pagebreak +Fr $d'$ ergeben sich dann die folgenden Werte: +\begin{eqnarray*} + e' = e:\\ + d' &=& d - 2e + 1\\ + e' = e - 1:\\ + d' &=& d - 2e + 2x + 2 + 1 +\end{eqnarray*} +Daraus ergibt sich der in Tabelle~\ref{halg} angegebene +Hyperbelalgorithmus fr den ersten Oktanten. +\begin{table} + \caption{Hyperbelalgorithmus}\label{halg} + \begin{fframe} + \begin{enumerate} + \item Setze $d \gets r$, $x \gets r$, $y \gets r$ + \item Wiederhole bis zufrieden + \begin{enumerate} + \item Setze Punkt an $x \choose y$ + \item Setze $x \gets x + 1$ + \item Setze $d \gets d - 2y + 1$ + \item Falls $d < 0$ + \begin{enumerate} + \item Setze $d \gets d + 2x$ + \item Setze $y \gets y - 1$ + \end{enumerate} + \end{enumerate} + \end{enumerate} + \end{fframe} +\end{table} +\begin{table} + \caption{Hyperbeln in C} + \begin{fframe} + \small +\begin{verbatim} +void +four(int x0, int y0, int x, int y) +/* Hyperbeln sind nur in 4 Oktanten */ +{ + dot(x0+x,y0+y); + dot(x0+y,y0+x); + dot(x0-x,y0-y); + dot(x0-y,y0-x); +} + +void +hyperb(int x0, int y0, int r, int dx) +{ + int d, x, y; + + for (x = y = d = r; dx--;) { + four(x0,y0,x,y); + ++x; + if ((d -= 2*y + 1) < 0) { + d += 2*x; + --y; + } + } +} +\end{verbatim} + \end{fframe} +\end{table} +\begin{figure} + \begin{picture}(\ones,\ones) + \put(0,0){\usebox{\raster}} + \newcount\x + \newcount\y + \newcount\q + \newcount\r + \r\ones + \loop + \advance \r by -10 + \ifnum \r > 0 + {\x \r + \y \r + \q \r + \loop + \put(\x,\y){\circle*{1}} + \put(\y,\x){\circle*{1}} + \ifnum \x < \ones + \advance \x by 1 + \advance \q by -\y + \advance \q by -\y + \advance \q by 1 + \ifnum \q < 0 + \advance \q by \x + \advance \q by \x + \advance \y by -1 + \fi + \repeat} + \repeat + \end{picture} + \caption{Hyperbeln}\label{hzeich} +\end{figure} +\end{document} diff --git a/elpa/auctex-13.1.3/context-en.el b/elpa/auctex-13.1.3/context-en.el new file mode 100644 index 0000000..f4b8fdf --- /dev/null +++ b/elpa/auctex-13.1.3/context-en.el @@ -0,0 +1,227 @@ +;;; context-en.el --- Support for the ConTeXt english interface. -*- lexical-binding: t; -*- + +;; Copyright (C) 2003-2004, 2006, 2008 +;; 2010, 2014, 2020, 2021 Free Software Foundation, Inc. + +;; Maintainer: Berend de Boer <berend@pobox.com> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file is loaded by context.el when required. + +;;; Code: + +;; Build upon ConTeXt +(require 'context) + +;;; ConText macro names + +;;; Code: +(defvar ConTeXt-environment-list-en + '("alignment" "appendices" + "background" "backmatter" "bodymatter" "bodypart" "buffer" + "code" "color" "columns" "combination" + "encoding" "extroductions" + "fact" "formula" "framedcode" "framedtext" "frontmatter" + "helptext" "hiding" + "itemize" + "legend" "line" "linecorrection" "linenumbering" "lines" + "localenvironment" "localfootnotes" + "makeup" "mapping" "marginblock" "marginedge" "marginrule" "mode" + "narrower" "notmode" + "opposite" + "packed" "pagecomment" "pagefigure" "positioning" "postponing" + "quotation" + "raster" "register" + "standardmakeup" + "table" "tabulate" "TEXpage" "text" "textbackground" "typing" + "unpacked" + ;; project structure + "component" "environment" "product" "project" + ;; flowcharts, if you have loaded this module + "FLOWcell" "FLOWchart" + ;; typesetting computer languages + "EIFFEL" "JAVA" "JAVASCRIPT" "MP" "PASCAL" "PERL" "SQL" "TEX" "XML" + ;; some metapost environments + "MPpositiongraphic" "useMPgraphic" "MPcode" "reusableMPgraphic" + "uniqueMPgraphic") + "List of the ConTeXt en interface start/stop pairs.") + +(defvar ConTeXt-define-list-en + '("accent" + "background" "blank" "block" "blocks" "bodyfont" "bodyfontenvironment" + "buffer" + "casemap" "character" "color" "colorgroup" "combinedlist" "command" + "description" "enumeration" + "float" "font" "fontsynonym" "framedtext" "head" + "indenting" "label" + "logo" "overlay" + "palet" "program" "startstop" "type" "typing") + "List of the names of ConTeXt en interface macro's that define things.") + +(defvar ConTeXt-setup-list-en + '("align" "arranging" "background" "backgrounds" "blackrules" + "blank" "block" "bodyfont" "bodyfontenvironment" "bottom" + "bottomtexts" "buffer" "capitals" "caption" "captions" "color" + "colors" "columns" "combinations" "combinedlist" "descriptions" + "enumerations" "externalfigures" "fillinlines" "fillinrules" "float" + "floats" "footer" "footertexts" "footnodedefinition" "footnotes" + "framed" "framedtexts" "head" "header" "headertexts" "headnumber" + "heads" "headtext" "hyphenmark" "indentations" "indenting" "inmargin" + "interlinespace" "itemize" "items" "labeltext" "language" "layout" + "linenumbering" "lines" "list" "makeup" "marginblocks" + "marginrules" "marking" "narrower" "oppositeplacing" + "pagecomment" "pagenumber" "pagenumbering" "palet" "papersize" "paragraphs" + "quote" "referencing" "register" + "screens" "section" "sectionblock" "sorting" "spacing" + "subpagenumber" "synonyms" "text" "textrules" "texttexts" "thinrules" + "tolerance" "top" "toptexts" "type" "typing" "underbar" "whitespace") + "List of the names of ConTeXt en interface macro's that setup things.") + +;; referencing in ConTeXt +(defvar ConTeXt-referencing-list-en + '("in" "at" "about" "pagereference" "textreference" "reference") + "List of ConTeXt en macro's that are used for referencing." +) + +;; lists some place macro's as well, should perhaps be under separate menu +(defvar ConTeXt-other-macro-list-en + '("abbreviation" "adaptlayout" "at" "combinepages" "copypages" + "externalfigure" "framed" "from" "input" "insertpages" "filterpages" + "getbuffer" "goto" + "hideblocks" "keepblocks" + "leftaligned" "midaligned" + "obeyspaces" + "page" + "placecontent" "placeexternalfigure" "placefigure" "placelogos" "placetable" + "processblocks" "protect" + "raggedcenter" "rightaligned" "rotate" + "scale" "selectblocks" "showexternalfigures" "slicepages" + "useexternalfigure" "unprotect" "url" "useblocks" "usemodule" "useURL" + "version") + "List of ConTeXt en interface macro's that are not an environment nor a setup.") + +(defun ConTeXt-define-command-en (what) + "The ConTeXt en interface way of creating a define command." + (concat "define" what)) + +(defun ConTeXt-setup-command-en (what) + "The ConTeXt en interface way of creating a setup command." + (concat "setup" what)) + +(defvar ConTeXt-project-structure-list-en + '("project" "environment" "product" "component") + "List of ConTeXt project structure elements for its en interface. +List should be in logical order.") + +(defvar ConTeXt-section-block-list-en + '("frontmatter" "bodymatter" "appendices" "backmatter") + "List of ConTeXt section block names for its en interface. +List should be in logical order.") + + +;; TODO: +;; ConTeXt has alternative sections like title and subject. Currently +;; the level is used to find the section name, so the alternative +;; names are never found. Have to start using the section name instead +;; of the number. +(defvar ConTeXt-numbered-section-list-en + '(("part" 0) + ("chapter" 1) + ("section" 2) + ("subsection" 3) + ("subsubsection" 4)) + "List of the names of ConTeXt numbered sections for its en interface.") + +(defvar ConTeXt-unnumbered-section-list-en + '(("title" 1) + ("subject" 2) + ("subsubject" 3) + ("subsubsubject" 4)) + "List of the names of ConTeXt unnumbered sections for its en interface.") + +(defvar ConTeXt-section-list-en + (append ConTeXt-numbered-section-list-en ConTeXt-unnumbered-section-list-en) +) + + +(defvar ConTeXt-text-en "text" + "The ConTeXt en interface body text group.") + +(defvar ConTeXt-item-list-en + '("item" "its" "mar" "ran" "sub" "sym") + "The ConTeXt macro's that are variants of item.") + +(defcustom ConTeXt-default-environment-en "itemize" + "The default environment when creating new ones with `ConTeXt-environment'." + :group 'ConTeXt-en-environment + :type 'string) + +(defvar ConTeXt-extra-paragraph-commands-en + '("crlf" "par" "place[A-Za-z]+") + "List of ConTeXt macros that should have their own line. +That is, besides the section(-block) commands.") + +;; Emacs en menu names and labels should go here +;; to be done + + +;;; Mode + +(defun ConTeXt-en-mode-initialization () + "ConTeXt english interface specific initialization." + (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-en)) + + (TeX-add-symbols + '("but" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("item" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("items" [ConTeXt-arg-setup] (TeX-arg-string "Comma separated list")) + '("its" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("nop" (TeX-arg-literal " ")) + '("ran" TeX-arg-string (TeX-arg-literal " ")) + '("sub" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " ")))) + +;;;###autoload +(defun context-en-mode () + "Major mode for editing files for ConTeXt using its english interface. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." + (interactive) + ;; set the ConTeXt interface + (setq ConTeXt-current-interface "en") + + ;; initialization + (ConTeXt-mode-common-initialization) + (ConTeXt-en-mode-initialization) + + ;; set mode line + (setq TeX-base-mode-name "ConTeXt-en") + (TeX-set-mode-name)) + +(provide 'context-en) + +;;; context-en.el ends here diff --git a/elpa/auctex-13.1.3/context-en.elc b/elpa/auctex-13.1.3/context-en.elc Binary files differnew file mode 100644 index 0000000..ecd84cc --- /dev/null +++ b/elpa/auctex-13.1.3/context-en.elc diff --git a/elpa/auctex-13.1.3/context-nl.el b/elpa/auctex-13.1.3/context-nl.el new file mode 100644 index 0000000..9b49cce --- /dev/null +++ b/elpa/auctex-13.1.3/context-nl.el @@ -0,0 +1,203 @@ +;;; context-nl.el --- Support for the ConTeXt dutch interface. -*- lexical-binding: t; -*- + +;; Copyright (C) 2003, 2004, 2006, 2010, +;; 2015, 2020, 2021 Free Software Foundation, Inc. + +;; Maintainer: Berend de Boer <berend@pobox.com> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file is loaded by context.el when required. + +;;; Code: + +;; Build upon ConTeXt +(require 'context) + +;;; ConText macro names + +(defvar ConTeXt-environment-list-nl + '("achtergrond" "alinea" "bloktekst" "buffer" "citaat" "combinatie" + "commentaar" "deelomgeving" "document" "doordefinitie" + "doornummering" "figuur" "formule" "gegeven" "interactiemenu" + "kadertekst" "kantlijn" "kleur" "kolommen" "legenda" "lokaal" + "lokalevoetnoten" "margeblok" "naamopmaak" "naast" + "opelkaar" "opmaak" "opsomming" "overlay" "overzicht" + "paginafiguur" "positioneren" "profiel" + "regel" "regelcorrectie" "regelnummeren" "regels" + "smaller" "symboolset" "synchronisatie" + "tabel" "tabellen" "tabulatie" "tekstlijn" "typen" + "uitlijnen" "uitstellen" "vanelkaar" "verbergen" "versie" + ;; project structure + "omgeving" "onderdeel" "produkt" "project" + ;; flowcharts, if you have loaded this module + "FLOWcell" "FLOWchart" + ;; typesetting computer languages + "EIFFEL" "JAVA" "JAVASCRIPT" "MP" "PASCAL" "PERL" "SQL" "TEX" "XML" + ;; some metapost environments + "MPpositiongraphic" "useMPgraphic" "MPcode" "reusableMPgraphic" + "uniqueMPgraphic") + "List of the ConTeXt nl interface start/stop pairs.") + +(defvar ConTeXt-define-list-nl + '("achtergrond" "startstop" "typen") + "List of ConTeXt nl interface macro's that define things.") + +(defvar ConTeXt-setup-list-nl + '("achtergronden" "achtergrond" "alineas" "arrangeren" "blanko" + "blok" "blokjes" "blokkopje" "blokkopjes" "boven" "boventeksten" + "brieven" "buffer" "buttons" "citeren" "clip" "combinaties" + "commentaar" "doordefinieren" "doornummeren" "doorspringen" + "dunnelijnen" "externefiguren" "formules" "formulieren" + "hoofd" "hoofdteksten" "inmarge" "inspringen" "interactiebalk" + "interactie" "interactiemenu" "interactiescherm" "interlinie" + "invullijnen" "invulregels" "items" "kaderteksten" "kantlijn" + "kapitalen" "kleuren" "kleur" "kolommen" "kop" "kopnummer" + "koppelteken" "koppen" "koptekst" "korps" "korpsomgeving" + "labeltekst" "layout" "legenda" "lijndikte" "lijn" "lijst" + "margeblokken" "markering" "naastplaatsen" "nummeren" "omlijnd" + "onder" "onderstrepen" "onderteksten" "opmaak" "opsomming" + "paginanummer" "paginanummering" "paginaovergangen" "palet" + "papierformaat" "papier" "paragraafnummeren" "plaatsblok" + "plaatsblokken" "plaatsblokkensplitsen" "positioneren" "profielen" + "programmas" "publicaties" "rasters" "referentielijst" "refereren" + "regelnummeren" "regels" "register" "roteren" "samengesteldelijst" + "sectieblok" "sectie" "sheets" "smaller" "sorteren" "spatiering" + "stickers" "strut" "strut" "subpaginanummer" "symboolset" + "synchronisatiebalk" "synchronisatie" "synoniemen" "systeem" + "taal" "tabellen" "tab" "tabulatie" "tekst" "tekstlijnen" + "tekstpositie" "tekstteksten" "tekstvariabele" "tolerantie" "type" + "typen" "uitlijnen" "uitvoer" "url" "velden" "veld" "versies" + "voet" "voetnootdefinitie" "voetnoten" "voetteksten" "witruimte") + "List of the names of ConTeXt nl interface macro's that setup things.") + +;; referencing in ConTeXt +(defvar ConTeXt-referencing-list-nl + '("in" "op" "over" "paginareferentie" "tekstreferentie" "referentie") + "List of ConTeXt nl macro's that are used for referencing." +) + +(defvar ConTeXt-other-macro-list-nl + '("regellinks" "regelmidden" "regelrechts" "toonexternefiguren") + "List of ConTeXt nl interface macro's that are not an environment nor a setup.") + +(defun ConTeXt-define-command-nl (what) + "The ConTeXt nl interface way of creating a define command." + (concat "definieer" what)) + +(defun ConTeXt-setup-command-nl (what) + "The ConTeXt nl interface way of creating a setup command." + (concat "stel" what "in")) + +(defvar ConTeXt-project-structure-list-nl + '("project" "omgeving" "produkt" "onderdeel") + "List of ConTeXt project structure elements for its nl interface. +List should be in logical order.") + +(defvar ConTeXt-section-block-list-nl + '("inleidingen" "hoofdteksten" "bijlagen" "uitleidingen") + "List of ConTeXt section block names for its nl interface. +List should be in logical order.") + + +;; TODO: +;; ConTeXt has alternative sections like title and subject. Currently +;; the level is used to find the section name, so the alternative +;; names are never found. Have to start using the section name instead +;; of the number. +(defvar ConTeXt-numbered-section-list-nl + '(("deel" 0) + ("hoofdstuk" 1) + ("paragraaf" 2) + ("subparagraaf" 3) + ("subsubparagraaf" 4)) + "List of the names of ConTeXt numbered sections for its nl interface.") + +(defvar ConTeXt-unnumbered-section-list-nl + '(("titel" 1) + ("onderwerp" 2) + ("subonderwerp" 3) + ("subsubsubsubject" 4)) + "List of the names of ConTeXt unnumbered sections for its nl interface.") + +(defvar ConTeXt-text-nl "tekst" + "The ConTeXt nl interface body text group.") + +(defvar ConTeXt-item-list-nl + '("som" "its" "mar" "ran" "sub" "sym") + "The ConTeXt macro's that are variants of item.") + +(defcustom ConTeXt-default-environment-nl "opsomming" + "The default environment when creating new ones with `ConTeXt-environment'." + :group 'ConTeXt-nl-environment + :type 'string) + +(defvar ConTeXt-extra-paragraph-commands-nl + '("crlf" "par" "plaats[A-Za-z]+") + "List of ConTeXt macros that should have their own line. +That is, besides the section(-block) commands.") + +;; Emacs en menu names and labels should go here +;; to be done + + +;;; Mode + +(defun ConTeXt-nl-mode-initialization () + "ConTeXt dutch interface specific initialization." + (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl)) + + (TeX-add-symbols + '("but" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("som" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("items" [ConTeXt-arg-setup] (TeX-arg-string "Comma separated list")) + '("its" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("nop" (TeX-arg-literal " ")) + '("ran" TeX-arg-string (TeX-arg-literal " ")) + '("sub" ConTeXt-arg-define-ref (TeX-arg-literal " ")) + '("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " ")))) + +;;;###autoload +(defun context-nl-mode () + "Major mode for editing files for ConTeXt using its dutch interface. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." + (interactive) + + ;; set the ConTeXt interface + (setq ConTeXt-current-interface "nl") + + ;; initialization + (ConTeXt-mode-common-initialization) + (ConTeXt-nl-mode-initialization) + + ;; set mode line + (setq TeX-base-mode-name "ConTeXt-nl") + (TeX-set-mode-name)) + +(provide 'context-nl) + +;;; context-nl.el ends here diff --git a/elpa/auctex-13.1.3/context-nl.elc b/elpa/auctex-13.1.3/context-nl.elc Binary files differnew file mode 100644 index 0000000..18da1d3 --- /dev/null +++ b/elpa/auctex-13.1.3/context-nl.elc diff --git a/elpa/auctex-13.1.3/context.el b/elpa/auctex-13.1.3/context.el new file mode 100644 index 0000000..e87feec --- /dev/null +++ b/elpa/auctex-13.1.3/context.el @@ -0,0 +1,1837 @@ +;;; context.el --- Support for ConTeXt documents. -*- lexical-binding: t; -*- + +;; Copyright (C) 2003-2022 Free Software Foundation, Inc. + +;; Maintainer: Berend de Boer <berend@pobox.com> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This is in progress ConTeXt support for AUCTeX. Please report +;; anomalies or things you believe should be added. + +;; AUCTeX is closely interwoven with LaTeX. We have to split up +;; things without breaking 'em. + +;; some parts are stolen from latex.el and adapted to ConTeXt. + +;; TODO +;; 1. indentation still bad. +;; 2. paragraph refilling doesn't work 100%, and is very slow. +;; 4. Remove dependency on LaTeX by moving LaTeX commands to TeX. +;; 5. Most ConTeXt macro's don't currently have lisp code to query for +;; arguments. As ConTeXt arguments are quite complex, the LaTeX way +;; of querying for arguments just doesn't cut it. +;; 6. Check auto-parsing: does it detect % interface=nl for example? +;; 7. Complete adding ConTeXt macro's. Perhaps parse cont-en.xml and +;; generate the interfaces? +;; 8. Add to menu: make TeX hash (mktexlsr), context format and metapost format. + +;; TODO Documentation +;; 1. multifile done differently with ConTeXt + +;;; Code: + +(require 'tex) +(require 'latex) ; for functions like `TeX-look-at' and `LaTeX-split-long-menu' +(require 'plain-tex) ; for `plain-TeX-common-initialization' + +;; Silence the compiler: +(defvar ConTeXt-extra-paragraph-commands) + +(defgroup ConTeXt-macro nil + "Special support for ConTeXt macros in AUCTeX." + :prefix "TeX-" + :group 'ConTeXt + :group 'TeX-macro) + +;; others + +(defvar ConTeXt-known-interfaces '("cz" "de" "en" "it" "nl" "ro" "uk")) + +(defcustom ConTeXt-default-interface "en" + "Default interface to be used when running ConTeXt." + :group 'ConTeXt + :type 'string) + +(defvar ConTeXt-current-interface "en" + "Interface to be used for inserting macros and ConTeXt run.") +(make-variable-buffer-local 'ConTeXt-current-interface) + +(defvar ConTeXt-menu-changed nil) +;; Need to update ConTeXt menu. +(make-variable-buffer-local 'ConTeXt-menu-changed) + +(defvar ConTeXt-largest-level nil + "Largest sectioning level within current document.") +(make-variable-buffer-local 'ConTeXt-largest-level) + +(defun ConTeXt-largest-level () + (TeX-update-style) + ConTeXt-largest-level) + + +;;; Syntax + +(defvar ConTeXt-optop "[" + "The ConTeXt optional argument opening character.") + +(defvar ConTeXt-optcl "]" + "The ConTeXt optional argument closing character.") + + +;; Define a ConTeXt macro + +(defvar ConTeXt-define-list () + "Calls ConTeXt-XX-define-list where XX is the current interface.") + +(defun ConTeXt-define-command (what) + "The ConTeXt macro to define WHAT." + (funcall + (intern (concat "ConTeXt-define-command-" ConTeXt-current-interface)) what)) + +(defun ConTeXt-insert-define (define) + "Insert the ConTeXt define macro DEFINE." + (insert TeX-esc (ConTeXt-define-command define)) + (newline) + (indent-according-to-mode) + (ConTeXt-arg-setup nil)) + + +;; Setup a ConTeXt macro + +(defvar ConTeXt-setup-list () + "Calls ConTeXt-XX-setup-list where XX is the current interface.") + +(defun ConTeXt-setup-command (what) + "The ConTeXt macro to setup WHAT." + (funcall + (intern (concat "ConTeXt-setup-command-" ConTeXt-current-interface)) what)) + +(defun ConTeXt-insert-setup (setup) + "Insert the ConTeXt setup macro SETUP." + (insert TeX-esc (ConTeXt-setup-command setup)) + (newline) + (indent-according-to-mode) + (ConTeXt-arg-setup nil)) + + +;; Referencing ConTeXt macro's + +(defvar ConTeXt-referencing-list () + "Calls ConTeXt-XX-referencing-list where XX is the current interface.") + +(defun ConTeXt-referencing-command (what) + "The ConTeXt macro to call WHAT is itself, no interface specific calls." + what) + +(defun ConTeXt-insert-referencing (what) + "Insert the ConTeXt referencing WHAT." + (insert TeX-esc (ConTeXt-referencing-command what)) + (newline) + (indent-according-to-mode) + (ConTeXt-arg-setup nil)) + + +;; Other ConTeXt macro's + +(defvar ConTeXt-other-macro-list () + "Calls ConTeXt-XX-other-macro-list where XX is the current interface.") + +(defun ConTeXt-other-macro-command (what) + "The ConTeXt macro to call WHAT is itself, no interface specific calls." + what) + +(defun ConTeXt-insert-other-macro (other-macro) + "Insert the ConTeXt other macro's macro OTHER-MACRO." + (insert TeX-esc (ConTeXt-other-macro-command other-macro)) + (newline) + (indent-according-to-mode) + (ConTeXt-arg-setup nil)) + + +;;; Project structure + +(defvar ConTeXt-project-structure-list () + "Calls ConTeXt-XX-project-structure where XX is the current interface.") + +(defun ConTeXt-project-structure (N) + "Insert a ConTeXt project structure. +N is in index into `ConTeXt-project-structure-list'." + (funcall (intern(concat + "ConTeXt-project-" + (nth N ConTeXt-project-structure-list) + "-insert")))) + +(defun ConTeXt-project-project-insert () + "Insert a basic template for a new ConTeXt project." + (save-excursion + (insert "% The following names are examples only\n") + (insert TeX-esc (ConTeXt-environment-start-name) (nth 0 ConTeXt-project-structure-list) " myproject") + (newline 2) + (insert TeX-esc (nth 1 ConTeXt-project-structure-list) " myenvironment") + (newline 2) + (insert TeX-esc (nth 2 ConTeXt-project-structure-list) " myproduct1") + (newline 2) + (insert TeX-esc (nth 2 ConTeXt-project-structure-list) " myproduct2") + (newline 2) + (insert TeX-esc (ConTeXt-environment-stop-name) (nth 0 ConTeXt-project-structure-list)))) + +(defun ConTeXt-project-environment-insert () + "Insert a basic template for the environment of a ConTeXt project." + (save-excursion + (insert "% The name 'myenvironment' is an example only.\n" + "% It must match the name in your project file.\n") + (insert TeX-esc (ConTeXt-environment-start-name) + (nth 1 ConTeXt-project-structure-list) " myenvironment\n\n") + (insert "% Put environment charateristics that must be defined at the " + "highest level here\n\n") + (insert TeX-esc (ConTeXt-environment-stop-name) + (nth 1 ConTeXt-project-structure-list)))) + +(defun ConTeXt-project-product-insert () + "Insert a basic template for a product of a ConTeXt project." + (save-excursion + (insert "% The following names are examples only\n") + (insert TeX-esc (ConTeXt-environment-start-name) + (nth 2 ConTeXt-project-structure-list) " myproduct1") + (newline 2) + (insert TeX-esc (nth 0 ConTeXt-project-structure-list) " myproject") + (newline 2) + (insert "% Components are optional. " + "You can also just start your document here.\n") + (insert TeX-esc (nth 3 ConTeXt-project-structure-list) " mycomponent1") + (newline 2) + (insert TeX-esc (nth 3 ConTeXt-project-structure-list) " mycomponent2") + (newline 2) + (insert TeX-esc (ConTeXt-environment-stop-name) + (nth 2 ConTeXt-project-structure-list)))) + +(defun ConTeXt-project-component-insert () + "Insert a basic template for a component of a ConTeXt project." + (save-excursion + (insert "% The following names are examples only\n") + (insert TeX-esc (ConTeXt-environment-start-name) + (nth 3 ConTeXt-project-structure-list) " mycomponent1") + (newline 2) + (insert TeX-esc (nth 0 ConTeXt-project-structure-list) " myproject\n") + (insert TeX-esc (nth 2 ConTeXt-project-structure-list) " myproduct1") + (newline 2) + (insert "% ... text here ...") + (newline 2) + (insert TeX-esc (ConTeXt-environment-stop-name) + (nth 3 ConTeXt-project-structure-list)))) + + +;;; Section blocks + +(defvar ConTeXt-section-block-list () + "Calls ConTeXt-XX-section-list where XX is the current interface.") + +(defun ConTeXt-section-block (section-block) + "Insert the ConTeXt section block SECTION-BLOCK." + (ConTeXt-environment-menu section-block)) + + +;;; Sections + +;; Declare dynamically scoped vars. +(defvar ConTeXt-title nil "Dynamically bound by `ConTeXt-section'.") +(defvar ConTeXt-name nil "Dynamically bound by `ConTeXt-section'.") +(defvar ConTeXt-level nil "Dynamically bound by `ConTeXt-section'.") +(defvar ConTeXt-done-mark nil "Dynamically bound by `ConTeXt-section'.") +(defvar ConTeXt-reference nil "Dynamically bound by `ConTeXt-section'.") + +(defun ConTeXt-section (arg) + "Insert a template for a ConTeXt section. +Determinate the type of section to be inserted, by the argument ARG. + +If ARG is nil or missing, use the current level. +If ARG is a list (selected by \\[universal-argument]), go downward one level. +If ARG is negative, go up that many levels. +If ARG is positive or zero, use absolute level: + + 0 : part + 1 : chapter + 2 : section + 3 : subsection + 4 : subsubsection + 5 : subsubsubsection + +Or: + + 0 : title + 1 : subject + 2 : subsubject + 3 : subsubsubject + +The following variables can be set to customize: + +`ConTeXt-numbered-section-hook' Hooks to run when inserting a section. +`ConTeXt-section-ref' Prefix to all section references." + + (interactive "*P") + (let* ((val (prefix-numeric-value arg)) + (ConTeXt-level (cond ((null arg) + (ConTeXt-current-section)) + ((listp arg) + (ConTeXt-down-section)) + ((< val 0) + (ConTeXt-up-section (- val))) + (t val))) + (ConTeXt-name (ConTeXt-numbered-section-name ConTeXt-level)) + (ConTeXt-title "") + (ConTeXt-reference nil) + (ConTeXt-done-mark (make-marker))) + (newline) + (run-hooks 'ConTeXt-numbered-section-hook) + (newline) + (if (marker-position ConTeXt-done-mark) + (goto-char (marker-position ConTeXt-done-mark))) + (set-marker ConTeXt-done-mark nil))) + +;; LaTeX has a max function here, which makes no sense. +;; I think you want to insert a section that is max ConTeXt-largest-level +(defun ConTeXt-current-section () + "Return the level of the section that contain point. +See also `ConTeXt-section' for description of levels." + (save-excursion + (min (ConTeXt-largest-level) + (if (re-search-backward outline-regexp nil t) + (+ 1 (- (ConTeXt-outline-level) (ConTeXt-outline-offset))) + (ConTeXt-largest-level))))) + +(defun ConTeXt-down-section () + "Return the value of a section one level under the current. +Tries to find what kind of section that have been used earlier in the +text, if this fail, it will just return one less than the current +section." + (save-excursion + (let ((current (ConTeXt-current-section)) + (next nil) + (regexp outline-regexp)) + (if (not (re-search-backward regexp nil t)) + (1+ current) + (while (not next) + (cond + ((eq (ConTeXt-current-section) current) + (if (re-search-forward regexp nil t) + (if (<= (setq next (ConTeXt-current-section)) current) ;Wow! + (setq next (1+ current))) + (setq next (1+ current)))) + ((not (re-search-backward regexp nil t)) + (setq next (1+ current))))) + next)))) + +(defun ConTeXt-up-section (arg) + "Return the value of the section ARG levels above this one." + (save-excursion + (if (zerop arg) + (ConTeXt-current-section) + (let ((current (ConTeXt-current-section))) + (while (and (>= (ConTeXt-current-section) current) + (re-search-backward outline-regexp + nil t))) + (ConTeXt-up-section (1- arg)))))) + +(defvar ConTeXt-numbered-section-list () + "ConTeXt-XX-numbered-section-list where XX is the current interface.") + +(defvar ConTeXt-unnumbered-section-list () + "ConTeXt-XX-unnumbered-section-list where XX is the current interface.") + +(defvar ConTeXt-section-list + (append ConTeXt-numbered-section-list ConTeXt-unnumbered-section-list) +) + +(defun ConTeXt-numbered-section-name (level) + "Return the name of the section corresponding to LEVEL." + (let ((entry (TeX-member level ConTeXt-numbered-section-list + (function (lambda (a b) (equal a (nth 1 b))))))) + (if entry + (nth 0 entry) + nil))) + +(defun ConTeXt-unnumbered-section-name (level) + "Return the name of the section corresponding to LEVEL." + (let ((entry (TeX-member level ConTeXt-unnumbered-section-list + (function (lambda (a b) (equal a (nth 1 b))))))) + (if entry + (nth 0 entry) + nil))) + +(defun ConTeXt-numbered-section-level (name) + "Return the level of the section NAME." + (let ((entry (TeX-member name ConTeXt-numbered-section-list + (function (lambda (a b) (equal a (nth 0 b))))))) + (if entry + (nth 1 entry) + nil))) + +(defun ConTeXt-unnumbered-section-level (name) + "Return the level of the section NAME." + (let ((entry (TeX-member name ConTeXt-unnumbered-section-list + (function (lambda (a b) (equal a (nth 0 b))))))) + (if entry + (nth 1 entry) + nil))) + + +;;; Section Hooks. + +(defcustom ConTeXt-numbered-section-hook + '(ConTeXt-numbered-section-heading + ConTeXt-section-title + ConTeXt-section-ref + ConTeXt-section-section) + "List of hooks to run when a new section is inserted. + +The following variables are set before the hooks are run + +`ConTeXt-level' - numeric section level, see the documentation of + `ConTeXt-section'. +`ConTeXt-name' - name of the sectioning command, derived from + `ConTeXt-level'. +`ConTeXt-title' - The title of the section, default to an empty + string. +`ConTeXt-done-mark' - Position of point afterwards, default nil + (meaning end). + +The following standard hooks exist - + +ConTeXt-numbered-section-heading: Query the user about the name +of the sectioning command. Modifies `ConTeXt-level' and +`ConTeXt-name'. + +ConTeXt-section-title: Query the user about the title of the +section. Modifies `ConTeXt-title'. + +ConTeXt-section-section: Insert ConTeXt section command according +to `ConTeXt-name', `ConTeXt-title', and `ConTeXt-reference'. If +`ConTeXt-title' is an empty string, `ConTeXt-done-mark' will be +placed at the point they should be inserted. + +ConTeXt-section-ref: Insert a reference for this section command. + +To get a full featured `ConTeXt-section' command, insert + + (setq ConTeXt-numbered-section-hook + \\='(ConTeXt-numbered-section-heading + ConTeXt-section-title + ConTeXt-section-section + ConTeXt-section-ref)) + +in your init file such as .emacs.d/init.el or .emacs." + :group 'ConTeXt-macro + :type 'hook + :options + '(ConTeXt-numbered-section-heading + ConTeXt-section-title + ConTeXt-section-ref + ConTeXt-section-section)) + +(defcustom ConTeXt-unnumbered-section-hook + '(ConTeXt-unnumbered-section-heading + ConTeXt-section-title + ConTeXt-section-ref + ConTeXt-section-section) + ;; FIXME: I can't see where this variable is used! + "List of hooks to run when a new section is inserted. + +The following variables are set before the hooks are run + +`ConTeXt-level' - numeric section level, see the documentation of + `ConTeXt-section'. +`ConTeXt-name' - name of the sectioning command, derived from + `ConTeXt-level'. +`ConTeXt-title' - The title of the section, default to an empty + string. +`ConTeXt-done-mark' - Position of point afterwards, default nil + (meaning end). + +The following standard hooks exist - + +ConTeXt-unnumbered-section-heading: Query the user about the name +of the sectioning command. Modifies `ConTeXt-level' and +`ConTeXt-name'. + +ConTeXt-section-title: Query the user about the title of the +section. Modifies `ConTeXt-title'. + +ConTeXt-section-section: Insert ConTeXt section command according +to `ConTeXt-name', `ConTeXt-title', and `ConTeXt-reference'. If +`ConTeXt-title' is an empty string, `ConTeXt-done-mark' will be +placed at the point they should be inserted. + +ConTeXt-section-ref: Insert a reference for this section command. + +To get a full featured `ConTeXt-section' command, insert + + (setq ConTeXt-unnumbered-section-hook + \\='(ConTeXt-unnumbered-section-heading + ConTeXt-section-title + ConTeXt-section-section + ConTeXt-section-ref)) + +in your init file such as .emacs.d/init.el or .emacs." + :group 'ConTeXt-macro + :type 'hook + :options + '(ConTeXt-unnumbered-section-heading + ConTeXt-section-title + ConTeXt-section-ref + ConTeXt-section-section)) + +;; Define before first use. +(defcustom ConTeXt-Mark-version "II" + "ConTeXt Mark version used for running ConTeXt." + :type 'string + :group 'TeX-command) +(make-variable-buffer-local 'ConTeXt-Mark-version) +(put 'ConTeXt-Mark-version 'safe-local-variable #'stringp) + +(defun ConTeXt-numbered-section-heading () + "Hook to prompt for ConTeXt section name. +Insert this hook into `ConTeXt-numbered-section-hook' to allow +the user to change the name of the sectioning command inserted +with `\\[ConTeXt-section]'." + (let ((string (completing-read + (concat "Select level (default " ConTeXt-name "): ") + ConTeXt-numbered-section-list + nil nil nil))) + ;; Update name + (if (not (zerop (length string))) + (setq ConTeXt-name string)))) + +(defun ConTeXt-unnumbered-section-heading () + "Hook to prompt for ConTeXt section name. +Insert this hook into `ConTeXt-unnumbered-section-hook' to allow +the user to change the name of the sectioning command inserted +with `\\[ConTeXt-section]'." + (let ((string (completing-read + (concat "Select level (default " ConTeXt-name "): ") + ConTeXt-unnumbered-section-list + nil nil nil))) + ;; Update name + (if (not (zerop (length string))) + (setq ConTeXt-name string)))) + +(defun ConTeXt-section-title () + "Hook to prompt for ConTeXt section title. +Insert this hook into `ConTeXt-(un)numbered-section-hook' to +allow the user to change the title of the section inserted with +`\\[ConTeXt-section]." + (setq ConTeXt-title (TeX-read-string "What title: "))) + +(defun ConTeXt-section-section () + "Hook to insert ConTeXt section command into the file. +Insert this hook into `ConTeXt-numbered-section-hook' after those hooks +which sets the `ConTeXt-name', `ConTeXt-title', and +`ConTeXt-reference' variables, but before those hooks which +assumes the section already is inserted." + (insert TeX-esc ConTeXt-name) + (cond ((null ConTeXt-reference)) + ((zerop (length ConTeXt-reference)) + (insert ConTeXt-optop) + (set-marker ConTeXt-done-mark (point)) + (insert ConTeXt-optcl)) + (t + (insert ConTeXt-optop ConTeXt-reference ConTeXt-optcl))) + (insert TeX-grop) + (if (zerop (length ConTeXt-title)) + (set-marker ConTeXt-done-mark (point))) + (insert ConTeXt-title TeX-grcl) + (newline) + ;; If RefTeX is available, tell it that we've just made a new section + (and (fboundp 'reftex-notice-new-section) + (funcall (symbol-function 'reftex-notice-new-section)))) + +(defun ConTeXt-section-ref () + "Hook to insert a reference after the sectioning command. +Insert this hook into `ConTeXt-numbered-section-hook' to prompt +for a label to be inserted after the sectioning command." + (setq ConTeXt-reference + (completing-read + (TeX-argument-prompt t nil + "Comma separated list of references") + (LaTeX-label-list) nil nil)) + ;; No reference or empty string entered? + (if (string-equal "" ConTeXt-reference) + (setq ConTeXt-reference nil))) + + +;; Various +(defun TeX-ConTeXt-sentinel (process name) + "Cleanup TeX output buffer after running ConTeXt." + (cond + ;; Mark IV + ((with-current-buffer TeX-command-buffer + (string= ConTeXt-Mark-version "IV")) + (cond ((TeX-TeX-sentinel-check process name)) + ((re-search-forward "fatal error: " nil t) + (message (concat name ": problems after " + (TeX-current-pages))) + (setq TeX-command-next TeX-command-default)) + (t + (message (concat name ": successfully formatted " + (TeX-current-pages))) + (setq TeX-command-next TeX-command-Show)))) + ;; Mark II + (t + (cond ((TeX-TeX-sentinel-check process name)) + ((save-excursion + ;; in a full ConTeXt run there will multiple texutil + ;; outputs. Just looking for "another run needed" would + ;; find the first occurence + (goto-char (point-max)) + (re-search-backward "TeXUtil " nil t) + (re-search-forward "another run needed" nil t)) + (message (concat "You should run ConTeXt again " + "to get references right, " + (TeX-current-pages))) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "removed files :" nil t) + (message "sucessfully cleaned up")) + ((re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange regexp --pg + (message (concat name ": successfully formatted " + (TeX-current-pages))) + (setq TeX-command-next TeX-command-Show)) + (t + (message (concat name ": problems after " + (TeX-current-pages))) + (setq TeX-command-next TeX-command-default))))) + (unless TeX-error-list + (run-hook-with-args 'TeX-after-compilation-finished-functions + (with-current-buffer TeX-command-buffer + (expand-file-name + (TeX-active-master (TeX-output-extension))))))) + + +;;; Environments + +(defgroup ConTeXt-environment nil + "Environments in ConTeXt." + :group 'ConTeXt-macro) + +;; TODO: interface awareness +(defcustom ConTeXt-default-environment "itemize" + "The default environment when creating new ones with `ConTeXt-environment'." + :group 'ConTeXt-environment + :type 'string) +(make-variable-buffer-local 'ConTeXt-default-environment) + +(TeX-auto-add-type "environment" "ConTeXt") + +(advice-add 'ConTeXt-add-environments :after #'ConTeXt--invalidate-menu) +(defun ConTeXt--invalidate-menu (&rest _) + "Mark the menu as being in need of a refresh." + (setq ConTeXt-menu-changed t)) + +;; (defvar ConTeXt-environment-list () +;; "ConTeXt-environment-list-XX where XX is the current interface.") + +(defvar ConTeXt-environment-history nil) + +(defun ConTeXt-environment-start-name () + "Return the \\start translated to the language in current interface." + ;; it is "inizia", others are "start" + (cond ((equal ConTeXt-current-interface "it") + "inizia") + ((member ConTeXt-current-interface ConTeXt-known-interfaces) + "start") + (t + ;; this should not happen + (error "Unknown interface: %s" ConTeXt-current-interface)))) + +(defun ConTeXt-environment-stop-name () + "Return the \\stop translated to the language in current interface." + ;; it is "termina", others are "stop" + (cond ((equal ConTeXt-current-interface "it") + "termina") + ((member ConTeXt-current-interface ConTeXt-known-interfaces) + "stop") + (t + ;; this should not happen + (error "Unknown interface: %s" ConTeXt-current-interface)))) + +(defun ConTeXt-environment (arg) + "Make ConTeXt environment (\\start...-\\stop... pair). +With optional ARG, modify current environment." + (interactive "*P") + (let* ((default (cond + ((TeX-near-bobp) "text") + (t ConTeXt-default-environment))) + (environment + (completing-read (concat "Environment type (default " default "): ") + ConTeXt-environment-list nil nil nil + 'ConTeXt-environment-history default))) + ;; Use `environment' as default for the next time only if it is different + ;; from the current default. + (unless (equal environment default) + (setq ConTeXt-default-environment environment)) + + (let ((entry (assoc environment ConTeXt-environment-list))) + (if (null entry) + (ConTeXt-add-environments (list environment))) + + (if arg + (ConTeXt-modify-environment environment) + (ConTeXt-environment-menu environment))))) + +(defun ConTeXt-modify-environment (environment) + "Modify current environment." + (save-excursion + (ConTeXt-find-matching-stop) + (re-search-backward (concat (regexp-quote TeX-esc) + (ConTeXt-environment-stop-name) + " *\\([a-zA-Z]*\\)") + (save-excursion (beginning-of-line 1) (point))) + (replace-match + (concat TeX-esc (ConTeXt-environment-stop-name) environment) t t) + (beginning-of-line 1) + (ConTeXt-find-matching-start) + (re-search-forward (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name) + " *\\([a-zA-Z]*\\)") + (save-excursion (end-of-line 1) (point))) + (replace-match + (concat TeX-esc (ConTeXt-environment-start-name) environment) t t))) + + +(defun ConTeXt-environment-menu (environment) + "Insert ENVIRONMENT around point or region." + (let ((entry (assoc environment ConTeXt-environment-list))) + (cond ((not (and entry (nth 1 entry))) + (ConTeXt-insert-environment environment)) + ((numberp (nth 1 entry)) + (let ((count (nth 1 entry)) + (args "")) + (while (> count 0) + (setq args (concat args TeX-grop TeX-grcl)) + (setq count (- count 1))) + (ConTeXt-insert-environment environment args))) + ((stringp (nth 1 entry)) + (let ((prompts (cdr entry)) + (args "")) + (while prompts + (setq args (concat args + TeX-grop + (read-from-minibuffer + (concat (car prompts) ": ")) + TeX-grcl)) + (setq prompts (cdr prompts))) + (ConTeXt-insert-environment environment args))) + (t + (apply (nth 1 entry) environment (nthcdr 2 entry)))))) + +(defun ConTeXt-close-environment () + "Insert \\stop... to match the current environment." + (interactive "*") + (beginning-of-line) + (let ((empty-line (looking-at "[ \t]*$"))) + (end-of-line) + (if (not empty-line) + (newline))) + (insert TeX-esc (ConTeXt-environment-stop-name) + (ConTeXt-current-environment)) + ;; indent broken, so don't do it. + ;;(indent-according-to-mode) + (end-of-line) + (newline)) + +(defun ConTeXt-insert-environment (environment &optional extra) + "Insert ENVIRONMENT, with optional argument EXTRA." + (if (and (TeX-active-mark) + (not (eq (mark) (point)))) + (save-excursion + (if (< (mark) (point)) + (exchange-point-and-mark)) + (insert TeX-esc (ConTeXt-environment-start-name) environment) + (newline) + (forward-line -1) + (indent-according-to-mode) + (if extra (insert extra)) + (goto-char (mark)) + (or (TeX-looking-at-backward "^[ \t]*") + (newline)) + (insert TeX-esc (ConTeXt-environment-stop-name) environment) + (newline) + (forward-line -1) + (indent-according-to-mode) + ;;(goto-char (point)) + ) + (or (TeX-looking-at-backward "^[ \t]*") + (newline)) + (insert TeX-esc (ConTeXt-environment-start-name) environment) + (indent-according-to-mode) + (if extra (insert extra)) + (end-of-line) + (newline-and-indent) + (newline) + (insert TeX-esc (ConTeXt-environment-stop-name) environment) + (or (looking-at "[ \t]*$") + (save-excursion (newline-and-indent))) + (indent-according-to-mode) + (end-of-line 0))) + + +;; with the following we can call a function on an environment. Say +;; you have metapost stuff within your TeX file, go to the environment +;; and run ConTeXt-work-on-environment (suggested Key: C-c !). AUCTeX +;; sees that you are inside e.g. \startMPpage....\stopMPpage and +;; looks in ConTeXt-environment-helper for a function to be called. + +;; % so pressing C-c ! inside the following ... +;;\startuseMPgraphic{Logo}{Scale} +;; % Top rectangle +;; filldraw (0,0)--(2cm,0)--(2cm,1cm)--(0,1cm)--cycle withcolor blue ; +;; % Bottom black rectangle +;; drawfill (0,0)--(2cm,0)--(2cm,-1cm)--(0,-1cm)--cycle withcolor black; +;; % White Text +;; draw btex \bf AB etex withcolor white ; +;; % resize to size +;; currentpicture := currentpicture scaled \MPvar{Scale} ; +;; \stopuseMPgraphic + +;; % ...should give you a "new buffer" (currently narrowed to region +;; % and switched to metapost-mode and recursive-edit) + +;; % Top rectangle +;; filldraw (0,0)--(2cm,0)--(2cm,1cm)--(0,1cm)--cycle withcolor blue ; +;; % Bottom black rectangle +;; drawfill (0,0)--(2cm,0)--(2cm,-1cm)--(0,-1cm)--cycle withcolor black; +;; % White Text +;; draw btex \bf AB etex withcolor white ; +;; % resize to size +;; currentpicture := currentpicture scaled \MPvar{Scale} ; + + +(defvar ConTeXt-environment-helper + '(("useMPgraphic" . ConTeXt-mp-region) + ("MPpage" . ConTeXt-mp-region)) + "Alist that holds functions to call for working on regions. +An entry looks like: (\"environment\" . function)") + +(defun ConTeXt-mp-region () + "Edit region in `metapost-mode'." + (ConTeXt-mark-environment t) + (narrow-to-region (mark) (point)) + (metapost-mode) + (message "Type `M-x exit-recursive-edit' to get back") + (recursive-edit) + (context-mode) + (widen)) + +;; find smarter name. Suggestions welcome +(defun ConTeXt-work-on-environment () + "Takes current environment and does something on it (todo: documentation)." + (interactive) + (let ((fun (cdr (assoc (ConTeXt-current-environment) + ConTeXt-environment-helper)))) + (when (functionp fun) + (funcall fun)))) + +(defun ConTeXt-current-environment () + "Return the name of the current environment." + ;; don't make this interactive. + (let ((beg)) + (save-excursion + (ConTeXt-last-unended-start) + (setq beg (+ (point) (length (ConTeXt-environment-start-name)) 1)) + (goto-char (match-end 0)) + (skip-chars-forward "a-zA-Z") + (buffer-substring beg (point))))) + +(defun ConTeXt-last-unended-start () + "Leave point at the beginning of the last unstopped `\\start...'. +Look back from the current cursor." + (while (and (re-search-backward "\\\\start[a-zA-Z]*\\|\\\\stop[a-zA-Z]*") + (looking-at "\\\\stop[a-zA-Z]*")) + (ConTeXt-last-unended-start))) + +(defun ConTeXt-mark-environment (&optional inner) + "Set mark to end of current environment (\\start...-\\stop...) and +point to the matching begin. +If optional INNER is not nil, include \\start... and \\stop, otherwise only +the contents." + (interactive) + (let ((cur (point))) + (ConTeXt-find-matching-stop inner) + (push-mark (point)) + (goto-char cur) + (ConTeXt-find-matching-start inner) + (TeX-activate-region))) + +(defun ConTeXt-find-matching-stop (&optional inner) + "Find end of current \\start...\\stop-Pair. +If INNER is non-nil, go to the point just past before +\\stop... macro. Otherwise goto the point just past \\stop..." + (interactive) + (let ((regexp (concat (regexp-quote TeX-esc) + "\\(" + (ConTeXt-environment-start-name) + "\\|" + (ConTeXt-environment-stop-name) + "\\)" + )) + (level 1)) + ;;jump over the \start... when at the beginning of it. + (when (looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name))) + (re-search-forward regexp nil t)) + (while (and (> level 0) + (re-search-forward regexp nil t) + (goto-char (1- (match-beginning 1))) + (cond ((looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name))) + (re-search-forward regexp nil t) + (setq level (1+ level))) + ((looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-stop-name))) + (re-search-forward regexp nil t) + (setq level (1- level)))))) + ;; now we have to look if we want to start behind the \start... macro + (if inner + (beginning-of-line) + (skip-chars-forward "a-zA-Z")))) + +(defun ConTeXt-find-matching-start (&optional inner) + "Find beginning of current \\start...\\stop-Pair. +If INNER is non-nil, go to the point just past the \\start... macro." + (interactive) + (let ((regexp (concat (regexp-quote TeX-esc) + "\\(" + (ConTeXt-environment-start-name) + "\\|" + (ConTeXt-environment-stop-name) + "\\)" + )) + (level 1) + (pos)) + (while (and (> level 0) + (re-search-backward regexp nil t) + (cond ((looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-stop-name))) + (setq level (1+ level))) + ((looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name))) + (setq level (1- level)))))) + ;; now we have to look if we want to start behind the \start... macro + (when inner + ;; \startfoo can have 0 or more {} and [] pairs. I assume that + ;; skipping all those parens will be smart enough. It fails when + ;; the first part in the \start-\stop-environment is { or [, like + ;; in \startquotation {\em important} \stopquotation. There is + ;; yet another pitfall: \startsetups SomeSetup foo bar + ;; \stopsetups will use SomeSetup as the argument and the + ;; environment + (skip-chars-forward "\\\\a-zA-Z") + (save-excursion + (while (progn + (skip-chars-forward "\t\n ") + (forward-comment 1) + (skip-chars-forward "\t\n ") + (looking-at "\\s\(")) + (forward-list 1) + (setq pos (point)))) + (when pos + (goto-char pos)) + (unless (bolp) + (forward-line))))) + +;;; items + +(defun ConTeXt-insert-item () + "Insert a new item." + (interactive "*") + (or (TeX-looking-at-backward "^[ \t]*") + (newline)) + (TeX-insert-macro "item") + (indent-according-to-mode)) + + +;;; Macro Argument Hooks + +(defun ConTeXt-optional-argument-insert (arg &optional _prefix) + "Insert ARG surrounded by square brackets." + (insert ConTeXt-optop) + (insert arg) + (insert ConTeXt-optcl)) + +(defun ConTeXt-required-argument-insert (arg &optional _prefix) + "Insert ARG surrounded by curly braces." + (insert TeX-grop) + (insert arg) + (insert TeX-grcl)) + +(defun ConTeXt-argument-insert (arg optional &optional prefix) + "Insert ARG surrounded by curly braces. + +If OPTIONAL, only insert it if not empty, and then use square brackets." + (if optional + (if + (not (string-equal arg "")) + (ConTeXt-optional-argument-insert arg prefix)) + (ConTeXt-required-argument-insert arg prefix))) + +(defun ConTeXt-arg-ref (optional &optional prompt definition) + "Prompt for a reference completing with known references." + (let ((ref (completing-read (TeX-argument-prompt optional prompt "ref") + (LaTeX-label-list)))) + (if (and definition (not (string-equal "" ref))) + (LaTeX-add-labels ref)) + (ConTeXt-argument-insert ref optional))) + +(defun ConTeXt-arg-define-ref (&optional prompt) + "Prompt for an optional reference completing with known references." + (ConTeXt-arg-ref t prompt t)) + +(defun ConTeXt-arg-setup (optional &optional prompt) + "Prompt for setup arguments." + (let ((setup (read-from-minibuffer + (TeX-argument-prompt optional prompt "Setup")))) + (ConTeXt-argument-insert setup t))) + + +;; paragraph (re)-formatting + +(defvar ConTeXt-item-list () + "List of macro's considered items.") + +(defun ConTeXt-paragraph-commands-regexp () + "Return a regexp matching macros that should have their own line." + (concat + (regexp-quote TeX-esc) "\\(" + "[][]\\|" ; display math delimitors (is this applicable to ConTeXt??) + (ConTeXt-environment-start-name) "\\|" + (ConTeXt-environment-stop-name) "\\|" + (mapconcat #'car ConTeXt-numbered-section-list "\\b\\|") "\\b\\|" + (mapconcat #'car ConTeXt-unnumbered-section-list "\\b\\|") "\\b\\|" + (mapconcat #'identity ConTeXt-extra-paragraph-commands "\\b\\|") + "\\b\\|" + (mapconcat #'identity ConTeXt-item-list "\\b\\|") "\\b\\)")) + + +;; Outline support + +(defun ConTeXt-environment-full-start-name (environment) + "Return the ConTeXt macro name that starts ENVIRONMENT. +It is interface aware" + (concat (ConTeXt-environment-start-name) environment)) + +(defun ConTeXt-outline-regexp (&optional anywhere) + "Return regexp for ConTeXt section blocks and sections. + +If optional argument ANYWHERE is not nil, do not require that the +header is at the start of a line." + (concat + (if anywhere "" "^") + "[ \t]*" + (regexp-quote TeX-esc) + "\\(" + (mapconcat #'ConTeXt-environment-full-start-name ConTeXt-section-block-list "\\|") "\\|" + (mapconcat #'car ConTeXt-numbered-section-list "\\|") "\\|" + (mapconcat #'car ConTeXt-unnumbered-section-list "\\|") + "\\)\\b" + (if TeX-outline-extra + "\\|" + "") + (mapconcat #'car TeX-outline-extra "\\|") + "\\|" (ConTeXt-header-end) "\\b" + "\\|" (ConTeXt-trailer-start) "\\b")) + +(defvar ConTeXt-text "Name of ConTeXt macro that begins the text body.") + +(defun ConTeXt-header-end () + "Default end of header marker for ConTeXt documents." + (concat + (regexp-quote TeX-esc) + (ConTeXt-environment-start-name) + ConTeXt-text)) + +(defun ConTeXt-trailer-start () + "Default start of trailer marker for ConTeXt documents." + (concat + (regexp-quote TeX-esc) + (ConTeXt-environment-stop-name) + ConTeXt-text)) + +(defun ConTeXt-outline-offset () + "Offset to add to `ConTeXt-section-list' levels to get outline level." + (- 4 (ConTeXt-largest-level))) + +(defun ConTeXt-start-environment-regexp (list) + "Regular expression that matches a start of all environments mentioned in LIST." + (concat + "start\\(" + (mapconcat #'identity list "\\|") + "\\)\\b")) + +;; The top headings are \starttext, \startfrontmatter, \startbodymatter etc. +;; \part, \chapter etc. are children of that. +(defun ConTeXt-outline-level () + "Find the level of current outline heading in an ConTeXt document." + (cond ((looking-at (concat (ConTeXt-header-end) "\\b")) 1) + ((looking-at (concat (ConTeXt-trailer-start) "\\b")) 1) + ((TeX-look-at TeX-outline-extra) + (max 1 (+ (TeX-look-at TeX-outline-extra) + (ConTeXt-outline-offset)))) + (t + (save-excursion + (skip-chars-forward " \t") + (forward-char 1) + (cond ((looking-at (ConTeXt-start-environment-regexp + ConTeXt-section-block-list)) 1) + ((TeX-look-at ConTeXt-section-list) + (max 1 (+ (TeX-look-at ConTeXt-section-list) + (ConTeXt-outline-offset)))) + (t + (error "Unrecognized header"))))))) + + +;;; Fonts + +(defcustom ConTeXt-font-list '((?\C-b "{\\bf " "}") + (?\C-c "{\\sc " "}") + (?\C-e "{\\em " "}") + (?\C-i "{\\it " "}") + (?\C-r "{\\rm " "}") + (?\C-s "{\\sl " "}") + (?\C-t "{\\tt " "}") + (?\C-d "" "" t)) + "List of fonts used by `TeX-font'. + +Each entry is a list. +The first element is the key to activate the font. +The second element is the string to insert before point, and the third +element is the string to insert after point. +If the fourth and fifth element are strings, they specify the prefix and +suffix to be used in math mode. +An optional fourth (or sixth) element means always replace if t." + :group 'TeX-macro + :type '(repeat + (group + :value (?\C-a "" "") + (character :tag "Key") + (string :tag "Prefix") + (string :tag "Suffix") + (option (group + :inline t + (string :tag "Math Prefix") + (string :tag "Math Suffix"))) + (option (sexp :format "Replace\n" :value t))))) + + +;; Imenu support + +(defun ConTeXt-outline-name () + "Guess a name for the current header line." + (save-excursion + (if (re-search-forward "{\\([^\}]*\\)}" (point-at-eol) t) + (match-string 1) + (buffer-substring-no-properties (point) (point-at-eol))))) + +;; This imenu also includes commented out chapters. Perhaps a feature +;; for LaTeX, not sure we want or need that for ConTeXt. + +(defun ConTeXt-imenu-create-index-function () + "Imenu support function for ConTeXt." + (TeX-update-style) + (let (entries + (regexp (ConTeXt-outline-regexp))) + (goto-char (point-max)) + (while (re-search-backward regexp nil t) + (let* ((name (ConTeXt-outline-name)) + (level (make-string (1- (ConTeXt-outline-level)) ?\ )) + (label (concat level level name)) + (mark (make-marker))) + (set-marker mark (point)) + (set-text-properties 0 (length label) nil label) + (setq entries (cons (cons label mark) entries)))) + entries)) + + +;; Indentation, copied from Berend's context mode. +;; TODO: doesn't work great. + +(defvar ConTeXt-indent-allhanging t) +(defvar ConTeXt-indent-arg 2) +(defvar ConTeXt-indent-basic 2) +(defvar ConTeXt-indent-item ConTeXt-indent-basic) +(defvar ConTeXt-indent-item-re "\\\\\\(item\\|sym\\)\\>") + +(defvar ConTeXt-indent-syntax-table (make-syntax-table TeX-mode-syntax-table) + "Syntax table used while computing indentation.") + +(progn + (modify-syntax-entry ?$ "." ConTeXt-indent-syntax-table) + (modify-syntax-entry ?\( "." ConTeXt-indent-syntax-table) + (modify-syntax-entry ?\) "." ConTeXt-indent-syntax-table)) + +(defun ConTeXt-indent-line (&optional _arg) + (with-syntax-table ConTeXt-indent-syntax-table + ;; TODO: Rather than ignore $, we should try to be more clever about it. + (let ((indent + (save-excursion + (beginning-of-line) + (ConTeXt-find-indent)))) + (if (< indent 0) (setq indent 0)) + (if (<= (current-column) (current-indentation)) + (indent-line-to indent) + (save-excursion (indent-line-to indent)))))) + +(defun ConTeXt-find-indent (&optional virtual) + "Find the proper indentation of text after point. +VIRTUAL if non-nil indicates that we're only trying to find the +indentation in order to determine the indentation of something +else. There might be text before point." + (save-excursion + (skip-chars-forward " \t") + (or + ;; Trust the current indentation, if such info is applicable. + (and virtual (>= (current-indentation) (current-column)) + (current-indentation)) + ;; Put leading close-paren where the matching open brace would be. + (condition-case nil + (and (eq (char-syntax (char-after)) ?\)) + (save-excursion + (skip-syntax-forward " )") + (backward-sexp 1) + (ConTeXt-find-indent 'virtual))) + (error nil)) + ;; Default (maybe an argument) + (let ((pos (point)) + (char (char-after)) + (indent 0) + up-list-pos) + ;; Look for macros to be outdented + (cond ((looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-stop-name))) + (setq indent (- indent ConTeXt-indent-basic))) + ((looking-at ConTeXt-indent-item-re) + (setq indent (- indent ConTeXt-indent-item)))) + ;; Find the previous point which determines our current indentation. + (condition-case err + (progn + (backward-sexp 1) + (while (or (> (current-column) (current-indentation)) + ;; Continue going back if we are + ;; at a hanging optional group. + (looking-at (regexp-quote ConTeXt-optop))) + (backward-sexp 1))) + (scan-error + (setq up-list-pos (nth 2 err)))) + (cond + ((= (point-min) pos) 0) ; We're really just indenting the first line. + ((integerp up-list-pos) + ;; Have to indent relative to the open-paren. + (goto-char up-list-pos) + (if (and (not ConTeXt-indent-allhanging) + (> pos (progn (down-list 1) + (forward-comment (point-max)) + (point)))) + ;; Align with the first element after the open-paren. + (current-column) + ;; We're the first element after a hanging brace. + (goto-char up-list-pos) + (+ indent ConTeXt-indent-basic (ConTeXt-find-indent 'virtual)))) + ;; We're now at the "beginning" of a line. + ((not (and (not virtual) (eq (char-after) ?\\))) + ;; Nothing particular here: just keep the same indentation. + (+ indent (current-column))) + ;; We're now looking at an item. + ((looking-at ConTeXt-indent-item-re) + ;; Indenting relative to an item, have to re-add the outdenting. + (+ indent (current-column) ConTeXt-indent-item)) + ;; We're looking at an environment starter. + ((and (looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name))) + (not (looking-at (concat (regexp-quote TeX-esc) + (ConTeXt-environment-start-name) + ConTeXt-text)))) ; other environments? + (+ indent (current-column) ConTeXt-indent-basic)) + (t + (let ((col (current-column))) + (if (not (and char (eq (char-syntax char) ?\())) + ;; If the first char was not an open-paren, there's + ;; a risk that this is really not an argument to the + ;; macro at all. + (+ indent col) + (forward-sexp 1) + (if (< (line-end-position) + (save-excursion (forward-comment (point-max)) + (point))) + ;; we're indenting the first argument. + (min (current-column) (+ ConTeXt-indent-arg col)) + (skip-syntax-forward " ") + (current-column)))))))))) + + +;; XML inside ConTeXt support + +(defun ConTeXt-last-unended-start-xml () + "Leave point at the beginning of the last `tag' that is unstopped." + (while (and (re-search-backward "<[_A-Za-z][-:._A-Za-z0-9]*\\([ \t\r\n]\\|[_A-Za-z][-:._A-Za-z0-9]*\=\"[^\"]*\"\\)*>\\|</[_A-Za-z][-:_A-Za-z0-9]*>") + (looking-at "</[_A-Za-z][-:._A-Za-z0-9]*>")) + (ConTeXt-last-unended-start-xml))) + +(defun ConTeXt-close-xml-tag () + "Create an </...> to match the last unclosed <...>. Not fool-proof." + (interactive "*") + (let ((new-line-needed (bolp)) text indentation) + (save-excursion + (condition-case nil + (ConTeXt-last-unended-start-xml) + (error (error "Couldn't find unended XML tag"))) + (setq indentation (current-column)) + (re-search-forward "<\\([_A-Za-z][-:._A-Za-z0-9]*\\)") + (setq text (buffer-substring (match-beginning 1) (match-end 1)))) + (indent-to indentation) + (insert "</" text ">") + (if new-line-needed (insert ?\n)))) + + +;; Key bindings + +(defvar ConTeXt-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + + ;; We now set `beginning-of-defun-function' and + ;; `end-of-defun-function' instead. + ;; (define-key map "\e\C-a" #'ConTeXt-find-matching-start) + ;; (define-key map "\e\C-e" #'ConTeXt-find-matching-stop) + ;; likely to change in the future + (define-key map "\C-c!" #'ConTeXt-work-on-environment) + (define-key map "\C-c\C-e" #'ConTeXt-environment) + (define-key map "\C-c\n" #'ConTeXt-insert-item) + (or (key-binding "\e\r") + (define-key map "\e\r" #'ConTeXt-insert-item)) ;*** Alias + (define-key map "\C-c]" #'ConTeXt-close-environment) + (define-key map "\C-c\C-s" #'ConTeXt-section) + ;; XML in ConTeXt support + (define-key map "\C-c/" #'ConTeXt-close-xml-tag) + map) + "Keymap used in `ConTeXt-mode'.") + + +;;; Menu building + +;; functions to create menu entries + +;; ConTeXt \start... \stop... pairs +;; (Choose a different name than the one in LaTeX mode. Otherwise the +;; contents of the "Insert Environment" and "Change Environment" menus +;; will not be updated correctly upon loading and switching between +;; LaTeX and ConTeXt files. AFAICS this is due to a bug in +;; easymenu.el not returning the correct keymap when +;; `easy-menu-change' (and therefore `easy-menu-get-map') is called. +;; It just sees an entry with a matching name and returns this first +;; match.) +(defvar ConTeXt-environment-menu-name "Insert Environment (C-c C-e)") + +(defun ConTeXt-environment-menu-entry (entry) + "Create an ENTRY for the environment menu." + (vector (car entry) (list 'ConTeXt-environment-menu (car entry)) t)) + +(defvar ConTeXt-environment-modify-menu-name "Change Environment (C-u C-c C-e)") + +(defun ConTeXt-environment-modify-menu-entry (entry) + "Create an ENTRY for the change environment menu." + (vector (car entry) (list 'ConTeXt-modify-environment (car entry)) t)) + +;; ConTeXt define macros +(defvar ConTeXt-define-menu-name "Define") + +(defun ConTeXt-define-menu-entry (entry) + "Create an ENTRY for the define menu." + (vector entry (list 'ConTeXt-define-menu entry))) + +(defun ConTeXt-define-menu (define) + "Insert DEFINE from menu." + (ConTeXt-insert-define define)) + +;; ConTeXt setup macros +(defvar ConTeXt-setup-menu-name "Setup") + +(defun ConTeXt-setup-menu-entry (entry) + "Create an ENTRY for the setup menu." + (vector entry (list 'ConTeXt-setup-menu entry))) + +(defun ConTeXt-setup-menu (setup) + "Insert SETUP from menu." + (ConTeXt-insert-setup setup)) + +;; ConTeXt referencing macros +(defvar ConTeXt-referencing-menu-name "Referencing") + +(defun ConTeXt-referencing-menu-entry (entry) + "Create an ENTRY for the referencing menu." + (vector entry (list 'ConTeXt-referencing-menu entry))) + +(defun ConTeXt-referencing-menu (referencing) + "Insert REFERENCING from menu." + (ConTeXt-insert-referencing referencing)) + +;; ConTeXt other macros +(defvar ConTeXt-other-macro-menu-name "Other macro") + +(defun ConTeXt-other-macro-menu-entry (entry) + "Create an ENTRY for the other macro menu." + (vector entry (list 'ConTeXt-other-macro-menu entry))) + +(defun ConTeXt-other-macro-menu (other-macro) + "Insert OTHER-MACRO from menu." + (ConTeXt-insert-other-macro other-macro)) + + +;; meta-structure project structure menu entries + +(defvar ConTeXt-project-structure-menu-name "Project Structure") + +(defun ConTeXt-project-structure-menu (project-structure) + "Insert PROJECT-STRUCTURE from menu." + (ConTeXt-project-structure + (let ((l ConTeXt-project-structure-list)) + (- (length l) (length (member project-structure l)))))) + +(defun ConTeXt-project-structure-menu-entry (entry) + "Create an ENTRY for the project structure menu." + (vector entry (list 'ConTeXt-project-structure-menu entry))) + + +;; meta-structure section blocks menu entries + +(defvar ConTeXt-section-block-menu-name "Section Block") + +(defun ConTeXt-section-block-menu (section-block) + "Insert SECTION-BLOCK from menu." + (ConTeXt-section-block section-block)) + +(defun ConTeXt-section-block-menu-entry (entry) + "Create an ENTRY for the section block menu." + (vector entry (list 'ConTeXt-section-block-menu entry))) + + +;; section menu entries + +(defvar ConTeXt-numbered-section-menu-name "Numbered section (C-c C-s)") +(defvar ConTeXt-unnumbered-section-menu-name "Unnumbered section") + +(defun ConTeXt-section-enable-symbol (level) + "Symbol used to enable section LEVEL in the menu bar." + (intern (concat "ConTeXt-section-" (int-to-string level) "-enable"))) + +(defun ConTeXt-section-enable (entry) + "Enable or disable section ENTRY from `ConTeXt-section-list'." + (let ((level (nth 1 entry))) + (set (ConTeXt-section-enable-symbol level) + (>= level ConTeXt-largest-level)))) + +(defun ConTeXt-numbered-section-menu (level) + "Insert numbered section from menu." + (let ((ConTeXt-numbered-section-hook + (delq 'ConTeXt-numbered-section-heading + (copy-sequence ConTeXt-numbered-section-hook)))) + (ConTeXt-section level))) + +(defun ConTeXt-unnumbered-section-menu (level) + "Insert unnumbered section from menu." + (let ((ConTeXt-unnumbered-section-hook + (delq 'ConTeXt-unnumbered-section-heading + (copy-sequence ConTeXt-unnumbered-section-hook)))) + (ConTeXt-section level))) + +(defun ConTeXt-numbered-section-menu-entry (entry) + "Create an ENTRY for the numbered section menu." + (let ((enable (ConTeXt-section-enable-symbol (nth 1 entry)))) + (set enable t) + (vector (car entry) (list 'ConTeXt-numbered-section-menu (nth 1 entry)) enable))) + +(defun ConTeXt-unnumbered-section-menu-entry (entry) + "Create an ENTRY for the unnumbered section menu." + (let ((enable (ConTeXt-section-enable-symbol (nth 1 entry)))) + (set enable t) + (vector (car entry) (list 'ConTeXt-unnumbered-section-menu (nth 1 entry)) enable))) + + +;; etexshow support + +(defun ConTeXt-etexshow () + "Call etexshow, if available, to show the definition of a ConText macro." + (interactive) + (if (fboundp 'etexshow) + (let () + (require 'etexshow) + (funcall (symbol-function 'etexshow-cmd))) + (error "etexshow is not installed. Get it from http://levana.de/emacs/"))) + +;; menu itself + +(easy-menu-define ConTeXt-mode-command-menu + ConTeXt-mode-map + "Command menu used in ConTeXt mode." + (TeX-mode-specific-command-menu 'context-mode)) + +;; it seems the menu is evaluated at compile/load-time +;; we don't have ConTeXt-current-interface at that time +;; so make sure to do updates based on that variable in +;; ConTeXt-menu-update +(easy-menu-define ConTeXt-mode-menu + ConTeXt-mode-map + "Menu used in ConTeXt mode." + `("ConTeXt" + (,ConTeXt-project-structure-menu-name) + (,ConTeXt-section-block-menu-name) + (,ConTeXt-numbered-section-menu-name) + (,ConTeXt-unnumbered-section-menu-name) + ["Add Table of Contents to Emacs Menu" (imenu-add-to-menubar "TOC") t] + "-" + ["Macro ..." TeX-insert-macro + :help "Insert a macro and possibly arguments"] + ["Complete" TeX-complete-symbol + :help "Complete the current macro or environment name"] + ["Show ConTeXt Macro Definition" ConTeXt-etexshow] + "-" + (,ConTeXt-environment-menu-name) + (,ConTeXt-environment-modify-menu-name) + ["Item" ConTeXt-insert-item + :help "Insert a new \\item into current environment"] + (,ConTeXt-define-menu-name) + (,ConTeXt-setup-menu-name) + (,ConTeXt-other-macro-menu-name) + "-" + ("Insert Font" + ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] + ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] + ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] + ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] + ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] + ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] + ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] + ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] + ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]) + ("Replace Font" + ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] + ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] + ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] + ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] + ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] + ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] + ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] + ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] + ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ["Comment or Uncomment Region" + comment-or-uncomment-region + :help "Make the selected region outcommented or active again"] + ["Comment or Uncomment Paragraph" + TeX-comment-or-uncomment-paragraph + :help "Make the current paragraph outcommented or active again"] + ,TeX-fold-menu + "-" . ,TeX-common-menu-entries)) + +(defun ConTeXt-menu-update (&optional menu) + "Update entries on AUCTeX menu." + (or (not (memq major-mode '(context-mode))) + (null ConTeXt-menu-changed) + (progn + (TeX-update-style) + (setq ConTeXt-menu-changed nil) + (message "Updating section menu...") + (mapc #'ConTeXt-section-enable ConTeXt-section-list) + (message "Updating section menu...done") + (message "Updating environment menu...") + (easy-menu-change '("ConTeXt") ConTeXt-environment-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-environment-menu-entry + (ConTeXt-environment-list)))) + (message "Updating environment menu...done") + (message "Updating modify environment menu...") + (easy-menu-change '("ConTeXt") ConTeXt-environment-modify-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-environment-modify-menu-entry + (ConTeXt-environment-list)))) + (message "Updating modify environment menu...done") + (message "Updating define menu...") + (easy-menu-change '("ConTeXt") ConTeXt-define-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-define-menu-entry + ConTeXt-define-list))) + (message "Updating define menu...done") + (message "Updating setup menu...") + (easy-menu-change '("ConTeXt") ConTeXt-setup-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-setup-menu-entry + ConTeXt-setup-list))) + (message "Updating setup menu...done") + (message "Updating referencing menu...") + (easy-menu-change '("ConTeXt") ConTeXt-referencing-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-referencing-menu-entry + ConTeXt-referencing-list))) + (message "Updating referencing menu...done") + (message "Updating other macro's menu...") + (easy-menu-change '("ConTeXt") ConTeXt-other-macro-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-other-macro-menu-entry + ConTeXt-other-macro-list))) + (message "Updating other macro's menu...done") + (message "Updating project structure menu...") + (easy-menu-change '("ConTeXt") ConTeXt-project-structure-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-project-structure-menu-entry + ConTeXt-project-structure-list))) + (message "Updating project structure menu...done") + (message "Updating section block menu...") + (easy-menu-change '("ConTeXt") ConTeXt-section-block-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-section-block-menu-entry + ConTeXt-section-block-list))) + (message "Updating section block menu...done") + (message "Updating section menu...") + (easy-menu-change '("ConTeXt") ConTeXt-numbered-section-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-numbered-section-menu-entry + ConTeXt-numbered-section-list))) + (easy-menu-change '("ConTeXt") ConTeXt-unnumbered-section-menu-name + (LaTeX-split-long-menu + (mapcar #'ConTeXt-unnumbered-section-menu-entry + ConTeXt-unnumbered-section-list))) + (message "Updating section menu...done") + (and menu (easy-menu-return-item ConTeXt-mode-menu menu)) + ))) + +;;; Option expander + +(defvar ConTeXt-texexec-option-nonstop "--nonstop " + "Command line option for texexec to use nonstopmode.") + +(defun ConTeXt-expand-command () + "Expand ConTeXt command. +Use `ConTeXt-Mark-version' to choose the command." + (cond + ((string= ConTeXt-Mark-version "IV") + "context") + ;; In any other case fall back on Mark II. + (t + "texexec"))) + +(defun ConTeXt-expand-options () + "Expand options for context command." + (cond + ;; Mark IV + ((string= ConTeXt-Mark-version "IV") + (concat + (if TeX-source-correlate-mode + "--synctex=1 ") + (unless TeX-interactive-mode + ConTeXt-texexec-option-nonstop))) + ;; In any other case fall back on Mark II. + (t + (concat + (let ((engine (eval (nth 4 (TeX-engine-in-engine-alist TeX-engine)) t))) + (when engine + (format "--engine=%s " engine))) + (unless (eq ConTeXt-current-interface "en") + (format "--interface=%s " ConTeXt-current-interface)) + (when TeX-source-correlate-mode + (format "--passon=\"%s\" " + (if (eq (TeX-source-correlate-method-active) 'synctex) + TeX-synctex-tex-flags + TeX-source-specials-tex-flags))) + (unless TeX-interactive-mode + ConTeXt-texexec-option-nonstop))))) + +;;; Mode + +;; ConTeXt variables that are interface aware +;; They are mapped to interface specific variables + +(defvar ConTeXt-language-variable-list + '(ConTeXt-define-list + ConTeXt-setup-list + ConTeXt-referencing-list + ConTeXt-other-macro-list + ConTeXt-project-structure-list + ConTeXt-section-block-list + ConTeXt-numbered-section-list + ConTeXt-unnumbered-section-list + ConTeXt-section-list + ConTeXt-text + ConTeXt-item-list + ConTeXt-extra-paragraph-commands + ConTeXt-environment-list) + "List of variables to be set from languages specific ones.") + +(defconst ConTeXt-dialect :context + "Default dialect for use with function `TeX-add-style-hook' for +argument DIALECT-EXPR when the hook is to be run only on ConTeXt +file, or any mode derived thereof. See variable +`TeX-style-hook-dialect'." ) + +(defcustom ConTeXt-clean-intermediate-suffixes + ;; See *suffixes in texutil.pl. + '("\\.tui" "\\.tup" "\\.ted" "\\.tes" "\\.top" "\\.log" "\\.tmp" "\\.run" + "\\.bck" "\\.rlg" "\\.mpt" "\\.mpx" "\\.mpd" "\\.mpo" "\\.tuo" "\\.tub" + "\\.top" "-mpgraph\\.mp" "-mpgraph\\.mpd" "-mpgraph\\.mpo" "-mpgraph\\.mpy" + "-mprun\\.mp" "-mprun\\.mpd" "-mprun\\.mpo" "-mprun\\.mpy") + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom ConTeXt-clean-output-suffixes + '("\\.dvi" "\\.pdf" "\\.ps") + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(TeX-abbrev-mode-setup context-mode) + +(defun ConTeXt-mode-common-initialization () + "Initialization code that is common for all ConTeXt interfaces." + ;; `plain-TeX-common-initialization' kills all local variables, but + ;; we need to keep ConTeXt-current-interface, so save and restore + ;; it. + (let (save-ConTeXt-current-interface) + (setq save-ConTeXt-current-interface ConTeXt-current-interface) + (plain-TeX-common-initialization) + (setq ConTeXt-current-interface save-ConTeXt-current-interface)) + (setq major-mode 'context-mode) + + (setq local-abbrev-table context-mode-abbrev-table) + (set (make-local-variable 'TeX-style-hook-dialect) ConTeXt-dialect) + + ;; Make language specific variables buffer local + (dolist (symbol ConTeXt-language-variable-list) + (make-variable-buffer-local symbol)) + + (require (intern (concat "context-" ConTeXt-current-interface))) + (dolist (symbol ConTeXt-language-variable-list) + (set symbol (symbol-value (intern (concat (symbol-name symbol) "-" + ConTeXt-current-interface))))) + + ;; Create certain regular expressions based on language + (setq ConTeXt-indent-item-re (concat "\\\\\\(" (mapconcat #'identity ConTeXt-item-list "\\|") "\\)\\>")) + + ;; What's the deepest level at we can collapse a document? + ;; set only if user has not set it. Need to be set before menu is created. + ;; level 2 is "section" + (or ConTeXt-largest-level + (setq ConTeXt-largest-level 2)) + + ;; keybindings + (use-local-map ConTeXt-mode-map) + + ;; Indenting + (set (make-local-variable 'indent-line-function) #'ConTeXt-indent-line) + (set (make-local-variable 'fill-indent-according-to-mode) t) + + ;; Paragraph formatting + (set (make-local-variable 'LaTeX-syntactic-comments) nil) + (set (make-local-variable 'LaTeX-paragraph-commands-regexp) + (ConTeXt-paragraph-commands-regexp)) + (set (make-local-variable 'paragraph-ignore-fill-prefix) t) + (set (make-local-variable 'fill-paragraph-function) #'LaTeX-fill-paragraph) + (set (make-local-variable 'adaptive-fill-mode) nil) + (setq paragraph-start + (concat + "[ \t]*\\(" + (ConTeXt-paragraph-commands-regexp) "\\|" + "\\$\\$\\|" ; Plain TeX display math + "$\\)")) + (setq paragraph-separate + (concat + "[ \t]*\\(" + "\\$\\$" ; Plain TeX display math + "\\|$\\)")) + + ;; Keybindings and menu + (use-local-map ConTeXt-mode-map) + (setq ConTeXt-menu-changed t) + + (add-hook 'activate-menubar-hook #'ConTeXt-menu-update nil t) + + (setq-local beginning-of-defun-function #'ConTeXt-find-matching-start + end-of-defun-function #'ConTeXt-find-matching-stop) + + ;; Outline support + (require 'outline) + (set (make-local-variable 'outline-level) 'ConTeXt-outline-level) + (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t)) + ;;(make-local-variable 'outline-heading-end-regexp) + (setq TeX-header-end (ConTeXt-header-end) + TeX-trailer-start (ConTeXt-trailer-start)) + + ;; font switch support + (set (make-local-variable 'TeX-font-list) ConTeXt-font-list) + + ;; imenu support + (set (make-local-variable 'imenu-create-index-function) + #'ConTeXt-imenu-create-index-function) + + ;; run hooks + (setq TeX-command-default "ConTeXt") + (setq TeX-sentinel-default-function #'TeX-ConTeXt-sentinel) + (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'ConTeXt-mode-hook)) + +(defun context-guess-current-interface () + "Guess what ConTeXt interface the current buffer is using." + (interactive) + (save-excursion + (goto-char (point-min)) + (setq ConTeXt-current-interface + (cond ((re-search-forward "%.*?interface=en" (+ 512 (point)) t) + "en") + ((re-search-forward "%.*?interface=nl" (+ 512 (point)) t) + "nl") + ((re-search-forward "\\\\starttext" (+ 1024 (point)) t) + "en") + ((re-search-forward "\\\\starttekst" (+ 1024 (point)) t) + "nl") + (t + ConTeXt-default-interface))))) + +;;;###autoload +(defalias 'ConTeXt-mode #'context-mode) + +;;;###autoload +(defun context-mode () + "Major mode in AUCTeX for editing ConTeXt files. + +Special commands: +\\{ConTeXt-mode-map} + +Entering `context-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `ConTeXt-mode-hook'." + (interactive) + (context-guess-current-interface) + (require (intern (concat "context-" ConTeXt-current-interface))) + (funcall (intern (concat "context-" ConTeXt-current-interface "-mode")))) + +(provide 'context) + +;;; context.el ends here diff --git a/elpa/auctex-13.1.3/context.elc b/elpa/auctex-13.1.3/context.elc Binary files differnew file mode 100644 index 0000000..bb3d1a7 --- /dev/null +++ b/elpa/auctex-13.1.3/context.elc diff --git a/elpa/auctex-13.1.3/dir b/elpa/auctex-13.1.3/dir new file mode 100644 index 0000000..0b85f60 --- /dev/null +++ b/elpa/auctex-13.1.3/dir @@ -0,0 +1,25 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs<Return>" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Emacs +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +* preview-latex: (preview-latex). + Preview LaTeX fragments in Emacs + +TeX +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +* preview-latex: (preview-latex). + Preview LaTeX fragments in Emacs diff --git a/elpa/auctex-13.1.3/doc/auctex.texi b/elpa/auctex-13.1.3/doc/auctex.texi new file mode 100644 index 0000000..ca23668 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/auctex.texi @@ -0,0 +1,6200 @@ +\input texinfo +@comment %**start of header +@setfilename auctex.info +@include version.texi +@settitle AUCTeX @value{VERSION} +@c footnotestyle separate +@c paragraphindent 2 +@comment %**end of header +@include macros.texi +@copying +This manual is for @AUCTeX{} +(version @value{VERSION} from @value{UPDATED}), +a sophisticated @TeX{} environment for Emacs. + +Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2022 +Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License.'' +@end quotation +@end copying + +@dircategory Emacs +@direntry +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +@end direntry +@dircategory TeX +@direntry +* AUCTeX: (auctex). A sophisticated TeX environment for Emacs. +@end direntry + +@iftex +@tolerance 10000 @emergencystretch 3em +@end iftex + +@finalout +@titlepage +@title @AUCTeX{} +@subtitle A sophisticated @TeX{} environment for Emacs +@subtitle Version @value{VERSION}, @value{UPDATED} +@author Kresten Krab Thorup +@author Per Abrahamsen +@author David Kastrup and others +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@c Use @ifinfo _and_ @ifhtml here because Texinfo 3 cannot cope with +@c @ifnottex around a top node. +@ifinfo +@node top +@top @AUCTeX{} + +This manual may be copied under the conditions spelled out in +@ref{Copying this Manual}. + +@end ifinfo +@ifhtml +@node top +@top @AUCTeX{} +@insertcopying +@end ifhtml + +@contents + +@iftex +@unnumbered Executive Summary +@end iftex + +@AUCTeX{} is an integrated environment for editing @LaTeX{}, @ConTeXt{}, +doc@TeX{}, Texinfo, and @TeX{} files. + +Although @AUCTeX{} contains a large number of features, there are no +reasons to despair. You can continue to write @TeX{} and @LaTeX{} +documents the way you are used to, and only start using the multiple +features in small steps. @AUCTeX{} is not monolithic, each feature +described in this manual is useful by itself, but together they provide +an environment where you will make very few @LaTeX{} errors, and makes +it easy to find the errors that may slip through anyway. + +It is a good idea to make a printout of @AUCTeX{}'s reference card +@file{tex-ref.tex} or one of its typeset versions. + +If you want to make @AUCTeX{} aware of style files and multifile +documents right away, insert the following in your init file (usually +@file{~/.emacs.d/init.el}). + +@lisp +(setq TeX-auto-save t) +(setq TeX-parse-self t) +(setq-default TeX-master nil) +@end lisp + +Another thing you should enable is Ref@TeX{}, a comprehensive solution +for managing cross references, bibliographies, indices, document +navigation and a few other things. (@xref{Installation,,,reftex,The +Ref@TeX{} manual}.) + +For detailed information about the @previewlatex{} subsystem of +@AUCTeX{}, see @ref{Top,,Introduction,preview-latex,The @previewlatex{} +Manual}. + +There is a mailing list for general discussion about @AUCTeX{}: write a +mail with ``subscribe'' in the subject to +@email{auctex-request@@gnu.org} to join it. Send contributions to +@email{auctex@@gnu.org}. + +Bug reports should go to @email{bug-auctex@@gnu.org}, suggestions for +new features, and pleas for help should go to either +@email{auctex-devel@@gnu.org} (the @AUCTeX{} developers), or to +@email{auctex@@gnu.org} if they might have general interest. Please use +the command @kbd{M-x TeX-submit-bug-report @key{RET}} to report bugs if +possible. You can subscribe to a low-volume announcement list by +sending ``subscribe'' in the subject of a mail to +@email{info-auctex-request@@gnu.org}. + +@menu +* Copying:: Copying +* Introduction:: Introduction to @AUCTeX{} +* Editing:: Editing the Document Source +* Display:: Controlling Screen Display +* Processing:: Starting Processors, Viewers and Other Programs +* Customization:: Customization and Extension +* Appendices:: Copying, Changes, Development, FAQ, Texinfo mode +* Indices:: Indices + +@detailmenu + --- The Detailed Node Listing --- + +Introduction + +* Summary:: Overview of @AUCTeX{} +* Installation:: Installing @AUCTeX{} +* Quick Start:: Quick Start + +Editing the Document Source + +* Quotes:: Inserting double quotes +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking + +Inserting Environment Templates + +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments + +Controlling Screen Display + +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document +* Narrowing:: Restricting display and editing to a portion of the buffer +* Prettifying:: Displaying Greek and math macros as Unicode characters + +Font Locking + +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex +* Known problems:: Known fontification problems + +Starting Processors, Viewers and Other Programs + +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging @TeX{} and @LaTeX{} output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. + +Viewing the Formatted Output + +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search + +Catching the errors + +* Ignoring warnings:: Controlling warnings to be reported +* Error overview:: List of all errors and warnings + +Customization and Extension + +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of @TeX{} Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support + +Language Support + +* European:: Using @AUCTeX{} with European Languages +* Japanese:: Using @AUCTeX{} with Japanese + +Automatic Customization + +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory + +Writing Your Own Style Support + +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding or Examining Other Information +* Hacking the Parser:: Automatic Extraction of New Things + +Copying, Changes, Development, FAQ + +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: +* Texinfo mode:: + +Copying this Manual + +* GNU Free Documentation License:: License for copying this manual. + +Indices + +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: + +@end detailmenu +@end menu + +@node Copying +@unnumbered Copying +@cindex Copying +@cindex Copyright +@cindex GPL +@cindex General Public License +@cindex License +@cindex Free +@cindex Free software +@cindex Distribution +@cindex Right +@cindex Warranty + +@c This text adapted from the Texinfo 2.16 distribution. + +@AUCTeX{} primarily consists of Lisp files for Emacs, but +there are also installation scripts and files and @TeX{} support files. +All of those are @dfn{free}; this means that everyone is free to use +them and free to redistribute them on a free basis. The files of +@AUCTeX{} are not in the public domain; they are copyrighted and there +are restrictions on their distribution, but these restrictions are +designed to permit everything that a good cooperating citizen would want +to do. What is not allowed is to try to prevent others from further +sharing any version of these programs that they might get from you. + +Specifically, we want to make sure that you have the right to give away +copies of the files that constitute @AUCTeX{}, that you receive source +code or else can get it if you want it, that you can change these files +or use pieces of them in new free programs, and that you know you can do +these things. + +To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of parts of @AUCTeX{}, you must give the recipients all the +rights that you have. You must make sure that they, too, receive or can +get the source code. And you must tell them their rights. + +Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for @AUCTeX{}. If any parts are modified +by someone else and passed on, we want their recipients to know that +what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + +The precise conditions of the licenses for the files currently being +distributed as part of @AUCTeX{} are found in the General Public +Licenses that accompany them. This manual specifically is covered by +the GNU Free Documentation License (@pxref{Copying this Manual}). + +@node Introduction +@chapter Introduction + +@menu +* Summary:: Overview of @AUCTeX{} +* Installation:: Installing @AUCTeX{} +* Quick Start:: Quick Start +@end menu + +@lowersections +@include intro.texi + +@include install.texi + +@include quickstart.texi +@raisesections + +@node Editing +@chapter Editing the Document Source + +The most commonly used commands/macros of @AUCTeX{} are those which +simply insert templates for often used @TeX{}, @LaTeX{}, or @ConTeXt{} +constructs, like font changes, handling of environments, etc. These +features are very simple, and easy to learn, and help you avoid mistakes +like mismatched braces, or @samp{\begin@{@}}-@samp{\end@{@}} pairs. + +Apart from that this chapter contains a description of some features for +entering more specialized sorts of text, for formatting the source by +indenting and filling and for navigating through the document. + +@menu +* Quotes:: Inserting quotes, dollars, and braces +* Font Specifiers:: Inserting Font Specifiers +* Sectioning:: Inserting chapters, sections, etc. +* Environments:: Inserting Environment Templates +* Mathematics:: Entering Mathematics +* Completion:: Completion of macros +* Marking:: Marking Environments, Sections, or Texinfo Nodes +* Commenting:: Commenting text +* Indenting:: Reflecting syntactic constructs with whitespace +* Filling:: Automatic and manual line breaking +@end menu + +@node Quotes +@section Insertion of Quotes, Dollars, and Braces + +@cindex Quotes +@cindex Double quotes +@cindex Braces +@cindex Brackets +@cindex Dollars +@cindex Math mode delimiters +@cindex Matching dollar signs +@cindex Display math mode + +@subheading Quotation Marks + +In @TeX{}, literal double quotes @samp{"like this"} are seldom used, +instead two single quotes are used @samp{``like this''}. To help you +insert these efficiently, @AUCTeX{} allows you to continue to press +@kbd{"} to insert two single quotes. To get a literal double quote, +press @kbd{"} twice. + +@deffn Command TeX-insert-quote @var{count} +@kindex " +(@kbd{"}) Insert the appropriate quote marks for @TeX{}. + +Inserts the value of @code{TeX-open-quote} (normally @samp{``}) or +@code{TeX-close-quote} (normally @samp{''}) depending on the context. +With prefix argument, always inserts @samp{"} characters. +@end deffn + +@defopt TeX-open-quote +String inserted by typing @kbd{"} to open a quotation. +(@xref{European}, for language-specific quotation mark insertion.) +@end defopt + +@defopt TeX-close-quote +String inserted by typing @kbd{"} to close a quotation. +(@xref{European}, for language-specific quotation mark insertion.) +@end defopt + +@defopt TeX-quote-after-quote +Determines the behavior of @kbd{"}. If it is non-nil, typing @kbd{"} +will insert a literal double quote. The respective values of +@code{TeX-open-quote} and @code{TeX-close-quote} will be inserted +after typing @kbd{"} once again. +@end defopt + +The @samp{babel} package provides special support for the requirements +of typesetting quotation marks in many different languages. If you use +this package, either directly or by loading a language-specific style +file, you should also use the special commands for quote insertion +instead of the standard quotes shown above. @AUCTeX{} is able to +recognize several of these languages and will change quote insertion +accordingly. @xref{European}, for details about this feature and how to +control it. + +@vindex LaTeX-csquotes-open-quote +@vindex LaTeX-csquotes-close-quote +@vindex LaTeX-csquotes-quote-after-quote +In case you are using the @samp{csquotes} package, you should customize +@code{LaTeX-csquotes-open-quote}, @code{LaTeX-csquotes-close-quote} and +@code{LaTeX-csquotes-quote-after-quote}. The quotation characters will +only be used if both variables---@code{LaTeX-csquotes-open-quote} and +@code{LaTeX-csquotes-close-quote}---are non-empty strings. But then the +@samp{csquotes}-related values will take precedence over the +language-specific ones. + +@subheading Dollar Signs + +In @AUCTeX{}, dollar signs should match like they do in @TeX{}. This +has been partially implemented, we assume dollar signs always match +within a paragraph. By default, the first @samp{$} you insert in a +paragraph will do nothing special. The second @samp{$} will match the +first. This will be indicated by moving the cursor temporarily over the +first dollar sign. + +@deffn Command TeX-insert-dollar @var{arg} +@kindex $ +(@kbd{$}) Insert dollar sign. + +Show matching dollar sign if this dollar sign end the @TeX{} math mode. + +With optional @var{arg}, insert that many dollar signs. +@end deffn + +@TeX{} and @LaTeX{} users often look for a way to insert inline +equations like @samp{$...$} or @samp{\(...\)} simply typing @kbd{$}. +@AUCTeX{} helps them through the customizable variable +@code{TeX-electric-math}. + +@defopt TeX-electric-math +If the variable is non-nil and you type @kbd{$} outside math mode, +@AUCTeX{} will automatically insert the opening and closing symbols for +an inline equation and put the point between them. The opening symbol +will blink when @code{blink-matching-paren} is non-nil. If +@code{TeX-electric-math} is nil, typing @kbd{$} simply inserts @samp{$} +at point, this is the default. + +Besides @code{nil}, possible values for this variable are @code{(cons +"$" "$")} for @TeX{} inline equations @samp{$...$}, and @code{(cons +"\\(" "\\)")} for @LaTeX{} inline equations @samp{\(...\)}. + +If the variable is non-nil and point is inside math mode right between a +couple of single dollars, pressing @kbd{$} will insert another pair of +dollar signs and leave the point between them. Thus, if +@code{TeX-electric-math} is set to @code{(cons "$" "$")} you can easily +obtain a @TeX{} display equation @samp{$$...$$} by pressing @kbd{$} +twice in a row. (Note that you should not use double dollar signs in +@LaTeX{} because this practice can lead to wrong spacing in typeset +documents.) + +In addition, when the variable is non-nil and there is an active region +outside math mode, typing @kbd{$} will put around the active region +symbols for opening and closing inline equation and keep the region +active, leaving point after the closing symbol. By pressing repeatedly +@kbd{$} while the region is active you can toggle between an inline +equation, a display equation, and no equation. To be precise, +@samp{$...$} is replaced by @samp{$$...$$}, whereas @samp{\(...\)} is +replaced by @samp{\[...\]}. +@end defopt + +If you want to automatically insert @samp{$...$} in plain @TeX{} files, +and @samp{\(...\)} in @LaTeX{} files by pressing @kbd{$}, add the +following to your init file +@lisp +(add-hook 'plain-TeX-mode-hook + (lambda () (set (make-local-variable 'TeX-electric-math) + (cons "$" "$")))) +(add-hook 'LaTeX-mode-hook + (lambda () (set (make-local-variable 'TeX-electric-math) + (cons "\\(" "\\)")))) +@end lisp + +Note that Texinfo mode does nothing special for @kbd{$}. It inserts +dollar sign(s) just in the same way as the other normal keys do. + +@subheading Braces + +To avoid unbalanced braces, it is useful to insert them pairwise. You +can do this by typing @kbd{C-c @{}. + +@deffn Command TeX-insert-braces +@kindex C-c @{ +(@kbd{C-c @{}) Make a pair of braces and position the cursor +to type inside of them. If there is an active region, put braces around +it and leave point after the closing brace. +@end deffn + +When writing complex math formulas in @LaTeX{} documents, you +sometimes need to adjust the size of braces with pairs of macros like +@samp{\left}-@samp{\right}, @samp{\bigl}-@samp{\bigr} and so on. You +can avoid unbalanced pairs with the help of @code{TeX-insert-macro}, +bound to @kbd{C-c C-m} or @kbd{C-c @key{RET}} (@pxref{Completion}). +If you insert left size adjusting macros such as @samp{\left}, +@samp{\bigl} etc.@: with @code{TeX-insert-macro}, it asks for left brace +to use and supplies automatically right size adjusting macros such as +@samp{\right}, @samp{\bigr} etc.@: and corresponding right brace in +addtion to the intended left macro and left brace. + +The completion by @code{TeX-insert-macro} also applies when entering +macros such as @samp{\langle}, @samp{\lfloor} and @samp{\lceil}, which +produce the left part of the paired braces. For example, inserting +@samp{\lfloor} by @kbd{C-c C-m} is immediately followed by the +insertion of @samp{\rfloor}. In addition, if the point was located +just after @samp{\left} or its friends, the corresponding +@samp{\right} etc.@: will be inserted in front of @samp{\rfloor}. +In both cases, active region is honored. + +As a side effect, when @code{LaTeX-math-mode} (@pxref{Mathematics}) is +on, just typing @kbd{`(} inserts not only @samp{\langle}, but also +@samp{\rangle}. + +If you do not like such auto completion at all, it can be disabled by a +user option. + +@defopt TeX-arg-right-insert-p +If this option is turned off, the automatic supply of the right macros +and braces is suppressed. +@end defopt + +@kindex ( +@kindex @{ +@kindex [ +When you edit @LaTeX{} documents, you can enable automatic brace +pairing when typing @kbd{(}, @kbd{@{} and @kbd{[}. + +@defopt LaTeX-electric-left-right-brace +If this option is on, just typing @kbd{(}, @kbd{@{} or @kbd{[} +immediately adds the corresponding right brace @samp{)}, @samp{@}} or +@samp{]}. The point is left after the opening brace. If there is an +active region, braces are put around it. + +They recognize the preceding backslash or size adjusting macros such +as @samp{\left}, @samp{\bigl} etc., so the following completions will +occur: +@itemize @bullet + +@item +(when typing single left brace) +@itemize @minus + +@item +@samp{(} -> @samp{()} + +@item +@samp{@{} -> @samp{@{@}} + +@item +@samp{[} -> @samp{[]} +@end itemize + +@item +(when typing left brace just after a backslash) +@itemize @minus + +@item +@samp{\(} -> @samp{\(\)} + +@item +@samp{\@{} -> @samp{\@{\@}} + +@item +@samp{\[} -> @samp{\[\]} +@end itemize + +@item +(when typing just after @samp{\left} or @samp{\bigl}) +@itemize @minus + +@item +@samp{\left(} -> @samp{\left(\right)} + +@item +@samp{\bigl[} -> @samp{\bigl[\bigr]} +@end itemize + +@item +(when typing just after @samp{\Bigl\}) +@itemize @minus + +@item +@samp{\Bigl\@{} -> @samp{\Bigl\@{\Bigr\@}} + +@end itemize + +@end itemize + +This auto completion feature may be a bit annoying when editing an +already existing @LaTeX{} document. In that case, use @kbd{C-u 1} or +@kbd{C-q} before typing @kbd{(}, @kbd{@{} or @kbd{[}. Then no +completion is done and just a single left brace is inserted. In fact, +with optional prefix @var{arg}, just that many open braces are +inserted without any completion. +@end defopt + +@node Font Specifiers +@section Inserting Font Specifiers + +@cindex Fonts +@cindex Font macros +@cindex Changing font +@cindex Specifying a font + +Perhaps the most used keyboard commands of @AUCTeX{} are the short-cuts +available for easy insertion of font changing macros. + +If you give an argument (that is, type @kbd{C-u}) to the font command, +the innermost font will be replaced, i.e.@: the font in the @TeX{} group +around point will be changed. The following table shows the available +commands, with @code{@point{}} indicating the position where the text +will be inserted. + +@table @kbd +@item C-c C-f C-b +@kindex C-c C-f C-b +@cindex @code{\textbf} +Insert @b{bold face} @samp{\textbf@{@point{}@}} text. + +@item C-c C-f C-m +@kindex C-c C-f C-m +@cindex @code{\textmd} +Insert @r{medium face} @samp{\textmd@{@point{}@}} text. + +@item C-c C-f C-i +@kindex C-c C-f C-i +@cindex @code{\textit} +Insert @i{italics} @samp{\textit@{@point{}@}} text. + +@item C-c C-f C-e +@kindex C-c C-f C-e +@cindex @code{\emph} +Insert @emph{emphasized} @samp{\emph@{@point{}@}} text. + +@item C-c C-f C-s +@kindex C-c C-f C-s +@cindex @code{\textsl} +Insert @slanted{slanted} @samp{\textsl@{@point{}@}} text. + +@item C-c C-f C-r +@kindex C-c C-f C-r +@cindex @code{\textrm} +Insert @r{roman} @samp{\textrm@{@point{}@}} text. + +@item C-c C-f C-f +@kindex C-c C-f C-f +@cindex @code{\textsf} +Insert @sansserif{sans serif} @samp{\textsf@{@point{}@}} text. + +@item C-c C-f C-t +@kindex C-c C-f C-t +@cindex @code{\texttt} +Insert @t{typewriter} @samp{\texttt@{@point{}@}} text. + +@item C-c C-f C-c +@kindex C-c C-f C-c +@cindex @code{\textsc} +Insert @sc{small caps} @samp{\textsc@{@point{}@}} text. + +@item C-c C-f C-l +@kindex C-c C-f C-l +@cindex @code{\textulc} +Insert upper lower case @samp{\textulc@{@point{}@}} text. + +@item C-c C-f C-w +@kindex C-c C-f C-w +@cindex @code{\textsw} +Insert @sc{swash} @samp{\textsw@{@point{}@}} text. + +@item C-c C-f C-n +@kindex C-c C-f C-n +@cindex @code{\textnormal} +Insert normal @samp{\textnormal@{@point{}@}} text. + +@item C-c C-f C-d +@kindex C-c C-f C-c +@cindex Deleting fonts +Delete the innermost font specification containing point. + +@end table + +@deffn Command TeX-font @var{replace} @var{what} +@kindex C-c C-f +(@kbd{C-c C-f}) Insert template for font change command. + +If @var{replace} is not nil, replace current font. @var{what} +determines the font to use, as specified by @code{TeX-font-list}. +@end deffn + +@defopt TeX-font-list +List of fonts used by @code{TeX-font}. + +Each entry is a list with three elements. The first element is the +key to activate the font. The second element is the string to insert +before point, and the third element is the string to insert after +point. An optional fourth element means always replace if not nil. +@end defopt + +@defopt LaTeX-font-list +List of fonts used by @code{TeX-font} in LaTeX mode. It has the same +structure as @code{TeX-font-list}. +@end defopt + +@node Sectioning +@section Inserting chapters, sections, etc. +@cindex Sectioning +@cindex Sections +@cindex Chapters +@cindex @code{\chapter} +@cindex @code{\section} +@cindex @code{\subsection} +@cindex @code{\label} + +Insertion of sectioning macros, that is @samp{\chapter}, +@samp{\section}, @samp{\subsection}, etc.@: and accompanying +@samp{\label}'s may be eased by using @kbd{C-c C-s}. This command is +highly customizable, the following describes the default behavior. + +When invoking you will be asked for a section macro to insert. An +appropriate default is automatically selected by @AUCTeX{}, that is +either: at the top of the document; the top level sectioning for that +document style, and any other place: The same as the last occurring +sectioning command. + +Next, you will be asked for the actual name of that section, and last +you will be asked for a label to be associated with that section. The +label will be prefixed by the value specified in +@code{LaTeX-section-hook}. + +@deffn Command LaTeX-section @var{arg} +@kindex C-c C-s +(@kbd{C-c C-s}) Insert a sectioning command. + +Determine the type of section to be inserted, by the argument +@var{arg}. + +@itemize @bullet +@item +If @var{arg} is nil or missing, use the current level. +@item +If @var{arg} is a list (selected by C-u), go downward one level. +@item +If @var{arg} is negative, go up that many levels. +@item +If @var{arg} is positive or zero, use absolute level: +@itemize + +@item +0 : part +@item +1 : chapter +@item +2 : section +@item +3 : subsection +@item +4 : subsubsection +@item +5 : paragraph +@item +6 : subparagraph +@end itemize +@end itemize + +The following variables can be set to customize the function. + +@vtable @code +@item LaTeX-section-hook +Hooks to be run when inserting a section. +@item LaTeX-section-label +Prefix to all section references. +@end vtable + +@end deffn + +The precise behavior of @code{LaTeX-section} is defined by the contents +of @code{LaTeX-section-hook}. + +@defopt LaTeX-section-hook +List of hooks to run when a new section is inserted. + +The following variables are set before the hooks are run + +@vtable @code +@item LaTeX-level +Numeric section level, default set by prefix arg to +@code{LaTeX-section}. +@item LaTeX-name +Name of the sectioning command, derived from @code{LaTeX-level}. +@item LaTeX-title +The title of the section, default to an empty string. +@item LaTeX-toc +Entry for the table of contents list, default nil. +@item LaTeX-done-mark +Position of point afterwards, default nil meaning after the inserted +text. +@end vtable + +A number of hooks are already defined. Most likely, you will be able to +get the desired functionality by choosing from these hooks. + +@ftable @code +@item LaTeX-section-heading +Query the user about the name of the sectioning command. Modifies +@code{LaTeX-level} and @code{LaTeX-name}. +@item LaTeX-section-title +Query the user about the title of the section. Modifies @code{LaTeX-title}. +@item LaTeX-section-toc +Query the user for the toc entry. Modifies @code{LaTeX-toc}. +@item LaTeX-section-section +Insert @LaTeX{} section command according to @code{LaTeX-name}, +@code{LaTeX-title}, and @code{LaTeX-toc}. If @code{LaTeX-toc} is nil, no +toc entry is inserted. If @code{LaTeX-toc} or @code{LaTeX-title} are +empty strings, @code{LaTeX-done-mark} will be placed at the point they +should be inserted. +@item LaTeX-section-label +Insert a label after the section command. Controlled by the variable +@code{LaTeX-section-label}. +@end ftable + +To get a full featured @code{LaTeX-section} command, insert + +@lisp +(setq LaTeX-section-hook + '(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-toc + LaTeX-section-section + LaTeX-section-label)) +@end lisp + +in your init file such as @file{init.el} or @file{.emacs}. +@end defopt + +The behavior of @code{LaTeX-section-label} is determined by the +variable @code{LaTeX-section-label}. + +@defopt LaTeX-section-label +Default prefix when asking for a label. + +If it is a string, it is used unchanged for all kinds of sections. +If it is nil, no label is inserted. +If it is a list, the list is searched for a member whose car is equal +to the name of the sectioning command being inserted. The cdr is then +used as the prefix. If the name is not found, or if the cdr is nil, +no label is inserted. + +@cindex Prefix for labels +@cindex Label prefix +@cindex Labels +By default, chapters have a prefix of @samp{cha:} while sections and +subsections have a prefix of @samp{sec:}. Labels are not automatically +inserted for other types of sections. +@end defopt + +@node Environments +@section Inserting Environment Templates +@cindex Environments +@cindex @samp{\begin} +@cindex @samp{\end} + +A large apparatus is available that supports insertions of environments, +that is @samp{\begin@{@}} --- @samp{\end@{@}} pairs. + +@AUCTeX{} is aware of most of the actual environments available in a +specific document. This is achieved by examining your +@samp{\documentclass} command, and consulting a precompiled list of +environments available in a large number of styles. + +Most of these are described further in the following sections, and you +may easily specify more. @xref{Customizing Environments}. + +You insert an environment with @kbd{C-c C-e}, and select an environment +type. Depending on the environment, @AUCTeX{} may ask more questions +about the optional parts of the selected environment type. With +@kbd{C-u C-c C-e} you will change the current environment. + +@deffn Command LaTeX-environment @var{arg} +@kindex C-c C-e +(@kbd{C-c C-e}) @AUCTeX{} will prompt you for an environment +to insert. At this prompt, you may press @key{TAB} or @key{SPC} to +complete a partially written name, and/or to get a list of available +environments. After selection of a specific environment @AUCTeX{} may +prompt you for further specifications. + +If the optional argument @var{arg} is non-nil (i.e.@: you have given a +prefix argument), the current environment is modified and no new +environment is inserted. +@end deffn + +@AUCTeX{} helps you adding labels to environments which use them, such +as @samp{equation}, @samp{figure}, @samp{table}, etc@dots{} When you +insert one of the supported environments with @kbd{C-c C-e}, you will be +automatically prompted for a label. You can select the prefix to be +used for such environments with the @code{LaTeX-label-alist} variable. +@defopt LaTeX-label-alist +List the prefixes to be used for the label of each supported +environment. + +This is an alist whose car is the environment name, and the cdr either +the prefix or a symbol referring to one. + +If the name is not found, or if the cdr is nil, no label is +automatically inserted for that environment. + +If you want to automatically insert a label for a environment but with +an empty prefix, use the empty string @code{""} as the cdr of the +corresponding entry. +@end defopt + +As a default selection, @AUCTeX{} will suggest the environment last +inserted or, as the first choice the value of the variable +@code{LaTeX-default-environment}. + +@defopt LaTeX-default-environment +Default environment to insert when invoking @code{LaTeX-environment} +first time. When the current environment is @samp{document}, it is +overriden by @code{LaTeX-default-document-environment}. +@end defopt + +@defvar LaTeX-default-document-environment +Default environment when invoking @samp{LaTeX-environment} and the +current environment is @samp{document}. It is intended to be used in +@LaTeX{} class style files. For example, in @file{beamer.el} it is set +to @code{frame}, in @file{letter.el} to @code{letter}, and in +@file{slides.el} to @code{slide}. +@end defvar + +If the document is empty, or the cursor is placed at the top of the +document, @AUCTeX{} will default to insert a @samp{document} environment +prompting also for the insertion of @samp{\documentclass} and +@samp{\usepackage} macros. You will be prompted for a new package until +you enter nothing. If you do not want to insert any @samp{\usepackage} +at all, just press @key{RET} at the first @samp{Packages} prompt. + +@AUCTeX{} distinguishes normal and expert environments. By default, it +will offer completion only for normal environments. This behavior is +controlled by the user option @code{TeX-complete-expert-commands}. + +@defopt TeX-complete-expert-commands +Complete macros and environments marked as expert commands. + +Possible values are nil, t, or a list of style names. + +@table @asis +@item nil +Don't complete expert commands (default). +@item t +Always complete expert commands. +@item (@var{styles} @dots{}) +Only complete expert commands of @var{styles}. +@end table +@end defopt + + +@menu +* Equations:: Equations +* Floats:: Floats +* Itemize-like:: Itemize-like Environments +* Tabular-like:: Tabular-like Environments +* Customizing Environments:: Customizing Environments +@end menu + +You can close the current environment with @kbd{C-c ]}, but we suggest +that you use @kbd{C-c C-e} to insert complete environments instead. + +@deffn Command LaTeX-close-environment +@kindex C-c ] +(@kbd{C-c ]}) Insert an @samp{\end} that matches the current environment. +@end deffn + +@AUCTeX{} offers keyboard shortcuts for moving point to the beginning +and to the end of the current environment. +@deffn Command LaTeX-find-matching-begin +@kindex C-M-a +(@kbd{C-M-a}) Move point to the @samp{\begin} of the current +environment. + +If this command is called inside a comment and +@code{LaTeX-syntactic-comments} is enabled, try to find the environment +in commented regions with the same comment prefix. +@end deffn + +@deffn Command LaTeX-find-matching-end +@kindex C-M-e +(@kbd{C-M-e}) Move point to the @samp{\end} of the current environment. + +If this command is called inside a comment and +@code{LaTeX-syntactic-comments} is enabled, try to find the environment +in commented regions with the same comment prefix. +@end deffn + +@node Equations +@subsection Equations +@cindex Equations +@cindex Equation +@cindex Eqnarray +@cindex amsmath + +When inserting equation-like environments, the @samp{\label} will have a +default prefix, which is controlled by the following variables: + +@defopt LaTeX-equation-label +Prefix to use for `equation' labels. +@end defopt + +@defopt LaTeX-eqnarray-label +Prefix to use for `eqnarray' labels. +@end defopt + +@defopt LaTeX-amsmath-label +Prefix to use for amsmath equation labels. Amsmath equations include +@samp{align}, @samp{alignat}, @samp{xalignat}, @samp{multline}, +@samp{flalign} and @samp{gather}. +@end defopt + +@node Floats +@subsection Floats +@cindex Floats +@cindex Figures +@cindex Figure environment +@cindex Tables +@cindex Table environment + +Figures and tables (i.e., floats) may also be inserted using @AUCTeX{}. +After choosing either `figure' or `table' in the environment list +described above, you will be prompted for a number of additional things. + +@table @var +@item float position +This is the optional argument of float environments that controls how +they are placed in the final document. In @LaTeX{} this is a sequence +of the letters @samp{htbp} as described in the @LaTeX{} manual. The +value will default to the value of @code{LaTeX-float}. +@vindex LaTeX-float + +@item caption +This is the caption of the float. The default is to insert the caption +at the bottom of the float. You can specify floats where the caption +should be placed at the top with @code{LaTeX-top-caption-list}. +@vindex LaTeX-top-caption-list + +@item short caption +If the specified caption is greater than a specific length, then a short +caption is prompted for and it is inserted as an optional argument to +the @samp{\caption} macro. The length that a caption needs to be before +prompting for a short version is controlled by +@code{LaTeX-short-caption-prompt-length}. +@vindex LaTeX-short-caption-prompt-length + +@item label +The label of this float. The label will have a default prefix, which is +controlled by the variables @code{LaTeX-figure-label} and +@code{LaTeX-table-label}. +@vindex LaTeX-figure-label +@vindex LaTeX-table-label +@cindex Prefix for labels +@cindex Label prefix +@cindex Labels +@end table + +Moreover, you will be asked if you want the contents of the float +environment to be horizontally centered. Upon a positive answer a +@samp{\centering} macro will be inserted at the beginning of the float +environment. + +@defopt LaTeX-float +Default placement for floats. +@end defopt + +@defopt LaTeX-figure-label +Prefix to use for figure labels. +@end defopt + +@defopt LaTeX-table-label +Prefix to use for table labels. +@end defopt + +@defopt LaTeX-top-caption-list +List of float environments with top caption. +@end defopt + +@defopt LaTeX-short-caption-prompt-length +Number of chars a caption should be before prompting for a short +caption. +@end defopt + +@node Itemize-like +@subsection Itemize-like Environments +@cindex Itemize +@cindex Enumerates +@cindex Descriptions +@cindex Items +@cindex \item + +In an itemize-like environment, nodes (i.e., @samp{\item}s) may be +inserted using @kbd{C-c @key{LFD}}. + +@deffn Command LaTeX-insert-item +@kindex C-c @key{LFD} +(@kbd{C-c @key{LFD}}) Close the current item, move to the next line and +insert an appropriate @samp{\item} for the current environment. That is, +`itemize' and `enumerate' will have @samp{\item } inserted, while +`description' will have @samp{\item[] } inserted. +@end deffn + +@defopt TeX-arg-item-label-p +If non-nil, you will always be asked for optional label in items. +Otherwise, you will be asked only in description environments. +@end defopt + +@node Tabular-like +@subsection Tabular-like Environments +@cindex amsmath + +When inserting Tabular-like environments, that is, `tabular' `array' +etc., you will be prompted for a template for that environment. +Related variables: + +@defopt LaTeX-default-format +Default format string for array and tabular environments. +@end defopt + +@defopt LaTeX-default-width +Default width for minipage and tabular* environments. +@end defopt + +@defopt LaTeX-default-position +Default position string for array and tabular environments. If nil, +act like the empty string is given, but don't prompt for a position. +@end defopt + +@AUCTeX{} calculates the number of columns from the format string and +inserts the suitable number of ampersands. + +You can use @kbd{C-c @key{LFD}} (@code{LaTeX-insert-item}) to terminate +rows in these environments. It supplies line break macro @samp{\\} and +inserts the suitable number of ampersands on the next line. @AUCTeX{} +also supports the @samp{*@{num@}@{cols@}} notation (which may contain +another @samp{*}-expression) in the format string when calculating the +number of ampersands. Please note that @samp{num} and @samp{cols} must +be enclosed in braces; expressions like @samp{*2l} are not recognized +correctly by the algorithm. + +@deffn Command LaTeX-insert-item +@kindex C-c @key{LFD} +(@kbd{C-c @key{LFD}}) Close the current row with @samp{\\}, move to the +next line and insert an appropriate number of ampersands for the current +environment. +@end deffn + +Similar supports are provided for various amsmath environments such as +@samp{align}, @samp{gather}, @samp{alignat}, @samp{matrix} etc. Try +typing @kbd{C-c @key{LFD}} in these environments. It recognizes the +current environment and does the appropriate job depending on the +context. + +@node Customizing Environments +@subsection Customizing Environments + +@xref{Adding Environments}, for how to customize the list of known +environments. + +@node Mathematics +@section Entering Mathematics +@cindex Mathematics +@cindex Symbols +@cindex Abbreviations +@vindex LaTeX-math-default + +@TeX{} is written by a mathematician, and has always contained good +support for formatting mathematical text. @AUCTeX{} supports this +tradition, by offering a special minor mode for entering text with many +mathematical symbols. You can enter this mode by typing @kbd{C-c +~}. + +@deffn Command LaTeX-math-mode +@kindex C-c ~ +(@kbd{C-c ~}) Toggle @LaTeX{} Math mode. This is a minor mode rebinding +the key @code{LaTeX-math-abbrev-prefix} to allow easy typing of +mathematical symbols. @kbd{`} will read a character from the keyboard, +and insert the symbol as specified in @code{LaTeX-math-default} and +@code{LaTeX-math-list}. If given a prefix argument, the symbol will be +surrounded by dollar signs. +@end deffn + +You can use another prefix key (instead of @kbd{`}) by setting the +variable @code{LaTeX-math-abbrev-prefix}. + +To enable @LaTeX{} Math mode by default, add the following in your +init file such as @file{init.el} or @file{.emacs}: +@lisp +(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode) +@end lisp + +@defopt LaTeX-math-abbrev-prefix +A string containing the prefix of @code{LaTeX-math-mode} commands; This +value defaults to @kbd{`}. + +The string has to be a key or key sequence in a format understood by the +@code{kbd} macro. This corresponds to the syntax usually used in the +manuals for Emacs Lisp. +@end defopt + +The variable @code{LaTeX-math-list} allows you to add your own mappings. + +@defopt LaTeX-math-list +A list containing user-defined keys and commands to be used in @LaTeX{} +Math mode. Each entry should be a list of two to four elements. + +First, the key to be used after @code{LaTeX-math-abbrev-prefix} for macro +insertion. The key can be a character (e.g.@: @samp{?o}) for a single +stroke or a string (e.g.@: @samp{"o a"}) for a multi-stroke binding. If it +is nil, the symbol has no associated keystroke (it is available in the +menu, though). + +Second, a string representing the name of the macro (without a leading +backslash.) + +Third, a string representing the name of a submenu the command should be +added to. Use a list of strings in case of nested menus. + +Fourth, the position of a Unicode character to be displayed in the menu +alongside the macro name. This is an integer value. +@end defopt + +@defopt LaTeX-math-menu-unicode +Whether the @LaTeX{} Math menu should try using Unicode for effect. Your Emacs +built must be able to display include Unicode characters in menus for +this feature. +@end defopt + +@AUCTeX{}'s reference card @file{tex-ref.tex} includes a list of all +math mode commands. + +@cindex subscript +@cindex superscript +@kindex _ +@kindex ^ +@AUCTeX{} can help you write subscripts and superscripts in math +constructs by automatically inserting a pair of braces after typing +@key{_} or @key{^} respectively and putting point between the braces. +In order to enable this feature, set the variable +@code{TeX-electric-sub-and-superscript} to a non-nil value. + +@defopt TeX-electric-sub-and-superscript +If non-nil, insert braces after typing @key{^} and @key{_} in math mode. +@end defopt + +@cindex input method +You can automatically turn off input methods, used to input non-ascii +characters, when you begin to enter math constructs. + +@defopt TeX-math-input-method-off-regexp +Input method matching this regular expression is turned off when @kbd{$} +is typed to begin math mode or a math environment is inserted by +@kbd{C-c C-e} (@code{LaTeX-environment}). +@end defopt + +@node Completion +@section Completion +@cindex Completion +@cindex Expansion +@cindex Macro expansion +@cindex Macro completion +@cindex Macro arguments +@cindex Arguments to @TeX{} macros + +Emacs lisp programmers probably know the @code{lisp-complete-symbol} +command which was bound to @kbd{M-@key{TAB}} until completion-at-point +became the new standard completion facility (see below). Users of the +wonderful ispell mode know and love the @code{ispell-complete-word} +command from that package. Similarly, @AUCTeX{} has a +@code{TeX-complete-symbol} command, by default bound to +@kbd{M-@key{TAB}} which is equivalent to @kbd{C-M-i}. Using +@code{TeX-complete-symbol} makes it easier to type and remember the +names of long @LaTeX{} macros. + +In order to use @code{TeX-complete-symbol}, you should write a backslash +and the start of the macro. Typing @kbd{M-@key{TAB}} will now complete +as much of the macro, as it unambiguously can. For example, if you type +`@samp{\renewc}' and then @kbd{M-@key{TAB}}, it will expand to +`@samp{\renewcommand}'. But there's more: if point is just after +@samp{\begin@{}, then @code{TeX-complete-symbol} will complete @LaTeX{} +environments, etc. This is controlled by @code{TeX-complete-list}. + +@deffn Command TeX-complete-symbol +@kindex M-@key{TAB} +(@kbd{M-@key{TAB}}) Complete @TeX{} symbol before point. +@end deffn + +@defvar TeX-complete-list +List of ways to complete the preceding text. + +Each entry is a list with the following elements: + +@enumerate +@item +Regexp matching the preceding text or a predicate of arity 0 which +returns non-nil and sets `match-data' appropriately if it is applicable. +@item +A number indicating the subgroup in the regexp containing the text. +@item +A function returning an alist of possible completions. +@item +Text to append after a succesful completion. +@end enumerate + +Or alternatively: + +@enumerate +@item +Regexp matching the preceding text. +@item +Function to do the actual completion. +@end enumerate +@end defvar + +More recent Emacs versions have a new completion mechanism. Modes may +define and register custom @code{completion-at-point} functions and when the +user invokes @code{completion-at-point} (usually bound to +@kbd{M-@key{TAB}}), all such registered functions are consulted for +checking for possible completions. Modern completion UIs like +@i{company-mode} support this completion-at-point facility. + +@defun TeX--completion-at-point +@AUCTeX{}'s completion-at-point function which is automatically added to +@code{completion-at-point-functions} in @TeX{} and @LaTeX{} buffers. + +It offers the same completion candidates as would +@code{TeX-complete-symbol} (and is also controlled by +@code{TeX-complete-list}) except that it doesn't fall back on +@code{ispell-complete-word} which would be awkward with completion UIs +like @i{company-mode}. +@end defun + +A more direct way to insert a macro is with @code{TeX-insert-macro}, +bound to @kbd{C-c C-m} which is equivalent to @kbd{C-c @key{RET}}. It +has the advantage over completion that it knows about the argument of +most standard @LaTeX{} macros, and will prompt for them. It also knows +about the type of the arguments, so it will for example give completion +for the argument to @samp{\include}. Some examples are listed below. + +@deffn Command TeX-insert-macro +@kindex C-c C-m +(@kbd{C-c C-m} or @kbd{C-c @key{RET}}) Prompt (with completion) for the +name of a @TeX{} macro, and if @AUCTeX{} knows the macro, prompt for +each argument. +@end deffn + +As a default selection, @AUCTeX{} will suggest the macro last inserted +or, as the first choice the value of the variable +@code{TeX-default-macro}. + +@defopt TeX-default-macro +Default macro to insert when invoking @code{TeX-insert-macro} first time. +@end defopt + +@defopt TeX-insert-macro-default-style +Specifies whether @code{TeX-insert-macro} will ask for all optional +arguments. + +If set to the symbol @code{show-optional-args}, @code{TeX-insert-macro} +asks for optional arguments of @TeX{} marcos, unless the previous +optional argument has been rejected. If set to +@code{show-all-optional-args}, @code{TeX-insert-macro} asks for all +optional arguments. @code{mandatory-args-only}, @code{TeX-insert-macro} +asks only for mandatory arguments. When @code{TeX-insert-macro} is +called with prefix argument (@kbd{C-u}), it's the other way round. +@c FIXME: Now that the option has 3 candidates, it isn't clear what "the +@c other way round" means. + +Note that for some macros, there are special mechanisms, e.g.@: +@code{TeX-arg-cite-note-p} and @code{LaTeX-includegraphics-options-alist}. +@end defopt + + +A faster alternative is to enable the option +@code{TeX-electric-escape}. + +@defopt TeX-electric-escape +If this is non-nil, typing the @TeX{} escape character @kbd{\} will +invoke the command @code{TeX-electric-macro}. + +In Texinfo mode, the command is invoked by @kbd{@@} instead. +@end defopt + +The difference between @code{TeX-insert-macro} and +@code{TeX-electric-macro} is that space key @key{SPC} will complete and exit from the +minibuffer in @code{TeX-electric-macro}. Use @key{TAB} if you merely +want to complete. + +@deffn Command TeX-electric-macro +Prompt (with completion) for the name of a @TeX{} macro, +and if @AUCTeX{} knows the macro, prompt for each argument. +Space (@key{SPC}) will complete and exit. +@end deffn + +By default @AUCTeX{} will put an empty set braces @samp{@{@}} after a +macro with no arguments to stop it from eating the next whitespace. +This is suppressed inside math mode and can be disabled totally by +setting @code{TeX-insert-braces} to nil. + +@defopt TeX-insert-braces +If non-nil, append a empty pair of braces after inserting a macro with +no arguments. +@end defopt + +@defopt TeX-insert-braces-alist +Control the insertion of a pair of braces after a macro on a per macro +basis. + +This variable is an alist. Each element is a cons cell, whose car is +the macro name, and the cdr is non-nil or nil, depending on whether a +pair of braces should be, respectively, appended or not to the macro. + +If a macro has an element in this variable, @AUCTeX{} will +use its value to decide what to do, whatever the value of the variable +@code{TeX-insert-braces}. +@end defopt + +Completions work because @AUCTeX{} can analyze @TeX{} files, and store +symbols in Emacs Lisp files for later retrieval. @xref{Automatic}, for +more information. + +@AUCTeX{} distinguishes normal and expert macros. By default, it will +offer completion only for normal commands. This behavior can be +controlled using the user option @code{TeX-complete-expert-commands}. + +@defopt TeX-complete-expert-commands +Complete macros and environments marked as expert commands. + +Possible values are nil, t, or a list of style names. + +@table @asis +@item nil +Don't complete expert commands (default). +@item t +Always complete expert commands. +@item (@var{styles} @dots{}) +Only complete expert commands of @var{styles}. +@end table +@end defopt + + +@cindex \cite, completion of +@cindex Bib@TeX{}, completion +@cindex cite, completion of +@cindex bibliography, completion +@cindex citations, completion of +@cindex \label, completion +@cindex \ref, completion +@cindex labels, completion of +@AUCTeX{} will also make completion for many macro arguments, for +example existing labels when you enter a @samp{\ref} macro with +@code{TeX-insert-macro} or @code{TeX-electric-macro}, and Bib@TeX{} +entries when you enter a @samp{\cite} macro. For this kind of +completion to work, parsing must be enabled as described in +@ref{Parsing Files}. For @samp{\cite} you must also make sure that +the Bib@TeX{} files have been saved at least once after you enabled +automatic parsing on save, and that the basename of the Bib@TeX{} file +does not conflict with the basename of one of @TeX{} files. + +@node Marking +@section Marking Environments, Sections, or Texinfo Nodes + +You can mark the current environment by typing @kbd{C-c .}, or the +current section by typing @kbd{C-c *}. + +In Texinfo documents you can type @kbd{C-M-h} to mark the current node. + +When the region is set, the point is moved to its beginning and the mark +to its end. + +@menu +* Marking (LaTeX):: @LaTeX{} Commands for Marking Environments and Sections +* Marking (Texinfo):: Texinfo Commands for Marking Environments, Sections, and Nodes +@end menu + +@node Marking (LaTeX) +@subsection @LaTeX{} Commands for Marking Environments and Sections + +@deffn Command LaTeX-mark-section +@kindex C-c * +(@kbd{C-c *}) Set mark at end of current logical section, and point at +top. + +With a non-nil prefix argument, mark only the region from the current +section start to the next sectioning command. Thereby subsections are +not being marked. Otherwise, any included subsections are also marked +along with current section. +@end deffn + +@deffn Command LaTeX-mark-environment +@kindex C-c . +(@kbd{C-c .}) Set mark to the end of the current environment and point +to the matching beginning. + +If a prefix argument is given, mark the respective number of enclosing +environments. The command will not work properly if there are +unbalanced begin-end pairs in comments and verbatim environments. +@end deffn + +@node Marking (Texinfo) +@subsection Texinfo Commands for Marking Environments and Sections + +@deffn Command Texinfo-mark-section +@kindex C-c * +(@kbd{C-c *}) Mark the current section, with inclusion of any containing +node. + +@vindex outline-regexp +@vindex texinfo-section-list +The current section is detected as starting by any of the structuring +commands matched by the regular expression in the variable +@code{outline-regexp} which in turn is a regular expression matching any +element of the variable @code{texinfo-section-list}. + +With a non-nil prefix argument, mark only the region from the current +section start to the next sectioning command. Thereby subsections are +not being marked. Otherwise, any included subsections are also marked. + +Note that when the current section is starting immediately after a node +command, then the node command is also marked as part of the section. +@end deffn + +@deffn Command Texinfo-mark-environment +@kindex C-c . +(@kbd{C-c .}) Set mark to the end of the current environment and point +to the matching beginning. + +If a prefix argument is given, mark the respective number of enclosing +environments. The command will not work properly if there are +unbalanced begin-end pairs in comments and verbatim environments. +@end deffn + +@deffn Command Texinfo-mark-node +@kindex C-M-h +(@kbd{C-M-h}) Mark the current node. This is the node in which point is +located. It is starting at the previous occurrence of the keyword +@code{@@node} and ending at next occurrence of the keywords +@code{@@node} or @code{@@bye}. +@end deffn + +@node Commenting +@section Commenting + +It is often necessary to comment out temporarily a region of @TeX{} or +@LaTeX{} code. This can be done with the commands @kbd{C-c ;} and +@kbd{C-c %}. @kbd{C-c ;} will comment out all lines in the current +region, while @kbd{C-c %} will comment out the current paragraph. +Type @kbd{C-c ;} again to uncomment all lines of a commented region, +or @kbd{C-c %} again to uncomment all comment lines around point. +These commands will insert or remove a single @samp{%} respectively. + +@deffn Command TeX-comment-or-uncomment-region +@kindex C-c ; +(@kbd{C-c ;}) Add or remove @samp{%} from the beginning of each line +in the current region. Uncommenting works only if the region encloses +solely commented lines. If @AUCTeX{} should not try to guess if the +region should be commented or uncommented the commands +@code{TeX-comment-region} and @code{TeX-uncomment-region} can be used +to explicitly comment or uncomment the region in concern. +@end deffn + +@deffn Command TeX-comment-or-uncomment-paragraph +@kindex C-c % +(@kbd{C-c %}) Add or remove @samp{%} from the beginning of each line +in the current paragraph. When removing @samp{%} characters the +paragraph is considered to consist of all preceding and succeeding +lines starting with a @samp{%}, until the first non-comment line. +@end deffn + +@node Indenting +@section Indenting +@cindex Formatting +@cindex Indenting +@cindex Indentation +@cindex Reformatting +@cindex Reindenting + +Indentation means the addition of whitespace at the beginning of lines +to reflect special syntactical constructs. This makes it easier to see +the structure of the document, and to catch errors such as a missing +closing brace. Thus, the indentation is done for precisely the same +reasons that you would indent ordinary computer programs. + +Indentation is done by @LaTeX{} environments and by @TeX{} groups, that +is the body of an environment is indented by the value of +@code{LaTeX-indent-level} (default 2). Also, items of an `itemize-like' +environment are indented by the value of @code{LaTeX-item-indent}, +default @minus{}2. (Items are identified with the help of +@code{LaTeX-item-regexp}.) If more environments are nested, they are +indented `accumulated' just like most programming languages usually are +seen indented in nested constructs. +@vindex LaTeX-indent-level +@vindex LaTeX-item-indent +@vindex LaTeX-item-regexp + +You can explicitly indent single lines, usually by pressing @key{TAB}, +or marked regions by calling @code{indent-region} on it. If you have +@code{auto-fill-mode} enabled and a line is broken while you type it, +Emacs automatically cares about the indentation in the following line. +If you want to have a similar behavior upon typing @key{RET}, you can +customize the variable @code{TeX-newline-function} and change the +default of @code{newline} which does no indentation to +@code{newline-and-indent} which indents the new line or +@code{reindent-then-newline-and-indent} which indents both the current +and the new line. +@vindex TeX-newline-function +@findex indent-region +@cindex auto-fill-mode + +There are certain @LaTeX{} environments which should be indented in a +special way, like @samp{tabular} or @samp{verbatim}. Those environments +may be specified in the variable @code{LaTeX-indent-environment-list} +together with their special indentation functions. Taking the +@samp{verbatim} environment as an example you can see that +@code{current-indentation} is used as the indentation function. This +will stop @AUCTeX{} from doing any indentation in the environment if you +hit @key{TAB} for example. +@vindex LaTeX-indent-environment-list + +There are environments in @code{LaTeX-indent-environment-list} which do +not bring a special indentation function with them. This is due to the +fact that first the respective functions are not implemented yet and +second that filling will be disabled for the specified environments. +This shall prevent the source code from being messed up by accidently +filling those environments with the standard filling routine. If you +think that providing special filling routines for such environments +would be an appropriate and challenging task for you, you are invited to +contribute. (@xref{Filling}, for further information about the filling +functionality.) +@vindex LaTeX-indent-environment-list + +The check for the indentation function may be enabled or disabled by +customizing the variable @code{LaTeX-indent-environment-check}. +@vindex LaTeX-indent-environment-check + +For tabular-like environments, @AUCTeX{} has a built-in function to indent +according to preceding @samp{&} signs and assigns it to all known +tabular-like environments in the default value of +@code{LaTeX-indent-environment-list}. + +@cindex align.el +@findex align-current +As a side note with regard to formatting special environments: Newer +Emacsen include @file{align.el} and therefore provide some support for +formatting @samp{tabular} and @samp{tabbing} environments with the +function @code{align-current} which will nicely align columns in the +source code. + +@AUCTeX{} is able to format commented parts of your code just as any +other part. This means @LaTeX{} environments and @TeX{} groups in +comments will be indented syntactically correct if the variable +@code{LaTeX-syntactic-comments} is set to t. If you disable it, +comments will be filled like normal text and no syntactic indentation +will be done. +@vindex LaTeX-syntactic-comments + +Following you will find a list of most commands and variables related +to indenting with a small summary in each case: + +@table @kbd +@item @key{TAB} +@kindex @key{TAB} +@findex LaTeX-indent-line +@code{LaTeX-indent-line} will indent the current line. + +@item @key{LFD} +@itemx C-j +@kindex @key{LFD} +@kindex C-j +@code{newline-and-indent} inserts a new line (much like @key{RET}) and +moves the cursor to an appropriate position by the left margin. + +Most keyboards nowadays lack a linefeed key and @kbd{C-j} may be tedious +to type. Therefore you can customize @AUCTeX{} to perform indentation +upon typing @key{RET} as well. The respective option is called +@code{TeX-newline-function}. +@end table + +@defopt LaTeX-indent-environment-list +List of environments with special indentation. The second element in +each entry is the function to calculate the indentation level in +columns. +@end defopt + +@defopt LaTeX-indent-level +Number of spaces to add to the indentation for each @samp{\begin} not +matched by a @samp{\end}. +@end defopt + +@defopt LaTeX-item-indent +Number of spaces to add to the indentation for @samp{\item}'s in list +environments. +@end defopt + +@defopt TeX-brace-indent-level +Number of spaces to add to the indentation for each @samp{@{} not +matched by a @samp{@}}. +@end defopt + +@defopt LaTeX-syntactic-comments +If non-nil comments will be filled and indented according to @LaTeX{} +syntax. Otherwise they will be filled like normal text. +@end defopt + +@defopt TeX-newline-function +Used to specify the function which is called when @key{RET} is pressed. +This will normally be @code{newline} which simply inserts a new line. +In case you want to have @AUCTeX{} do indentation as well when you press +@key{RET}, use the built-in functions @code{newline-and-indent} or +@code{reindent-then-newline-and-indent}. The former inserts a new line +and indents the following line, i.e.@: it moves the cursor to the right +position and therefore acts as if you pressed @key{LFD}. The latter +function additionally indents the current line. If you choose +@samp{Other}, you can specify your own fancy function to be called when +@key{RET} is pressed. +@end defopt + +@vindex LaTeX-begin-regexp +@vindex LaTeX-end-regexp +@AUCTeX{} treats by default @samp{\[...\]} math mode as a regular +environment and indents it accordingly. If you do not like such +behavior you only need to remove @code{\|\[} and @code{\|\]} from +@code{LaTeX-begin-regexp} and @code{LaTeX-end-regexp} variables +respectively. + +A closely related topic is indenting of text enclosed in square brackets, +parentheses and other pairs. @AUCTeX{} offers two variables which control +if indentation happens inside these pairs. + +@defopt TeX-indent-open-delimiters +This variable contains additional opening delimiters which increase +indentation. For example add @code{[} to this variable to get text after +a square bracket indented. +@end defopt + +@defopt TeX-indent-close-delimiters +This is the accompanying variable to @code{TeX-indent-open-delimiters} +decreasing the indentation again. This variable should contain @code{]} +if @code{TeX-indent-open-delimiters} is set like described above. +@end defopt + +@noindent +Note that this is an opt-in feature, both variables are initially set to +an empty string. That is because it introduces non-trivial side effects +to include @code{[} and @code{]} in @code{TeX-indent-open-delimiters} and +@code{TeX-indent-close-delimiters}; if you only have an opening square +bracket in your text without closing it, wrong indentation persists in the +following text. For example, in math expression, half-open intervals are +frequently written as @samp{[0,10)} or @samp{[0,10[}. In such cases, you +can put the closing part as a comment in the same line in order to have +correct indentation after that: +@example +$[0,10)$ % ] +$[0,10[$ % ]] +@end example + +Another example is @samp{\left}-@samp{\right} pair in equations. Similar +workarounds are available: +@example +\begin@{equation@} + \left[ % ] + xyz + \right] % [ + abc +\end@{equation@} +@end example + +You can include parens @samp{()} also in @code{TeX-indent-open-delimiters} +and @code{TeX-indent-close-delimiters} to enable indent inside them. Be +prepared for similar side effects when you do. + +Note that commented curly braces @code{@{} and @code{@}} aren't counted +when @AUCTeX{} computes indentation. + +@node Filling +@section Filling +@cindex Filling +@cindex Formatting +@cindex Reformatting +@cindex Refilling +@findex auto-fill-mode +@findex turn-on-auto-fill +@vindex fill-column + +Filling deals with the insertion of line breaks to prevent lines from +becoming wider than what is specified in @code{fill-column}. The +linebreaks will be inserted automatically if @code{auto-fill-mode} is +enabled. In this case the source is not only filled but also indented +automatically as you write it. + +@code{auto-fill-mode} can be enabled for @AUCTeX{} by calling +@code{turn-on-auto-fill} in one of the hooks @AUCTeX{} is running. +@xref{Modes and Hooks}. As an example, if you want to enable +@code{auto-fill-mode} in @code{LaTeX-mode}, put the following into your +init file: + +@lisp +(add-hook 'LaTeX-mode-hook #'turn-on-auto-fill) +@end lisp + +You can manually fill explicitly marked regions, paragraphs, +environments, complete sections, or the whole buffer. (Note that manual +filling in @AUCTeX{} will indent the start of the region to be filled in +contrast to many other Emacs modes.) + +There are some syntactical constructs which are handled specially with +regard to filling. These are so-called @dfn{code comments} and +@dfn{paragraph commands}. + +Code comments are comments preceded by code or text in the same line. +Upon filling a region, code comments themselves will not get filled. +Filling is done from the start of the region to the line with the code +comment and continues after it. In order to prevent overfull lines in +the source code, a linebreak will be inserted before the last +non-comment word by default. This can be changed by customizing +@code{LaTeX-fill-break-before-code-comments}. If you have overfull +lines with code comments you can fill those explicitly by calling +@code{LaTeX-fill-paragraph} or pressing @kbd{M-q} with the cursor +positioned on them. This will add linebreaks in the comment and indent +subsequent comment lines to the column of the comment in the first line +of the code comment. In this special case @kbd{M-q} only acts on the +current line and not on the whole paragraph. + +Lines with @samp{\par} are treated similarly to code comments, +i.e.@: @samp{\par} will be treated as paragraph boundary which should not +be followed by other code or text. But it is not treated as a real +paragraph boundary like an empty line where filling a paragraph would +stop. + +Paragraph commands like @samp{\section} or @samp{\noindent} (the list of +commands is defined by @code{LaTeX-paragraph-commands}) are often to be +placed in their own line(s). This means they should not be consecuted +with any preceding or following adjacent lines of text. @AUCTeX{} will +prevent this from happening if you do not put any text except another +macro after the end of the last brace of the respective macro. If +there is other text after the macro, @AUCTeX{} regards this as a sign +that the macro is part of the following paragraph. +@vindex LaTeX-paragraph-commands + +Here are some examples: + +@example +\begin@{quote@} + text text text text +@end example + +@example +\begin@{quote@}\label@{foo@} + text text text text +@end example + +If you press @kbd{M-q} on the first line in both examples, nothing will +change. But if you write + +@example +\begin@{quote@} text + text text text text +@end example +@noindent +and press @kbd{M-q}, you will get + +@example +\begin@{quote@} text text text text text +@end example + +Besides code comments and paragraph commands, another speciality of +filling in @AUCTeX{} involves commented lines. You should be aware that +these comments are treated as islands in the rest of the @LaTeX{} code +if syntactic filling is enabled. This means, for example, if you try to +fill an environment with @code{LaTeX-fill-environment} and have the +cursor placed on a commented line which does not have a surrounding +environment inside the comment, @AUCTeX{} will report an error. +@findex LaTeX-fill-environment + +The relevant commands and variables with regard to filling are: + +@table @kbd +@item C-c C-q C-p +@kindex C-c C-q C-p +@findex LaTeX-fill-paragraph +@code{LaTeX-fill-paragraph} will fill and indent the current paragraph. + +@item M-q +@kindex M-q +Alias for @kbd{C-c C-q C-p} + +@item C-c C-q C-e +@kindex C-c C-q C-e +@findex LaTeX-fill-environment +@code{LaTeX-fill-environment} will fill and indent the current +environment. This may e.g.@: be the `document' environment, in which case +the entire document will be formatted. + +@item C-c C-q C-s +@kindex C-c C-q C-s +@findex LaTeX-fill-section +@code{LaTeX-fill-section} will fill and indent the current logical +sectional unit. + +@item C-c C-q C-r +@kindex C-c C-q C-r +@findex LaTeX-fill-region +@code{LaTeX-fill-region} will fill and indent the current region. +@end table + +@defopt LaTeX-fill-break-at-separators +List of separators before or after which respectively linebreaks will +be inserted if they do not fit into one line. The separators can be +curly braces, brackets, switches for inline math (@samp{$}, @samp{\(}, +@samp{\)}) and switches for display math (@samp{\[}, @samp{\]}). Such +formatting can be useful to make macros and math more visible or to +prevent overfull lines in the @LaTeX{} source in case a package for +displaying formatted @TeX{} output inside the Emacs buffer, like +preview-latex, is used. +@end defopt + +@defopt LaTeX-fill-break-before-code-comments +Code comments are comments preceded by some other text in the same line. +When a paragraph containing such a comment is to be filled, the comment +start will be seen as a border after which no line breaks will be +inserted in the same line. If the option +@code{LaTeX-fill-break-before-code-comments} is enabled (which is the +default) and the comment does not fit into the line, a line break will +be inserted before the last non-comment word to minimize the chance that +the line becomes overfull. +@end defopt + +@defopt LaTeX-fill-excluded-macros +A list of macro names (without leading backslash) for whose arguments +filling should be disabled. Typically, you will want to add macros here +which have long, multi-line arguments. An example is +@code{\pgfplotstabletypeset} from the pgfplotstable package which is +used as shown in the following listing: + +@verbatim +\pgfplotstabletypeset[skip first n=4]{% + XYZ Format, + Version 1.234 + Date 2010-09-01 + @author Mustermann + A B C + 1 2 3 + 4 5 6 +} +@end verbatim +@end defopt + +@node Display +@chapter Controlling Screen Display + +It is often desirable to get visual help of what markup code in a text +actually does without having to decipher it explicitly. For this +purpose Emacs and @AUCTeX{} provide font locking (also known as syntax +highlighting) which visually sets off markup code like macros or +environments by using different colors or fonts. For example text to be +typeset in italics can be displayed with an italic font in the editor as +well, or labels and references get their own distinct color. + +While font locking helps you grasp the purpose of markup code and +separate markup from content, the markup code can still be distracting. +@AUCTeX{} lets you hide those parts and show them again at request with +its built-in support for hiding macros and environments which we call +folding here. + +Besides folding of macros and environments, @AUCTeX{} provides support +for Emacs' outline mode which lets you narrow the buffer content to +certain sections of your text by hiding the parts not belonging to these +sections. + +Moreover, you can focus in a specific portion of the code by narrowing +the buffer to the desired region. @AUCTeX{} provides also functions to +narrow the buffer to the current group and to @LaTeX{} environments. + +@AUCTeX{} also provides some WYSIWYG features. + +First, you can customize @code{font-latex-fontify-script} to enable +special formatting of @code{^} superscripts and @code{_} subscripts +(@pxref{Font Locking}). + +Secondly, @AUCTeX{} with GNU Emacs 25 or later can display certain math +macros using Unicode characters, e.g., @code{\alpha} as α. This is +called prettification and is lightweight and reasonable robust +(@pxref{Prettifying}). + +A more accurate approach is provided by @previewlatex{}, a subsystem of +@AUCTeX{}, see @ref{Top,,Introduction,preview-latex,The @previewlatex{} +Manual}. This system uses @LaTeX{} to generate images that are then +displayed in your buffer. It is extremely accurate but can be fragile +with some packages (like older pgf versions). + +Please note that you can use prettification and @previewlatex{} together. + +@menu +* Font Locking:: Font Locking +* Folding:: Folding Macros and Environments +* Outline:: Outlining the Document +* Narrowing:: Restricting display and editing to a portion of the buffer +* Prettifying:: Displaying Greek and math macros as Unicode characters +@end menu + +@node Font Locking +@section Font Locking +@cindex Font Locking +@cindex Syntax Highlighting +@cindex font-latex + +Font locking is supposed to improve readability of the source code by +highlighting certain keywords with different colors or fonts. It +thereby lets you recognize the function of markup code to a certain +extent without having to read the markup command. For general +information on controlling font locking with Emacs' Font Lock mode, see +@ref{Font Lock, , Font Lock Mode, emacs, GNU Emacs Manual}. + +@defopt TeX-install-font-lock +Once font locking is enabled globally or for the major modes provided by +@AUCTeX{}, the font locking patterns and functionality of @fontlatex{} +are activated by default. You can switch to a different font locking +scheme or disable font locking in @AUCTeX{} by customizing the variable +@code{TeX-install-font-lock}. + +Besides @fontlatex{} @AUCTeX{} ships with a scheme which is derived +from Emacs' default @LaTeX{} mode and activated by choosing +@code{tex-font-setup}. Be aware that this scheme is not coupled with +@AUCTeX{}'s style system and not the focus of development. Therefore +and due to @fontlatex{} being much more feature-rich the following +explanations will only cover @fontlatex{}. + +In case you want to hook in your own fontification scheme, you can +choose @code{other} and insert the name of the function which sets up +your font locking patterns. If you want to disable fontification in +@AUCTeX{} completely, choose @code{ignore}. +@end defopt + +@fontlatex{} provides many options for customization which are +accessible with @kbd{M-x customize-group @key{RET} font-latex @key{RET}}. For this +description the various options are explained in conceptional groups. + +@menu +* Fontification of macros:: Fontification of macros +* Fontification of quotes:: Fontification of quotes +* Fontification of math:: Fontification of math constructs +* Verbatim content:: Verbatim macros and environments +* Faces:: Faces used by font-latex +* Known problems:: Known fontification problems +@end menu + +@node Fontification of macros +@subsection Fontification of macros + +Highlighting of macros can be customized by adapting keyword lists which +can be found in the customization group @code{font-latex-keywords}. + +Three types of macros can be handled differently with respect to +fontification: + +@enumerate +@item +Commands of the form @samp{\foo[bar]@{baz@}} which consist of the macro +itself, optional arguments in square brackets and mandatory arguments in +curly braces. For the command itself the face +@code{font-lock-keyword-face} will be used and for the optional +arguments the face @code{font-lock-variable-name-face}. The face +applied to the mandatory argument depends on the macro class represented +by the respective built-in variables. +@item +Declaration macros of the form @samp{@{\foo text@}} which consist of the +macro which may be enclosed in a @TeX{} group together with text to be +affected by the macro. In case a @TeX{} group is present, the macro +will get the face @code{font-lock-keyword-face} and the text will get +the face configured for the respective macro class. If no @TeX{} group +is present, the latter face will be applied to the macro itself. +@item +Simple macros of the form @samp{\foo} which do not have any arguments or +groupings. The respective face will be applied to the macro itself. +@end enumerate + +Customization variables for @samp{\foo[bar]@{baz@}} type macros allow +both the macro name and the sequence of arguments to be specified. The +latter is done with a string which can contain the characters +@table @samp +@item * +indicating the existence of a starred variant for the macro, +@item [ +for optional arguments in brackets, +@item @{ +for mandatory arguments in braces, +@item \ +for mandatory arguments consisting of a single macro and +@item | +as a prefix indicating that two alternatives are following. +@end table +For example the specifier for @samp{\documentclass} would be @samp{[@{} +because the macro has one optional followed by one mandatory argument. +The specifier for @samp{\newcommand} would be @samp{*|@{\[[@{} because +there is a starred variant, the mandatory argument following the macro +name can be a macro or a @TeX{} group which can be followed by two +optional arguments and the last token is a mandatory argument in braces. + +Customization variables for the @samp{@{\foo text@}} and @samp{\foo} +types are simple lists of strings where each entry is a macro name +(without the leading backslash). + +@subheading General macro classes + +@fontlatex{} provides keyword lists for different macro classes which +are described in the following table: + +@vindex font-latex-match-function-keywords +@vindex font-latex-match-reference-keywords +@vindex font-latex-match-textual-keywords +@vindex font-latex-match-variable-keywords +@vindex font-latex-match-warning-keywords +@table @code +@item font-latex-match-function-keywords +Keywords for macros defining or related to functions, like +@samp{\newcommand}.@* +Type: @samp{\macro[...]@{...@}}@* +Face: @code{font-lock-function-name-face} + +@item font-latex-match-reference-keywords +Keywords for macros defining or related to references, like +@samp{\ref}.@* +Type: @samp{\macro[...]@{...@}}@* +Face: @code{font-lock-constant-face} + +@item font-latex-match-textual-keywords +Keywords for macros specifying textual content, like @samp{\caption}.@* +Type: @samp{\macro[...]@{...@}}@* +Face: @code{font-lock-type-face} + +@item font-latex-match-variable-keywords +Keywords for macros defining or related to variables, like +@samp{\setlength}.@* +Type: @samp{\macro[...]@{...@}}@* +Face: @code{font-lock-variable-name-face} + +@item font-latex-match-warning-keywords +Keywords for important macros, e.g.@: affecting line or page break, like +@samp{\clearpage}.@* +Type: @samp{\macro}@* +Face: @code{font-latex-warning-face} +@end table + +@subheading Sectioning commands +@cindex Sectioning commands, fontification of + +Sectioning commands are macros like @samp{\chapter} or @samp{\section}. +For these commands there are two fontification schemes which may be +selected by customizing the variable @code{font-latex-fontify-sectioning}. + +@defopt font-latex-fontify-sectioning +@c FIXME: Is @vindex correct? +@vindex font-latex-sectioning-0-face +@vindex font-latex-sectioning-1-face +@vindex font-latex-sectioning-2-face +@vindex font-latex-sectioning-3-face +@vindex font-latex-sectioning-4-face +@vindex font-latex-sectioning-5-face +Per default sectioning commands will be shown in a larger, proportional +font, which corresponds to a number for this variable. The font size +varies with the sectioning level, e.g.@: @samp{\part} +(@code{font-latex-sectioning-0-face}) has a larger font than +@samp{\paragraph} (@code{font-latex-sectioning-5-face}). Typically, +values from 1.05 to 1.3 for @code{font-latex-fontify-sectioning} give +best results, depending on your font setup. If you rather like to use +the base font and a different color, set the variable to the symbol +@samp{color}. In this case the face @code{font-lock-type-face} will be +used to fontify the argument of the sectioning commands. +@end defopt + +@vindex font-latex-match-sectioning-0-keywords +@vindex font-latex-match-sectioning-1-keywords +@vindex font-latex-match-sectioning-2-keywords +@vindex font-latex-match-sectioning-3-keywords +@vindex font-latex-match-sectioning-4-keywords +@vindex font-latex-match-sectioning-5-keywords +You can make @fontlatex{} aware of your own sectioning commands be +adding them to the keyword lists: +@code{font-latex-match-sectioning-0-keywords} +(@code{font-latex-sectioning-0-face}) @dots{} +@code{font-latex-match-sectioning-5-keywords} +(@code{font-latex-sectioning-5-face}). + +@vindex font-latex-slide-title-face +@vindex font-latex-match-slide-title-keywords +Related to sectioning there is special support for slide titles which +may be fontified with the face @code{font-latex-slide-title-face}. You +can add macros which should appear in this face by customizing the +variable @code{font-latex-match-slide-title-keywords}. + +@subheading Commands for changing fonts + +@LaTeX{} provides various macros for changing fonts or font attributes. +For example, you can select an italic font with @samp{\textit@{...@}} or +bold with @samp{\textbf@{...@}}. An alternative way to specify these +fonts is to use special macros in @TeX{} groups, like @samp{@{\itshape +...@}} for italics and @samp{@{\bfseries ...@}} for bold. As mentioned +above, we call the former variants commands and the latter +declarations. + +Besides the macros for changing fonts provided by @LaTeX{} there is an +infinite number of other macros---either defined by yourself for logical +markup or defined by macro packages---which affect the font in the +typeset text. While @LaTeX{}'s built-in macros and macros of packages +known by @AUCTeX{} are already handled by @fontlatex{}, different +keyword lists per type style and macro type are provided for entering +your own macros which are listed in the table below. + +@vindex font-latex-match-bold-command-keywords +@vindex font-latex-match-italic-command-keywords +@vindex font-latex-match-math-command-keywords +@vindex font-latex-match-type-command-keywords +@vindex font-latex-match-bold-declaration-keywords +@vindex font-latex-match-italic-declaration-keywords +@vindex font-latex-match-type-declaration-keywords +@table @code +@item font-latex-match-bold-command-keywords +Keywords for commands specifying a bold type style.@* +Face: @code{font-latex-bold-face} +@item font-latex-match-italic-command-keywords +Keywords for commands specifying an italic font.@* +Face: @code{font-latex-italic-face} +@item font-latex-match-math-command-keywords +Keywords for commands specifying a math font.@* +Face: @code{font-latex-math-face} +@item font-latex-match-type-command-keywords +Keywords for commands specifying a typewriter font.@* +Face: @code{font-lock-type-face} +@item font-latex-match-bold-declaration-keywords +Keywords for declarations specifying a bold type style.@* +Face: @code{font-latex-bold-face} +@item font-latex-match-italic-declaration-keywords +Keywords for declarations specifying an italic font.@* +Face: @code{font-latex-italic-face} +@item font-latex-match-type-declaration-keywords +Keywords for declarations specifying a typewriter font.@* +Face: @code{font-latex-type-face} +@end table + +@subheading Deactivating defaults of built-in keyword classes + +@vindex font-latex-deactivated-keyword-classes +@fontlatex{} ships with predefined lists of keywords for the classes +described above. You can disable these defaults per class by +customizing the variable @code{font-latex-deactivated-keyword-classes}. +This is a list of strings for keyword classes to be deactivated. Valid +entries are "warning", "variable", "biblatexnoarg", "biblatex", +"reference", "function" , "sectioning-0", "sectioning-1", +"sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5", +"slide-title", "textual", "bold-command", "italic-command", +"math-command", "type-command", "bold-declaration", +"italic-declaration", "type-declaration". + +You can also get rid of certain keywords only. For example if you want +to remove highlighting of footnotes as references you can put the +following stanza into your init file: + +@lisp +(eval-after-load "font-latex" + '(setq-default + font-latex-match-reference-keywords-local + (remove (assoc-string "footnote" + font-latex-match-reference-keywords-local) + font-latex-match-reference-keywords-local))) +@end lisp + +But note that this means fiddling with @fontlatex{}'s internals and is +not guaranteed to work in future versions of @fontlatex{}. + +@subheading User-defined keyword classes + +In case the customization options explained above do not suffice for +your needs, you can specify your own keyword classes by customizing the +variable @code{font-latex-user-keyword-classes}. + +@defopt font-latex-user-keyword-classes +Every keyword class consists of four parts, a name, a list of keywords, +a face and a specifier for the type of macros to be highlighted. + +When adding new entries, you have to use unique values for the class +names, i.e.@: they must not clash with names of the built-in keyword +classes or other names given by you. Additionally the names must not +contain spaces. + +The list of keywords defines which commands and declarations should be +covered by the keyword class. A keyword can either be a simple command +name omitting the leading backslash or a list consisting of the command +name and a string specifying the sequence of arguments for the command. + +The face argument can either be an existing face or face attributes +made by you. + +There are three alternatives for the type of keywords---``Command with +arguments'', ``Declaration inside @TeX{} group'' and ``Command without +arguments''---which correspond with the macro types explained above. +@end defopt + +@node Fontification of quotes +@subsection Fontification of quotes +@cindex Quotes, fontification of + +Text in quotation marks is displayed with the face +@code{font-latex-string-face}. Besides the various forms of opening and +closing double and single quotation marks, so-called guillemets (<<, >>) +can be used for quoting. Because there are two styles of using +them---French style: << text >>; German style: >>text<<---you can +customize the variable @code{font-latex-quotes} to tell @fontlatex{} +which type you are using if the correct value cannot be derived from +document properties. + +@defopt font-latex-quotes +The default value of @code{font-latex-quotes} is @samp{auto} which means +that @fontlatex{} will try to derive the correct type of quotation mark +matching from document properties like the language option supplied to +the babel @LaTeX{} package. + +If the automatic detection fails for you and you mostly use one specific +style you can set it to a specific language-dependent value as well. +Set the value to @samp{german} if you are using >>German quotes<< and to +@samp{french} if you are using << French quotes >>. @fontlatex{} will +recognize the different ways these quotes can be given in your source +code, i.e.@: (@samp{"<}, @samp{">}), (@samp{<<}, @samp{>>}) and the +respective 8-bit variants. + +If you set @code{font-latex-quotes} to nil, quoted content will not be +fontified. +@end defopt + + +@node Fontification of math +@subsection Fontification of mathematical constructs +@cindex Math, fontification of +@cindex Subscript, fontification of +@cindex Superscript, fontification of + +@vindex font-latex-match-math-command-keywords +@vindex font-latex-math-environments +@vindex texmathp-tex-commands +@vindex texmathp-tex-commands-default +In @LaTeX{} mathematics can be indicated by a variety of different +methods: toggles (like dollar signs), macros and environments. Math +constructs known by @fontlatex{} are displayed with the face +@code{font-latex-math-face}. Support for dollar signs and shorthands +like @samp{\(...\)} or @samp{\[...\]} is built-in and not customizable. +Support for other math macros and environments can be adapted by +customizing the variables @code{font-latex-match-math-command-keywords} +and @code{texmathp-tex-commands} respectively. It is no longer +recommended to customize @code{font-latex-math-environments}. + +To convert your customization in @code{font-latex-math-environments} +into @code{texmathp-tex-commands}, please register your own math +environments, together with starred variants if any, as entries of +@code{env-on} type in @code{texmathp-tex-commands}, then clear out +@code{font-latex-math-environments}. You have to restart Emacs for this +new customization to take effect for fontification. + +In order to make math constructs more readable, @fontlatex{} displays +subscript and superscript parts in a smaller font and raised or lowered +respectively. This fontification feature can be controlled with the +variables @code{font-latex-fontify-script} and +@code{font-latex-script-display}. + +@defopt font-latex-fontify-script +If non-nil, fontify subscript and superscript strings. Concretely, this +means that the scripts are raised or lowered. + +Another possiblity is setting this variable to the symbol +@code{multi-level}. In this case, in a formula @i{x^@{y^z@}}, @i{y} is +raised above and smaller than @i{x}, and @i{z} is raised above and +smaller than @i{y}. With many script levels, the text might become too +small to be readable. (See @code{font-latex-fontify-script-max-level} +below.) + +Lastly, you can set this variable to @code{invisible} whose behavior is +like @code{multi-level}, and in addition the super-/subscript characters +@i{^} and @i{_} are not displayed. +@end defopt + +@vindex font-latex-superscript-face +@vindex font-latex-subscript-face +@defopt font-latex-fontify-script-max-level +Maximum scriptification level for which script faces are applied. + +The faces @code{font-latex-superscript-face} and +@code{font-latex-subscript-face} define custom @code{:height} values < +1.0. Therefore, scripts are displayed with a slightly smaller font than +normal math text. If @code{font-latex-fontify-script} is +@code{multi-level} or @code{invisible}, the font size becomes too small +to be readable after a few levels. This option allows to specify the +maximum level after which the size of the script text won’t be shrunken +anymore. + +For example, in the expression @i{x^@{y^@{z^a_b@}@}}, @i{x} has +scriptification level 0, @i{y} has level 1, @i{z} has level 2, and both +@i{a} and @i{b} have scriptification level 3. + +If @code{font-latex-fontify-script-max-level} was 2, then @i{z}, @i{a}, +and @i{b} would have the same font size. If it was 3 or more, then +@i{a} and @i{b} were smaller than @i{z} just in the same way as @i{z} is +smaller than @i{y} and @i{y} is smaller than @i{x}. +@end defopt + +@vindex font-latex-script-char-face +The script characters @samp{^} and @samp{_} themselves are also +fontified with an own face named @code{font-latex-script-char-face}. + +@defopt font-latex-script-display +Display specification for subscript and superscript content. The car is +used for subscript, the cdr is used for superscript. The feature is +implemented using so-called display properties. For information on what +exactly to specify for the values, see @ref{Other Display Specs, , Other +Display Specifications, elisp, GNU Emacs Lisp Reference Manual}. +@end defopt + +@node Verbatim content +@subsection Verbatim macros and environments +@cindex Verbatim, fontification of + +Usually it is not desirable to have content to be typeset verbatim +highlighted according to @LaTeX{} syntax. Therefore this content will +be fontified uniformly with the face @code{font-latex-verbatim-face}. + +@vindex LaTeX-verbatim-macros-with-delims +@vindex LaTeX-verbatim-macros-with-braces +@vindex LaTeX-verbatim-environments +@fontlatex{} differentiates three different types of verbatim +constructs for fontification. Macros with special characters like | as +delimiters, macros with braces, and environments. Which macros and +environments are recognized is controlled by the variables +@code{LaTeX-verbatim-macros-with-delims}, +@code{LaTeX-verbatim-macros-with-braces}, and +@code{LaTeX-verbatim-environments} respectively. + +@node Faces +@subsection Faces used by @fontlatex{} +@cindex Faces + +In case you want to change the colors and fonts used by @fontlatex{} +please refer to the faces mentioned in the explanations above and use +@kbd{M-x customize-face @key{RET} <face> @key{RET}}. All faces defined by +@fontlatex{} are accessible through a customization group by typing +@kbd{M-x customize-group @key{RET} font-latex-highlighting-faces @key{RET}}. + +@node Known problems +@subsection Known fontification problems +@cindex Dollar signs, color bleed with +@cindex Math, fontification problems with + +In certain cases the fontification machinery fails to interpret buffer +contents correctly. This can lead to color bleed, i.e.@: large parts of a +buffer get fontified with an inappropriate face. A typical situation +for this to happen is the use of a dollar sign (@samp{$}) in a verbatim +macro or environment. If @fontlatex{} is not aware of the verbatim +construct, it assumes the dollar sign to be a toggle for mathematics and +fontifies the following buffer content with the respective face until it +finds a closing dollar sign or till the end of the buffer. + +As a remedy you can make the verbatim construct known to @fontlatex{} +(@pxref{Verbatim content}). If this is not possible, you can insert a +commented dollar sign (@samp{%$}) at the next suitable end of line as a +quick workaround. In docTeX documents, @samp{^^A$} is also available +for similar purpose. + +@node Folding +@section Folding Macros and Environments +@cindex Outlining +@cindex Folding +@cindex Reveal +@cindex Auto-Reveal +@cindex Hide Macros + +A popular complaint about markup languages like @TeX{} and @LaTeX{} is +that there is too much clutter in the source text and that one cannot +focus well on the content. There are macros where you are only +interested in the content they are enclosing, like font specifiers where +the content might already be fontified in a special way by font locking. +Or macros the content of which you only want to see when actually +editing it, like footnotes or citations. Similarly you might find +certain environments or comments distracting when trying to concentrate +on the body of your document. + +With @AUCTeX{}'s folding functionality you can collapse those items and +replace them by a fixed string, the content of one of their arguments, +or a mixture of both. If you want to make the original text visible +again in order to view or edit it, move point sideways onto the +placeholder (also called display string) or left-click with the mouse +pointer on it. The +macro or environment will unfold automatically, stay open as long as +point is inside of it and collapse again once you move point out of it. +(Note that folding of environments currently does not work in every +@AUCTeX{} mode.) + +In order to use this feature, you have to activate @code{TeX-fold-mode} +which will activate the auto-reveal feature and the necessary commands +to hide and show macros and environments. You can activate the mode in +a certain buffer by typing the command @kbd{M-x TeX-fold-mode @key{RET}} or +using the keyboard shortcut @kbd{C-c C-o C-f}. If you want to use it +every time you edit a @LaTeX{} document, add it to a hook: +@findex TeX-fold-mode +@kindex C-c C-o C-f + +@lisp +(add-hook 'LaTeX-mode-hook (lambda () + (TeX-fold-mode 1))) +@end lisp + +If it should be activated in all @AUCTeX{} modes, use +@code{TeX-mode-hook} instead of @code{LaTeX-mode-hook}. + +Once the mode is active there are several commands available to hide +and show macros, environments and comments: + +@deffn Command TeX-fold-buffer +@kindex C-c C-o C-b +(@kbd{C-c C-o C-b}) Hide all foldable items in the current buffer +according to the setting of @code{TeX-fold-type-list}. + +If you want to have this done automatically every time you open a file, +add it to a hook and make sure the function is called after font locking +is set up for the buffer. The following code should accomplish this: + +@lisp +(add-hook 'find-file-hook #'TeX-fold-buffer t) +@end lisp + +The command can be used any time to refresh the whole buffer and fold +any new macros and environments which were inserted after the last +invocation of the command. +@end deffn + +@defopt TeX-fold-type-list +List of symbols determining the item classes to consider for folding. +This can be macros, environments and comments. Per default only macros +and environments are folded. +@end defopt + +@defopt TeX-fold-force-fontify +In order for all folded content to get the right faces, the whole buffer +has to be fontified before folding is carried out. +@code{TeX-fold-buffer} therefore will force fontification of unfontified +regions. As this will prolong the time folding takes, you can prevent +forced fontification by customizing the variable +@code{TeX-fold-force-fontify}. +@end defopt + +@defopt TeX-fold-auto +By default, a macro inserted with @code{TeX-insert-macro} (@kbd{C-c +C-m}) will not be folded. Set this variable to a non-nil value to +aumatically fold macros as soon as they are inserted. +@end defopt + +@defopt TeX-fold-preserve-comments +By default items found in comments will be folded. If your comments +often contain unfinished code this might lead to problems. Give this +variable a non-nil value and foldable items in your comments will be +left alone. +@end defopt + +@defopt TeX-fold-unfold-around-mark +When this variable is non-nil and there is an active regione, text +around the mark will be kept unfolded. +@end defopt + +@deffn Command TeX-fold-region +@kindex C-c C-o C-r +(@kbd{C-c C-o C-r}) Hide all configured macros in the marked region. +@end deffn + +@deffn Command TeX-fold-paragraph +@kindex C-c C-o C-p +(@kbd{C-c C-o C-p}) Hide all configured macros in the paragraph +containing point. +@end deffn + +@deffn Command TeX-fold-macro +@kindex C-c C-o C-m +(@kbd{C-c C-o C-m}) Hide the macro on which point currently is located. +If the name of the macro is found in @code{TeX-fold-macro-spec-list}, +the respective display string will be shown instead. If it is not +found, the name of the macro in sqare brackets or the default string for +unspecified macros (@code{TeX-fold-unspec-macro-display-string}) will be +shown, depending on the value of the variable +@code{TeX-fold-unspec-use-name}. +@end deffn + +@deffn Command TeX-fold-env +@kindex C-c C-o C-e +(@kbd{C-c C-o C-e}) Hide the environment on which point currently is +located. The behavior regarding the display string is analogous to +@code{TeX-fold-macro} and determined by the variables +@code{TeX-fold-env-spec-list} and +@code{TeX-fold-unspec-env-display-string} respectively. +@end deffn + +@deffn Command TeX-fold-math +Hide the math macro on which point currently is located. If the name of +the macro is found in @code{TeX-fold-math-spec-list}, the respective +display string will be shown instead. If it is not found, the name of +the macro in sqare brackets or the default string for unspecified macros +(@code{TeX-fold-unspec-macro-display-string}) will be shown, depending +on the value of the variable @code{TeX-fold-unspec-use-name}. +@end deffn + +@deffn Command TeX-fold-comment +@kindex C-c C-o C-c +(@kbd{C-c C-o C-c}) Hide the comment point is located on. +@end deffn + +@deffn Command TeX-fold-clearout-buffer +@kindex C-c C-o b +(@kbd{C-c C-o b}) Permanently unfold all macros and environments in the +current buffer. +@end deffn + +@deffn Command TeX-fold-clearout-region +@kindex C-c C-o r +(@kbd{C-c C-o r}) Permanently unfold all macros and environments in the +marked region. +@end deffn + +@deffn Command TeX-fold-clearout-paragraph +@kindex C-c C-o p +(@kbd{C-c C-o p}) Permanently unfold all macros and environments in the +paragraph containing point. +@end deffn + +@deffn Command TeX-fold-clearout-item +@kindex C-c C-o i +(@kbd{C-c C-o i}) Permanently show the macro or environment on which +point currently is located. In contrast to temporarily opening the +macro when point is moved sideways onto it, the macro will be +permanently unfolded and will not collapse again once point is leaving +it. +@end deffn + +@deffn Command TeX-fold-dwim +@kindex C-c C-o C-o +(@kbd{C-c C-o C-o}) Hide or show items according to the current context. +If there is folded content, unfold it. If there is a marked region, +fold all configured content in this region. If there is no folded +content but a macro or environment, fold it. +@end deffn + +@vindex TeX-fold-command-prefix +In case you want to use a different prefix than @kbd{C-c C-o} for these +commands you can customize the variable @code{TeX-fold-command-prefix}. +(Note that this will not change the key binding for activating the +mode.) + +The commands above will only take macros or environments into +consideration which are specified in the variables +@code{TeX-fold-macro-spec-list} or @code{TeX-fold-env-spec-list} +respectively. + +@defopt TeX-fold-macro-spec-list +List of replacement specifiers and macros to fold. The specifier can be +a string, an integer or a function symbol. + +If you specify a string, it will be used as a display replacement for +the whole macro. Numbers in braces, brackets, parens or angle brackets +will be replaced by the respective macro argument. For example +@samp{@{1@}} will be replaced by the first mandatory argument of the +macro. One can also define alternatives within the specifier which are +used if an argument is not found. Alternatives are separated by +@samp{||}. They are most useful with optional arguments. As an +example, the default specifier for @samp{\item} is @samp{[1]:||*} which +means that if there is an optional argument, its value is shown followed +by a colon. If there is no optional argument, only an asterisk is used +as the display string. + +If you specify a number as the first element, the content of the +respective mandatory argument of a @LaTeX{} macro will be used as the +placeholder. + +If the first element is a function symbol, the function will be called +with all mandatory arguments of the macro and the result of the function +call will be used as a replacement for the macro. + +The placeholder is made by copying the text from the buffer together with +its properties, i.e.@: its face as well. If fontification has not +happened when this is done (e.g.@: because of lazy font locking) the +intended fontification will not show up. As a workaround you can leave +Emacs idle a few seconds and wait for stealth font locking to finish +before you fold the buffer. Or you just re-fold the buffer with +@code{TeX-fold-buffer} when you notice a wrong fontification. +@end defopt + +@defopt TeX-fold-env-spec-list +List of display strings or argument numbers and environments to fold. +Argument numbers refer to the @samp{\begin} statement. That means if +you have e.g.@: @samp{\begin@{tabularx@}@{\linewidth@}@{XXX@} ... +\end@{tabularx@}} and specify 3 as the argument number, the resulting +display string will be ``XXX''. +@end defopt + +@defopt TeX-fold-math-spec-list +List of display strings and math macros to fold. +@end defopt + +@vindex LaTeX-fold-macro-spec-list +@vindex LaTeX-fold-env-spec-list +@vindex LaTeX-fold-math-spec-list +The variables @code{TeX-fold-macro-spec-list}, +@code{TeX-fold-env-spec-list}, and @code{TeX-fold-math-spec-list} apply +to any @AUCTeX{} mode. If you want to make settings which are only +applied to @LaTeX{} mode, you can use the mode-specific variables +@code{LaTeX-fold-macro-spec-list}, @code{LaTeX-fold-env-spec-list}, and +@code{LaTeX-fold-math-spec-list} + +@defopt TeX-fold-unspec-macro-display-string +Default display string for macros which are not specified in +@code{TeX-fold-macro-spec-list}. +@end defopt + +@defopt TeX-fold-unspec-env-display-string +Default display string for environments which are not specified in +@code{TeX-fold-env-spec-list}. +@end defopt + +@defopt TeX-fold-unspec-use-name +If non-nil the name of the macro or environment surrounded by square +brackets is used as display string, otherwise the defaults specified in +@code{TeX-fold-unspec-macro-display-string} or +@code{TeX-fold-unspec-env-display-string} respectively. +@end defopt + +When you hover with the mouse pointer over folded content, its original +text will be shown in a tooltip or the echo area depending on Tooltip +mode being activate. In order to avoid exorbitantly big tooltips and to +cater for the limited space in the echo area the content will be cropped +after a certain amount of characters defined by the variable +@code{TeX-fold-help-echo-max-length}. + +@defopt TeX-fold-help-echo-max-length +Maximum length of original text displayed in a tooltip or the echo area +for folded content. Set it to zero in order to disable this feature. +@end defopt + + +@node Outline +@section Outlining the Document +@cindex Outlining +@cindex Headers +@cindex Sections +@cindex Overview +@cindex Folding + +@AUCTeX{} supports the standard outline minor mode using +@LaTeX{}/@ConTeXt{} sectioning commands as header lines. @xref{Outline +Mode, , Outline Mode, emacs, GNU Emacs Manual}. + +You can add your own headings by setting the variable +@code{TeX-outline-extra}. + +@defvar TeX-outline-extra +List of extra @TeX{} outline levels. + +Each element is a list with two entries. The first entry is the regular +expression matching a header, and the second is the level of the header. +A @samp{^} is automatically prepended to the regular expressions in the +list, so they must match text at the beginning of the line. + +See @code{LaTeX-section-list} or @code{ConTeXt-@var{interface}-section-list} +for existing header levels. +@end defvar + +The following example add @samp{\item} and @samp{\bibliography} headers, +with @samp{\bibliography} at the same outline level as @samp{\section}, +and @samp{\item} being below @samp{\subparagraph}. + +@lisp +(setq TeX-outline-extra + '(("[ \t]*\\\\\\(bib\\)?item\\b" 7) + ("\\\\bibliography\\b" 2))) +@end lisp + +@c FIXME: Isn't this much outdated? +You may want to check out the unbundled @file{out-xtra} package for even +better outline support. It is available from your favorite emacs lisp +archive. + +@node Narrowing +@section Narrowing + +Sometimes you want to focus your attention to a limited region of the +code. You can do that by restricting the text addressable by editing +commands and hiding the rest of the buffer with the narrowing functions, +@pxref{Narrowing,,,emacs,GNU Emacs Manual}. In addition, @AUCTeX{} +provides a couple of other commands to narrow the buffer to a group, +i.e.@: a region enclosed in a pair of curly braces, and to @LaTeX{} +environments. + +@deffn Command TeX-narrow-to-group +@kindex C-x n g +(@kbd{C-x n g}) Make text outside current group invisible. +@end deffn + +@deffn Command LaTeX-narrow-to-environment @var{count} +@kindex C-x n e +(@kbd{C-x n e}) Make text outside current environment invisible. With +optional argument @var{count} keep visible that number of enclosing +environmens. +@end deffn + +Like other standard narrowing functions, the above commands are +disabled. Attempting to use them asks for confirmation and gives you +the option of enabling them; if you enable the commands, confirmation +will no longer be required for them. + +@node Prettifying +@section Prettifying + +Emacs 25 is able to prettify symbols in programming language buffers, +@pxref{Misc for Programs,,,emacs,GNU Emacs Manual}. The canonical +example is to display @code{(lambda () ...)} as @code{(λ () ...)} in +Lisp buffers. + +@AUCTeX{} can use this feature in order to display certain math macros +and greek letters using their Unicode representation, too. For example, +the @TeX{} code @code{\alpha \times \beta} will be displayed as @code{α +× β}. When point is on one of the characters, it'll be unprettified +automatically, meaning you see the verbatim text again. For this +behaviour however you need to set +@code{prettify-symbols-unprettify-at-point} to t or @code{right-edge} +which will unprettify the symbol when point moves into or near it. + +To enable prettification in @AUCTeX{}, simply add +@code{prettify-symbols-mode} to @code{TeX-mode-hook}. If you enabled +prettification globally with @code{global-prettify-symbols-mode}, then +it's automatically enabled in @AUCTeX{}, too. + +You can also add custom symbol unicode-character pairs for +prettification by adding to @code{tex--prettify-symbols-alist}. Note +that this variable is part of Emacs' stock @code{tex-mode.el} and used +by that and @AUCTeX{}. + +@node Processing +@chapter Starting Processors, Viewers and Other Programs + +The most powerful features of @AUCTeX{} may be those allowing you to run +@TeX{}, @LaTeX{}, @ConTeXt{} and other external commands like Bib@TeX{} +and @command{makeindex} from within Emacs, viewing and printing the +results, and moreover allowing you to @emph{debug} your documents. + +@cindex tool bar, toolbar +@vindex LaTeX-enable-toolbar +@vindex plain-TeX-enable-toolbar +@vindex TeX-bar-TeX-buttons +@vindex TeX-bar-TeX-all-button-alists +@vindex TeX-bar-LaTeX-buttons +@vindex TeX-bar-LaTeX-button-alist +@AUCTeX{} comes with a special tool bar for @TeX{} and @LaTeX{} which +provides buttons for the most important commands. You can enable or +disable it by customizing the options @code{plain-TeX-enable-toolbar} +and @code{LaTeX-enable-toolbar} in the @code{TeX-tool-bar} customization +group. You can also customize the buttons by the options +@code{TeX-bar-TeX-buttons}, @code{TeX-bar-TeX-all-button-alists}, +@code{TeX-bar-LaTeX-buttons} and @code{TeX-bar-LaTeX-button-alist}. +@c FIXME: Write details about customizing tool bar. + +@menu +* Commands:: Invoking external commands. +* Viewing:: Invoking external viewers. +* Debugging:: Debugging @TeX{} and @LaTeX{} output. +* Checking:: Checking the document. +* Control:: Controlling the processes. +* Cleaning:: Cleaning intermediate and output files. +* Documentation:: Documentation about macros and packages. +@end menu + +@node Commands +@section Executing Commands +@cindex Formatting +@cindex Running @LaTeX{} +@cindex Running @TeX{} +@cindex @LaTeX{} +@cindex @TeX{} +@cindex Running commands +@cindex Default command +@cindex Header +@cindex Trailer +@cindex Setting the header +@cindex Setting the trailer +@cindex Region +@cindex Region file +@cindex Setting the default command +@cindex Commands +@cindex External Commands +@cindex Indexing +@cindex Making an index +@cindex Running @command{makeindex} +@cindex @command{makeindex} +@cindex Bib@TeX{} +@cindex Bibliography +@cindex Literature +@cindex Running Bib@TeX{} +@cindex Making a bibliography +@cindex Printing +@cindex Writing to a printer + +Formatting the document with @TeX{}, @LaTeX{} or @ConTeXt{}, viewing +with a previewer, printing the document, running Bib@TeX{}, making an +index, or checking the document with @command{lacheck} or +@command{chktex} all require running an external command. + +@menu +* Starting a Command:: Starting a Command on a Document or Region +* Selecting a Command:: Selecting and Executing a Command +* Processor Options:: Options for @TeX{} Processors +@end menu + +@node Starting a Command +@subsection Starting a Command on a Document or Region + +There are two ways to run an external command, you can either run it on +the current document with @code{TeX-command-master}, or on the current +region with @code{TeX-command-region}. A special case of running @TeX{} +on a region is @code{TeX-command-buffer} which differs from +@code{TeX-command-master} if the current buffer is not its own master +file. + +@deffn Command TeX-command-master +@kindex C-c C-c +(@kbd{C-c C-c}) Query the user for a command, and run it on the master +file associated with the current buffer. The name of the master file is +controlled by the variable @code{TeX-master}. The available commands are +controlled by the variable @code{TeX-command-list}. +@vindex TeX-master +@vindex TeX-command-list +@end deffn + +@deffn Command TeX-command-region +@kindex C-c C-r +(@kbd{C-c C-r}) Query the user for a command, and run it on the contents +of the selected region. The region contents are written into the region +file, after extracting the header and trailer from the master file. If +mark is inactive (which can happen with Transient Mark mode), use the +old region. See also the command @code{TeX-pin-region} about how to fix +a region. + +The name of the region file is controlled by the variable +@code{TeX-region}. The name of the master file is controlled by the +variable @code{TeX-master}. The header is all text up to the line +matching the regular expression @code{TeX-header-end}. The trailer is +all text from the line matching the regular expression +@code{TeX-trailer-start}. The available commands are controlled by the +variable @code{TeX-command-list}. +@vindex TeX-region +@vindex TeX-header-end +@vindex TeX-trailer-start +@vindex TeX-master +@vindex TeX-command-list +@end deffn + +@deffn Command TeX-command-buffer +@kindex C-c C-b +(@kbd{C-c C-b}) Query the user for a command, and apply it to the +contents of the current buffer. The buffer contents are written into +the region file, after extracting the header and trailer from the master +file. The command is then actually run on the region file. See above +for details. +@end deffn + +@deffn Command LaTeX-command-section +@kindex C-c C-z +(@kbd{C-c C-z}) Query the user for a command, and apply it to the +current section (or part, chapter, subsection, paragraph, or +subparagraph). What makes the current section is determined by +@code{LaTeX-command-section-level} which can be enlarged/shrunken using +@code{LaTeX-command-section-change-level} (@kbd{C-c M-z}). The given +numeric prefix arg is added to the current value of +@code{LaTeX-command-section-level}. By default, +@code{LaTeX-command-section-level} is initialized with the current +document's @code{LaTeX-largest-level}. The buffer contents are written +into the region file, after extracting the header and trailer from the +master file. The command is then actually run on the region file. See +@code{TeX-command-region} for details. +@end deffn + +It is also possible to compile automatically the whole document until it +is ready with a single command: @code{TeX-command-run-all}. + +@deffn Command TeX-command-run-all +@kindex C-c C-a +(@kbd{C-c C-a}) Compile the current document until an error occurs or it +is finished. If compilation finishes successfully, run the viewer at +the end. +@end deffn + +Here are some relevant variables. + +@defopt TeX-region +The name of the file for temporarily storing the text when formatting +the current region. +@end defopt + +@defopt TeX-header-end +A regular expression matching the end of the header. By default, this +is @samp{\begin@{document@}} in @LaTeX{} mode and @samp{%**end of +header} in plain @TeX{} mode. +@end defopt + +@defopt TeX-trailer-start +A regular expression matching the start of the trailer. By default, +this is @samp{\end@{document@}} in @LaTeX{} mode and @samp{\bye} in +plain @TeX{} mode. +@end defopt + +If you want to change the values of @code{TeX-header-end} and +@code{TeX-trailer-start} you can do this for all files by setting the +variables in a mode hook or per file by specifying them as file +variables (@pxref{File Variables,,,emacs,The Emacs Editor}). + +@deffn Command TeX-pin-region +@kindex C-c C-t C-r +(@kbd{C-c C-t C-r}) If you don't have a mode like Transient Mark mode +active, where marks get disabled automatically, the region would need to +get properly set before each call to @code{TeX-command-region}. If you +fix the current region with @kbd{C-c C-t C-r}, then it will get used for +more commands even though mark and point may change. An explicitly +activated mark, however, will always define a new region when calling +@code{TeX-command-region}. +@end deffn + +If the last process you started was +on the region, the commands described in @ref{Debugging} and +@ref{Control} will work on that process, otherwise they will work on the +process associated with the current document. + +Don't run more than one process at the same time. @AUCTeX{} doesn't +support simultaneous typeset including region typeset. Wait for the +previous process to finish before you start a new process, in particular +when you are editing multiple documents in parallel. This limitation +applies for preview by @previewlatex{} as well. + +@node Selecting a Command +@subsection Selecting and Executing a Command + +Once you started the command selection with @kbd{C-c C-c}, @kbd{C-c C-r} +or @kbd{C-c C-b} you will be prompted for the type of command. +@AUCTeX{} will try to guess which command is appropriate in the given +situation and propose it as default. Usually this is a processor like +@samp{TeX} or @samp{LaTeX} if the document was changed or a viewer if +the document was just typeset. Other commands can be selected in the +minibuffer with completion support by typing @key{TAB}. + +@vindex TeX-command-list +@vindex TeX-expand-list +The available commands are defined by the variable +@code{TeX-command-list}. Per default it includes commands for +typesetting the document (e.g.@: @samp{LaTeX}), for viewing the output +(@samp{View}), for printing (@samp{Print}), for generating an index +(@samp{Index}) or for spell checking (@samp{Spell}) to name but a few. +You can also add your own commands by adding entries to +@code{TeX-command-list}. Refer to its doc string for information about +its syntax. You might also want to look at @code{TeX-expand-list} to +learn about the expanders you can use in @code{TeX-command-list}. + +Note that the default of the variable occasionally changes. Therefore +it is advisable to add to the list rather than overwriting it. You can +do this with a call to @code{add-to-list} in your init file. For +example, if you wanted to add a command for running a program called +@samp{foo} on the master or region file, you could do this with the +following form. + +@lisp +(eval-after-load "tex" + '(add-to-list 'TeX-command-list + '("Foo" "foo %s" TeX-run-command t t :help "Run foo") + t)) +@end lisp + +As mentioned before, @AUCTeX{} will try to guess what command you want +to invoke. If you want to use another command than @samp{TeX}, +@samp{LaTeX} or whatever processor @AUCTeX{} thinks is appropriate for +the current mode, set the variable @code{TeX-command-default}. You can +do this for all files by setting it in a mode hook or per file by +specifying it as a file variable (@pxref{File Variables,,,emacs,The +Emacs Editor}). + +@defopt TeX-command-default +The default command to run in this buffer. Must be an entry in +@code{TeX-command-list}. +@end defopt + +@cindex Biber +@cindex biblatex +In case you use biblatex in a document, when automatic parsing is +enabled @AUCTeX{} checks the value of @samp{backend} option given to +biblatex at load time to decide whether to use Bib@TeX{} or Biber for +bibliography processing. Should @AUCTeX{} fail to detect the right +backend, you can use the file local @code{LaTeX-biblatex-use-Biber} +variable. +@defvr Variable LaTeX-biblatex-use-Biber +If this boolean variable is set as file local, it tells to @AUCTeX{} +whether to use Biber with biblatex. In this case, the autodetection of +the biblatex backend will be overridden. You may want to set locally +this variable if automatic parsing is not enabled. +@end defvr + +After confirming a command to execute, @AUCTeX{} will try to save any +buffers related to the document, and check if the document needs to be +reformatted. If the variable @code{TeX-save-query} is non-nil, +@AUCTeX{} will query before saving each file. By default @AUCTeX{} will +check emacs buffers associated with files in the current directory, in +one of the @code{TeX-macro-private} directories, and in the +@code{TeX-macro-global} directories. You can change this by setting the +variable @code{TeX-check-path}. + +@defopt TeX-check-path +Directory path to search for dependencies. + +If nil, just check the current file. +Used when checking if any files have changed. +@end defopt + +@cindex ispell +When performing spell checking on a document or a region (invoked +through @AUCTeX{}'s @samp{Spell} command or @kbd{M-x ispell @key{RET}}), you +want the spell checking program to skip certain macro arguments and +environments, most notably the arguments of referencing macros and the +contents of verbatim environments. The skipped parts are controlled by +variable @code{ispell-tex-skip-alists} provided by @file{ispell.el}. +@AUCTeX{} has a library which can be added to this variable depending on +the value of @code{TeX-ispell-extend-skip-list} which is set to @code{t} +by default. + +@defopt TeX-ispell-extend-skip-list +This boolean option controls whether @AUCTeX{} activates its extension +for skipping certain macro arguments and environments when spell +checking. + +When non-@code{nil}, @AUCTeX{} loads the file @file{tex-ispell.el} and +adds its content to @code{ispell-tex-skip-alists}. This library can and +will never be complete, but the interface can be used to add selected +and private macro names within your init file or on a file local basis. + +@code{ispell-tex-skip-alists} has the following structure: +@lisp +(defvar ispell-tex-skip-alists + '((;; @r{First list} + ("\\\\addcontentsline" ispell-tex-arg-end 2) + ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) + ("\\\\makebox" ispell-tex-arg-end 0) + ("\\\\documentclass" . "\\\\begin@{document@}")) + (;; @r{Second list} + ("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0) + ("list" ispell-tex-arg-end 2) + ("verbatim\\*?" . "\\\\end@{verbatim\\*?@}"))) + "Lists of regions to be skipped in TeX mode. +First list is used raw. +Second list has key placed inside \\begin@{@}.") +@end lisp +Each item is an alist and the structure of it is described in +@code{ispell-skip-region-alist}: +@lisp +(defvar ispell-skip-region-alist + '((...)) + "Alist expressing beginning and end of regions not to spell check. +The alist key must be a regular expression. +Valid forms include: + (KEY) - just skip the key. + (KEY . REGEXP) - skip to the end of REGEXP. + REGEXP may be string or symbol. + (KEY REGEXP) - skip to end of REGEXP. REGEXP must be a string. + (KEY FUNCTION ARGS) - FUNCTION called with ARGS + returns end of region.") +@end lisp + +Let's go through the first list of @code{ispell-tex-skip-alists} line by +line: +@lisp +("\\\\addcontentsline" ispell-tex-arg-end 2) +@end lisp +@code{KEY} is the string @code{"\\\\addcontentsline"}, @code{FUNCTION} +is @code{ispell-tex-arg-end} called with @code{ARGS}, here @code{2}. +@code{ispell-tex-arg-end} is a function provided by @file{ispell.el} +which skips as many subsequent optional arguments in square brackets as +it sees and then skips @code{ARGS} number of mandatory arguments in +braces. Omitting @code{ARGS} means skip @code{1} mandatory argument. +In practice, when you have something like this in your document: +@example +\addcontentsline@{toc@}@{chapter@}@{Some text@} +@end example +The first two arguments are left out and @samp{Some text} will be spell +checked. For the next line +@lisp +("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) +@end lisp +the name of the counter as argument is skipped. Next line is +@lisp +("\\\\makebox" ispell-tex-arg-end 0) +@end lisp +where only optional arguments are skipped, the first mandatory argument +is checked, e.g. +@example +\makebox[0pt][l]@{Some text@} +@end example +Finally, the next line +@lisp +("\\\\documentclass" . "\\\\begin@{document@}")) +@end lisp +ensures that the entire preamble of a document is discarded. Second +list works the same; it is more convenient for environments since +@code{KEY} is wrapped inside @code{\begin@{@}}. + +@findex TeX-ispell-skip-setcar +@findex TeX-ispell-skip-setcdr +@AUCTeX{} provides two functions to add items to car and cdr of +@code{ispell-tex-arg-end}, namely @code{TeX-ispell-skip-setcar} and +@code{TeX-ispell-skip-setcdr}. The argument of these functions is +exactly as in @code{ispell-tex-skip-alists}. Additions can be done via +init file, e.g.: +@lisp +(eval-after-load "tex-ispell" + '(progn + (TeX-ispell-skip-setcar + '(("\\\\mymacro" ispell-tex-arg-end))) + (TeX-ispell-skip-setcdr + '(("myverbatim" . "\\\\end@{myverbatim@}"))))) +@end lisp + +Another possibility is to use file local additions at the end of your +@TeX{} file, e.g.: +@example +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% eval: (TeX-ispell-skip-setcar '(("\\\\mymacro" . "@{[-0-9]+@}"))) +%%% End: +@end example + +@findex TeX-ispell-tex-arg-end +Finally, @AUCTeX{} provides a function called +@code{TeX-ispell-tex-arg-end} which sees more arguments than +@code{ispell-tex-arg-end}. Refer to its doc string for more +information. +@end defopt + +@AUCTeX{} also provides a facility to skip the argument of in-line +verbatim macros like @samp{\Verb} from @file{fancyvrb.sty} or +@samp{\mintinline} from @file{minted.sty}. Characters delimiting the +verbatim text are stored in @code{TeX-ispell-verb-delimiters}. + +@defopt TeX-ispell-verb-delimiters +String with delimiters recognized for in-line verbatim macros. This +variable is initialized to @samp{!|#~"*/+^-}. Since this string is +used to build a character alternative inside a regular expression, +special characters @samp{^} and @samp{-} should come last. Other +characters like opening brace @samp{@{}, asterisk @samp{*} or at sign +@samp{@@} should be avoided as they are not recognized by +@file{font-latex.el}. +@end defopt + +@node Processor Options +@subsection Options for @TeX{} Processors + +There are some options you can customize affecting which processors are +invoked or the way this is done and which output they produce as a +result. These options control if @acronym{DVI} or @acronym{PDF} output +should be produced, if @TeX{} should be started in interactive or +nonstop mode, if source specials or a Sync@TeX{} file should be produced +for making inverse and forward search possible or which @TeX{} engine +should be used instead of regular @TeX{}, like PDF@TeX{}, Omega or +Xe@TeX{}, and the style error messages are printed with. + +@deffn Command TeX-PDF-mode +@kindex C-c C-t C-p +@vindex TeX-PDF-mode +@cindex PDF mode +(@kbd{C-c C-t C-p}) +This command toggles the @acronym{PDF} mode of @AUCTeX{}, a buffer-local +minor mode which is enabled by default. You can customize +@code{TeX-PDF-mode} to give it a different default or set it as a file +local variable on a per-document basis. This option usually results in +calling either PDF@TeX{} or ordinary @TeX{}. +@end deffn + +@defopt TeX-DVI-via-PDFTeX +If this is set, @acronym{DVI} will also be produced by calling +PDF@TeX{}, setting @code{\pdfoutput=0}. This makes it possible to use +PDF@TeX{} features like character protrusion even when producing +@acronym{DVI} files. Contemporary @TeX{} distributions do this anyway, +so that you need not enable the option within @AUCTeX{}. +@end defopt + +@deffn Command TeX-interactive-mode +@kindex C-c C-t C-i +@vindex TeX-interactive-mode +(@kbd{C-c C-t C-i}) This command toggles the interactive mode of +@AUCTeX{}, a global minor mode. You can customize +@code{TeX-interactive-mode} to give it a different default. In +interactive mode, @TeX{} will pause with an error prompt when errors are +encountered and wait for the user to type something. +@end deffn + +@cindex I/O correlation +@cindex Sync@TeX{} +@cindex Source specials +@cindex PDFSync +@deffn Command TeX-source-correlate-mode +@kindex C-c C-t C-s +@vindex TeX-source-correlate-mode +(@kbd{C-c C-t C-s}) Toggles support for forward and inverse search. +Forward search refers to jumping to the place in the previewed document +corresponding to where point is located in the document source and +inverse search to the other way round. @xref{I/O Correlation}. + +You can permanently activate @code{TeX-source-correlate-mode} by +customizing the variable @code{TeX-source-correlate-mode}. There is a +bunch of customization options for the mode, use @kbd{M-x +customize-group @key{RET} TeX-view @key{RET}} to find out more. + +@vindex TeX-source-correlate-method +@AUCTeX{} is aware of three different means to do I/O correlation: +source specials (only DVI output), the pdfsync @LaTeX{} package (only +PDF output) and Sync@TeX{}. The choice between source specials and +Sync@TeX{} can be controlled with the variable +@code{TeX-source-correlate-method}. + +Should you use source specials it has to be stressed @emph{very} +strongly however, that source specials can cause differences in page +breaks and spacing, can seriously interfere with various packages and +should thus @emph{never} be used for the final version of a document. +In particular, fine-tuning the page breaks should be done with source +specials switched off. +@end deffn + +Sometimes you are requested, by journal rules or packages, to compile +the document into @acronym{DVI} output. Thus, if you want a +@acronym{PDF} document in the end you can either use Xe@TeX{} engine, +see below for information about how to set engines, or compile the +document with @command{tex} and then convert to @acronym{PDF} with +@command{dvips}--@command{ps2pdf} before viewing it. In addition, +current Japanese @TeX{} engines cannot generate @acronym{PDF} directly +so they rely on @acronym{DVI}-to-@acronym{PDF} converters. Usually +@command{dvipdfmx} command is used for this purpose. You can use the +@code{TeX-PDF-from-DVI} variable to let @AUCTeX{} know you want to +generate the final @acronym{PDF} by converting a @acronym{DVI} file. + +@defopt TeX-PDF-from-DVI +This option controls if and how to produce a @acronym{PDF} file by +converting a @acronym{DVI} file. + +When @code{TeX-PDF-mode} is non-nil, if @code{TeX-PDF-from-DVI} is +non-nil too the document is compiled to @acronym{DVI} instead of +@acronym{PDF}. When the document is ready, @kbd{C-c C-c} will suggest +to run the converter to @acronym{PDF} or an intermediate format. + +If non-nil, @code{TeX-PDF-from-DVI} should be the name of the command in @code{TeX-command-list}, +as a string, used to convert the @acronym{DVI} file to @acronym{PDF} or +to an intermediate format. Values currently supported are: +@itemize +@item +@code{"Dvips"}: the @acronym{DVI} file is converted to @acronym{PS} with +@command{dvips}. After successfully running it, @command{ps2pdf} will +be the default command to convert the @acronym{PS} file to +@acronym{PDF}. +@item +@code{"Dvipdfmx"}: the @acronym{DVI} file is converted to @acronym{PDF} +with @command{dvipdfmx}. +@end itemize +(case is significant; note the uppercase @samp{D} in both strings) +When the @acronym{PDF} file is finally ready, the next suggested command +will be @samp{View} to open the viewer. + +This option can also be set as a file local variable, in order to use +this conversion on a per-document basis. + +Recall the whole sequence of @kbd{C-c C-c} commands can be replaced by +the single @kbd{C-c C-a}. +@end defopt + +@AUCTeX{} also allows you to easily select different @TeX{} engines for +processing, either by using the entries in the @samp{TeXing Options} +submenu below the @samp{Command} menu or by calling the function +@code{TeX-engine-set}. These eventually set the variable +@code{TeX-engine} which you can also modify directly. + +@defopt TeX-engine +This variable allows you to choose which @TeX{} engine should be used +for typesetting the document, i.e.@: the executables which will be used +when you invoke the @samp{TeX} or @samp{LaTeX} commands. The value +should be one of the symbols defined in @code{TeX-engine-alist-builtin} +or @code{TeX-engine-alist}. The symbols @samp{default}, @samp{xetex}, +@samp{luatex} and @samp{omega} are available from the built-in list. +@end defopt + +Note that @code{TeX-engine} is buffer-local, so setting the variable +directly or via the above mentioned menu or function will not take +effect in other buffers. If you want to activate an engine for all +@AUCTeX{} modes, set @code{TeX-engine} in your init file, e.g.@: by using +@kbd{M-x customize-option @key{RET}}. If you want to activate it for a +certain @AUCTeX{} mode only, set the variable in the respective mode +hook. If you want to activate it for certain files, set it through file +variables (@pxref{File Variables,,,emacs,The Emacs Editor}). + +@vindex TeX-command +@vindex LaTeX-command +@vindex TeX-Omega-command +@vindex LaTeX-Omega-command +@vindex ConTeXt-engine +@vindex ConTeXt-Omega-engine +@vindex TeX-engine-alist +@vindex TeX-engine-alist-builtin +Should you need to change the executable names related to the different +engine settings, there are some variables you can tweak. Those are +@code{TeX-command}, @code{LaTeX-command}, @code{TeX-Omega-command}, +@code{LaTeX-Omega-command}, @code{ConTeXt-engine} and +@code{ConTeXt-Omega-engine}. The rest of the executables is defined +directly in @code{TeX-engine-alist-builtin}. If you want to override an +entry from that, add an entry to @code{TeX-engine-alist} that starts +with the same symbol as that the entry in the built-in list and specify +the executables you want to use instead. You can also add entries to +@code{TeX-engine-alist} in order to add support for engines not covered +per default. + +@defopt TeX-engine-alist +Alist of @TeX{} engines and associated commands. Each entry is a list with +a maximum of five elements. The first element is a symbol used to +identify the engine. The second is a string describing the engine. The +third is the command to be used for plain @TeX{}. The fourth is the +command to be used for @LaTeX{}. The fifth is the command to be used for +the @option{--engine} parameter of @ConTeXt{}'s @samp{texexec} program. Each +command can either be a variable or a string. An empty string or nil +means there is no command available. +@end defopt + +In some systems, Emacs cannot inherit the @env{PATH} environment variable from +the shell and thus @AUCTeX{} may not be able to run @TeX{} commands. +Before running them, @AUCTeX{} checks if it is able to find those commands +and will warn you in case it fails. You can skip this test by changing +the option @code{TeX-check-TeX}. + +@defopt TeX-check-TeX +@vindex TeX-command +@vindex TeX-check-TeX-command-not-found +If non-nil, @AUCTeX{} will check if it is able to find a working @TeX{} +distribution before running @TeX{}, @LaTeX{}, @ConTeXt{}, etc. It +actually checks if can run @code{TeX-command} command or the shell +returns a command not found error. The error code returned by the shell +in this case can be set in @code{TeX-check-TeX-command-not-found} +option. +@end defopt + +Some @LaTeX{} packages requires the document to be compiled with a +specific engine. Notable examples are @samp{fontspec} and @samp{polyglossia} +packages, which require Lua@TeX{} and Xe@TeX{} engines. If you try to +compile a document which loads one of such packages and the set engine +is not one of those allowed you will be asked to select a different +engine before running the @LaTeX{} command. If you do not want to be +warned by @AUCTeX{} in these cases, customize the option +@code{TeX-check-engine}. + +@defopt TeX-check-engine +This boolean option controls whether @AUCTeX{} should check the correct +engine has been set before running @LaTeX{} commands. +@end defopt + +As shown above, @AUCTeX{} handles in a special way most of the main +options that can be given to the @TeX{} processors. When you need to +pass to the @TeX{} processor arbitrary options not handled by @AUCTeX{}, +you can use the file local variable @code{TeX-command-extra-options}. +@defopt TeX-command-extra-options +String with the extra options to be given to the TeX processor. For +example, if you need to enable the shell escape feature to compile a +document, add the following line to the list of local variables of the +source file: +@example +%%% TeX-command-extra-options: "-shell-escape" +@end example +By default this option is not safe as a file-local variable because a +specially crafted document compiled with shell escape enabled can be +used for malicious purposes. +@end defopt + +You can customize @AUCTeX{} to show the processor output as it is +produced. + +@defopt TeX-show-compilation +If non-nil, the output of @TeX{} compilation is shown in another window. +@end defopt + +You can instruct @TeX{} to print error messages in the form +@samp{file:line:error} which is similar to the way many compilers format them. + +@defopt TeX-file-line-error +If non-nil, @TeX{} will produce @samp{file:line:error} style error messages. +@end defopt + +@ConTeXt{} users can choose between Mark II and Mark IV versions. This +is controlled by @code{ConTeXt-Mark-version} option. + +@defopt ConTeXt-Mark-version +This variables specifies which version of Mark should be used. Values +currently supported are @code{"II"}, the default, and @code{"IV"}. It +can be set globally using customization interface or on a per-file +basis, by specifying it as a file variable. +@end defopt + +@node Viewing +@section Viewing the Formatted Output +@cindex Viewing +@cindex Previewing +@cindex Starting a previewer + +@AUCTeX{} allows you to start external programs for previewing the +formatted output of your document. + +@menu +* Starting Viewers:: Starting viewers +* I/O Correlation:: Forward and inverse search +@end menu + +@node Starting Viewers +@subsection Starting Viewers + +Viewers are normally invoked by pressing @kbd{C-c C-c} once the document +is formatted, which will propose the @samp{View} command, or by activating the +respective entry in the Command menu. Alternatively you can type +@kbd{C-c C-v} which calls the function @code{TeX-view}. + +@deffn Command TeX-view +@kindex C-c C-v +(@kbd{C-c C-v}) Start a viewer without confirmation. The viewer is +started either on a region or the master file, depending on the last +command issued. This is especially useful for jumping to the location +corresponding to point in the viewer when using +@code{TeX-source-correlate-mode}. +@end deffn + +@AUCTeX{} will try to guess which type of viewer (@acronym{DVI}, +PostScript or @acronym{PDF}) has to be used and what options are to be +passed over to it. This decision is based on the output files present +in the working directory as well as the class and style options used in +the document. For example, if there is a @acronym{DVI} file in your +working directory, a @acronym{DVI} viewer will be invoked. In case of a +@acronym{PDF} file it will be a @acronym{PDF} viewer. If you specified +a special paper format like @samp{a5paper} or use the @samp{landscape} +option, this will be passed to the viewer by the appropriate options. +Especially some @acronym{DVI} viewers depend on this kind of information +in order to display your document correctly. In case you are using +@samp{pstricks} or @samp{psfrag} in your document, a @acronym{DVI} +viewer cannot display the contents correctly and a PostScript viewer +will be invoked instead. + +The association between the tests for the conditions mentioned above and +the viewers is made in the variable @code{TeX-view-program-selection}. +Therefore this variable is the starting point for customization if you +want to use other viewers than the ones suggested by default. + +@defopt TeX-view-program-selection +This is a list of predicates and viewers which is evaluated from front +to back in order to find out which viewer to call under the given +conditions. In the first element of each list item you can reference +one or more predicates defined in @code{TeX-view-predicate-list} or +@code{TeX-view-predicate-list-builtin}. In the second element you can +reference a viewer defined in @code{TeX-view-program-list} or +@code{TeX-view-program-list-builtin}. The viewer of the first item with +a positively evaluated predicate is selected. +@end defopt + +So @code{TeX-view-program-selection} only contains references to the +actual implementations of predicates and viewer commands respectively +which can be found elsewhere. @AUCTeX{} comes with a set of +preconfigured predicates and viewer commands which are stored in the +variables @code{TeX-view-predicate-list-builtin} and +@code{TeX-view-program-list-builtin} respectively. If you are not +satisfied with those and want to overwrite one of them or add your own +definitions, you can do so via the variables +@code{TeX-view-predicate-list} and @code{TeX-view-program-list}. + +@defopt TeX-view-predicate-list +This is a list of predicates for viewer selection and invocation. The +first element of each list item is a symbol and the second element a +Lisp form to be evaluated. The form should return nil if the predicate +is not fulfilled. + +A built-in predicate from @code{TeX-view-predicate-list-builtin} can be +overwritten by defining a new predicate with the same symbol. +@end defopt + +@defopt TeX-view-program-list +This is a list of viewer specifications each consisting of a symbolic +name and either a command line or a function to be invoked when the +viewer is called. If a command line is used, parts of it can be +conditionalized by prefixing them with predicates from +@code{TeX-view-predicate-list} or +@code{TeX-view-predicate-list-builtin}. (See the doc string for the +exact format to use.) The command line can also contain placeholders as +defined in @code{TeX-expand-list} and @code{TeX-expand-list-builtin} +which are expanded before the viewer is called. + +The third element of each item is a string, or a list of strings, with +the name of the executable, or executables, needed to open the output +file in the viewer. Placeholders defined in @code{TeX-expand-list} and +@code{TeX-expand-list-builtin} can be used here. This element is +optional and is used to check whether the viewer is actually available +on the system. + +A built-in viewer spec from @code{TeX-view-program-list-builtin} can be +overwritten by defining a new viewer spec with the same name. +@end defopt + +After the viewer is called via either the @samp{View} command or the key stroke +@kbd{C-c C-v}, the window system focus goes and stays on the viewer. If +you prefer that the focus is pulled back to Emacs immediately after that +and you are using evince-compatible viewer, customize the option +@code{TeX-view-enince-keep-focus}. + +@defopt TeX-view-evince-keep-focus +When this option is non-nil and the viewer is compatible with evince, +the focus is pulled back to Emacs immediately after the viewer is +invoked or refreshed from within @AUCTeX{}. +@end defopt + +Note that the viewer selection and invocation as described above will +only work if certain default settings in @AUCTeX{} are intact. For one, +the whole viewer selection machinery will only be triggered if there is +no @samp{%V} expander in @code{TeX-expand-list}. So if you have trouble +with the viewer invocation you might check if there is an older +customization of the variable in place. In addition, the use of a +function in @code{TeX-view-program-list} only works if the @samp{View} command +in @code{TeX-command-list} makes use of the hook +@code{TeX-run-discard-or-function}. + +@node I/O Correlation +@subsection Forward and Inverse Search +@cindex Inverse search +@cindex Forward search +@cindex I/O correlation +@cindex Source specials +@cindex Sync@TeX{} +@cindex PDFSync + +Forward and inverse search refer to the correlation between the document +source in the editor and the typeset document in the viewer. Forward +search allows you to jump to the place in the previewed document +corresponding to a certain line in the document source and inverse +search vice versa. + +@findex TeX-source-correlate-mode +@AUCTeX{} supports three methods for forward and inverse search: source +specials (only @acronym{DVI} output), the pdfsync @LaTeX{} package (only @acronym{PDF} +output) and Sync@TeX{} (any type of output). If you want to make use of +forward and inverse searching with source specials or Sync@TeX{}, switch +on @code{TeX-source-correlate-mode}. @xref{Processor Options}, on how +to do that. The use of the pdfsync package is detected automatically if +document parsing is enabled. Customize the variable +@code{TeX-source-correlate-method} to select the method to use. + +@defopt TeX-source-correlate-method +Method to use for enabling forward and inverse search. This can be +@samp{source-specials} if source specials should be used, @samp{synctex} +if Sync@TeX{} should be used, or @samp{auto} if @AUCTeX{} should decide. + +When the variable is set to @samp{auto}, @AUCTeX{} will always use +Sync@TeX{} if your @command{latex} processor supports it, source specials +otherwise. You must make sure your viewer supports the same method. + +It is also possible to specify a different method depending on the +output, either @acronym{DVI} or @acronym{PDF}, by setting the variable to an alist of the +kind +@lisp +((dvi . @samp{<source-specials or synctex>}) + (pdf . @samp{<source-specials or synctex>})) +@end lisp +in which the CDR of each entry is a symbol specifying the method to be +used in the corresponding mode. The default value of the variable is +@lisp +((dvi . source-specials) + (pdf . synctex)) +@end lisp +which is compatible with the majority of viewers. +@end defopt + +@findex TeX-view +Forward search happens automatically upon calling the viewer, e.g.@: by +typing @kbd{C-c C-v} (@code{TeX-view}). This will open the viewer or +bring it to front and display the output page corresponding to the +position of point in the source file. @AUCTeX{} will automatically pass +the necessary command line options to the viewer for this to happen. + +@vindex TeX-source-correlate-map +@findex TeX-view-mouse +You can also make special mouse event do forward search at the clicked +position. Use @code{TeX-source-correlate-map}@footnote{The keymap name is +@code{TeX-source-correlate-map}, not @code{TeX-source-correlate-mode-map}. +Actually, this keymap isn't implemented as minor mode map of +@code{TeX-source-correlate-mode}, in order that its bindings don't affect +buffers outside of @AUCTeX{}.} and @code{TeX-view-mouse} like this: +@lisp +(eval-after-load "tex" + '(define-key TeX-source-correlate-map [C-down-mouse-1] + #'TeX-view-mouse)) +@end lisp +This example binds @kbd{C-down-mouse-1}, which usually opens a concise +menu to select buffer, to the command to do forward search. + +@vindex TeX-source-correlate-start-server +Upon opening the viewer you will be asked if you want to start a server +process (Gnuserv or Emacs server) which is necessary for inverse search. +This happens only if there is no server running already. You can +customize the variable @code{TeX-source-correlate-start-server} to +inhibit the question and always or never start the server respectively. + +@defopt TeX-source-correlate-start-server +If @code{TeX-source-correlate-mode} is active and a viewer is invoked, +the default behavior is to ask if a server process should be started. +Set this variable to @code{t} if the question should be inhibited and +the server should always be started. Set it to @code{nil} if the server +should never be started. Inverse search will not be available in the +latter case. +@end defopt + +Inverse search, i.e.@: jumping to the part of your document source in +Emacs corresponding to a certain position in the viewer, is triggered +from the viewer, typically by a mouse click. Refer to the documentation +of your viewer to find out how it has to be configured and what you have +to do exactly. In xdvi you normally have to use @kbd{C-down-mouse-1}. + +@vindex TeX-source-correlate-start-server +Note that inverse search with the Evince @acronym{PDF} viewer or its MATE fork +Atril might fail in raising the Emacs frame after updating point in your +document's buffer. There is simply no way to raise the Emacs frame +reliably accross different operating systems and different window +managers with their different focus stealing policies. If the Emacs +frame is not raised after performing an inverse search from Evince or +Atril, you can customize the following option. + +@defopt TeX-raise-frame-function +A function that will be called after performing an inverse search from +Evince or Atril in order to raise the current Emacs frame. + +If your Emacs frame is already raised in that situation, just +leave this variable set to its default value +@code{raise-frame}. Otherwise, here are some alternative +settings that work for some users. + +@lisp +;; @r{Alternative 1: For some users, @t{`x-focus-frame'} works.} +(setq TeX-raise-frame-function #'x-focus-frame) + +;; @r{Alternative 2: Under GNOME 3.20 (and probably others), it} +;; @r{seems some focus stealing prevention policy prohibits that} +;; @r{some window gets the focus immediately after the user has} +;; @r{clicked in some other window. Here waiting a bit before} +;; @r{issuing the request seems to work.} +(setq TeX-raise-frame-function + (lambda () + (run-at-time 0.5 nil #'x-focus-frame))) + +;; @r{Alternative 3: Use the external @t{wmctrl} tool in order to} +;; @r{force Emacs into the focus.} +(setq TeX-raise-frame-function + (lambda () + (call-process + "wmctrl" nil nil nil "-i" "-R" + (frame-parameter (selected-frame) 'outer-window-id)))) +@end lisp +@end defopt + + +@node Debugging +@section Catching the errors +@cindex Debugging +@cindex Errors +@cindex Parsing errors +@cindex Parsing @TeX{} output +@cindex Next error +@cindex Parsing @LaTeX{} errors +@cindex Overfull boxes +@cindex Bad boxes +@cindex Underfull boxes + +Once you've formatted your document you may `debug' it, i.e.@: browse +through the errors (La)@TeX{} reported. You may also have a look at a +nicely formatted list of all errors and warnings reported by the +compiler. + +@deffn Command TeX-next-error @var{arg} @var{reparse} +@kindex C-c ` +(@kbd{C-c `}) Go to the next error reported by @TeX{}. The view will +be split in two, with the cursor placed as close as possible to the +error in the top view. In the bottom view, the error message will be +displayed along with some explanatory text. + +An optional numeric @var{arg}, positive or negative, specifies how many +error messages to move. A negative @var{arg} means to move back to +previous error messages, see also @code{TeX-previous-error}. + +The optional @var{reparse} argument makes @AUCTeX{} reparse the error +message buffer and start the debugging from the first error. This can +also be achieved by calling the function with a prefix argument +(@kbd{C-u}). +@end deffn + +@deffn Command TeX-previous-error @var{arg} +@kindex M-g p +(@kbd{M-g p}) Go to the previous error reported by @TeX{}. An optional +numeric @var{arg} specifies how many error messages to move backward. +This is like calling @code{TeX-next-error} with a negative argument. +@end deffn + +The command @code{TeX-previous-error} works only if @AUCTeX{} can parse +the whole @TeX{} log buffer. This is controlled by the +@code{TeX-parse-all-errors} variable. + +@defopt TeX-parse-all-errors +If t, @AUCTeX{} automatically parses the whole output log buffer right +after running a @TeX{} command, in order to collect all warnings and +errors. This makes it possible to navigate back and forth between the +error messages using @code{TeX-next-error} and +@code{TeX-previous-error}. This is the default. If nil, @AUCTeX{} does +not parse the whole output log buffer and @code{TeX-previous-error} +cannot be used. +@end defopt + +As default, @AUCTeX{} will display a special help buffer containing the +error reported by @TeX{} along with the documentation. There is however +an `expert' option, which allows you to display the real @TeX{} output. + +@defopt TeX-display-help +If t @AUCTeX{} will automatically display a help text whenever an error +is encountered using @code{TeX-next-error} (@kbd{C-c `}). If nil a +terse information about the error is displayed in the echo area. If +@code{expert} @AUCTeX{} will display the output buffer with the raw +@TeX{} output. +@end defopt + +@menu +* Ignoring warnings:: Controlling warnings to be reported +* Error overview:: List of all errors and warnings +@end menu + +@node Ignoring warnings +@subsection Controlling warnings to be reported + +Normally @AUCTeX{} will only report real errors, but you may as well +ask it to report `bad boxes' and warnings as well. + +@deffn Command TeX-toggle-debug-bad-boxes +@kindex C-c C-t C-b +@vindex TeX-debug-bad-boxes +(@kbd{C-c C-t C-b}) Toggle whether @AUCTeX{} should stop at bad boxes +(i.e.@: overfull and underfull boxes) as well as normal errors. The +boolean option @code{TeX-debug-bad-boxes} is set accordingly. +@end deffn + +@deffn Command TeX-toggle-debug-warnings +@kindex C-c C-t C-w +@vindex TeX-debug-warnings +(@kbd{C-c C-t C-w}) Toggle whether @AUCTeX{} should stop at warnings as +well as normal errors. The boolean option @code{TeX-debug-warnings} is +set accordingly. +@end deffn + +While many users desire to have warnings reported after compilation, +there are certain warnings that are considered unimportant and users +want to ignore them. For a more fine-grained control of what kinds of +warnings should be shown after compilation, @AUCTeX{} provides other +options. + +@defopt TeX-ignore-warnings +Controls which warnings are to be ignored. + +It can be a regexp matching the message of the warnings to be ignored. + +More advanced users can set also this option to a symbol with the name +of a custom function taking as arguments all the information of the +warning listed in @code{TeX-error-list} variable, except the last one +about whether to ignore the warning. See the code of @code{TeX-warning} +function and the documentation of @code{TeX-error-list} for more +details. +@end defopt + +@deffn Command TeX-toggle-suppress-ignored-warnings +@kindex C-c C-t C-x +@vindex TeX-suppress-ignored-warnings +(@kbd{C-c C-t C-x}) Toggle whether @AUCTeX{} should actually hide the +ignored warnings specified with @code{TeX-ignore-warnings}. The boolean +option @code{TeX-suppress-ignored-warnings} is set accordingly. If this +is nil, all warnings are shown, even those matched by +@code{TeX-ignore-warnings}, otherwise these are hidden. + +Note that @code{TeX-debug-warnings} takes the precedence: if it is nil, +all warnings are hidden in any case. +@end deffn + +@node Error overview +@subsection List of all errors and warnings + +When the option @code{TeX-parse-all-errors} is non-nil, you will be also +able to open an overview of all errors and warnings reported by the @TeX{} +compiler. + +@deffn Command TeX-error-overview +Show an overview of the errors and warnings occurred in the last @TeX{} +run. + +In this window you can visit the error on which point is by pressing +@key{RET}, and visit the next or previous issue by pressing @key{n} or +@key{p} respectively. A prefix argument to these keys specifies how +many errors to move forward or backward. You can visit an error also by +clicking on its message. Jump to error point in the source code with +@key{j}, and use @key{l} see the error in the log buffer. In addition, +you can toggle visibility of bad boxes, generic warnings, and ignored +warnings with @key{b}, @key{w}, and @key{x}, respectively (see +@ref{Ignoring warnings} for details). Press @key{q} to quit the +overview. +@end deffn + +@defopt TeX-error-overview-open-after-TeX-run +When this boolean variable is non-nil, the error overview will be +automatically opened after running @TeX{} if there are errors or warnings +to show. +@end defopt + +The error overview is opened in a new window of the current frame by +default, but you can change this behavior by customizing the option +@code{TeX-error-overview-setup}. + +@defopt TeX-error-overview-setup +Controls the frame setup of the error overview. The possible value is: +@code{separate-frame}; with a nil value the current frame is used +instead. + +The parameters of the separate frame can be set with the +@code{TeX-error-overview-frame-parameters} option. + +If the display does not support multi frame, the current frame +will be used regardless of the value of this variable. +@vindex TeX-error-overview-frame-parameters +@end defopt + +@node Checking +@section Checking for problems +@cindex Checking +@cindex @code{lacheck} +@cindex @code{chktex} +@cindex Finding errors +@cindex Running @code{lacheck} +@cindex Running @code{chktex} +@cindex Style +@cindex Problems +@cindex Flymake +@cindex Running Flymake + +Running @TeX{} or @LaTeX{} will only find regular errors in the +document, not examples of bad style. Furthermore, description of the +errors may often be confusing. The utilities @code{lacheck} and +@code{chktex} can be used to find style errors, such as forgetting to +escape the space after an abbreviation or using @samp{...} instead of +@samp{\ldots} and other similar problems. You start @code{lacheck} with +@kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c ChkTeX +@key{RET}}. The result will be a list of errors in the +@samp{*compilation*} buffer. You can go through the errors with +@kbd{C-x `} (@code{next-error}, @pxref{Compilation,,,emacs,The Emacs +Editor}), which will move point to the location of the next error. + +Alternatively, you may want in-buffer notation. @AUCTeX{} provides +support for this using the Flymake package in Emacs 26 or newer +(@pxref{Using Flymake,,,Flymake,GNU Flymake} for details). To enable, +call @kbd{M-x flymake-mode @key{RET}} in the buffer or enable it in all +buffers by adding this to your init file: +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp +Note that @AUCTeX{} currently only provides support for using +@code{chktex} as the flymake backend. + +Each of the two utilities @code{lacheck} and @code{chktex} will find +some errors the other doesn't, but @code{chktex} is more configurable, +allowing you to create your own errors. You may need to install the +programs before using them. You can get @code{lacheck} from +URL:@url{https://www.ctan.org/pkg/lacheck} and +@code{chktex} from +URL:@url{https://www.ctan.org/pkg/chktex}. @w{@TeX{} Live} contains +both. + +@node Control +@section Controlling the output +@cindex Controlling the output +@cindex Output +@cindex Redisplay output +@cindex Processes +@cindex Killing a process +@cindex Finding the master file +@cindex Master file +@cindex Stopping a process +@cindex Current file +@cindex Finding the current file + +A number of commands are available for controlling the output of an +application running under @AUCTeX{} + +@deffn Command TeX-kill-job +@kindex C-c C-k +(@kbd{C-c C-k}) Kill currently running external application. +This may be either of @TeX{}, @LaTeX{}, previewer, Bib@TeX{}, etc. +@end deffn + +@deffn Command TeX-recenter-output-buffer +@kindex C-c C-l +(@kbd{C-c C-l}) Recenter the output buffer so that the bottom line is +visible. +@end deffn + +@deffn Command TeX-home-buffer +@kindex C-c ^ +(@kbd{C-c ^}) Go to the `master' file in the document associated with +the current buffer, or if already there, to the file where the current +process was started. +@end deffn + +Additionally, output files produced by @AUCTeX{} can be placed in a +separate directory. + +@defopt TeX-output-dir +Set this option to the path of a directory where output files will be +placed. The output files include those that are produced by applications +running under @AUCTeX{}, temporary files related to region processing and +the @previewlatex{} files. If a relative path is specified, it is +interpreted as being relative to the master file in a mutlifile document. + +This is a buffer local variable and must be set separately for all +documents and all files in a multifile document. For example, + +@example +%%% Local Variables: +%%% mode: latex +%%% TeX-output-dir: "build" +%%% End: +@end example + +Alternatively, you may use @code{setq-default} to set the default value of +this option or set it as a directory local variable (@pxref{Directory +Variables,,, emacs, The Emacs Editor}). + +Note that a non-nil value of @code{TeX-output-dir} might be incompatible +with some @TeX{} commands and macros. In particular, the @LaTeX{} macro +@samp{\include} is known to not work with this option. Some @TeX{} +packages which produce intermediary files might also be incompatible. A +possible workaround for those packages is to append the value of +@code{TeX-output-dir} to the environment variables @env{TEXINPUTS} and +@env{BIBINPUTS}. +@end defopt + +@node Cleaning +@section Cleaning intermediate and output files +@cindex Cleaning + +@deffn Command TeX-clean +@vindex plain-TeX-clean-intermediate-suffixes +@vindex plain-TeX-clean-output-suffixes +@vindex LaTeX-clean-intermediate-suffixes +@vindex LaTeX-clean-output-suffixes +@vindex docTeX-clean-intermediate-suffixes +@vindex docTeX-clean-output-suffixes +@vindex Texinfo-clean-intermediate-suffixes +@vindex Texinfo-clean-output-suffixes +@vindex ConTeXt-clean-intermediate-suffixes +@vindex ConTeXt-clean-output-suffixes +@vindex AmSTeX-clean-intermediate-suffixes +@vindex AmSTeX-clean-output-suffixes +Remove generated intermediate files. In case a prefix argument is +given, remove output files as well. + +Canonical access to the function is provided by the @samp{Clean} and +@samp{Clean All} entries in @code{TeX-command-list}, invokable with +@kbd{C-c C-c} or the Command menu. + +The patterns governing which files to remove can be adapted separately +for each @AUCTeX{} mode by means of the following variables: +@itemize +@item +@code{plain-TeX-clean-intermediate-suffixes} +@item +@code{plain-TeX-clean-output-suffixes} +@item +@code{LaTeX-clean-intermediate-suffixes} +@item +@code{LaTeX-clean-output-suffixes} +@item +@code{docTeX-clean-intermediate-suffixes} +@item +@code{docTeX-clean-output-suffixes} +@item +@code{Texinfo-clean-intermediate-suffixes} +@item +@code{Texinfo-clean-output-suffixes} +@item +@code{ConTeXt-clean-intermediate-suffixes} +@item +@code{ConTeXt-clean-output-suffixes} +@item +@code{AmSTeX-clean-intermediate-suffixes} +@item +@code{AmSTeX-clean-output-suffixes} +@end itemize + +@end deffn + +@defopt TeX-clean-confirm +Control if deletion of intermediate and output files has to be confirmed +before it is actually done. If non-nil, ask before deleting files. +@end defopt + +@node Documentation +@section Documentation about macros and packages +@cindex Documentation + +@deffn Command TeX-documentation-texdoc +@kindex C-c ? +(@kbd{C-c ?}) Get documentation about the packages installed on your +system, using @command{texdoc} to find the manuals. The function will +prompt for the name of packages. If point is on a word, this will be +suggested as default. + +If the command is called with a prefix argument, you will be shown a +list of manuals of the given package among to choose. + +The command can be invoked by the key binding mentioned above as well as +the @samp{Find Documentation...} entry in the mode menu. +@end deffn + +@node Customization +@chapter Customization and Extension + +@menu +* Modes and Hooks:: Modes and Hooks +* Multifile:: Multifile Documents +* Parsing Files:: Automatic Parsing of @TeX{} Files +* Internationalization:: Language Support +* Automatic:: Automatic Customization +* Style Files:: Writing Your Own Style Support +@end menu + +@node Modes and Hooks +@section Modes and Hooks + +@AUCTeX{} supports a wide variety of derivatives and extensions of +@TeX{}. Besides plain @TeX{} those are @LaTeX{}, AMS-@TeX{}, +@ConTeXt{}, Texinfo and doc@TeX{}. For each of them there is a separate +major mode in @AUCTeX{} and each major mode runs @code{text-mode-hook}, +@code{TeX-mode-hook} as well as a hook special to the mode in this +order. (As an exception, Texinfo mode does not run @code{TeX-mode-hook}.) +The following table provides an overview of the respective mode +functions and hooks. + +@multitable {Plain @TeX{}} {@code{plain-tex-mode}} {@code{plain-TeX-mode-hook}} +@headitem Type @tab Mode function @tab Hook +@item Plain @TeX{} @tab @code{plain-tex-mode} @tab @code{plain-TeX-mode-hook} +@item @LaTeX{} @tab @code{latex-mode} @tab @code{LaTeX-mode-hook} +@item AMS-@TeX{} @tab @code{ams-tex-mode} @tab @code{AmS-TeX-mode-hook} +@item @ConTeXt{} @tab @code{context-mode} @tab @code{ConTeXt-mode-hook} +@item Texinfo @tab @code{texinfo-mode} @tab @code{Texinfo-mode-hook} +@item Doc@TeX{} @tab @code{doctex-mode} @tab @code{docTeX-mode-hook} +@end multitable +@findex plain-tex-mode +@vindex plain-TeX-mode-hook +@findex latex-mode +@vindex LaTeX-mode-hook +@findex ams-tex-mode +@vindex AmS-TeX-mode-hook +@findex context-mode +@vindex ConTeXt-mode-hook +@findex texinfo-mode +@vindex Texinfo-mode-hook +@findex doctex-mode +@vindex docTeX-mode-hook + +If you need to make a customization via a hook which is only relevant +for one of the modes listed above, put it into the respective mode hook, +if it is relevant for any @AUCTeX{} mode, add it to @code{TeX-mode-hook} +and if it is relevant for all text modes, append it to +@code{text-mode-hook}. + +Other useful hooks are listed below. + +@defvr Variable TeX-after-compilation-finished-functions +Hook which is run after the @TeX{}/@LaTeX{} processor has successfully +finished compiling your document. (@xref{Processing}, for finding out +how to compile your document.) Each function in the hook is run with +the compiled output document as its argument. + +This is useful for automatically refreshing the viewer after +re-compilation especially when using Emacs viewers such as DocView or +PDF Tools. The function @code{TeX-revert-document-buffer} can be added +to the hook for this purpose. +@end defvr +@vindex TeX-after-compilation-finished-functions +@findex TeX-revert-document-buffer + +@node Multifile +@section Multifile Documents +@cindex Multifile Documents +@cindex Documents +@cindex Documents with multiple files +@cindex Multiple Files +@cindex Many Files +@cindex Including +@cindex \include +@cindex Inputing +@cindex \input +@cindex Master file + +You may wish to spread a document over many files (as you are likely to do if +there are multiple authors, or if you have not yet discovered the power +of the outline commands (@pxref{Outline})). This can be done by having a +``master'' file in which you include the various files with the @TeX{} +macro @samp{\input} or the @LaTeX{} macro @samp{\include}. These +files may also include other files themselves. However, to format the +document you must run the commands on the top level master file. + +When you, for example, ask @AUCTeX{} to run a command on the master file, +it has no way of knowing the name of the master file. By default, +it will assume that the current file is the master file. If you insert +the following in your init file (@file{init.el} or @file{.emacs}), @AUCTeX{} will use a more +advanced algorithm. + +@lisp +(setq-default TeX-master nil) ; @r{Query for master file.} +@end lisp + +In this case, @AUCTeX{} will ask for the name of the master file +associated with the buffer. To avoid asking you again, @AUCTeX{} will +automatically insert the name of the master file as a file variable +(@pxref{File Variables,,,emacs,The Emacs Editor}). You can also insert +the file variable yourself, by putting the following text at the end of +your files. + +@example +%%% Local Variables: +%%% TeX-master: "master" +%%% End: +@end example + +You should always set this variable to the name of the top level document. If +you always use the same name for your top level documents, you can set +@code{TeX-master} in your init file such as @file{init.el} or @file{.emacs}. + +@lisp +(setq-default TeX-master "master") ; @r{All master files called @t{"master"}.} +@end lisp + +@defopt TeX-master +The master file associated with the current buffer. If the file being +edited is actually included from another file, then you can tell @AUCTeX{} +the name of the master file by setting this variable. If there are +multiple levels of nesting, specify the top level file. + +If this variable is @code{nil}, @AUCTeX{} will query you for the +name. + +If the variable is @code{t}, then @AUCTeX{} will assume the file is a master +file itself. + +If the variable is @code{shared}, then @AUCTeX{} will query for the name, +but will not change the file. + +If the variable is @code{dwim}, @AUCTeX{} will try to avoid querying by +attempting to ``do what I mean''; and then change the file. +@end defopt + +@defopt TeX-one-master +Regular expression matching ordinary @TeX{} files. + +You should set this variable to match the name of all files, for which +it is a good idea to append a @code{TeX-master} file variable entry +automatically. When @AUCTeX{} adds the name of the master file as a +file variable, it does not need to ask next time you edit the file. + +If you dislike @AUCTeX{} automatically modifying your files, you can +set this variable to @samp{"<none>"}. By default, @AUCTeX{} will modify +any file with an extension of @samp{.tex}, @samp{.texi} or @samp{.dtx}. +@end defopt + +@deffn Command TeX-master-file-ask +@kindex C-c _ +(@kbd{C-c _}) Query for the name of a master file and add the respective +File Variables (@pxref{File Variables,,,emacs,The Emacs Editor}) to the +file for setting this variable permanently. + +@AUCTeX{} will not ask for a master file when it encounters existing +files. This function shall give you the possibility to insert the +variable manually. +@end deffn + +@AUCTeX{} keeps track of macros, environments, labels, and style +files that are used in a given document. For this to work with +multifile documents, @AUCTeX{} has to have a place to put the +information about the files in the document. This is done by having an +@file{auto} subdirectory placed in the directory where your document is +located. Each time you save a file, @AUCTeX{} will write information +about the file into the @file{auto} directory. When you load a file, +@AUCTeX{} will read the information in the @file{auto} directory +about the file you loaded @emph{and the master file specified by +@code{TeX-master}}. Since the master file (perhaps indirectly) includes +all other files in the document, @AUCTeX{} will get information from +all files in the document. This means that you will get from each file, +for example, completion for all labels defined anywhere in the document. + +@AUCTeX{} will create the @file{auto} directory automatically if +@code{TeX-auto-save} is non-nil. Without it, the files in the document +will not know anything about each other, except for the name of the +master file. @xref{Automatic Local}. + +@deffn Command TeX-save-document +@kindex C-c C-d +(@kbd{C-c C-d}) Save all buffers known to belong to the current document. +@end deffn + +@defopt TeX-save-query +If non-nil, then query the user before saving each file with +@code{TeX-save-document}. +@end defopt + + +@node Parsing Files +@section Automatic Parsing of @TeX{} Files +@cindex Parsing @TeX{} +@cindex Automatic Parsing +@cindex Tabs +@cindex Tabify +@cindex Untabify + +@AUCTeX{} depends heavily on being able to extract information from the +buffers by parsing them. Since parsing the buffer can be somewhat slow, +the parsing is initially disabled. You are encouraged to enable them by +adding the following lines to your init file such as @file{init.el} or @file{.emacs}. + +@lisp +(setq TeX-parse-self t) ; @r{Enable parse on load.} +(setq TeX-auto-save t) ; @r{Enable parse on save.} +@end lisp + +The latter command will make @AUCTeX{} store the parsed information in +an @file{auto} subdirectory in the directory each time the @TeX{} files +are stored, @pxref{Automatic Local}. If @AUCTeX{} finds the pre-parsed +information when loading a file, it will not need to reparse the buffer. +The information in the @file{auto} directory is also useful for +multifile documents, @pxref{Multifile}, since it allows each file to +access the parsed information from all the other files in the document. +This is done by first reading the information from the master file, and +then recursively the information from each file stored in the master +file. + +The variables can also be set on a per file basis, by changing the file +local variables. + +@example +%%% Local Variables: +%%% TeX-parse-self: t +%%% TeX-auto-save: t +%%% End: +@end example + +Even when you have disabled the automatic parsing, you can force the +generation of style information by pressing @kbd{C-c C-n}. This is +often the best choice, as you will be able to decide when it is +necessary to reparse the file. + +@defopt TeX-parse-self +Parse file after loading it if no style hook is found for it. +@end defopt + +@defopt TeX-auto-save +Automatically save style information when saving the buffer. +@end defopt + +@deffn Command TeX-normal-mode @var{arg} +@kindex C-c C-n +(@kbd{C-c C-n}) Remove all information about this buffer, and apply the +style hooks again. Save buffer first including style information. With +optional argument, also reload the style hooks. +@end deffn + +When @AUCTeX{} saves your buffer, it can optionally convert all tabs in +your buffer into spaces. +Tabs confuse @AUCTeX{}'s error message parsing and so should generally be +avoided. However, tabs are significant in some environments, and so by +default @AUCTeX{} does not remove them. +To convert tabs to spaces when saving a buffer, insert the +following in your init file such as @file{init.el} or @file{.emacs}: + +@lisp +(setq TeX-auto-untabify t) +@end lisp + +@defopt TeX-auto-untabify +Automatically remove all tabs from a file before saving it. +@end defopt + +Instead of disabling the parsing entirely, you can also speed it +significantly up by limiting the information it will search for (and +store) when parsing the buffer. You can do this by setting the default +values for the buffer local variables @code{TeX-auto-regexp-list} and +@code{TeX-auto-parse-length} in your init file such as @file{init.el} or @file{.emacs}. + +@lisp +;; @r{Only parse LaTeX class and package information.} +(setq-default TeX-auto-regexp-list 'LaTeX-auto-minimal-regexp-list) +;; @r{The class and package information is usually near the beginning.} +(setq-default TeX-auto-parse-length 2000) +@end lisp + +This example will speed the parsing up significantly, but @AUCTeX{} +will no longer be able to provide completion for labels, macros, +environments, or bibitems specified in the document, nor will it know +what files belong to the document. + +These variables can also be specified on a per file basis, by changing +the file local variables. + +@example +%%% Local Variables: +%%% TeX-auto-regexp-list: TeX-auto-full-regexp-list +%%% TeX-auto-parse-length: 999999 +%%% End: +@end example + +@defopt TeX-auto-regexp-list +List of regular expressions used for parsing the current file. +@end defopt + +@defopt TeX-auto-parse-length +Maximal length of @TeX{} file that will be parsed. +@end defopt + +The pre-specified lists of regexps are defined below. You can use these +before loading @AUCTeX{} by quoting them, as in the example above. + +@defvr Constant TeX-auto-empty-regexp-list +Parse nothing +@end defvr + +@defvr Constant LaTeX-auto-minimal-regexp-list +Only parse @LaTeX{} class and packages. +@end defvr + +@defvr Constant LaTeX-auto-label-regexp-list +Only parse @LaTeX{} labels. +@end defvr + +@defvr Constant LaTeX-auto-index-regexp-list +Only parse @LaTeX{} index and glossary entries. +@end defvr + +@defvr Constant LaTeX-auto-class-regexp-list +Only parse macros in @LaTeX{} classes and packages. +@end defvr + +@defvr Constant LaTeX-auto-pagestyle-regexp-list +Only parse @LaTeX{} pagestyles. +@end defvr + +@defvr Constant LaTeX-auto-counter-regexp-list +Only parse @LaTeX{} counters. +@end defvr + +@defvr Constant LaTeX-auto-length-regexp-list +Only parse @LaTeX{} lengths. +@end defvr + +@defvr Constant LaTeX-auto-savebox-regexp-list +Only parse @LaTeX{} saveboxes. +@end defvr + +@defvr Constant LaTeX-auto-regexp-list +Parse common @LaTeX{} commands. +@end defvr + +@defvr Constant plain-TeX-auto-regexp-list +Parse common plain @TeX{} commands. +@end defvr + +@defvr Constant TeX-auto-full-regexp-list +Parse all @TeX{} and @LaTeX{} commands that @AUCTeX{} can use. +@end defvr + +@node Internationalization +@section Language Support +@cindex Internationalization +@cindex Language Support +@cindex CJK language +@cindex C@TeX{} +@cindex China@TeX{} +@cindex p@TeX{} +@cindex up@TeX{} +@cindex ASCII p@TeX{} +@cindex j@TeX{} +@cindex NTT j@TeX{} +@cindex k@TeX{} +@cindex H@LaTeX{} +@cindex @acronym{CJK}-@LaTeX{} + +@TeX{} and Emacs are usable for European (Latin, Cyrillic, Greek) based +languages. Some @LaTeX{} and EmacsLisp packages are available for easy +typesetting and editing documents in European languages. + +@c Some Texinfo macros are not used because they require quite recent +@c texinfo versions (2005-03-05): +@c Second arg of @acronym is available with 4.7, @comma is available in +@c 4.7, @abbr is available in 4.8. +@c -> @abbr{MULE, MULtilingual Enhancement to GNU Emacs} +@c -> @acronym{CJK, Chinese@comma{} Japanese@comma{} and Korean} + +All Emacs versions supported by current @AUCTeX{} can handle +@acronym{CJK} (Chinese, Japanese, and Korean) languages by default. + +In most cases, special versions of @TeX{} engines are needed for +high-quality typesetting of @acronym{CJK} languages: C@TeX{} and +China@TeX{} for Chinese, ASCII p@TeX{}, up@TeX{} and NTT j@TeX{} for +Japanese, H@LaTeX{} and k@TeX{} for Korean. They are necessary as well +when you want to typeset documents saved in their domestic encodings +such as @samp{Shift-JIS}. Currently, @AUCTeX{} offers native support +for p@TeX{}, up@TeX{} and j@TeX{} only. + +@c FIXME: We need more information for CTeX, ChinaTeX, KTeX, and HLaTeX. + +If you don't need fine tuning in the result with respect to the +typesetting rules of their respective national standards, most unicode +based @TeX{} engines, e.g.@: Lua@TeX{} and Xe@TeX{}, can handle +@acronym{CJK} languages by default if they are encoded in +@acronym{UTF}-8. The @acronym{CJK}-@LaTeX{} package is provided for +supporting @acronym{CJK} scripts in a standard @LaTeX{} document. + +@menu +* European:: Using @AUCTeX{} with European Languages +* Japanese:: Using @AUCTeX{} with Japanese +@end menu + +@node European +@subsection Using @AUCTeX{} with European Languages +@cindex Europe +@cindex European Characters +@cindex @acronym{ISO} Character set +@cindex @acronym{ISO} 8859 Latin 1 +@cindex Latin 1 + +@subsubsection Typing and Displaying Non-ASCII Characters + +First you will need a way to write non-ASCII characters. You can either +use macros, or teach @TeX{} about the @acronym{ISO} character sets. I prefer the +latter, it has the advantage that the usual standard emacs word +movement and case change commands will work. + +Recommended encoding for @LaTeX{} document is @acronym{UTF}-8. Recent +@LaTeX{}2e has native support for @acronym{UTF}-8. If your @LaTeX{}2e is +not recent enough, just add @samp{\usepackage[utf8]@{inputenc@}}. + +You can still use @acronym{ISO} 8859 Latin 1 encoding with +@samp{\usepackage[latin1]@{inputenc@}}. + +To be able to display non-ASCII characters you will need an appropriate +font. All Emacs versions supported by current @AUCTeX{} can display 8-bit +characters, provided that suitable fonts are installed. + +@c FIXME: These are considered as kind of obsolete, aren't they? +A compromise is to use an European character set when editing the file, +and convert to @TeX{} macros when reading and writing the files. + +@table @file +@item iso-cvt.el +@cindex @file{iso-cvt.el} +Much like @file{iso-tex.el} but is bundled with Emacs 19.23 and later. + +@item X-Symbol +@cindex X-Symbol +a much more complete package for Emacs that can also handle a lot of +mathematical characters and input methods. +@end table + +@subsubsection Style Files for Different Languages + +@cindex ispell +@AUCTeX{} supports style files for several languages. Each style file +may modify @AUCTeX{} to better support the language, and will run +a language specific hook that will allow you to for example change +ispell dictionary, or run code to change the keyboard remapping. The +following will for example choose a Danish dictionary for documents +including @samp{\usepackage[danish]@{babel@}}. +This requires parsing to be enabled, @pxref{Parsing Files}. + +@lisp +(add-hook 'TeX-language-dk-hook + (lambda () (ispell-change-dictionary "danish"))) +@end lisp + +The following style files are recognized: + +@c In alphabetic order of the hooks: +@vindex TeX-language-bg-hook +@vindex TeX-language-cz-hook +@vindex TeX-language-dk-hook +@vindex TeX-language-en-hook +@vindex TeX-language-nl-hook +@vindex TeX-language-de-hook +@vindex TeX-language-it-hook +@vindex TeX-language-is-hook +@vindex TeX-language-pl-hook +@vindex TeX-language-pt-br-hook +@vindex TeX-language-pt-hook +@vindex TeX-language-sk-hook +@vindex TeX-language-sv-hook +@cindex Brazilian Portuguese +@cindex Bulgarian +@cindex Czech +@cindex Italian +@cindex Danish +@cindex Dutch +@cindex English +@cindex German +@cindex Polish +@cindex Portuguese +@cindex Slovak +@cindex Swedish +@table @file +@item brazilian +@itemx brazil +Runs style hook @code{TeX-language-pt-br-hook}. Gives @samp{"} word +syntax, makes the @key{"} key inserts @samp{``} or @samp{''} depending on +context. Typing @key{"} twice will insert a literal @samp{"}. Typing +@key{-} twice will insert @samp{"=}, three times @samp{--}. + +@item bulgarian +Runs style hook @code{TeX-language-bg-hook}. Gives @samp{"} word syntax, +makes the @key{"} key insert a literal @samp{"}. Typing @key{"} twice +will insert @samp{"`} or @samp{"'} depending on context. Typing @key{-} +twice will insert @samp{"=}, three times @samp{--}. + +@item czech +Runs style hook @code{TeX-language-cz-hook}. Pressing @key{"} will +insert @samp{\uv@{} and @samp{@}} depending on context. + +@c FIXME: Is the difference between dk and danish really intented? +@item danish +Runs style hook @code{TeX-language-dk-hook}. Pressing @key{"} will +insert @samp{"`} and @samp{"'} depending on context. Typing @key{-} +twice will insert @samp{"=}, i.e.@: a hyphen string allowing hyphenation +in the composing words. +@c dk.sty seems to be obsolete, so we don't want to encourage using it. +@c @item dk +@c Runs style hook @code{TeX-language-dk-hook}. + +@item dutch +Runs style hook @code{TeX-language-nl-hook}. + +@item english +@itemx australian +@itemx canadian +@itemx newzealand +Runs style hook @code{TeX-language-en-hook}. + +@item frenchb +@itemx francais +Runs style hook @code{TeX-language-fr-hook}. Pressing @key{"} will +insert @samp{\og} and @samp{\fg} depending on context. Note that the +language name for customizing @code{TeX-quote-language-alist} is +@samp{french}. + +@item german +@itemx ngerman +Runs style hook @code{TeX-language-de-hook}. Gives @samp{"} word +syntax, makes the @key{"} key insert a literal @samp{"}. Pressing the +key twice will give you opening or closing German quotes (@samp{"`} or +@samp{"'}). Typing @key{-} twice will insert @samp{"=}, three times +@samp{--}. + +@item icelandic +Runs style hook @code{TeX-language-is-hook}. Gives @samp{"} word syntax, +makes the @key{"} key insert a literal @samp{"}. Typing @key{"} twice +will insert @samp{"`} or @samp{"'} depending on context. Typing @key{-} +twice will insert @samp{"=}, three times @samp{--}. + +@item italian +Runs style hook @code{TeX-language-it-hook}. Pressing @key{"} will +insert @samp{"<} and @samp{">} depending on context. + +@item polish +Runs style hook @code{TeX-language-pl-hook}. Gives @samp{"} word syntax +and makes the @key{"} key insert a literal @samp{"}. Pressing @key{"} +twice will insert @samp{"`} or @samp{"'} depending on context. + +@item polski +Runs style hook @code{TeX-language-pl-hook}. Makes the @key{"} key +insert a literal @samp{"}. Pressing @key{"} twice will insert @samp{,,} +or @samp{''} depending on context. + +@item portuguese +@itemx portuges +Runs style hook @code{TeX-language-pt-hook}. Gives @samp{"} word syntax, +makes the @key{"} key inserts @samp{"<} or @samp{">} depending on context. +Typing @key{"} twice will insert a literal @samp{"}. Typing @key{-} twice +will insert @samp{"=}, three times @samp{--}. Note that the language name +for customizing @code{TeX-quote-language-alist} is @samp{portuguese}. + +@item slovak +Runs style hook @code{TeX-language-sk-hook}. Pressing @key{"} will +insert @samp{\uv@{} and @samp{@}} depending on context. + +@item swedish +Runs style hook @code{TeX-language-sv-hook}. Pressing @key{"} will +insert @samp{''}. Typing @key{-} twice will insert @samp{"=}, three +times @samp{--}. +@end table + +Replacement of language-specific hyphen strings like @samp{"=} with +dashes does not require to type @key{-} three times in a row. You can +put point after the hypen string anytime and trigger the replacement by +typing @key{-}. + +In case you are not satisfied with the suggested behavior of quote and +hyphen insertion you can change it by customizing the variables +@code{TeX-quote-language-alist} and +@code{LaTeX-babel-hyphen-language-alist} respectively. + +@defopt TeX-quote-language-alist +Used for overriding the default language-specific quote insertion +behavior. This is an alist where each element is a list consisting of +four items. The first item is the name of the language in concern as a +string. See the list of supported languages above. The second item is +the opening quotation mark. The third item is the closing quotation +mark. Opening and closing quotation marks can be specified directly as +strings or as functions returning a string. The fourth item is a +boolean controlling quote insertion. It should be non-nil if if the +special quotes should only be used after inserting a literal @samp{"} +character first, i.e.@: on second key press. +@end defopt + +@defopt LaTeX-babel-hyphen-language-alist +Used for overriding the behavior of hyphen insertion for specific +languages. Every element in this alist is a list of three items. The +first item should specify the affected language as a string. The second +item denotes the hyphen string to be used as a string. The third item, +a boolean, controls the behavior of hyphen insertion and should be +non-nil if the special hyphen should be inserted after inserting a +literal @samp{-} character, i.e.@: on second key press. +@end defopt + +The defaults of hyphen insertion are defined by the variables +@code{LaTeX-babel-hyphen} and @code{LaTeX-babel-hyphen-after-hyphen} +respectively. + +@defopt LaTeX-babel-hyphen +String to be used when typing @key{-}. This usually is a hyphen +alternative or hyphenation aid provided by @samp{babel} and the related +language style files, like @samp{"=}, @samp{"~} or @samp{"-}. + +Set it to an empty string or nil in order to disable language-specific +hyphen insertion. +@end defopt + +@defopt LaTeX-babel-hyphen-after-hyphen +Control insertion of hyphen strings. If non-nil insert normal hyphen on +first key press and swap it with the language-specific hyphen string +specified in the variable @code{LaTeX-babel-hyphen} on second key press. +If nil do it the other way round. +@end defopt + +@node Japanese +@subsection Using @AUCTeX{} with Japanese @TeX{} +@cindex Japan +@cindex Japanese +@cindex Nippon +@cindex NTT j@TeX{} +@cindex j@TeX{} +@cindex j@LaTeX{} +@cindex ASCII p@TeX{} +@cindex p@TeX{} +@cindex p@LaTeX{} +@cindex up@TeX{} +@cindex up@LaTeX{} +@cindex @file{tex-jp.el} +@vindex TeX-default-mode +@vindex TeX-parse-self +@vindex TeX-engine +@vindex TeX-engine-alist +@vindex japanese-TeX-mode +@findex japanese-plain-tex-mode +@findex japanese-latex-mode + +To write Japanese text with @AUCTeX{}, you need the versions of +@TeX{} and Emacs that support Japanese. @AUCTeX{} supports three +Japanese @TeX{} engines by default: NTT j@TeX{}, ASCII p@TeX{} and +up@TeX{}. + +Activate @code{japanese-plain-tex-mode} or @code{japanese-latex-mode} to +use the Japanese @TeX{} engines. If it doesn't work, send mail to +Masayuki Ataka @email{masayuki.ataka@@gmail.com} or Ikumi Keita +@email{ikumikeita@@jcom.home.ne.jp}, who currently concern with stuff +related to Japanese in @AUCTeX{}. None of the primary @AUCTeX{} +maintainers understand Japanese, so they cannot help you. + +It is recommended to enable @code{TeX-parse-self} for typical Japanese +@LaTeX{} users. When enabled, @code{japanese-latex-mode} selects the +suitable Japanese @TeX{} engine automatically based on the class file +name (such as @code{jbook}, @code{jsarticle} and @code{tjreport}) and +its option. @xref{Parsing Files}. + +It is important to select the suitable Japanese @TeX{} engine because +the selected engine determines the command name such as @command{platex} +and @command{uptex} to typeset the document. If you find that wrong +command is used, check the value of @code{TeX-engine} on that buffer. +If the value does not suit the current document, change the value by the +@samp{TeXing Options} submenu below the @samp{Command} menu. +@xref{Processor Options}. + +To make the selected engine to persist across Emacs sessions, there are +two ways from which you can choose one according to your needs: + +@enumerate +@item +If you use a specific engine (almost) exclusively, customize the option +@code{japanese-TeX-engine-default}. + +@defopt japanese-TeX-engine-default +The default @code{TeX-engine} in Japanese @TeX{} mode. + +The default value is @samp{ptex}. +@end defopt +@item +If you want to set the engine on a per file basis, use the file local +variables to set @code{TeX-engine}. + +Here is a sample code to set @code{TeX-engine} to @samp{uptex}: + +@example +%%% Local Variables: +%%% mode: japanese-latex +%%% TeX-engine: uptex +%%% End: +@end example +@end enumerate + +In the both cases above, the valid value is one of @samp{ptex}, +@samp{jtex} and @samp{uptex}. + +You can override the command names associated with the above three +engines or define your own engine by customizing +@code{TeX-engine-alist}. @xref{Processor Options}. + +It is sometimes necessary to use an engine which differs from the one +@AUCTeX{} selects automatically. For example, even when you want to use +@code{j-article} document class deliberately with ASCII p@LaTeX{}, +@AUCTeX{} selects NTT j@LaTeX{} command if @code{TeX-parse-self} is +enabled, because @code{j-article} originally belongs to NTT j@LaTeX{}. +In such cases, use the file local variable method above to select the +engine you intend to use. + +If you usually use @AUCTeX{} in Japanese, setting the following +variables is useful. + +@defopt TeX-default-mode +Mode to enter for a new file when it cannot be determined whether the +file is plain @TeX{} or @LaTeX{} or what. + +If you want to enter Japanese @LaTeX{} mode whenever this may happen, +set the variable like this: +@lisp +(setq TeX-default-mode 'japanese-latex-mode) +@end lisp +@end defopt + +@defopt japanese-LaTeX-default-style +The default style/class when creating a new Japanese @LaTeX{} document. + +The default value is @samp{"jarticle"}. +@end defopt + +It is recommended also for Japanese users to customize the option +@code{TeX-PDF-from-DVI} to @samp{"Dvipdfmx"}. @xref{Processor Options}. + +There are three customize options with regard to the encoding of +Japanese text. + +@defopt japanese-TeX-use-kanji-opt-flag +If non-nil, @AUCTeX{} adds @option{-kanji} option to the typesetting +command when @code{TeX-engine} is @samp{ptex}. +@end defopt + +Usually @AUCTeX{} guesses the right coding systems for input to and +output from the Japanese @TeX{} process, but you can override them by +the following two customize options. + +@defopt TeX-japanese-process-input-coding-system +If non-nil, used for encoding input to Japanese @TeX{} process. +When @code{nil}, @AUCTeX{} tries to choose suitable coding system. +@end defopt + +@defopt TeX-japanese-process-output-coding-system +If non-nil, used for decoding output from Japanese @TeX{} process. +When @code{nil}, @AUCTeX{} tries to choose suitable coding system. +@end defopt + +The former customize options @code{japanese-TeX-command-default}, +@code{japanese-LaTeX-command-default} and +@code{japanese-TeX-command-list} are removed from @AUCTeX{}. Use +@code{japanese-TeX-engine-default} instead. If you need to customize +the executable file name such as @samp{"latex"}, the options for them, +or both, customize @code{TeX-engine-alist}. + +The following two additional font commands are available in +@LaTeX{} mode buffer. + +@table @kbd +@item C-c C-f g +@kindex C-c C-f g +@cindex @code{\textgt} +@cindex @code{\mathgt} +Insert @b{gothic font} command @samp{\textgt@{@point{}@}} or +@samp{\mathgt@{@point{}@}} depending on the context. + +@item C-c C-f m +@kindex C-c C-f m +@cindex @code{\textmc} +@cindex @code{\mathmc} +Insert mincho font command @samp{\textmc@{@point{}@}} or +@samp{\mathmc@{@point{}@}} depending on the context. + +@end table + +Although they are meaningful only with @samp{ptex} and @samp{uptex} +engines, it won't matter in buffers with other engines. + +See @file{tex-jp.el} for more information. + +@node Automatic +@section Automatic Customization +@cindex Automatic Customization +@cindex Extracting @TeX{} symbols +@cindex Automatic +@cindex @file{auto} directories. +@cindex Parsing @TeX{} +@cindex @TeX{} parsing +@cindex Generating symbols + +Since @AUCTeX{} is so highly customizable, it makes sense that it is able +to customize itself. The automatic customization consists of scanning +@TeX{} files and extracting symbols, environments, and things like that. + +The automatic customization is done on three different levels. The +global level is the level shared by all users at your site, and consists +of scanning the standard @TeX{} style files, and any extra styles added +locally for all users on the site. The private level deals with those +style files you have written for your own use, and use in different +documents. You may have a @file{~/lib/TeX/} directory where you store +useful style files for your own use. The local level is for a specific +directory, and deals with writing customization for the files for your +normal @TeX{} documents. + +If compared with the environment variable @env{TEXINPUTS}, the +global level corresponds to the directories built into @TeX{}. The +private level corresponds to the directories you add yourself, except for +@file{.}, which is the local level. + +@menu +* Automatic Global:: Automatic Customization for the Site +* Automatic Private:: Automatic Customization for a User +* Automatic Local:: Automatic Customization for a Directory +@end menu + +By default @AUCTeX{} will search for customization files in all the +global, private, and local style directories, but you can also set the +path directly. This is useful if you for example want to add another +person's style hooks to your path. Please note that all matching files +found in @code{TeX-style-path} are loaded, and all hooks defined in the +files will be executed. + +@defopt TeX-style-path +List of directories to search for @AUCTeX{} style files. +@end defopt + +By default, when @AUCTeX{} searches a directory for files, it will +recursively search through subdirectories. + +@defopt TeX-file-recurse +Whether to search @TeX{} directories recursively: nil means do not +recurse, a positive integer means go that far deep in the directory +hierarchy, t means recurse indefinitely. +@end defopt + +By default, @AUCTeX{} will ignore files named @file{.}, @file{..}, +@file{SCCS}, @file{RCS}, and @file{CVS}. + +@defopt TeX-ignore-file +Regular expression matching file names to ignore. + +These files or directories will not be considered when searching for +@TeX{} files in a directory. +@end defopt + +@node Automatic Global +@subsection Automatic Customization for the Site +@cindex Global style hook directory +@cindex Global macro directory +@cindex Site macro directory +@cindex Global @TeX{} macro directory +@cindex Site @TeX{} macro directory +@cindex Global directories +@cindex Site information + +Assuming that the automatic customization at the global level was done +when @AUCTeX{} was installed, your choice is now: will you use it? If +you use it, you will benefit by having access to all the symbols and +environments available for completion purposes. The drawback is slower +load time when you edit a new file and perhaps too many confusing +symbols when you try to do a completion. + +You can disable the automatic generated global style hooks by setting +the variable @code{TeX-auto-global} to nil. + +@defopt TeX-macro-global +Directories containing the site's @TeX{} style files. +@end defopt + +@defopt TeX-style-global +Directory containing hand generated @TeX{} information. + +These correspond to @TeX{} macros shared by all users of a site. +@end defopt + +@defopt TeX-auto-global +Directory containing automatically generated information. + +For storing automatic extracted information about the @TeX{} macros +shared by all users of a site. +@end defopt + +@node Automatic Private +@subsection Automatic Customization for a User +@cindex Private style hook directory +@cindex Private macro directory +@cindex Personal macro directory +@cindex Private @TeX{} macro directory +@cindex Personal @TeX{} macro directory +@cindex Private directories +@cindex Personal information + +You should specify where you store your private @TeX{} macros, so +@AUCTeX{} can extract their information. The extracted information will +go to the directories listed in @code{TeX-auto-private} + +Use @kbd{M-x TeX-auto-generate @key{RET}} to extract the information. + +@defopt TeX-macro-private +Directories where you store your personal @TeX{} macros. The value +defaults to the directories listed in the @env{TEXINPUTS} and +@env{BIBINPUTS} environment variables or to the respective directories +in @code{$TEXMFHOME} of @command{kpsewhich} setting if no results can be obtained from the environment +variables. +@end defopt + +@defopt TeX-auto-private +List of directories containing automatically generated @AUCTeX{} style +files. These correspond to the personal @TeX{} macros. +@end defopt + +@deffn Command TeX-auto-generate @var{tex} @var{auto} +(@kbd{M-x TeX-auto-generate @key{RET}}) Generate style hook for +@var{tex} and store it in @var{auto}. If @var{tex} is a directory, +generate style hooks for all files in the directory. +@end deffn + +@defopt TeX-style-private +List of directories containing hand generated @AUCTeX{} style files. +These correspond to the personal @TeX{} macros. +@end defopt + +@node Automatic Local +@subsection Automatic Customization for a Directory +@cindex Local style hooks +@cindex Updating style hooks +@cindex Automatic updating style hooks +@cindex Local style hooks +@cindex Local style directory + +@AUCTeX{} can update the style information about a file each time you +save it, and it will do this if the directory @code{TeX-auto-local} +exists. @code{TeX-auto-local} is by default set to @samp{"auto"}, so +simply creating an @file{auto} directory will enable automatic saving of +style information. + +The advantage of doing this is that macros, labels, etc.@: defined in any +file in a multifile document will be known in all the files in the +document. The disadvantage is that saving will be slower. To disable, +set @code{TeX-auto-local} to nil. + +@defopt TeX-style-local +Directory containing hand generated @TeX{} information. + +These correspond to @TeX{} macros found in the current directory. +@end defopt + +@defopt TeX-auto-local +Directory containing automatically generated @TeX{} information. + +These correspond to @TeX{} macros found in the current directory. +@end defopt + +@node Style Files +@section Writing Your Own Style Support +@cindex Style files +@cindex Style hooks +@cindex @file{style} + +@xref{Automatic}, for a discussion about automatically generated global, +private, and local style files. The hand generated style files are +equivalent, except that they by default are found in @file{style} +directories instead of @file{auto} directories. + +@menu +* Simple Style:: A Simple Style File +* Adding Macros:: Adding Support for Macros +* Adding Environments:: Adding Support for Environments +* Adding Other:: Adding or Examining Other Information +* Hacking the Parser:: Automatic Extraction of New Things +@end menu + +If you write some useful support for a public @TeX{} style file, please +send it to us. + +@node Simple Style +@subsection A Simple Style File +@cindex @file{book.el} +@cindex Sample style file +@cindex Style file +@cindex Example of a style file. +@cindex Style hook +@cindex Adding a style hook + +Here is a simple example of a style file. + +@lisp +;;; book.el - Special code for book style. + +(TeX-add-style-hook + "book" + (lambda () + (LaTeX-largest-level-set "part")) + TeX-dialect) +@end lisp + +The example is from the @AUCTeX{} sources and is loaded for any @LaTeX{} +document using the book document class (or style before @LaTeX{}2e). +(Note that the above code is much simplified for explanatory purpose.) +The file specifies that the largest kind of section in such a document +is @samp{part}. The interesting thing to notice is that the style file +defines an (anonymous) function, and adds it to the list of loaded style +hooks by calling @code{TeX-add-style-hook}. + +The first time the user indirectly tries to access some style-specific +information, such as the largest sectioning command available, the style +hooks for all files directly or indirectly read by the current document +are executed. The actual files will only be evaluated once, but the +hooks will be called for each buffer using the style file. + +Note that the basename of the style file and the name of the style hook +should usually be identical. + +@defun TeX-add-style-hook @var{style} @var{hook} &optional @var{dialect-expr} +Add @var{hook} to the list of functions to run when we use the @TeX{} +file @var{style} and the current dialect is one in the set derived from +@var{dialect-expr}. When @var{dialect-expr} is omitted, then @var{hook} +is allowed to be run whatever the current dialect is. + +@var{dialect-expr} may be one of: + +@itemize +@item +A symbol indicating a singleton containing one basic @TeX{} dialect, +this symbol shall be selected among: +@table @code +@item :latex +For all files in @LaTeX{} mode, or any mode derived thereof. +@item :bibtex +For all files in Bib@TeX{} mode, or any mode derived thereof. +@item :texinfo +For all files in Texinfo mode. +@item :plain-tex +For all files in plain-@TeX{} mode, or any mode derived thereof. +@item :context +For all files in @ConTeXt{} mode. +@item :classopt +For class options of @LaTeX{} document. This is provided as +pseudo-dialect for style hooks associated with class options. +@end table +@item +A logical expression like: +@table @code +@item (or @var{dialect-expression1} @dots{} @var{dialect-expression_@var{n}}) +For union of the sets of dialects corresponding to @var{dialect-expression1} +through @var{dialect-expression_@var{n}} +@item (and @var{dialect-expression1} @dots{} @var{dialect-expression_@var{n}}) +For intersection of the sets of dialects corresponding to +@var{dialect-expression1} through @var{dialect-expression_@var{n}} +@item (nor @var{dialect-expression1} @dots{} @var{dialect-expression_@var{n}}) +For complement of the union sets of dialects corresponding to +@var{dialect-expression1} through @var{dialect-expression_@var{n}} +relatively to the set of all supported dialects +@item (not @var{dialect-expr}) +For complement set of dialect corresponding to @var{dialect-expr} +relatively to the set of all supported dialects +@end table +@end itemize + +@end defun + +In case of adding a style hook for @LaTeX{}, when calling function +@code{TeX-add-style-hook} it is thought more futureproof for argument +@var{dialect-expr} to pass constant @code{TeX-dialect} currently +defined to @code{:latex}, rather than passing @code{:latex} directly. + +@defvr Constant TeX-dialect +Default dialect for use with function @code{TeX-add-style-hook} for +argument @var{dialect-expr} when the hook is to be run only on @LaTeX{} +file, or any mode derived thereof. +@end defvr + + +@node Adding Macros +@subsection Adding Support for Macros +@cindex Adding macros +@cindex Macros, adding +@cindex Defining macros in style hooks + +The most common thing to define in a style hook is new symbols (@TeX{} +macros). Most likely along with a description of the arguments to the +function, since the symbol itself can be defined automatically. + +Here are a few examples from @file{latex.el}. + +@lisp +(TeX-add-style-hook + "latex" + (lambda () + (TeX-add-symbols + '("arabic" TeX-arg-counter) + '("label" TeX-arg-define-label) + '("ref" TeX-arg-ref) + '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t) + '("newtheorem" TeX-arg-define-environment + [ TeX-arg-environment "Numbered like" ] + t [ TeX-arg-counter "Within counter" ])))) +@end lisp + +@defun TeX-add-symbols @var{symbol} @dots{} +Add each @var{symbol} to the list of known symbols. +@end defun + +Each argument to @code{TeX-add-symbols} is a list describing one symbol. +The head of the list is the name of the symbol, the remaining elements +describe each argument. + +If there are no additional elements, the symbol will be inserted with +point inside braces. Otherwise, each argument of this function should +match an argument of the @TeX{} macro. What is done depends on the argument +type. + +If a macro is defined multiple times, @AUCTeX{} will choose the one with +the longest definition (i.e.@: the one with the most arguments). + +Thus, to overwrite +@example + '("tref" 1) ; @r{one argument} +@end example +you can specify +@example + '("tref" TeX-arg-ref ignore) ; @r{two arguments} +@end example + +@code{ignore} is a function that does not do anything, so when you +insert a @samp{tref} you will be prompted for a label and no more. + +You can use the following types of specifiers for arguments: + +@table @code +@item string +Use the string as a prompt to prompt for the argument. + +@item number +Insert that many braces, leave point inside the first. 0 and -1 are +special. 0 means that no braces are inserted. -1 means that braces are +inserted around the macro and an active region (e.g.@: @samp{@{\tiny +foo@}}). If there is no active region, no braces are inserted. + +@item nil +Insert empty braces. + +@item t +Insert empty braces, leave point between the braces. + +@item other symbols +Call the symbol as a function. You can define your +own hook, or use one of the predefined argument hooks. + +@item list +If the car is a string, insert it as a prompt and the next +element as initial input. Otherwise, call the car of the list with +the remaining elements as arguments. + +@item vector +Optional argument. If it has more than one element, parse it +as a list, otherwise parse the only element as above. Use square +brackets instead of curly braces, and is not inserted on empty user +input. +@end table + +A lot of argument hooks have already been defined. The first argument to +all hooks is a flag indicating if it is an optional argument. It is up +to the hook to determine what to do with the remaining arguments, if +any. Typically the next argument is used to overwrite the default +prompt. + +@ftable @code +@item TeX-arg-conditional +Implements if @var{expr} @var{then} @var{else}. If @var{expr} evaluates +to true, parse @var{then} as an argument list, else parse @var{else} as an +argument list. + +@item TeX-arg-literal +Insert its arguments into the buffer. Used for specifying extra syntax +for a macro. + +@item TeX-arg-free +Parse its arguments but use no braces when they are inserted. + +@item TeX-arg-eval +Evaluate arguments and insert the result in the buffer. + +@item TeX-arg-label +Prompt for a label completing with known labels. If Ref@TeX{} is +active, prompt for the reference format. + +@item TeX-arg-ref +Prompt for a label completing with known labels. If Ref@TeX{} is +active, do not prompt for the reference format. Usually, reference +macros should use this function instead of @code{TeX-arg-label}. + +@item TeX-arg-index-tag +Prompt for an index tag. This is the name of an index, not the entry. + +@item TeX-arg-index +Prompt for an index entry completing with known entries. + +@item TeX-arg-length +Prompt for a @LaTeX{} length completing with known lengths. + +@item TeX-arg-macro +Prompt for a @TeX{} macro with completion. + +@item TeX-arg-date +@vindex TeX-date-format +Prompt for a date, defaulting to the current date. The format of the +date is specified by the @code{TeX-date-format} option. If you want to +change the format when the @samp{babel} package is loaded with a +specific language, set @code{TeX-date-format} inside the appropriate +language hook (for details @pxref{European}). + +@item TeX-arg-version +Prompt for the version of a file, using as initial input the current +date. + +@item TeX-arg-environment +Prompt for a @LaTeX{} environment with completion. + +@item TeX-arg-cite +@vindex TeX-arg-cite-note-p +Prompt for a Bib@TeX{} citation. If the variable +@code{TeX-arg-cite-note-p} is non-nil, ask also for optional note in citations. + +@item TeX-arg-counter +Prompt for a @LaTeX{} counter completing with known counters. + +@item TeX-arg-savebox +Prompt for a @LaTeX{} savebox completing with known saveboxes. + +@item TeX-arg-file +Prompt for a filename in the current directory, and use it with the +extension. + +@item TeX-arg-file-name +Prompt for a filename and use as initial input the name of the file +being visited in the current buffer, with extension. + +@item TeX-arg-file-name-sans-extension +Prompt for a filename and use as initial input the name of the file +being visited in the current buffer, without extension. + +@item TeX-arg-input-file +@vindex TeX-arg-input-file-search +Prompt for the name of an input file in @TeX{}'s search path, and use it +without the extension. Run the style hooks for the file. (Note that +the behavior (type of prompt and inserted file name) of the function can +be controlled by the variable @code{TeX-arg-input-file-search}.) + +@item TeX-arg-define-label +Prompt for a label completing with known labels. Add label to list of +defined labels. + +@item TeX-arg-define-length +Prompt for a @LaTeX{} length completing with known lengths. Add length +to list of defined lengths. + +@item TeX-arg-define-macro +Prompt for a @TeX{} macro with completion. Add macro to list of defined +macros. + +@item TeX-arg-define-environment +Prompt for a @LaTeX{} environment with completion. Add environment to +list of defined environments. + +@item TeX-arg-define-cite +Prompt for a Bib@TeX{} citation. + +@item TeX-arg-define-counter +Prompt for a @LaTeX{} counter. + +@item TeX-arg-define-savebox +Prompt for a @LaTeX{} savebox. + +@item TeX-arg-document +@vindex LaTeX-default-style +@vindex LaTeX-default-options +@vindex TeX-arg-input-file-search +@vindex LaTeX-style-list +Prompt for a @LaTeX{} document class, using @code{LaTeX-default-style} +as default value and @code{LaTeX-default-options} as default list of +options. If the variable @code{TeX-arg-input-file-search} is t, you +will be able to complete with all @LaTeX{} classes available on your +system, otherwise classes listed in the variable @code{LaTeX-style-list} +will be used for completion. It is also provided completion for options +of many common classes. + +@item LaTeX-arg-usepackage +@vindex TeX-arg-input-file-search +Prompt for @LaTeX{} packages. If the variable +@code{TeX-arg-input-file-search} is t, you will be able to complete with +all @LaTeX{} packages available on your system. It is also provided +completion for options of many common packages. + +@item TeX-arg-bibstyle +Prompt for a Bib@TeX{} style file completing with all style available on +your system. + +@item TeX-arg-bibliography +Prompt for Bib@TeX{} database files completing with all databases available +on your system. + +@item TeX-arg-corner +Prompt for a @LaTeX{} side or corner position with completion. + +@item TeX-arg-lr +Prompt for a @LaTeX{} side with completion. + +@item TeX-arg-tb +Prompt for a @LaTeX{} side with completion. + +@item TeX-arg-pagestyle +Prompt for a @LaTeX{} pagestyle with completion. + +@item TeX-arg-verb +Prompt for delimiter and text. + +@item TeX-arg-verb-delim-or-brace +Prompt for delimiter and text. This function is similar to +@code{TeX-arg-verb}, but is intended for macros which take their +argument enclosed in delimiters or in braces. + +@item TeX-arg-pair +Insert a pair of numbers, use arguments for prompt. The numbers are +surrounded by parentheses and separated with a comma. + +@item TeX-arg-size +Insert width and height as a pair. No arguments. + +@item TeX-arg-coordinate +Insert x and y coordinates as a pair. No arguments. + +@item LaTeX-arg-author +@vindex LaTeX-default-author +Prompt for document author, using @code{LaTeX-default-author} as initial +input. + +@item TeX-read-hook +Prompt for a @LaTeX{} hook and return it. + +@item TeX-arg-hook +Prompt for a @LaTeX{} hook and insert it as a @TeX{} macro argument. + +@item TeX-read-key-val +Prompt for a @samp{key=value} list of options and return them. + +@item TeX-arg-key-val +Prompt for a @samp{key=value} list of options and insert it as a @TeX{} +macro argument. +@end ftable + +If you add new hooks, you can assume that point is placed directly after +the previous argument, or after the macro name if this is the first +argument. Please leave point located after the argument you are +inserting. If you want point to be located somewhere else after all +hooks have been processed, set the value of @code{TeX-exit-mark}. It +will point nowhere, until the argument hook sets it. + +Some packages provide macros that are rarely useful to non-expert users. +Those should be marked as expert macros using +@code{TeX-declare-expert-macros}. + +@defun TeX-declare-expert-macros @var{style} @var{macros}... +Declare @var{macros} as expert macros of @var{style}. + +Expert macros are completed depending on @code{TeX-complete-expert-commands}. +@end defun + + +@node Adding Environments +@subsection Adding Support for Environments +@cindex Adding environments +@cindex Environments, adding +@cindex Defining environments in style hooks + +Adding support for environments is very much like adding support for +@TeX{} macros, except that each environment normally only takes one +argument, an environment hook. The example is again a short version of +@file{latex.el}. + +@lisp +(TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("document" LaTeX-env-document) + '("enumerate" LaTeX-env-item) + '("itemize" LaTeX-env-item) + '("list" LaTeX-env-list)))) +@end lisp + +It is completely up to the environment hook to insert the environment, +but the function @code{LaTeX-insert-environment} may be of some help. +The hook will be called with the name of the environment as its first +argument, and extra arguments can be provided by adding them to a list +after the hook. + +For simple environments with arguments, for example defined with +@samp{\newenvironment}, you can make @AUCTeX{} prompt for the arguments +by giving the prompt strings in the call to +@code{LaTeX-add-environments}. The fact that an argument is optional +can be indicated by wrapping the prompt string in a vector. + +For example, if you have defined a @code{loop} environment with the +three arguments @var{from}, @var{to}, and @var{step}, you can add +support for them in a style file. + +@example +%% loop.sty + +\newenvironment@{loop@}[3]@{...@}@{...@} +@end example + +@lisp +;; loop.el + +(TeX-add-style-hook + "loop" + (lambda () + (LaTeX-add-environments + '("loop" "From" "To" "Step")))) +@end lisp + +If an environment is defined multiple times, @AUCTeX{} will choose the +one with the longest definition. Thus, if you have an enumerate style +file, and want it to replace the standard @LaTeX{} enumerate hook above, +you could define an @file{enumerate.el} file as follows, and place it in +the appropriate style directory. + +@lisp +(TeX-add-style-hook + "latex" + (lambda () + (LaTeX-add-environments + '("enumerate" LaTeX-env-enumerate foo)))) + +(defun LaTeX-env-enumerate (environment &optional _ignore) ...) +@end lisp + +The symbol @code{foo} will be passed to @code{LaTeX-env-enumerate} as +the second argument, but since we only added it to overwrite the +definition in @file{latex.el} it is just ignored. + +@defun LaTeX-add-environments @var{env} @dots{} +Add each @var{env} to list of loaded environments. +@end defun + +@defun LaTeX-insert-environment @var{env} [ @var{extra} ] +Insert environment of type @var{env}, with optional argument @var{extra}. +@end defun + +Following is a list of available hooks for +@code{LaTeX-add-environments}: + +@ftable @code +@item LaTeX-env-item +Insert the given environment and the first item. + +@item LaTeX-env-figure +Insert the given figure-like environment with a caption and a label. + +@item LaTeX-env-array +Insert the given array-like environment with position and column +specifications. + +@item LaTeX-env-label +Insert the given environment with a label. + +@item LaTeX-env-list +Insert the given list-like environment, a specifier for the label and +the first item. + +@item LaTeX-env-minipage +Insert the given minipage-like environment with position and width +specifications. + +@item LaTeX-env-tabular* +Insert the given tabular*-like environment with width, position and +column specifications. + +@item LaTeX-env-picture +Insert the given environment with width and height specifications. + +@item LaTeX-env-bib +Insert the given environment with a label for a bibitem. + +@item LaTeX-env-contents +Insert the given environment with a filename as its argument. + +@item LaTeX-env-args +Insert the given environment with arguments. You can use this as a hook +in case you want to specify multiple complex arguments just like in +elements of @code{TeX-add-symbols}. This is most useful if the +specification of arguments to be prompted for with strings and strings +wrapped in a vector as described above is too limited. + +Here is an example from @file{listings.el} which calls a function with +one argument in order to prompt for a @samp{key=value} list to be inserted as +an optional argument of the @samp{lstlisting} environment: + +@lisp +(LaTeX-add-environments + '("lstlisting" LaTeX-env-args + [TeX-arg-key-val LaTeX-listings-key-val-options])) +@end lisp +@end ftable + +Some packages provide environments that are rarely useful to non-expert +users. Those should be marked as expert environments using +@code{LaTeX-declare-expert-environments}. + +@defun LaTeX-declare-expert-environments @var{style} @var{environments}... +Declare @var{environments} as expert environments of @var{style}. + +Expert environments are completed depending on @code{TeX-complete-expert-commands}. +@end defun + + +@node Adding Other +@subsection Adding or Examining Other Information +@cindex Adding bibliographies +@cindex Bibliographies, adding +@cindex Examining package/class options +@cindex package/class options, Examining +@cindex Adding support for completion of package/class options +@cindex support for completion of package/class options, Adding +@cindex Viewer predicates +@cindex Defining bibliographies in style hooks +@cindex Adding labels +@cindex Labels, adding +@cindex Defining labels in style hooks +@cindex Adding other information +@cindex Other information, adding +@cindex Defining other information in style hooks + +@subsubsection Adding bibliographies in style hooks + +You can also specify bibliographical databases and labels in the style +file. This is probably of little use, since this information will +usually be automatically generated from the @TeX{} file anyway. + +@defun LaTeX-add-bibliographies @var{bibliography} @dots{} +Add each @var{bibliography} to list of loaded bibliographies. +@end defun + +@defun LaTeX-add-labels @var{label} @dots{} +Add each @var{label} to the list of known labels. +@end defun + +@subsubsection Examining Package/Class Options + +In @LaTeX{} documents, style hooks can find the package names and those +options given as optional argument(s) of @samp{\usepackage} in +@code{LaTeX-provided-package-options}. + +@defvar LaTeX-provided-package-options +Buffer local variable holding alist of options provided to @LaTeX{} +packages. Each element is a cons cell @code{(@var{package} +. @var{option-list})}. For example, its value will be +@lisp + (("babel" . ("german")) + ("geometry" . ("a4paper" "top=2cm" "left=2.5cm" "right=2.5cm")) + ...) +@end lisp +@end defvar + +You can examine whether there is a specific package-option pair by +@code{LaTeX-provided-package-options-member}. + +@defun LaTeX-provided-package-options-member @var{package} @var{option} +Return non-@code{nil} if @var{option} has been given to @var{package}. +The value is actually the tail of the list of options given to +@var{package}. +@end defun + +There are similar facilities for class names and those options given in +@code{\documentclass} declaration. + +@defvar LaTeX-provided-class-options +Buffer local variable holding alist of options provided to @LaTeX{} +classes. Each element is a cons cell @code{(@var{class} +. @var{option-list})}. For example, its value will be +@lisp + (("book" . ("a4paper" "11pt" "openany" "fleqn")) + ...) +@end lisp +@end defvar + +@defun LaTeX-provided-class-options-member @var{class} @var{option} +Return non-@code{nil} if @var{option} has been given to @var{class}. The +value is actually the tail of the list of options given to @var{class}. +@end defun + +@defun LaTeX-match-class-option @var{regexp} +Check if a documentclass option matching @var{regexp} is active. Return +first found class option matching @var{regexp}, or nil if not found. +@end defun + +These functions are also useful to implement customized predicate(s) in +@code{TeX-view-predicate-list}. @xref{Starting Viewers}. + +@subsubsection Adding Support for Option Completion +When the user inserts @samp{\usepackage} by @kbd{C-c C-m}, @AUCTeX{} asks +for the optional arguments after the package name is given. The style +file of that package can provide completion support for the optional +arguments. + +@defvar LaTeX-@var{packagename}-package-options +List of optional arguments available for the package. +@end defvar + +Here is an excerption from @samp{acronym.el}: +@lisp +(defvar LaTeX-acronym-package-options + '("footnote" "nohyperlinks" "printonlyused" "withpage" + "smaller" "dua" "nolist") + "Package options for the acronym package.") +@end lisp + +When the package accepts key-value style optional arguments, more +sophisticated completion support is needed. The package style file can +provide dynamic completion support by custom elisp function. + +@defun LaTeX-@var{packagename}-package-options +This function should ask the user for optional arguments and return them +as a string, instead of built-in option query facility. When this function +is defined, @AUCTeX{} calls it with no argument. +@end defun + +Here is an excerption from @samp{acro.el}: +@lisp +(defun LaTeX-acro-package-options () + "Prompt for package options for the acro package." + (TeX-read-key-val t LaTeX-acro-package-options-list)) +@end lisp + +As you can see in the above example, a utility function +@code{TeX-read-key-val} is available to read key-value pair(s) from users. + +Note that @code{defvar} or @code{defun} of +@code{LaTeX-@var{packagename}-package-options} should be at the top level +of the style file and not inside the style hook, because the style hook is +not yet called when the user inputs the optional arguments in response to +@kbd{C-c C-m}. + +There are similar facilities for class options. When the user inserts +@samp{\documentclass} by @kbd{C-c C-e}, the respective class style file +can provide completion support for the optional arguments. + +@defvar LaTeX-@var{classname}-class-options +List of optional arguments available for the class. +@end defvar + +@defun LaTeX-@var{classname}-class-options +Which see. +@end defun + +@node Hacking the Parser +@subsection Automatic Extraction of New Things +@cindex Parsing new macros +@cindex @file{macro.tex} +@cindex @file{macro.el} +@cindex Changing the parser + +The automatic @TeX{} information extractor works by searching for +regular expressions in the @TeX{} files, and storing the matched +information. You can add support for new constructs to the parser, +something that is needed when you add new commands to define symbols. + +For example, in the file @file{macro.tex} I define the following macro. + +@example +\newcommand@{\newmacro@}[5]@{% +\def#1@{#3\index@{#4@@#5~cite@{#4@}@}\nocite@{#4@}@}% +\def#2@{#5\index@{#4@@#5~cite@{#4@}@}\nocite@{#4@}@}% +@} +@end example + +@AUCTeX{} will automatically figure out that @samp{newmacro} is a macro +that takes five arguments. However, it is not smart enough to +automatically see that each time we use the macro, two new macros are +defined. We can specify this information in a style hook file. + +@lisp +;;; macro.el --- Special code for my own macro file. + +;;; Code: + +(defvar TeX-newmacro-regexp + '("\\\\newmacro@{\\\\\\([a-zA-Z]+\\)@}@{\\\\\\([a-zA-Z]+\\)@}" + (1 2) TeX-auto-multi) + "Matches \\newmacro definitions.") + +(defvar TeX-auto-multi nil + "Temporary for parsing \\newmacro definitions.") + +(defun TeX-macro-cleanup () + "Move symbols from `TeX-auto-multi' to `TeX-auto-symbol'." + (mapc (lambda (list) + (mapc (lambda (symbol) + (setq TeX-auto-symbol + (cons symbol TeX-auto-symbol))) + list)) + TeX-auto-multi)) + +(defun TeX-macro-prepare () + "Clear `Tex-auto-multi' before use." + (setq TeX-auto-multi nil)) + +(add-hook 'TeX-auto-prepare-hook #'TeX-macro-prepare) +(add-hook 'TeX-auto-cleanup-hook #'TeX-macro-cleanup) + +(TeX-add-style-hook + "macro" + (lambda () + (TeX-auto-add-regexp TeX-newmacro-regexp) + (TeX-add-symbols '("newmacro" + TeX-arg-macro + (TeX-arg-macro "Capitalized macro: \\") + t + "BibTeX entry: " + nil)))) + +;;; macro.el ends here +@end lisp + +When this file is first loaded, it adds a new entry to +@code{TeX-newmacro-regexp}, and defines a function to be called before +the parsing starts, and one to be called after the parsing is done. It +also declares a variable to contain the data collected during parsing. +Finally, it adds a style hook which describes the @samp{newmacro} macro, +as we have seen it before. + +So the general strategy is: Add a new entry to @code{TeX-newmacro-regexp}. +Declare a variable to contain intermediate data during parsing. Add hook +to be called before and after parsing. In this case, the hook before +parsing just initializes the variable, and the hook after parsing +collects the data from the variable, and adds them to the list of symbols +found. + +@defvar TeX-auto-regexp-list +List of regular expressions matching @TeX{} macro definitions. + +The list has the following format ((@var{regexp} @var{match} @var{table}) @dots{}), that +is, each entry is a list with three elements. + +@var{regexp}. Regular expression matching the macro we want to parse. + +@var{match}. A number or list of numbers, each representing one +parenthesized subexpression matched by @var{regexp}. + +@var{table}. The symbol table to store the data. This can be a function, in +which case the function is called with the argument @var{match}. Use +@code{TeX-match-buffer} to get match data. If it is not a function, it +is presumed to be the name of a variable containing a list of match +data. The matched data (a string if @var{match} is a number, a list of +strings if @var{match} is a list of numbers) is put in front of the table. +@end defvar + +@defvar TeX-auto-prepare-hook nil +List of functions to be called before parsing a @TeX{} file. +@end defvar + +@defvar TeX-auto-cleanup-hook nil +List of functions to be called after parsing a @TeX{} file. +@end defvar + +@node Appendices +@appendix Copying, Changes, Development, FAQ, Texinfo Mode + +@menu +* Copying this Manual:: +* Changes:: +* Development:: +* FAQ:: +* Texinfo mode:: +@end menu + +@node Copying this Manual +@appendixsec Copying this Manual + +@ifinfo +The copyright notice for this manual is: + +@insertcopying +@end ifinfo + +The full license text can be read here: + +@menu +* GNU Free Documentation License:: License for copying this manual. +@end menu + +@lowersections +@include fdl.texi +@raisesections + +@node Changes +@appendixsec Changes and New Features + +@lowersections +@include changes.texi +@raisesections + +@subheading Older versions +See the file @file{history.texi} for older changes. + +@node Development +@appendixsec Future Development + +@lowersections +@include todo.texi +@raisesections + +@node FAQ +@appendixsec Frequently Asked Questions + +@lowersections +@include faq.texi +@raisesections + +@node Texinfo mode +@appendixsec Features specific to @AUCTeX{}'s Texinfo major mode + +@AUCTeX{} includes a major mode for editting Texinfo files. This major +mode is not the same mode as the native Texinfo mode (@pxref{Texinfo Mode,,, +texinfo,Texinfo}) of Emacs, although they have the same name. However, +@AUCTeX{} still relies on a number of functions from the native Texinfo +mode. + +The following text describes which functionality is offered by @AUCTeX{} +and which by the native Texinfo mode. This should enable you to decide +when to consult the @AUCTeX{} manual and when the manual of the native +mode. And in case you are a seasoned user of the native mode, the +information should help you to swiftly get to know the +@AUCTeX{}-specific commands. + +@menu +* Exploiting:: How @AUCTeX{} and the native mode work together +* Superseding:: Where the native mode is superseded +* Mapping:: Where key bindings are mapped to the native mode +* Unbinding:: Which native mode key bindings are missing +@end menu + +@node Exploiting +@appendixsubsec How @AUCTeX{} and the native mode work together + +In a nutshell the split between @AUCTeX{} Texinfo mode, and native +Texinfo mode is as follows: + +@itemize +@item +Most of the editing (environment creation, commenting, font command +insertions) and/or processing commands (e.g.@: compiling or printing) +which are available in other @AUCTeX{} modes are also handled by +@AUCTeX{} in Texinfo mode. + +@item +Texinfo-related features (e.g.@: info node linkage or menu creation) rely +on the commands provided by the native Texinfo mode. @AUCTeX{} provides +the key bindings to reach these functions, keeping the same keys as in +native Texinfo whenever possible, or similar ones otherwise. +@end itemize + +@node Superseding +@appendixsubsec Where the native mode is superseded + +This section is directed to users of the native Texinfo mode switching +to @AUCTeX{}. It follows the summary of the native mode +(@pxref{Texinfo Mode Summary,,,texinfo,Texinfo}) and lists which of its commands +are no longer of use. + +@table @asis +@item Insert commands +In the native Texinfo mode, frequently used Texinfo commands can be +inserted with key bindings of the form @kbd{C-c C-c @var{k}} where +@var{k} differs for each Texinfo command; @kbd{c} inserts @code{@@code}, +@kbd{d} inserts @code{@@dfn}, @kbd{k} @code{@@kbd}, etc. + +In @AUCTeX{} commands are inserted with the key binding @kbd{C-c C-m} +instead which prompts for the macro to be inserted. For font selection +commands (like @code{@@b}, @code{@@i}, or @code{@@emph}) and a few related ones (like @code{@@var}, +@code{@@key} or @code{@@code}) there are bindings which insert the respective macros +directly. They have the form @kbd{C-c C-f @var{k}} or @kbd{C-c C-f +C-@var{k}} and call the function @code{TeX-font}. Type @kbd{C-c C-f +@key{RET}} to get a list of supported commands. + +Note that the prefix argument is not handled the same way by @AUCTeX{}. +Note also that the node insertion command from the native mode +(@code{texinfo-insert-@@node}) can still accessed from the Texinfo menu +in @AUCTeX{}. + +@item Insert braces +In @AUCTeX{} braces can be inserted with the same key binding as in the +native Texinfo mode: @kbd{C-c @{}. But @AUCTeX{} uses its own function +for the feature: @code{TeX-insert-braces}. + +@item Insert environments +The native Texinfo mode does not insert full environments. Instead, it +provides the function @code{texinfo-insert-@@end} (mapped to @kbd{C-c +C-c e}) for closing an open environment with a matching @code{@@end} statement. + +In @AUCTeX{} you can insert full environments, i.e.@: both the opening and +closing statements, with the function @code{Texinfo-environment} (mapped +to @kbd{C-c C-e}). + +@item Format info files with makeinfo and @TeX{} +In the native Texinfo mode there are various functions and bindings to +format a region or the whole buffer for info or to typeset the +respective text. For example, there is @code{makeinfo-buffer} (mapped +to @kbd{C-c C-m C-b}) which runs @samp{makeinfo} on the buffer or there +is @code{texinfo-tex-buffer} (mapped to @kbd{C-c C-t C-b}) which runs +@TeX{} on the buffer in order to produce a @acronym{DVI} file. + +In @AUCTeX{} different commands for formatting or typesetting can be +invoked through the function @code{TeX-command-master} (mapped to +@kbd{C-c C-c}). After typing @kbd{C-c C-c}, you can select the desired +command, e.g @samp{Makeinfo} or @samp{TeX}, through a prompt in the mini +buffer. Note that you can make, say @samp{Makeinfo}, the default by +adding this statement in your init file: + +@lisp +(add-hook 'Texinfo-mode-hook + (lambda () (setq TeX-command-default "Makeinfo"))) +@end lisp + +Note also that @kbd{C-c C-c Makeinfo @key{RET}} is not completely +functionally equivalent to @code{makeinfo-buffer} as the latter will +display the resulting info file in Emacs, showing the node corresponding +to the position in the source file, just after a successful compilation. +This is why, while using @AUCTeX{}, invoking @code{makeinfo-buffer} +might still be more convenient. + +Note also that in the case of a multifile document, @kbd{C-c C-c} in +@AUCTeX{} will work on the whole document (provided that the file +variable @code{TeX-master} is set correctly), while +@code{makeinfo-buffer} in the native mode will process only the current +buffer, provided at the @code{@@setfilename} statement is provided. + +@item Produce indexes and print +The native Texinfo mode provides the binding @kbd{C-c C-t C-i} +(@code{texinfo-texindex}) for producing an index and the bindings +@kbd{C-c C-t C-p} (@code{texinfo-tex-print}) and @kbd{C-c C-t C-q} +(@code{tex-show-print-queue}) for printing and showing the printer +queue. These are superseded by the respective commands available +through @kbd{C-c C-c} (@code{TeX-command-master}) in @AUCTeX{}: @samp{Texindex}, +@samp{Print}, and @samp{Queue}. + +@item Kill jobs +The command @kbd{C-c C-t C-k} (@code{tex-kill-job}) in the native mode +is superseded by @kbd{C-c C-k} (@code{TeX-kill-job}) in @AUCTeX{}. +@end table + +@node Mapping +@appendixsubsec Where key bindings are mapped to the native mode + +This node follows the native Texinfo mode summary (@pxref{Texinfo Mode +Summary,,,texinfo,Texinfo}) and lists only those commands to which @AUCTeX{} +provides a keybinding. + +Basically all commands of the native mode related to producing menus and +interlinking nodes are mapped to same or similar keys in @AUCTeX{}, +while a few insertion commands are mapped to @AUCTeX{}-like keys. + +@table @asis + +@item @code{@@item} insertion +The binding @kbd{C-c C-c i} for the insertion of @code{@@item} in the +native mode is mapped to @kbd{M-@key{RET}} or @kbd{C-c C-j} in +@AUCTeX{}, similar to other @AUCTeX{} modes. + +@item @code{@@end} insertion +The binding @kbd{C-c C-c e} for closing a @code{@@@var{foo}} command by +a corresponding @code{@@end @var{foo}} statement in the native mode is +mapped to @kbd{C-c ]} in @AUCTeX{}, similar to other @AUCTeX{} modes. + +@item Move out of balanced braces +The binding @kbd{C-c @}} (@code{up-list}) is available both in the native +mode and in @AUCTeX{}. (This is because the command is not implemented +in either mode but a native Emacs command.) However, in @AUCTeX{}, you +cannot use @kbd{C-c ]} for this, as it is used for @code{@@end} insertion. + +@item Update pointers +The bindings @kbd{C-c C-u C-n} (@code{texinfo-update-node}) and @kbd{C-c +C-u C-e} (@code{texinfo-every-node-update}) from the native mode are +available in @AUCTeX{} as well. + +@item Update menus +The bindings @kbd{C-c C-u m} (@code{texinfo-master-menu}), @kbd{C-c C-u +C-m} (@code{texinfo-make-menu}), and @kbd{C-c C-u C-a} +(@code{texinfo-all-menus-update}) from the native mode are available in +@AUCTeX{} as well. The command @code{texinfo-start-menu-description}, +bound to @kbd{C-c C-c C-d} in the native mode, is bound to @kbd{C-c C-u +C-d} in @AUCTeX{} instead. +@end table + +@node Unbinding +@appendixsubsec Which native mode key bindings are missing + +The following commands from the native commands might still be useful +when working with @AUCTeX{}, however, they are not accessible with a +key binding any longer. + +@table @asis +@item @code{@@node} insertion +The node insertion command, mapped to @kbd{C-c C-c n} in the native +mode, is not mapped to any key in @AUCTeX{}. You can still access it +through the Texinfo menu, though. Another alternative is to use the +@kbd{C-c C-m} binding for macro insertion in @AUCTeX{}. + +@item Show the section structure +The command @code{texinfo-show-structure} (@kbd{C-c C-s}) from the +native mode does not have a key binding in @AUCTeX{}. The binding is +used by @AUCTeX{} for sectioning. +@end table + +@node Indices +@unnumbered Indices + +@menu +* Key Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: +@end menu + +@node Key Index +@unnumberedsec Key Index + +@printindex ky + +@node Function Index +@unnumberedsec Function Index + +@printindex fn + +@node Variable Index +@unnumberedsec Variable Index + +@printindex vr + +@node Concept Index +@unnumberedsec Concept Index + +@printindex cp + +@bye + +@c Local Variables: +@c mode: texinfo +@c coding: utf-8 +@c TeX-master: t +@c End: diff --git a/elpa/auctex-13.1.3/doc/changes.texi b/elpa/auctex-13.1.3/doc/changes.texi new file mode 100644 index 0000000..b8c70ba --- /dev/null +++ b/elpa/auctex-13.1.3/doc/changes.texi @@ -0,0 +1,1694 @@ +@c This is part of the AUCTeX manual. +@c Copyright (C) 1994-2002, 2004-2010, 2012-2022 Free Software +@c Foundation, Inc. +@c See file auctex.texi for copying conditions. +@include macros.texi +@ifset rawfile +@chapheading Changes and New Features in @AUCTeX{} + +@end ifset + +@heading News since last release + +@itemize @bullet +@item +@AUCTeX{} now requires GNU Emacs 25.1 or higher. + +@item +@AUCTeX{} tracks the change in Emacs where initial inputs in the +minibuffer during queries are getting phased out. Queries for the +mandatory arguments of macros and environments are adjusted where +applicable. The value which will be used after hitting @kbd{RET} without +other input is shown in the prompt in parentheses prefixed with +@samp{default}. For this change the signature of the function +@code{TeX-arg-length} is altered. The old argument list was: +@lisp +(defun TeX-arg-length (optional &optional prompt + initial-input definition default) +@end lisp + +whereas the new one is: +@lisp +(defun TeX-arg-length (optional &optional prompt + default initial-input definition) +@end lisp + +Note the position change of @code{DEFAULT}. + +@item +Indenting of conditionals is improved. Code inside constructs like +@samp{\ifx . \else . \fi} is correctly indented. An interface for style +files is also introduced which can add their macros to the indentation +engine. Check the file @file{algpseudocode.el} for an example. + +@item +You can optionally enable indent inside square brackets @samp{[]} by new +user options @code{TeX-indent-open-delimiters} and +@code{TeX-indent-close-delimiters}. +@ifclear rawfile +@xref{Indenting}. +@end ifclear + +@item +Now @file{tex-buf.el} is merged into @file{tex.el} and no longer exists. +If your personal code has @code{(require 'tex-buf)}, one of the following +prescriptions would serve. +@enumerate +@item +Remove @code{(require 'tex-buf)}. +@item +Replace it with @code{(require 'tex)}. +@item +Replace it with @code{(require 'latex)}. +@end enumerate + +@end itemize + +@heading News in 13.1 + +@itemize @bullet +@item +In math environments @samp{gather}, @samp{gather*}, @samp{gathered}, +@samp{multline} and @samp{multline*}, fill commands such as @kbd{M-q} and +@kbd{C-c C-q C-e} are disabled. This sorts out the inconsistency between +those and @samp{equation}, @samp{displaymath} environments, in latter of +which filling is already disabled. + +If you want filling in such environments, customize +@code{LaTeX-indent-environment-list} to remove them. + +Auto fill continues to work in such environment anyway. + +In addition, @AUCTeX{} adds support of alignment at @samp{&} sign in +@samp{align}-like environments such as @samp{alignat}, @samp{aligned} and +so on, as well as @samp{matrix}-like environments such as @samp{pmatrix}, +@samp{bmatrix} and so on. + +@item +Now two commands @samp{Texindex} and @samp{Texi2dvi} are available when +you type @kbd{C-c C-c} in Texinfo mode. The command @samp{Texindex} runs +@command{texindex} on index files and @samp{Texi2dvi} runs +@command{pdftexi2dvi} or @command{texi2dvi} according to the value of +@code{TeX-PDF-mode}. + +So you can typeset Texinfo documents into @acronym{PDF} or @acronym{DVI} +format from within @AUCTeX{}. + +@item +@AUCTeX{}'s own help messages for @LaTeX{} errors are now shown only for +@LaTeX{} runs. @AUCTeX{} shows raw error/warning messages found in +@file{.log} files for runs of formats other than @LaTeX{}, such as plain +@TeX{}, @ConTeXt{} and Texinfo, as it does even for @LaTeX{} runs when it +can't find a matching entry in its own help message catalogue. + +Due to this change, customize option @code{TeX-error-description-list} can +no longer have a fallback entry that matches any error. If your +customized value includes such entry, typically @samp{(".*" . "No help +available")}, please remove it. + +@item +Two functions @code{TeX-split-string} and @code{TeX-assoc} are now +obsolete and will be removed in future release. If your personal code +uses these functions, use @code{split-string} and @code{assoc-string} +instead. + +@item +The function @code{TeX-read-key-val} now accepts a function call as second +argument. This change should help @AUCTeX{} style writers who use +@code{TeX-arg-key-val} and have to deal with dynamic key-values. Example +of usage: +@lisp +(TeX-add-style-hook "foo" + (lambda () + (TeX-add-symbols + '("bar" (TeX-arg-key-val (function-returning-key-val)))))) +@end lisp + +@item +Since @AUCTeX{} 12.2, @kbd{C-x C-w} accidentally disabled the parse on +save in that buffer, even when you enabled @code{TeX-auto-save} option. +This bug was fixed. + +@item +@AUCTeX{} now requires GNU Emacs 24.3 or higher. + +@item +Old implementations for viewers were discarded, as announced long before. +The variables @code{TeX-output-view-style} and @code{TeX-view-style} have +no effect now. The former placeholders @samp{%v} and @samp{%vv} in +@code{TeX-command-list} are ignored. + +@item +@AUCTeX{} now uses lexical binding which has been introduced in Emacs +24. This change should have no user-visible effect and require no +manual adaptions except in the following cases. + +@itemize @minus +@item +Entries added to the customization variable @code{TeX-expand-list} also +had access to variables @code{command} and @code{pos}. Those are now +properly declared and named @code{TeX-expand-command} and +@code{TeX-expand-pos}. + +@item +Entries added to the customization variable @code{TeX-expand-list} had +access to a variable @code{file} which was bound to +@code{TeX-active-master}, i.e., it evaluated to either the master or +region file. This usage must be replaced with either +@code{TeX-active-master} or @code{TeX-active-master-with-quotes}. + +@item +Viewer entries in @code{TeX-view-program-list} also had access to a +variable @code{file} which was bound to the name of the master or region +file without extension. Instead, the function @code{TeX-active-master} +has to be used now. + +@item +Macro argument parsing functions could set a variable @code{exit-mark} +to the buffer position where point should be left after all arguments +have been read. This variable is now named @code{TeX-exit-mark}. + +@item +The functions in @code{LaTeX-section-hook} had access or modified the +previously undeclared variables @code{title}, @code{name}, @code{level}, +@code{done-mark}, and @code{toc}. These variables are now properly +declared and have the @samp{LaTeX-} prefix, e.g., +@code{LaTeX-done-mark}. + +@item +The functions in @code{ConTeXt-numbered-section-hook} and +@code{ConTeXt-unnumbered-section-hook} had access or modified the +previously undeclared variables @code{title}, @code{name}, @code{level}, +@code{done-mark}, and @code{reference}. These variables are now +properly declared and have the @samp{ConTeXt-} prefix, e.g., +@code{ConTeXt-title}. + +@item +The functions in @code{TeX-translate-location-hook} could access and +modify the free variables @code{file}, @code{line}, @code{error}, +@code{offset}, @code{context}, and @code{string}. Those are now properly +declared variables with the prefix @samp{TeX-translate-location-}, e.g., +@code{TeX-translate-location-file}. +@end itemize + +@item +The constant @code{LaTeX-dialect} has been renamed to @code{TeX-dialect} +and moved from @file{latex.el} to @file{tex.el}. @code{LaTeX-dialect} +now is an obsolete alias. + +@item +The style @file{latexinfo.el} is removed from @AUCTeX{}. +@file{latexinfo.el} was meant to support latexinfo which in return was a +@LaTeX{}-2.09 extension of Texinfo, but didn't manage to replace Texinfo. + +@item +The style @file{siunitx.el} is updated to support package version 3. +Key-value options provided by older package versions are removed, +deprecated macros and units are not supported anymore. + +@item +@AUCTeX{} has preliminary support for @LaTeX{}-hooks. Hooks provided by +@LaTeX{} kernel are known and available for completion in +@samp{\AddToHook}, @samp{\RemoveFromHook} and @samp{\AddToHookNext}. + +@item +@AUCTeX{} is now able to place all generated output files, including those +that are produced by applications running under @AUCTeX{}, temporary files +related to region processing and @previewlatex{} files, in an output +directory. To use this feature, set the new user option +@code{TeX-output-dir} to the absolute path of the output directory or a +relative path which would be interpreted as being relative to the master +file in a multifile document. + +Note that this feature doesn't work if the document includes sub file +placed in sub directory below the main file via @samp{\include} command. + +@item +Many other bugs were fixed. +@end itemize + +@heading News in 12.3 + +@itemize @bullet +@item +Support for @samp{PSTricks} is now @acronym{PDF}-oriented. @AUCTeX{} no +longer turns off PDF mode for @samp{PSTricks} documents even without +@samp{pst-pdf}. It now sets up @code{TeX-PDF-from-DVI} option so that +@acronym{PDF} output is generated when @code{TeX-PDF-mode} is enabled +(default). Users who want @acronym{DVI} output should disable PDF mode +explicitly by file local variable, or customize @code{TeX-PDF-mode} to +@code{nil}. + +@item +The function @code{font-latex-update-font-lock} has been obsoleted in +order to fix @samp{bug#37945}. That function was used by several style +files in order to refresh fontification after adding new symbols or +verbatim constructs. It is better to call @code{font-lock-flush} in the +former case and @code{font-latex-set-syntactic-keywords} in the latter +case. The function @code{font-latex-update-font-lock} still exists as a +no-op which only shows a warning explaining how to update font-lock as +mentioned above. + +@item +Math expression highlighting was improved. Highlighting for documents +with a lot of inline math expressions @samp{$...$} won't get scrambled +now (@samp{bug#33139}). + +In addition, it is no longer recommended to customize +@code{font-latex-math-environments}. Use @code{texmathp-tex-commands} +instead. +@ifclear rawfile +@xref{Fontification of math}. +@end ifclear + +@item +@AUCTeX{} tracks changes in @LaTeX{}2e 2020-02-02 release. @AUCTeX{} +supports the improvements to @LaTeX{} font selection mechanism (NFSS). +New macros like @samp{\textsw} or @samp{\textulc} are added to font +insertion keyboard commands. +@ifset rawfile +See the section for inserting font specifiers for details. +@end ifset +@ifclear rawfile +@xref{Font Specifiers}, for details. +@end ifclear +Further, the entries in the menu @samp{LaTeX}, @samp{Insert Font} are reorganized and +adjusted accordingly. + +Macros previously provided by @file{textcomp.sty} are now part of +@LaTeX{} kernel. @AUCTeX{} tracks this change as well and support for +the new macro @samp{\legacyoldstylenums} is added. + +@item +Insertion of environments in @LaTeX{} documents (i.e.@: @kbd{C-c C-e}) was +improved. The former code had a few bugs, which sometimes resulted in +either spurious empty line or spurious comment prefix, or both, +especially when the region is active. Those bugs are now fixed. + +@item +More bugs fixed, other minor features implemented. +@end itemize + +@heading News in 12.2 + +@itemize @bullet +@item +@AUCTeX{} reflects the changes in @LaTeX{}2e 2019-10-01 release. +@samp{filecontents} environment now takes an optional argument and can +be used anywhere in a document. The macros @samp{\Ref} and +@samp{\labelformat} are moved from @file{varioref.sty} to @LaTeX{} +kernel. @samp{amsmath} has a new macro @samp{\overunderset}. + +@item +A new method is implemented in @previewlatex{} to adjust the foreground +colors of generated images to those of Emacs, when the @LaTeX{} command +produces @acronym{PDF}. The traditional method became invalid because +of the change introduced in Ghostscript 9.27. Unfortunately, the new +method doesn't work due to a bug in Ghostscript 9.27 and is valid only +for Ghostscript > 9.27. There is also a fallback method for gs 9.27 +users which displays plain ``black on white'' images. For successful +function of @previewlatex{}, the users are encouraged to set up the new +user option @code{preview-pdf-color-adjust-method} to choose appropriate +option among the three: new, traditional and fallback method. + +@item +@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To +enable, call @kbd{M-x flymake-mode @key{RET}} or add this to your +@file{.emacs} file: +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp + +@item +The way the option @code{TeX-record-buffer} is used was corrected. It +was used in just the opposite way as the document says. Erase the +customization if you have customized this option since it now acts in +reverse to your expectation. + +@item +A former customize option @code{japanese-TeX-command-list} is removed. +Use @code{japanese-TeX-engine-default}, or if it's really necessary, +customize @code{TeX-command-list} directly if the task which the option +used to carry is required. + +@item +Support for standard @LaTeX{} without e-@TeX{} extension is now very +limited. It doesn't work if raw @TeX{} code is put on the command line +to invoke @command{latex} command. It also fails for region compilation (@kbd{C-c +C-r} and so on) with documents of non-ascii file name. In addition, it +no longer works with @previewlatex{}. We consider this incompatibility +is permissible because e-@TeX{} extension is enabled for standard +@LaTeX{} by default long ago. @LaTeX{} variants such as Xe@LaTeX{} and +Lua@LaTeX{} are not affected. + +@item +Key binds in Texinfo mode are improved. Typing @kbd{$}, @kbd{^}, +@kbd{_} and @kbd{\} now just self-inserts without pointless side effects +in Texinfo mode. + +In addition, the option @code{TeX-electric-escape} is now effective in +Texinfo mode. When it is enabled, typing @kbd{@@} will invoke +@code{TeX-electric-macro} offering completion in similar style with +other @TeX{} modes of @AUCTeX{}. + +@item +Fontification support for @samp{biblatex} package is improved and +updated to macros provided by package version 3.12. For qualified +lists, at least 2 mandatory arguments are fontified. + +@item +Support for column specifiers @samp{w} and @samp{W} provided by +@samp{array} package is added to @file{array.el}. The correct counting +of columns only works when the @samp{align} parameter is enclosed in +braces, e.g., @samp{w@{l@}@{3cm@}}. The short version @samp{wl@{3cm@}} +is not supported. + +@item +Entries for @samp{PDF Tools} are added in +@code{TeX-view-program-list-builtin} for Windows and macOS. This viewer +can be configured under these operating systems with an entry like this +in an init file: +@lisp +(setq TeX-view-program-selection '((output-pdf "PDF Tools"))) +@end lisp + +@item +Several other bugs were fixed, many minor features were added. +@end itemize + +@heading News in 12.1 + +@itemize @bullet +@item +@AUCTeX{} now requires GNU Emacs 24 or higher. Support for XEmacs has +been dropped. + +@item +Besides the change in the supported version of Emacs, there has been no +functional change in this release, which is equivalent to version 11.92. +@end itemize + +@heading News in 11.92 + +@itemize @bullet +@item +@previewlatex{} is compatible with Ghostscript 9.22 where the operator +@samp{.runandhide} is removed. All occurrences of @samp{.runandhide} in +@previewlatex{} are replaced by alternative code making it work with +Ghostscript 9.22 again. + +@item +@AUCTeX{} has a new customize option +@code{TeX-math-input-method-off-regexp}. When you begin to input a math +formula, the current input method is turned off if its name matches this +regular expression. + +In fact this variable was introduced long before, but has not been +documented in info files nor turned into a customize option with +@code{defcustom} until this release. + +@item +The window system focus is pulled back to Emacs when viewing with +evince-compatible viewers if a new customize option +@code{TeX-view-evince-keep-focus} is non-nil. + +@item +The usual dose of bug fixes was administered. +@end itemize + +@heading News in 11.91 + +@itemize @bullet +@item +Now @AUCTeX{} has a logo. The @LaTeX{} code to create it is available +in the @file{etc/} directory of the package. + +@item +Add support for @command{upmendex}, an extension of @command{makeindex} +capable of sorting indexes by unicode based ICU. + +@item +Fix @previewlatex{} to interact correctly with Japanese @LaTeX{}. The +parsing routine was made robust not to be confused by the 7-bit encoding +of Japanese text and the necessary option to @LaTeX{} command is kept +even when preamble caching is enabled. + +@item +The new ``Glossaries'' entry in @code{TeX-command-list} runs the command +@command{makeglossaries}. + +@item +Fontification of control symbols has been improved. Characters defined +in @code{font-latex-match-simple-exclude-list} do not receive any +fontification. In Doc@TeX{} mode, the character @samp{_} is removed +from @code{font-latex-match-simple-exclude-list} in order to fontify +macros like @samp{\__module_foo:nnn} correctly. + +@item +Fontification of math environments has been improved. Optional and/or +mandatory argument(s) to environments are not fontified. + +@item +@file{preview.sty} loads @file{luatex85.sty} if possible and should be +compatible with newer lua@TeX{} versions. + +@item +@AUCTeX{} has a new customize option @code{TeX-ispell-verb-delimiters}. +This string contains usual characters used as delimiters for in-line +verbatim macros like @samp{\verb}. Text between delimiters after an +in-line verbatim macro will be skipped during spell checking. + +@item +Fontification of in-line verbatim macros has been improved. +@file{font-latex.el} recognizes an optional or a mandatory argument for +macros like @samp{\Verb} from @file{fancyvrb.sty}, @samp{\mint} and +@samp{\mintinline} from @file{minted.sty} and fontifies verbatim content +correctly. + +@item +@AUCTeX{} can put and parse labels in optional argument of environments. +Inserting labels is done by new function +@code{LaTeX-env-label-as-keyval}. A new customize option +@code{LaTeX-listing-label} is available as prefix to labels in code +typesetting environments, e.g.@: @samp{lstlisting} environment provided by +@samp{listings} package. @code{LaTeX-listing-label} defaults to +@code{lst:}. Parsing of labels for later referencing relies on two +requirements: +@enumerate +@item +Label should come as last key-value argument, and +@item +label must be enclosed in braces, e.g. +@example +\begin@{lstlisting@}[caption=Some Caption,label=@{lst:foo@}] +... +\end@{lstlisting@} +@end example +@end enumerate + +@item +The function @code{LaTeX-label} now takes a second optional argument +@code{NO-INSERT}. When non-@code{nil}, @code{LaTeX-label} reads a label +and returns it as a string. This argument is also passed to any +function bound to @code{LaTeX-label-function} (see next item). + +@item +@strong{Incompatible change:} The signature for the function passed with +the customize option @code{LaTeX-label-function} has changed. The +function bound to this variable is now expected to take an optional +second argument @code{NO-INSERT}. When this argument is non-@code{nil}, +the function should read and only return a label as a string; insertion +is done by another function. + +@item +Directory local variables were ineffective for +@code{japanese-latex-mode} and @code{japanese-plain-tex-mode}. This bug +was fixed. (This was actually done in @AUCTeX{} 11.90, but not +advertised) + +@item +The output of Japanese text from Japanese @TeX{} engines is decoded +correctly for most cases, according to the encoding of the @TeX{} +documents and the locale. The difference between MS Windows, macOS and +unix-like OS is taken into account. (This was actually done in +@AUCTeX{} 11.90, but not advertised) + +@item +Quite a few new @LaTeX{} packages are supported. + +@item +As usual, many bugs were fixed. + +@end itemize + +@heading News in 11.90 + +@itemize @bullet +@item +In addition to the completion performed by @code{TeX-complete-symbol}, +@AUCTeX{} now also supports the new Emacs standard completion-at-point +facility (see the Emacs command @code{completion-at-point}). This also +means that modern completion UIs like @i{company-mode} work out of the +box in @TeX{} and @LaTeX{} buffers. +@ifclear rawfile +@xref{Completion}, for details. +@end ifclear + +@item +Completion is now aware of being inside a math environment and then +completes math macros. + +@item +@AUCTeX{} is able to display several levels of super- and subscripts, +each one raised above and a bit smaller than its basis. For this +feature, have a look at the customize options +@code{font-latex-fontify-script} (especially the new values +@code{multi-level} and @code{invisible}) and +@code{font-latex-fontify-script-max-level}. Also, the script characters +@samp{^} and @samp{_} are also fontified with a special face named +@code{font-latex-script-char-face}. +@ifclear rawfile +@xref{Fontification of math}, for details. +@end ifclear + +@item +Parsing of format specification in various tabular environments has been +improved. The function @code{LaTeX-insert-item} (@kbd{C-c @key{LFD}}) +inserts suitable number of ampersands for @samp{*@{num@}@{cols@}} +constructs. Style files for @LaTeX{} packages @samp{tabularx}, +@samp{tabulary}, @samp{longtable}, @samp{dcolumn} and @samp{siunitx} are +adapted to take advantage of this improvement. + +@item +@AUCTeX{} has a new Ispell dictionary @file{tex-ispell.el} for macros +and environments which will be skipped during spell checking. The +activiation of this feature is controlled by a new customize option +@code{TeX-ispell-extend-skip-list}, which is set to @code{t} and +activated by default. + +@item +@AUCTeX{} has a new customize option @code{TeX-raise-frame-function} +that is currently only used by Evince and Atril inverse search to raise +the Emacs frame. + +@item +When inserting a new float, @AUCTeX{} will now prompt for a +short-caption if the length of the caption provided is greater than a +certain size. This size is controlled via a new user option +@code{LaTeX-short-caption-prompt-length}. + +@item +Parsing of the compilation log has been reworked. You should encounter +fewer mistaken files while navigating through errors and warnings. + +@item +Two new user options, @code{TeX-ignore-warnings} and +@code{TeX-suppress-ignored-warnings}, allow ignoring certain warnings +after compilation of the document. +@ifclear rawfile +@xref{Ignoring warnings}, for details. +@end ifclear + +@item +A new option, @code{TeX-PDF-from-DVI}, controls if and how to produce a +@acronym{PDF} file by converting a @acronym{DVI} file. This supersedes +@code{TeX-PDF-via-dvips-ps2pdf} which is still recognized but marked as +obsolete and may be removed in future releases. + +@item +Support for a number of external viewers has been added: +@itemize +@item +Atril viewer. Forward and inverse search requires version 1.9.1 or +later to work. + +@item +dviout viewer on Windows. Note that this setup works when +@code{TeX-source-correlate-method} is set to use @samp{source-specials} +for @acronym{DVI}, e.g.: +@lisp +(setq TeX-source-correlate-method + '((dvi . source-specials) + (pdf . synctex))) +@end lisp +which is the default. + +@item +SumatraPDF viewer on Windows. + +@item +Zathura viewer. Forward and inverse search requires a recent version of +the program to work (3.4 or later). +@end itemize + +@item +A new function, @code{TeX-documentation-texdoc}, for reading +documentation with @samp{texdoc} has been added. @code{TeX-doc} is +still available but now @kbd{C-c ?} runs +@code{TeX-documentation-texdoc}. + +@item +@AUCTeX{} has a new custom option +@code{LaTeX-reftex-cite-format-auto-activate} which controls the +automatic activation of citation formats provided by Ref@TeX{} when a style +file is loaded and Ref@TeX{} is enabled. Currently, @file{biblatex.el}, +@file{harvard.el}, @file{jurabib.el} and @file{natbib.el} use this +feature. If you have customized @code{reftex-cite-format} and want to +use your settings, you should set this variable to @code{nil}. + +@item +@AUCTeX{} now has limited support for the TikZ package. For the moment, +this includes some basic support for prompting the user of arguments to +the @samp{\draw} macro. + +@item +The style @file{graphicx.el} went through a bigger overhaul. The +optional argument of command @samp{\includegraphics} now supports +key-val query; keys can independently be chosen anytime by pressing the +@key{,} key. As a side effect, the variable +@code{LaTeX-includegraphics-options-alist} is now no-op and is removed +from @file{tex-style.el}. You can safely remove any customization of it +from your init file. The mandatory argument of @samp{\includegraphics} +knows about image file extensions supported by the used engine and +offers them for inclusion. + +@item +Support for other @LaTeX{} packages was improved, and style files for +several new packages were added. + +@item +Many bugs were crushed along the way. +@end itemize + +@heading News in 11.89 + +@itemize @bullet +@item +You can now run all commands needed to compile a document and then open +the viewer with a single command: @code{TeX-command-run-all}, bound to +@kbd{C-c C-a}. + +@item +Commands such as @samp{LaTeX} and @samp{View} can now be executed conveniently on the +current section (or part, chapter, subsection, etc). See +@code{LaTeX-command-section} and +@code{LaTeX-command-section-change-level}. +@ifclear rawfile +@xref{Starting a Command}, for details. +@end ifclear + +@item +Forward and backward search with Evince now also work when only a region +of the document is compiled/viewed. + +@item +To open the PDF output file you can now use also PDF Tools, a document +viewer for Emacs. With it, as a plus, forward and backward search is +accurate at word level. + +@item +With new option @code{TeX-PDF-via-dvips-ps2pdf} it is possible to +compile a document to @acronym{DVI} and then convert it to @acronym{PDF} +using @command{dvips}--@command{ps2pdf} before viewing it. + +@item +New option @code{TeX-file-line-error} allows to select file:line:error +style for error messages. + +@item +Indent @samp{\[...\]} math mode as a regular environment by default. + +@item +Now @AUCTeX{} suggests to run @command{makeindex} when appropriate. + +@item +@code{TeX-view-program-list} can contain, as third optional element of +each item, the name of the executable(s) needed to open the viewer. + +@item +@code{TeX-expand-list} variable has been split into +@code{TeX-expand-list} and @code{TeX-expand-list-builtin}. Only the +former is intended to be customized by the user, the latter contains +built-in expanders. You might want to keep in @code{TeX-expand-list} +only new expansion strings. + +@item +Before running commands like @TeX{} and @LaTeX{}, now @AUCTeX{} performs +some checks. If @code{TeX-check-TeX} is non-nil, it will test whether a +working @TeX{} distribution is actually present in the system and +available to Emacs. Instead, when @code{TeX-check-engine} is non-nil, +before running @LaTeX{} commands @AUCTeX{} will check whether the +correct engine has been set, based upon known restrictions posed by +@LaTeX{} packages. + +@item +Basic support to @ConTeXt{} Mark IV has been added. Users can now +select the Mark version to be used with new option +@code{ConTeXt-Mark-version}, and @AUCTeX{} is able to catch error +messages in the output log of a Mark IV document. + +@item +Support for tons of @LaTeX{} packages has been added. + +@item +Numbers of bugs have been fixed, many minor features have been added. +@end itemize + +@heading News in 11.88 + +@itemize @bullet +@item +@code{TeX-PDF-mode} is now enabled by default. + +@item +Now @code{TeX-previous-error} works with @TeX{} commands if the new +option @code{TeX-parse-all-errors} is non-nil, which is the default. +When this option is non-nil, an overview of errors and warnings reported +by the @TeX{} compiler can be opened with @kbd{M-x TeX-error-overview +@key{RET}}. +@ifclear rawfile +@xref{Debugging}, for details. +@end ifclear + +@item +Style file authors are encouraged to distinguish common from expert +macros and environments, and mark the latter using +@code{TeX-declare-expert-macros} and +@code{LaTeX-declare-expert-environments}. + +Users can then restrict completion using +@code{TeX-complete-expert-commands}. + +@item +Management of @LaTeX{} package options in the parser was improved. You +might need to reparse your documents, especially if you loaded the +@samp{babel} package with language options. + +@item +Now you can insert @samp{$...$} or @samp{\(...\)} by typing a single +@kbd{$}. To do this, customize the new option @samp{TeX-electric-math}. +@code{TeX-math-close-double-dollar} was removed. +@ifclear rawfile +@xref{Quotes}, for details. +@end ifclear + +@item +@kbd{C-c @key{RET} documentclass @key{RET}} completes with all available +@LaTeX{} classes, if the @code{TeX-arg-input-file-search} variable is +non-nil. Completion for class options of the standard @LaTeX{} classes +is provided as well. + +@item +New user options @code{LaTeX-default-author}, +@code{LaTeX-fontspec-arg-font-search}, +@code{LaTeX-fontspec-font-list-default}, @code{TeX-date-format}, and +@code{TeX-insert-braces-alist}. A new possible value +(@code{show-all-optional-args}) for +@code{TeX-insert-macro-default-style} was added. The default value of +@code{TeX-source-correlate-method} has been changed. + +@item +@samp{biblatex} support was greatly expanded. If parsing is enabled, +@AUCTeX{} looks at @samp{backend} option to decide whether to use Biber +or Bib@TeX{}. The @code{LaTeX-biblatex-use-Biber} variable was changed to +be file local only and is no more customizable. + +@item +With some @LaTeX{} classes, the default environment suggested by +@code{LaTeX-environment} (@kbd{C-c C-e}) when the current environment is +@samp{document} was changed. With @samp{beamer} class the default +environment is @samp{frame}, with @samp{letter} it is @samp{letter}, +with @samp{slides} it is @samp{slide}. + +@item +Brace pairing feature was enhanced in @LaTeX{} documents. Support for +@samp{\bigl}, @samp{\Bigl}, @samp{\biggl} and @samp{\Biggl}, the same +as the one for @samp{\left}, was added to @code{TeX-insert-macro}. +For example, @kbd{C-c @key{RET} bigl @key{RET} ( @key{RET}} inserts +@samp{\bigl(\bigr)}. + +You can insert brace pair @samp{()}, @samp{@{@}} and @samp{[]} by typing +a single left brace if the new user option +@code{LaTeX-electric-left-right-brace} is enabled. + +Macros @samp{\langle}, @samp{\lfloor} and @samp{\lceil}, which produce +the left part of the paired braces, are treated similarly as @samp{(}, +@samp{@{} and @samp{[} during the course of @code{TeX-insert-macro}. +@ifclear rawfile +@xref{Quotes}, for details. +@end ifclear + +@item +Support for dozens of @LaTeX{} packages was added. + +@item +Tabular-like environments (@samp{tabular}, @samp{tabular*}, @samp{tabularx}, @samp{tabulary}, @samp{array}, +@samp{align}, ...) are indented in a nicer and more informative way when the +column values of a table line are written across multiple lines in the +tex file. + +@item +The suitable number of ampersands are inserted when you insert @samp{array}, +@samp{tabular} and @samp{tabular*} environments with @kbd{C-c C-e}. Similar +experience is obtained if you terminate rows in these environments with +@kbd{C-c @key{LFD}}. It supplies line break macro @samp{\\} and inserts +the suitable number of ampersands on the next line. + +Similar supports are provided for various @samp{amsmath} environments. + +@ifclear rawfile +@xref{Tabular-like}, for details. +@end ifclear + +@item +Commands for narrowing to a group (@code{TeX-narrow-to-group}) and to +@LaTeX{} environments (@code{LaTeX-narrow-to-environment}) were added. + +@item +Now arbitrary options can be passed to the @TeX{} processor on a +per file basis using the @code{TeX-command-extra-options} option. +@ifclear rawfile +@xref{Processor Options}, for details. +@end ifclear + +@item +Now @kbd{C-c C-e document @key{RET}}, in an empty document, prompts for +@samp{\usepackage} macros in addition to @samp{\documentclass}. + +@item +@code{TeX-add-style-hook} has now a third argument to tell @AUCTeX{} for +which dialect (@LaTeX{}, Texinfo or Bib@TeX{}) the style hook is +registers. Labelling style hook by dialect will avoid applying them not +in the right context. + +@item +There have been lots of bug fixes and feature additions. +@end itemize + +@heading News in 11.87 + +@itemize @bullet +@item +@AUCTeX{} now supports Biber in conjunction with biblatex in addition to +Bib@TeX{}. + +@item +Each @AUCTeX{} mode now has its own abbrev table. On Emacsen which +provide the possibility to inherit abbrevs from other tables, the +abbrevs from the Text mode abbrev table are available as well. Newly +defined abbrevs are written to the mode-specific tables, though. + +@item +The file @samp{tex-fptex.el} was removed. + +@item +Forward/backward search for Evince has been improved. If Emacs is +compiled with DBUS support and a recent Evince version (3.x) is +installed, the communication goes over the desktop bus instead of the +command line, resulting in more accurate positioning of point in Emacs +and highlighting of the target paragraph in Evince. + +@item +A problem where Ghostscript threw an @samp{/invalidfileaccess} error when +running @previewlatex{} was fixed. + +@item +A lot of smaller fixes and additions have been made. +@end itemize + + +@heading News in 11.86 + +@itemize @bullet +@item +Parsing of @LaTeX{} output was improved. It is now less likely that +@AUCTeX{} opens a non-existent file upon calling @code{TeX-next-error}; +a problem for example encountered when using MiK@TeX{} 2.8. In addition +quoted file names as emitted by MiK@TeX{} are now supported. + +@item +A new framework for the definition and selection of viewers was +implemented. If you have customizations regarding viewers you will have +to redo them in this new framework or reenable the old one. +@ifset rawfile +See the section on viewers in the manual for details. +@end ifset +@ifclear rawfile +@xref{Starting Viewers}, for details. +@end ifclear + +@item +Comprehensive editing support for PSTricks was added. + +@item +Support for various @LaTeX{} packages was added, e.g.@: @samp{tabularx}, +@samp{CJK}, and @samp{hyperref}. + +@item +An easy way to switch between @TeX{} engines (PDF@TeX{}, Lua@TeX{}, +Xe@TeX{}, Omega) was added. + +@item +Support for Sync@TeX{} was added. This involves the command line +options for @LaTeX{} and the viewer. + +@item +Folding can now be customized to use macro arguments as replacement +text. + +@item +@samp{preview.sty} now works with Xe@TeX{}. + +@item +A lot of smaller and larger bugs have been squashed. +@end itemize + +@heading News in 11.85 + +@itemize @bullet + +@item +Font locking has been improved significantly. It is now less prone to +color bleeding which could lead to high resource usage. In addition it +now includes information about @LaTeX{} macro syntax and can indicate +syntactically incorrect macros in @LaTeX{} mode. + +@item +The license was updated to GPLv3. + +@item +Support for the nomencl, flashcards and comment @LaTeX{} packages as +well as the Icelandic language option of babel were added. + +@item +Support for folding of math macros was added. + +@item +Lots of minor bugs in features and documentation fixed. +@end itemize + +@heading News in 11.84 + +@itemize @bullet + +@item +There have been problems with the @option{-without-texmf-dir} option to +@samp{configure} when the value of @option{-with-kpathsea-sep} was set or +determined for an installation system with a default different from that +of the runtime system. @code{with-kpathsea-sep} has been removed; the +setting is now usually determined at runtime. + +Due to this and other problems, @previewlatex{} in the released XEmacs +package failed under Windows or with anything except recent 21.5 +XEmacsen. + +@item +@AUCTeX{} and @previewlatex{} have been changed in order to accommodate +file names containing spaces. @previewlatex{} now tolerates bad +PostScript code polluting the stack (like some Omega fonts). + +@item +@samp{preview.sty} had in some cases failed to emit PostScript header +specials. + +@item +Support for folding of comments was added. + +@item +The @code{polish} language option of the babel @LaTeX{} package as well as +the polski @LaTeX{} package are now supported. Most notably this means +that @AUCTeX{} will help to insert quotation marks as defined by @file{polish.sty} +(@code{"`..."'}) and @file{polski.sty} (@code{,,...''}). + +@item +The @TeX{} tool bar is now available and enabled by default in plain +@TeX{} mode. +@ifclear rawfile +@xref{Processing Facilities}. +@end ifclear + +@item +Bug fix in the display of math subscripts and superscripts. + +@item +Bug fix @code{TeX-doc} for Emacs 21. + +@item +There has been quite a number of other bug fixes to various features and +documentation across the board. + +@end itemize + +@heading News in 11.83 + +@itemize @bullet +@item +The new function @code{TeX-doc} provides easy access to documentation +about commands and packages or information related to @TeX{} and friends +in general. +@ifset rawfile +It is accessible with the key binding @kbd{C-c ?} or the +@samp{Find Documentation...} entry in the mode menus. +@end ifset +@ifclear rawfile +@xref{Documentation}. +@end ifclear + +@item +You can now get rid of generated intermediate and output files by means +of the new @samp{Clean} and @samp{Clean All} entries in +@code{TeX-command-list} accessible with @kbd{C-c C-c} or the Command +menu. +@ifclear rawfile +@xref{Cleaning}. +@end ifclear + +@item +Support for forward search with PDF files was added. That means you can +jump to a place in the output file corresponding to the position in the +source file. +@ifset rawfile +Currently this only works if you use the pdfsync @LaTeX{} package and +xpdf as your PDF viewer. The accuracy is in the range of +/-1 page. +@end ifset +@ifclear rawfile +@xref{Viewing}. +@end ifclear + +Adding support for this feature required the default value of the +variable @code{TeX-output-view-style} to be changed. Please make sure +you either remove any customizations overriding the new default or +incorporate the changes into your customizations if you want to use this +feature. + +@item +@TeX{} error messages of the @option{-file-line-error} kind are now +understood in @AUCTeX{} and @previewlatex{} (parsers are still +separate). + +@item +Bug fix in XyM@TeX{} support. + +@item +The @LaTeX{} tool bar is now enabled by default. +@ifclear rawfile +@xref{Processing Facilities}. +@end ifclear + +@end itemize + +@heading News in 11.82 + +@itemize @bullet +@item +Support for the MinionPro @LaTeX{} package was added. + +@item +Warnings and underfull/overfull boxes are now being indicated in the +echo area after a @LaTeX{} run, if the respective debugging options are +activated with @code{TeX-toggle-debug-warnings} (@kbd{C-c C-t C-w}) or +@code{TeX-toggle-debug-bad-boxes} (@kbd{C-c C-t C-b}). In this case +@code{TeX-next-error} will find these warnings in addition to normal +errors. + +The key binding @kbd{C-c C-w} for @code{TeX-toggle-debug-bad-boxes} +(which was renamed from @code{TeX-toggle-debug-boxes}) now is +deprecated. + +@item +@AUCTeX{} now can automatically insert a pair of braces after typing +@key{_} or @key{^} in math constructs if the new variable +@code{TeX-electric-sub-and-superscript} is set to a non-nil value. + +@item +Some language-specific support for French was added. There now is +completion support for the commands provided by the @samp{frenchb} (and +@samp{francais}) options of the babel @LaTeX{} package and easier input +of French quotation marks (@code{\og ...\fg}) which can now be +inserted by typing @key{"}. + +@item +Completion support for options of some @LaTeX{} packages was added. + +@item +@cindex @file{auctex.el} +@cindex @file{tex-site.el} +Already in version 11.81 the way to activate @AUCTeX{} changed +substantially. This should now be done with @code{(load "auctex.el" nil +t t)} instead of the former @code{(require 'tex-site)}. Related to this +change @file{tex-mik.el} does not load @file{tex-site.el} anymore. That +means if you used only @code{(require 'tex-mik)} in order to activate +@AUCTeX{}, you have to add @code{(load "auctex.el" nil t t)} before the +latter statement. +@ifset rawfile +More detailed information can be found in the installation instructions +(file @file{INSTALL}). +@end ifset +@ifclear rawfile +@xref{Loading the package}. +@end ifclear + +@item +Handling of verbatim constructs was consolidated across @AUCTeX{}. This +resulted in the @fontlatex{}-specific variables +@code{font-latex-verb-like-commands}, @code{font-latex-verbatim-macros}, +and @code{font-latex-verbatim-environments} being removed and the more +general variables @code{LaTeX-verbatim-macros-with-delims}, +@code{LaTeX-verbatim-macros-with-braces}, and +@code{LaTeX-verbatim-environments} being added. + +@item +The output of a Bib@TeX{} run is now checked for warnings and errors, +which are reported in the echo area. + +@item +The aliases for @code{font-latex-title-fontify} were removed. Use +@code{font-latex-fontify-sectioning} instead. + +@item +The problem that Japanese macros where broken across lines was fixed. + +@item +Various bug fixes. +@end itemize + +@heading News in 11.81 + +@itemize @bullet +@item +@code{LaTeX-mark-section} now marks subsections of a given section as +well. The former behavior is available via the prefix argument. + +@item +@previewlatex{} which was previously available separately became a +subsystem of @AUCTeX{}. There is no documented provision for building +or installing @previewlatex{} separately. It is still possible to use +and install @AUCTeX{} without @previewlatex{}, however. + +@item +The installation procedures have been overhauled and now also install +startup files as part of the process (those had to be copied manually +previously). You are advised to remove previous installations of +@AUCTeX{} and @previewlatex{} before starting the installation +procedure. A standard installation from an unmodified tarball no longer +requires Makeinfo or Perl. + +Also note that the way @AUCTeX{} is supposed to be activated changed. +Instead of @code{(require 'tex-site)} you should now use @code{(load +"auctex.el" nil t t)}. While the former method may still work, the new +method has the advantage that you can deactivate a preactivated +@AUCTeX{} with the statement @code{(unload-feature 'tex-site)} before +any of its modes have been used. This may be important especially for +site-wide installations. + +@item +Support for the babel @LaTeX{} package was added. + +@item +Folding a buffer now ensures that the whole buffer is fontified before +the actual folding is carried out. If this results in unbearably long +execution times, you can fall back to the old behavior of relying on +stealth font locking to do this job in the background by customizing the +variable @code{TeX-fold-force-fontify}. + +@item +Folded content now reveals part of its original text in a tooltip or the +echo area when hovering with the mouse pointer over it. + +@item +The language-specific insertion of quotation marks was generalized. The +variables @code{LaTeX-german-open-quote}, +@code{LaTeX-german-close-quote}, @code{LaTeX-german-quote-after-quote}, +@code{LaTeX-italian-open-quote}, @code{LaTeX-italian-close-quote}, and +@code{LaTeX-italian-quote-after-quote} are now obsolete. If you are not +satisfied with the default settings, you should customize +@code{TeX-quote-language-alist} instead. + +@item +Similar to language-specific quote insertion, @AUCTeX{} now helps you +with hyphens in different languages as well. +@ifclear rawfile +@xref{European}, for details. +@end ifclear + +@item +Fill problems in Japanese text introduced in @AUCTeX{} 11.55 were fixed. +@AUCTeX{} tries not to break lines between 1-byte and 2-byte chars. +These features will work in Chinese text, too. + +@item +The scaling factor of the fontification of sectioning commands can now +be customized using the variable @code{font-latex-fontify-sectioning}. +This variable was previously called @code{font-latex-title-fontify}; In +this release we provide an alias but this will disappear in one of the +the next releases. The faces for the sectioning commands are now called +@code{font-latex-sectioning-@var{N}-face} (@var{N}=0@dots{}5) instead of +@code{font-latex-title-@var{N}-face} (@var{N}=1@dots{}4). Analogously +the names of the variables holding the related keyword lists were +changed from @code{font-latex-title-@var{N}-keywords} to +@code{font-latex-sectioning-@var{N}-keywords}. +@ifclear rawfile +@xref{Font Locking}, for details. +@end ifclear +Make sure to adjust your customizations. + +@item +Titles in beamer slides marked by the ``\frametitle'' command are know +displayed with the new face @code{font-latex-slide-title-face}. You can +add macros to be highlighted with this face to +@code{font-latex-match-slide-title-keywords}. + +@item +Of course a lot of bugs have been fixed. +@end itemize + +@heading News in 11.55 + +@itemize @bullet +@item +A bug was fixed which lead to the insertion of trailing whitespace +during filling. In particular extra spaces were added to sentence +endings at the end of lines. You can make this whitespace visible by +setting the variable @code{show-trailing-whitespace} to @code{t}. If +you want to delete all trailing whitespace in a buffer, type @kbd{M-x +delete-trailing-whitespace @key{RET}}. + +@item +A bug was fixed which lead to a @samp{*Compile-Log*} buffer popping up +when the first @LaTeX{} file was loaded in an Emacs session. + +@item +On some systems the presence of an outdated Emacspeak package lead to +the error message @samp{File mode specification error: (error "Variable +binding depth exceeds max-specpdl-size")}. Precautions were added which +prevent this error from happening. But nevertheless, it is advised to +upgrade or uninstall the outdated Emacspeak package. + +@item +The value of @code{TeX-macro-global} is not determined during +configuration anymore but at load time of @AUCTeX{}. Consequently the +associated configuration option @option{--with-tex-input-dirs} was +removed. + +@item +Support for the @LaTeX{} Japanese classes @samp{jsarticle} and +@samp{jsbook} was added. +@end itemize + +@heading News in 11.54 + +@itemize @bullet +@item +The parser (used e.g.@: for @code{TeX-auto-generate-global}) was extended +to recognize keywords common in @LaTeX{} packages and classes, like +``\DeclareRobustCommand'' or ``\RequirePackage''. Additionally a bug +was fixed which led to duplicate entries in @AUCTeX{} style files. + +@item +Folding can now be done for paragraphs and regions besides single +constructs and the whole buffer. With the new @code{TeX-fold-dwim} +command content can both be hidden and shown with a single key binding. +In course of these changes new key bindings for unfolding commands where +introduced. The old bindings are still present but will be phased out +in future releases. + +@item +Info files of the manual now have a .info extension. + +@item +There is an experimental tool bar support now. It is not activated by +default. If you want to use it, add +@lisp +(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) +@end lisp +to your init file. + +@item +The manual now contains a new chapter ``Quick Start''. It explains the +main features and how to use them, and should be enough for a new user +to start using @AUCTeX{}. + +@item +A new section ``Font Locking'' was added to the manual which explains +syntax highlighting in @AUCTeX{} and its customization. Together with +the sections related to folding and outlining, the section is part of +the new chapter ``Display''. + +@item +Keywords for syntax highlighting of @LaTeX{} constructs to be typeset in +bold, italic or typewriter fonts may now be customized. Besides the +built-in classes, new keyword classes may be added by customizing the +variable @code{font-latex-user-keyword-classes}. The customization +options can be found in the customization group +@code{font-latex-keywords}. + +@item +Verbatim content is now displayed with the @samp{fixed-pitch} face. (GNU +Emacs only) + +@item +Syntax highlighting should not spill out of verbatim content +anymore. (GNU Emacs only) + +@item +Verbatim commands like @samp{\verb|...|} will not be broken anymore +during filling. + +@item +You can customize the completion for graphic files with +@code{LaTeX-includegraphics-read-file}. + +@item +Support for the @LaTeX{} packages @samp{url}, @samp{listings}, +@samp{jurabib} and @samp{csquotes} was added with regard to command +completion and syntax highlighting. + +@item +Performance of fontification and filling was improved. + +@item +Insertion of nodes in Texinfo mode now supports completion of existing +node names. + +@item +Setting the variable @code{LaTeX-float} to @code{nil} now means that you +will not be prompted for the float position of figures and tables. You +can get the old behaviour of @code{nil} by setting the variable to +@code{""}, i.e.@: an empty string. +@ifclear rawfile +See also @ref{Floats}. +@end ifclear + +@item +The XEmacs-specific bug concerning @code{overlays-at} was fixed. + +@item +Lots of bug fixes. +@end itemize + +@heading News in 11.53 + +@itemize @bullet +@item +The @LaTeX{} math menu can include Unicode characters if your Emacs +built supports it. See the variable +@ifset rawfile +@code{LaTeX-math-menu-unicode}. +@end ifset +@ifclear rawfile +@code{LaTeX-math-menu-unicode}, @ref{Mathematics}. +@end ifclear + +@item +Bug fixes for XEmacs. + +@c The following items weren't present at release time of 11.53: +@item +Completion for graphic files in the @TeX{} search path has been added. + +@item +@command{start} is used for the viewer for MiK@TeX{} and fp@TeX{}. + +@item +The variable @code{TeX-fold-preserve-comments} can now be customized to +deactivate folding in comments. +@end itemize + +@heading News in 11.52 +@c Not present at release time of 11.52. + +@itemize @bullet +@item +Installation and menus under XEmacs work again (maybe for the first +time). + +@item +Fontification of subscripts and superscripts is now disabled when the +fontification engine is not able to support it properly. + +@item +Bug fixes in the build process. +@end itemize + +@heading News in 11.51 +@c Not present at release time of 11.51. + +@itemize @bullet +@item +PDF@TeX{} and Source Special support did not work with @ConTeXt{}, +this has been fixed. Similar for Source Special support under Windows. + +@item +Omega support has been added. + +@item +Bug fixes in the build process. + +@item +@code{TeX-fold} now supports folding of environments in Texinfo mode. +@end itemize + +@heading News in 11.50 + +@itemize @bullet +@item +The use of source specials when processing or viewing the document can +now be controlled with the new @code{TeX-source-specials} minor mode +which can be toggled via an entry in the Command menu or the key binding +@kbd{C-c C-t C-s}. If you have customized the variable +@code{TeX-command-list}, you have to re-initialize it for this to work. +This means to open a customization buffer for the variable by typing +@kbd{M-x customize-variable @key{RET} TeX-command-list @key{RET}}, selecting +``Erase Customization'' and do your customization again with the new +default. + +@item +The content of the command menu now depends on the mode (plain @TeX{}, +@LaTeX{}, @ConTeXt{} etc.). Any former customization of the variable +@code{TeX-command-list} has to be erased. Otherwise the command menu +and the customization will not work correctly. + +@item +Support for hiding and auto-revealing macros, e.g.@: footnotes or +citations, and environments in a buffer was +@ifset rawfile +added. +@end ifset +@ifclear rawfile +added, @ref{Folding}. +@end ifclear + +@item +You can now control if indentation is done upon typing @key{RET} by +customizing the variable +@ifset rawfile +@code{TeX-newline-function}. +@end ifset +@ifclear rawfile +@code{TeX-newline-function}, @ref{Indenting}. +@end ifclear + +@item +Limited support for @code{doc.sty} and @code{ltxdoc.cls} (@samp{dtx} +files) was added. The new doc@TeX{} mode provides functionality for +editing documentation parts. This includes formatting (indenting and +filling), adding and completion of macros and environments while staying +in comments as well as syntax highlighting. (Please note that the mode +is not finished yet. For example syntax highlighting does not work yet +in XEmacs.) + +@item +For macro completion in doc@TeX{} mode the @AUCTeX{} style files +@file{doc.el}, @file{ltxdoc.el} and @file{ltx-base.el} were included. +The latter provides general support for low-level @LaTeX{} macros and +may be used with @LaTeX{} class and style files as well. It is +currently not loaded automatically for those files. + +@item +Support for @ConTeXt{} with a separate @ConTeXt{} mode is now included. +Macro definitions for completion are available in Dutch and English. + +@item +The filling and indentation code was overhauled and is now able to +format commented parts of the source syntactically correct. Newly +available functionality and customization options are explained in the +manual. + +@item +Filling and indentation in XEmacs with @previewlatex{} and activated +previews lead to the insertion of whitespace before multi-line previews. +@AUCTeX{} now contains facilities to prevent this problem. + +@item +If @code{TeX-master} is set to @code{t}, @AUCTeX{} will now query for a +master file only when a new file is opened. Existing files will be left +alone. The new function @code{TeX-master-file-ask} (bound to @kbd{C-c +_} is provided for adding the variable manually. + +@item +Sectioning commands are now shown in a larger font on display devices +which support such fontification. The variable +@code{font-latex-title-fontify} can be customized to restore the old +appearance, i.e.@: the usage of a different color instead of a change in +size. + +@item +Support for @code{alphanum.sty}, @code{beamer.cls}, @code{booktabs.sty}, +@code{captcont.sty}, @code{emp.sty}, @code{paralist.sty}, +@code{subfigure.sty} and @code{units.sty}/@code{nicefrac.sty} was added. +Credits go to the authors mentioned in the respective @AUCTeX{} style +files. + +@item +Inserting graphics with @kbd{C-c @key{RET} includegraphics @key{RET}} was improved. +See the variable @code{LaTeX-includegraphics-options-alist}. +@c FIXME: Document this in the main part of the manual + +@item +If @code{LaTeX-default-position} is @code{nil}, don't prompt for +position arguments in Tabular-like +@ifset rawfile +environments. +@end ifset +@ifclear rawfile +environments, see @ref{Tabular-like}. +@end ifclear + +@item +Completion for available packages when using @kbd{C-c @key{RET} usepackage +@key{RET}} was improved on systems using the kpathsea library. + +@item +The commenting functionality was fixed. The separate functions for +commenting and uncommenting were unified in one function for paragraphs +and regions respectively which do both. + +@item +Syntax highlighting can be customized to fontify quotes delimited by +either >>German<< or <<French>> quotation marks by changing the variable +@code{font-latex-quotes}. + +@item +Certain @TeX{}/@LaTeX{} keywords for functions, references, variables +and warnings will now be fontified specially. You may add your own +keywords by customizing the variables +@code{font-latex-match-function-keywords}, +@code{font-latex-match-reference-keywords}, +@code{font-latex-match-variable-keywords} and +@code{font-latex-match-warning-keywords}. + +@item +If you include the style files @file{german} or @file{ngerman} in a +document (directly or via the @samp{babel} package), you should now +customize @code{LaTeX-german-open-quote}, +@code{LaTeX-german-close-quote} and +@code{LaTeX-german-quote-after-quote} instead of @code{TeX-open-quote}, +@code{TeX-close-quote} and @code{TeX-quote-after-quote} if you want to +influence the type of quote insertion. + +@item +Upon viewing an output file, the right viewer and command line options +for it are now determined automatically by looking at the extension of +the output file and certain options used in the source file. The +behavior can be adapted or extended respectively by customizing the +variable @code{TeX-output-view-style}. + +@item +You can control whether @code{TeX-insert-macro} (@kbd{C-c @key{RET}}) ask for +all optional arguments by customizing the variable +@ifset rawfile +@code{TeX-insert-macro-default-style}. +@end ifset +@ifclear rawfile +@code{TeX-insert-macro-default-style}, @ref{Completion}. +@end ifclear + +@item +@code{TeX-run-discard} is now able to completely detach a process that +it started. + +@item +The build process was enhanced and is now based on @code{autoconf} +making installing @AUCTeX{} a mostly automatic process. See +@ifset rawfile +the files @file{INSTALL} and @file{INSTALL.windows} +@end ifset +@ifclear rawfile +@ref{Installation} and @ref{Installation under MS Windows} +@end ifclear +for details. +@end itemize + +@heading News in 11.14 + +@itemize @bullet +@item +Many more @LaTeX{} and @LaTeX{}2e commands are supported. +Done by Masayuki Ataka @email{ataka@@milk.freemail.ne.jp} +@end itemize + +@heading News in 11.12 + +@itemize @bullet +@item +Support for the KOMA-Script classes. +Contributed by Mark Trettin @email{Mark.Trettin@@gmx.de}. +@end itemize + +@heading News in 11.11 + +@itemize @bullet +@item +Support for @file{prosper.sty}, see @url{http://prosper.sourceforge.net/}. +Contributed by Phillip Lord @email{p.lord@@russet.org.uk}. +@end itemize + +@heading News in 11.10 + +@itemize @bullet +@item +@code{comment-region} now inserts @t{%%} by default. +Suggested by "Davide G. M. Salvetti" @email{salve@@debian.org>}. +@end itemize + +@heading News in 11.06 + +@itemize @bullet +@item +You can now switch between using the @file{font-latex} (all emacsen), +the @file{tex-font} (Emacs 21 only) or no special package for font +locking. Customize @code{TeX-install-font-lock} for this. +@end itemize + +@heading News in 11.04 + +@itemize @bullet +@item +Now use @t{-t landscape} by default when landscape option appears. +Suggested by Erik Frisk @email{frisk@@isy.liu.se}. +@end itemize + +@heading News in 11.03 + +@itemize @bullet +@item +Use @file{tex-fptex.el} for fp@TeX{} support. +Contributed by Fabrice Popineau @email{Fabrice.Popineau@@supelec.fr}. +@end itemize + +@heading News in 11.02 + +@itemize @bullet +@item +New user option @code{LaTeX-top-caption-list} specifies environments +where the caption should go at top. +Contributed by @email{ataka@@milk.freemail.ne.jp} (Masayuki Ataka). + +@item +Allow explicit dimensions in @file{graphicx.sty}. +Contributed by @email{ataka@@milk.freemail.ne.jp} (Masayuki Ataka). + +@item +Limited support for @file{verbatim.sty}. +Contributed by @email{ataka@@milk.freemail.ne.jp} (Masayuki Ataka). + +@item +Better support for amsmath items. +Patch by @email{ataka@@milk.freemail.ne.jp} (Masayuki Ataka). + +@item +More accurate error parsing. +Added by David Kastrup @email{David.Kastrup@@t-online.de}. +@end itemize + +@heading News in 11.01 + +@itemize @bullet +@item +Bug fixes. +@end itemize + +@c Local Variables: +@c mode: texinfo +@c TeX-master: "auctex" +@c End: diff --git a/elpa/auctex-13.1.3/doc/copying.texi b/elpa/auctex-13.1.3/doc/copying.texi new file mode 100644 index 0000000..b273df1 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/copying.texi @@ -0,0 +1,48 @@ +@include macros.texi +@c ----------------------- +@cindex Copying +@cindex Copyright +@cindex GPL +@cindex General Public License +@cindex License +@c @cindex Free +@c @cindex Free software +@c @cindex Distribution +@c @cindex Right +@cindex Warranty + +(This text is stolen from the Texinfo manual, Edition 4.0). + +The programs currently being distributed that relate to @previewlatex{} +include lisp files for Emacs and style files for @LaTeX{}. These +programs are @dfn{free}; this means that everyone is free to use them +and free to redistribute them on a free basis. The @previewlatex{} +related programs are not in the public domain; they are copyrighted and +there are restrictions on their distribution, but these restrictions are +designed to permit everything that a good cooperating citizen would want +to do. What is not allowed is to try to prevent others from further +sharing any version of these programs that they might get from you. + +Specifically, we want to make sure that you have the right to give away +copies of the programs that relate to @previewlatex{}, that you receive +source code or else can get it if you want it, that you can change these +programs or use pieces of them in new free programs, and that you know +you can do these things. + +To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of the @previewlatex{} related programs, you must give the +recipients all the rights that you have. You must make sure that they, +too, receive or can get the source code. And you must tell them their +rights. + +Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for the programs that relate to +@previewlatex{}. If these programs are modified by someone else and +passed on, we want their recipients to know that what they have is not +what we distributed, so that any problems introduced by others will not +reflect on our reputation. + +The precise conditions of the licenses for the programs currently being +distributed that relate to @previewlatex{} are found in the General Public +Licenses that accompany them. diff --git a/elpa/auctex-13.1.3/doc/faq.texi b/elpa/auctex-13.1.3/doc/faq.texi new file mode 100644 index 0000000..a6122ec --- /dev/null +++ b/elpa/auctex-13.1.3/doc/faq.texi @@ -0,0 +1,158 @@ +@c This is part of the AUCTeX Manual. +@c Copyright (C) 2004-2014, 2021, 2022 Free Software Foundation, Inc. +@c See the file auctex.texi for copying conditions. +@ifset rawfile +@include macros.texi +@chapheading Frequently Asked Questions about @AUCTeX{} +@end ifset + +@c We should switch to sectioning commands instead of items when this +@c list grows. Keep in mind to formulate short questions because +@c section headings will not be broken in contrast to items. +@enumerate +@item +Something is not working correctly. What should I do? + +Well, you might have guessed it, the first place to look is in the +available documentation packaged with @AUCTeX{}. This could be the +release notes (in the @file{RELEASE} file) or the news section of the +manual in case you are experiencing problems after an upgrade, the +@file{INSTALL} file in case you are having problems with the +installation, the section about bugs in the manual in case you +encountered a bug or the relevant sections in the manual for other +related problems. + +If this did not help, you can send a bug report to the @AUCTeX{} bug +reporting list by using the command @kbd{M-x TeX-submit-bug-report @key{RET}}. +But before you do this, you can try to get more information about the +problem at hand which might also help you locate the cause of the error +yourself. + +First, you can try to generate a so-called backtrace which shows the +functions involved in a program error. In order to do this, start Emacs +with the command line @samp{emacs --debug-init} and/or put the line + +@lisp +(setq debug-on-error t) +@end lisp + +as the first line into your init file. After Emacs has started, you can +load a file which triggers the error and a new window should pop up +showing the backtrace. If you get such a backtrace, please include it +in the bug report. + +Second, you can try to figure out if something in your personal or site +configuration triggers the error by starting Emacs without such +customizations. You can do this by invoking Emacs with the following +command line, depending on the installation scheme of @AUCTeX{} and your +@acronym{OS}: +@itemize +@item +If you installed @AUCTeX{} from @acronym{ELPA}, use @samp{emacs -q +-no-site-file --eval "(progn (setq package-load-list '((auctex t))) +(package-initialize))"}. The @option{--eval} option activates only +@AUCTeX{} among all installed @acronym{EPLA} packages. +@item +If you installed @AUCTeX{} via traditional +@command{configure}--@command{make} scheme, use @samp{emacs -q +-no-site-file -l auctex}. The @option{-l} option loads @file{auctex.el} +which you normally do in your init file. +@item +In both above cases, use @samp{runemacs} instead of @samp{emacs} on +windows. +@end itemize + +After you +have started Emacs like this, you can load the file triggering the +error. If everything is working now, you know that you have to search +either in the site configuration file or your personal init file for +statements related to the problem. + +@item +What versions of Emacs are supported? + +@AUCTeX{} was tested with @w{GNU Emacs 25.1}. Older versions may work but +are unsupported. + +@item +What should I do when @command{./configure} does not find programs like @command{latex}? + +This is problem often encountered on Windows. Make sure that the +@env{PATH} environment variable includes the directories containing the +relevant programs, as described in +@ifset rawfile +the file @file{INSTALL.windows} +@end ifset +@ifclear rawfile +@ref{Installation under MS Windows,,,auctex,the @AUCTeX{} manual}. +@end ifclear + +@item +Why doesn't the completion, style file, or multifile stuff work? + +It must be enabled first, insert this in your init file: + +@lisp +(setq-default TeX-master nil) +(setq TeX-parse-self t) +(setq TeX-auto-save t) +@end lisp + +Read also the chapters about parsing and multifile documents in the +manual. +@ifclear rawfile +@xref{Parsing Files} and @ref{Multifile}. +@end ifclear + +@item +Why doesn't @code{TeX-save-document} work? + +@code{TeX-check-path} has to contain "@file{./}" somewhere. + +@item +Why is the information in @file{foo.tex} forgotten when I save +@file{foo.bib}? + +For various reasons, @AUCTeX{} ignores the extension when it stores +information about a file, so you should use unique base names for your +files. E.g.@: rename @file{foo.bib} to @file{foob.bib}. + +@item +Why doesn't @AUCTeX{} signal when processing a document is done? + +If the message in the minibuffer stays "Type `C-c C-l' to display +results of compilation.", you probably have a misconfiguration in your +init file (@file{.emacs}, @file{init.el} or similar). To track this +down either search in the @samp{*Messages*} buffer for an error message +or put @code{(setq debug-on-error t)} as the first line into your init +file, restart Emacs and open a @LaTeX{} file. Emacs will complain +loudly by opening a debugging buffer as soon as an error occurs. The +information in the debugging buffer can help you find the cause of the +error in your init file. + +@item +Why does @code{TeX-next-error} (@kbd{C-c `}) fail? + +If @code{TeX-file-line-error} is set to nil (not the default), these +sort of failures might be related to the the fact that when writing the +log file, @TeX{} puts information related to a file, including error +messages, between a pair of parentheses. In this scenario @AUCTeX{} +determines the file where the error happened by parsing the log file and +counting the parentheses. This can fail when there are other, +unbalanced parentheses present. + +Activating so-called @samp{file:line:error} messages for the log file usually +solves this issue, as these kind of messages are are easier to parse; +however, they may lack some details. Activation can be done either in +the configuration of your @TeX{} system (consult its manual to see where +this is) or by simply keeping the variable @code{TeX-file-line-error} to +the default value of non-nil. + +@item +What does @samp{AUC} stand for? + +@AUCTeX{} came into being at Aalborg University in Denmark. Back then +the Danish name of the university was Aalborg Universitetscenter; @samp{AUC} +for short. + +@end enumerate diff --git a/elpa/auctex-13.1.3/doc/fdl.texi b/elpa/auctex-13.1.3/doc/fdl.texi new file mode 100644 index 0000000..ef31dae --- /dev/null +++ b/elpa/auctex-13.1.3/doc/fdl.texi @@ -0,0 +1,506 @@ +@node GNU Free Documentation License +@appendixsec GNU Free Documentation License + +@cindex FDL, GNU Free Documentation License +@center Version 1.3, 3 November 2008 + +@display +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software +Foundation, Inc. @uref{https://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{https://www.gnu.org/licenses/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + +@end enumerate + +@page +@heading ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with@dots{}Texts.''@: line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + diff --git a/elpa/auctex-13.1.3/doc/history.texi b/elpa/auctex-13.1.3/doc/history.texi new file mode 100644 index 0000000..0595bb6 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/history.texi @@ -0,0 +1,1918 @@ +@include macros.texi +@section News in 10.0 + +@itemize @bullet + +@item +Disabled @code{LaTeX-hide-environment}. +Suggested by Christopher Allen <cpcallen@@ruah.dyndns.org>. + +@item +Changed default to lazy evaluation of @code{TeX-view-style} and +@code{LaTeX-command-style}. +Suggested by Peter Neergaard <turtle@@cs.bu.edu>. + +@item +Backindent when brace is at the start of a line. +Patch by Masashi Shimbo <shimbo@@cis.ibaraki.ac.jp>. + +@item +Added Emacs 21 font lock support. + +@item +@kbd{,} and @kbd{.} no longer removes italic correction. + +@item +@code{graphicx} and @code{graphics} style support. +Donated by Ryuichi Arafune <arafune@@ushioda.riec.tohoku.ac.jp>. + +@item +@code{LaTeX-math-abbrev-prefix} now accepts vector value. +Reported by Jan Vroonhof <vroonhof@@math.ethz.ch>. + +@item +Improved Texinfo support(more environments and html). +Patch by Akim Demaille <akim@@epita.fr>. + +@item +@code{danish} quotes support. +Suggested by arne@@daimi.au.dk (Arne Joergensen). + +@item +Some PDF support. + +@item +New @file{tex-mik.el} file for MiK@TeX{} support. + +@item +Some commands now have their own history. +Suggested by Werner LEMBERG <sx0005@@sx2.HRZ.Uni-Dortmund.DE>. + +@item +Use @code{\centering} instead of center environment in figures. +Patch by Stefan Monnier <foo@@acm.com>. + +@item +New @code{dwim} setting for @code{TeX-master} attempts to guess +a default master for new files. +Patch by Stefan Monnier <foo@@acm.com>. + +@item +@code{ngerman} style support. +Just a copy of the german style support. + +@item +Removed support for Emacs 18 and 19. + +@item @code{mdwlist} support. +Patch by Stephen Heilbronner <heilbron@@nm.informatik.uni-muenchen.de>. + +@item +Fixed various bugs with the babel package. + +@item @code{amsart} and @code{amsbook} now loads @code{amsthm} by default. +Patch by Rune Kleveland <runekl@@math.uio.no>. + +@item Fixed bug with file searching. +Reported by Berwin Turlach <bturlach@@maths.adelaide.edu.au>. + +@item Finalized index support, added index-related style files. +Patch by Carsten Dominik <dominik@@strw.leidenuniv.nl>. + +@item New style files for @file{varioref.sty} and @file{fancyref.sty}. +Patch by Carsten Dominik <dominik@@strw.leidenuniv.nl>. + +@item @code{texmathp} recognizes additional macros like @code{\fbox}. +Patch by Ulrik Vieth <vieth@@thphy.uni-duesseldorf.de>. + +@end itemize + +@section News in 9.9 + +@itemize @bullet +@item Bug fix in JLATEX recognition. Patch by +Tsutomu OKUMURA <oku@@nml.t.u-tokyo.ac.jp>. + +@item Bug fix in foils package sypport. +Suggested by Bernt Guldbrandtsen <bernt@@jupiter.ansci.iastate.edu>. + +@item Made @code{make install-contrib} compile the contributed lisp +files. +Suggested by Nils Ackermann <Nils.Ackermann@@math.uni-giessen.de>. + +@item In @code{texinfo-mode}, @kbd{C-c C-f C-d} now deletes the current +font, while @kbd{C-u C-c C-f @var{key}} changes it. @samp{@@dfn} moved +to @kbd{C-c C-f d}. Suggested by Christoph Wedler +<wedler@@fmi.uni-passau.de>. + +@item Fixed some custom types. +Patch by Markus Rost <markus.rost@@mathematik.uni-regensburg.de>. + +@item Support loading byte compiled files, even if +@code{TeX-byte-compile} is nil. +Patch by Christoph Wedler <wedler@@fmi.uni-passau.de>. + +@item The command to replace a LaTeX2e font should work more reliably +now. Patch by Christoph Wedler <wedler@@fmi.uni-passau.de>. + +@item Minor XEmacs packaging changes. +Patch by Christoph Wedler <wedler@@fmi.uni-passau.de>. + +@item @code{TeX-file-recurse} now accepts an integer value, max depth of +recursion. Patch by Alastair Burt <burt@@dfki.bde>. + +@item Simple imenu support for @LaTeX{}. + +@item Workaround for 20.3 bugs. + +@item The `Spell' command now works on all open buffers in the +document. Patch by Jason Stewart <jasons@@cs.unm.edu>. + +@item @kbd{C-c C-m} now puts content of region inside first empty brackets +in the macro, if any. Patch by Peter Thiemann <pjt@@cs.nott.ac.uk>. + +@item Update of @file{natbib.el} style file by Carsten Dominik +<dominik@@strw.LeidenUniv.nl>. + +@item Much better detection of @TeX{} math mode. Patch by Carsten Dominik +<dominik@@strw.LeidenUniv.nl>. + +@item New @samp{%n} escape in @code{TeX-command-list} for entering the +current line number. Suggested by "Lee, Sang-Min" +<smagus@@acorn.snu.ac.kr>. + +@item Doc fixes in manual. Patch by Gustavo Chaves +<gustavo@@cpqd.com.br>. + +@item Better reftex support for sections. Patch by Carsten Dominik +<dominik@@strw.LeidenUniv.nl>. + +@item Bug fixes in math card. Reported by "Ron Smith" +<rsmith@@eel.ufl.edu>. + +@item Better multifile support. Patch by Soren Dayton +<csdayton@@cs.uchicago.edu>. + +@item Don't expand abbreviations when @code{abbrev-mode} is nil. +Suggested by Alastair Burt <alastair.burt@@dfki.de>. + +@item @samp{direntry} support in manual, by SL Baur +<steve@@altair.xemacs.org>. +@end itemize + +@section News in 9.8 + +@itemize @bullet +@item Added @code{natbib.el} to support natbib.sty by Patrick W. Daly. +Submitted by Berwin A. Turlach @samp{<berwin.turlach@@anu.edu.au>}. + +@item +More @LaTeX{}2e support by Jan Vroonhof +@samp{<vroonhof@@math.ethz.ch>}.@refill + +@item Make @code{TeX-master} a local variable in Bib@TeX{} mode and set +it to true. This seems to be necessary to enable auto-parsing of a .bib +file. Patch by Berwin A. Turlach @samp{<berwin.turlach@@anu.edu.au>}. + +@item Support for Harvard style updated by Berwin A. Turlach +@samp{<berwin.turlach@@anu.edu.au>}. + +@item +Support for `natbib' package. +By Berwin Turlach @samp{<berwin.turlach@@anu.edu.au>}. + +@item +Finer control of automatic parsing of @TeX{} files: new variables +@code{TeX-auto-x-parse-length} and @code{TeX-auto-x-regexp-list}. +By Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}. + +@item +Finer control of indentation: new variables @code{LaTeX-document-regexp}, +@code{LaTeX-verbatim-regexp}, @code{LaTeX-begin-regexp}, +@code{LaTeX-end-regexp} and @code{LaTeX-indent-comment-start-regexp}. +By Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}. + +@item +When running @LaTeX{} on a region, do not complain about undefined +citations. See variable @code{TeX-region-extra}. +By Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}. + +@item +Split menu for LaTeX environments into submenus if number of +environments is larger than the value of the new variable +@code{LaTeX-menu-max-items}. +By Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}. + +@item +More reftex support with new @code{TeX-arg-ref} function. +By Soren Dayton @samp{<csdayton@@cs.uchicago.edu>}, with @file{amsmath} +support by Carsten Dominik @samp{<dominik@@strw.LeidenUniv.nl>}. + +@item +Minimal parser now recognize @code{usepackage}. +By Carsten Dominik @samp{<dominik@@strw.LeidenUniv.nl>}. + +@item +More amstex styles recognized. +By Carsten Dominik @samp{<dominik@@strw.LeidenUniv.nl>}. + +@item +Czech and Slovak support. +By Milan Zamazal @samp{<pdm@@fi.muni.cz>}. + +@end itemize + + +@section News in 9.7 + +@itemize @bullet +@item +Added support for customize. + +@item +Added minimal support for @code{sentence-end-double-space}. + +@end itemize + +@section News in 9.6 + +@itemize @bullet +@item +NT installation instructions added. + +@item +@file{func-doc.el} unbundled, as @file{word-help.el} will be added to +the standard Emacs distribution. See @url{http://www.ifi.uio.no/~jensthi/}. + +@item +@samp{$} is now of the syntax class `matched pair', suggested by Mats +Bengtsson @samp{<matsb@@s3.kth.se>}. + +@item +Now use @kbd{,} to enter multiple arguments to a @samp{\cite} or +@samp{\bibliography} command instead of @kbd{@key{ret}}. + +@item +Installation procedure is changed, read the @file{INSTALLATION} file. + +@item +LaCheck is unbundled. You can get @code{lacheck} from +@file{<URL:ftp://sunsite.dk/pub/text/lacheck/>} or alternatively +@code{chktex} from +@file{<URL:ftp://ftp.dante.de/pub/tex/support/chktex/>}. Search for +`chktex' in @file{tex.el} to see how to switch between them.@refill + +@item +Insert @code{(require 'font-latex)} to get better font lock support. + +@item +Bug fixes. + +@item +Better handling of subdirectories, suggested by Frederic Devernay +@samp{<Frederic.Devernay@@sophia.inria.fr>} and many others. +@end itemize + +@section News in 9.5 + +@itemize @bullet +@item Use the @file{func-doc.el} package to get context senstive help. +This is not autoloaded, you must load it explicitly with: + +@lisp +(require 'func-doc) +@end lisp + +@item +Bug fixes. + +@end itemize + +@section News in 9.4 + +@itemize @bullet +@item There is now a menu in @code{LaTeX-math-minor-mode}. + +@item +Bug fixes. +@end itemize + +@section News in 9.3 + +@itemize @bullet +@item +Bug fixes. +@end itemize + +@section News in 9.2 + +@itemize @bullet +@item +Bug fixes. + +@item +New file @file{bib-cite.el} contributed by Peter S. Galbraith +@samp{<rhogee@@bathybius.meteo.mcgill.ca>}. This file is not installed +or enabled by default and is not part of the basic AUC @TeX{} +package. If you have problems, questions, or suggestions, please direct +them to Peter. + +@item +New file @file{hilit-LaTeX.el} contributed by Peter S. Galbraith +@samp{<rhogee@@bathybius.meteo.mcgill.ca>}. This file is not installed +or enabled by default and is not part of the basic AUC @TeX{} +package. If you have problems, questions, or suggestions, please direct +them to Peter. + +@item +AUC @TeX{} is now less likely to suggest running Bib@TeX{} when it is +not needed. + +@item +Press @kbd{M-x LaTeX-209-to-2e @key{ret}} to make a stab at converting a +@LaTeX{} 2.09 header to @LaTeX{}2e. + +@item +@kbd{C-c C-m input @key{ret}} should be faster now on second try. + +@item +New variable @code{LaTeX-left-right-indent-level} controls the +indentation added by @samp{\left}. + +@item +@samp{\begin}, @samp{\end}, @samp{\left}, and @samp{\right} no longer +need to be at the beginning of the line to take effect. + +@item +You can now delete and replace @LaTeX{}2e style fonts. + +@item +Moved external commands to new menu. + +@item +@kbd{C-c C-m cite @key{ret}} will prompt for multiple keys. + +@item +Better handling of @samp{"} with @file{german.sty}. + +@item +New variable @code{LaTeX-paragraph-commands} lists @LaTeX{} commands +that shouldn't be formatted as part of a paragraph. + +@item +Older news moved to @file{HISTORY}. It is not @TeX{}info able, but you +can get a plaintext version with @samp{make HISTORY}. + +@item +See the new @file{ChangeLog} file for a more detailed list of changes. +The history section will now only contain user level changes. If you +send me a patch, please also provide a ChangeLog entry. +@end itemize + +@node Version 9.1 +@section News in 9.1 + +Coordinater: Per Abrahamsen, 1994. + +Alpha testers (in order of appearance): +Bernt Guldbrandtsen @samp{<bernt@@weinberg.pop.bio.aau.dk>}, +Kevin Scott @samp{<scottkj@@prl.philips.co.uk>}, +Lawrence R. Dodd @samp{<dodd@@roebling.poly.edu>}, +Michelangelo Grigni @samp{<mic@@cs.ucsd.edu>}, +David Aspinall @samp{<da@@dcs.edinburgh.ac.uk>}, +Frederic Devernay @samp{<Frederic.Devernay@@sophia.inria.fr>}, +Robert Estes @samp{<estes@@ece.ucdavis.edu>}, +Peter Whaite @samp{<peta@@cim.mcgill.ca>}, +Karl Eichwalder @samp{<karl@@pertron.central.de>}, +John Interrante @samp{<interran@@uluru.Stanford.EDU>}, +James A. Robinson @samp{<jimr@@simons-rock.edu>}, +Tim Carlson @samp{<imsgtcar@@mathfs.math.montana.edu>}, +Michelangelo Grigni @samp{<mic@@cs.ucsd.edu>}, +Manoj Srivastava @samp{<srivasta@@pilgrim.umass.edu>}, +Richard Stanton @samp{<stanton@@haas.berkeley.edu>}, +Kobayashi Shinji @samp{<koba@@flab.fujitsu.co.jp>}, +and probably more.@refill + +@itemize @bullet +@item +@LaTeX{}2e is now default. Set @code{LaTeX-version} to @samp{"2"} to +disable this. + +@item +Better handling of @samp{*TeX background*} buffer. Suggested by John +Interrante @samp{<interran@@uluru.Stanford.EDU>}. + +@item +Parser did not recognise the use of @samp{\def} to create @LaTeX{} +environments. Reported by Frederic Devernay +@samp{<Frederic.Devernay@@sophia.inria.fr>}. + +@item +Minor cleanup in some error messages. + +@item +Fixed bug in @code{TeX-comment-paragraph} when called with a negative +argument. Reported by Markus Kramer @samp{<kramer@@inf.fu-berlin.de>}. + +@item +Don't move point in master file when running a command on the region in +an included file. Thanks to Karl Wilhelm Langenberger +@samp{<wlang@@rs6000.mri.akh-wien.ac.at>} for the patch. + +@item +@code{LaTeX-math-mode} no longer works on Emacs 18 or older Lucid +versions. This change allowed me to unbundle @file{min-map.el}. + +@item +Made @kbd{C-c C-e} more robust, especially when applied on an empty +active region. Reported by Andrew Senior @samp{<aws@@eng.cam.ac.uk>}. + +@item +@kbd{C-c C-m section RET} and @kbd{M-@key{tab}} should work now in +@TeX{}info mode. @kbd{C-c C-b} and @kbd{C-c C-r} removed, since they +did not work. Reported by Karl Eichwalder +@samp{<karl@@pertron.central.de>}. + +@item +Made @kbd{M-q} skip block comments. Sugested by Peter Whaite +@samp{<peta@@cim.mcgill.ca>}. + +@item +Code cleanup: Renamed @samp{-format-} functions to @samp{-fill-}. + +@item +Made @kbd{,} and @kbd{.} remove any preceding italic correction. + +@item +Changes in math mode: @samp{setminus} moved to @key{\}, @samp{not} moved +to @key{/}, and @samp{wedge}, @samp{vee}, and @samp{neg} installed on +@key{&}, @kbd{|}, and @kbd{!} to make writing logic easier for C +programmers. + +@item +Renamed @file{auc-tex.el} to @file{auc-old.el} to make it less likely +that new users load it by mistake. + +@item +Changed name of @file{easymenu.el} to @file{auc-menu.el} to avoid +conflict with RMS's version. Updated it to handle the Lucid +@code{:keys} keyword argument. Defines a popup menu for both FSF and +Lucid emacs, although it is only installed in Lucid Emacs. Added David +Aspinall's @samp{<da@@dcs.edinburgh.ac.uk>} patch to handle an empty +menu bar under Lucid Emacs. The interface is still a superset of +@file{easymenu.el}. This version should no longer prevent the sharing +of byte compiled files between FSF and Lucid emacs. + +@item +Marking a section or environment now highlight it in Lucid Emacs. It +already worked in GNU Emacs. Thanks to Andreas Ernst +@samp{ernst_a@@maths.uwa.edu.au}. + +@item +Font support for @LaTeX{}2e. Many people suggested this. +Automatically activated for all documents defined with +@samp{\documentclass}. + +@item +Outline support for @LaTeX{}2e fixed by Robert Estes +@samp{<estes@@ece.ucdavis.edu>}. + +@item +@samp{bibliography} macro now works. Thanks to Frederic Devernay +@samp{<Frederic.Devernay@@sophia.inria.fr>}. + +@item +Fixes to @file{psfig} support by Thomas Graichen +@samp{<graichen@@sirius.physik.fu-berlin.de>}. + +@item +Fixed position of @samp{\label} in environments. Reported by Richard +Stanton @samp{<stanton@@haas.berkeley.edu>}. + +@item +Made the name of the AUC @TeX{} menu mode specific. + +@item +More reliable guesses with @kbd{C-c C-r}. Thanks to Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>}. + +@item +Insert newline before inserting local variable section. Thanks to +Rajeev Gore' @samp{<rpg@@cs.man.ac.uk>}. + +@item +Fixes to Japanese version. Thanks to Kobayashi Shinji +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Fixed bug in @samp{put} and @samp{multiput} macros. Thanks to Kobayashi +Shinji @samp{<koba@@flab.fujitsu.co.jp>} and Masayuki Kuwada +<kuwada@@axion-gw.ee.uec.ac.jp>. + +@item +Display number of pages after end of @LaTeX{} compilation. Thanks to +Lawrence R. Dodd @samp{<dodd@@roebling.poly.edu>}. + +@item +Only update section and environment menus when the lists have changed. + +@item +New variables @code{LaTeX-header-end} and @code{LaTeX-trailer-start}. + +@item +Some Emacs 18 compatibility changes. Thanks to Fran E. Burstall +@samp{<F.E.Burstall@@maths.bath.ac.uk>}. + +@item +Use nonrecursive function to determine the current environment. This +should solve problems with exceeding lisp max depth. Contributed by +David Aspinall @samp{<da@@dcs.edinburgh.ac.uk>}. + +@item +Fixed documentation for @kbd{` ~} in @file{math-ref.tex}. Thanks to +Morten Welinder @samp{<terra@@diku.dk>}. + +@item +Made @code{LaTeX-math-mode} work better with FSF Emacs 19 in the case +where you press something undefined, in particular function keys. +Requested by several. + +@item +Inserting an itemize environment around the active region now insert the +first item inside the environment. Thanks to Berwin A. Turlach +@samp{<berwin@@core.ucl.ac.be>} for reporting this. + +@item +Fixed bug in right button menu under Lucid. Reported by Frederic +Devernay @samp{<Frederic.Devernay@@sophia.inria.fr>}. +@end itemize + +@node Version 9.0 +@section News in 9.0 + +Coordinator: Per Abrahamsen, 1994. + +Alpha testers (in order of appearance): +Volker Dobler @samp{<dobler@@etu.wiwi.uni-karlsruhe.de>}, +Piet van Oostrum @samp{<piet@@cs.ruu.nl>}, +Frederic Devernay @samp{<Frederic.Devernay@@sophia.inria.fr>}, +Robert Estes @samp{<estes@@ece.ucdavis.edu>}, +Berwin Turlach @samp{<berwin@@core.ucl.ac.be>}, +Tim Carlson @samp{<imsgtcar@@mathfs.math.montana.edu>}, +Peter Thiemann @samp{<thiemann@@provence.informatik.uni-tuebingen.de>}, +Kevin Scott @samp{<scottkj@@prl.philips.co.uk>}, +Lawrence R. Dodd @samp{<dodd@@roebling.poly.edu>}, +Johan Van Biesen @samp{<vbiesen@@wins.uia.ac.be>}, +Marc Gemis @samp{<makke@@wins.uia.ac.be>}, +Michelangelo Grigni @samp{<mic@@cs.ucsd.edu>}, +Kevin Scott @samp{<scottkj@@prl.philips.co.uk>}, +Peter Paris @samp{<pparis@@bass.gmu.edu>}, +Peter Barth @samp{<barth@@mpi-sb.mpg.de>}, +Andy Piper @samp{<ajp@@eng.cam.ac.uk>}, +Richard Stanton @samp{<stanton@@haas.berkeley.edu>}, +Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}, +Graham Gough @samp{<graham@@cs.man.ac.uk>}, +and probably more.@refill + +@itemize @bullet +@item +Fixed problem with @file{filladapt} defeating @LaTeX{} mode's own +indentation algorithm. Thanks to Piet van Oostrum +@samp{<piet@@cs.ruu.nl>}. + +@item +Made environments and sections selectable from the menu bar. + +@item +Support Emacs comment conventions. Comments starting with a single +@samp{%} are indented at @code{comment-column}. Comments starting with +@samp{%%%} are indented at column 0. Comments starting with +@samp{%%} are indented like ordinary text. You can set the variables +@code{LaTeX-right-comment-regexp} and @code{LaTeX-left-comment-regexp} +to nil to disable this. See also @code{LaTeX-ignore-comment-regexp}. +Rewrote it from Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>} from +original code. + +@item +@key{tab} and @key{lfd} will not indent code in @samp{verbatim} +environment if you set @code{LaTeX-indent-environment-check} to non-nil. +This was also first implemented by Christoph Wedler +@samp{<wedler@@fmi.uni-passau.de>}. + +@item +You can now get get custom indentation for various environments. See +@code{LaTeX-indent-environment-list}. + +@item +@kbd{C-c C-m left @key{ret}} new automatically inserts a matching +@samp{\right}. See variables @code{TeX-left-right-braces}, +@code{TeX-braces-default-association}, and +@code{TeX-braces-user-association}. This feature was suggested by Jesse +@samp{<jes@@math.msu.edu>} and implemented by Berwin Turlach +@samp{<berwin@@core.ucl.ac.be>}. + +@item +Don't automatically display the compilation buffer unless +@code{TeX-show-compilation} in non-nil. Suggested by Stefan Schoef +@samp{Stefan.Schoef@@arbi.informatik.uni-oldenburg.de}. + +@item +Bundled @file{ltx-help.el}. Press @kbd{C-h C-l} to get the +documentation for a LaTeX command. + +@item +Fixed indentation of @samp{\left} and @samp{\right}. Thanks to +Christoph Wedler @samp{<wedler@@fmi.uni-passau.de>}. + +@item +Installation procedure changed. @file{tex-site.el} is now intended to +survive AUC @TeX{} upgraded. The distribution version only contains +autoloads (eliminating the need for @file{tex-load.el} , the +customization variables are moved to @file{tex.el}. You should copy +those variables you need to customize from @file{tex.el} to +@file{tex-site.el}. + +@item +Made it possible to use absolute paths when including bibliographies or +style files. + +@item +Fixed problem with parsing errors after running @LaTeX{} on the region +from the menu. Thanks to Peter Barth @samp{<barth@@mpi-sb.mpg.de>} for +finding this one. + +@item +The file @file{doc/ref-card.texi} has been renamed to +@file{doc/tex-ref.texi} to avoid confusion with the reference card for +GNU Emacs. Suggested by Michelangelo Grigni @samp{<mic@@cs.ucsd.edu>}. + +@item +The @file{README}, @file{CHANGES} and @file{INSTALLATION} files are now +generated from chapters of this manual, to ensure they stay in sync. + +@item +@kbd{M-@key{tab}} will now complete some macro arguments in addition to +macro names. In particular, if you press @kbd{M-@key{tab}} after +@samp{\cite@{} or @samp{\ref@{} you will get completion for bibitems and +labels, respectively. + +@item +Merged a number of files. The major files are now @file{tex.el} for +plain @TeX{} and common support, @file{tex-buf.el} for running external +commands, and @file{latex.el} for @LaTeX{} support. + +@item +Unbundled @file{outln-18.el}. Users of Emacs 18 or Lucid Emacs 19.9 or +earlier must get @file{outln-18.el} and install it as @file{outline.el} +if they want the outline commands to work. + +@item +No longer bind @kbd{C-c @key{tab}} to @code{TeX-complete-symbol}. Use +@kbd{M-@key{tab}} instead. + +@item +Cleaned up the parser and parameterizedd it. Now you can add now types +of information to be maintained by the parser simply by calling +@code{TeX-auto-add-type}. You still need to install the regexps with +@code{TeX-auto-add-regexp}. + +@item +Disable the automatic insertion of empty braces after macros with no +arguments in @code{LaTeX-math-mode}. Added a variable +@code{TeX-insert-braces} to disable it everywhere. + +@item +Now complete with existing labels when asking for a label in a @LaTeX{} +environment. Suggested by Berwin Turlach +@samp{<berwin@@core.ucl.ac.be>}. + +@item +The variables @code{TeX-private-macro}, @code{TeX-private-auto}, and +@code{TeX-private-style} are now initialized from the @samp{TEXINPUTS} +and @samp{BIBINPUTS} environment variables. + +@item +@kbd{C-c C-f} and @kbd{C-c C-e} will now put the template around the +region if the region is active. + +@item +Fixed @kbd{C-u C-c C-e} to handle environments ending with a star +(@samp{*}). Reported by Berwin Turlach +@samp{<berwin@@core.ucl.ac.be>}. + +@item +Don't use @code{with-output-to-temp-buffer} for compilation buffer. +Fixed by Frederic Devernay @samp{<Frederic.Devernay@@sophia.inria.fr>}. + +@item +New function @code{TeX-command-buffer} (@kbd{C-c C-b}) to run a command +on the (visible part of) the current buffer. Requested by several +people. + +@item +Bundled the latest @file{reporter.el}, added +@code{TeX-submit-bug-report} to menus. + +@item +@code{TeX-insert-braces} now takes an argument like +@code{insert-parentheses}. Thanks to Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>}. + +@item +Fixed bug in @samp{\put} and @samp{\multiput} macros. Thanks to Kevin +Scott @samp{<scottkj@@prl.philips.co.uk>}. + +@item +Deleted @code{ams-latex-mode}, @code{slitex-mode}, and +@code{foiltex-mode}. Instead, use @code{LaTeX-command-style} to +determine the name of the external command to use. + +@item +Deleted @code{latex2e-mode}. Instead set the @code{LaTeX-version} +variable. This may be done automatically if you use +@samp{\documentclass} in the future. + +@item +Fixed Lucid Emacs menu for @TeX{}info mode. Thanks to Frederic Devernay +@samp{<Frederic.Devernay@@sophia.inria.fr>}, + +@item +Added support for @file{harvard.sty} by Berwin Turlach +@samp{<berwin@@core.ucl.ac.be>}. + +@item +Filling will not let display math equations @samp{\[ ... \]} be on a +line by themselves. Reported by Matthew Morley +@samp{<Matthew.Morley@@gmd.de>}. + +@item +Made @code{words-include-escapes} default to nil. + +@item +Made @code{TeX-expand-list} expansions case sensitive. Thanks to Havard +Rue @samp{<Havard.Rue@@sima.sintef.no>}. + +@item +Fixed error in calculating indentation for lines starting with a brace. +Thanks to Piet van Oostrum @samp{<piet@@cs.ruu.nl>}. + +@item +Fixed bug in the @samp{addcontentsline}, @samp{newtheorem}, and +@samp{pagenumbering} macros reported by Berwin Turlach +@samp{<berwin@@core.ucl.ac.be>}. + +@item +Doc fixes by Lawrence R. Dodd @samp{<dodd@@roebling.poly.edu>}. + +@item +Indentation no longer fooled by @samp{\\@{}, Thanks to Peter Thiemann +@samp{<thiemann@@provence.informatik.uni-tuebingen.de>}. + +@item +Bind @kbd{M-C-e} and @kbd{M-c-a} to @code{LaTeX-find-matching-end} and +@code{LaTeX-find-matching-begin}. Suggested by Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>}. + +@item +Added variable @code{TeX-quote-after-quote} which causes +@code{TeX-insert-quote} to insert literal @samp{"} except when after +another @samp{"}, in which case it will expand to @code{TeX-open-quote} +or @code{TeX-close-quote}. This code was contributed by Piotr Filip +Sawicki @samp{<pfs@@mimuw.edu.pl>}. + +@item +Added support for Polish style files @file{plfonts.sty} and +@file{plhb.sty}, contributed by Piotr Filip +Sawicki @samp{<pfs@@mimuw.edu.pl>}. + +@item +Added section with suggestions for how to handle European +character sets. + +@item +Created workaround for bug in the regexp handler in some Emacs 18 +versions and older versions of Lucid Emacs. The workaround +means you cannot use space in the documentstyle command in Emacs and +Lucid Emacs earlier than version 19.9. + +@item +@file{powerkey.el} is removed since the functionality is integrated in +GNU Emacs + +@item +@kbd{C-u "} now inserts four literal @samp{"}, not just one. To insert +a single @samp{"} either press @key{"} twice or use @kbd{C-q "}. + +@item +Allow non-string value for @code{outline-minor-map-prefix}. Reported by +David Smith @samp{<maa507@@comp.lancs.ac.uk>}. + +@item +Make the use of @code{write-file-hooks} more safe, and use +@code{local-write-file-hooks} when possible. Suggested by David Smith +@samp{<maa507@@comp.lancs.ac.uk>}. + +@item +Don't indent @samp{\begin@{verbatim@}} and @samp{\end@{verbatim@}}, +since any space before @samp{\end@{verbatim@}} is significant. Thanks to +Peter Thiemann @samp{<thiemann@@informatik.uni-tuebingen.de>} for the +patch. + +@item +Show available fonts when you try to insert an non-existing font. +Suggested by David Smith @samp{<maa507@@comp.lancs.ac.uk>}. + +@item +The @code{member} function in @file{tex-18.el} does not depend on +@code{TeX-member} now. Thanks to Piet van Oostrum +@samp{<piet@@cs.ruu.nl>}. + +@item +Do not overwrite any global binding of @kbd{M-@kbd{ret}}. Suggested by +Jens Petersen @samp{<J.Petersen@@qmw.ac.uk>}. + +@item +Major modes for writing text are supposed to rebind @kbd{M-@kbd{tab}} to +@code{ispell-complete-word}. Reported by Jens Petersen +@samp{<J.Petersen@@qmw.ac.uk>}. + +@item +Fixed problems with @TeX{}info menus. Thanks to David Smith +@samp{<maa507@@comp.lancs.ac.uk>} for reporting this. + +@item +Code cleanup. Removed the @file{format} directory, as it did not make +it easier to add new @TeX{} modes, quite the contrary. + +@item +Fixed name conflict in @file{auc-tex.el}, reported by Rik Faith +@samp{<faith@@cs.unc.edu>}. + +@item +Fixed some spelling errors. Thanks to Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>}. + +@item +Fixed bug prohibiting non-standard file extensions. Now recognize +@file{.ltx} by default. Suggested by Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>}. + +@item +Name of the AUC @TeX{} info files changes once again to be usable under +DOS. This time simply to @file{auctex}. + +@item +Documented @code{TeX-outline-extra}. + +@item +Could not select command on region from the menu before loading +@file{tex-buf}. Reported by Uwe Bonnes +@samp{<bon@@lte.e-technik.uni-erlangen.de>}. + +@item +Make the hilit19 interface more robust. Thanks to William Dean Norris +II @samp{<wdn@@dragonfly.cis.ufl.edu>}. + +@item +More OS/2 Makefile fixes by Bodo Huckestein +@samp{<bodo@@eu10.mpi-hd.mpg.de>}. + +@item +Reimplemented comment support on top of @code{comment-region}, giving +slightly different semantics. +@end itemize + + +@node Version 8.0 +@comment node-name, next, previous, up +@section News in 8.0 + +Coordinator: Per Abrahamsen, 1993. + +Alpha testers (in order of appearance): Marc Gemis +@samp{<makke@@wins.uia.ac.be>}, Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}, Philippe Defert +@samp{<defert@@gnuisance.cern.ch>}, Richard Stanton +@samp{<stanton@@haas.berkeley.edu>}, Norbert Kiesel +@samp{<norbert@@i3.informatik.rwth-aachen.de>}, Roberto Cecchini +@samp{<CECCHINI@@fi.infn.it>}, Hanno Wirth @samp{<wirth@@igd.fhg.de>}, +Tim Carlson @samp{<tim@@math.montana.edu>}, John Daschbach +@samp{<dasch@@darkwing.uoregon.edu>}, Bob Fields +@samp{<bob@@minster.york.ac.uk>}, Peter Whaite +@samp{<peta@@cim.mcgill.ca>}, Volker Dobler +@samp{<dobler@@etu.wiwi.uni-karlsruhe.de>}, Phil Austin +@samp{<phil@@geog.ubc.ca>}, Martin Maechler +@samp{<maechler@@stat.math.ethz.ch>}, Havard Rue +@samp{<Havard.Rue@@sima.sintef.no>}, Tim Geisler +@samp{<tmgeisle@@faui80.informatik.uni-erlangen.de>}, Tim Carlson +@samp{<imsgtcar@@mathfs.math.montana.edu>}, Sridhar Anandakrishnan +@samp{<sak@@essc.psu.edu>}, Peter Thiemann +@samp{<thiemann@@provence.informatik.uni-tuebingen.de>}, Pedro Quaresma +@samp{<pedro@@mat.uc.pt>}, Christian Lynbech +@samp{<lynbech@@daimi.aau.dk>}, Kevin Scott +@samp{<scottkj@@prl.philips.co.uk>}, Bodo Huckestein +@samp{<bodo@@eu10.mpi-hd.mpg.de>}, Cengiz Alaettinoglu +@samp{<ca@@cs.UMD.EDU>}, Jakob Schiotz +@samp{<schiotz@@fysik.dth.dk>}, and probably more.@refill + +@itemize @bullet +@item +New variable @code{LaTeX-letter-sender-address} contains default address +for use with the letter style. Set it to the address of your +organization in @file{tex-site.el}. Thanks to Sridhar Anandakrishnan +@samp{<sak@@essc.psu.edu>}. + +@item +Makefile now works under OS/2 with GNU Make. Thanks to Bodo Huckestein +@samp{bodo@@eu10.mpi-hd.mpg.de}. + +@item +Made it possible to install global auto files without having Bib@TeX{} +mode installed. Thanks to Christian Lynbech +@samp{<lynbech@@daimi.aau.dk>}. + +@item +Minor documentation fixes. Thanks to Martin Maechler +@samp{<maechler@@stat.math.ethz.ch>}. + +@item +Added support for @samp{eqref} for the @samp{amsart} style. Thanks to +Peter Whaite @samp{<peta@@cim.mcgill.ca>}. + +@item +Use @samp{-c} as the default shell command option under @samp{emx}. +Eberhard Mattes @samp{<mattes@@azu.informatik.uni-stuttgart.de>} says +it is better than @samp{/c}. + +@item +Made powerkey in the menus work better under OS/2. Thanks to Eberhard +Mattes @samp{<mattes@@azu.informatik.uni-stuttgart.de>}. + +@item +Made the reference cards print correctly on US letter format paper. +Thanks to Magnus Nordborg @samp{<magnus@@fisher.Stanford.EDU>}. + +@item +@code{LaTeX-dead-mode} removed. Read the file `ISO-TEX' for alternative +solutions. + +@item +All minor modes unbundled. You can find them from ftp at +@samp{ftp.iesd.auc.dk} in the directory @file{/pub/emacs-lisp}. Removed +information about minor modes from this document. + +@item +New hooks for changing ispell directory, see @file{tex-site.el} for +details. + +@item +@LaTeX{}2e mode now supported. Insert + +@lisp + (setq TeX-default-mode 'latex2e-mode) +@end lisp + +in your @file{.emacs} file to get documentclass instead of documentstyle +per default. The parser recognizes documentclass, usepackage, and +newcommand with a default argument. There are also templates for all of +them. + +@item +Added Jakob Schiotz's @samp{<schiotz@@fysik.dth.dk>} help file for +installing AUC @TeX{} on OEMACS. It will probably also be of interest +for DEMACS users. + +@item +Minor changes to be more friendly for OEMACS, thanks to Jakob Schiotz +@samp{<schiotz@@fysik.dth.dk>}. + +@item +The control key bindings in @code{LaTeX-math-mode} now works, thanks to +Frederic Devernay @samp{<Frederic.Devernay@@sophia.inria.fr>}. + +@item +@LaTeX{} outlines no longer matches @samp{\partial} or other commands +with a sectioning command as prefix. Thanks to Jakob Schiotz +@samp{<schiotz@@fysik.dth.dk>}. + +@item +@code{LaTeX-fill-paragraph} now handles the case where the previous line +both contain an @samp{\item} and an unmatched open brace. Thanks to +Piet van Oostrum @samp{<piet@@cs.ruu.nl>}. + +@item +Use abbreviated file name for @TeX{} output buffers in Emacs 19. Thanks +to Jens Gustedt @samp{<gustedt@@math.tu-berlin.de>}. + +@item +Added lowercase alias for @code{LaTeX-math-mode} for use with Emacs file +mode commands. Thanks to Olaf Burkart +@samp{<burkart@@zeus.informatik.rwth-aachen.de>}. + +@item +Added code to reuse old region in @code{TeX-command-region} if mark is +not active. Thanks to Cengiz Alaettinoglu @samp{<ca@@cs.UMD.EDU>}. + +@item +Now get keyboard accelerators on all menus rather than only AUC @TeX{} +menus, thanks to the @file{powerkey.el} file by Lars Lindberg +@samp{<lli@@sypro.cap.se>}. + +@item +Added @code{TeX-electric-macro} for faster completion of @TeX{} macros. +@xref{Completion}. + +@item +Comparing printer names are now case incentive. Thanks to Richard +Stanton @samp{<stanton@@haas.berkeley.edu>}. + +@item +Default shell fixed for OS/2. Thanks to Richard Stanton +@samp{<stanton@@haas.berkeley.edu>}. + +@item +Added functions to hide (@code{LaTeX-hide-environment}) and show +(@code{LaTeX-show-environment}) the current environment. + +@item +@kbd{C-u C-c C-e} will now modify the current environment instead of +inserting a new environment. This is like the optional argument to the +font commands. + +@item +Added nabla to LaTeX Math Mode. Suggested by Bill Reynolds +@samp{<bill@@goshawk.lanl.gov>}. + +@item +Added commands for running @TeX{} and @LaTeX{} interactively. Thanks to +David Carlisle @samp{<carlisle@@computer-science.manchester.ac.uk>}. + +@item +The external commands will now insert there output @emph{before} point +in the output buffers. This allows you to follow the progress by +putting point at the end of the file. Suggested by Jak Kirman +@samp{<jak@@cs.brown.edu>}. + +@item +When invoking an external command from a menu, the document will be +automatically saved. + +@item +There are now a printer menu for emacs 19. + +@item +Redesigned dependency checking. Now only checks dependencies for files +loaded in the current emacs session. This is much faster, but will not +catch files that are edited outside this emacs session, or files edited +in killed buffers. @strong{@code{TeX-check-path} must at least contain +@file{.} for saving to work}. If you have set @samp{TeX-check-path} +in your @file{.emacs} file, remove it. The default value is fast enough +now. + +@item +New variable @code{TeX-save-query} control if AUC @TeX{} will query you +for each modified buffer when you save the document. Set it to nil to +get rid of these questions. Setting this variable also affect the +automatic saving of the document that happens each time you start an +external command. + +@item +New command @code{TeX-save-document} will save all files in the current +document, i.e. the document associated with the current buffer. + +@item +Cleaned up all minor modes, also made them use @file{min-map.el} or +@file{min-mode.el} instead of @file{min-bind.el}. + +@item +Cleaned up release management. + +@item +AUC TeX will not longer be confused when you rewrite a file under a new +name. + +@item +Lots of code cleanup, involving reformatting the source and renaming all +@samp{-hook} variables and functions to conform with the Emacs 19 +guidelines. + +@item +Can now parse Japanese characters in labels and macros when you use +Japanese @TeX{}. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Made it safe to quit when AUC @TeX{} asks for the name of the master +file. It will simply assume the file itself is the master, and continue +without inserting any file local variables. + +@item +Support for @code{epsf} and @code{psfig} style files. Thanks to Marc +Gemis @samp{<makke@@wins.uia.ac.be>}. + +@item +Support for @LaTeX{}info. Thanks to Marc Gemis +@samp{<makke@@wins.uia.ac.be>}. + +@item +Only examine the first 10000 bytes to find out what @TeX{} mode to use. + +@item +Added @code{TeX-submit-bug-report} command to submit bug reports. It +uses the @file{reporter.el} distributed with SuperCite, so it may not be +available in some Emacs 18 installations. + +@item +Speeded up parsing significantly by using a simpler regexp. + +@item +Added variable @code{TeX-auto-untabify}. Set it to nil to prevent +untabifying the buffer when it is saved. Several people wanted this. + +@item +Changed defaults to @emph{not} do any automatic parsing, nor prompt for +a master file. @xref{Parsing Files}, @ref{Multifile}, for information +about how ot correct this. In short, insert the following in your +@file{.emacs} file. + +@lisp +(setq TeX-auto-save t) +(setq TeX-parse-self t) +(setq-default TeX-master nil) +@end lisp + +@item +Some grammatical fixes to the @file{PROBLEMS} file. Thanks to Lawrence +R. Dodd @samp{<dodd@@roebling.poly.edu>}. + +@item +No longer install a separate @code{outline-minor-mode} by default, as +the FSF Emacs 19.19 @code{outline-minor-mode} is adequate. The included +file @file{outln-18.el} emulates the FSF Emacs 19.19 mode under Emacs 18. + +The FSF Emacs 19.19 @code{outline-minor-mode} use the @kbd{C-c} prefix +instead of @kbd{C-c C-o} by default, and does not bind as many keys as +the @code{outline-minor-mode} distributed with earlier versions of AUC +@TeX{} did. You can get the keybindings back together with other +goodies by inserting +@example +(require 'out-xtra) +@end example +in your @file{.emacs} file. @file{out-xtra.el} will probably be +unbundled from AUC @TeX{} in the future. + +@item +Some fixes to AmS-@TeX{} mode by Ulf Juergens +@samp{<ulf@@mathematik.uni-bielefeld.de>}. + +@item +Make @samp{plain-TeX-mode-menu} work in Lucid Emacs. Thanks to Anthony +Rossini @samp{rossini@@hsph.harvard.edu} for reporting this. + +@item +First cut on a @TeX{}info mode. + +@item +More strict about parsing @samp{\bibitem}'s and Bib@TeX{} entries. + +@item +Made it easier to write style files for environments that takes +arguments and documented it. Suggested by Martin +Wunderli @samp{<wunderli@@inf.ethz.ch>}. + +@item +Parse optional argument to @samp{\newenvironment}. Suggested by Martin +Wunderli @samp{<wunderli@@inf.ethz.ch>}. + +@item +Fixed @samp{parbox} macro. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Made the parser work better in outline minor mode. Thanks to Salvador +Pinto Abreu @samp{<spa@@khosta.fct.unl.pt>}. + +@item +Also save style information with @code{TeX-normal-mode} when buffer not +modified. + +@item +Use @code{$(MAKE)} instead of @samp{make} to invoke @code{make} from the +@file{Makefile}. Thanks to John Interrante +@samp{<interran@@uluru.Stanford.EDU>}. + +@item +Make last value default for @code{TeX-insert-macro}. Suggested by Matt +Fairtlough @samp{<M.Fairtlough@@dcs.sheffield.ac.uk>}. + +@item +Renamed info file to @samp{auc-info} in order to fill DOS file limits. +Please remember to update your @file{dir} file to reflect this change. + +@item +Delete auto file instead of saving an empty file. +@end itemize + +@node Version 7.3 +@comment node-name, next, previous, up +@section News in 7.3 + +Coordinator: Per Abrahamsen, 1993. + +@itemize @bullet +@item +More robust installation, especially for Lucid Emacs (I hope). Many +people reported problems with this. + +@item +Make `easymenu' work when byte-compiled. Many people reported this +bug. + +@item +Minimally updated the @file{README} file from version 6.0 (sigh). +Thanks to Boris Goldowsky @samp{<boris@@cs.rochester.edu>} for reporting +this. + +@item +Added @samp{@@finalout} to manual. Reported by Henrik Drabol +@samp{<hvd@@ens004.ens.min.dk>}. + +@item +Fixed @kbd{M-q} to work after an @samp{\end@{@dots{}@}}. It will not +work at the end of the buffer, but there are usually the local variables +so it should (hopefully) not matter. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>} again. + +@item +New variables @code{TeX-open-quote} and @code{TeX-close-quote} determine +what is inserted by @code{TeX-insert-quote}. The @file{german} style +file now use those variables instead of changing the keymap. + +@item +Changes to the default settings in @file{tex-site.el}, in particular a +@samp{Queue} command is added to display the print queue. Thanks to +John Interrante @samp{<interran@@uluru.Stanford.EDU>} for code, and +other members of the @samp{auc-tex@@iesd.auc.dk} mailing list for +ideas. + +@item +Make sure all outline mode commands are bound in +@code{outline-minor-mode}. + +@item +Added autoload for @code{TeX-command}. Thanks to Hanno Wirth +@samp{<wirth@@igd.fhg.de>} for reporting this. + +@item +Added support for AmS@TeX{} and AmSLa@TeX{}. Currently they are +identical to @TeX{} and @LaTeX{} except for another default command. + +@item +Added Vor@TeX{} style matching of dollar sign. The style is guaranteed +to be Vor@TeX{}, since I lifted the code directly from Vor@TeX{}. +Thanks to Pehong Chen @samp{<phc@@renoir.berkeley.edu>} for writing the +Vor@TeX{} code. Thanks to Jak Kirman @samp{<jak@@cs.brown.edu>} for +pointing out this nice Vor@TeX{} feature. + +@item +Added information about AUC @TeX{} mail addresses to the manual. Thanks +to Dave Smith @samp{<maa507@@computing.lancaster.ac.uk>}. + +@item +Added menu to for plain @TeX{}. Suggested by Tim Carlson +@samp{<imsgtcar@@math.montana.edu>}. + +@item +Made the menus depend on @code{TeX-command-list}. + +@item +Made it possible to specify @code{TeX-auto-regexp-list} in the local +variable section of each file. + +@item +Added variable @code{TeX-auto-parse-length} to specify maximal length of +text that will be parsed. + +@item +Added automatic parsing of Bib@TeX{} files and @samp{bibitem} entries in +order to get completion in @samp{cite}. This was inspired by an add on +made by Sridhar Anandakrishnan @samp{<sak@@essc.psu.edu>}. + +@item +Added variable @code{TeX-byte-compile} to disable automatic byte +compilation of style files when loaded. This is needed when using +different Emacs versions. + +@item +Added variable @code{TeX-translate-location-hook} to translate file and +line information before showing an error, as requested by Thorbjoern +Ravn Andersen @samp{<ravn@@imada.ou.dk>}. + +@item +Added variable @code{TeX-auto-save} to allow disabling the automatic +saving of style information, either per file in the file local +variables, or globally by using @code{setq-default}. Use +@code{TeX-normal-mode} to force style information to be saved. + +@item +Try to create @file{auto} directory if it does not exists. + +@item +Added chapter describing how to tune the @TeX{} parsing. + +@item +Allow (but do not encourage) a string value for +@code{LaTeX-default-options}. + +@item +Give @samp{"} word syntax when german.sty is loaded. Suggested by Tim +Geisler @samp{<tmgeisle@@immd8.informatik.uni-erlangen.de>}. + +@item +Many corrections to the grammar in the manual. Thanks to Manfred +Weichel @samp{<Manfred.Weichel@@sto.mchp.sni.de>}. + +@item +Bind @code{TeX-home-buffer} to @kbd{C-c ^} instead of @kbd{C-c C-h} +which are reserved in Emacs 19. Suggested by Chris Moore +@samp{<Chris.Moore@@src.bae.co.uk>}. +@end itemize + +@node Version 7.2 +@comment node-name, next, previous, up +@section News in 7.2 + +Coordinator: Per Abrahamsen, 1993. + +@itemize @bullet +@item +@code{LaTeX-dead-mode} works again. Thanks to Patrick O'Callaghan +@samp{<poc@@usb.ve>} for fixing it. + +@item +Minor fixes to the documentation. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Add @samp{Compiling} to the mode line of all buffers, while there is a +AUC @TeX{} compilation process running. This is similar to the behavior +of @code{compile} in Emacs 19. + +@item +@code{TeX-normal-mode} will now save the buffer first to make sure it +gets reparsed. + +@item +Labels with underscores are now recognized. Thanks to Wolfgang Franzki +@samp{<W.Franzki@@kfa-juelich.de>} + +@item +Fix to `ghostview' printer specification. Thanks to Masayuki Kuwada +@samp{<kuwada@@soliton.ee.uec.ac.jp>}. + +@item +Recognize @samp{abstract}, @samp{center}, @samp{titlepage}, +@samp{verse}, and @samp{theindex} environments. Thanks to Masayuki Kuwada +@samp{<kuwada@@soliton.ee.uec.ac.jp>}. + +@item +Fix to @samp{newsavebox} macro. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>} for reporting this. + +@item +Menu support for GNU Emacs 19 and Lucid Emacs. Thanks to Alastair Burt +@samp{<burt@@dfki.uni-kl.de>} for the initial Lucid Emacs version. + +@item +@kbd{C-c C-f C-d} now deletes the current font. The current font is +defined to be the innermost @TeX{} group starting with a @TeX{} macro +that is terminated by a space. + +@item +Giving @kbd{C-c C-f} a prefix argument will replace the current font, +i.e. @kbd{C-u C-c C-f C-b} will change the current font to bold. + +The old functionality (putting the font around the region) has been +removed. To make the region bold, type @kbd{C-w C-c C-f C-b C-y} +instead. + +@item +Chapter recognized as largest heading in the report style. Thanks to +Shinji Kobayashi @samp{<koba@@flab.fujitsu.co.jp>} for reporting +this. + +@item +More support for Japanese style files. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +No longer put @samp{Outline} in the mode line whenever +@code{selective-display} is set. Thanks to Lawrence R. Dodd +@samp{<dodd@@roebling.poly.edu>} for reporting this. + +@item +Support for inserting calligraphic letters in @code{TeX-math-mode} with +@kbd{` c @key{letter}}. Thanks to Olaf Burkart +@samp{<burkart@@zeus.informatik.rwth-aachen.de>}. + +@item +@code{set-docstring} in @file{tex-math.el} should work better now. +Thanks to Alastair Burt @samp{<burt@@dfki.uni-kl.de>} and Olaf Burkart +@samp{<burkart@@zeus.informatik.rwth-aachen.de>}. + +@item +Support for dviout preview on PC-9801. Thanks to Shinji Kobayashi +@samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Inserting environment in empty buffer should work now. Thanks to +Alastair Burt @samp{<burt@@dfki.uni-kl.de>}. + +@item +Default float for figures changed from @samp{tbp} to @samp{htbp}. + +@item +@code{LaTeX-format-environment} may work now. Thanks to Shinji +Kobayashi @samp{<koba@@flab.fujitsu.co.jp>}. + +@item +Better @code{LaTeX-close-environment}. Thanks to Thorbjoern Hansen +@samp{<thansen@@diku.dk>}. + +@item +Some support for Ispell 4.0. + +@item +Bib@TeX{} in Emacs 19 need @code{tex-insert-quote}, make it autoload +from AUC @TeX{} instead of the standard @code{tex-mode}. + +@item +@code{TeX-auto-generate} failed when repeated. Thanks to Peter Whaite +@samp{<peta@@Thunder.McRCIM.McGill.EDU>} for reporting this. +@end itemize + +@node Version 7.1 +@comment node-name, next, previous, up +@section News in 7.1 + +Coordinator: Per Abrahamsen, 1993. + +@itemize @bullet +@item +Allow multiple @samp{%p} in print commands. + +Suggested by Cliff Krumvieda @samp{<cliff@@cs.cornell.edu>}. + +@item +Improved backward compatibility in @file{auc-tex.el}. Thanks to Ralf +Handl @samp{<handl@@cs.uni-sb.de>}. + +@item +New style hook for @file{german.sty}. + +Disable smart quotes. Press @kbd{C-c C-n} to make it take effect. + +@item +Allow files to have other extensions than ``tex''. + +But no longer allow files to have multiple dots. Sigh. + +@item +Will no longer parse the buffer if it can use the saved state. + +@item +New variable @code{TeX-parse-self}. + +Set it to nil if you never want to parse the buffer when you load it. + +@item +Only offer to save files that belongs to the document. + +When you format the document with @kbd{C-c C-c}, AUC @TeX{} will no +longer offer to save your @file{RMAIL}, @file{.newsrc}, or other files +that does not belong to the document. Suggested by Jim Hetrick +@samp{<hetrick@@phys.uva.nl>}. + +@item +Foil@TeX{} support. + +Thanks to Sven Mattisson @samp{<sven@@tde.lth.se>} + +@item +Smarter about when you need to reformat. + +Thanks to Chris Callsen @samp{<chris@@iesd.auc.dk>}. + +@item +Japanese @TeX{} + +Now supports Japanese @TeX{}. Thanks to Shinji Kobayashi +@samp{<koba@@keisu-s.t.u-tokyo.ac.jp>}. + +@item +Works again under OS/2 and other case insensitive file systems. + +@item +DEMACS support. + +Thanks to Shinji Kobayashi @samp{<koba@@keisu-s.t.u-tokyo.ac.jp>}. + +@item +Better @code{LaTeX-close-environment}. + +Thanks to Piet van Oostrum @samp{<piet@@cs.ruu.nl>}. + +@item +Ispell support. + +Thanks to Piet van Oostrum @samp{<piet@@cs.ruu.nl>}. + +@item +Support for Russian letters. + +Thanks to Justin R. Smith @samp{<jsmith@@king.mcs.drexel.edu>}. + +@item +Sli@TeX{} fixes. + +Many people. + +@item +Fixes for spelling errors. + +Many people. + +@end itemize + +@node Version 7.0 +@comment node-name, next, previous, up +@section Version 7.0 + +Coordinator: Per Abrahamsen, 1993. + +Alpha testers (in order of appearance): Piet van Oostrum +@samp{<piet@@cs.ruu.nl>}, Sven Mattisson @samp{<sven@@tde.lth.se>}, Tim +Geisler @samp{<tmgeisle@@immd8.informatik.uni-erlangen.de>}, Fran E. +Burstall @samp{<F.E.Burstall@@maths.bath.ac.uk>}, Alastair Burt +@samp{<burt@@dfki.uni-kl.de>}, Sridhar Anandakrishnan +@samp{<sak@@essc.psu.edu>}, Kjell Gustafsson +@samp{<kjell@@sccm.Stanford.EDU>}, Uffe Kjaerulff +@samp{<uk@@iesd.auc.dk>}, Kurt Swanson @samp{Kurt.Swanson@@dna.lth.se}, +Mark Utting @samp{<marku@@cs.uq.oz.au>}, Per Norman Oma +@samp{perno@@itk.unit.no}, Naji Mouawad +@samp{<nmouawad@@math.uwaterloo.ca>}, Bo Nygaard Bai +@samp{<bai@@iesd.auc.dk>}, and probably more. + +@itemize @bullet +@item +New keymap. + +The keymap has been changed in order to make it more intuitive to new +users, and because the old bindings did not work well with the new +buffer manipulation commands in tex-buf.el. To use the new bindings, +load @file{tex-init.el} instead of @file{auc-tex.el}. + +The file @file{auc-tex.el} is still available and implements the old +keybindings on top of the new code. + +Print out the reference card (@file{doc/tex-ref.tex}) to see the new +bindings. + +@item +Completely redesigned the buffer handling. + +No part of the interface or the customization variables remain the same, +unless you use the compatibility functions in @file{auc-tex.el}. In +that case the interactive commands remain similar in spirit, but the +customization interface is still changed. + +The file @file{tex-buf.el} has been completely rewritten, and there are +major cleanup in @file{tex-dbg.el}, however the basic functionality +remains the same in this file. The code for both @file{tex-buf.el} and +@file{tex-dbg.el} should be much simpler now and easier to extent. + +@file{auc-tex.el} and @file{tex-site.el} was updated to support the new +interface. I actually believe the moral equivalent to @code{TeX-region} +to work now @t{:-)}, at least I understand the code now. + +The two major functions are now @code{TeX-command-master} and +@code{TeX-command-region}. Each function will prompt you for the +command to execute. AUC @TeX{} will make an educated guess on what +command you want to run, and make that the default. The available +commands are defined in the variable @code{TeX-command-list}. + +@code{TeX-command-master} will run the specified command on the buffers +master file. You can have one command running for each master file. +@code{TeX-command-region} will run the specified command on the current +region, getting the header on trailer from the master file. + +You can have exactly one region command running, independent on how many +master file commands that are running. Commands that operate on the +active process (like @code{TeX-next-error}) will chose the process +associated with buffers master file, unless the last region process is +more recent than all master file processes. + +AUC @TeX{} now insist on knowing the master file for a buffer. If you +do not specify it in the file variable section, and it is not obviously +a master file itself, it will ask you. It will also add the master file +name to the file variables, unless you disable this feature by setting +@code{TeX-add-local} to nil. Furthermore, it will convert @samp{%% +Master:} lines to file variables, unless you disable it by setting +@code{TeX-convert-master} to nil. +@vindex TeX-convert-master + +Functionality removed (for now, it might appear again latter) include +all other functions to start a command (e.g. @code{LaTeX-BibTeX}), and +alternative ways to specify headers and trailers. The only place to get +the header and trailer is from the master file (I can easily change +that, if anyone have such needs). + +@item +Style specific code isolated. + +You can now add style specific information to AUC TeX by writing a +style file somewhere in TeX-style-path. + +The main code is now organized around this principle. + +@item +Automatically generate style files. + +AUC @TeX{} can now automatically extract information from a @TeX{} file, +and will do this when you save a buffer. + +@item +Sli@TeX{} mode. + +Just like @LaTeX{} mode, except that the default command to format run +on the buffer is @samp{slitex}. + +@item +@code{LaTeX-section} completely general. + +Rewrote @file{ltx-sec.el}. + +@itemize @minus +@item +Sectioning level, toc, and title queries can be individually turned off. +@item +Label query can be turned on or off for selected sectioning levels. +@item +Label prefix can be different for different sectioning levels. +@item +If the title (or toc) is empty, point will be positioned there. +@item +Users can add new hooks +@end itemize + +@item +@code{TeX-insert-macro} much smarter. + +It will now prompt for the symbol with completions, and for many symbols +it will also prompt for each argument. There are also completion on +some of the arguments. + +@item +Fixed center in figure environment. + +Thanks to Thomas Koenig @samp{<ig25@@rz.uni-karlsruhe.de>}. + +@item +Changed @code{\M-} to @code{\e} in all keybindings in order to better +support 8-bit input on some GNU Emacs. Thanks to Peter Dalgaard +@samp{<pd@@kubism.ku.dk>}. + +Please, implementors of 8-bit input extensions to GNU Emacs. +@code{\M-x} does @emph{not} means @dfn{@kbd{x} with the 8-bit set}. It +means @dfn{pressing @kbd{x} while holding down the @key{meta} key}. +Some systems (such as X11) are able to tell the different. Thus, even +if you implement 256 byte keymaps, @code{\M-x} should still expand +@code{meta-prefix-char} followed by an @kbd{x} in the keymap. This +allows you to distinguish pressing @kbd{x} while holding down the +@key{meta} key from entering a literal 8-bit character. + +@item +Made the outline commands aware of the document style. + +That is, if the document style is @samp{article}, @samp{\section} will +be one level below the @samp{\documentstyle}, while if the style is +@samp{book}, @samp{\section} will be three levels below +@samp{\documentstyle}. This will make @code{show-children} work better +at the top level. + +@item +The makefiles are closer to GNU coding standard. + +They now understand `prefix' and some other macros. + +@item +Added hooks to be run after list of environments or list of completion +names are updated, and also added a hook to be called after each file +has been loaded. Thanks to Piet van Oostrum @samp{<piet@@cs.ruu.nl>}. + +@item +Added @samp{*} to lot of @code{(interactive)} declarations. + +@item +The outline commands are now always accessible from @LaTeX{} mode. + +@item +Generalized the keyboard remapping and double modes. + +These are found in the file @file{min-key.el}. + +@item +Smart Comments. + +Not really, but there are now two comment functions which use their +arguments to determine what to do, instead of four functions ignoring +their arguments. + +@item +Add outline headers. + +It is now possible to add extra outline headers, by setting the variable +@code{TeX-outline-extra}. + +@item +Smart quotes even smarter. + +If you press @kbd{"} twice, it will insert an real double quote instead +of two (or four) single quotes. This is consistent with how remapping +in @file{min-key.el} is done. + +@item +Automatically untabify buffer when you save it. + +Hands up, everyone who have produced a `last revision' paper containing +an unreadable list of data in the back, because @TeX{} does not +understands tabs. + +@item +Call show-all when you change major mode. + +Thanks to Inge Frick's @samp{<inge@@nada.kth.se>} @file{kill-fix.el} +enhancement, outline minor mode can now guarantee that all text is shown +when you leave the minor mode, even if you leave the minor mode by +changing the major mode. + +@item +Updated documentation for 7.0. + +Also added key, variable, function, and concept indexes, as well as this +history section and a new chapter on multifile documents +(@pxref{Multifile}).@refill + +@end itemize + +@node Version 6.1 +@comment node-name, next, previous, up +@section Version 6.1 + +Coordinator: Per Abrahamsen, 1992. + +@itemize @bullet +@item +@code{TeX-region} might work now (heard that before?). + +Many people reported this one. Especially thanks to Fran Burstall +@samp{<F.E.Burstall@@maths.bath.ac.uk>} and Bill Schworm +@samp{<bill@@schworm.econ.ubc.ca>}.@refill + +@item +The specification format for the @TeX{} command is more general. + +See the documentation for @code{LaTeX-command} and +@code{plain-TeX-command}. + +@item +The specification format for the preview commands is more general. + +See their respective documentation. + +@item +The specification format for the print command is more general. + +See the documentation for @code{TeX-print-command}. + +@item +@code{TeX-args} is marked as obsolete. + +@item +The @samp{"Emergency stop ..."} error. + +Some users of old @TeX{} installations got might might be fixed now. +Thanks to Philip Sterne @samp{<sterne@@dublin.llnl.gov>}. + +@item +It is now possible to change the preview command. + +@dots{} without loading TeX-site first. Thanks to Tim Bradshaw +@samp{<tim.bradshaw@@edinburgh.ac.uk>}. + +@item +New variable TeX-smart-quotes. + +Allow @file{german.sty} users (and others) to disable the mapping of +double quote (@kbd{"} to @samp{``} or @samp{''}). Thanks to Daniel +Hernandez @samp{<danher@@informatik.tu-muenchen.de>}. + +@item +Many minor corrections to the documentation. + +Thanks to Mainhard E. Mayer @samp{<hardy@@golem.ps.uci.edu>}. + +@item +Make test for @code{HOSTTYPE} case insensitive. + +Thanks to Gisli Ottarsson @samp{<gisli@@liapunov.eecs.umisc.edu>}. + +@item +@code{TeX-force-default-mode} + +Set to avoid AUC @TeX{}'s attempts to infer the mode of the file by +itself. + +@end itemize + +@node Version 6.0 +@comment node-name, next, previous, up +@section Version 6.0 + +Coordinator: Kresten Krab Thorup, 1992. + +Preliminary documentation is available in the directory @file{doc}. It +isn't very well written, but I believe it covers most interesting points. +Comments, suggestions, or even rewrites of sections are VERY +WELCOME@dots{} + +LaCheck has been incorporated in the package. The source code for it is +available in the directory @file{lacheck} along with the documentation +for it. Lacheck may also be used from the command line. It is bound to +@kbd{C-c $}. + +Some minor changes in: + +@table @code +@item TeX-region +Should work better with @samp{Master:} option. + +@item LaTeX-environment +Numerous new hooks added by Masayuki Kuwada. + +@item TeX-command-on-region +Removed. @kbd{C-c C-o} used for @code{outline-minor-mode} instead. + +@end table + +And some additional minor fixes... + +@node Ancient History +@comment node-name, next, previous, up +@section Ancient History + +The origin of AUC @TeX{} is @file{tex-mode.el} from Emacs 16. Lars +Peter Fischer @samp{<fischer@@iesd.auc.dk>} wrote the first functions to +insert font macros and Danish characters back in 1986. Per Abrahamsen +@samp{<abraham@@iesd.auc.dk>} wrote the functions to insert environments +and sections, to indent the text, and the outline minor mode in 1987. +Kresten Krab Thorup @samp{<krab@@iesd.auc.dk>} wrote the buffer handling +and debugging functions, the macro completion, and much more, including +much improved indentation and text formatting functions. He also made +the first public release in 1991, and was the main author and +coordinator of every release up to and including 6.0. + +Thanks should also go to all the people who have been a great help +developing the AUC @TeX{} system. Especially all the people on the +@samp{auc-tex} mailing list, who have been very helpful commenting and +pointing out weak points and errors. + +Some of the contributors are listed below. Others are mentioned in the +lisp files or in the History section. + +@table @samp +@item <dduchier@@csi.UOttawa.CA> +Denys Duchier +@item <ferguson@@cs.rochester.edu> +George Ferguson +@item <simons@@ibiza.karlsruhe.gmd.de> +Martin Simons +@item <smith@@pell.anu.edu.au> +Michael Smith +@item <per@@iesd.auc.dk> +Per Hagen +@item <handl@@cs.uni-sb.de> +Ralf Handl +@item <sven@@tde.lth.se> +Sven Mattisson +@item <kuwada@@soliton.ee.uec.ac.jp> +Masayuki Kuwada +@item <tb06@@pl118f.cc.lehigh.edu> +Terrence Brannon +@item <roseman@@hustat.harvard.edu> +Leonard Roseman +@end table + +Special thanks to Leslie Lamport for supplying the source for the LaTeX +error messages in the @file{tex-dbg.el} file. + diff --git a/elpa/auctex-13.1.3/doc/install.texi b/elpa/auctex-13.1.3/doc/install.texi new file mode 100644 index 0000000..19034cb --- /dev/null +++ b/elpa/auctex-13.1.3/doc/install.texi @@ -0,0 +1,628 @@ +@c This is part of the AUCTeX Manual. +@c Copyright (C) 1994, 1996, 2003-2007, 2012-2013, +@c 2015, 2017, 2018, 2020, 2021 Free Software Foundation, Inc. +@c See the file auctex.texi for copying conditions. +@ifset rawfile +@include macros.texi +@node Installation,,(dir),(dir) +@top Installing @AUCTeX{} +@end ifset + +@ifclear rawfile +@node Installation +@chapter Installing @AUCTeX{} +@end ifclear + +The modern and strongly recommended way of installing @AUCTeX{} is by +using the Emacs package manager integrated in Emacs 24 and greater +(@acronym{ELPA}). Simply do @kbd{M-x list-packages @key{RET}}, mark the +auctex package for installation with @kbd{i}, and hit @kbd{x} to execute +the installation procedure. That's all. + +@code{use-package} users can use this simple recipe in their +@code{user-init-file} which essentially does the same as the manual +installation explained above. + +@lisp +(use-package tex + :ensure auctex) +@end lisp + +Using the @acronym{ELPA} version has several advantages. Besides being +platform and @acronym{OS} independent, you will receive intermediate +bugfix releases between major @AUCTeX{} releases conveniently. For past +@acronym{ELPA} releases, see +@url{https://elpa.gnu.org/packages/auctex.html}. +@ifclear rawfile +Once the installation is completed, you can skip the rest of this +section and proceed to @ref{Quick Start}. +@end ifclear + +The remainder of this section is about installing @AUCTeX{} from a +release tarball or from a checkout of the @AUCTeX{} repository. + +Installing @AUCTeX{} should be simple: merely @command{./configure}, +@command{make}, and @code{make install} for a standard site-wide +installation (most other installations can be done by specifying a +@option{--prefix=@dots{}} option). + +On many systems, this will already activate the package, making its +modes the default instead of the built-in modes of Emacs. If this is +not the case, consult @ref{Loading the package}. Please read through +this document fully before installing anything. The installation +procedure has changed as compared to earlier versions. Users of @w{MS +Windows} are asked to consult +@ifset rawfile +the file @file{INSTALL.windows}. +@end ifset +@ifclear rawfile +@xref{Installation under MS Windows}. +@end ifclear + +@ifclear rawfile +@menu +* Prerequisites:: +* Configure:: +* Build/install and uninstall:: +* Loading the package:: +* Advice for package providers:: +* Advice for non-privileged users:: +* Installation under MS Windows:: +* Customizing:: +@end menu +@end ifclear + +@ifset rawfile +@menu +* Prerequisites:: +* Configure:: +* Build/install and uninstall:: +* Loading the package:: +* Advice for package providers:: +* Advice for non-privileged users:: +* Customizing:: +@end menu +@end ifset + +@ifset rawfile +@node Prerequisites +@chapter Prerequisites +@raisesections +@end ifset + +@ifclear rawfile +@node Prerequisites +@section Prerequisites +@end ifclear + +@itemize @bullet +@item GNU Emacs 25.1 or higher + +Using @previewlatex{} requires a version of Emacs compiled with image +support. + +@table @b +@item Windows +Precompiled versions are available from +@uref{https://ftp.gnu.org/gnu/emacs/windows/}. +@item macOS +For an overview of precompiled versions of Emacs for macOS see for +example @uref{https://www.emacswiki.org/emacs/EmacsForMacOS}. +@item GNU/Linux +Most GNU/Linux distributions nowadays provide a recent variant of Emacs +via their package repositories. +@item Self-compiled +Compiling Emacs yourself requires a C compiler and a number of tools and +development libraries. Details are beyond the scope of this manual. +Instructions for checking out the source code can be found at +@uref{https://savannah.gnu.org/git/?group=emacs}. +@end table + +@item A working @TeX{} installation + +Well, @AUCTeX{} would be pointless without that. Processing +documentation requires @TeX{}, @LaTeX{} and Texinfo during installation. +@previewlatex{} requires Dvips or @command{dvipng} for its operation in @acronym{DVI} mode. +The default configuration of @AUCTeX{} is tailored for @w{@TeX{} Live}-based +distributions, but can be adapted easily. + +@item A recent Ghostscript + +This is needed for operation of @previewlatex{} in both @acronym{DVI} +and @acronym{PDF} mode. Ghostscript version 7.07 or newer is required. + +@item GNU make + +Recent @AUCTeX{} uses GNU make specific capabilities in the Makefiles. +If your @acronym{OS}'s default @command{make} command is not GNU make, +you have to obtain it in order to build @AUCTeX{} by yourself. GNU make +is sometimes provided under the name @command{gmake} in your +@acronym{OS}'s binary package system. + +@item The Texinfo package + +Strictly speaking, you can get away without it if you are building +from the distribution tarball, have not modified any files and don't +need a printed version of the manual: the pregenerated info file is +included in the tarball. At least @w{version 4.0} is required. + +@end itemize + +For some known issues with various software, see +@ifset rawfile +the @file{PROBLEMS.preview} file. +@end ifset +@ifclear rawfile +@ref{Known problems,,,preview-latex,the @previewlatex{} manual}. +@end ifclear + +@node Configure +@section Configure + +The first step is to configure the source code, telling it where +various files will be. To do so, run + +@example +./configure @var{options} +@end example + +(Note: if you have fetched @AUCTeX{} from Git rather than +a regular release, you will have to first follow the instructions in +@file{README.GIT}). + +On many machines, you will not need to specify any options, but if +@command{configure} cannot determine something on its own, you'll need to +help it out with one of these options: + +@table @code +@item --prefix=@var{prefix} +All automatic placements for package components will be chosen from +sensible existing hierarchies below this: directories like @file{man}, +@file{share} and @file{bin} are supposed to be directly below +@var{prefix}. + +Only if no workable placement can be found there, in some cases an +alternative search will be made in a prefix deduced from a suitable +binary. + +@file{/usr/local} is the default @var{prefix}, intended to be suitable +for a site-wide installation. If you are packaging this as an +operating system component for distribution, the setting @file{/usr} +will probably be the right choice. See @ref{Advice for package +providers} for detail. + +If you are planning to install the package as a single non-priviledged +user, you will typically set @var{prefix} to your home directory. +Consult @ref{Advice for non-privileged users} for addtional +instructions. + +@item --with-emacs=@var{/path/to/emacs} +If you are using a pretest which isn't in your @env{PATH}, or +@command{configure} is not finding the right Emacs executable, you can +specify it with this option. + +@item --with-lispdir=@var{lispdir} +This option specifies the location of the @file{site-lisp} +directory within @code{load-path} under which the files will get +installed (the bulk will get installed in a subdirectory). +@command{./configure} should figure this out by itself. + +@item --with-auctexstartfile=@file{auctex.el} +@itemx --with-previewstartfile=@file{preview-latex.el} +This is the name of the respective startup files. If @var{lispdir} +contains a subdirectory @file{site-start.d}, the start files are +placed there, and @file{site-start.el} should +load them automatically. Please be aware that you must not move the +start files after installation since other files are found +@emph{relative} to them. + +@item --with-packagelispdir=@file{auctex} +This is the directory where the bulk of the package gets located. The +startfile adds this into @code{load-path}. + +@item --with-auto-dir=@var{/dir} +You can use this option to specify the directory containing +automatically generated information by @kbd{M-x TeX-auto-generate-global @key{RET}}. It is not necessary for most +@TeX{} installs, but may be used if you don't like the directory that +configure is suggesting. + +@item --help +This is not an option specific to @AUCTeX{}. A number of standard +options to @command{configure} exist, and we do not have the room to +describe them here; a short description of each is available, using +@option{--help}. + +@c FIXME: It seems this no longer holds. +@c If you use @samp{--help=recursive}, then also @previewlatex{}-specific +@c options will get listed. + +@item --disable-preview +This disables configuration and installation of @previewlatex{}. This +option is not actually recommended. If your Emacs does not support +images, you should really upgrade to a newer version. Distributors +should, if possible, refrain from distributing @AUCTeX{} and +@previewlatex{} separately in order to avoid confusion and upgrade +hassles if users install partial packages on their own. + +@item --with-texmf-dir=@var{/dir} +@itemx --without-texmf-dir +@cindex preview-install-styles +This option is used for specifying a @acronym{TDS}-compliant directory +hierarchy. Using @code{--with-texmf-dir=@var{/dir}} you can specify +where the @TeX{} @acronym{TDS} directory hierarchy resides, and the +@TeX{} files will get installed in +@file{@var{/dir}/tex/latex/preview/}. + +If you use the @option{--without-texmf-dir} option, the @TeX{}-related +files will be kept in the Emacs Lisp tree, and at runtime the +@env{TEXINPUTS} environment variable will be made to point there. You +can install those files into your own @TeX{} tree at some later time +with @kbd{M-x preview-install-styles @key{RET}}. + +@item --with-tex-dir=@var{/dir} +If you want to specify an exact directory for the preview @TeX{} files, +use @code{--with-tex-dir=@var{/dir}}. In this case, the files will be +placed in @file{@var{/dir}}, and you'll also need the following option: + +@item --with-doc-dir=@var{/dir} +This option may be used to specify where the @TeX{} documentation goes. +It is to be used when you are using @code{--with-tex-dir=@var{/dir}}, +but is normally not necessary otherwise. +@end table + +@node Build/install and uninstall +@section Build/install and uninstall + +@cindex Installation +@cindex Make +@cindex Uninstallation + +Once @command{configure} has been run, simply enter + +@example +make +@end example + +@noindent +at the prompt to byte-compile the lisp files, extract the @TeX{} files +and build the documentation files. To install the files into the +locations chosen earlier, type + +@example +make install +@end example + +@noindent +You may need special privileges to install, e.g., if you are installing +into system directories. + +Should you want to completely remove the installed package, in the same +directory you built @AUCTeX{} run + +@example +make uninstall +@end example + +@noindent +You will need administration privileges if you installed the package +into system directories. + +@node Loading the package +@section Loading the package +@cindex @file{init.el} +@cindex @file{.emacs} + +You can detect the successful activation of @AUCTeX{} and +@previewlatex{} in the menus after loading a @LaTeX{} file like +@file{circ.tex}: @AUCTeX{} then gives you a @samp{Command} menu, +and @previewlatex{} gives you a @samp{Preview} menu. + +@cindex @file{auctex.el} +@cindex @file{tex-site.el} +With Emacs (or if you explicitly disabled use of the package system), +the startup files @file{auctex.el} and @file{preview-latex.el} may +already be in a directory of the @file{site-start.d/} variety if your +Emacs installation provides it. In that case they should be +automatically loaded on startup and nothing else needs to be done. If +not, they should at least have been placed somewhere in your +@code{load-path}. You can then load them by placing the lines + +@lisp +(load "auctex.el" nil t t) +(load "preview-latex.el" nil t t) +@end lisp +@noindent +into your init file such as @file{init.el} or @file{.emacs}. + +If you explicitly used @code{--with-lispdir}, you may need to add the +specified directory into Emacs' @code{load-path} variable by adding +something like + +@lisp +(add-to-list 'load-path "~/elisp") +@end lisp +@noindent +before the above lines into your Emacs startup file. + +For site-wide activation in GNU Emacs, see +@ifset rawfile +below. +@end ifset +@ifclear rawfile +@xref{Advice for package providers}. +@end ifclear + +Once activated, the modes provided by @AUCTeX{} are used per default for +all supported file types. If you want to change the modes for which it +is operative instead of the default, use +@example +@kbd{M-x customize-option @key{RET} TeX-modes @key{RET}} +@end example + +If you want to remove a preinstalled @AUCTeX{} completely before any of +its modes have been used, +@lisp +(unload-feature 'tex-site) +@end lisp +@noindent +should accomplish that. + +@node Advice for package providers +@section Providing @AUCTeX{} as a package + +As a package provider, you should make sure that your users will be +served best according to their intentions, and keep in mind that a +system might be used by more than one user, with different +preferences. + +There are people that prefer the built-in Emacs modes for editing +@TeX{} files, in particular plain @TeX{} users. There are various +ways to tell @AUCTeX{} even after auto-activation that it should +not get used, and they are described in +@ifset rawfile +the @file{README} file. +@end ifset +@ifclear rawfile +@ref{Introduction,,Introduction to @AUCTeX{}}. +@end ifclear + +So if you have users that don't want to use the preinstalled @AUCTeX{}, +they can easily get rid of it. Activating @AUCTeX{} by default is +therefore a good choice. + +If the installation procedure did not achieve this already by placing +@file{auctex.el} and @file{preview-latex.el} into a possibly existing +@file{site-start.d} directory, you can do this by placing + +@lisp +(load "auctex.el" nil t t) +(load "preview-latex.el" nil t t) +@end lisp + +@noindent in the system-wide @file{site-start.el}. + +The @option{--without-texmf-dir} option can be convenient for systems that +are intended to support more than a single TeX distribution. Since more +often than not @TeX{} packages for operating system distributions are +either much more outdated or much less complete than separately provided +systems like @w{@TeX{} Live}, this method may be generally preferable +when providing packages. + +The following package structure would be adequate for a typical fully +supported Unix-like installation: + +@c FIXME: teTeX is much outdated now. +@table @samp +@item preview-tetex +Style files and documentation for @file{preview.sty}, placed into a +@TeX{} tree where it is accessible from the te@TeX{} executables usually +delivered with a system. If there are other commonly used @TeX{} system +packages, it might be appropriate to provide separate packages for +those. +@item auctex-emacs-tetex +This package will require the installation of @samp{preview-tetex} and +will record in @code{TeX-macro-global} where to find the @TeX{} tree. +It is also a good idea to run +@example +emacs -batch -f TeX-auto-generate-global +@end example +when either @AUCTeX{} or te@TeX{} get installed or upgraded. If your +users might want to work with a different @TeX{} distribution (nowadays +pretty common), instead consider the following: +@item auctex-emacs +This package will be compiled with @option{--without-texmf-dir} and will +consequently contain the @samp{preview} style files in its private +directory. It will probably not be possible to initialize +@code{TeX-macro-global} to a sensible value, so running +@code{TeX-auto-generate-global} does not appear useful. This package +would neither conflict with nor provide @samp{preview-tetex}. +@end table + +@node Advice for non-privileged users +@section Installation for non-privileged users + +Often people without system administration privileges want to install +software for their private use. In that case you need to pass more +options to the @command{configure} script. + +The main expedient is using the @option{--prefix} option to the +@command{configure} script, and let it point to the personal home +directory. In that way, resulting binaries will be installed under the +@file{bin} subdirectory of your home directory, manual pages under +@file{man} and so on. It is reasonably easy to maintain a bunch of +personal software, since the prefix argument is supported by most +@command{configure} scripts. + +You often need to specify @option{--with-lispdir} option as well. +If you haven't installed Emacs under your home directory and use Emacs +installed in system directories, the @command{configure} script might not +be able to figure out suitable place to install lisp files under your +home directory. In that case, the @command{configure} script would +silently choose, by default, the @file{site-lisp} directory within +@code{load-path} for the place, where administration privileges are +usually required to put relevant files. Thus you will have to tell +the @command{configure} script explicitly where to put those files by, +e.g., @code{--with-lispdir=@samp{/home/myself/share/emacs/site-lisp}}. + +You'll have to add something like +@samp{/home/myself/share/emacs/site-lisp} to your @code{load-path} +variable, if it isn't there already. + +In addition, you will have to tell @command{configure} script where to +install @TeX{}-related files such as @file{preview.sty} if +@previewlatex{} isn't disabled. It is enough to specify +@option{--with-texmf-dir=@file{$HOME/texmf}} for most typical cases, but +you have to create the direcotry @file{$HOME/texmf} in advance if it +doesn't exist. If this prescription doesn't work, consider using one or +more of the options @code{--with-texmf-dir=@var{/dir}}, +@code{--without-texmf-dir}, @code{--with-tex-dir=@var{/dir}} and +@code{--with-doc-dir=@var{/dir}}. See @ref{Configure} for detail of +these options. + +Now here is another thing to ponder: perhaps you want to make it easy +for other users to share parts of your personal Emacs configuration. In +general, you can do this by writing @samp{~myself/} anywhere where you +specify paths to something installed in your personal subdirectories, +not merely @samp{~/}, since the latter, when used by other users, will +point to non-existent files. + +For yourself, it will do to manipulate environment variables in your +@file{.profile} resp.@: @file{.login} files. But if people will be +copying just Elisp files, their copies will not work. While it would +in general be preferable if the added components where available from +a shell level, too (like when you call the standalone info reader, or +try using @file{preview.sty} for functionality besides of Emacs +previews), it will be a big help already if things work from inside +of Emacs. + +Here is how to do the various parts: + +@subheading Making the Elisp available + +In GNU Emacs, it should be sufficient if people just do + +@lisp +(load "~myself/share/emacs/site-lisp/auctex.el" nil t t) +(load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t) +@end lisp +@noindent +where the path points to your personal installation. The rest of the +package should be found relative from there without further ado. + +@subheading Making the Info files available + +For making the info files accessible from within Elisp, something like +the following might be convenient to add into your or other people's +startup files: + +@lisp +(eval-after-load 'info + '(add-to-list 'Info-directory-list "~myself/info")) +@end lisp + +@subheading Making the @LaTeX{} style available + +If you want others to be able to share your installation, you should +configure it using @option{--without-texmf-dir}, in which case things +should work as well for them as for you. + +@subsection Using @AUCTeX{} from local Git repo + +With the techniques described above, it is also possible to use @AUCTeX{} +directly from a local Git repository. Let's assume you have your Git +repositories under @samp{~/development/}. + +First, you have to fetch a copy of the @AUCTeX{} Git repository. In a +shell, change directory to @samp{~/development/} and do: +@example +git clone https://git.savannah.gnu.org/git/auctex.git +@end example + +Now change directory to @samp{~/development/auctex} and run +@samp{./autogen.sh}. Next thing is to run @command{configure} like this: +@example +./configure --without-texmf-dir --with-lispdir=. +@end example + +@noindent +When finished, simply enter +@example +make +@end example +@noindent +and you're finished. Note that the @samp{make install} step is not +necessary. + +Now you have to tell Emacs about the plan. The following variables must +be set in your init file because their normal values are only correct when +@AUCTeX{} is installed: +@lisp +(setq TeX-data-directory "~/development/auctex" + TeX-lisp-directory TeX-data-directory) +@end lisp + +@noindent +The info files will be available with this: +@lisp +(eval-after-load 'info + '(add-to-list 'Info-additional-directory-list + "~/development/auctex/doc")) +@end lisp + +@noindent +Now you're ready to load @file{auctex.el} and @file{preview-latex.el} out +of this directory: +@lisp +(load "~/development/auctex/auctex.el" nil t t) +(load "~/development/auctex/preview-latex.el" nil t t) +@end lisp + +@ifclear rawfile +@node Installation under MS Windows +@section Installation under MS Windows +@include wininstall.texi +@end ifclear + +@node Customizing +@section Customizing +@cindex Site initialization +@cindex Initialization +@cindex @file{tex-site.el} +@cindex Personal customization +@cindex Site customization +@cindex Customization +@cindex Customization, personal +@cindex Customization, site +Most of the site-specific customization should already have happened +during configuration of @AUCTeX{}. Any further customization can be +done with customization buffers directly in Emacs. Just type @kbd{M-x +customize-group @key{RET} AUCTeX @key{RET}} to open the customization group for +@AUCTeX{} or use the menu entries provided in the mode menus. Editing +the file @file{tex-site.el} as suggested in former versions of @AUCTeX{} +should not be done anymore because the installation routine will +overwrite those changes. + +You might check some options with a special significance. They are +accessible directly by typing @kbd{M-x customize-option @key{RET} <option> +@key{RET}}. + +@defopt TeX-macro-global +Directories containing the site's @TeX{} style files. +@end defopt + +Normally, @AUCTeX{} will only allow you to complete macros and +environments which are built-in, specified in @AUCTeX{} style files or +defined by yourself. If you issue the @kbd{M-x +TeX-auto-generate-global} command after loading @AUCTeX{}, you will be +able to complete on all macros available in the standard style files +used by your document. To do this, you must set this variable to a list +of directories where the standard style files are located. The +directories will be searched recursively, so there is no reason to list +subdirectories explicitly. Automatic configuration will already have +set the variable for you if it could use the program @command{kpsewhich}. +In this case you normally don't have to alter anything. + +@c Local Variables: +@c mode: texinfo +@c TeX-master: "auctex" +@c End: diff --git a/elpa/auctex-13.1.3/doc/intro.texi b/elpa/auctex-13.1.3/doc/intro.texi new file mode 100644 index 0000000..0bbf739 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/intro.texi @@ -0,0 +1,106 @@ +@include macros.texi +@ifset rawfile +@paragraphindent none +This is the README file for the AUCTeX distribution. + +@quotation +Copyright (C) 2008, 2017, 2018 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, are +permitted in any medium without royalty provided the copyright notice +and this notice are preserved. +@end quotation + +@chapheading Introduction to @AUCTeX{} +@end ifset + +@ifclear rawfile +@node Summary +@chapter Overview of @AUCTeX{} +@end ifclear + +@ifset rawfile +This file gives a brief overview of what @AUCTeX{} is. It is +@strong{not} an attempt to document @AUCTeX{}. Real documentation for +@AUCTeX{} is available in the manual, which should be available as an +info file after installation. +@end ifset + +@AUCTeX{} is a comprehensive customizable integrated environment for +writing input files for @TeX{}, @LaTeX{}, @ConTeXt{}, Texinfo, and +doc@TeX{} using Emacs. + +It supports you in the insertion of macros, environments, and sectioning +commands by providing completion alternatives and prompting for +parameters. It automatically indents your text as you type it and lets +you format a whole file at once. The outlining and folding facilities +provide you with a focused and clean view of your text. + +@AUCTeX{} lets you process your source files by running @TeX{} and +related tools (such as output filters, post processors for generating +indices and bibliographies, and viewers) from inside Emacs. @AUCTeX{} +lets you browse through the errors @TeX{} reported, while it moves the +cursor directly to the reported error, and displays some documentation +for that particular error. This will even work when the document is +spread over several files. + +One component of @AUCTeX{} that @LaTeX{} users will find attractive is +@previewlatex{}, a combination of folding and in-source previewing +that provides true ``What You See Is What You Get'' experience in your +sourcebuffer, while letting you retain full control. +@ifset rawfile +For more information, see further below. +@end ifset + +More detailed information about the features and usage of @AUCTeX{} can +be found in the +@ifset rawfile +@AUCTeX{} manual. You can access it from within Emacs by typing +@kbd{C-h i d m auctex @key{RET}}. If you prefer the standalone info +reader, issue the command @code{info auctex} in a terminal. +@end ifset +@ifclear rawfile +remainder of this manual. +@end ifclear + +@AUCTeX{} is written entirely in Emacs Lisp, and hence you can easily +add new features for your own needs. It is a GNU project and +distributed under the `GNU General Public License Version 3'. + +The most recent version is always available at +@url{https://ftp.gnu.org/pub/gnu/auctex/}. + +WWW users may want to check out the @AUCTeX{} page at +@url{https://www.gnu.org/software/auctex/}. + +For comprehensive information about how to install @AUCTeX{} +@ifset rawfile +read the file @file{INSTALL} or @file{INSTALL.windows}, respectively. +@end ifset +@ifclear rawfile +@xref{Installation}, or @ref{Installation under MS Windows}, +respectively. +@end ifclear + +If you are considering upgrading @AUCTeX{}, the recent changes are +described in +@ifset rawfile +the @file{CHANGES} file. +@end ifset +@ifclear rawfile +@ref{Changes}. +@end ifclear + +If you want to discuss @AUCTeX{} with other users or its developers, +there are several mailing lists you can use. + +Send a mail with the subject ``subscribe'' to +@email{auctex-request@@gnu.org} in order to join the general discussion +list for @AUCTeX{}. Articles should be sent to @email{auctex@@gnu.org}. +In a similar way, you can subscribe to the @email{info-auctex@@gnu.org} +list for just getting important announcements about @AUCTeX{}. The list +@email{bug-auctex@@gnu.org} is for bug reports which you should usually +file with the @kbd{M-x TeX-submit-bug-report @key{RET}} command. If you +want to address the developers of @AUCTeX{} themselves with technical +issues, they can be found on the discussion list +@email{auctex-devel@@gnu.org}. diff --git a/elpa/auctex-13.1.3/doc/macros.texi b/elpa/auctex-13.1.3/doc/macros.texi new file mode 100644 index 0000000..4162d05 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/macros.texi @@ -0,0 +1,89 @@ +@ifclear macros +@set macros +@ifnottex +@macro AUCTeX {} +AUC@TeX{} +@end macro +@macro ConTeXt {} +Con@TeX{}t +@end macro +@macro previewlatex {} +preview-latex +@end macro +@macro fontlatex {} +font-latex +@end macro +@ifset no-acronym +@clear no-acronym +@macro acronym {text} +@sc{\text\} +@end macro +@end ifset +@ifset no-env +@clear no-env +@macro env {text} +@code{\text\} +@end macro +@end ifset +@ifset no-option +@clear no-option +@macro option {text} +@samp{\text\} +@end macro +@end ifset +@ifset no-command +@clear no-command +@macro command {text} +@samp{\text\} +@end macro +@end ifset +@end ifnottex +@ifset no-sansserif +@macro sansserif {text}@c +@iftex +{@textsf \text\}@c +@end iftex +@ifnottex +\text\@c +@end ifnottex +@end macro +@end ifset +@tex +\global\let\savedTeX\TeX +\gdef\TeX#1{\savedTeX#1} +\gdef\LaTeX{% + L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX} +\gdef\previewlatex#1{% + {\sf preview-latex}#1} +\gdef\fontlatex#1{% + {\sf font-latex}#1} +\gdef\AUCTeX{AUC\TeX} +\gdef\ConTeXt#1{% + Con\TeX t#1} +\toks0\expandafter{\indexnofonts + \def\TeX#1{TeX#1}% + \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}} +\xdef\indexnofonts{\the\toks0} +\ifx\commondummies\undefined \else + \toks0\expandafter{\commondummies + \def\TeX#1{TeX#1}% + \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}} + \xdef\commondummies{\the\toks0} +\fi +\ifx\definedummies\undefined \else + \toks0\expandafter{\definedummies + \def\TeX#1{TeX#1}% + \def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}} + \xdef\definedummies{\the\toks0} +\fi +\ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi +\ifx\env\undefined \global\let\env=\code \fi +\ifx\option\undefined \global\let\option=\samp \fi +\ifx\command\undefined \global\let\command=\samp \fi +%Bug fix for texinfo.tex: +\gdef\cslet#1#2{% +\expandafter\let +\csname#1\expandafter\endcsname +\csname#2\endcsname} +@end tex +@end ifclear diff --git a/elpa/auctex-13.1.3/doc/preview-dtxdoc.pl b/elpa/auctex-13.1.3/doc/preview-dtxdoc.pl new file mode 100755 index 0000000..8eaa33d --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-dtxdoc.pl @@ -0,0 +1,156 @@ +#!/usr/bin/perl +# -*- coding: iso-latin-1; -*- + +# Autoconverter from preview.dtx to preview-dtxdoc.texi + +# Author: Jan-ke Larsson <jalar@mai.liu.se> +# Maintainer: auctex-devel@gnu.org + +# Copyright (C) 2002, 2005, 2020, 2021 Free Software Foundation, Inc. + +# This file is part of AUCTeX. + +# AUCTeX is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. + +# AUCTeX is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with AUCTeX; see the file COPYING. If not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +# Commentary: + +# Simpleminded autoconverter from preview.dtx to preview-dtxdoc.texi +# run as 'perl preview-dtxdoc.pl ../latex/preview.dtx preview-dtxdoc.texi' + +die "Usage: perl preview-dtxdoc.pl infile outfile" unless ($#ARGV == 1); +open(STDIN, $ARGV[0]) || die "Can't open $ARGV[0] for reading"; +open(STDOUT, "> $ARGV[1]") || die "Can't open $ARGV[1] for writing"; + + +# Eat header +MUNGE: while (<STDIN>) { + last MUNGE if /^% *.section/; +} + +# Fish out possible CR characters. +/(\r*)$/; +$cr = $1; + + +# Noindent is used sometimes after \end{quote} (see below) +$noindent=""; +# Quote environments is translated into @example _without_ +# @code{..} inside (see below) +$quote=""; +MAIN: while (<STDIN>) { + s/^%//; + s/\\%/%/g; + + # Comment + s/\^\^A.*\n//; + + # Text-substitution macros + s/\@/\@\@/g; + s/\\#/#/g; + s/AUC~?\\TeX[\\ ]?/\@AUCTeX{}/g; + s/\\LaTeX[\\ ]?/\@LaTeX{}/g; + s/\\TeX[\\ ]?/\@TeX{}/g; + s/\\previewlatex[\\ ]?/\@previewlatex{}/g; + s/EPS/\@acronym{EPS}/g; + s/DVI/\@acronym{DVI}/g; + s/~/\@w{ }/g; + s/^ *//; + # Environments + if (s/\\begin\{quote\}/$cr\n\@example/) { + $quote="yes" } + if (/^\w/) { + print $noindent } + $noindent = ""; + if (s/\\end\{quote\}/\@end example$cr\n/) { + $quote=""; + $noindent="\@noindent$cr\n" } + s/\\begin\{description\}/$cr\n\@table \@w/; + # Convoluted pattern: handle + # \item[|...|], \item[\meta{..}] and \item[{|[]|}] + s/\\item\[\{?(.+?[\|\}])\}?\] ?/\@item $1$cr\n/; + s/\\end\{description\}/\@end table$cr\n/; + s/\\begin\{enumerate\}/$cr\n\@enumerate/; + s/\\item /\@item /; + s/\\end\{enumerate\}/\@end enumerate$cr\n/; + + # Formatting (\cmd is special within {quote}) + s/\\texttt/\@option/g; + s/\\marg\{([^}]+)\}/\@{\@var{$1}\@}/g; + s/\\meta/\@var/g; + s/\\emph/\@emph/g; + s/\\cmd(\\[\(\)\w]+)/|$1|/g; + s/\\cmd\{(.*?)\}/|$1|/g; + s/\\oarg\{([^}]+?)\}/\[\@var{$1}\]/g; + s/\\char.//g; + s/\\raggedright$cr\n//g; + s/\\DescribeEnv\{(.*?)\} /\@item \\begin\@{$1\@}\@dots{}\\end\@{$1\@}$cr\n/; + if (s/\\DescribeMacro\{(.*?)\}( |$cr\n)/\@item $1$cr\n/) { + # Index entries for two important macros + if (/(\\Preview(Macro|Environment))( |$cr\n)/) { + $_ .= "\@findex $1$cr\n"; + } + } + + # ||||||| Hell... I hate bars + # Braces WITHIN bars should be escaped like so: @{ @} + # and |..| translates to @code{..} or @file{..} depending on content + # and to .. if in {quote} + @chunks = split /\|/; + $odd=0; + COMMAND: foreach (@chunks) { + if ($odd==0) { + $odd=1; + } else { + s/\{/\@\{/g; + s/\}/\@\}/g; + if (! $quote) { + if (/[.\/]/) { + $_="\@file\{".$_."\}"; + } else { + $_="\@code\{".$_."\}"; + } + } + $odd=0; + } + } + $_=join("",@chunks); + # Argh! mixed types occurs in @code{...}@var{..}@file{..} + # Should be @file{...@var{..}..} + s/\@code(\S*?)\}(\S*)\@file\{/\@file$1$2/g; + + # Texinfo @node-ification + if (s/\\section\{(.*)\}/\@subsection $1/) { + if (s/[Oo]ptions/options/) { + $_="\@menu$cr\n" . +"* Package options::$cr\n" . +"* Provided commands::$cr\n" . +"\@end menu$cr\n$cr\n" . +"\@node Package options, Provided commands, The LaTeX style file, The LaTeX style file$cr\n" . $_; + } elsif (s/[Cc]ommands/commands/) { + # \Describe... needs @table + $_= "\@node Provided commands, ,Package options, The LaTeX style file$cr\n" . + $_ . "$cr\n\@table \@code$cr\n"; + } + } + + # Stop here + # \Describe.... needs @end table + if (/^.StopEventually/) { + print "\@end table$cr\n"; + last MAIN; + } + print $_; +} diff --git a/elpa/auctex-13.1.3/doc/preview-faq.texi b/elpa/auctex-13.1.3/doc/preview-faq.texi new file mode 100644 index 0000000..bf16c7f --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-faq.texi @@ -0,0 +1,306 @@ +@c This is part of the preview-latex manual. +@c Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 +@c 2017, 2021 Free Software Foundation, Inc. +@c See file preview-latex.texi for copying conditions. +@ifset rawfile +@include macros.texi + +@node Frequently Asked Questions, Introduction to FAQ, (dir), (dir) +@top Frequently Asked Questions about @previewlatex{} + +@contents + +@end ifset + +@menu +* Introduction to FAQ:: +* Requirements:: +* Installation Trouble:: +* Customization:: +* Troubleshooting:: +* Other formats:: +@end menu + +@comment we need at least one chapter, or the numbers disappear in the +@comment plain version of the FAQ. + +@ifset rawfile +@node Introduction to FAQ, Requirements, Frequently Asked Questions, Frequently Asked Questions +@chapter Introduction +@raisesections +@end ifset +@ifclear rawfile +@node Introduction to FAQ, Requirements, Frequently Asked Questions, Frequently Asked Questions +@section Introduction +@end ifclear + +@subsection How can I contribute to the FAQ? + +Send an email with the subject: +@example +Preview FAQ +@end example +to @email{auctex-devel@@gnu.org}. + +@node Requirements, Installation Trouble, Introduction to FAQ, Frequently Asked Questions +@section Requirements + +@subsection Which version of Emacs is needed? + +@previewlatex{} nominally requires @w{GNU Emacs} with a version of at +least 25.1. + +@subsection Which versions of Ghostscript and @AUCTeX{} are needed? + +We recommend to use GNU or AFPL Ghostscript with a version of at least +7.07. + +@previewlatex{} has been distributed as part of @AUCTeX{} since version +11.80. If your version of @AUCTeX{} is older than that, or if it does +not contain a working copy of @previewlatex{}, complain to wherever you +got it from. + +@subsection I have trouble with the display format... +We recommend keeping the variable @code{preview-image-type} set to +@code{dvipng} (if you have it installed) or @code{png}. This is the +default and can be set via the @samp{Preview/Customize} menu. + +All other formats are known to have inconveniences, either in file size +or quality. There are some Emacs versions around not supporting +@acronym{PNG}; the proper way to deal with that is to complain to your +Emacs provider. Short of that, checking out @acronym{PNM} or +@acronym{JPEG} formats might be a good way to find out whether the lack +of @acronym{PNG} format support might be the only problem with your +Emacs. + +@subsection For which OS does preview work? + +It is known to work under the X Window System for Linux and for several +flavors of Unix: we have reports for HP and Solaris. + +There are several development versions of Emacs around for native MacOS +Carbon, and @previewlatex{} is working with them, too. + +With Windows, both native Emacs and Cygwin Emacs should work. However, it +is known that @url{https://miktex.org/,MiK@TeX{}} sometimes doesn't work +with @previewlatex{}. In that case, use +@url{https://tug.org/texlive/,@TeX{} Live} instead. + +@node Installation Trouble, Customization, Requirements, Frequently Asked Questions +@section Installation Trouble + +@subsection I just get @samp{LaTeX found no preview images}. + +The reason for this is that @LaTeX{} found no preview images in the +document in question. + +One reason might be that there are no previews to be seen. If you have +not used @previewlatex{} before, you might not know its manner of +operation. One sure-fire way to test if you just have a document where +no previews are to be found is to use the provided example document +@file{circ.tex} (you will have to copy it to some directory where you +have write permissions). If the symptom persists, you have a problem, +and the problem is most likely a @LaTeX{} problem. Here are possible +reasons: + +@table @asis + +@item Filename database not updated +Various @TeX{} distributions have their own ways of knowing where the +files are without actually searching directories. The normal +@previewlatex{} installation should detect common tools for that purpose +and use them. If this goes wrong, or if the files get installed into a +place where they are not looked for, the @LaTeX{} run will fail. + +@item An incomplete manual installation +This should not happen if you followed installation instructions. +Unfortunately, people know better all the time. If only +@file{preview.sty} gets installed without a set of supplementary files +also in the @file{latex} subdirectory, @previewlatex{} runs will not +generate any errors, but they will not produce any previews, either. + +@item An outdated @file{preview} installation +The @file{preview.sty} package is useful for more than just +@previewlatex{}. For example, it is part of @w{@TeX{} Live}. So you have +to make sure that @previewlatex{} does not get to work with outdated +style and configuration files: some newer features will not work with +older @TeX{} style files, and really old files will make +@previewlatex{} fail completely. There usual is a local @file{texmf} +tree, or even a user-specific tree that are searched before the default +tree. Make sure that the first version of those files that gets found +is the correct one. +@end table + +@node Customization, Troubleshooting, Installation Trouble, Frequently Asked Questions +@section Customization + +@subsection How to include additional environments like @code{enumerate} + +By default, @previewlatex{} is intended mainly for displaying +mathematical formulas, so environments like @code{enumerate} or +@code{tabular} (except where contained in a float) are not included. +You can include them however manually by adding the lines: + +@example +\usepackage[displaymath,textmath,sections,graphics,floats]@{preview@} +\PreviewEnvironment@{enumerate@} +@end example +@noindent +in your document header, that is before + +@example +\begin@{document@} +@end example +@noindent +In general, @file{preview} should be loaded as the last thing before +the start of document. + +Be aware that + +@example +\PreviewEnvironment@{...@} +@end example +@noindent +does not accept a comma separated +list! Also note that by putting more and more + +@example +\PreviewEnvironment@{...@} +@end example +@noindent +in your document, it will look more and more like a @acronym{DVI} file +preview when running @previewlatex{}. Since each preview is treated as +one large monolithic block by Emacs, one should really restrict +previews to those elements where the improvement in visual +representation more than makes up for the decreased editability. + +@subsection What if I don't want to change the document? +The easiest way is to generate a configuration file in the current +directory. You can basically either create @file{prdefault.cfg} which +is used for any use of the @samp{preview} package, or you can use +@file{prauctex.cfg} which only applies to the use from with Emacs. Let +us assume you use the latter. In that case you should write something like + +@example +\InputIfFileExists@{preview/prauctex.cfg@}@{@}@{@} +\PreviewEnvironment@{enumerate@} +@end example +@noindent +in it. The first line inputs the system-wide default configuration +(the file name should match that, but not your own +@file{prauctex.cfg}), then you add your own stuff. + +@subsection Suddenly I get gazillions of ridiculous pages?!? + +When @previewlatex{} works on extracting its stuff, it typesets each +single preview on a page of its own. This only happens when actual +previews get generated. Now if you want to configure @previewlatex{} in +your document, you need to add your own @code{\usepackage} call to +@samp{preview} so that it will be able to interpret its various +definition commands. It is an error to add the @code{active} option to +this invocation: you don't want the package to be active unless +@previewlatex{} itself enables the previewing operation (which it will). + +@subsection Does @previewlatex{} work with presentation classes? + +@previewlatex{} should work with most presentation classes. However, +since those classes often have macros or pseudo environments +encompassing a complete slide, you will need to use the customization +facilities of @file{preview.sty} to tell it how to resolve this, whether +you want no previews, previews of whole slides or previews of inner +material. + +@node Troubleshooting, Other formats, Customization, Frequently Asked Questions +@section Troubleshooting + +@subsection Preview causes all sort of strange error messages + +When running @previewlatex{} and taking a look at either log file or +terminal output, lots of messages like + +@example +! Preview: Snippet 3 started. +<-><-> + +l.52 \item Sie lassen sich als Funktion $ + y = f(x)$ darstellen. +! Preview: Snippet 3 ended.(491520+163840x2494310). +<-><-> + +l.52 \item Sie lassen sich als Funktion $y = f(x)$ + darstellen. +@end example +@noindent +appear (previous versions generated messages looking even more like +errors). Those are not real errors (as will be noted in the log +file). Or rather, while they @strong{are} really @TeX{} error +messages, they are intentional. This currently is the only reliable +way to pass the information from the @LaTeX{} run of @previewlatex{} to +its Emacs part about where the previews originated in the source text. +Since they are actual errors, you will also get @AUCTeX{} to state +@example +Preview-LaTeX exited as expected with code 1 at Wed Sep 4 17:03:30 +@end example +@noindent +after the @LaTeX{} run in the run buffer. This merely indicates that +errors were present, and errors will always be present when +@previewlatex{} is operating. There might be also real errors, so in +case of doubt, look for them explicitly in either run buffer or the +resulting @file{.log} file. + +@subsection Why do my @acronym{DVI} and @acronym{PDF} output files vanish? + +In order to produce the preview images @previewlatex{} runs @LaTeX{} on +the master or region file. The resulting @acronym{DVI} or @acronym{PDF} +file can happen to have the same name as the output file of a regular +@LaTeX{} run. So the regular output file gets overwritten and is +subsequently deleted by @previewlatex{}. + +@subsection My output file suddenly only contains preview images?! + +As mentioned in the previews @acronym{FAQ} entry, @previewlatex{} might +use the file name of the original output file for the creation of +preview images. If the original output file is being displayed with a +viewer when this happens, you might see strange effects depending on the +viewer, e.g.@: a message about the file being corrupted or the display of +all the preview images instead of your typeset document. (Also +@pxref{Customization}.) + + +@node Other formats, , Troubleshooting, Frequently Asked Questions +@section @previewlatex{} when not using @LaTeX{} + +@subsection Does @previewlatex{} work with PDF@LaTeX{}? + +Yes, as long as you use @AUCTeX{}'s own PDF@LaTeX{} mode and have not +messed with @samp{TeX-command-list}. + +@subsection Does @previewlatex{} work with @samp{elatex}? + +No problem here. If you configure your @AUCTeX{} to use @samp{elatex}, +or simply have @samp{latex} point to @samp{elatex}, this will work fine. +Modern @TeX{} distributions use e@TeX{} for @LaTeX{}, anyway. + +@subsection Does @previewlatex{} work with @ConTeXt{}? + +In short, no. The @samp{preview} package is +@LaTeX{}-dependent. Adding support for other formats requires +volunteers. + +@subsection Does @previewlatex{} work with plain @TeX{}? + +Again, no. Restructuring the @samp{preview} package for @samp{plain} +operation would be required. Volunteers welcome. + +In some cases you might get around by making a wrapper pseudo-Master +file looking like the following: + +@example +\documentclass@{article@} +\usepackage@{plain@} +\begin@{document@} +\begin@{plain@} +\input myplainfile +\end@{plain@} +\end@{document@} +@end example diff --git a/elpa/auctex-13.1.3/doc/preview-latex.texi b/elpa/auctex-13.1.3/doc/preview-latex.texi new file mode 100644 index 0000000..26adb89 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-latex.texi @@ -0,0 +1,849 @@ +\input texinfo +@comment %**start of header +@setfilename preview-latex.info +@include version.texi +@settitle preview-latex @value{VERSION} +@comment %**end of header +@include macros.texi +@copying +This manual is for preview-latex, a @LaTeX{} preview mode for @AUCTeX{} +(version @value{VERSION} from @value{UPDATED}). + +Copyright @copyright{} 2001, 2002, 2003, +2004, 2005, 2006, 2017-2019, 2021 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License.'' +@end quotation +@end copying + +@dircategory Emacs +@direntry +* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs +@end direntry +@dircategory TeX +@direntry +* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs +@end direntry +@c footnotestyle separate +@c paragraphindent 2 +@syncodeindex vr cp +@syncodeindex ky cp +@syncodeindex fn cp + +@iftex +@tolerance 10000 @emergencystretch 3em +@end iftex + +@finalout +@titlepage +@title @previewlatex{} +@subtitle A @LaTeX{} preview mode for @AUCTeX{} in Emacs. +@subtitle Version @value{VERSION}, @value{UPDATED} +@author Jan-@AA{}ke Larsson +@author David Kastrup and others +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@c @summarycontents +@contents + +@c Use @ifinfo _and_ @ifhtml here because Texinfo 3 cannot cope with +@c @ifnottex around a top node. +@ifinfo +@node top, , (dir), (dir) +@top @previewlatex{} + +This manual may be copied under the conditions spelled out in +@ref{Copying this Manual}. + +@end ifinfo +@ifhtml +@node top, Copying, (dir), (dir) +@top @previewlatex{} +@insertcopying +@end ifhtml + +@iftex +@unnumbered @previewlatex{} +@end iftex + +@previewlatex{} is a package embedding preview fragments into Emacs +source buffers under the @AUCTeX{} editing environment for @LaTeX{}. It +uses @file{preview.sty} for the extraction of certain environments (most +notably displayed formulas). Other applications of this style file are +possible and exist. + +The name of the package is really @samp{preview-latex}, all in +lowercase letters, with a hyphen. If you typeset it, you can use a +sans-serif font to visually offset it. + +@menu +* Copying:: Copying +* Introduction:: Getting started. +* Installation:: Make Install. +* Keys and lisp:: Key bindings and user-level lisp functions. +* Simple customization:: To make it fit in. +* Known problems:: When things go wrong. +* For advanced users:: Internals and more customizations. +* ToDo:: Future development. +* Frequently Asked Questions:: All about @previewlatex{} +* Copying this Manual:: GNU Free Documentation License +* Index:: A menu of many topics. +@end menu + +@node Copying, Introduction, top, top +@unnumbered Copying +@cindex Copying +@cindex Copyright +@cindex GPL +@cindex General Public License +@cindex License +@cindex Free +@cindex Free software +@cindex Distribution +@cindex Right +@cindex Warranty + +For the conditions for copying parts of @previewlatex{}, see the General +Public Licenses referred to in the copyright notices of the files, the +General Public Licenses accompanying them and the explanatory section in +@ref{Copying,,,auctex,the @AUCTeX{} manual}. + +This manual specifically is covered by the GNU Free Documentation +License (@pxref{Copying this Manual}). + +@node Introduction, Installation, Copying, top +@c Used as @file{README} as well: in separate file +@chapter Introduction +@include preview-readme.texi + +@node Installation, Keys and lisp, Introduction, top +@chapter Installation +Installation is now being covered in +@ref{Installation,,,auctex,the @AUCTeX{} manual}. + +@node Keys and lisp, Simple customization, Installation, top +@chapter Key bindings and user-level lisp functions + +@cindex Menu entries +@previewlatex{} adds key bindings starting with @kbd{C-c C-p} to the +supported modes of @AUCTeX{} (@xref{Key Index,,,auctex}). It will +also add its own @samp{Preview} menu in the menu bar, as well as an icon +in the toolbar. + +The following only describes the interactive use: view the documentation +strings with @kbd{C-h f} if you need the Lisp information. + +@table @w +@item @kbd{C-c C-p C-p} +@itemx @code{preview-at-point} +@itemx Preview/Generate previews (or toggle) at point +If the cursor is positioned on or inside of a preview area, this +toggles its visibility, regenerating the preview if necessary. If not, +it will run the surroundings through preview. The surroundings include +all areas up to the next valid preview, unless invalid previews occur +before, in which case the area will include the last such preview in +either direction. And overriding any other +action, if a region is active (@code{transient-mark-mode}), it is run +through @code{preview-region}. +@kindex @kbd{C-c C-p C-p} +@findex preview-at-point + +@item @kbd{@key{mouse-2}} +The middle mouse button has a similar action bound to it as +@code{preview-at-point}, only that it knows which preview to apply it to +according to the position of the click. You can click either anywhere +on a previewed image, or when the preview is opened and showing the +source text, you can click on the icon preceding the source text. In +other areas, the usual mouse key action (typically: paste) is not +affected. + +@item @kbd{@key{mouse-3}} +The right mouse key pops up a context menu with several options: +toggling the preview, regenerating it, removing it (leaving the +unpreviewed text), copying the text inside of the preview, and copying +it in a form suitable for copying as an image into a mail or news +article. This is a one-image variant of the following command: + +@item @kbd{C-c C-p C-w} +@itemx @code{preview-copy-region-as-mml} +@itemx Copy a region as MML +@kindex @kbd{C-c C-p C-w} +@findex preview-copy-region-as-mml +This command is also available as a variant in the context menu on the +right mouse button (where the region is the preview that has been +clicked on). It copies the current region into the kill buffer in a +form suitable for copying as a text including images into a mail or news +article using mml-mode (@pxref{Composing,,Composing,emacs-mime,Emacs +MIME}). + +If you regenerate or otherwise kill the preview in its source buffer +before the mail or news gets posted, this will fail. Also you should +generate images you want to send with @code{preview-transparent-border} +@vindex preview-transparent-border +set to @code{nil}, or the images will have an ugly border. +@previewlatex{} detects this condition and asks whether to regenerate +the region with borders switched off. As this is an asynchronous +operation running in the background, you'll need to call this command +explicitly again to get the newly generated images into the kill ring. + +Preview your articles with @code{mml-preview} (on @kbd{C-c C-m P}) +@kindex @kbd{C-c C-m P} +to make sure they look fine. + +@item @kbd{C-c C-p C-e} +@itemx @code{preview-environment} +@itemx Preview/Generate previews for environment +Run preview on @LaTeX{} environment. The environments in +@code{preview-inner-environments} are treated as inner levels so that +for instance, the @code{split} environment in +@code{\begin@{equation@}\begin@{split@}@dots{}\end@{split@}\end@{equation@}} +is properly displayed. If called with a numeric argument, the +corresponding number of outward nested environments is treated as inner +levels. +@kindex @kbd{C-c C-p C-e} +@findex preview-environment + +@item @kbd{C-c C-p C-s} +@itemx @code{preview-section} +@itemx Preview/Generate previews for section +Run preview on this @LaTeX{} section. +@kindex @kbd{C-c C-p C-s} +@findex preview-section + +@item @kbd{C-c C-p C-r} +@itemx @code{preview-region} +@itemx Preview/Generate previews for region +Run preview on current region. +@kindex @kbd{C-c C-p C-r} +@findex preview-region + +@item @kbd{C-c C-p C-b} +@itemx @code{preview-buffer} +@itemx Preview/Generate previews for buffer +Run preview on the current buffer. +@kindex @kbd{C-c C-p C-b} +@findex preview-buffer + +@item @kbd{C-c C-p C-d} +@itemx @code{preview-document} +@itemx Preview/Generate previews for document +Run preview on the current document. +@kindex @kbd{C-c C-p C-d} +@findex preview-document + +@item @kbd{C-c C-p C-c C-p} +@itemx @code{preview-clearout-at-point} +@itemx Preview/Remove previews at point +@kindex @kbd{C-c C-p C-c C-p} +@findex preview-clearout-at-point +Clear out (remove) the previews that are immediately adjacent to point. + +@item @kbd{C-c C-p C-c C-s} +@itemx @code{preview-clearout-section} +@itemx Preview/Remove previews from section +@kindex @kbd{C-c C-p C-c C-s} +@findex preview-clearout-document +Clear out all previews in current section. + +@item @kbd{C-c C-p C-c C-r} +@itemx @code{preview-clearout} +@itemx Preview/Remove previews from region +@kindex @kbd{C-c C-p C-c C-r} +@findex preview-clearout +Clear out all previews in the current region. + +@item @kbd{C-c C-p C-c C-b} +@itemx @code{preview-clearout-buffer} +@itemx Preview/Remove previews from buffer +@kindex @kbd{C-c C-p C-c C-b} +@findex preview-clearout-buffer +Clear out all previews in current buffer. This makes the current buffer +lose all previews. + +@item @kbd{C-c C-p C-c C-d} +@itemx @code{preview-clearout-document} +@itemx Preview/Remove previews from document +@kindex @kbd{C-c C-p C-c C-d} +@findex preview-clearout-document +Clear out all previews in current document. The document consists of +all buffers that have the same master file as the current buffer. This +makes the current document lose all previews. + +@item @kbd{C-c C-p C-f} +@itemx @code{preview-cache-preamble} +@itemx Preview/Turn preamble cache on +@kindex @kbd{C-c C-p C-f} +@findex preview-cache-preamble +Dump a pregenerated format file. For the rest of the session, this file +is used when running on the same master file. Use this if you know your +@LaTeX{} takes a long time to start up, the speedup will be most +noticeable when generating single or few previews. If you change your +preamble, do this again. @previewlatex{} will try to detect the +necessity of that automatically when editing changes to the preamble are +done from within Emacs, but it will not notice if the preamble +effectively changes because some included file or style file is +tampered with. + +Note that support for preamble cache is limited for @LaTeX{} variants. +c.f.@: @url{https://github.com/davidcarlisle/dpctex/issues/15} +@itemize @bullet +@item +Xe@LaTeX{} cannot use preamble cache at all. The reason is intrinsic in +Xe@LaTeX{}, so @previewlatex{} can't help. +@item +Lua@LaTeX{} works with preamble cache only when the preamble is simple +enough, i.e., when it doesn't load opentype fonts and it doesn't use lua +codes in preamble. +@end itemize + +@item @kbd{C-c C-p C-c C-f} +@itemx @code{preview-cache-preamble-off} +@itemx Preview/Turn preamble cache off +@kindex @kbd{C-u C-c C-p C-f} +@findex preview-cache-preamble-off +Clear the pregenerated format file and stop using preambles for the +current document. If the caching gives you problems, use this. + +@item @kbd{C-c C-p C-i} +@itemx @code{preview-goto-info-page} +@itemx Preview/Read Documentation +@kindex @kbd{C-c C-p C-i} +@findex preview-goto-info-page +Read +@ifinfo +this +@end ifinfo +@ifnotinfo +the +@end ifnotinfo +info manual. + +@item @kbd{M-x preview-report-bug @key{RET}} +@itemx @code{preview-report-bug} +@itemx Preview/Report Bug +@kindex @kbd{M-x preview-report-bug @key{RET}} +@findex preview-report-bug +@cindex Report a bug +This is the preferred way of reporting bugs as it will fill in what +version of @previewlatex{} you are using as well as versions of +relevant other software, and also some of the more important +settings. Please use this method of reporting, if at all possible and +before reporting a bug, have a look at @ref{Known problems}. + +@item @kbd{C-c C-k} +@itemx LaTeX/TeX Output/Kill Job +@kindex @kbd{C-c C-k} +@cindex Kill preview-generating process +Kills the preview-generating process. This is really an @AUCTeX{} +keybinding, but it is included here as a hint. If you are generating +a preview and then make a change to the buffer, @previewlatex{} may be +confused and place the previews wrong. +@end table + +@node Simple customization, Known problems, Keys and lisp, top +@chapter Simple customization + +Customization options can be found by typing @kbd{M-x customize-group +@key{RET} preview @key{RET}}. Remember to set the option when you have +changed it. The list of suggestions can be made very long (and is +covered in detail in @ref{For advanced users}), but some are: + +@itemize @bullet +@item Change the color of the preview background + +If you use a non-white background in Emacs, you might have color +artifacts at the edges of your previews. Playing around with the option +@code{preview-transparent-color} in the @samp{Preview Appearance} group +might improve things. With some settings, the cursor may cover the +whole background of a preview, however. + +This option is specific to the display engine in use. + +@item Showing @code{\label}s +@cindex Showing @code{\label}s + +When using @previewlatex{}, the @code{\label}s are hidden by the +previews. It is possible to make them visible in the output +by using the @LaTeX{} package @code{showkeys} alternatively +@code{showlabels}. However, the boxes of these labels will be outside +the region @previewlatex{} considers as the preview image. To enable a +similar mechanism internal to @previewlatex{}, enable the +@code{showlabels} option in the variable +@code{preview-default-option-list} in the @samp{Preview Latex} group. +@vindex preview-default-option-list + +It must be noted, however, that a much better idea may be to use the +Ref@TeX{} package for managing references. @xref{RefTeX in a +Nutshell,,RefTeX in a Nutshell,reftex,The Ref@TeX{} Manual}. + +@item Open previews automatically + +The current default is to open previews automatically when you enter +them with cursor left/right motions. Auto-opened previews will close +again once the cursor leaves them again (this is also done when doing +incremental search, or query-replace operations), unless you changed +anything in it. In that case, you will have to regenerate the preview +(via e.g., @kbd{C-c C-p C-p}). Other options for +@code{preview-auto-reveal} are available via @code{customize}. + +@item Automatically cache preambles + +Currently @previewlatex{} asks you whether you want to cache the +document preamble (everything before @code{\begin@{document@}}) before +it generates previews for a buffer the first time. Caching the preamble +will significantly speed up regeneration of previews. The larger your +preamble is, the more this will be apparent. Once a preamble is cached, +@previewlatex{} will try to keep track of when it is changed, and dump +a fresh format in that case. If you experience problems with this, or +if you want it to happen without asking you the first time, you can +customize the variable @code{preview-auto-cache-preamble}. +@vindex preview-auto-cache-preamble +@cindex Caching a preamble + +@item Attempt to keep counters accurate when editing + +@vindex preview-preserve-counters +@vindex preview-required-option-list +Since @previewlatex{} frequently runs only small regions through +@LaTeX{}, values like equation counters are not consistent from run to +run. If this bothers you, customize the variable +@code{preview-preserve-counters} to @code{t} (this is consulted by +@code{preview-required-option-list}). @LaTeX{} will then output a load +of counter information during compilation, and this information will be +used on subsequent updates to keep counters set to useful values. The +additional information takes additional time to analyze, but this is +relevant mostly only when you are regenerating all previews at once, and +maybe you will be less tempted to do so when counters appear more or +less correct. + +@item Preview your favourite @LaTeX{} constructs + +@vindex preview-default-option-list +@vindex preview-default-preamble +If you have a certain macro or environment that you want to preview, +first check if it can be chosen by cutomizing +@code{preview-default-option-list} in the @samp{Preview Latex} group. + +If it is not available there, you can add it to +@code{preview-default-preamble} also in the @samp{Preview Latex} group, +by adding a @code{\PreviewMacro} or @code{\PreviewEnvironment} entry +(@pxref{Provided commands}) @emph{after} the @code{\RequirePackage} +line. For example, if you want to preview the @code{center} +environment, press the @key{Show} button and the last @key{INS} button, +then add + +@example +\PreviewEnvironment@{center@} +@end example +@noindent +in the space that just opened. Note that since @code{center} is a +generic formatting construct of @LaTeX{}, a general configuration like +that is not quite prudent. You better to do this on a per-document +base so that it is easy to disable this behavior when you find this +particular entry gives you trouble. + +One possibility is to save such settings in the corresponding file-local +variable instead of your global configuration (@pxref{File +Variables,,Local Variables in Files,emacs,GNU Emacs Manual}). A perhaps +more convenient place for such options would be in a configuration file +in the same directory with your project (@pxref{Package options}). + +The usual file for @previewlatex{} preconfiguration is +@file{prauctex.cfg}. If you also want to keep the systemwide defaults, +you should add a line + +@example +\InputIfFileExists@{preview/prauctex.cfg@}@{@}@{@} +@end example +@noindent +to your own version of @file{prauctex.cfg} (this is assuming that +global files relating to the @code{preview} package are installed in a +subdirectory @file{preview}, the default behavior). + +@item Don't preview inline math +@cindex Inline math +@vindex preview-default-option-list + +If you have performance problems because your document is full of inline +math (@code{$@dots{}$}), or if your usage of @code{$} conflicts with +@previewlatex{}'s, you can turn off inline math previews. In the +@samp{Preview Latex} group, remove @code{textmath} from +@code{preview-default-option-list} by customizing this variable. +@end itemize + +@node Known problems, For advanced users, Simple customization, top +@chapter Known problems +@c also used as PROBLEMS file +@include preview-problems.texi + +@node For advanced users, ToDo, Known problems, top +@chapter For advanced users + +This package consists of two parts: a @LaTeX{} style that splits the +output into appropriate parts with one preview object on each page, and +an Emacs-lisp part integrating the thing into Emacs (aided by +@AUCTeX{}). + +@menu +* The LaTeX style file:: +* The Emacs interface:: +* The preview images:: +* Misplaced previews:: +@end menu + +@node The LaTeX style file, The Emacs interface, For advanced users, For advanced users +@section The @LaTeX{} style file +@c Autogenerated from ../latex/preview.dtx +@include preview-dtxdoc.texi + +@node The Emacs interface, The preview images, The LaTeX style file, For advanced users +@section The Emacs interface + +You can use @kbd{M-x customize-group @key{RET} preview-latex @key{RET}} +in order to customize these variables, or use the menus for it. We +explain the various available options together with explaining how they +work together in making @previewlatex{} work as intended. + +@vtable @code +@item preview-LaTeX-command +When you generate previews on a buffer or a region, the command in +@code{preview-LaTeX-command} gets run (that variable should only be +changed with Customize since its structure is somewhat peculiar, though +expressive). As usual with @AUCTeX{}, you can continue working while +this is going on. It is not a good idea to change the file until after +@previewlatex{} has established where to place the previews which it can +only do after the @LaTeX{} run completes. This run produces a host of +pseudo-error messages that get parsed by @previewlatex{} at the end of +the @LaTeX{} run and give it the necessary information about where in +the source file the @LaTeX{} code for the various previews is located +exactly. The parsing takes a moment and will render Emacs busy. + +@item preview-LaTeX-command-replacements +This variable specifies transformations to be used before calling the +configured command. One possibility is to have @samp{\pdfoutput=0 } +appended to every command starting with @samp{pdf}. This particular +setting is available as the shortcut +@code{preview-LaTeX-disable-pdfoutput}. Since @previewlatex{} can work +with @acronym{PDF} files by now, there is little incentive for using +this option, anymore (for projects not requiring @acronym{PDF} output, +the added speed of @command{dvipng} might make this somewhat attractive). + +@item preview-required-option-list +@code{preview-LaTeX-command} uses @code{preview-required-option-list} in +order to pass options such as @option{auctex}, @option{active} and +@option{dvips} to the @file{preview} package. This means that the user +need (and should) not supply these in the document itself in case he +wants to be able to still compile his document without it turning into +an incoherent mass of little pictures. These options even get passed +in when the user loads @file{preview} explicitly in his document. + +The default includes an option @code{counters} that is controlled by the +boolean variable + +@item preview-preserve-counters +This option will cause the @file{preview} package to emit information +that will assist in keeping things like equation counters and section +numbers reasonably correct even when you are regenerating only single +previews. + +@item preview-default-option-list +@itemx preview-default-preamble +If the document does not call in the package @code{preview} itself (via +@code{\usepackage}) in the preamble, the preview package is loaded using +default options from @code{preview-default-option-list} and additional +commands specified in @code{preview-default-preamble}. + +@item preview-fast-conversion +This is relevant only for @acronym{DVI} mode. It defaults to `On' and +results in the whole document being processed as one large PostScript +file from which the single images are extracted with the help of parsing +the PostScript for use of so-called @acronym{DSC} comments. The +bounding boxes are extracted with the help of @TeX{} instead of getting +them from Dvips. If you are experiencing bounding box problems, try +setting this option to `Off'. + +@item preview-prefer-TeX-bb +If this option is `On', it tells @previewlatex{} never to try to extract +bounding boxes from the bounding box comments of @acronym{EPS} files, +but rather rely on the boxes it gets from @TeX{}. If you activated +@code{preview-fast-conversion}, this is done, anyhow, since there are no +@acronym{EPS} files from which to read this information. The option +defaults to `Off', simply because about the only conceivable reason to +switch off @code{preview-fast-conversion} would be that you have some +bounding box problem and want to get Dvips' angle on that matter. + +@item preview-scale-function +@itemx preview-reference-face +@itemx preview-document-pt-list +@itemx preview-default-document-pt +@code{preview-scale-function} determines by what factor +images should be scaled when appearing on the screen. If you specify a +numerical value here, the physical size on the screen will be that of +the original paper output scaled by the specified factor, at least if +Emacs' information about screen size and resolution are correct. The +default is to let @code{preview-scale-from-face} determine the scale +function. This function determines the scale factor by making the +size of the default font in the document match that of the on-screen +fonts. + +The size of the screen fonts is deduced from the font +@code{preview-reference-face} (usually the default face used for +display), the size of the default font for the document is determined +by calling @code{preview-document-pt}. +@findex preview-document-pt +This function consults the members of @code{preview-document-pt-list} in +turn until it gets the desired information. The default consults first +@code{preview-parsed-font-size}, +@vindex preview-parsed-font-size +then calls @code{preview-auctex-font-size} +@findex preview-auctex-font-size +which asks @AUCTeX{} about any size specification like @option{12pt} to +the documentclass that it might have detected when parsing the document, and +finally reverts to just assuming @code{preview-default-document-pt} as +the size used in the document (defaulting to 10pt). + +If you find that the size of previews and the other Emacs display +clashes, something goes wrong. @code{preview-parsed-font-size} is +determined at @code{\begin@{document@}} time; if the default font size +changes after that, it will not get reported. If you have an outdated +version of @file{preview.sty} in your path, the size might not be +reported at all. If in this case @AUCTeX{} is unable to find a size +specification, and if you are using a document class with a different +default value (like @samp{KomaScript}), the default fallback assumption will +probably be wrong and @previewlatex{} will scale up things too large. +So better specify those size options even when you know that @LaTeX{} +does not need them: @previewlatex{} might benefit from them. Another +possibility for error is that you have not enabled @AUCTeX{}'s document +parsing options. The fallback method of asking @AUCTeX{} about the size +might be disabled in future versions of @previewlatex{} since in +general it is more reliable to get this information from the @LaTeX{} +run itself. + +@item preview-fast-dvips-command +@itemx preview-dvips-command +The regular command for turning a @acronym{DVI} file into a single +PostScript file is @code{preview-fast-dvips-command}, while +@code{preview-dvips-command} is used for cranking out a @acronym{DVI} +file where every preview is in a separate @acronym{EPS} file. Which of +the two commands gets used depends on the setting of +@code{preview-fast-conversion}. The printer specified here +is @option{-Pwww} by default, which will usually get you scalable fonts +where available. If you are experiencing problems, you might want to try +playing around with Dvips options (@xref{Command-line options,,,dvips}). + +The conversion of the previews into PostScript or @acronym{EPS} files +gets started after the @LaTeX{} run completes when Emacs recognizes the +first image while parsing the error messages. When Emacs has finished +parsing the error messages, it activates all detected previews. This +entails throwing away any previous previews covering the same areas, and +then replacing the text in its visual appearance by a placeholder +looking like a roadworks sign. + +@item preview-nonready-icon-specs +This is the roadworks sign displayed while previews are being prepared. +You may want to customize the font sizes at which @previewlatex{} +switches over between different icon sizes, and the ascent ratio which +determines how high above the base line the icon gets placed. + +@item preview-error-icon-specs +@itemx preview-icon-specs +Those are icons placed before the source code of an opened preview and, +respectively, the image specs to be used for PostScript errors, and a +normal open preview in text representation. + +@item preview-inner-environments +This is a list of environments that are regarded as inner levels of an +outer environment when doing @code{preview-environment}. One example +when this is needed is in +@code{\begin@{equation@}\begin@{split@}@dots{}\end@{split@}\end@{equation@}}, and +accordingly @code{split} is one entry in +@code{preview-inner-environments}. + +@end vtable + +@node The preview images, Misplaced previews, The Emacs interface, For advanced users +@section The preview images + +@vtable @code +@item preview-image-type +@itemx preview-image-creators +@itemx preview-gs-image-type-alist +What happens when @LaTeX{} is finished depends on the configuration of +@code{preview-image-type}. What to do for each of the various settings +is specified in the variable @code{preview-image-creators}. The options +to pass into Ghostscript and what Emacs image type to use is specified +in @code{preview-gs-image-type-alist}. + +@code{preview-image-type} defaults to @code{png}. For this to work, +your version of Ghostscript needs to support the @option{png16m} device. +If you are experiencing problems here, you might want to reconfigure +@code{preview-gs-image-type-alist} or @code{preview-image-type}. Reconfiguring +@code{preview-image-creators} is only necessary for adding additional +image types. + +Most devices make @previewlatex{} start up a single Ghostscript process +for the entire preview run (as opposed to one per image) and feed it +either sections of a @acronym{PDF} file (if PDF@LaTeX{} was used), or +(after running Dvips) sections of a single PostScript file or separate +@acronym{EPS} files in sequence for conversion into @acronym{PNG} format +which can be displayed much faster by Emacs. Actually, not in sequence +but backwards since you are most likely editing at the end of the +document. And as an added convenience, any preview that happens to be +on-screen is given higher priority so that @previewlatex{} will first +cater for the images that are displayed. There are various options +customizable concerning aspects of that operation, see the customization +group @samp{Preview Gs} for this. + +Another noteworthy setting of @code{preview-image-type} is +@samp{dvipng}: in this case, the @command{dvipng} +@pindex dvipng +program will get run on @acronym{DVI} output (see below for @acronym{PDF}). +This is in general much faster than Dvips and Ghostscript. In that +case, the option + +@item preview-dvipng-command +will get run for doing the conversion, and it is expected that + +@item preview-dvipng-image-type +images get produced (@samp{dvipng} might be configured for other image +types as well). You will notice that @code{preview-gs-image-type-alist} +contains an entry for @code{dvipng}: this actually has nothing to with +@samp{dvipng} itself but specifies the image type and Ghostscript device +option to use when @samp{dvipng} can't be used. This will obviously be +the case for @acronym{PDF} output by PDF@LaTeX{}, but it will also happen +if the @acronym{DVI} file contains PostScript specials in which case the +affected images will get run through Dvips and Ghostscript once +@samp{dvipng} finishes. + +Note for p@LaTeX{} and up@LaTeX{} users: It is known that @command{dvipng} +is not compatible with p@LaTeX{} and up@LaTeX{}. If +@code{preview-image-type} is set to @samp{dvipng} and (u)p@LaTeX{} is +used, @samp{dvipng} just fails and @previewlatex{} falls back on Dvips +and Ghostscript. + +@item preview-gs-options +Most interesting to the user perhaps is the setting of this variable. +It contains the default antialiasing settings @option{-dTextAlphaBits=4} +and @option{-dGraphicsAlphaBits=4}. Decreasing those values to 2 @w{or +1} might increase Ghostscript's performance if you find it lacking. +@end vtable + +Running and feeding Ghostscript from @previewlatex{} happens +asynchronously again: you can resume editing while the images arrive. +While those pretty pictures filling in the blanks on screen tend to +make one marvel instead of work, rendering the non-displayed images +afterwards will not take away your attention and will eventually +guarantee that jumping around in the document will encounter only +prerendered images. + +@node Misplaced previews, , The preview images, For advanced users +@section Misplaced previews + +If you are reading this section, the first thing is to check that your +problem is not caused by x-symbol in connection with an installation not +supporting 8-bit characters (@pxref{x-symbol interoperation}). If not, +here's the beef: + +As explained previously, Emacs uses pseudo-error messages generated by +the @samp{preview} package in order to pinpoint the exact source +location where a preview originated. This works in running text, but +fails when preview material happens to lie in macro arguments, like the +contents of @code{\emph}. Those macros first read in their entire +argument, munge it through, perhaps transform it somehow, process it and +perhaps then typeset something. When they finally typeset something, +where is the location where the stuff originated? @TeX{}, having read in +the entire argument before, does not know and actually there would be no +sane way of defining it. + +For previews contained inside such a macro argument, the default +behaviour of @previewlatex{} is to use a position immediately after the +closing brace of the argument. All the previews get placed there, all at +a zero-width position, which means that Emacs displays it in an order +that @previewlatex{} cannot influence (currently in Emacs it is even +possible that the order changes between runs). And since the placement +of those previews is goofed up, you will not be able to regenerate them +by clicking on them. The default behaviour is thus somewhat undesirable. + +The solution (like with other preview problems) is to tell the @LaTeX{} +@samp{preview} package how to tackle this problem (@pxref{The LaTeX +style file}). Simply, you don't need @code{\emph} do anything at all +during previews! You only want the text math previewed, so the solution +is to use @code{\PreviewMacro*\emph} in the preamble of your document +which will make @LaTeX{} ignore @code{\emph} completely as long as it is +not part of a larger preview (in which case it gets typeset as +usual). Its argument thus becomes ordinary text and gets treated like +ordinary text. + +Note that it would be a bad idea to declare +@code{\PreviewMacro*[@{@{@}@}]\emph} since then both @code{\emph} as +well as its argument would be ignored instead of previewed. For +user-level macros, this is almost never wanted, but there may be +internal macros where you might want to ignore internal arguments. + +The same mechanism can be used for a number of other text-formatting +commands like @code{\textrm}, @code{\textit} and the like. While they +all use the same internal macro @code{\text@@command}, it will not do to +redefine just that, since they call it only after having read their +argument in, and then it already is too late. So you need to disable +every of those commands by hand in your document preamble. + +Actually, we wrote all of the above just to scare you. At least all of +the above mentioned macros and a few more are already catered for by a +configuration file @file{prauctex.cfg} that gets loaded by default +unless the @samp{preview} package gets loaded with the @option{noconfig} +option. You can make your own copy of this file in a local directory +and edit it in case of need. You can also add loading of a file of your +liking to @code{preview-default-preamble}, +@vindex preview-default-preamble +or alternatively do the +manual disabling of your favorite macro in +@code{preview-default-preamble}, +@vindex preview-default-preamble +which is customizable in the @samp{Preview Latex} group. + +@node ToDo, Frequently Asked Questions, For advanced users, top +@c Also used as TODO: in separate file +@appendix ToDo +@include preview-todo.texi + +@node Frequently Asked Questions, Copying this Manual, ToDo, top +@c Also used as TODO: in separate file +@appendix Frequently Asked Questions +@include preview-faq.texi + +@node Copying this Manual, Index, Frequently Asked Questions, top +@c Not to be changed often, I think: in separate file. +@appendix Copying this Manual + +@ifinfo +The copyright notice for this manual is: + +@insertcopying +@end ifinfo + +The full license text can be read here: + +@menu +* GNU Free Documentation License:: License for copying this manual. +@end menu + +@include fdl.texi + +@c @node Credits, Index, Internals, top +@c @appendix Credits + +@node Index, , Copying this Manual, top +@unnumbered Index + +@printindex cp + +@bye diff --git a/elpa/auctex-13.1.3/doc/preview-problems.texi b/elpa/auctex-13.1.3/doc/preview-problems.texi new file mode 100644 index 0000000..e40ff42 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-problems.texi @@ -0,0 +1,196 @@ +@include macros.texi +@ifset rawfile +@c documentencoding is used by makeinfo in our --no-headers output. +@documentencoding ISO-8859-1 +@node Known problems,,(dir),(dir) +@top Known problems with preview-latex + +@end ifset +@c ----------------------- +@c @cindex @kbd{M-x preview-report-bug @key{RET}} +@c @cindex @code{preview-report-bug} +@c @cindex Report a bug +A number of issues are known concerning the interoperation with various +other software. Some of the known problems can be solved by moving to +newer versions of the problematic software or by simple patches. + +@menu +* Font problems with Dvips:: +* Too small bounding boxes:: +* x-symbol interoperation:: +* Middle-clicks paste instead of toggling:: +* No images are displayed with gs 9.27 and earlier:: +@end menu + +If you find something not mentioned here, please send a bug report using +@kbd{M-x preview-report-bug @key{RET}}, which will fill in a lot of +information interesting to us and send it to the +@email{bug-auctex@@gnu.org} list. Please use the bug reporting commands +if at all possible. + +@ifset rawfile +@node Font problems with Dvips +@chapter Font problems with Dvips +@raisesections +@end ifset +@ifclear rawfile +@node Font problems with Dvips +@section Font problems with Dvips +@end ifclear + +Some fonts have been reported to produce wrong characters with +@previewlatex{}. @previewlatex{} calls Dvips by default with the option +@option{-Pwww} in order to get scalable fonts for nice results. If you +are using antialiasing, however, the results might be sufficiently nice +with bitmapped fonts, anyway. You might try @option{-Ppdf} for another +stab at scalable fonts, or other printer definitions. Use + +@display +@kbd{M-x customize-option @key{RET} preview-fast-dvips-command @key{RET}} +@end display +@noindent +and +@display +@kbd{M-x customize-option @key{RET} preview-dvips-command @key{RET}} +@end display +@noindent +in order to customize this. + +One particular problem is that several printer setup files (typically in +a file called @file{/usr/share/texmf/dvips/config/config.pdf} if you are +using the @option{-Ppdf} switch) contain the @option{G} option for +`character shifting'. This option will result in @samp{fi} being +rendered as @samp{@pounds{}} (British Pounds sign) in several fonts, +unless your version of Dvips has a long-standing bug in its +implementation fixed (only very recent versions of Dvips have). + +@node Too small bounding boxes +@section Too small bounding boxes +The bounding box of a preview is determined by the @LaTeX{} package +using the pure @TeX{} bounding boxes. If there is material extending +outside of the @TeX{} box, that material will be missing from the +preview image. This happens for the label-showing boxes from +the @code{showkeys} package. This particular problem can be +circumvented by using the @code{showlabels} option of the preview +package. + +In general, you should try to fix the problem in the @TeX{} code, like +avoiding drawing outside of the picture with PSTricks. + +One possible remedy is to set +@code{preview-fast-conversion} to `Off' +@ifset rawfile +(see the manual). +@end ifset +@ifclear rawfile +(@pxref{The Emacs interface}). +@end ifclear +The conversion will take more time, but will then use the bounding boxes +from @acronym{EPS} files generated by Dvips. + +Dvips generally does not miss things, but it does not understand +PostScript constructs like @code{\resizebox} or @code{\rotate} commands, +so will generate rather wrong boxes for those. Dvips can be helped with +the @code{psfixbb} package option to preview +@ifset rawfile +(see the manual), +@end ifset +@ifclear rawfile +(@pxref{The LaTeX style file}), +@end ifclear +which will tag the corners of the included @TeX{} box. This will mostly +be convenient for @emph{pure} PostScript stuff like that created by +PSTricks, which Dvips would otherwise reserve no space for. + +@c FIXME: It seems that x-symbol is much outdated. +@node x-symbol interoperation +@section x-symbol interoperation + +Thanks to the work of Christoph Wedler, starting with version +@samp{4.0h/beta} of x-symbol, the line parsing of @AUCTeX{} and +@previewlatex{} is fully supported. Earlier versions exhibit problems. +However, versions before @samp{4.2.2} will cause a drastic slowdown of +@previewlatex{}'s parsing pass, so we don't recommend to use versions +earlier than that. + +If you wonder what x-symbol is, it is a package that transforms various +tokens and subscripts to a more readable form while editing and offers a +few input methods handy especially for dealing with math. Take a look at +@uref{http://x-symbol.sourceforge.net/}. + +x-symbol versions up to @samp{4.5.1-beta} at least require an 8bit-clean @TeX{} +implementation (meaning that its terminal output should not use +@samp{^^}-started escape sequences) for cooperation with +@previewlatex{}. Later versions may get along without it, like +@previewlatex{} does now. + +If you experience problems with @file{circ.tex} in connection with both +x-symbol and Latin-1 characters, you may need to change your language +environment or, as a last resort, customize the variable +@code{LaTeX-command-style} by replacing the command @code{latex} with +@code{latex -translate-file=cp8bit}. + +@node Middle-clicks paste instead of toggling +@section Middle-clicks paste instead of toggling + +This is probably the fault of your favorite package. @file{isearch.el} +is known to be affected while searches are in progress, but the code is +such a complicated mess that no patch is in sight. Better just end the +search with @kbd{@key{RET}} before toggling and resume with @kbd{C-s +C-s} or similar afterwards. Since previews over the current match will +auto-open, anyway, this should not be much of a problem in practice. + +@node No images are displayed with gs 9.27 and earlier +@section No images are displayed with gs 9.27 and earlier + +@previewlatex{} tries to adjust the foreground and background colors of +generated images to those of Emacs. Unfortunately, incompatible changes +introduced in Ghostscript 9.27 breaks the traditional method partially, +and @previewlatex{} can display no images under certain circumstances. + +A new method implemented alternatively works only with Ghostscript > +9.27. If you are using Ghostscript 9.27 or earlier, customize the +option @code{preview-pdf-adjust-color-method}. + +@defopt preview-pdf-adjust-color-method +Method to adjust colors of images generated from @acronym{PDF}. It is +not consulted when the @LaTeX{} command produces @acronym{DVI} files. + +When the option is @code{t} (default), @previewlatex{} adjusts the FG +and BG colors of the generated images by the new method. This method +requires that Ghostscript has working @code{DELAYBIND} feature, thus is +invalid with gs 9.27 (and possibly < 9.27). + +When it is @code{compatible}, @previewlatex{} uses traditional method. +This option is provided for backward compatibility with older gs. See +the below explanation for detail. + +When @code{nil}, no adjustment is done and ``black on white'' image is +generated regardless of Emacs color. This is provided for fallback for +gs 9.27 users with customized foreground color. See the below +explanation for detail. + +When the @LaTeX{} command produces @acronym{PDF} rather than +@acronym{DVI} and Emacs has non-trivial foreground color, the +traditional method (@code{compatible}) makes gs >= 9.27 to stop with +error. Here, ``non-trivial foreground color'' includes customized +themes. + +If you use such non-trivial foreground color and the version of +Ghostscript equals to 9.27, you have two options: +@enumerate +@item +Choose the value @code{compatible} and customize +@code{preview-reference-face} to have default (black) foreground color. +This makes the generated image almost non-readable on dark background, +so the next option would be your only choice in that case. +@item +Choose the value @code{nil}, which forces plain ``black on white'' +appearance for the generated image. You can at least read what are +written in the image although they may not match with your Emacs color +well. +@end enumerate + +The default value used to be @code{compatible} for short period before +Ghostscript 9.50 was released but now is @code{t}. +@end defopt diff --git a/elpa/auctex-13.1.3/doc/preview-readme.texi b/elpa/auctex-13.1.3/doc/preview-readme.texi new file mode 100644 index 0000000..8d4c565 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-readme.texi @@ -0,0 +1,229 @@ +@include macros.texi +@ifset rawfile +@node Introduction, What use is it?, (dir), (dir) +@top @previewlatex{} in a nutshell +@paragraphindent none +@end ifset +@c ----------------------- +@cindex Readme +Does your neck hurt from turning between previewer windows and the +source too often? This @AUCTeX{} component will render your displayed +@LaTeX{} equations right into the editing window where they belong. + +The purpose of @previewlatex{} is to embed @LaTeX{} environments such as +display math or figures into the source buffers and switch conveniently +between source and image representation. + +@menu +* What use is it?:: +* Activating preview-latex:: +* Getting started:: +* Basic modes of operation:: +* More documentation:: +* Availability:: +* Contacts:: +@end menu + +@ifset rawfile +@node What use is it?, Activating preview-latex, Introduction, Introduction +@chapter What use is it? +@raisesections +@end ifset +@ifclear rawfile +@node What use is it?, Activating preview-latex, Introduction, Introduction +@section What use is it? +@end ifclear +@cindex Philosophy of @previewlatex{} +@acronym{WYSIWYG} (what you see is what you get) sometimes is considered +all the rage, sometimes frowned upon. Do we really want it? Wrong +question. The right question is @emph{what} we want from it. Except +when finetuning the layout, we don't want to use printer fonts for +on-screen text editing. The low resolution and contrast of a computer +screen render all but the coarsest printer fonts (those for low-quality +newsprint) unappealing, and the margins and pagination of the print are +not wanted on the screen, either. On the other hand, more complex +visual compositions like math formulas and tables can't easily be taken +in when seen only in the source. @previewlatex{} strikes a balance: it +only uses graphic renditions of the output for certain, configurable +constructs, does this only when told, and then right in the source code. +Switching back and forth between the source and preview is easy and +natural and can be done for each image independently. Behind the scenes +of @previewlatex{}, a sophisticated framework of other programs like +@samp{dvipng}, Dvips and Ghostscript are employed together with a +special @LaTeX{} style file for extracting the material of interest in +the background and providing fast interactive response. + +@node Activating preview-latex, Getting started, What use is it?, Introduction +@section Activating @previewlatex{} +@cindex Activation +After installation, the package may need to be activated (and remember +to activate @AUCTeX{} too). If @previewlatex{} is installed via the +Emacs package manager (@acronym{ELPA}), activation should be automatic +upon installation. + +The usual activation (if it is not done automatically) would be + +@example +(load "preview-latex.el" nil t t) +@end example + +If you still don't get a ``Preview'' menu in @LaTeX{} mode in spite +of @AUCTeX{} showing its ``Command'', your installation is broken. One +possible cause are duplicate Lisp files that might be detectable with +@kbd{M-x list-load-path-shadows @key{RET}}. + +@node Getting started, Basic modes of operation, Activating preview-latex, Introduction +@section Getting started + +Once activated, @previewlatex{} and its documentation will be accessible +via its menus (note that @previewlatex{} requires @AUCTeX{} to be +loaded). When you have loaded a @LaTeX{} document (a +sample document @file{circ.tex} is included in the distribution, but +most documents including math and/or figures should do), you can use +its menu or @kbd{C-c C-p C-d} (for @samp{Preview/Document}). +Previews will now be generated for various objects in your document. +You can use the time to take a short look at the other menu entries and +key bindings in the @samp{Preview} menu. You'll see the previewed +objects change into a roadworks sign when @previewlatex{} has determined +just what it is going to preview. Note that you can freely navigate the +buffer while this is going on. When the process is finished you will +see the objects typeset in your buffer. + +It is a bad idea, however, to edit the buffer before the roadworks signs +appear, since that is the moment when the correlation between the +original text and the buffer locations gets established. If the buffer +changes before that point of time, the previews will not be placed where +they belong. If you do want to change some obvious error you just +spotted, we recommend you stop the background process by pressing +@kbd{C-c C-k}. + +To see/edit the @LaTeX{} code for a specific object, put the point (the +cursor) on it and press @kbd{C-c C-p C-p} (for @samp{Preview/at point}). +It will also do to click with the middle mouse button on the preview. +Now you can edit the code, and generate a new preview by again pressing +@kbd{C-c C-p C-p} (or by clicking with the middle mouse button on the +icon before the edited text). + +If you are using the @code{desktop} package, previews will remain from +one session to the next as long as you don't kill your buffer. + +@node Basic modes of operation, More documentation, Getting started, Introduction +@section Basic modes of operation + +@previewlatex{} has a number of methods for generating its graphics. +Its default operation is equivalent to using the `@LaTeX{}' command from +@AUCTeX{}. If this happens to be a call of PDF@LaTeX{} generating +@acronym{PDF} output (you need at least @w{@AUCTeX{} 11.51} for this), +then Ghostscript will be called directly on the resulting @acronym{PDF} +file. If a @acronym{DVI} file gets produced, first Dvips and then +Ghostscript get called by default. + +The image type to be generated by Ghostscript can be configured with + +@example +@kbd{M-x customize-option @key{RET} preview-image-type @key{RET}} +@end example +@vindex preview-image-type + +@noindent +The default is @samp{png} (the most efficient image type). A special +setting is @samp{dvipng} in case you have the @samp{dvipng} +@cindex Using dvipng +@pindex dvipng +program installed. In this case, @samp{dvipng} will be used for +converting @acronym{DVI} files and Ghostscript (with a @samp{PNG} +device) for converting @acronym{PDF} files. @samp{dvipng} is much +faster than the combination of Dvips and Ghostscript. You can get +downloads, access to its @acronym{CVS} archive and further information +from its @uref{https://savannah.nongnu.org/projects/dvipng, project +site}. + +@node More documentation, Availability, Basic modes of operation, Introduction +@section More documentation +After the installation, documentation in the form of +@ifinfo +@ifclear rawfile +this +@end ifclear +@ifset rawfile +an +@end ifset +@end ifinfo +@ifnotinfo +an +@end ifnotinfo +info manual will be available. You can access it with the standalone +info reader with + +@example +info preview-latex +@end example + +@noindent +or by pressing @kbd{C-h i d m preview-latex @key{RET}} in Emacs. Once +@previewlatex{} is activated, you can instead use @kbd{C-c C-p +@key{TAB}} (or the menu entry @samp{Preview/Read documentation}). + +Depending on your installation, +@ifnottex +a printable +@end ifnottex +@iftex +this printed +@end iftex +manual may also be available in the form of @file{preview-latex.pdf}. + +Detailed documentation for the @LaTeX{} style used for extracting the +preview images is placed in @file{preview.pdf} in a suitable directory +during installation; on typical @w{@TeX{} Live}-based systems, + +@example +texdoc preview +@end example + +@noindent +will display it. + +@node Availability, Contacts, More documentation, Introduction +@section Availability +@cindex Download +@cindex @sc{git} access + +The @previewlatex{} project is now part of @AUCTeX{} and accessible as +part of the @uref{https://savannah.gnu.org/projects/auctex,@AUCTeX{} +project page}. You can get its files from the +@uref{https://ftp.gnu.org/pub/gnu/auctex/,@AUCTeX{} download area}. As of +@w{@AUCTeX{} 11.81}, @previewlatex{} should already be integrated into +@AUCTeX{}, so no separate download will be necessary. + +Anonymous Git is available at @uref{git://git.savannah.gnu.org/auctex.git} +or @uref{https://git.savannah.gnu.org/git/auctex.git}. You can also +@uref{https://git.savannah.gnu.org/cgit/auctex.git,browse the repository} +via web interface. + +@node Contacts, , Availability, Introduction +@section Contacts +@cindex Contacts +@cindex Mailing list + +Bug reports should be sent by using @kbd{M-x preview-report-bug +@key{RET}}, as this will fill in a lot of information interesting to +us. If the installation fails (but this should be a rare event), report +bugs to @email{bug-auctex@@gnu.org}. + +There is a general discussion list for @AUCTeX{} which also +covers @previewlatex{}, look at +@uref{https://lists.gnu.org/mailman/listinfo/auctex}. For more +information on the mailing list, send a message with just the word +``help'' as subject or body to @email{auctex-request@@gnu.org}. For the +developers, there is the @email{auctex-devel@@gnu.org} list; it would +probably make sense to direct feature requests and questions about +internal details there. There is a low-volume read-only announcement +list available to which you can subscribe by sending a mail with +``subscribe'' in the subject to @email{info-auctex-request@@gnu.org}. + +Offers to support further development will be appreciated. If you want +to show your appreciation with a donation to the main developer, you can +do so via PayPal to @email{dak@@gnu.org}, and of course you can arrange +for service contracts or for added functionality. Take a look at the +@file{TODO} list for suggestions in that area. diff --git a/elpa/auctex-13.1.3/doc/preview-todo.texi b/elpa/auctex-13.1.3/doc/preview-todo.texi new file mode 100644 index 0000000..485373e --- /dev/null +++ b/elpa/auctex-13.1.3/doc/preview-todo.texi @@ -0,0 +1,118 @@ +@ifset rawfile +@include macros.texi +@chapheading Future Development of @previewlatex{} +@end ifset + +@itemize @bullet + +@item Support other formats than just @LaTeX{} + +plain @TeX{} users and @ConTeXt{} users should not have to feel left +out. While @ConTeXt{} is not supported yet by released versions of +@AUCTeX{}, at least supporting plain would help people, and be a start +for @ConTeXt{} as well. There are plain-based formats like MusiX@TeX{} +that could benefit a lot from @previewlatex{}. The main part of the +difficulties here is to adapt @file{preview.dtx} to produce stuff not +requiring @LaTeX{}. + +@item Support nested snippets + +Currently you can't have both a footnote (which gets displayed as just +its footnote number) and math inside of a footnote rendered as an image: +such nesting might be achieved by rerunning @previewlatex{} on the +footnote contents when one opens the footnote for editing. + +@item Support other text properties than just images + +Macros like @samp{\textit} can be rendered as images, but the resulting +humungous blob is not suitable for editing, in particular since the +line filling from LaTeX does not coincide with that of Emacs. It would +be much more useful if text properties just switched the relevant font +to italics rather than replacing the whole text with an image. It +would also make editing quite easier. Then there are things like +footnotes that are currently just replaced by their footnote number. +While editing is not a concern here (the number is not in the original +text, anyway), it would save a lot of conversion time if no images were +generated, but Emacs just displayed a properly fontified version of the +footnote number. Also, this might make @previewlatex{} useful even on +text terminals. + +@item Find a way to facilitate Source Specials + +Probably in connection with adding appropriate support to +@code{dvipng}, it would be nice if clicking on an image from a larger +piece of source code would place the cursor at the respective source +code location. + +@item Make @file{preview.dtx} look reasonable in @AUCTeX{} + +It is a bit embarrassing that @file{preview.dtx} is written in a manner +that will not give either good syntax highlighting or good indentation +when employing @AUCTeX{}. + +@item Web page work + +Currently, @previewlatex{}'s web page is not structured at all. Better +navigation would be desirable, as well as separate News and Errata eye +catchers. + +@item Manual improvements + +@itemize @minus +@item Pepper the manual with screen shots and graphics + +This will be of interest for the @acronym{HTML} and @TeX{} renditions +of the texinfo manual. Since Texinfo now supports images as well, this +could well be nice to have. + +@item Fix duplicates + +Various stuff appears several times. + +@end itemize + +@item Implement rendering pipelines for Emacs + +The current @previewlatex{} interface is fundamentally flawed, not only +because of a broken implementation. A general batchable and +daemonizable rendering infrastructure that can work on all kinds of +preview images for embedding into buffers is warranted. The current +implementation has a rather adhoc flavor and is not easily extended. +It will not work outside of @AUCTeX{}, either. + +@item Integrate into Ref@TeX{} + +When referencing to equations and the like, the preview-images of the +source rather than plain text should be displayed. If the preview in +question covers labels, those should appear in the bubble help and/or a +context menu. Apropos: + +@item Implement @LaTeX{} error indicators + +Previews on erroneous @LaTeX{} passages might gain a red border or similar. + +@item Pop up relevant online documentation for frequent errors + +A lot of errors are of the ``badly configured'' variety. Perhaps the +relevant info pages should be delivered in addition to the error +message. + +@item Implement a table editing mode where every table cell gets output +as a separate preview. Alternatively, output the complete table +metrics in a way that lets people click on individual cells for editing +purposes. + +@item Benchmark and kill Emacs inefficiencies + +Both the @LaTeX{} run under Emacs control as well as actual image +insertion in Emacs could be faster. CVS Emacs has improved in that +respect, but it still is slower than desirable. + +@item Improve image support under Emacs + +The general image and color handling in Emacs is inefficient and partly +defective. This is still the case in CVS. One option would be to +replace the whole color and image handling with @acronym{GDK} routines +when this library is available, since it has been optimized for it. + +@end itemize diff --git a/elpa/auctex-13.1.3/doc/quickstart.texi b/elpa/auctex-13.1.3/doc/quickstart.texi new file mode 100644 index 0000000..9731d15 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/quickstart.texi @@ -0,0 +1,327 @@ +@include macros.texi + +@node Quick Start +@chapter Quick Start + +@AUCTeX{} is a powerful program offering many features and configuration +options. If you are new to @AUCTeX{} this might be deterrent. +Fortunately you do not have to learn everything at once. This Quick +Start Guide will give you the knowledge of the most important commands +and enable you to prepare your first @LaTeX{} document with @AUCTeX{} +after only a few minutes of reading. + +In this introduction, we assume that @AUCTeX{} is already installed on +your system. If this is not the case, you should read the file +@file{INSTALL} in the base directory of the unpacked distribution +tarball. These installation instructions are available in this manual +as well, @ref{Installation}. We also assume that you are familiar with +the way keystrokes are written in Emacs manuals. If not, have a look at +the Emacs Tutorial in the Help menu. + +If @AUCTeX{} is installed in any other way than from the Emacs package +manager (@acronym{ELPA}), you might still need to activate it, by +inserting + +@lisp +(load "auctex.el" nil t t) +@end lisp +@noindent +in your user init file.@footnote{This usually is a file in your home +directory called @file{.emacs}, or @file{.emacs.d/init.el}.} + +If @AUCTeX{} is installed from @acronym{ELPA}, the installation +procedure already cares about loading @AUCTeX{} correctly and you +@strong{must not} have the line above in your init file. Note that this +also applies if you have the following line in your init file + +@lisp +(package-initialize) +@end lisp + +In order to get support for many of the @LaTeX{} packages you will use +in your documents, you should enable document parsing as well, which can +be achieved by putting + +@lisp +(setq TeX-auto-save t) +(setq TeX-parse-self t) +@end lisp +@noindent +into your init file. Finally, if you often use @code{\include} or +@code{\input}, you should make @AUCTeX{} aware of the multifile +document structure. You can do this by inserting + +@lisp +(setq-default TeX-master nil) +@end lisp + +into your init file. Each time you open a new file, @AUCTeX{} will then +ask you for a master file. + +@menu +* Editing Facilities:: Functions for editing TeX files +* Processing Facilities:: Creating and viewing output, debugging +@end menu + +@iftex +This Quick Start Guide covers two main topics: First we explain how +@AUCTeX{} helps you in editing your input file for @TeX{}, @LaTeX{}, and +some other formats. Then we describe the functions that @AUCTeX{} +provides for processing the input files with @LaTeX{}, Bib@TeX{}, etc., +and for viewing and debugging. +@end iftex + +@node Editing Facilities +@section Functions for editing TeX files + +@subsection Making your @TeX{} code more readable + +@AUCTeX{} can do syntax highlighting of your source code, that means +commands will get special colors or fonts. This is enabled by default. +You can disable it locally by typing @kbd{M-x font-lock-mode @key{RET}}. + +@AUCTeX{} will indent new lines to indicate their syntactical +relationship to the surrounding text. For example, the text of a +@code{\footnote} or text inside of an environment will be indented +relative to the text around it. If the indenting has gotten wrong after +adding or deleting some characters, use @key{TAB} to reindent the line, +@kbd{M-q} for the whole paragraph, or @kbd{M-x LaTeX-fill-buffer @key{RET}} +for the whole buffer. + +@subsection Entering sectioning commands +@cindex Sectioning +@cindex Sections +@cindex Chapters +@cindex @code{\chapter} +@cindex @code{\section} +@cindex @code{\subsection} +@cindex @code{\label} + +Insertion of sectioning macros, that is @samp{\chapter}, +@samp{\section}, @samp{\subsection}, etc.@: and accompanying @samp{\label} +commands may be eased by using @kbd{C-c C-s}. You will be asked for the +section level. As nearly everywhere in @AUCTeX{}, you can use the +@key{TAB} or @key{SPC} key to get a list of available level names, and +to auto-complete what you started typing. Next, you will be asked for +the printed title of the section, and last you will be asked for a label +to be associated with the section. + +@subsection Inserting environments + +Similarly, you can insert environments, that is +@samp{\begin@{@}}--@samp{\end@{@}} pairs: Type @kbd{C-c C-e}, and select +an environment type. Again, you can use @key{TAB} or @key{SPC} to get a +list, and to complete what you type. Actually, the list will not only +provide standard @LaTeX{} environments, but also take your +@samp{\documentclass} and @samp{\usepackage} commands into account if +you have parsing enabled by setting @code{TeX-parse-self} to @code{t}. +If you use a couple of environments frequently, you can use the @key{up} and +@key{down} arrow keys (or @kbd{M-p} and @kbd{M-n}) in the minibuffer to get +back to the previously inserted commands. + +Some environments need additional arguments. Often, @AUCTeX{} knows about +this and asks you to enter a value. + +@subsection Inserting macros + +@kbd{C-c C-m}, or simply @kbd{C-c RET} will give you a prompt that asks +you for a @LaTeX{} macro. You can use @key{TAB} for completion, or the +@key{up}/@key{down} arrow keys (or @kbd{M-p} and @kbd{M-n}) to browse the command +history. In many cases, @AUCTeX{} knows which arguments a macro needs +and will ask you for that. It even can differentiate between mandatory +and optional arguments---for details, see @ref{Completion}. + +An additional help for inserting macros is provided by the possibility +to complete macros right in the buffer. With point at the end of a +partially written macro, you can complete it by typing @kbd{M-@key{TAB}}. + +@subsection Changing the font + +@AUCTeX{} provides convenient keyboard shortcuts for inserting macros +which specify the font to be used for typesetting certain parts of the +text. They start with @kbd{C-c C-f}, and the last @kbd{C-} combination +tells @AUCTeX{} which font you want: + +@table @kbd +@item C-c C-f C-b +@kindex C-c C-f C-b +@cindex @code{\textbf} +Insert @b{bold face} @samp{\textbf@{@point{}@}} text. + +@item C-c C-f C-i +@kindex C-c C-f C-i +@cindex @code{\textit} +Insert @i{italics} @samp{\textit@{@point{}@}} text. + +@item C-c C-f C-e +@kindex C-c C-f C-e +@cindex @code{\emph} +Insert @emph{emphasized} @samp{\emph@{@point{}@}} text. + +@item C-c C-f C-s +@kindex C-c C-f C-s +@cindex @code{\textsl} +Insert @slanted{slanted} @samp{\textsl@{@point{}@}} text. + +@item C-c C-f C-r +@kindex C-c C-f C-r +@cindex @code{\textrm} +Insert @r{roman} @samp{\textrm@{@point{}@}} text. + +@item C-c C-f C-f +@kindex C-c C-f C-f +@cindex @code{\textsf} +Insert @sansserif{sans serif} @samp{\textsf@{@point{}@}} text. + +@item C-c C-f C-t +@kindex C-c C-f C-t +@cindex @code{\texttt} +Insert @t{typewriter} @samp{\texttt@{@point{}@}} text. + +@item C-c C-f C-c +@kindex C-c C-f C-c +@cindex @code{\textsc} +Insert @sc{small caps} @samp{\textsc@{@point{}@}} text. + +@item C-c C-f C-d +@kindex C-c C-f C-c +@cindex Deleting fonts +Delete the innermost font specification containing point. + +@end table + +If you want to change font attributes of existing text, mark it as an +active region, and then invoke the commands. If no region is selected, +the command will be inserted with empty braces, and you can start typing +the changed text. + +Most of those commands will also work in math mode, but then macros like +@code{\mathbf} will be inserted. + + +@subsection Other useful features + +@AUCTeX{} also tries to help you when inserting the right ``quote'' +signs for your language, dollar signs to typeset math, or pairs of +braces. It offers shortcuts for commenting out text (@kbd{C-c ;} for +the current region or @kbd{C-c %} for the paragraph you are in). The +same keystrokes will remove the % signs, if the region or paragraph is +commented out yet. With @code{TeX-fold-mode}, you can hide certain +parts (like footnotes, references etc.)@: that you do not edit currently. +Support for Emacs' outline mode is provided as well. And there's more, +but this is beyond the scope of this Quick Start Guide. + + + +@node Processing Facilities +@section Creating and viewing output, debugging + +@subsection One Command for @LaTeX{}, helpers, viewers, and printing + +If you have typed some text and want to run @LaTeX{} (or @TeX{}, or +other programs---see below) on it, type @kbd{C-c C-c}. If applicable, +you will be asked whether you want to save changes, and which program +you want to invoke. In many cases, the choice that @AUCTeX{} suggests +will be just what you want: first @command{latex}, then a viewer. If a +@command{latex} run produces or changes input files for +@command{makeindex}, the next suggestion will be to run that program, +and @AUCTeX{} knows that you need to run @command{latex} again +afterwards---the same holds for Bib@TeX{}. + +When no processor invocation is necessary anymore, @AUCTeX{} will +suggest to run a viewer, or you can chose to create a PostScript file +using @command{dvips}, or to directly print it. + +Actually, there is another command which comes in handy to compile +documents: type @kbd{C-c C-a} (@code{TeX-command-run-all}) and @AUCTeX{} +will compile the document for you until it is ready and then run the +viewer. This is the same as issuing repeatedly @kbd{C-c C-c} and +letting @AUCTeX{} guess the next command to run. + +At this place, a warning needs to be given: First, although @AUCTeX{} is +really good in detecting the standard situations when an additional +@command{latex} run is necessary, it cannot detect it always. Second, +the creation of PostScript files or direct printing currently only works +when your output file is a @acronym{DVI} file, not a @acronym{PDF} file. + +Ah, you didn't know you can do both? That brings us to the next topic. + +@subsection Choosing an output format + +From a @LaTeX{} file, you can produce @acronym{DVI} output, or a +@acronym{PDF} file directly @i{via} @command{pdflatex}. You can switch +on source specials for easier navigation in the output file, or tell +@command{latex} to stop after an error (usually @option{--noninteractive} +is used, to allow you to detect all errors in a single run). + +These options are controlled by toggles, the keystrokes should be easy +to memorize: + +@table @kbd +@item C-c C-t C-p +@kindex C-c C-t C-p +This command toggles between @acronym{DVI} and @acronym{PDF} output + +@item C-c C-t C-i +@kindex C-c C-t C-i +toggles interactive mode + +@item C-c C-t C-s +@kindex C-c C-t C-s +toggles Sync@TeX{} (or source specials) support + +@item C-c C-t C-o +@kindex C-c C-t C-o +toggles usage of Omega/lambda. + +@end table + +There is also another possibility: compile the document with +@command{tex} (or @command{latex}) and then convert the resulting +@acronym{DVI} file to @acronym{PDF} using +@command{dvips}--@command{ps2pdf} sequence or @command{dvipdfmx} command. +If you want to go by this route, customize @code{TeX-PDF-from-DVI} option. +Then @AUCTeX{} will suggest you to run the appropriate command when +you type @kbd{C-C C-c}. For details, see @ref{Processor Options}. + +@subsection Debugging @LaTeX{} + +When @AUCTeX{} runs a program, it creates an output buffer in which it +displays the output of the command. If there is a syntactical error in +your file, @command{latex} will not complete successfully. @AUCTeX{} +will tell you that, and you can get to the place where the first error +occured by pressing @kbd{C-c `} (the last character is a backtick). The +view will be split in two windows, the output will be displayed in the +lower buffer, and both buffers will be centered around the place where +the error ocurred. You can then try to fix it in the document buffer, +and use the same keystrokes to get to the next error. This procedure +may be repeated until all errors have been dealt with. By pressing +@kbd{C-c C-w} (@code{TeX-toggle-debug-boxes}) you can toggle whether +@AUCTeX{} should notify you of overfull and underfull boxes in addition +to regular errors. + +Issue @kbd{M-x TeX-error-overview @key{RET}} to see a nicely formatted list of +all errors and warnings reported by the compiler. + +If a command got stuck in a seemingly infinite loop, or you want to stop +execution for other reasons, you can use @kbd{C-c C-k} (for ``kill''). +Similar to @kbd{C-l}, which centers the buffer you are in around your +current position, @kbd{C-c C-l} centers the output buffer so that the +last lines added at the bottom become visible. + +@subsection Running @LaTeX{} on parts of your document + +If you want to check how some part of your text looks like, and do not +want to wait until the whole document has been typeset, then mark it as +a region and use @kbd{C-c C-r}. It behaves just like @kbd{C-c C-c}, but +it only uses the document preamble and the region you marked. + +If you are using @code{\include} or @code{\input} to structure your +document, try @kbd{C-c C-b} while you are editing one of the included +files. It will run @command{latex} only on the current buffer, using the +preamble from the master file. + +@c Local Variables: +@c mode: texinfo +@c TeX-master: "auctex" +@c End: diff --git a/elpa/auctex-13.1.3/doc/tex-ref.tex b/elpa/auctex-13.1.3/doc/tex-ref.tex new file mode 100644 index 0000000..a7dfa34 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/tex-ref.tex @@ -0,0 +1,683 @@ +% Reference Card for AUCTeX version 13.1 +%**start of header +\newcount\columnsperpage + +% This file has only been checked with 3 columns per page. But it +% should print fine either via DVI or PDFTeX. + +\columnsperpage=3 + +% Papersize stuff. Use default paper size for PDF, but switch +% orientation. Use papersize special for dvips. + +\ifx\pdfoutput\undefined + \csname newcount\endcsname\pdfoutput + \pdfoutput=0 +\fi + +\ifnum\pdfoutput=0 +% \special{papersize 8.5in,11in}% + \special{papersize 297mm,210mm}% +\else + \dimen0\pdfpagewidth + \pdfpagewidth\pdfpageheight + \pdfpageheight\dimen0 +\fi + + +% This file is intended to be processed by plain TeX (TeX82). +% compile-command: "tex tex-ref" or "pdftex tex-ref" +% +% Original author of Auc-TeX Reference Card: +% +% Terrence Brannon, PO Box 5027, Bethlehem, PA 18015 , USA +% internet: tb06@pl118f.cc.lehigh.edu (215) 758-1720 (215) 758-2104 +% +% Kresten Krab Thorup updated the reference card to 6. +% Per Abrahamsen updated the reference card to 7, 8, and 9. +% Ralf Angeli updated it to 11.50. +% And David Kastrup messed around with it, too, merging the math reference. +% +% Thanks to Stephen Gildea +% Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik +% for creating the GNU Emacs Reference Card from which this was mutated + +\def\versionnumber{13.1} +\def\year{2022} +\def\version{February \year\ v\versionnumber} + +\def\shortcopyrightnotice{\vskip 1ex plus 2 fill + \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. + Permissions on back. v\versionnumber}} + +\def\copyrightnotice{% +\vskip 1ex plus 2 fill\begingroup\small +\centerline{Copyright \copyright\ 1987, 1992-1994, 2004-2006, 2008, 2010,} +\centerline{2012, 2014-2017, 2019-2022 Free Software Foundation, Inc.} +\centerline{for AUC\TeX\ version \versionnumber} + +Permission is granted to make and distribute copies of +this card provided the copyright notice and this permission notice +are preserved on all copies. + + +\endgroup} + +% make \bye not \outer so that the \def\bye in the \else clause below +% can be scanned without complaint. +\def\bye{\par\vfill\supereject\end} + +\newdimen\intercolumnskip +\newbox\columna +\newbox\columnb + +\edef\ncolumns{\the\columnsperpage} + +\message{[\ncolumns\space + column\if 1\ncolumns\else s\fi\space per page]} + +\def\scaledmag#1{ scaled \magstep #1} + +% This multi-way format was designed by Stephen Gildea +% October 1986. +\if 1\ncolumns + \hsize 4in + \vsize 10in + \voffset -.7in + \font\titlefont=\fontname\tenbf \scaledmag3 + \font\headingfont=\fontname\tenbf \scaledmag2 + \font\smallfont=\fontname\sevenrm + \font\smallsy=\fontname\sevensy + + \footline{\hss\folio} + \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} +\else + \hsize 3.2in + \vsize 7.6in + \hoffset -.75in + \voffset -.8in + \font\titlefont=cmbx10 \scaledmag2 + \font\headingfont=cmbx10 \scaledmag1 + \font\smallfont=cmr6 + \font\smallsy=cmsy6 + \font\eightrm=cmr8 + \font\eightbf=cmbx8 + \font\eightit=cmti8 + \font\eighttt=cmtt8 + \font\eightsl=cmsl8 + \font\eightsc=cmcsc8 + \font\eightsy=cmsy8 + \textfont0=\eightrm + \textfont2=\eightsy + \def\rm{\fam0 \eightrm} + \def\bf{\eightbf} + \def\it{\eightit} + \def\tt{\eighttt} + \def\sl{\eightsl} + \def\sc{\eightsc} + \normalbaselineskip=.8\normalbaselineskip + \ht\strutbox.8\ht\strutbox + \dp\strutbox.8\dp\strutbox + \normallineskip=.8\normallineskip + \normallineskiplimit=.8\normallineskiplimit + \normalbaselines\rm %make definitions take effect + + \if 2\ncolumns + \let\maxcolumn=b + \footline{\hss\rm\folio\hss} + \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} + \else \if 3\ncolumns + \let\maxcolumn=c + \nopagenumbers + \else + \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} + \errmessage{Illegal number of columns per page} + \fi\fi + + \intercolumnskip=.46in + \def\abc{a} + \output={% + % This next line is useful when designing the layout. + %\immediate\write16{Column \folio\abc\space starts with \firstmark} + \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} + \else\if a\abc + \global\setbox\columna\columnbox \global\def\abc{b} + %% in case we never use \columnb (two-column mode) + \global\setbox\columnb\hbox to -\intercolumnskip{} + \else + \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} + \def\multicolumnformat{\shipout\vbox{\makeheadline + \hbox{\box\columna\hskip\intercolumnskip + \box\columnb\hskip\intercolumnskip\columnbox} + \makefootline}\advancepageno} + \def\columnbox{\leftline{\pagebody}} + + \def\bye{\par\vfill\supereject + \if a\abc \else\null\vfill\eject\fi + \if a\abc \else\null\vfill\eject\fi + \end} +\fi + +% we won't be using math mode much, so redefine some of the characters +% we might want to talk about +\catcode`\^=12 +\catcode`\_=12 + +\chardef\\=`\\ +\chardef\{=`\{ +\chardef\}=`\} + +\hyphenation{mini-buf-fer} + +\parindent 0pt +\parskip 1ex plus .5ex minus .5ex + +\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} + +\def\newcolumn{\vfill\eject} + +\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} + +\def\section#1{\par\vskip 0pt plus 0.2\vsize \penalty-3000 + \vskip 0pt plus -0.2\vsize + \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% + \vskip 2ex plus 1ex minus 1.5ex} + +\newdimen\keyindent + +\def\beginindentedkeys{\keyindent=1em} +\def\endindentedkeys{\keyindent=0em} +\endindentedkeys + +\def\paralign{\vskip\parskip\halign} + +\def\<#1>{$\langle${\rm #1}$\rangle$} + +\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows +\def\var#1{{\tt #1}} +\def\file#1{{\tt #1}} + +\def\beginexample{\par\leavevmode\begingroup + \obeylines\obeyspaces\parskip0pt\tt} +{\obeyspaces\global\let =\ } +\def\endexample{\endgroup} + +\def\key#1#2{\leavevmode\hbox to \hsize{\vtop + {\hsize=.68\hsize\rightskip=1em + \hskip\keyindent\relax#1}\kbd{#2}\hfil}} + +\newbox\metaxbox +\setbox\metaxbox\hbox{\kbd{M-x }} +\newdimen\metaxwidth +\metaxwidth=\wd\metaxbox + +\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize + {\hskip\keyindent\relax#1\hfil}% + \hskip -\metaxwidth minus 1fil + \kbd{#2}\hfil}} + +\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad + &\kbd{#3}\quad\cr} + +\def\LaTeX{% + L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX} + +%**end of header + +\title{AUC\TeX\ Reference Card} + +\centerline{(for version \versionnumber)} + +\section{Conventions Used} + +\key{Carriage Return or \kbd{C-m}}{RET} +\key{Tabular or \kbd{C-i}}{TAB} +\key{Linefeed or \kbd{C-j}}{LFD} + +\section{Shell Interaction} + +\key{Run a command on the master file}{C-c C-c} +\key{Run a command on the buffer}{C-c C-b} +\key{Run a command on the region}{C-c C-r} +\key{Fix the region}{C-c C-t C-r} +\key{Kill job}{C-c C-k} +\key{Recenter output buffer}{C-c C-l} +\key{Next error in \TeX/\LaTeX\ session}{C-c `} +\key{Previous error in \TeX/\LaTeX\ session}{M-g p} +\key{Toggle debug of bad boxes}{C-c C-t C-b} +\key{Toggle debug of warnings}{C-c C-t C-w} +\key{View output file}{C-c C-v} +\key{Compile all and view output file}{C-c C-a} + +Commands you can run on the master file (with \kbd{C-c C-c}) or the +region (with \kbd{C-c C-r}) include the following (starred versions +are not available in all modes): + +\def\star{\llap{\rm*}} +\key{\TeX}{\star TeX} +\key{\LaTeX}{\star LaTeX} +\key{Con\TeX{}t (once)}{\star ConTeXt} +\key{Con\TeX{}t Full}{\star ConTeXt Full} +\key{Makeinfo}{\star Makeinfo} +\key{Makeinfo with HTML output}{\star Makeinfo HTML} +\key{Appropriate previewer}{View} +\key{Print the output}{Print} +\key{Bib\TeX}{BibTeX} +\key{Biber}{Biber} +\key{MakeIndex}{Index} +\key{LaCheck}{Check} +\key{Make (PostScript) File}{File} +\key{Ispell}{Spell} +\key{Delete intermediate files}{Clean} +\key{Delete all output files}{Clean All} + +\section{\TeX ing options} +\TeX\ runs can come in various types, which may be toggled and are +indicated in the mode line. + +\key{PDF/DVI mode}{C-c C-t C-p} +\key{Stop on errors (Interactive mode)}{C-c C-t C-i} +\key{I/O correlation (S. Specials, Sync\TeX)}{C-c C-t C-s} + +\section{Miscellaneous} + +\key{Read AUC\TeX\ manual}{C-c TAB} +\key{Find documentation}{C-c ?} +\key{Math Mode}{C-c \string~} +\key{Reset Buffer}{C-c C-n} +\key{Reset AUC\TeX}{C-u C-c C-n} + +\section{Multifile Handling} + +\key{Save Document}{C-c C-d} +\key{Switch to master file or active buffer}{C-c ^} +\key{Query for a master file}{C-c \_} + +\section{Command Insertion} + +\key{Insert Section}{C-c C-s} +\key{Insert \LaTeX\ environment}{C-c C-e} +\key{Insert item}{C-c LFD} +\key{Insert item (alias)}{M-RET} +\key{Close \LaTeX\ environment}{C-c ]} +\key{Insert \TeX\ macro \kbd{\{\}} }{C-c C-m} +\key{Insert double brace}{C-c \{} +\key{Complete \TeX\ macro}{M-TAB} +\key{Smart ``quote''}{"} +\key{Smart ``dollar''}{\$} + +\section{Font Selection} + +\key{Insert {\bf bold\/} text}{C-c C-f C-b} +\key{Insert {\it italics\/} text}{C-c C-f C-i} +\key{Insert {\rm roman} text}{C-c C-f C-r} +\key{Insert {\it emphasized\/} text}{C-c C-f C-e} +\key{Insert {\tt typewriter\/} text}{C-c C-f C-t} +\key{Insert {\sl slanted\/} text}{C-c C-f C-s} +\key{Insert {\sc Small Caps\/} text}{C-c C-f C-c} +\key{Delete font}{C-c C-f C-d} +\key{Replace font}{C-u C-c C-f \<key>} + +\section{Source Formatting} + +\key{Indent current line}{TAB} +\key{Indent next line}{LFD} + +\key{Format a paragraph}{M-q} +\key{Format a region}{C-c C-q C-r} +\key{Format a section}{C-c C-q C-s} +\key{Format an environment}{C-c C-q C-e} + +\key{Mark an environment}{C-c .} +\key{Mark a section}{C-c *} + +\key{Comment or uncomment region}{C-c ;} +\key{Comment or uncomment paragraph}{C-c \%} + +\copyrightnotice + +\newcolumn + +\title{Math Mode} + +\section{Variables} + +All math mode commands are under the prefix key specified by +\var{LaTeX-math-abbrev-prefix}, default is ``\kbd{`}''. + +You can define your own math mode commands by setting the variable +\var{LaTeX-math-list} before enabling \var{LaTeX-math-mode}. + +\section{Greek Letters} + +\def\disp#1{\hbox to 6ex{$#1$\hfill}} +\def\twocol#1\par{{% + \def\key##1##2{##1&##2\cr}% + \setbox0\vbox{\halign to 0.45\hsize{\tabskip0ptplus1fil\relax + ##\hfil&\kbd{##}\hfil\cr\vrule width0ptheight\ht\strutbox#1}}% + \line{% + \splittopskip=\ht\strutbox + \dimen0\ht0 + \advance\dimen0\baselineskip + \setbox2\vsplit0to0.5\dimen0 + \vtop{\unvbox2}\hfill\raise \ht\strutbox \vtop {\unvbox0}}}} +\def\keycs#1#2#{\keycsii#1{#2}} +\def\keycsii#1#2#3{\key{\disp{#1#2} ({\tt\string#1})}{#3}} + +\twocol +\keycs\alpha{a} +\keycs\beta{b} +\keycs\gamma{g} +\keycs\delta{d} +\keycs\epsilon{e} +\keycs\zeta{z} +\keycs\eta{h} +\keycs\theta{j} +\keycs\kappa{k} +\keycs\lambda{l} +\keycs\mu{m} +\keycs\nu{n} +\keycs\xi{x} +\keycs\pi{p} +\keycs\rho{r} +\keycs\sigma{s} +\keycs\tau{t} +\keycs\upsilon{u} +\keycs\phi{f} +\keycs\chi{q} +\keycs\psi{y} +\keycs\omega{w} +\keycs\Delta{D} +\keycs\Gamma{G} +\keycs\Theta{J} +\keycs\Lambda{L} +\keycs\Xi{X} +\keycs\Pi{P} +\keycs\Sigma{S} +\keycs\Upsilon{U} +\keycs\Phi{F} +\keycs\Psi{Y} +\keycs\Omega{W} + +\section{Symbols} + +\twocol +\keycs\rightarrow{C-f} +\keycs\leftarrow{C-b} +\keycs\uparrow{C-p} +\keycs\downarrow{C-n} +\keycs\leq{<} +\keycs\geq{>} +\keycs\tilde x{\string~} +\keycs\hat x{^} +\keycs\nabla{N} +\keycs\infty{I} +\keycs\forall{A} +\keycs\exists{E} +\keycs\not \ {/} +\keycs\in{i} +\keycs\times{*} +\keycs\cdot{.} +\keycs\colon{:} +\keycs\subset{\{} +\keycs\supset{\}} +\keycs\subseteq{[} +\keycs\supseteq{]} +\keycs\emptyset{0} +\keycs\setminus{\\} +\keycs\cup{+} +\keycs\cap{-} +\keycs\langle{(} +\keycs\rangle{)} +\keycs\exp{C-e} +\keycs\sin{C-s} +\keycs\cos{C-c} +\keycs\sup{C-^} +\keycs\inf{C-_} +\keycs\det{C-d} +\keycs\lim{C-l} +\keycs\tan{C-t} +\keycs\vee{|} +\keycs\wedge{\&} + +\section{Miscellaneous} + +\key{cal letters}{c \<letter>} + +\newcolumn + +\def\previewlatex{{preview-latex}} +\title{\previewlatex} +\section{Activation} +\previewlatex\ is part of AUC\TeX. If it is active, you should see an +entry ``Preview'' in the menu bar when editing \LaTeX{} files. If you +have a ``LaTeX'', but no ``Preview'' menu, add the following to your +init file (usually \file{\string~/.emacs.d/init.el}): +\beginexample +(load "preview-latex.el" nil t t) +\endexample + +\section{Usage and keybindings} +\previewlatex\ operation only affects the display of the buffer, not +its contents. It runs only on demand, using the target {\sc dvi} or +{\sc PDF} files in the process. The first command in the following +list (also on the toolbar button) will (as applicable) repreview an +active region or a single modified preview, toggle the visibility of +an unmodified preview or generate previews for a surrounding buffer +area up to the next preview. + +\key{Preview at point}{C-c C-p C-p} +\key{Preview environment}{C-c C-p C-e} +\key{Preview region}{C-c C-p C-r} +\key{Preview buffer}{C-c C-p C-b} +\key{Preview document}{C-c C-p C-d} +\key{Remove previews at point}{C-c C-p C-c C-p} +\key{Remove previews from region}{C-c C-p C-c C-r} +\key{Remove previews from buffer}{C-c C-p C-c C-b} +\key{Remove previews from document}{C-c C-p C-c C-d} +\key{Cache preamble}{C-c C-p C-f} +\key{Switch off preamble cache}{C-c C-p C-c C-f} +\key{Read Texinfo manual}{C-c C-p TAB} +\key{Copy region as MML}{C-c C-p C-w} + +The last keysequence will copy a region with previews into the kill +ring in a form fit for sending in Emacs' {\tt message-mode}. + +\section{Customization within Emacs} + +You can use \kbd{M-x customize-variable RET} or the ``Preview\slash +Customize'' menu for customization. Worthwhile settings: + +\halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\var{#}\tabskip0pt\cr +\noalign{\medskip If you have dvipng available:} +Set to \kbd{dvipng}&preview-image-type\cr +\noalign{\medskip \vbox{Keep counter values when regenerating + single previews:}} +Set to \kbd{t}&preview-preserve-counters\cr +\noalign{\medskip \vbox{Cache/Don't cache preamble without query +(preamble caching is done using \file{mylatex.ltx} and might not always +work. Use the appropriate key sequences for overriding the following +setting):}} +Set to \kbd{t}/\kbd{nil}&preview-auto-cache-preamble\cr} + +\section{Customization from \LaTeX{}} +Customization is done in the document preamble (you need to load +\file{preview.sty} explicitly) or in \file{prauctex.cfg} (which should +load the system \file{prauctex.cfg} first). Commands: + +\halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr +Preview macro&\string\PreviewMacro[\{\<args>\}]\{\<macro>\}\cr +Preview env&\string\PreviewEnvironment[\{\<args>\}]\{\<env>\}\cr +Skip macro&\string\PreviewMacro*[\{\<args>\}]\{\<macro>\}\cr +Skip env&\string\PreviewEnvironment*[\{\<args>\}]\{\<env>\}\cr +\noalign{\smallskip Diverting material from float environments} +Snarf stuff&\string\PreviewSnarfEnvironment[\{\<args>\}]\{\<env>\}\cr +} + +Values to be used within \<args>: +\halign to +\hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr +Optional argument&[]\cr +Mandatory argument&\{\}\cr +Optional star&*\cr +Conditionals&?\<token>\{\<if found>\}\{\<if not found>\}\cr +Skip next token&-\cr +Transformation&\#\{\<macro args>\}\{\<replacement>\}\cr +} + +More options and explanations can be found in \file{preview.pdf} or the +Texinfo manual. + +\vskip 5ex plus 6ex minus 1ex + +\title{Folding Source Display} + +\key{Toggle folding mode}{C-c C-o C-f} +\key{Hide all items in buffer}{C-c C-o C-b} +\key{Hide all items in region}{C-c C-o C-r} +\key{Hide all items in paragraph}{C-c C-o C-p} +\key{Hide current macro}{C-c C-o C-m} +\key{Hide current environment}{C-c C-o C-e} +\key{Show all items in buffer}{C-c C-o b} +\key{Show all items in region}{C-c C-o r} +\key{Show all items in paragraph}{C-c C-o p} +\key{Show current item}{C-c C-o i} +\key{Hide or show current item}{C-c C-o C-o} + +\vskip 5ex plus 6ex minus 1ex + +\title{Outlining \TeX\ Documents} + +AUC\TeX\ supports outline mode by defining section, subsection, +etc. as heading levels. You can use \kbd{M-x outline-minor-mode RET} +to toggle outline minor mode. All outline minor mode commands are +under the prefix key specified by \var{outline-minor-mode-prefix}, default +is \kbd{C-c @}. + +\key{Hide all of buffer except headings}{C-c @ C-t} +\key{Show all text in buffer}{C-c @ C-a} +\key{Hide body following this heading}{C-c @ C-c} +\key{Show body following this heading}{C-c @ C-e} +\key{Hide subtree}{C-c @ C-d} +\key{Show subtree}{C-c @ C-s} +\key{All subheadings visible}{C-c @ C-k} + +\key{next visible heading}{C-c @ C-n} +\key{previous visible heading}{C-c @ C-p} +\key{forward to next subheading}{C-c @ C-f} +\key{backward to next subheading}{C-c @ C-b} +\key{up one heading level}{C-c @ C-u} + +\newcolumn + +\iftrue % RefTeX long version + +\title{RefTeX} + +\section{Activation} + +RefTeX is part of Emacs. To activate and make it interact with +AUCTeX, insert the following lines in \file{init.el}. +\vskip-3mm +\beginexample +(add-hook 'LaTeX-mode-hook \#'turn-on-reftex) +(setq reftex-plug-into-AUCTeX t) +\endexample + +\section{Table of Contents} +The table of contents is a structured view of the entire document. It +contains the sections, and optionally labels, index entries, and file +boundaries. + +\key{Show the table of contents$\sp1$}{C-c =} +\key{Recenter *toc* buffer to here$\sp1$}{C-c -} + +\section{Crossreferences, Citations, Index} + +\key{Insert unique label$\sp1$}{C-c (} +\key{Reference a label$\sp1$}{C-c )} +\key{Insert citation with key selection}{C-c [} +\key{\dots\ prompt for optional arguments}{C-u C-c [} +\key{Index word at point with default macro}{C-c /} +\key{Insert an index entry}{C-c <} +\key{Add word to index phrases}{C-c \\} +\key{Visit index phrases buffer}{C-c |} +\key{Compile and display index}{C-c >} +\key{View cross reference$\sp1$}{C-c \&} +\key{View cross reference with mouse}{S-mouse-2} +\key{View cross reference from BibTeX file}{C-c \&} + +\section{Standard keys in special buffers} +RefTeX's special buffers have many active keys. The common ones are: + +\key{Display summary of active keys}{?} +\key{Select this item}{RET} +\key{Rescan the document}{r} +\key{Display location in other window}{SPC} +\key{Follow mode}{f} + +\section{Multifile actions} +Since RefTeX scans the entire (multifile) document, it can provide +commands that act on all files of a document. Check the \kbd{ +Ref->Global Actions} menu for these commands. + +\section{Variables} + +To tell reftex about your own macro definitions, customize the +variables +\vskip-3mm +\beginexample +reftex-label-alist +reftex-section-levels +reftex-index-macros +reftex-cite-format +\endexample + +\vskip2mm\hrule +$\sp1$ An argument of \kbd{C-u} triggers a document scan first. This can +be necessary if file content and RefTeX's knowledge are no longer +consistent. + +\else % RefTeX compact version + +\csname title\endcsname{RefTeX} + +\section{Activation in init.el} + +\vskip-4mm +\beginexample +(add-hook 'LaTeX-mode-hook \#'turn-on-reftex) +(setq reftex-plug-into-AUCTeX t) +\endexample + +\section{Table of Contents} + +\key{Show the table of contents$\sp1$}{C-c =} +\key{Recenter *toc* buffer to here$\sp1$}{C-c -} + +\section{Crossreferences, Citations, Index} + +\key{Insert unique label$\sp1$}{C-c (} +\key{Reference a label$\sp1$}{C-c )} +\key{Insert citation with key selection}{C-c [} +\key{... prompt for optional arguments}{C-u C-c [} +\key{Index word at point with default macro}{C-c /} +\key{Insert an index entry}{C-c <} +\key{Add word to index phrases}{C-c \\} +\key{Visit index phrases buffer}{C-c |} +\key{Compile and display index}{C-c >} +\key{View cross reference$\sp1$}{C-c \&} +\key{View cross reference with mouse}{S-mouse-2} +\key{View cross reference from BibTeX file}{C-c \&} + +\vskip2mm\hrule +$\sp1$ An argument of \kbd{C-u} triggers a document scan first. + +\fi + +\bye + +%%% Local Variables: +%%% mode: plain-TeX +%%% TeX-master: t +%%% End: diff --git a/elpa/auctex-13.1.3/doc/todo.texi b/elpa/auctex-13.1.3/doc/todo.texi new file mode 100644 index 0000000..218231d --- /dev/null +++ b/elpa/auctex-13.1.3/doc/todo.texi @@ -0,0 +1,311 @@ +@c This is part of the AUCTeX Manual. +@c Copyright (C) 2004-2006, 2008, 2009, 2013-2015, +@c 2020-2022 Free Software Foundation, Inc. +@c See the file auctex.texi for copying conditions. +@ifset rawfile +@include macros.texi +@node Development,,(dir),(dir) +@top Future Development of @AUCTeX{} +@end ifset + +The following sections describe future development of @AUCTeX{}. +Besides mid-term goals, bug reports and requests we cannot fix or honor +right away are being gathered here. If you have some time for Emacs +Lisp hacking, you are encouraged to try to provide a solution to one of +the following problems. If you don't know Lisp, you may help us to +improve the documentation. It might be a good idea to discuss proposed +changes on the mailing list of @AUCTeX{} first. + +@menu +* Mid-term Goals:: +* Wishlist:: +* Bugs:: +@end menu + +@ifset rawfile +@node Mid-term Goals +@chapter Mid-term Goals +@raisesections +@end ifset + +@ifclear rawfile +@node Mid-term Goals +@section Mid-term Goals +@end ifclear + +@itemize @bullet +@item Integration of @previewlatex{} into @AUCTeX{} + +As of @AUCTeX{} 11.81 @previewlatex{} is a part of @AUCTeX{} in the +sense that the installation routines were merged and @previewlatex{} is +being packaged with @AUCTeX{}. + +Further integration will happen at the backend. This involves folding +of error parsing and task management of both packages which will ease +development efforts and avoid redundant work. + +@item Error help catalogs + +Currently, the help for errors is more or less hardwired into +@file{latex.el}. For supporting error help in other languages, it would +be sensible to instead arrange error messages in language-specific +files, make a common info file from all such catalogs in a given +language and look the error texts up in an appropriate index. The user +would then specify a preference list of languages, and the errors would +be looked up in the catalogs in sequence until they were identified. + +@item Combining @samp{docTeX} with Ref@TeX{} + +Macro cross references should also be usable for document navigation +using Ref@TeX{}. + +@item Fix remove-style feature + +Currently @code{TeX-remove-style} implementation isn't good. It is common +practice that major mode functions directly add macros and environments +via @code{TeX-add-symbols} and @code{LaTeX-add-environments}, but those +macros and environments are lost once @code{TeX-remove-style} runs. It is +necessary to run major mode function, by e.g.@: @code{normal-mode}, again +to recover them, but that makes no point in running +@code{TeX-remove-style} itself because major mode function kills all +buffer-local variables. + +As of @AUCTeX{} 12.3, @code{TeX-remove-style} is no longer used by any +other codes. + +@item +Document @code{LaTeX-insert-into-commments}, +@code{TeX-translate-location-hook}, and usage of @ConTeXt{} mode. +@end itemize + +@node Wishlist +@section Wishlist + +@itemize @bullet +@item +Simplify tool bar implementation. The library @file{toolbar-x.el} was +developed as an abstraction layer to absorb difference between XEmacs +and @acronym{GNU} Emacs. Now that XEmacs is no longer supported, the +library, together with @file{tex-bar.el} as a whole, can be much +simplified (or even unified). + +@item Documentation lookup for macros + +A parser could gather information about which macros are defined in +which @LaTeX{} packages and store the information in a hashtable which +can be used in a backend for @code{TeX-doc} in order to open the +matching documentation for a given macro. The information could also be +used to insert an appropriate @samp{\usepackage} statement if the user +tries to insert a macro for which the respective package has not been +requested yet. + +@item Improvements to error reporting + +Fringe indicators for errors in the main text would be nice. + +@item A math entry grid + +A separate frame with a table of math character graphics to click on in +order to insert the respective sequence into the buffer (cf. the +``grid'' of @samp{x-symbol}). + +@item Crossreferencing support + +It would be nice if you could index process your favorite collection of +@file{.dtx} files (such as the @LaTeX{} source), just call a command on +arbitrary control sequence, and get either the @acronym{DVI} viewer opened right +at the definition of that macro (using Source Specials), or the source +code of the @file{.dtx} file. + +@item Better plain @TeX{} support + +For starters, @code{LaTeX-math-mode} is not very @LaTeX{}-specific in +the first place, and similar holds for indentation and formatting. + +@item +Page count when compiling should (optionally) go to modeline of the +window where the compilation command was invoked, instead of the output +window. Suggested by Karsten Tinnefeld +@email{tinnefeld@@irb.informatik.uni-dortmund.de}. + +@item +Command to insert a macrodefinition in the preamble, without moving +point from the current location. Suggested by +"Jeffrey C. Ely" @email{ely@@nwu.edu}. + +@item +A database of all commands defined in all stylefiles. When a command or +environment gets entered that is provided in one of the styles, insert +the appropriate @code{\usepackage} in the preamble. + +@item +A way to add and overwrite math mode entries in style files, and to +decide where they should be. Suggested by Remo Badii @email{Remo.Badii@@psi.ch}. + +@item +Create template for (first) line of tabular environment. + +@item +@c FIXME: Already fixed? +I think prompting for the master is the intended behaviour. It +corresponds to a `shared' value for @code{TeX-master}. + +There should probably be a `none' value which wouldn't query for the +master, but instead disable all features that relies on @code{TeX-master}. + +This default value for @code{TeX-master} could then be controled with mapping +based on the extension. + +@item +Use index files (when available) to speed up @kbd{C-c C-m include +@key{RET}}. + +@item +Option not to calculate very slow completions like for +@kbd{C-c C-m include @key{RET}}. + +@item +Font menu should be created from @code{TeX-font-list}. + +@item +Installation procedure written purely in emacs lisp. + +@item +Included PostScript files should also be counted as part of the +document. + +@item +A nice hierarchical by-topic organization of all officially documented +@LaTeX{} macros, available from the menu bar. + +@item +@code{TeX-command-default} should be set from the master file, if not +set locally. Suggested by Peter Whaite @email{peta@@cim.mcgill.ca}. + +@item +Make @AUCTeX{} work with @samp{crypt++}. Suggested by Chris Moore +@email{Chris.Moore@@src.bae.co.uk}. + +@item +Make @AUCTeX{} work with @samp{longlines}. This would also apply to +@previewlatex{}, though it might make sense to unify error processing +before attempting this. + +@item +@c FIXME: Already achieved? +The @samp{Spell} command should apply to all files in a document. Maybe +it could try to restrict to files that have been modified since last +spell check? Suggested by Ravinder Bhumbla @email{rbhumbla@@ucsd.edu}. + +@item +Make @key{.} check for abbreviations and sentences ending with capital +letters. + +@item +Use Emacs 19 minibuffer history to choose between previewers, and other +stuff. Suggested by John Interrante +@email{interran@@uluru.Stanford.EDU}. + +@item +Documentation of variables that can be set in a style hook. + +We need a list of what can safely be done in an ordinary style hook. +You can not set a variable that @AUCTeX{} depends on, unless @AUCTeX{} +knows that it has to run the style hooks first. + +Here is the start of such a list. +@table @code + +@item LaTeX-add-environments + +@item TeX-add-symbols + +@item LaTeX-add-labels + +@item LaTeX-add-bibliographies + +@item LaTeX-largest-level + +@end table + +@item +Outline should be (better) supported in @TeX{} mode. + +At least, support headers, trailers, as well as @code{TeX-outline-extra}. + +@item +@code{TeX-header-start} and @code{TeX-trailer-end}. + +We might want these, just for fun (and outlines) + +@item +Plain @TeX{} and @LaTeX{} specific header and trailer expressions. + +We should have a way to globally specify the default value of the header +and trailer regexps. + +@item +Get closer to original @code{TeX-mode} keybindings. + +A third initialization file (@file{tex-mode.el}) containing an emulator +of the standard @code{TeX-mode} would help convince some people to +change to @AUCTeX{}. + +@item +Use markers in @code{TeX-error-list} to remember buffer positions in +order to be more robust with regard to line numbers and changed files. + +@item +Finish the Texinfo mode. For one thing, many Texinfo mode commands do +not accept braces around their arguments. + +@item +Hook up the letter environment with @file{bbdb.el}. + +@end itemize + +@node Bugs +@section Bugs + +@c FIXME: Are those bugs still present? + +@itemize @bullet +@item +The style hooks automatically generated by parsing files for +@file{example.dtx}, @file{example.sty}, @file{example.drv} and +@file{example.bib} all clash. Bad. Clash with hand-written style hooks +should be removed by dialect discrimination --- to be checked. + +@item +@kbd{C-c `} should always stay in the current window, also when it finds +a new file. + +@item +Do not overwrite emacs warnings about existing auto-save files when +loading a new file. + +@item +Maybe the regexp for matching a @TeX{} symbol during parsing should be +@samp{"\\\\\\([a-zA-Z]+\\|.\\)"} --- +@email{thiemann@@informatik.uni-tuebingen.de} Peter Thiemann. + +@item +@AUCTeX{} should not parse verbatim environments. + +@item +Make @samp{`} check for math context in @code{LaTeX-math-mode}. and +simply self insert if not in a math context. + +@item +Make @code{TeX-insert-dollar} more robust. Currently it can be fooled +by @samp{\mbox}'es and escaped double dollar for example. + +@item +@c FIXME: Is support for table environment really necessary? +Correct indentation for tabbing, table, and math environments. +@end itemize + +@c Local Variables: +@c mode: texinfo +@c TeX-master: "auctex" +@c End: diff --git a/elpa/auctex-13.1.3/doc/wininstall.texi b/elpa/auctex-13.1.3/doc/wininstall.texi new file mode 100644 index 0000000..230f8e2 --- /dev/null +++ b/elpa/auctex-13.1.3/doc/wininstall.texi @@ -0,0 +1,358 @@ +@c This is part of the AUCTeX Manual. +@c Copyright (C) 2003-2007, 2009, 2018, 2021 +@c Free Software Foundation, Inc. +@c See the file auctex.texi for copying conditions. +@ifset rawfile +@include macros.texi +@end ifset + +@subheading In a Nutshell + +The following are brief installation instructions for the impatient. In +case you don't understand some of this, run into trouble of some sort, +or need more elaborate information, refer to the detailed instructions +further below. + +@enumerate +@item +Install the prerequisites, i.e.@: GNU Emacs, MSYS or Cygwin, a @TeX{} +system, and Ghostscript. + +@item +Open the MSYS shell or a Cygwin shell and change to the directory +containing the unzipped file contents. + +@item +Configure @AUCTeX{}: + +For Emacs: Many people like to install @AUCTeX{} into the pseudo file +system hierarchy set up by the Emacs installation. Assuming Emacs is +installed in @file{C:/Program Files/Emacs} and the directory for local +additions of your @TeX{} system, e.g.@: MiK@TeX{}, is +@file{C:/localtexmf}, you can do this by typing the following statement +at the shell prompt: + +@example +./configure --prefix='C:/Program Files/Emacs' \ + --infodir='C:/Program Files/Emacs/info' \ + --with-texmf-dir='C:/localtexmf' +@end example + +The commands above is example for common usage. More on configuration +options can be found in the detailed installation instructions below. + +If the configuration script failed to find all required programs, make +sure that these programs are in your system path and add directories +containing the programs to the @env{PATH} environment variable if +necessary. Here is how to do that in W2000/XP: + +@enumerate +@cindex Adding to @env{PATH} in Windows +@cindex @env{PATH} in Windows +@item +On the desktop, right click ``My Computer'' and select properties. +@item +Click on ``Advanced'' in the ``System Properties'' window. +@item +Select ``Environment Variables''. +@item +Select ``path'' in ``System Variables'' and click ``edit''. Move to the +front in the line (this might require scrolling) and add the missing +path including drive letter, ended with a semicolon. +@end enumerate + +@item +If there were no further error messages, type + +@example +make +@end example + +In case there were, please refer to the detailed description below. + +@item +Finish the installation by typing + +@example +make install +@end example +@end enumerate + +@subheading Detailed Installation Instructions + +Installation of @AUCTeX{} under Windows is in itself not more +complicated than on other platforms. However, meeting the prerequisites +might require more work than on some other platforms, and feel less +natural. + +If you are experiencing any problems, even if you think they are of your +own making, be sure to report them to @email{auctex-devel@@gnu.org} so +that we can explain things better in future. + +Windows is a problematic platform for installation scripts. The main +problem is that the installation procedure requires consistent file +names in order to find its way in the directory hierarchy, and Windows +path names are a mess. + +The installation procedure tries finding stuff in system search paths +and in Emacs paths. For that to succeed, you have to use the same +syntax and spelling and case of paths everywhere: in your system search +paths, in Emacs' @code{load-path} variable, as argument to the scripts. +If your path names contain spaces or other `shell-unfriendly' +characters, most notably backslashes for directory separators, place the +whole path in @samp{"double quote marks"} whenever you specify it on a +command line. + +Avoid `helpful' magic file names like @samp{/cygdrive/c} and +@samp{C:\PROGRA~1\} like the plague. It is quite unlikely that the +scripts will be able to identify the actual file names involved. Use +the full paths, making use of normal Windows drive letters like +@samp{ 'C:/Program Files/Emacs' } where required, and using the same +combination of upper- and lowercase letters as in the actual files. +File names containing shell-special characters like spaces or +backslashes (if you prefer that syntax) need to get properly quoted to +the shell: the above example used single quotes for that. + +Ok, now here are the steps to perform: + +@enumerate +@item +You need to unpack the @AUCTeX{} distribution (which you seemingly have +done since you are reading this). It must be unpacked in a separate +installation directory outside of your Emacs file hierarchy: the +installation will later copy all necessary files to their final +destination, and you can ultimately remove the directory where you +unpacked the files. + +Line endings are a problem under Windows. The distribution contains +only text files, and theoretically most of the involved tools should get +along with that. However, the files are processed by various utilities, +and it is conceivable that not all of them will use the same line ending +conventions. If you encounter problems, it might help if you try +unpacking (or checking out) the files in binary mode, if your tools +allow that. + +If you don't have a suitable unpacking tool, skip to the next step: this +should provide you with a working @samp{unzip} command. + +@item +The installation of @AUCTeX{} will require the MSYS tool set from +@uref{http://www.mingw.org/} or the Cygwin tool set from +@uref{https://cygwin.com/}. The latter is slower and larger (the download +size of the base system is about 15 MB) but comes with a package manager +that allows for updating the tool set and installing additional packages +like, for example, the spell checker @w{aspell}. + +If Cygwin specific paths like @samp{/cygdrive/c} crop up in the course +of the installation, using a non-Cygwin Emacs could conceivably cause +trouble. Using Cygwin either for everything or nothing might save +headaches, @emph{if} things don't work out. + +@item +Install a current version of @w{Emacs} from +@uref{https://ftp.gnu.org/gnu/emacs/windows/}. + +@item +You need a working @TeX{} installation. One popular installation under +Windows is @uref{https://miktex.org/,MiK@TeX{}}. Another much more +extensive system is @uref{https://www.tug.org/texlive/,@w{@TeX{} Live}} +which is rather close to its Unix cousins. + +@item +A working copy of @uref{https://www.ghostscript.com/,Ghostscript} is +required for @previewlatex{} operation. Examining the output from +@example +gswin32c -h +@end example +on a Windows command line should tell you whether your Ghostscript +supports the @code{png16m} device needed for @acronym{PNG} support. +MiK@TeX{} apparently comes with its own Ghostscript called @file{mgs.exe}. + +@item +@uref{https://www.perl.org/,Perl} is needed for rebuilding the +documentation if you are working with a copy from Git or have +touched documentation source files in the @previewlatex{} part. If the +line endings of the file @file{preview/latex/preview.dtx} don't +correspond with what Perl calls @code{\n} when reading text files, +you'll run into trouble. + +@item +Now the fun stuff starts. If you have not yet done so, unpack the +@AUCTeX{} distribution into a separate directory after rereading the +instructions for unpacking above. + +@item +Ready for takeoff. Start some shell (typically @command{bash}) capable of +running @command{configure}, change into the installation directory and +call @command{./configure} with appropriate options. + +Typical options you'll want to specify will be +@table @code +@item --prefix=@var{drive:/path/to/emacs-hierarchy} +which tells @command{configure} where to perform the installation. It may +also make @command{configure} find Emacs automatically; if this doesn't +happen, try @option{--with-emacs} as described below. All automatic +detection of files and directories restricts itself to directories below +the @var{prefix} or in the same hierarchy as the program accessing the +files. Usually, directories like @file{man}, @file{share} and +@file{bin} will be situated right under @var{prefix}. + +This option also affects the defaults for placing the Texinfo +documentation files (see also @option{--infodir} below) and automatically +generated style hooks. + +If you have a central directory hierarchy (not untypical with Cygwin) +for such stuff, you might want to specify its root here. You stand a +good chance that this will be the only option you need to supply, as +long as your @TeX{}-related executables are in your system path, which +they better be for @AUCTeX{}'s operation, anyway. + +@item --with-emacs +if you are installing for a version of Emacs. You can use +@samp{--with-emacs=@var{drive:/path/to/emacs}} to specify the name of the +installed Emacs executable, complete with its path if necessary (if +Emacs is not within a directory specified in your @env{PATH} environment +setting). + +@item --with-lispdir=@var{drive:/path/to/site-lisp} +This option tells a place in @code{load-path} below which the +files are situated. The startup files @file{auctex.el} and +@file{preview-latex.el} will get installed here unless a subdirectory +@file{site-start.d} exists which will then be used instead. The other +files from @AUCTeX{} will be installed in a subdirectory called +@file{auctex}. + +If you think that you need a different setup, please refer to the full +installation instructions in +@ifset rawfile +the @file{INSTALL} file. +@end ifset +@ifclear rawfile +@ref{Configure}. +@end ifclear + +@item --infodir=@var{drive:/path/to/info/directory} +If you are installing into an Emacs directory, info files have to be put +into the @file{info} folder below that directory. The configuration +script will usually try to install into the folder @file{share/info}, so +you have to override this by specifying something like +@samp{--infodir='C:/Program Files/info'} for the configure call. + +@item --with-auto-dir=@var{drive:/dir} +Directory containing automatically generated information. You should +not normally need to set this, as @samp{--prefix} should take care of +this. + +@item --disable-preview +Use this option if your Emacs version is unable to support image +display. + +@item --with-texmf-dir=@var{drive:/dir} +This will specify the directory where your @TeX{} installation sits. If +your @TeX{} installation does not conform to the @acronym{TDS} (@TeX{} directory +standard), you may need to specify more options to get everything in +place. +@end table + +For more information about any of the above and additional options, see +@ifset rawfile +the `Configure' section in the @file{INSTALL} file. +@end ifset +@ifclear rawfile +@ref{Configure}. +@end ifclear + +@c FIXME: It seems this no longer holds. +@c Calling +@c @file{./configure --help=recursive} +@c will tell about other options, but those are almost never required. + +Some executables might not be found in your path. That is not a good +idea, but you can get around by specifying environment variables to +@command{configure}: +@example +GS="@var{drive:/path/to/gswin32c.exe}" ./configure @dots{} +@end example +should work for this purpose. @file{gswin32c.exe} is the usual name for +the required @emph{command line} executable under Windows; in contrast, +@file{gswin32.exe} is likely to fail. + +As an alternative to specifying variables for the @command{configure} call +you can add directories containing the required executables to the +@env{PATH} variable of your Windows system. This is especially a good +idea if Emacs has trouble finding the respective programs later during +normal operation. + +@item +Run @command{make} in the installation directory. + +@item +Run @code{make install} in the installation directory. + +@item +With Emacs, activation of @AUCTeX{} and @previewlatex{} depends on a +working @file{site-start.d} directory or similar setup, since then the +startup files @file{auctex.el} and @file{preview-latex.el} will have +been placed there. If this has not been done, you should be able to +load the startup files manually with +@lisp +(load "auctex.el" nil t t) +(load "preview-latex.el" nil t t) +@end lisp +in either a site-wide @file{site-start.el} or your personal startup file +(usually accessible as @file{~/.emacs} or @file{~/.emacs.d/init.el} from +within Emacs). + +@cindex @file{tex-mik.el} +The default configuration of @AUCTeX{} is probably not the best fit for +Windows systems with MiK@TeX{}. You might want to add +@lisp +(require 'tex-mik) +@end lisp +after loading @file{auctex.el} and @file{preview-latex.el} in order to +get more appropriate values for some customization options. + +You can always use + +@example +@kbd{M-x customize-group @key{RET} AUCTeX @key{RET}} +@end example + +in order to customize more stuff, or use the @samp{Customize} menu. + +@item +Load @file{circ.tex} into Emacs and see if you get the @samp{Command} +menu. Try using it to @LaTeX{} the file. + +@item +Check whether the @samp{Preview} menu is available in this file. Use it +to generate previews for the document. + +If this barfs and tells you that image type @samp{png} is not supported, +you can either add @acronym{PNG} support to your Emacs installation or +choose another image format to be used by @previewlatex{}. + +Adding support for an image format usually involves the installation of +a library, e.g.@: from @uref{http://gnuwin32.sf.net/}. If you got your +Emacs from @uref{https://www.gnu.org/} you might want to check its +@uref{https://ftp.gnu.org/gnu/emacs/windows/README,README file} for +details. + +A different image format can be chosen by setting the variable +@code{preview-image-type}. While it is recommended to keep the +@samp{dvipng} or @samp{png} setting, you can temporarily select a +different format like @samp{pnm} to check if the lack of @acronym{PNG} +support is the only problem with your Emacs installation. + +Try adding the line + +@lisp +(setq preview-image-type 'pnm) +@end lisp + +to your init file for a quick test. You should remove the line after +the test again, because @acronym{PNM} files take away @strong{vast} +amounts of disk space, and thus also of load/save time. +@end enumerate + +Well, that about is all. Have fun! diff --git a/elpa/auctex-13.1.3/etc/auctex-logo.tex b/elpa/auctex-13.1.3/etc/auctex-logo.tex new file mode 100644 index 0000000..f8b7fbf --- /dev/null +++ b/elpa/auctex-13.1.3/etc/auctex-logo.tex @@ -0,0 +1,27 @@ +% Copyright (C) Free Software Foundation, Inc. +% License: GNU GPLv3 or later + +\documentclass{article} +\usepackage{crimson,listings,tikz,geometry} +\geometry{paperwidth=7.5mm,paperheight=7.5mm} +\definecolor{bg}{HTML}{8596B0}\pagecolor{bg} +\definecolor{fg}{HTML}{F0F0EA}\color{fg} +\lstset{basicstyle=\color{fg!65!bg}\ttfamily, + commentstyle=\itshape,language={[LaTeX]TeX}} +\begin{document} +\begin{tikzpicture}[overlay] + \coordinate (a) at (-7.26pt,1.89098pt) {}; + \node[inner sep=0pt] at (-0.265,0.07) + {\resizebox{6.4mm}{!} + {\lstinputlisting{\jobname}}}; + \node[inner sep=0pt,align=center] at (a) + {A\kern-0.05emU\kern-0.03emC\\[-0.7ex]% + T\kern-.15em\lower.46ex% + \hbox{\color[HTML]{CAE674}E}\kern-.06emX}; +\end{tikzpicture} +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/elpa/auctex-13.1.3/font-latex.el b/elpa/auctex-13.1.3/font-latex.el new file mode 100644 index 0000000..c49a698 --- /dev/null +++ b/elpa/auctex-13.1.3/font-latex.el @@ -0,0 +1,2314 @@ +;;; font-latex.el --- LaTeX fontification for Font Lock mode. -*- lexical-binding: t; -*- + +;; Copyright (C) 1996-2022 Free Software Foundation, Inc. + +;; Authors: Peter S. Galbraith <psg@debian.org> +;; Simon Marshall <Simon.Marshall@esrin.esa.it> +;; Maintainer: auctex-devel@gnu.org +;; Created: 06 July 1996 +;; Keywords: tex, wp, faces + +;;; This file is not part of GNU Emacs. + +;; This package is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This package is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; This package enhances font-lock fontification patterns for LaTeX. +;; font-lock mode is a minor mode that causes your comments to be +;; displayed in one face, strings in another, reserved words in +;; another, and so on. + +;;; Code: + +(require 'font-lock) +(require 'tex) + +(eval-when-compile + (require 'cl-lib)) + +(defgroup font-latex nil + "Font-latex text highlighting package." + :prefix "font-latex-" + :group 'faces + :group 'tex + :group 'AUCTeX) + +(defgroup font-latex-keywords nil + "Keywords for highlighting text in font-latex." + :prefix "font-latex-" + :group 'font-latex) + +(defgroup font-latex-highlighting-faces nil + "Faces for highlighting text in font-latex." + :prefix "font-latex-" + :group 'font-latex) + +(defvar font-latex-multiline-boundary 5000 + "Size of region to search for the start or end of a multiline construct.") + +(defvar font-latex-quote-regexp-beg nil + "Regexp used to find quotes.") +(make-variable-buffer-local 'font-latex-quote-regexp-beg) + +(defvar font-latex-quote-list '(("``" "''") ("<<" ">>" french) ("«" "»" french)) + "List of quote specifiers for quotation fontification. + +Each element of the list is either a list consisting of two +strings to be used as opening and closing quotation marks +independently of the value of `font-latex-quotes' or a list with +three elements where the first and second element are strings for +opening and closing quotation marks and the third element being +either the symbol `german' or `french' describing the order of +quotes. + +If `font-latex-quotes' specifies a different state, order of the +added quotes will be reversed for fontification. For example if +'(\"\\\"<\" \"\\\">\" french) is given but `font-latex-quotes' +specifies `german', quotes will be used like \">foo\"< for +fontification.") + +(defvar font-latex-quotes-control nil + "Internal variable for keeping track if `font-latex-quotes' changed.") +(make-variable-buffer-local 'font-latex-quotes-control) + +(defvar font-latex-quotes-internal nil + "Internal variable for tracking outcome of automatic detection. +If automatic detection is not enabled, it is assigned the value +of `font-latex-quotes'.") +(make-variable-buffer-local 'font-latex-quotes-internal) + +(defvar font-latex-quotes-fallback 'french + "Fallback value for `font-latex-quotes' if automatic detection fails.") + +(defvar font-latex-quote-style-list-french + '("french" "frenchb" "frenchle" "frenchpro" "francais" "canadien" + "acadian" "italian") + "List of styles for which French-style quote matching should be activated.") + +(defvar font-latex-quote-style-list-german + '("austrian" "german" "germanb" "naustrian" "ngerman") + "List of styles for which German-style quote matching should be activated.") + +(defcustom font-latex-quotes 'auto + "Whether to fontify << French quotes >> or >>German quotes<<. +Also selects \"<quote\"> versus \">quote\"<. + +If value `auto' is chosen, an attempt is being made in deriving +the type of quotation mark matching from document settings like +the language option supplied to the babel package. + +If nil, quoted content will not be fontified." + :type '(choice (const auto) (const french) (const german) (const nil)) + :group 'font-latex) +(put 'font-latex-quotes 'safe-local-variable + (lambda (x) (memq x '(auto french german nil)))) + +(defun font-latex-add-quotes (quotes) + "Add QUOTES to `font-latex-quote-list'. +QUOTES has to be a list adhering to the format of an element of +`font-latex-quote-list'." + (setq font-latex-quotes-control nil) + (add-to-list (make-local-variable 'font-latex-quote-list) quotes)) + +(defun font-latex-quotes-set-internal () + "Set `font-latex-quotes-internal' according to `font-latex-quotes'. +If `font-latex-quotes' is set to `auto', try to derive the +correct value from document properties." + (setq font-latex-quotes-internal + (if (eq font-latex-quotes 'auto) + (or (when (TeX-elt-of-list-member + font-latex-quote-style-list-french TeX-active-styles) + 'french) + (when (TeX-elt-of-list-member + font-latex-quote-style-list-german TeX-active-styles) + 'german) + font-latex-quotes-fallback) + font-latex-quotes))) +;; Update the value of `font-latex-quotes-internal' when the list of +;; styles changes. +(add-hook 'TeX-update-style-hook #'font-latex-quotes-set-internal) + +;; The definitions of the title faces were originally taken from +;; info.el (Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 98, 99, +;; 2000, 2001 Free Software Foundation, Inc.) and adapted to the needs +;; of font-latex.el. + +(defconst font-latex-sectioning-max 5 + "Highest number for font-latex-sectioning-N-face") +(defface font-latex-sectioning-5-face + '((((type tty pc) (class color) (background light)) + (:foreground "blue4" :weight bold)) + (((type tty pc) (class color) (background dark)) + (:foreground "yellow" :weight bold)) + (((class color) (background light)) + (:weight bold :inherit variable-pitch :foreground "blue4")) + (((class color) (background dark)) + (:weight bold :inherit variable-pitch :foreground "yellow")) + (t (:weight bold :inherit variable-pitch))) + "Face for sectioning commands at level 5." + :group 'font-latex-highlighting-faces) + +(defcustom font-latex-fontify-sectioning 1.1 + "Whether to fontify sectioning macros with varying height or a color face. + +If it is a number, use varying height faces. The number is used +for scaling starting from `font-latex-sectioning-5-face'. Typically +values from 1.05 to 1.3 give best results, depending on your font +setup. If it is the symbol `color', use `font-lock-type-face'. + +Caveats: Customizing the scaling factor applies to all sectioning +faces unless those face have been saved by customize. Setting +this variable directly does not take effect unless you call +`font-latex-update-sectioning-faces' or restart Emacs. + +Switching from `color' to a number or vice versa does not take +effect unless you call \\[font-lock-fontify-buffer] or restart +Emacs." + :type '(choice (number :tag "Scale factor") + (const color)) + :initialize #'custom-initialize-default + :set (lambda (symbol value) + (set-default symbol value) + (unless (eq value 'color) + (font-latex-update-sectioning-faces font-latex-sectioning-max value))) + :group 'font-latex) + +(defun font-latex-update-sectioning-faces (&optional max height-scale) + "Update sectioning commands faces." + (unless height-scale + (setq height-scale (if (numberp font-latex-fontify-sectioning) + ;; Make sure `height-scale' is a floating point + ;; number because `set-face-attribute' treats + ;; integers differently from floating points. + (float font-latex-fontify-sectioning) + 1.1))) + (unless max + (setq max font-latex-sectioning-max)) + (dotimes (num max) + (let* (;; reverse for XEmacs: + (num (- max (1+ num))) + (face-name (intern (format "font-latex-sectioning-%s-face" num)))) + (unless (get face-name 'saved-face) ; Do not touch customized faces. + (set-face-attribute face-name nil :height height-scale))))) + +(defun font-latex-make-sectioning-faces (max &optional height-scale) + "Build the faces used to fontify sectioning commands." + (unless max (setq max font-latex-sectioning-max)) + (unless height-scale + (setq height-scale (if (numberp font-latex-fontify-sectioning) + ;; Make sure `height-scale' is a floating point + ;; number because the integer type is treated + ;; differently. + (float font-latex-fontify-sectioning) + 1.1))) + (dotimes (num max) + (let* ((num (- max (1+ num))) + (face-name (intern (format "font-latex-sectioning-%s-face" num))) + (f-inherit (intern (format "font-latex-sectioning-%s-face" (1+ num))))) + (eval + `(defface ,face-name + '((t (:height ,height-scale :inherit ,f-inherit))) + (format "Face for sectioning commands at level %s. + +Probably you don't want to customize this face directly. Better +change the base face `font-latex-sectioning-5-face' or customize the +variable `font-latex-fontify-sectioning'." ',num) + :group 'font-latex-highlighting-faces) + t)))) + +(font-latex-make-sectioning-faces font-latex-sectioning-max) + + +;;; Keywords + +(eval-and-compile +(defconst font-latex-built-in-keyword-classes + '(("warning" + ("nopagebreak" "pagebreak" "newpage" "clearpage" "cleardoublepage" + "enlargethispage" "nolinebreak" "linebreak" "newline" "-" "\\" "\\*" + "appendix" "displaybreak" "allowdisplaybreaks" "tabularnewline" "include" + "backmatter" "frontmatter" "mainmatter" + "makeatletter" "makeatother" "newblock" "suppressfloats" "endinput") + font-latex-warning-face 1 noarg) + ("variable" + (("setlength" "|{\\{") ("settowidth" "|{\\{") ("settoheight" "{{") + ("settodepth" "{{") ("setcounter" "{|{\\") + ("addtolength" "|{\\{") ("addtocounter" "{|{\\") + ("stepcounter" "{") ("refstepcounter" "{") + ("counterwithin" "*[{{") ("counterwithout" "*[{{") + ("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{") + ("fnsymbol" "{")) + font-lock-variable-name-face 2 command) + ("biblatexnoarg" + ("newrefsegment" "mancite" "pno" "ppno" "nopp" "psq" "psqq") + font-lock-variable-name-face 2 noarg) + ("biblatex" + (;; 3.2.2 Setting Package Options + ("ExecuteBibliographyOptions" "[{") + ;; 3.7.1 Resources + ("addbibresource" "[{") ("addglobalbib" "[{") ("addsectionbib" "[{") + ;; 3.7.2 The Bibliography + ("printbibliography" "[") ("bibbysection" "[") ("bibbysegment" "[") + ("bibbycategory" "[") ("printbibheading" "[") + ;; 3.7.3 Bibliography Lists + ("printbiblist" "[{") ("printshorthands" "[") + ;; 3.7.4 Bibliography Sections + ("newrefsection" "[") + ;; 3.7.6 Bibliography Categories + ("DeclareBibliographyCategory" "{") ("addtocategory" "{{") + ;; 3.7.7 Bibliography Headings and Environments + ("defbibenvironment" "{{{{") ("defbibheading" "{[{") + ;; 3.7.8 Bibliography Notes + ("defbibnote" "{{") + ;; 3.7.9 Bibliography Filters and Checks + ("defbibfilter" "{{") ("defbibcheck" "{{") + ;; 3.7.10 Reference Contexts + ("DeclareRefcontext" "{{") ("newrefcontext" "[{") + ("assignrefcontextkeyws" "*[{") ("assignrefcontextcats" "*[{") + ("assignrefcontextentries" "*[{") + ;; 3.7.11 Dynamic Entry Sets + ("defbibentryset" "{{") + ;; 3.8.1 Standard Commands + ("Cite" "[[{") + ("parencite" "*[[{") ("Parencite" "[[{") + ("footcite" "[[{") ("footcitetext" "[[{") + ;; 3.8.2 Style-specific Commands + ("textcite" "[[{") ("Textcite" "[[{") + ("smartcite" "[[{") ("Smartcite" "[[{") + ("supercite" "{") + ;; 3.8.3 Qualified Citation Lists + ;; For qualified lists, fontify at least 2 mandatory arguments + ("cites" "(([[{[[{") ("Cites" "(([[{[[{") + ("parencites" "(([[{[[{") ("Parencites" "(([[{[[{") + ("footcites" "(([[{[[{") ("footcitetexts" "(([[{[[{") + ("smartcites" "(([[{[[{") ("Smartcites" "(([[{[[{") + ("textcites" "(([[{[[{") ("Textcites" "(([[{[[{") + ("supercites" "(([[{[[{") + ;; 3.8.4 Style-independent Commands + ("autocite" "*[[{") ("Autocite" "*[[{") + ("autocites" "(([[{[[{") ("Autocites" "(([[{[[{") + ;; 3.8.5 Text Commands + ("citeauthor" "*[[{") ("Citeauthor" "*[[{") ("citetitle" "*[[{") + ("citeyear" "*[[{") ("citedate" "*[[{") + ("citeurl" "[[{") ("parentext" "{") + ("brackettext" "{") + ;; 3.8.6 Special Commands + ("fullcite" "[[{") ("footfullcite" "[[{") + ("volcite" "[{[{") ("Volcite" "[{[{") + ("volcites" "(([{[{[{[{") ("Volcites" "(([{[{[{[{") + ("pvolcite" "[{[{") ("Pvolcite" "[{[{") + ("pvolcites" "(([{[{[{[{") ("Pvolcites" "(([{[{[{[{") + ("fvolcite" "[{[{") ("ftvolcite" "[{[{") + ("fvolcites" "(([{[{[{[{") ("Fvolcites" "(([{[{[{[{") + ("svolcite" "[{[{") ("Svolcite" "[{[{") + ("svolcites" "(([{[{[{[{") ("Svolcites" "(([{[{[{[{") + ("tvolcite" "[{[{") ("Tvolcite" "[{[{") + ("tvolcites" "(([{[{[{[{") ("Tvolcites" "(([{[{[{[{") + ("avolcite" "[{[{") ("Avolcite" "[{[{") + ("avolcites" "(([{[{[{[{") ("Avolcites" "(([{[{[{[{") + ("notecite" "[[{") ("Notecite" "[[{") + ("pnotecite" "[[{") ("Pnotecite" "[[{") + ("fnotecite" "[[{") + ;; 3.8.7 Low-level Commands + ("citename" "[[{[{") ("citelist" "[[{[{") ("citefield" "[[{[{") + ;; 3.8.8 Miscellaneous Commands + ("citereset" "*") ("RN" "{") ("Rn" "{") + ;; 3.9 Localization Commands + ("DefineBibliographyStrings" "{{") ("DefineBibliographyExtras" "{{") + ("UndefineBibliographyExtras" "{{") ("DefineHyphenationExceptions" "{{") + ("NewBibliographyString" "{")) + font-lock-constant-face 2 command) + ("reference" + (("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{") + ("vref" "*{") ("eqref" "{") ("ref" "{") ("Ref" "{") + ("footref" "{") ("include" "{") ("input" "{") + ("bibliography" "{") ("index" "{") ("glossary" "{") + ("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{") + ("marginpar" "[{") ("chaptermark" "{") ("sectionmark" "{") + ("subsectionmark" "{") ("subsubsectionmark" "{") + ("paragraphmark" "{") ("subparagraphmark" "{")) + font-lock-constant-face 2 command) + ("function" + (("begin" "{") ("end" "{") ("pagenumbering" "{") + ("thispagestyle" "{") ("pagestyle" "{") ("nofiles" "") + ("includeonly" "{") ("bibliographystyle" "{") ("documentstyle" "[{") + ("documentclass" "[{[") ("newenvironment" "*{[[{{") + ("newcommand" "*|{\\[[{") ("newlength" "|{\\") + ("newtheorem" "{[{[") + ("providecommand" "*|{\\[[{") + ("newcounter" "{[") ("renewenvironment" "*{[[{{") + ("renewcommand" "*|{\\[[{") ("renewtheorem" "{[{[") + ("usepackage" "[{[") ("RequirePackage" "[{[") + ("fbox" "{") ("mbox" "{") ("rule" "[{{") + ("framebox" "|[([{") ("makebox" "|[([{") ("newsavebox" "|{\\") + ("parbox" "[[[{{") ("savebox" "|{\\|[([{") ("sbox" "|{\\{") + ("usebox" "|{\\") + ("cline" "{") ("extracolsep" "{") ("multicolumn" "{{{") + ("linethickness" "{") ("multiput" "(({{") ("put" "({") + ("qbezier" "[(((") ("raisebox" "{[[{") + ("addvspace" "{") ("vspace" "*{") ("hspace" "*{") + ("addcontentsline" "{{{") ("addtocontents" "{{") + ("labelformat" "{{") + ("AddToHook" "{[{") ("RemoveFromHook" "{[") ("AddToHookNext" "{{") + ("ProvidesClass" "{[") ("ProvidesPackage" "{[") ("ProvidesFile" "{[") + ;; XXX: Should macros without arguments rather be listed in a + ;; separate category with 'noarg instead of 'command handling? + ("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "") + ("bigskip" "") ("medskip" "") ("smallskip" "") + ("thinspace" "") ("negthinspace" "") + ("thicklines" "") ("thinlines" "") + ("noindent" "") ("hline" "") ("ldots" "") + ("centering" "") ("raggedright" "") ("raggedleft" "") + ("TeX" "") ("LaTeX" "") ("LaTeXe" "") + ("normalfont" "") ("normalshape" "") + ("tableofcontents" "") ("listoffigures" "") ("listoftables" "")) + font-lock-function-name-face 2 command) + ("sectioning-0" + (("part" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-0-face) + 2 command) + ("sectioning-1" + (("chapter" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-1-face) + 2 command) + ("sectioning-2" + (("section" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-2-face) + 2 command) + ("sectioning-3" + (("subsection" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-3-face) + 2 command) + ("sectioning-4" + (("subsubsection" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-4-face) + 2 command) + ("sectioning-5" + (("paragraph" "*[{") ("subparagraph" "*[{") + ("subsubparagraph" "*[{")) + (if (eq font-latex-fontify-sectioning 'color) + 'font-lock-type-face + 'font-latex-sectioning-5-face) + 2 command) + ("slide-title" () font-latex-slide-title-face 2 command) + ("textual" + (("item" "[") ("bibitem" "[{") ("title" "{") ("author" "{") ("date" "{") + ("thanks" "{") ("address" "{") ("caption" "[{") + ("textsuperscript" "{") ("textsubscript" "{") ("verb" "*")) + font-lock-type-face 2 command) + ("bold-command" + (("textbf" "{") ("textsc" "{") ("textssc" "{") ("textulc" "{") + ("textup" "{") ("textsw" "{") ("boldsymbol" "{") ("pmb" "{") + ("mathbf" "{")) + font-latex-bold-face 1 command) + ("italic-command" + (("emph" "{") ("textit" "{") ("textsl" "{") ("mathit" "{")) + font-latex-italic-face 1 command) + ("math-command" + (("ensuremath" "|{\\")) + font-latex-math-face 1 command) + ("type-command" + (("texttt" "{") ("textsf" "{") ("textrm" "{") ("textmd" "{") + ("textnormal" "{") ("oldstylenums" "{") ("legacyoldstylenums" "{") + ("mathrm" "{") ("mathsf" "{") ("mathtt" "{")) + font-lock-type-face 1 command) + ("bold-declaration" + ("bf" "bfseries" "sc" "scshape" "sscshape" "ulcshape" "upshape" "swshape") + font-latex-bold-face 1 declaration) + ("italic-declaration" + ("em" "it" "itshape" "sl" "slshape") + font-latex-italic-face 1 declaration) + ("type-declaration" + ("tt" "ttfamily" "sf" "sffamily" "rm" "rmfamily" "mdseries" + "tiny" "scriptsize" "footnotesize" "small" "normalsize" + "large" "Large" "LARGE" "huge" "Huge") + font-lock-type-face 1 declaration)) + "Built-in keywords and specifications for font locking. + +The first element of each item is the name of the keyword class. + +The second element is a list of keywords (macros without an +escape character) to highlight or, if the fifth element is the +symbol `command', a list of lists where the first element of each +item is a keyword and the second a string specifying the macro +syntax. It can contain \"*\" if the macro has a starred variant, +\"[\" for an optional argument, \"{\" for a mandatory argument, +and \"\\\" for a macro. A \"|\" means the following two tokens +should be regarded as alternatives. + +The third element is the symbol of a face to be used or a Lisp +form returning a face symbol. + +The fourth element is the fontification level. + +The fifth element is the type of construct to be matched. It can +be one of `noarg' which will match simple macros without +arguments (like \"\\foo\"), `declaration' which will match macros +inside a TeX group (like \"{\\bfseries foo}\"), or `command' which +will match macros of the form \"\\foo[bar]{baz}\".")) + +(defcustom font-latex-deactivated-keyword-classes nil + "List of strings for built-in keyword classes to be deactivated. + +Valid entries are \"warning\", \"variable\", \"biblatexnoarg\", +\"biblatex\", \"reference\", \"function\" , \"sectioning-0\", +\"sectioning-1\", \"sectioning-2\", \"sectioning-3\", +\"sectioning-4\", \"sectioning-5\", \"slide-title\", \"textual\", +\"bold-command\", \"italic-command\", \"math-command\", +\"type-command\", \"bold-declaration\", \"italic-declaration\", +\"type-declaration\". + +You have to restart Emacs for a change of this variable to take effect." + :group 'font-latex-keywords + :type `(set ,@(mapcar + (lambda (spec) + `(const :tag ,(concat + ;; Name of the keyword class + (let ((name (split-string (car spec) "-"))) + (setcar name (capitalize (car name))) + (mapconcat #'identity name " ")) + " keywords in `" + ;; Name of the face + (symbol-name + (let ((face (nth 2 spec))) + (if (symbolp face) face (eval face t)))) + "'.\n" + ;; List of keywords + (with-temp-buffer + (insert " Keywords: " + (mapconcat (lambda (x) + (if (listp x) + (car x) + x)) + (nth 1 spec) ", ")) + (fill-paragraph nil) + (buffer-string))) + ,(car spec))) + font-latex-built-in-keyword-classes))) + +(eval-and-compile +(defun font-latex--make-match-defun (prefix name face type) + "Return a function definition for keyword matching. +The variable holding the keywords to match are determined by the +strings PREFIX and NAME. The type of matcher is determined by +the symbol TYPE. + +This is a helper function for `font-latex-make-built-in-keywords' +and `font-latex-make-user-keywords' and not intended for general +use." + ;; FIXME: Is the cond-clause possible inside of the defun? + + ;; In an earlier version of font-latex the type could be a list like + ;; (command 1). This indicated a macro with one argument. Provide + ;; a match function in this case but don't actually support it. + (cond ((or (eq type 'command) (listp type)) + `(defun ,(intern (concat prefix name)) (limit) + ,(concat "Fontify `" prefix name "' up to LIMIT. + +Generated by `font-latex--make-match-defun'.") + (when ,(intern (concat prefix name)) + (font-latex-match-command-with-arguments + ,(intern (concat prefix name)) + (append + (when (boundp ',(intern (concat prefix name + "-keywords-local"))) + ,(intern (concat prefix name "-keywords-local"))) + ,(intern (concat prefix name "-keywords"))) + ;; `face' can be a face symbol, a form returning + ;; a face symbol, or a list of face attributes. + ,(if (and (listp face) (fboundp (car face))) + face + `',face) + limit)))) + ((eq type 'declaration) + `(defun ,(intern (concat prefix name)) (limit) + ,(concat "Fontify `" prefix name "' up to LIMIT. + +Generated by `font-latex--make-match-defun'.") + (when ,(intern (concat prefix name)) + (font-latex-match-command-in-braces + ,(intern (concat prefix name)) limit)))) + ((eq type 'noarg) + `(defun ,(intern (concat prefix name)) (limit) + ,(concat "Fontify `" prefix name "' up to LIMIT. + +Generated by `font-latex--make-match-defun'.") + (when ,(intern (concat prefix name)) + (re-search-forward + ,(intern (concat prefix name)) limit t)))))) + +(defun font-latex-keyword-matcher (prefix name face type) + "Return a matcher and highlighter as required by `font-lock-keywords'. +PREFIX and NAME are strings which are concatenated to form the +respective match function. FACE is a face name or a list of face +attributes that will be applied to the respective part of the +match returned by the match function. A lisp form returning a +face name or a list of face attributes is also valid for FACE. +TYPE is the type of construct to be highlighted. Currently the +symbols `command', `declaration' and `noarg' are valid. + +This is a helper function for `font-latex-make-built-in-keywords' +and `font-latex-make-user-keywords' and not intended for general +use." + ;; Quote a list of face attributes and a face symbol + ;; but do not quote a form returning such value. + (unless (and (listp face) (fboundp (car face))) + (setq face `',face)) + + ;; In an earlier version of font-latex the type could be a list like + ;; (command 1). This indicated a macro with one argument. Provide + ;; a matcher in this case but don't actually support it. + (cond ((or (eq type 'command) (listp type)) + `(,(intern (concat prefix name)) + (0 (font-latex-matched-face 0) append t) + (1 (font-latex-matched-face 1) append t) + (2 (font-latex-matched-face 2) append t) + (3 (font-latex-matched-face 3) append t) + (4 (font-latex-matched-face 4) append t) + (5 (font-latex-matched-face 5) append t) + (6 (font-latex-matched-face 6) append t) + (7 (font-latex-matched-face 7) append t) + (8 (font-latex-matched-face 8) append t) + (9 (font-latex-matched-face 9) append t) + (10 (font-latex-matched-face 10) append t) + (11 (font-latex-matched-face 11) append t))) + ((eq type 'noarg) + `(,(intern (concat prefix name)) + (0 ,face))) + ((eq type 'declaration) + `(,(intern (concat prefix name)) + (0 'font-latex-warning-face t t) + (1 'font-lock-keyword-face append t) + (2 ,face append t)))))) + +(defmacro font-latex-make-built-in-keywords () + "Build defuns, defvars and defcustoms for built-in keyword fontification." + (let ((flks '()) + (defs '())) + (dolist (item font-latex-built-in-keyword-classes) + (let ((prefix "font-latex-match-") + (name (nth 0 item)) + (keywords (nth 1 item)) + (face (nth 2 item)) + (level (nth 3 item)) + (type (nth 4 item))) + + ;; defvar font-latex-match-*-keywords-local + (push `(defvar-local ,(intern (concat prefix name "-keywords-local")) + ',keywords + ,(concat "Buffer-local keywords to add to `" + prefix name "-keywords'.\n\n" + (if (eq type 'command) + "\ +This must be a list where each element is a list consisting of a +keyword string \(not a regular expression\) omitting the leading +backslash and a format specifier as described in the doc string of +`font-latex-user-keyword-classes'." + "\ +This must be a list where each element is a keyword string \(not a +regular expression\) omitting the leading backslash.") + + "\n\n\ +This is an internal variable which should not be set directly. +Use `font-latex-add-keywords' instead. + +Generated by `font-latex-make-built-in-keywords'.")) + defs) + + ;; defvar font-latex-match-* + ;; We make this variable buffer local later, but don't use + ;; `defvar-local' here because it shouldn't have nil as its + ;; default value. Its true default value is set by + ;; through font-latex-match-*-make in :set specification of + ;; defcustom of font-latex-match-*-keywords below. It's + ;; only after that this variable can be buffer local. + (push `(defvar ,(intern (concat prefix name)) nil + ,(concat "Regular expression to match " name + " keywords. + +Generated by `font-latex-make-built-in-keywords'")) + defs) + + ;; This defvar (without value) is here just to suppress compiler + ;; warnings. Its true definition is done by defcustom following + ;; the next defun because its :set function depends on the + ;; function defined by that defun. + (push `(defvar ,(intern (concat prefix name "-keywords"))) + defs) + + ;; defun font-latex-match-*-make + (push `(defun ,(intern (concat prefix name "-make")) () + ,(concat "Make or remake the variable `" prefix name "'. + +Generated by `font-latex-make-built-in-keywords'.") + (let ((keywords + (append + (unless (member ,name + font-latex-deactivated-keyword-classes) + ,(intern (concat prefix name "-keywords-local"))) + ,(intern (concat prefix name "-keywords")))) + multi-char-macros single-char-macros) + (dolist (elt keywords) + (let ((keyword (if (listp elt) (car elt) elt))) + (if (string-match "^[A-Za-z]" keyword) + (push keyword multi-char-macros) + (push keyword single-char-macros)))) + (when (or multi-char-macros single-char-macros) + (setq ,(intern (concat prefix name)) + (concat + "\\\\\\(" + (when multi-char-macros + (concat + "\\(?:" (regexp-opt multi-char-macros) "\\)\\>")) + (when single-char-macros + (concat + (when multi-char-macros "\\|") + "\\(?:" (regexp-opt single-char-macros) "\\)")) + "\\)"))))) + defs) + + ;; defcustom font-latex-match-*-keywords + (push `(defcustom ,(intern (concat prefix name "-keywords")) nil + ,(concat "List of keywords " + (when (eq type 'command) "and formats ") + "for " name " face.\n" + (if (eq type 'command) + "\ +Each element has to be a list consisting of the name of a macro +omitting the leading backslash and a format specifier as +described in the doc string of `font-latex-user-keyword-classes'." + "\ +Each element has to be the name of a macro as a string, omitting +the leading backslash.") + "\n\n\ +Setting this variable directly does not take effect; restart +Emacs. + +Generated by `font-latex-make-built-in-keywords'.") + :type '(repeat ,(if (eq type 'command) + '(list (string :tag "Keyword") + (string :tag "Format")) + '(string :tag "Keyword"))) + :set (lambda (symbol value) + (set-default symbol value) + (funcall ',(intern (concat prefix name "-make")))) + :group 'font-latex-keywords) + defs) + + ;; Now that font-latex-match-* has attained proper default + ;; value, make it buffer local. + (push `(make-variable-buffer-local ',(intern (concat prefix name))) + defs) + + ;; defun font-latex-match-* + (push (font-latex--make-match-defun prefix name face type) defs) + + ;; Add matchers and highlighters to `font-latex-keywords-{1,2}'. + (let ((keywords-entry (font-latex-keyword-matcher + prefix name face type))) + (push (cons level keywords-entry) flks)))) + `(progn + ,@(nreverse defs) + (defvar font-latex-keywords-1 + ',(nreverse (delq nil (mapcar (lambda (x) (if (eq 1 (car x)) (cdr x))) + flks))) + "Subdued level highlighting for LaTeX modes.") + (defvar font-latex-keywords-2 + ',(nreverse (mapcar #'cdr flks)) + "High level highlighting for LaTeX modes.")))) + +(font-latex-make-built-in-keywords) + +(defcustom font-latex-user-keyword-classes nil + "List of user-defined keyword classes for font locking. + +Every keyword class consists of four parts, a name, a list of +keywords, a face and a specifier for the type of macro to be +highlighted. + +When adding new entries, you have to use unique values for the +class names, that is, they must not clash with names of the +built-in keyword classes or other names given by you. +Additionally the names must not contain spaces. + +The list of keywords defines which commands and declarations +should be covered by the keyword class. A keyword can either be +a simple command name omitting the leading backslash or a list +consisting of the command name and a string specifying the syntax +of the command. The latter is useful if you want to match LaTeX +macros with arguments (see below). You can specify the occurence +and order of optional (\"[\") and mandatory (\"{\") arguments for +each keyword. For example for \"documentclass\" you'd use \"[{\" +because the macro has one optional followed by one mandatory +argument. Optionally starred macros can be indicated with \"*\". +In case an argument is an unbraced macro, use \"\\\". You can +also specify two alternative arguments by prefixing them with +\"|\". As an example, the specifier for \\newcommand is +\"*|{\\=\\[[{\". + +The face argument can either be an existing face or a face +attribute. + +There are three alternatives for the class type: + +A value of `command' indicates commands with arguments +\(\"\\foo[bar]{baz}\"). The mandatory arguments in curly braces +will get the face you specified. + +A value of `declaration' indicates declarations inside of TeX +groups (\"{\\foo bar}\"). The content inside the braces, +excluding the command, will get the face you specified. In case +the braces are missing, the face will be applied to the command +itself. + +A value of `noarg' indicates commands without arguments +\(\"\\foo\"). The command itself will get the face you +specified. + +Setting this variable directly does not take effect; +restart Emacs." + :group 'font-latex-keywords + :type '(repeat (list (string :tag "Name") + (choice (repeat :tag "Keywords" (string :tag "Keyword")) + (repeat + :tag "Keywords with specs" + (group (string :tag "Keyword") + (string :tag "Format specifier")))) + (choice (face :tag "Face name") + (custom-face-edit :tag "Face attributes")) + (choice :tag "Type" + ;; Maps to + ;;`font-latex-match-command-with-arguments' + (const :tag "Command with arguments" + command) + ;; Maps to + ;;`font-latex-match-command-in-braces' + (const :tag "Declaration inside TeX group" + declaration) + ;; Maps to `re-search-forward' + (const :tag "Command without arguments" + noarg)))) + :set (lambda (symbol value) + (dolist (item value) + (when (string-match " " (car item)) + (error "No spaces allowed in name"))) + (let (names names-uniq) + (dolist (item (append font-latex-built-in-keyword-classes value)) + (setq names (append names (list (car item))))) + (setq names (TeX-sort-strings names)) + (setq names-uniq (TeX-delete-duplicate-strings names)) + (dotimes (i (safe-length names-uniq)) + (unless (string= (nth i names) (nth i names-uniq)) + (error "Name %S already exists" (nth i names))))) + (set-default symbol value) + (let ((prefix "font-latex-match-")) + (dolist (elt value) + (unless (boundp (intern (concat prefix (car elt)))) + ;; defvar font-latex-match-* + (eval `(defvar ,(intern (concat prefix (car elt))) nil + ,(concat "Regular expression to match " (car elt) + " keywords. + +Generated by `font-latex-user-keyword-classes'")))) + (let ((keywords (nth 1 elt)) + single-char-macro-flag) + (setq keywords (if (listp (car keywords)) + (mapcar #'car keywords) + keywords)) + (catch 'single-char + (dolist (keyword keywords) + (unless (string-match "^[A-Za-z]" keyword) + (setq single-char-macro-flag t) + (throw 'single-char nil)))) + (set (intern (concat prefix (car elt))) + (when (> (safe-length keywords) 0) + (concat "\\\\" (let ((max-specpdl-size 1000)) + (regexp-opt keywords t)) + (unless single-char-macro-flag "\\>"))))))))) + +(defun font-latex-make-user-keywords () + "Build defuns and defvars for user keyword fontification." + (let ((keyword-specs font-latex-user-keyword-classes)) + (dolist (item keyword-specs) + (let ((prefix "font-latex-match-") + (name (nth 0 item)) + (keywords (nth 1 item)) + (face (nth 2 item)) + (type (nth 3 item))) + + ;; defvar font-latex-match-*-keywords + (eval `(defvar ,(intern (concat prefix name "-keywords")) ',keywords + ,(concat "Font-latex keywords for " name " face. + +Generated by `font-latex-make-user-keywords'."))) + + ;; defun font-latex-match-* + (eval (font-latex--make-match-defun prefix name face type) t) + + ;; Add the matcher to `font-latex-keywords-2'. + (add-to-list 'font-latex-keywords-2 + (font-latex-keyword-matcher prefix name face type) t)))) + + ;; Add the "fixed" matchers and highlighters. + (dolist (item + '(("\\(^\\|[^\\]\\)\\(&+\\)" 2 'font-latex-warning-face) + (font-latex-match-dollar-math 0 'font-latex-math-face keep) + (font-latex-match-quotation + (0 'font-latex-string-face append) + (1 'font-latex-warning-face)) + ;; Hack to remove the verbatim face from the \ in + ;; \end{verbatim} and similar. The same hack is used in + ;; tex-mode.el. + ("\\(\\\\\\)end" + (1 (get-text-property (match-end 1) 'face) t)))) + (add-to-list 'font-latex-keywords-1 item) + (add-to-list 'font-latex-keywords-2 item)) + (dolist (item + '((font-latex-match-math-env + (0 'font-latex-warning-face t t) + (1 'font-latex-math-face append t)) + (font-latex-match-math-envII + (1 'font-latex-math-face append t)) + (font-latex-match-simple-command + (0 'font-latex-sedate-face append)) + (font-latex-match-script + (1 (font-latex-script (match-beginning 0)) append)) + (font-latex-match-script-chars + (1 (font-latex-script-char (match-beginning 1)) prepend)))) + (add-to-list 'font-latex-keywords-2 item t))) +(font-latex-make-user-keywords) + +(defun font-latex-add-keywords (keywords class) + "Add KEYWORDS to CLASS. +KEYWORDS is a list of keywords or keywords with syntax specs. +CLASS corresponds to a keyword class and can be one of the +symbols `warning', `variable', `reference', `biblatexnoarg', +`biblatex', `function', `sectioning-0', `sectioning-1', +`sectioning-2', `sectioning-3', `sectioning-4', `sectioning-5', +`slide-title', `textual', `bold-command', `italic-command', +`math-command', `type-command', `bold-declaration', +`italic-declaration' or `type-declaration'. + +The keywords will be added to the buffer-local list of keywords +of the respective keyword class and necessary updates of the font +locking machinery will be triggered." + (let* ((class (symbol-name class)) + (list (intern (format "font-latex-match-%s-keywords-local" class)))) + (dolist (elt keywords) + (add-to-list list elt)) + (funcall (intern (format "font-latex-match-%s-make" class))) + ;; Trigger refontification. + (when (fboundp 'font-lock-flush) + (font-lock-flush)))) + +(defvar font-latex-keywords font-latex-keywords-1 + "Default expressions to highlight in TeX mode.") + + +;;; Subscript and superscript + +(defcustom font-latex-fontify-script t + "If non-nil, fontify subscript and superscript strings. + +By default, super/subscripts are raised/lowered if this variable +is non-nil. This fontification only affects one level of +scripts, for example in x^{y^z}, the y and the z have the same +size and are equally raised over x. + +If this variable is set to the symbol `multi-level', then y is +raised above x, and z is raised above y. With many script +levels, the text might become too small to be readable, thus +there is the option `font-latex-fontify-script-max-level'. (The +factors for text shrinking are defined in the faces +`font-latex-superscript-face' and `font-latex-subscript-face' and +the raise/lower factor in `font-latex-script-display'.) + +If this variable is set to the symbol `invisible', then the +effect is essentially like `multi-level' but additionally the +script operators ^ and _ are not displayed." + :type '(choice (boolean :tag "Enabled") + (const :tag "Multiple levels" multi-level) + (const :tag "Hide ^ and _" invisible)) + :group 'font-latex) +(put 'font-latex-fontify-script 'safe-local-variable + (lambda (val) + (or (booleanp val) + (memq val '(multi-level invisible))))) + +(defcustom font-latex-fontify-script-max-level 3 + "Maximum scriptification level for which script faces are applied. +The faces `font-latex-superscript-face' and +`font-latex-subscript-face' define custom :height values < 1.0. +Therefore, scripts are displayed with a slightly smaller font +than normal math text. If `font-latex-fontify-script' is +`multi-level' or `invisible', the font size becomes too small to +be readable after a few levels. This option allows to specify +the maximum level after which the size of the script text won't +be shrunken anymore. + +For example, see this expression: + + \\( x^{y^{z^a_b}} \\) + +x has scriptification level 0, y has level 1, z has level 2, and +both a and b have scriptification level 3. + +If `font-latex-fontify-script-max-level' was 2, then z, a, and b +would have the same font size. If it was 3 or more, then a and b +were smaller than z just in the same way as z is smaller than y +and y is smaller than x." + :group 'font-latex + :type 'integer) + +(defcustom font-latex-script-display '((raise -0.5) . (raise 0.5)) + "Display specification for subscript and superscript content. +The car is used for subscript, the cdr is used for superscripts." + :group 'font-latex + :type '(cons (choice (sexp :tag "Subscript form") + (const :tag "No lowering" nil)) + (choice (sexp :tag "Superscript form") + (const :tag "No raising" nil)))) + + +;;; Syntactic keywords + +(defvar font-latex-syntactic-keywords nil + "Syntactic keywords used by `font-latex'.") +(make-variable-buffer-local 'font-latex-syntactic-keywords) + +(defvar font-latex-syntactic-keywords-extra nil + "List of syntactic keywords to add to `font-latex-syntactic-keywords'. +The form should be the same as in `font-lock-syntactic-keywords'.") +(make-variable-buffer-local 'font-latex-syntactic-keywords-extra) + +;; Set and updated in `font-latex-set-syntactic-keywords'. +(defvar font-latex-doctex-syntactic-keywords nil) + +(defun font-latex-set-syntactic-keywords () + "Set the variable `font-latex-syntactic-keywords'. +This function can be used to refresh the variable in case other +variables influencing its value, like `LaTeX-verbatim-environments', +have changed." + ;; Checks for non-emptiness of lists added in order to cater for + ;; installations where `(regexp-opt-group nil)' would enter a loop. + (let ((verb-envs (and (fboundp 'LaTeX-verbatim-environments) + (LaTeX-verbatim-environments))) + (verb-macros-with-delims + (and (fboundp 'LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-delims))) + (verb-macros-with-braces + (and (fboundp 'LaTeX-verbatim-macros-with-braces) + (LaTeX-verbatim-macros-with-braces)))) + (setq verb-envs (and verb-envs (regexp-opt verb-envs)) + verb-macros-with-delims (and verb-macros-with-delims + (regexp-opt verb-macros-with-delims)) + verb-macros-with-braces (and verb-macros-with-braces + (regexp-opt verb-macros-with-braces)) + font-latex-syntactic-keywords nil) + (unless (= (length verb-envs) 0) + (add-to-list + 'font-latex-syntactic-keywords + `(,(concat + "^[ \t]*\\\\begin *{\\(?:" verb-envs "\\)}" + ;; Some environments accept an optional and/or mandatory + ;; argument that can span over more lines. Between + ;; "\begin{<envname>}" and the optional argument there can + ;; be whitespaces and the newline can be commented by a "%" + ;; character. + "[ \t]*\\(?:%.*\n[ \t]*\\)?" + ;; The following line of the regexp matches the optional + ;; argument and allows for up to one level of brackets + ;; inside the argument (e.g., the dialect of a language in + ;; the `lstlisting' environment by the `listings' package). + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + ;; After the optional argument, there may also be another + ;; mandatory argument(s) (e.g. with VerbatimOut or the + ;; minted envs or defined with `lstnewenvironment'). Use + ;; the same trick as above in order to allow one level of + ;; braces in the argument. + "\\(?:{[^{}]*\\(?:{[^{}]*}[^{}]*\\)*}\\)*" + ;; Now match the final newline. The "." alternative + ;; catches the case where verbatim content is written + ;; immediately after the \begin{verbatim}. + "\\(\n\\|.\\)") + (1 "|" t))) + (add-to-list + 'font-latex-syntactic-keywords + ;; Using the newline character for the syntax property often + ;; resulted in fontification problems when text was inserted at + ;; the end of the verbatim environment. That's why we now use + ;; the starting backslash of \end. There is a hack in + ;; `font-latex-make-user-keywords' to remove the spurious + ;; fontification of the backslash. + `(,(concat "\\(\\\\\\)end *{\\(?:" verb-envs "\\)}") + (1 "|" t)))) + (unless (= (length verb-macros-with-delims) 0) + (add-to-list + 'font-latex-syntactic-keywords + `(,(concat "\\\\\\(?:" verb-macros-with-delims "\\)" + ;; Some macros take an optional argument. This is + ;; the same line as above for environments. + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + ;; An opening curly brace as delimiter is valid, but + ;; allowing it might screw up fontification of stuff + ;; like "\url{...} foo \textbf{<--!...}". + "\\([^a-z@*\n\f{]\\).*?" + ;; Give an escape char at the end of the verbatim + ;; construct punctuation syntax. Prevents wrong + ;; fontification of stuff like "\verb|foo\|". + "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)") + (1 "\"") (2 ".") (3 "\"")))) + (unless (= (length verb-macros-with-braces) 0) + (add-to-list + 'font-latex-syntactic-keywords + `(,(concat "\\\\\\(?:" verb-macros-with-braces "\\)" + ;; Some macros take an optional argument. This is + ;; the same line as above for environments. + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)") + (1 "|") (2 "|"))))) + (when font-latex-syntactic-keywords-extra + (nconc font-latex-syntactic-keywords font-latex-syntactic-keywords-extra)) + ;; ;; Cater for docTeX mode. + ;; (setq font-latex-doctex-syntactic-keywords + ;; (append font-latex-syntactic-keywords + ;; ;; For docTeX comment-in-doc. + ;; '(("\\(\\^\\)\\^A" (1 (font-latex-doctex-^^A)))))) + ;; Finally, compute our `syntax-propertize-function' anew. + (setq-local syntax-propertize-function + (font-latex--make-syntax-propertize-function))) + + +;;; Syntactic fontification + +(defun font-latex-syntactic-face-function (state) + (if (nth 3 state) + 'font-latex-verbatim-face + 'font-lock-comment-face)) + +;;; Faces + +(defface font-latex-bold-face + (let ((font '(:inherit bold))) + `((((class grayscale) (background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "LightGray" ,@font)) + (((class color) (background light)) + (:foreground "DarkOliveGreen" ,@font)) + (((class color) (background dark)) + (:foreground "OliveDrab" ,@font)) + (t (,@font)))) + "Face used to highlight text to be typeset in bold." + :group 'font-latex-highlighting-faces) + +(defface font-latex-italic-face + (let ((font '(:inherit italic))) + `((((class grayscale) (background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "LightGray" ,@font)) + (((class color) (background light)) + (:foreground "DarkOliveGreen" ,@font)) + (((class color) (background dark)) + (:foreground "OliveDrab" ,@font)) + (t (,@font)))) + "Face used to highlight text to be typeset in italic." + :group 'font-latex-highlighting-faces) + +(defface font-latex-math-face + (let ((font '(:inherit underline))) + `((((class grayscale) (background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "LightGray" ,@font)) + (((class color) (background light)) + (:foreground "SaddleBrown")) + (((class color) (background dark)) + (:foreground "burlywood")) + (t (,@font)))) + "Face used to highlight math." + :group 'font-latex-highlighting-faces) + +(defface font-latex-sedate-face + '((((class grayscale) (background light)) (:foreground "DimGray")) + (((class grayscale) (background dark)) (:foreground "LightGray")) + (((class color) (background light)) (:foreground "DimGray")) + (((class color) (background dark)) (:foreground "LightGray")) + ;;;(t (:underline t)) + ) + "Face used to highlight sedate stuff." + :group 'font-latex-highlighting-faces) + +(defface font-latex-string-face + (let ((font '(:inherit italic))) + `((((type tty) (class color)) + (:foreground "green")) + (((class grayscale) (background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "LightGray" ,@font)) + (((class color) (background light)) + (:foreground "RosyBrown")) + (((class color) (background dark)) + (:foreground "LightSalmon")) + (t (,@font)))) + "Face used to highlight strings." + :group 'font-latex-highlighting-faces) + +(defface font-latex-warning-face + (let ((font '(:inherit bold))) + `((((class grayscale)(background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale)(background dark)) + (:foreground "LightGray" ,@font)) + (((class color)(background light)) + (:foreground "red" ,@font)) + (((class color)(background dark)) + (:foreground "red" ,@font)) + (t (,@font)))) + "Face for important keywords." + :group 'font-latex-highlighting-faces) + +(defface font-latex-verbatim-face + (let ((font '(:inherit fixed-pitch))) + `((((class grayscale) (background light)) + (:foreground "DimGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "LightGray" ,@font)) + (((class color) (background light)) + (:foreground "SaddleBrown" ,@font)) + (((class color) (background dark)) + (:foreground "burlywood" ,@font)) + (t (,@font)))) + "Face used to highlight TeX verbatim environments." + :group 'font-latex-highlighting-faces) + +(defface font-latex-superscript-face + '((t (:height 0.85))) + "Face used for superscripts." + :group 'font-latex-highlighting-faces) + +(defface font-latex-subscript-face + '((t (:height 0.85))) + "Face used for subscripts." + :group 'font-latex-highlighting-faces) + +(defface font-latex-script-char-face + (let ((font '(:inherit underline))) + `((((class grayscale) (background light)) + (:foreground "DarkGray" ,@font)) + (((class grayscale) (background dark)) + (:foreground "gray" ,@font)) + (((class color) (background light)) + (:foreground "salmon")) + (((class color) (background dark)) + (:foreground "DarkRed")) + (t (,@font)))) + "Face used for the script chars ^ and _." + :group 'font-latex-highlighting-faces) + +(defface font-latex-slide-title-face + '((t (:inherit (variable-pitch font-lock-type-face) + :weight bold :height 1.2))) + "Face for slide titles." + :group 'font-latex-highlighting-faces) + +;;; Setup + +(defvar font-latex-syntax-alist + ;; Use word syntax for @ because we use \> for matching macros and + ;; we don't want \foo@bar to be found if we search for \foo. + '((?\( . ".") (?\) . ".") (?@ . "w")) + "List of specifiers for the syntax alist of `font-lock-defaults'.") + +(defun font-latex-add-to-syntax-alist (list) + "Activate syntactic font locking for the entries in LIST. +The entries are added to `font-latex-syntax-alist' and eventually +end up in `font-lock-defaults'. Each entry in LIST should be a +cons pair as expected by `font-lock-defaults'. The function also +triggers Font Lock to recognize the change." + (set (make-local-variable 'font-latex-syntax-alist) + (append font-latex-syntax-alist list)) + ;; We modify the `font-lock-syntax-table' directly but also call + ;; `font-latex-setup' in order to have `font-lock-defaults' be in sync. + (font-latex-setup) + (dolist (elt list) + (modify-syntax-entry (car elt) (cdr elt) font-lock-syntax-table)) + ;; Trigger refontification. + (when (fboundp 'font-lock-flush) + (font-lock-flush))) + +(defun font-latex--make-syntax-propertize-function () + "Return a `syntax-propertize-function' for (La|Doc)TeX documents." + (let ((kws ;; (if (derived-mode-p 'doctex-mode) + ;; font-latex-doctex-syntactic-keywords + font-latex-syntactic-keywords)) ;; ) + (syntax-propertize-via-font-lock kws))) + +;;;###autoload +(defun font-latex-setup () + "Setup this buffer for LaTeX font-lock. Usually called from a hook." + (font-latex-set-syntactic-keywords) + + ;; Activate multi-line fontification facilities. + (set (make-local-variable 'font-lock-multiline) t) + + ;; The test for `major-mode' currently only works with docTeX mode + ;; because `TeX-install-font-lock' is called explicitly in + ;; `doctex-mode'. In case other modes have to be distinguished as + ;; well, remove the call to `TeX-install-font-lock' from + ;; `VirTeX-common-initialization' and place it in the different + ;; `xxx-mode' calls instead, but _after_ `major-mode' is set. + (let ((defaults + `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2) + nil nil ,font-latex-syntax-alist nil)) + (variables + '((font-lock-mark-block-function . mark-paragraph) + (font-lock-fontify-region-function + . font-latex-fontify-region) + (font-lock-unfontify-region-function + . font-latex-unfontify-region) + (font-lock-extend-region-functions + font-lock-extend-region-wholelines + font-lock-extend-region-multiline + font-latex-extend-region-backwards-command-with-args + font-latex-extend-region-backwards-command-in-braces + font-latex-extend-region-backwards-quotation + font-latex-extend-region-backwards-math) + (syntax-propertize-extend-region-functions + syntax-propertize-wholelines + font-latex-sp-extend-region-backwards-verb-env)))) + ;; Add the mode-dependent stuff to the basic variables defined above. + (if (eq major-mode 'doctex-mode) + (progn + (setcar defaults (append (car defaults) + '(font-latex-doctex-keywords))) + (setq variables + (append variables + '((font-lock-syntactic-face-function + . font-latex-doctex-syntactic-face-function))))) + (setq variables + (append variables + '((font-lock-syntactic-face-function + . font-latex-syntactic-face-function))))) + ;; Set the defaults. + (setq font-lock-defaults (append defaults variables))) + + ;; Make sure fontification will be refreshed if a user sets variables + ;; influencing fontification in her file-local variables section. + (add-hook 'hack-local-variables-hook #'font-latex-after-hacking-local-variables t t)) + +(defun font-latex-update-font-lock (&optional _syntactic-kws) + "Tell font-lock about updates of fontification rules. +If SYNTACTIC-KWS is non-nil, also update +`font-latex-syntactic-keywords'." + (display-warning + 'auctex + (concat "`font-latex-update-font-lock' should not be called. +It is obsolete and going to be removed. +If you have called `font-latex-add-keywords' and want to refresh fontification, +call `font-lock-flush' instead. +If you changed syntactic fontification, for example, one of the variables +- `LaTeX-verbatim-macros-with-delims' +- `LaTeX-verbatim-macros-with-delims-local' +- `LaTeX-verbatim-macros-with-braces' +- `LaTeX-verbatim-macros-with-braces-local' +- `LaTeX-verbatim-environments' +- `LaTeX-verbatim-environments-local' +- `font-latex-syntactic-keywords-extra' +then call `font-latex-set-syntactic-keywords'."))) + +(make-obsolete 'font-latex-update-font-lock nil "12.2.4") + +(defvar font-latex--updated-region-end nil +;; During font lock operation, matched range sometimes exceeds the +;; given end limit. So record the actual end in this variable to +;; notify the font lock machinery. +;; Match functions should do the following two if the end of the +;; actual match goes beyond the limit: +;; 1. If the value of this variable is smaller than limit, set this +;; variable to that limit. +;; 2. When the end of the actual match exceeds this variable, +;; - apply `font-lock-unfontify-region' between the value of this +;; variable and the end of the actual match +;; - update this variable to the end of the actual match +;; See implementation of `font-latex-match-math-env' for actual usage. + "Record the end of fontification.") +(defun font-latex-fontify-region (beg end &optional verbose) + "Fontify region from BEG to END. +Take care when the actually fonfified region was extended beyond END." + (setq font-latex--updated-region-end end) + (let ((res (font-lock-default-fontify-region beg end verbose))) + ;; COMPATIBILITY for older emacsen. Return value for jit-lock + ;; is meaningful for only newer emacsen. + (if (eq (car-safe res) 'jit-lock-bounds) + `(jit-lock-bounds ,(cadr res) . + ,(max (cddr res) font-latex--updated-region-end))))) + +;; Copy and adaption of `tex-font-lock-unfontify-region' from +;; tex-mode.el in GNU Emacs on 2004-08-04. +;; (XEmacs passes a third argument to the function.) +(defun font-latex-unfontify-region (beg end &rest _ignored) + "Unfontify region from BEG to END." + (font-lock-default-unfontify-region beg end) + (remove-list-of-text-properties beg end '(script-level invisible)) + (while (< beg end) + (let ((next (next-single-property-change beg 'display nil end)) + (prop (get-text-property beg 'display))) + (if (and (eq (car-safe prop) 'raise) + (null (cddr prop))) + (put-text-property beg next 'display nil)) + (setq beg next)))) + +(defun font-latex-after-hacking-local-variables () + "Refresh fontification if required by updates of file-local variables. +This function is added to `hack-local-variables-hook' and +recomputes fontification if variables affecting fontification are +modified. Such variables include +`LaTeX-verbatim-environments-local', +`LaTeX-verbatim-macros-with-braces-local', +`LaTeX-verbatim-macros-with-delims-local'." + (when + ;; In Emacs we know if the value came from file or directory + ;; locals. Note to self: directory-local variables are also added + ;; to file-local-variables-alist. + (let ((hacked-local-vars (mapcar #'car file-local-variables-alist))) + (or (memq 'LaTeX-verbatim-environments-local hacked-local-vars) + (memq 'LaTeX-verbatim-macros-with-braces-local hacked-local-vars) + (memq 'LaTeX-verbatim-macros-with-delims-local hacked-local-vars))) + ;; Ok, we need to refresh syntactic fontification. + (font-latex-set-syntactic-keywords))) + +;;; Utility functions + +(defun font-latex-find-matching-close (openchar closechar) + "Skip over matching pairs of OPENCHAR and CLOSECHAR. +OPENCHAR is the opening character and CLOSECHAR is the closing +character. Character pairs are usually { } or [ ]. Comments are +ignored during the search." + (let ((parse-sexp-ignore-comments + (not (eq major-mode 'doctex-mode))) ; scan-sexps ignores comments + (init-point (point)) + (mycount 1) + (esc-char (or (and (boundp 'TeX-esc) TeX-esc) "\\")) + ;; XXX: Do not look up syntax-table properties since they may + ;; be misleading, e.g. in the case of "{foo}^^A" where the + ;; closing brace gets a comment end syntax. + (parse-sexp-lookup-properties nil)) + (or + (condition-case nil + (progn + (goto-char (with-syntax-table + (TeX-search-syntax-table openchar closechar) + (scan-sexps (point) 1))) + ;; No error code. See if closechar is unquoted + (save-excursion + (backward-char 1) + (zerop (mod (skip-chars-backward (regexp-quote esc-char)) 2)))) + (error nil)) + (save-match-data + (goto-char (1+ init-point)) + (while (and (> mycount 0) + (re-search-forward + (string ?\[ + ;; closechar might be ] + ;; and therefor must be first in regexp + closechar openchar + ?\]) + nil t)) + (cond + ((font-latex-commented-outp) + (forward-line 1)) + ((save-excursion + (backward-char 1) + (zerop (mod (skip-chars-backward (regexp-quote esc-char)) + 2))) + (setq mycount (+ mycount + (if (= (preceding-char) openchar) 1 -1))))))) + (if (= mycount 0) + t + (goto-char init-point) + nil)))) + +(defun font-latex-commented-outp () + "Return t if comment character is found between bol and point." + (save-excursion + (let ((limit (point)) + (esc-char (if (and (boundp 'TeX-esc) TeX-esc) TeX-esc "\\"))) + (forward-line 0) + (if (and (eq (char-after) ?\%) + (not (font-latex-faces-present-p 'font-latex-verbatim-face))) + (not (eq major-mode 'doctex-mode)) + (catch 'found + (while (progn (skip-chars-forward "^%" limit) + (< (point) limit)) + (when (and (save-excursion + (zerop (mod (skip-chars-backward + (regexp-quote esc-char)) 2))) + (not (font-latex-faces-present-p + 'font-latex-verbatim-face))) + (throw 'found t)) + (forward-char))))))) + +(defun font-latex-faces-present-p (faces &optional pos) + "Return t if FACES are present at position POS. +FACES may be a single face or a list of faces. +If POS is omitted, the current position of point is used." + (let* ((faces (if (listp faces) faces (list faces))) + (pos (or pos (point))) + (prop (get-text-property pos 'face)) + (prop-list (if (listp prop) prop (list prop)))) + (catch 'member + (dolist (item prop-list) + (when (memq item faces) + (throw 'member t)))))) + +(defun font-latex-forward-comment () + "Like `forward-comment' but with special provisions for docTeX mode. +In docTeX mode \"%\" at the start of a line will be treated as whitespace." + (if (eq major-mode 'doctex-mode) + ;; XXX: We should probably cater for ^^A as well. + (progn + (while (progn (if (bolp) (skip-chars-forward "%")) + (> (skip-chars-forward " \t\n") 0))) + (when (eq (char-after) ?%) + (beginning-of-line 2) + t)) + (forward-comment 1))) + +;;; Match functions + +(defvar font-latex-matched-faces nil + "List of faces corresponding to matches in match data.") + +(defun font-latex-matched-face (pos) + "Return face at position POS in `font-latex-matched-faces'." + (nth pos font-latex-matched-faces)) + +(defvar font-latex-command-with-args-default-spec nil ; "*[{" + "Default specifier for keywords without syntax description. +Set this to nil if verification of command syntax is unwanted.") + +(defvar font-latex-command-with-args-opt-arg-delims + '((?\[ . ?\]) (?< . ?>) (?\( . ?\))) + "List character pairs used as delimiters for optional arguments.") + +(defvar font-latex-syntax-error-modes '(latex-mode) + "List of modes where syntax errors in macros should be indicated.") + +(defun font-latex-match-command-with-arguments (regexp keywords face limit) + "Search for regexp command KEYWORDS[opt]{arg} before LIMIT. +Returns nil if none of KEYWORDS is found." + (setq font-latex-matched-faces nil) + (catch 'match + (while (re-search-forward regexp limit t) + (unless (font-latex-faces-present-p '(font-lock-comment-face + font-latex-verbatim-face) + (match-beginning 0)) + (let* ((beg (match-beginning 0)) + end ; Used for multiline text property. + (match-data (list beg)) + match-beg syntax-error alternative spec + error-indicator-pos + (spec-list (string-to-list + (or (cadr (assoc (match-string 1) keywords)) + font-latex-command-with-args-default-spec))) + (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments + (goto-char (match-end 0)) + ;; Check for starred macro if first spec is an asterisk or a + ;; plus sign in case of \defaultfontfeatures+ provided by + ;; fontspec.sty + (when (or (eq (car spec-list) ?*) + (eq (car spec-list) ?+)) + (setq spec-list (cdr spec-list)) + (skip-chars-forward "*+" (1+ (point)))) + ;; Add current point to match data and use keyword face for + ;; region from start to point. + (nconc match-data (list (point))) + (add-to-list 'font-latex-matched-faces 'font-lock-keyword-face) + (setq end (point)) + (catch 'break + ;; Walk the list of specs. + (while spec-list + (setq spec (pop spec-list) + error-indicator-pos beg) + (while (and (not (eobp)) (font-latex-forward-comment))) + ;; Alternative + (when (eq spec ?|) + (setq alternative t) + (setq spec (pop spec-list))) + (cond + ;; Macros: \foo + ((eq spec ?\\) + (if (eq (char-after) spec) + (progn + (nconc match-data + (list (point) + (progn + (forward-char) + (if (zerop (skip-syntax-forward "_w")) + (forward-char) ; Single-char macro. + (skip-chars-forward "*+")) + (point)))) + (nconc font-latex-matched-faces (list face)) + (setq end (max end (point))) + (when alternative (pop spec-list))) + (setq syntax-error t) + (throw 'break nil))) + ;; Mandatory arguments: {...} + ((eq spec ?{) + (if (and (eq (char-after) spec) + (setq match-beg (point)) + (font-latex-find-matching-close ?{ ?})) + (progn + (nconc match-data (list (1+ match-beg) (1- (point)))) + (nconc font-latex-matched-faces (list face)) + (setq end (max end (1- (point)))) + (when alternative (pop spec-list))) + (unless alternative + (setq syntax-error t) + (when (and match-beg (= match-beg (point))) + (setq error-indicator-pos match-beg)) + (throw 'break nil)))) + ;; Optional arguments: [...] and others + ((eq (char-after) spec) + (setq match-beg (point)) + (if (font-latex-find-matching-close + spec (cdr (assq + spec + font-latex-command-with-args-opt-arg-delims))) + (progn + (nconc match-data (list (1+ match-beg) (1- (point)))) + (nconc font-latex-matched-faces + (list 'font-lock-variable-name-face)) + (setq end (max end (1- (point))))) + (setq syntax-error t + error-indicator-pos match-beg) + (throw 'break nil)))) + (setq alternative nil))) + (when (and syntax-error (memq major-mode + font-latex-syntax-error-modes)) + ;; Add the warning face at the front of the list because + ;; the matcher uses 'append and the face would otherwise + ;; be overridden by the keyword face. + (setq match-data (append (list error-indicator-pos + (1+ error-indicator-pos)) + match-data)) + (push 'font-latex-warning-face font-latex-matched-faces)) + (store-match-data match-data) + (throw 'match t)))))) + +;; Those are dynamically bound by font-lock. +(defvar font-lock-beg) +(defvar font-lock-end) + +(defun font-latex-extend-region-backwards-command-with-args () + "Extend region backwards for commands with args." + (save-excursion + (goto-char font-lock-end) + (catch 'extend + (while (TeX-search-backward-unescaped "}" font-lock-beg t) + (let ((macro-start + (TeX-find-macro-start + (max (point-min) + (- font-lock-beg font-latex-multiline-boundary))))) + (when (and macro-start + (< macro-start font-lock-beg)) + (setq font-lock-beg macro-start) + (throw 'extend t))))))) + +(defun font-latex-match-command-in-braces (keywords limit) + "Search for command like {\\bfseries fubar} before LIMIT. +Sets `match-data' so that: + subexpression 0 is a warning indicator, + subexpression 1 is the keyword, and + subexpression 2 is the rest in the TeX group. +Return nil if no command is found." + (catch 'match + (while (re-search-forward keywords limit t) + (unless (font-latex-faces-present-p '(font-lock-comment-face + font-latex-verbatim-face) + (match-beginning 0)) + (let ((kbeg (match-beginning 0)) (kend (match-end 1)) + (beg (match-end 0)) + cbeg cend + (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments + (goto-char kbeg) + (if (not (eq (preceding-char) ?\{)) + ;; Fontify only the keyword (no argument found). + (progn + (setq cbeg kbeg cend kend) + (goto-char (match-end 0)) + (store-match-data (list (point) (point) + (point) (point) + cbeg cend)) + (throw 'match t)) + ;; There's an opening bracket + (save-restriction + ;; Restrict to LIMIT. + (narrow-to-region (point-min) limit) + (forward-char -1) ; Move on the opening bracket + (if (font-latex-find-matching-close ?\{ ?\}) + (store-match-data (list kbeg kbeg + kbeg kend + beg (1- (point)))) + (goto-char kend) + (store-match-data (list (1- kbeg) kbeg + kbeg kend + kend kend))) + (throw 'match t)))))))) + +(defun font-latex-extend-region-backwards-command-in-braces () + "Extend region backwards for commands in braces." + (save-excursion + (goto-char font-lock-end) + (catch 'extend + (while (TeX-search-backward-unescaped "}" font-lock-beg t) + (let ((group-start + (TeX-find-opening-brace + nil (max (point-min) + (- font-lock-beg font-latex-multiline-boundary))))) + (when group-start + ;; XXX: Actually we'd have to check if any of the + ;; declaration-type macros can be found right after the + ;; brace. If we don't do this (like now) large regions + ;; may be refontified for no good reason. For checking + ;; the built-in `font-latex-match-*' variables for + ;; declaration-type macros as well as the respective + ;; user-defined variables could be concatenated. + (goto-char group-start) + (when (< group-start font-lock-beg) + (setq font-lock-beg group-start) + (throw 'extend t)))))))) + +(defvar font-latex-match-simple-exclude-list + '("-" "," "/" "&" "#" "_" "`" "'" "^" "~" "=" "." "\"") + "List of characters directly after \"\\\" excluded from fontification. +Each character is a string.") + +(defvar font-latex-match-simple-include-list '("@") + "List of characters allowed in a macro for fontification. +Each character is a string. This variable is initialized to +\"@\" since internal LaTeX commands are very often redefined in a +.tex file and the fontification should work correctly in those +cases.") +(make-variable-buffer-local 'font-latex-match-simple-include-list) + +(defun font-latex-match-simple-command (limit) + "Search for command like \\foo before LIMIT." + ;; \s_ matches chars with symbol syntax, \sw chars with word syntax, + ;; \s. chars with punctuation syntax. We must exclude matches where + ;; the first character after the \ is a reserved character and + ;; should not be fontified (e.g. \, in foo\,bar or \- in foo\-bar). + ;; These characters are stored in + ;; `font-latex-match-simple-exclude-list'. In docTeX mode, we + ;; remove "_" from this list to get correct fontification for macros + ;; like `\__module_foo:nnn' + (let* ((search (lambda () + (TeX-re-search-forward-unescaped + (concat + ;; Chars directly after backslash + "\\\\\\(\\s_\\|\\sw\\|\\s.\\)" + ;; Start group of the following chars + "\\(?:[" + ;; a-zA-Z are always allowed: + "a-zA-Z" + ;; Additional characters added by AUCTeX styles + (mapconcat #'identity + font-latex-match-simple-include-list + "") + ;; End group + "]\\)*") + limit t))) + (pos (funcall search))) + (while (and pos + (member (match-string 1) + (if (eq major-mode 'doctex-mode) + (remove "_" font-latex-match-simple-exclude-list) + font-latex-match-simple-exclude-list))) + (setq pos (funcall search))) + pos)) + +(defun font-latex-match-math-env (limit) + "Match math pattern up to LIMIT. +Used for patterns like: +\\( F = ma \\) +\\=\\[ F = ma \\] but not \\\\=\\[len]" + (catch 'match + (while (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t) + (unless (save-excursion + (goto-char (match-beginning 0)) + ;; \\[ does not start a math environment + (/= (mod (skip-chars-backward "\\\\") 2) 0)) + (let ((beg (match-beginning 0)) + (open-tag (if (match-beginning 1) "\\(" "\\[")) + (close-tag (if (match-beginning 1) "\\)" "\\]"))) + ;; Search for both opening and closing tags in order to be + ;; able to avoid erroneously matching stuff like "\(foo \(bar\)". + (if (and (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*\\(" + (regexp-quote open-tag) "\\|" + (regexp-quote close-tag) "\\)") + (+ limit font-latex-multiline-boundary) + 'move) + (string= (match-string 1) close-tag)) + ;; Found closing tag. + (let ((p (point))) + (if (< font-latex--updated-region-end limit) + ;; *-extend-region-functions have extended the + ;; limit already. + (setq font-latex--updated-region-end limit)) + ;; If the closing tag is beyond the current end of + ;; region, take care of it. + (when (< font-latex--updated-region-end p) + (font-lock-unfontify-region font-latex--updated-region-end p) + (setq font-latex--updated-region-end p)) + (store-match-data (list beg beg beg p))) + ;; Did not find closing tag. + (goto-char (+ beg 2)) + (store-match-data (list beg (point) (point) (point)))) + (throw 'match t)))))) + +(require 'texmathp) +(defcustom font-latex-math-environments nil + "List of math environment names for font locking. +It is no longer recommended to customize this option. You should +customize `texmathp-tex-commands' instead because it is important +for stable operation of font lock that this option is coherent +with that option in addition to `texmathp-tex-commands-default'. +See info node `(auctex)Fontification of math' to convert your +customization into `texmathp-tex-commands'." + ;; This option is now used only through + ;; `font-latex--match-math-envII-regexp'. + :type '(repeat string) + :group 'font-latex) + +(defvar font-latex--match-math-envII-regexp nil + "Regular expression to match math environments. +Set by `font-latex--update-math-env' and used in +`font-latex-match-math-envII'.") + +(defun font-latex-update-math-env () + "Update regexp to search for math environments. +Extract environments marked as `env-on' in +`texmathp-tex-commands1' except starred variants. Then build +`font-latex--match-math-envII-regexp' from them, appending the +environments in `font-latex-math-environments'." + ;; Make sure `texmathp-tex-commands1' is up to date. + (texmathp-compile) + (let (envs) + (dolist (entry texmathp-tex-commands1) + (if (and (eq 'env-on (cadr entry)) + (not (string= "*" (substring (car entry) -1)))) + (cl-pushnew (car entry) envs :test #'equal))) + (setq font-latex--match-math-envII-regexp + (concat "\\\\begin[ \t]*{" + ;; Take user additions also into account. + (regexp-opt (append font-latex-math-environments envs) t) + ;; Subexpression 2 is used to build the \end{<env>} + ;; construct later. + "\\(\\*?}\\)" + ;; Match an optional and possible mandatory + ;; argument(s) as long as they are on the same line + ;; with no spaces in-between. The content of optional + ;; argument can span multiple lines. + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + "\\(?:{[^}]*}\\)*")))) + +;; Initialize. +(font-latex-update-math-env) + +(defun font-latex-match-math-envII (limit) + "Match math patterns up to LIMIT. +Used for patterns like: +\\begin{equation} + fontified stuff +\\end{equation} or +\\begin{empheq}[X=Y\\Rightarrow]{alignat=3} + fontified stuff +\\end{empheq} +The \\begin{equation} incl. arguments in the same line and +\\end{equation} are not fontified here." + (when (re-search-forward font-latex--match-math-envII-regexp limit t) + (let ((beg (match-end 0)) end + (beg-of-begin (match-beginning 0))) + (if (re-search-forward (concat "\\\\end[ \t]*{" + (regexp-quote + (buffer-substring-no-properties + (match-beginning 1) + (match-end 2)))) + (+ limit font-latex-multiline-boundary) 'move) + (progn + (setq end (match-beginning 0)) + (if (< font-latex--updated-region-end limit) + (setq font-latex--updated-region-end limit)) + (when (< font-latex--updated-region-end end) + (font-lock-unfontify-region font-latex--updated-region-end end) + (setq font-latex--updated-region-end end))) + (goto-char beg) + (setq end beg + beg-of-begin beg)) + ;; Store the position of "\begin{foo}" as (match-beginnig 0) so + ;; that `font-lock-multiline' text property covers it. This keeps + ;; editing inside multi-line optional argument sane. + (store-match-data (list beg-of-begin end beg end)) + t))) + +(defun font-latex-match-dollar-math (limit) + "Match inline math $...$ or display math $$...$$ before LIMIT." + (catch 'match + (let (beg num) + (while (font-latex-find-dollar-math limit) + ;; Found "$" which starts $...$ or $$...$$. + (setq beg (point) + ;; Go inside the math expression. + num (skip-chars-forward "$" limit)) + ;; If those are three or more consecutive $, ignore them and + ;; search again. + (if (< num 3) + (if ;; Let's find the same number of live dollar signs. + (font-latex-find-dollar-math + ;; Hope that limit+font-latex-multiline-boundary + ;; doesn't fall just inside single "$$". + (min (point-max) (+ limit font-latex-multiline-boundary)) + num) + ;; Found. + (progn + (forward-char num) + (let ((p (point))) + (if (< font-latex--updated-region-end limit) + (setq font-latex--updated-region-end limit)) + (when (< font-latex--updated-region-end p) + (font-lock-unfontify-region + font-latex--updated-region-end p) + (setq font-latex--updated-region-end p)) + (set-match-data (list beg p))) + (throw 'match t)) + ;; Not found. + ;; That $ or $$ is probably unclosed in the buffer. + (throw 'match nil))))))) + +(defun font-latex-find-dollar-math (limit &optional num) + "Find dollar sign(s) before LIMIT. +Set point just before the found $. Ignore escaped $ (\"\\$\"). +Optional argument NUM, if non-nil, specifies the number of dollar +signs to follow the point and must be 1 or 2. +LIMIT must not exceed the end of buffer." + (catch 'found + (while (progn + (skip-chars-forward "^$" limit) + (< (point) limit)) + ;; Found "$". + ;; If that "$" is not our target, skip over it and search + ;; again. + (cond + ;; check 1: Are we in a verbatim construct or comment? + ((let ((ppss (syntax-ppss))) + (or (nth 3 ppss) + ;; Ignore $ in comments... + (and (nth 4 ppss) + ;; ... except if we're looking for the end of the + ;; inline math. We need to consider this %$ + ;; comments because they are the workaround for + ;; falsely triggered math mode due to valid, + ;; non-math occurrences of $. (bug#48365) + (not num)))) + (skip-chars-forward "$" limit)) + ;; check 2: Else, is "$" escaped? + ((TeX-escaped-p) + (forward-char 1)) + ;; check 3: Else, is the number of the following "$" wrong? + ;; This check cannot precede check 2 because "$1+2\$$" is + ;; legal. + ((and (eq num 2) (not (eq (char-after (1+ (point))) ?$))) + ;; If double dollars ($$) are followed by $, skip over that $. + ;; We need not care the case that single dollar ($) is + ;; followed by $$ because expressions like "$1+1$$2+2$" and + ;; "$1+2$$$3+3$$" are legal. + (forward-char 1)) + (t + ;; That "$" is live one. + (throw 'found t)))))) + +(defun font-latex-extend-region-backwards-math () + "Extend region backwards for math environmets. +Take into account $...$, $$...$$, \\(...\\) and \\=\\[...\\], too." + ;; Use `texmathp' to identify whether the point is inside math mode. + ;; Only heuristic, but it's very difficult to identify rigorously + ;; without syntactic support. + + ;; Check if `font-lock-beg' is inside math mode. + (goto-char font-lock-beg) + + ;; Workaround bug#41522. Ensure `syntax-table' property is given to + ;; all verbatim-like constructs up to the position before running + ;; `texmathp' in order to prevent wrong fontification of verbatim + ;; face. This is necessary because `texmathp' calls `up-list' inside + ;; narrowing. + (syntax-propertize (point)) + + ;; XXX: Should we make the `texmathp' search honor + ;; `font-latex-multiline-boundary'? + (when (and (texmathp) (< (cdr texmathp-why) font-lock-beg)) + ;; Make its beginning a new start of font lock region. + (setq font-lock-beg (cdr texmathp-why)) + t)) + +(defun font-latex-sp-extend-region-backwards-verb-env (beg end) + "Extend region backwards for verbatim environments." + (let ((envs (and (fboundp 'LaTeX-verbatim-environments) + (LaTeX-verbatim-environments)))) + (when envs + (save-excursion + (goto-char end) + (catch 'extend + (while (re-search-backward + (concat "\\\\end[ \t]*{" (regexp-opt envs t) "\\*?}") beg t) + (when (and (re-search-backward + (concat "\\\\begin[ \t]*{" + (buffer-substring-no-properties + (match-beginning 1) + (match-end 0)) + ;; Match an optional and possible + ;; mandatory argument(s) + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + "\\(?:{[^}]*}\\)*") + (- beg font-latex-multiline-boundary) t) + (< (point) beg)) + (throw 'extend (cons (point) end))))))))) + +(defun font-latex-update-quote-list () + "Update quote list and regexp if value of `font-latex-quotes' changed." + (unless (eq font-latex-quotes-control font-latex-quotes) + (setq font-latex-quotes-control font-latex-quotes) + (font-latex-quotes-set-internal) + ;; Set order of each entry in `font-latex-quote-list' according to + ;; setting of `font-latex-quotes-internal'. + (let ((tail font-latex-quote-list) + elt) + (while tail + (setq elt (car tail)) + (when (and (> (safe-length elt) 2) + (not (eq (nth 2 elt) font-latex-quotes-internal))) + (setcar tail (list (nth 1 elt) (nth 0 elt) + font-latex-quotes-internal))) + (setq tail (cdr tail)))) + (setq font-latex-quote-regexp-beg + (regexp-opt (mapcar #'car font-latex-quote-list) t)))) + +(defun font-latex-match-quotation (limit) + "Match quote patterns up to LIMIT. +Used for patterns like: +``this is a normal quote'' and these are multilingual quoted strings: +\"< french \"> and \"`german\"' quotes. +The quotes << french >> and 8-bit french are used if `font-latex-quotes' is +set to `french', and >>german<< (and 8-bit) are used if set to `german'." + (when font-latex-quotes + (font-latex-update-quote-list) + ;; Search for matches. + (catch 'match + (while (TeX-re-search-forward-unescaped + font-latex-quote-regexp-beg limit t) + (unless (font-latex-faces-present-p '(font-lock-comment-face + font-latex-verbatim-face + font-latex-math-face) + (match-beginning 0)) + (let* ((beg (match-beginning 0)) + (after-beg (match-end 0)) + (opening-quote (match-string-no-properties 0)) + (closing-quote + (nth 1 (assoc opening-quote font-latex-quote-list))) + (nest-count 0) + (point-of-surrender (+ beg font-latex-multiline-boundary))) + ;; Find closing quote taking nested quotes into account. + (while (progn + (re-search-forward + (concat opening-quote "\\|" closing-quote) + point-of-surrender 'move) + (when (and (< (point) point-of-surrender) (not (eobp))) + (if (string= (match-string-no-properties 0) + opening-quote) + (setq nest-count (1+ nest-count)) + (when (/= nest-count 0) + (setq nest-count (1- nest-count))))))) + ;; If no closing quote was found, set the second match which + ;; will be marked with warning color, if one was found, set + ;; the first match which will be marked with string color. + (if (or (= (point) point-of-surrender) (eobp)) + (progn + (goto-char after-beg) + (store-match-data (list after-beg after-beg beg after-beg))) + (let ((p (point))) + (if (< font-latex--updated-region-end limit) + (setq font-latex--updated-region-end limit)) + (when (< font-latex--updated-region-end p) + (font-lock-unfontify-region + font-latex--updated-region-end p) + (setq font-latex--updated-region-end p)) + (store-match-data (list beg p p p)))) + (throw 'match t))))))) + +(defun font-latex-extend-region-backwards-quotation () + "Extend region backwards for quotations." + (when font-latex-quotes + (font-latex-update-quote-list) + (let ((regexp-end (regexp-opt (mapcar #'cadr font-latex-quote-list) t))) + (save-excursion + (goto-char font-lock-end) + (catch 'extend + (while (re-search-backward regexp-end font-lock-beg t) + (let ((found-end (match-beginning 0)) + (closing-quote (match-string-no-properties 0)) + (nest-count 0) + (point-of-surrender (- font-lock-beg + font-latex-multiline-boundary)) + opening-quote) + (catch 'found + (dolist (elt font-latex-quote-list) + (when (string= (cadr elt) closing-quote) + (setq opening-quote (car elt)) + (throw 'found nil)))) + ;; Find opening quote taking nested quotes into account. + (while (if (re-search-backward (concat opening-quote "\\|" + closing-quote) + point-of-surrender 'move) + ;; Found quotes before point-of-surrender. + (cond ((string= (match-string-no-properties 0) + closing-quote) + ;; Encountered another closing quote. + ;; Increase nest-count and continue + ;; the inner loop. + (setq nest-count (1+ nest-count))) + ;; Found an opening quote. + ((/= nest-count 0) + ;; If in nest, decrease nest-count + ;; and continue the inner loop. + (setq nest-count (1- nest-count))) + ;; Else we arrived at the opening quote + ;; matching with the closing quote found + ;; in the outer loop. + ((< (point) font-lock-beg) + ;; If that opening quote locates + ;; before `font-lock-beg', break the + ;; outer loop and extend the region. + (setq font-lock-beg (point)) + (throw 'extend t)) + (t + ;; Else terminate the inner loop and + ;; continue the outer loop. + nil)) + ;; Didn't find quotes before + ;; point-of-surrender. + ;; Go back just before the closing quote, + ;; terminate the inner loop and + ;; continue the outer loop. + (goto-char found-end) + nil))))))))) + +(defun font-latex-match-script (limit) + "Match subscript and superscript patterns up to LIMIT." + (when (and font-latex-fontify-script + (re-search-forward "[_^] *\\([^\n\\{}]\\|\ +\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t)) + (if (and (not (memq font-latex-fontify-script '(multi-level invisible))) + (font-latex-faces-present-p '(font-latex-subscript-face + font-latex-superscript-face))) + ;; Apply subscript and superscript highlighting only once (in case + ;; font-latex-fontify-script is not 'multi-level) in order to prevent + ;; the font size becoming too small. We set an empty match to do that. + (let ((point (point))) + (store-match-data (list point point point point))) + (when (match-end 3) + (let ((beg (match-beginning 3)) + (end (TeX-find-closing-brace + ;; Don't match groups spanning more than one line + ;; in order to avoid visually wrong indentation in + ;; subsequent lines. + nil (line-end-position)))) + (store-match-data (if end + (list (match-beginning 0) end beg end) + (list beg beg beg beg)))))) + t)) + +(defun font-latex-match-script-chars (limit) + "Match subscript and superscript chars up to LIMIT." + (catch 'found + (while (re-search-forward "[^_^]\\([_^]\\)" limit t) + (let ((pos (match-beginning 1))) + (when (and (font-latex-faces-present-p 'font-latex-math-face pos) + (not (font-latex-faces-present-p '(font-lock-constant-face + font-lock-builtin-face + font-lock-comment-face + font-latex-verbatim-face) pos)) + ;; Check for backslash quoting + (not (let ((odd nil) + (pos pos)) + (while (eq (char-before pos) ?\\) + (setq pos (1- pos) odd (not odd))) + odd))) + (throw 'found t)))))) + +(defun font-latex--get-script-props (pos script-type) + (let* ((old-raise (or (plist-get (get-text-property pos 'display) 'raise) 0.0)) + (new-level (1+ (or (get-text-property pos 'script-level) 0))) + (disp-props (copy-sequence (cl-case script-type + (:super (cdr font-latex-script-display)) + (:sub (car font-latex-script-display))))) + (new-disp-props (let ((raise (plist-get disp-props 'raise)) + (nl new-level)) + (if raise + ;; This polynom approximates that the factor + ;; which is multiplied with raise is 1 for nl=1, + ;; 0.8 for nl=2, 0.64 for nl=3, etc. (so always + ;; about 80% of the previous value). + (plist-put disp-props 'raise + (+ old-raise + (* raise + (+ 1.1965254857142873 + (* nl -0.21841226666666758) + (* nl nl 0.012018514285714385))))) + disp-props)))) + `(face ,(if (<= new-level font-latex-fontify-script-max-level) + (cl-case script-type + (:super 'font-latex-superscript-face) + (:sub 'font-latex-subscript-face)) + nil) + script-level ,new-level + display ,new-disp-props))) + +;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in +;; GNU Emacs on 2004-07-07. +(defun font-latex-script (pos) + "Return face and display spec for subscript and superscript content." + (when (and (font-latex-faces-present-p 'font-latex-math-face pos) + (not (font-latex-faces-present-p '(font-lock-constant-face + font-lock-builtin-face + font-lock-comment-face + font-latex-verbatim-face) pos)) + ;; Check for backslash quoting + (not (let ((odd nil) + (pos pos)) + (while (eq (char-before pos) ?\\) + (setq pos (1- pos) odd (not odd))) + odd))) + (if (eq (char-after pos) ?_) + (font-latex--get-script-props pos :sub) + (font-latex--get-script-props pos :super)))) + +(defun font-latex-script-char (_pos) + "Return face and display spec for subscript and superscript character at POS." + `(face font-latex-script-char-face + ,@(when (eq font-latex-fontify-script 'invisible) + '(invisible t)))) + +;;; docTeX + +(defvar font-latex-doctex-preprocessor-face + 'font-latex-doctex-preprocessor-face + "Face used to highlight preprocessor directives in docTeX mode.") + +(defface font-latex-doctex-preprocessor-face + '((t (:inherit (font-latex-doctex-documentation-face + font-lock-builtin-face ; Emacs 21 does not provide + ; the preprocessor face. + font-lock-preprocessor-face)))) + "Face used to highlight preprocessor directives in docTeX mode." + :group 'font-latex-highlighting-faces) + +(defvar font-latex-doctex-documentation-face + 'font-latex-doctex-documentation-face + "Face used to highlight the documentation in docTeX mode.") + +(defface font-latex-doctex-documentation-face + '((((class mono)) (:inverse-video t)) + (((class grayscale) (background dark)) (:background "#333")) + (((class color) (background dark)) (:background "#333")) + (t (:background "#eeeeee"))) + "Face used to highlight the documentation parts in docTeX mode." + :group 'font-latex-highlighting-faces) + +(defvar font-latex-doctex-keywords + (append '((font-latex-doctex-match-^^A 0 font-lock-comment-face t)) + font-latex-keywords-2 + '(("^%<[^>]*>" (0 font-latex-doctex-preprocessor-face t))))) + +(defun font-latex-doctex-match-^^A (limit) + "In docTeX mode, match comment started by ^^A and ^^X before LIMIT." + (catch 'found + (while (TeX-re-search-forward-unescaped "\\^\\^[AX]" limit t) + (when (eq (char-after (line-beginning-position)) ?\%) + (forward-line 1) + ;; Adjust `font-latex--updated-region-end' if necessary. + (let ((p (point))) + (if (< font-latex--updated-region-end limit) + (setq font-latex--updated-region-end limit)) + (when (< font-latex--updated-region-end p) + (font-lock-unfontify-region + font-latex--updated-region-end p) + (setq font-latex--updated-region-end p)) + ;; We assume that the above adjustment preserves match data. + (set-match-data (list (match-beginning 0) p))) + (throw 'found t))))) + +;; Copy and adaptation of `doctex-font-lock-syntactic-face-function' +;; in `tex-mode.el' of CVS Emacs (March 2004) +(defun font-latex-doctex-syntactic-face-function (state) + ;; Mark docTeX documentation, which is parsed as a style A comment + ;; starting in column 0. + (if (or (nth 3 state) (nth 7 state) + (not (memq (char-before (nth 8 state)) + '(?\n nil)))) + ;; Anything else is just as for LaTeX. + (font-latex-syntactic-face-function state) + font-latex-doctex-documentation-face)) + + +;;; Installation in non-AUCTeX LaTeX mode + +;; Here used to be some code which tried to magically make things work and +;; thereby broke other stuff. If you want to use font-latex with stock +;; latex-mode, then please just add `font-latex-setup' to `latex-mode-hook' +;; yourself. + +;;; Byte-compilation of generated functions +;; Not needed now that we generate the code via a macro. +;; (when (byte-code-function-p +;; (symbol-function 'font-latex-make-built-in-keywords)) +;; (dolist (elt font-latex-built-in-keyword-classes) +;; (let ((name (nth 0 elt))) +;; (byte-compile (intern (concat "font-latex-match-" name))) +;; (byte-compile (intern (concat "font-latex-match-" name "-make")))))) + + +;; Provide ourselves: +(provide 'font-latex) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; font-latex.el ends here diff --git a/elpa/auctex-13.1.3/font-latex.elc b/elpa/auctex-13.1.3/font-latex.elc Binary files differnew file mode 100644 index 0000000..1609e52 --- /dev/null +++ b/elpa/auctex-13.1.3/font-latex.elc diff --git a/elpa/auctex-13.1.3/images/amstex.xpm b/elpa/auctex-13.1.3/images/amstex.xpm new file mode 100644 index 0000000..dbb3cc0 --- /dev/null +++ b/elpa/auctex-13.1.3/images/amstex.xpm @@ -0,0 +1,207 @@ +/* XPM */ +static char * amstex_xpm[] = { +"24 24 180 2", +" c None s backgroundToolBarColor", +". c #3E9543", +"+ c #409644", +"@ c #3D9D45", +"# c #3F9B42", +"$ c #4C2A1F", +"% c #4E3124", +"& c #727E51", +"* c #598A4E", +"= c #5B6647", +"- c #88624F", +"; c #89383B", +"> c #8B343B", +", c #6D5852", +"' c #506D48", +") c #4C843E", +"! c #648752", +"~ c #B8A789", +"{ c #80624D", +"] c #7D6951", +"^ c #FFFFC1", +"/ c #94A676", +"( c #8F8668", +"_ c #977567", +": c #A86660", +"< c #986C6A", +"[ c #758660", +"} c #708C60", +"| c #6A6C4E", +"1 c #C3C599", +"2 c #988167", +"3 c #5A3125", +"4 c #561E1C", +"5 c #958066", +"6 c #BEA384", +"7 c #68372B", +"8 c #672124", +"9 c #5B392F", +"0 c #94917B", +"a c #AFAC91", +"b c #B8B39C", +"c c #BDBCA0", +"d c #B39073", +"e c #582522", +"f c #712E2B", +"g c #6F292C", +"h c #83826F", +"i c #908F88", +"j c #F8FFFD", +"k c #686C8D", +"l c #D7DBB8", +"m c #716D76", +"n c #7B7B92", +"o c #D5D5B3", +"p c #DBBD9A", +"q c #81463B", +"r c #691A19", +"s c #838270", +"t c #888791", +"u c #6462D0", +"v c #2C2B87", +"w c #DAD9C7", +"x c #868394", +"y c #716DDC", +"z c #2F2C94", +"A c #C7C6B7", +"B c #D2AF8D", +"C c #84473C", +"D c #6D1E1F", +"E c #6E262C", +"F c #BDBDAB", +"G c #878593", +"H c #909095", +"I c #C0BEAF", +"J c #A09EAD", +"K c #A6A5A9", +"L c #C19978", +"M c #7C3D33", +"N c #641C1F", +"O c #662633", +"P c #DBDCB8", +"Q c #B4B492", +"R c #E5D9AA", +"S c #9F755A", +"T c #50231F", +"U c #672424", +"V c #8E3B4B", +"W c #E4E3BC", +"X c #A5A28D", +"Y c #D2D1B5", +"Z c #E7E5C1", +"` c #E3DFC0", +" . c #E4CCA2", +".. c #894E3A", +"+. c #461715", +"@. c #632524", +"#. c #95404E", +"$. c #777776", +"%. c #C0B396", +"&. c #AAAB90", +"*. c #463F31", +"=. c #665E46", +"-. c #7C7968", +";. c #B3AF92", +">. c #D4BD97", +",. c #804B37", +"'. c #461F19", +"). c #42201F", +"!. c #5A4F43", +"~. c #504334", +"{. c #979183", +"]. c #DCD8B5", +"^. c #D0BC9D", +"/. c #C8A487", +"(. c #82493F", +"_. c #3F1310", +":. c #401613", +"<. c #664B46", +"[. c #DCD9BC", +"}. c #B8B59D", +"|. c #8C8977", +"1. c #E9E7C0", +"2. c #A2897B", +"3. c #AE8872", +"4. c #CFB89A", +"5. c #A6715F", +"6. c #4B1D19", +"7. c #68272E", +"8. c #6E2933", +"9. c #453E37", +"0. c #767361", +"a. c #7F8170", +"b. c #7B7B6C", +"c. c #8E897E", +"d. c #827F6E", +"e. c #83876F", +"f. c #847E70", +"g. c #9C7964", +"h. c #662F2A", +"i. c #5D2D2E", +"j. c #783C3F", +"k. c #87826E", +"l. c #B3B99A", +"m. c #D1D1AB", +"n. c #DFDDB9", +"o. c #C3B191", +"p. c #826453", +"q. c #6D2B2A", +"r. c #884144", +"s. c #772B2F", +"t. c #702F34", +"u. c #AEA28C", +"v. c #C1C3A2", +"w. c #AEA07E", +"x. c #C8C09F", +"y. c #C4C6A3", +"z. c #B6886B", +"A. c #774237", +"B. c #7E3E3D", +"C. c #854748", +"D. c #78373B", +"E. c #6A2932", +"F. c #5F343C", +"G. c #7C474A", +"H. c #815655", +"I. c #7F534F", +"J. c #8A5C54", +"K. c #74504B", +"L. c #8C615F", +"M. c #7E2C29", +"N. c #8C4240", +"O. c #7C322F", +"P. c #703634", +"Q. c #6D1B27", +"R. c #975F59", +"S. c #631D22", +"T. c #65101D", +"U. c #000000", +"V. c #868686", +"W. c #AFAEAE", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 4 ", +" 5 ^ ^ ^ ^ ^ ^ ^ ^ ^ 6 7 8 ", +" 9 ^ 0 a ^ b 0 c ^ ^ d e f g ", +" h i j k l m j n o ^ p q r ", +" s t u v w x y z A ^ B C D E ", +" ] F G H ^ I J K ^ ^ L M N O ", +" ] ^ P Q ^ ^ ^ ^ ^ ^ R S T U V ", +" ] ^ W X Y Z ` ^ ^ ^ ^ ...+.@.#. ", +" $.$.%.%.&.*.=.-.;.%.%.%.^ >.,.'.). ", +" %.%.^ ^ !.~.{.].^ ^ ^ ^./.(._.:. ", +" $.$.<.[.^ }.|.1.^ 2.3.4.^ 5.6.7.8. ", +" 9.0.a.b.c.d.e.f.^ ^ g.h.i.j. ", +" k.^ l.^ ^ m.n.^ o.p.q.r.s.t. ", +" u.v.%.w.x.y.z.A.B.C.D.E.F. ", +" G.H.I.J.K.L.M.N.O.P. ", +" Q.R. S. T. ", +" ", +" U.U. V.U.U.W. ", +" U. U. U.U.V.U.V. U. ", +" U. U. U. U. U. V.U.U.V. ", +" U.U.U.U. U. U. U. U. ", +" U.V. U. U. U. U. U.U.U.V. "}; diff --git a/elpa/auctex-13.1.3/images/bibtex.xpm b/elpa/auctex-13.1.3/images/bibtex.xpm new file mode 100644 index 0000000..7400f09 --- /dev/null +++ b/elpa/auctex-13.1.3/images/bibtex.xpm @@ -0,0 +1,82 @@ +/* XPM */ +static char * bibtex14_xpm[] = { +"24 24 55 1", +" c None s backgroundToolBarColor", +". c #353535", +"+ c #877D55", +"@ c #B9AD74", +"# c #606060", +"$ c #878585", +"% c #A89C6A", +"& c #726A49", +"* c #070705", +"= c #9A9A9A", +"- c #59533A", +"; c #938960", +"> c #C9C7BF", +", c #7C7C7C", +"' c #3D3928", +") c #AFA379", +"! c #AFAEA8", +"~ c #938A63", +"{ c #3F3B2A", +"] c #8E865E", +"^ c #B6AA72", +"/ c #424242", +"( c #373737", +"_ c #4E4C41", +": c #565344", +"< c #746D4E", +"[ c #7E7652", +"} c #8E845A", +"| c #B0A46E", +"1 c #775E5E", +"2 c #F5F4F3", +"3 c #D7D5D0", +"4 c #BCB8AC", +"5 c #A39F94", +"6 c #817E71", +"7 c #605D4F", +"8 c #8A8058", +"9 c #92885C", +"0 c #826A6A", +"a c #CACACA", +"b c #FFFFFF", +"c c #E6E6E5", +"d c #D0D0D0", +"e c #CCCCCC", +"f c #C4C2B8", +"g c #B5B2A5", +"h c #918F84", +"i c #59564C", +"j c #F6F6F6", +"k c #F3F2F0", +"l c #AEAEAE", +"m c #727272", +"n c #909090", +"o c #DCDCDC", +"p c #A3A3A3", +" ", +" ", +" .............. ", +" .+@@@@@@@@@@@+# ", +" $.@@@@@@@@@@@+. ", +" .%&*@@@@@@@@@.= ", +" .+@--@@*@-;@@+.> ", +" $.@-*@@@@;*@@@.=>, ", +" .%@*@*@*@'*@@+.>>..", +" .+@*;--&&&*)*@.=>!, ", +" $.@@@*-@*@*~~*@.>>,= ", +" .%@@@@@@@@@{{@.=>!. ", +" .+@@@@@@@@@@@@+.>>,= ", +" $.]^@@@@@@@@@@@.=>!. ", +" /(_:<[}|@@@@@@+.>>,= ", +" /12234567:<[89.>>!. ", +" /0abbb2cdefghi>>>,= ", +" $#$ajbbbbbkcc>>!. ", +" l=mnajbbbbbo>,= ", +" l=mnajbbc>. ", +" l=mnac,= ", +" l=m. ", +" p ", +" "}; diff --git a/elpa/auctex-13.1.3/images/dropdown.xpm b/elpa/auctex-13.1.3/images/dropdown.xpm new file mode 100644 index 0000000..adf0e61 --- /dev/null +++ b/elpa/auctex-13.1.3/images/dropdown.xpm @@ -0,0 +1,30 @@ +/* XPM */ +static char * dropdown_xpm[] = { +"10 24 3 1", +" c None s backgroundToolBarColor", +". c #292C29", +"+ c #B3B3B3", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . . ", +" ... ... ", +" ...... ", +" .... ", +" .. ", +" ++ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/dvipdf.xpm b/elpa/auctex-13.1.3/images/dvipdf.xpm new file mode 100644 index 0000000..1b2a761 --- /dev/null +++ b/elpa/auctex-13.1.3/images/dvipdf.xpm @@ -0,0 +1,65 @@ +/* XPM */ +static char * dvipdf4_xpm[] = { +"24 24 38 1", +" c None s backgroundToolBarColor", +". c #4C4C4C", +"+ c #000000", +"@ c #7C7C7C", +"# c #577A4D", +"$ c #4C6B43", +"% c #37452B", +"& c #76996C", +"* c #9BB594", +"= c #648C58", +"- c #DAE3D6", +"; c #445636", +"> c #67865E", +", c #A7BDA0", +"' c #8EAB86", +") c #526741", +"! c #425D3A", +"~ c #4C603C", +"{ c #566B43", +"] c #5A7046", +"^ c #295E29", +"/ c #5ABD5A", +"( c #D37F71", +"_ c #CE918A", +": c #D4897A", +"< c #67102D", +"[ c #488148", +"} c #C47474", +"| c #D69788", +"1 c #4CA14C", +"2 c #4D904D", +"3 c #CB8984", +"4 c #D79C8D", +"5 c #C8807D", +"6 c #4FA64F", +"7 c #5A5A5A", +"8 c #B50000", +"9 c #AA7979", +" .+. ++++ ", +" @+##$+@ +++%++ ", +" +&**&=+ + +%+ ", +" .#*-*&=$. +;+ ", +" +>,*'==$+ +)+ ", +" .#&&==#!. ++))~++ ", +" +#==#$+ +{]{+ ", +" @+!$!+@ +)+ ", +" .+. + ", +" ", +" + ", +"^^^/ ^ ^ ^ +(+ ", +"^ ^ ^ ^ ^ +_:<+ ", +"^ ^ [ [ ^ +}_|<<+ ", +"^ ^ 1221 ^ +}3_4<<<+ ", +"^ ^ [[ ^ +}53_4<<<<+", +"^^^/ 66 ^ +}53_|<<<+ ", +" 7+}5:<<+ ", +" 7+(<+ ", +"8889 8889 8889 ++ ", +"8 8 8 8 8 ", +"8889 8 8 889 ", +"8 8 8 8 ", +"8 8889 8 "}; diff --git a/elpa/auctex-13.1.3/images/dvips.xpm b/elpa/auctex-13.1.3/images/dvips.xpm new file mode 100644 index 0000000..7d58e2d --- /dev/null +++ b/elpa/auctex-13.1.3/images/dvips.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * dvips66_xpm[] = { +"24 24 62 1", +" c None s backgroundToolBarColor", +". c #4C4C4C", +"+ c #000000", +"@ c #7C7C7C", +"# c #577A4D", +"$ c #4C6B43", +"% c #37452B", +"& c #76996C", +"* c #9BB594", +"= c #648C58", +"- c #DAE3D6", +"; c #445636", +"> c #67865E", +", c #A7BDA0", +"' c #8EAB86", +") c #526741", +"! c #425D3A", +"~ c #4C603C", +"{ c #566B43", +"] c #5A7046", +"^ c #869CB4", +"/ c #00244C", +"( c #002248", +"_ c #0050A9", +": c #006FEB", +"< c #0066D9", +"[ c #00336D", +"} c #295E29", +"| c #5ABD5A", +"1 c #001070", +"2 c #004BA2", +"3 c #0078FF", +"4 c #0075FC", +"5 c #004DB6", +"6 c #00072F", +"7 c #0047FF", +"8 c #006DFF", +"9 c #0042CA", +"0 c #00169E", +"a c #000A45", +"b c #488148", +"c c #0024FF", +"d c #0027FF", +"e c #0056ED", +"f c #001FA7", +"g c #00179F", +"h c #4CA14C", +"i c #4D904D", +"j c #001DCE", +"k c #4FA64F", +"l c #000B4C", +"m c #0023F5", +"n c #001492", +"o c #000E65", +"p c #00010B", +"q c #001AB9", +"r c #0022F0", +"s c #001387", +"t c #000942", +"u c #0037C4", +"v c #6C84B7", +"w c #000C57", +" .+. ++++ ", +" @+##$+@ +++%++ ", +" +&**&=+ + +%+ ", +" .#*-*&=$. +;+ ", +" +>,*'==$+ +)+ ", +" .#&&==#!. ++))~++ ", +" +#==#$+ +{]{+ ", +" @+!$!+@ +)+ ", +" .+. + ", +" ", +" ^/ ", +" ^(_:<[ ", +"}}}| } } } 12:333456", +"} } } } } 17833390a", +"} } b b } 1cd7efg0a", +"} } hiih } 1cccj000a", +"} } bb } 1cccj000a", +"}}}| kk } lmccj0nop", +" lqrjst ", +" uuuv vuuv 1w ", +" u u u ", +" uuuv vuuv ", +" u u ", +" u vuuv "}; diff --git a/elpa/auctex-13.1.3/images/error.xpm b/elpa/auctex-13.1.3/images/error.xpm new file mode 100644 index 0000000..6dab4fa --- /dev/null +++ b/elpa/auctex-13.1.3/images/error.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static char * error22_xpm[] = { +"24 24 8 1", +" c None s backgroundToolBarColor", +". c #847000", +"+ c #000000", +"@ c #F0C900", +"# c #AB9100", +"$ c #887821", +"% c #AA9629", +"& c #51470D", +" ", +" ", +" .++. ", +" +@@@@+ ", +" #.@@@@.# ", +" +@@@@@@+ ", +" #.@@@@@@.# ", +" +@@@++@@@+ ", +" #.@@@++@@@.# ", +" +@@@@++@@@@+ ", +" #.@@@@++@@@@.# ", +" +@@@@@++@@@@@+ ", +" #.@@@@@++@@@@@.# ", +" +@@@@@@$$@@@@@@+ ", +" #.@@@@@@%%@@@@@@.# ", +" +@@@@@@@@@@@@@@@@+ ", +" .#@@@@@@@++@@@@@@@#. ", +" &@@@@@@@@++@@@@@@@@& ", +" &@@@@@@@@@@@@@@@@@@& ", +" +@@@@@@@@@@@@@@@@+ ", +" .++++++++++++++. ", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/exec.xpm b/elpa/auctex-13.1.3/images/exec.xpm new file mode 100644 index 0000000..9ad3ade --- /dev/null +++ b/elpa/auctex-13.1.3/images/exec.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char * exec6_xpm[] = { +"24 24 41 1", +" c None s backgroundToolBarColor", +". c #9F9D96", +"+ c #3A3A3A", +"@ c #B3B3B1", +"# c #000000", +"$ c #807D74", +"% c #3C3C3C", +"& c #76746B", +"* c #5D5C55", +"= c #6D6B63", +"- c #65635C", +"; c #8C8B89", +"> c #E4E3E1", +", c #E2E2E2", +"' c #484641", +") c #888781", +"! c #B0AFAD", +"~ c #A8A7A1", +"{ c #908E86", +"] c #97958E", +"^ c #595854", +"/ c #605E57", +"( c #898883", +"_ c #464542", +": c #4A4947", +"< c #43423E", +"[ c #E2E2E1", +"} c #B6B5AF", +"| c #494847", +"1 c #434242", +"2 c #464644", +"3 c #E6E6E4", +"4 c #484846", +"5 c #DFDEDC", +"6 c #B0AFA9", +"7 c #D5D4D1", +"8 c #93918B", +"9 c #D6D5D2", +"0 c #ABA9A3", +"a c #494943", +"b c #464540", +" ", +" . ++ @ ", +" #@#..#.# ", +" .@...$$$%. ", +" #..&$*=# ", +" +..&##@--+ ", +" +.$$#;@-%+ ", +" #$*@@$%# ", +" @.$=--%%%. ", +" #%#-%#%# ", +" . ++ . %%% ", +" %% %>% %% ", +" %,@%'.'%)%% ", +" %!~...{]$'% ", +" %..^/($&% ", +" %%'./_:<.='%% ", +" %[}.^|123$-/% ", +" %%'.(<4;5-'%% ", +" %6$}378-%% ", +" %90.$$&&*'% ", +" %%^%'&'%a%% ", +" %% %b%*%% ", +" %%% ", +" "}; diff --git a/elpa/auctex-13.1.3/images/execbibtex.xpm b/elpa/auctex-13.1.3/images/execbibtex.xpm new file mode 100644 index 0000000..27bca49 --- /dev/null +++ b/elpa/auctex-13.1.3/images/execbibtex.xpm @@ -0,0 +1,127 @@ +/* XPM */ +static char * execbibtex8_xpm[] = { +"24 24 100 2", +" c None s backgroundToolBarColor", +". c #1F1D12", +"+ c #222017", +"@ c #211F15", +"# c #211F14", +"$ c #0C0B07", +"% c #5E5737", +"& c #B7AB72", +"* c #BFB480", +"= c #BAAF77", +"- c #B9AD74", +"; c #9A9061", +"> c #545144", +", c #AFA98C", +"' c #776F4F", +") c #C0B684", +"! c #625C3D", +"~ c #767675", +"{ c #A79D6F", +"] c #BEB37E", +"^ c #93895C", +"/ c #59574E", +"( c #A3A3A2", +"_ c #807A59", +": c #BCB17E", +"< c #B9AE75", +"[ c #B8AC73", +"} c #7E7650", +"| c #5B5B5B", +"1 c #ACACAA", +"2 c #202120", +"3 c #60593A", +"4 c #BAAE76", +"5 c #A39966", +"6 c #363635", +"7 c #B4B4B3", +"8 c #82857F", +"9 c #171816", +"0 c #8A825C", +"a c #B9AD75", +"b c #6D6748", +"c c #6A6A6A", +"d c #A9AAA6", +"e c #363735", +"f c #95948C", +"g c #A39C82", +"h c #7A7356", +"i c #BBB079", +"j c #BBAF78", +"k c #20201C", +"l c #B3B3B2", +"m c #767774", +"n c #20211F", +"o c #1A1112", +"p c #5D413D", +"q c #555540", +"r c #7C7A58", +"s c #4D4830", +"t c #8B8A89", +"u c #ADADAB", +"v c #4F514E", +"w c #1E1616", +"x c #BA9797", +"y c #DCD6D3", +"z c #CDCDCA", +"A c #575651", +"B c #1B1A19", +"C c #ABABA9", +"D c #777775", +"E c #080808", +"F c #1B1212", +"G c #846666", +"H c #A5A09E", +"I c #D4D2C6", +"J c #E7E6DF", +"K c #F1F0EC", +"L c #A9AAA8", +"M c #4F514D", +"N c #585442", +"O c #6D6D66", +"P c #DEDBCA", +"Q c #EAE9E4", +"R c #BEC0B9", +"S c #878A84", +"T c #000000", +"U c #47453A", +"V c #50504D", +"W c #999474", +"X c #363731", +"Y c #020201", +"Z c #3A3A3A", +"` c #65635C", +" . c #9F9D96", +".. c #807D74", +"+. c #3C3C3C", +"@. c #76746B", +"#. c #5D5C55", +"$. c #6D6B63", +"%. c #B3B3B1", +"&. c #8C8B89", +" ", +" . + @ # # # # $ ", +" % & * = - - - ; > ", +" , ' ) = - - - - ! ~ ", +" % { ] - - - - ^ / ( ", +" , _ : < - - - [ } | 1 2 ", +" 3 ] 4 - - - - 5 6 7 8 9 ", +" % 0 ] a - - - - b c d e f ", +" g h i j - - - - - k l m n ", +" o p q r ; 5 - - s t u v f ", +" w x y z u ~ A q B C D E ", +" F G H I J K K K z L M f ", +" v M N O f P Q R S T ", +" ( D U V W X f ", +" ( v Y Z Z ", +" T ` T . .T ` T ", +" ` . . .......+. ", +" T . .@...#.$.T ", +" Z . .@.T T %.` ` Z ", +" Z .....T &.%.` +.Z ", +" T ..#.%.%...+.T ", +" ` ..$.` ` +.+.+. ", +" T +.T ` +.T +.T ", +" Z Z "}; diff --git a/elpa/auctex-13.1.3/images/execdvips.xpm b/elpa/auctex-13.1.3/images/execdvips.xpm new file mode 100644 index 0000000..5166e83 --- /dev/null +++ b/elpa/auctex-13.1.3/images/execdvips.xpm @@ -0,0 +1,52 @@ +/* XPM */ +static char * execdvips36_xpm[] = { +"24 24 25 1", +" c None s backgroundToolBarColor", +". c #295E29", +"+ c #5ABD5A", +"@ c #488148", +"# c #818181", +"$ c #4CA14C", +"% c #4D904D", +"& c #ADADAD", +"* c #4FA64F", +"= c #6E6E6E", +"- c #545454", +"; c #999999", +"> c #3A3A3A", +", c #000000", +"' c #65635C", +") c #9F9D96", +"! c #0037C4", +"~ c #6C84B7", +"{ c #807D74", +"] c #3C3C3C", +"^ c #76746B", +"/ c #5D5C55", +"( c #6D6B63", +"_ c #B3B3B1", +": c #8C8B89", +" ", +" ...+ . . . ", +" . . . . . ", +" . . . . . ", +" . . @ @ . ", +" # . . $%%$ . ", +" #& . . @@ . ", +" #& ...+ ** . ", +" = ", +" - ", +" # ", +" - ; ", +" ;- ", +" ;-- ", +" >> ", +" ,',)),', ", +" !!!~ ~!!~ '))){{{] ", +" ! ! ! ! ,))^{/(, ", +" ! ! ! >))^,,_''>", +" !!!~ ~!!~ >){{,:_']>", +" ! ! ,{/__{], ", +" ! ! ! '{('']]] ", +" ! ~!!~ ,],'],], ", +" >> "}; diff --git a/elpa/auctex-13.1.3/images/execerror.xpm b/elpa/auctex-13.1.3/images/execerror.xpm new file mode 100644 index 0000000..6a77ea3 --- /dev/null +++ b/elpa/auctex-13.1.3/images/execerror.xpm @@ -0,0 +1,49 @@ +/* XPM */ +static char * execerror12_xpm[] = { +"24 24 22 1", +" c None s backgroundToolBarColor", +". c #B09400", +"+ c #605000", +"@ c #9C8400", +"# c #FFD906", +"$ c #FED90A", +"% c #957F0D", +"& c #DEBD0E", +"* c #6F5D00", +"= c #8F7900", +"- c #655500", +"; c #3A3A3A", +"> c #000000", +", c #65635C", +"' c #9F9D96", +") c #807D74", +"! c #3C3C3C", +"~ c #76746B", +"{ c #5D5C55", +"] c #6D6B63", +"^ c #B3B3B1", +"/ c #8C8B89", +" ", +" ", +" .++. ", +" @##@. ", +" +$###+ ", +" ..#++#.. ", +" +$#++#$+ ", +" ..##++##.. ", +" +$##%%##$+ ", +" ..###&&###.. ", +" +####**###$+ ", +" +##########+ ", +" =--------= ", +" ", +" ;; ", +" >,>''>,> ", +" ,''')))! ", +" >''~){]> ", +" ;''~>>^,,;", +" ;'))>/^,!;", +" >){^^)!> ", +" ,)],,!!! ", +" >!>,!>!> ", +" ;; "}; diff --git a/elpa/auctex-13.1.3/images/execpdftex.xpm b/elpa/auctex-13.1.3/images/execpdftex.xpm new file mode 100644 index 0000000..c5ef5b5 --- /dev/null +++ b/elpa/auctex-13.1.3/images/execpdftex.xpm @@ -0,0 +1,205 @@ +/* XPM */ +static char * execpdftex11_xpm[] = { +"24 24 178 2", +" c None s backgroundToolBarColor", +". c #3E9543", +"+ c #409644", +"@ c #3D9D45", +"# c #3F9B42", +"$ c #4C2A1F", +"% c #4E3124", +"& c #727E51", +"* c #598A4E", +"= c #5B6647", +"- c #88624F", +"; c #89383B", +"> c #8B343B", +", c #6D5852", +"' c #506D48", +") c #4C843E", +"! c #648752", +"~ c #B8A789", +"{ c #80624D", +"] c #7D6951", +"^ c #FFFFC1", +"/ c #94A676", +"( c #8F8668", +"_ c #977567", +": c #A86660", +"< c #986C6A", +"[ c #758660", +"} c #708C60", +"| c #6A6C4E", +"1 c #C3C599", +"2 c #988167", +"3 c #5A3125", +"4 c #958066", +"5 c #BEA384", +"6 c #68372B", +"7 c #672124", +"8 c #5B392F", +"9 c #94917B", +"0 c #AFAC91", +"a c #B8B39C", +"b c #BDBCA0", +"c c #B39073", +"d c #582522", +"e c #712E2B", +"f c #83826F", +"g c #908F88", +"h c #F8FFFD", +"i c #686C8D", +"j c #D7DBB8", +"k c #716D76", +"l c #7B7B92", +"m c #D5D5B3", +"n c #DBBD9A", +"o c #81463B", +"p c #691A19", +"q c #838270", +"r c #888791", +"s c #6462D0", +"t c #2C2B87", +"u c #DAD9C7", +"v c #868394", +"w c #716DDC", +"x c #2F2C94", +"y c #C7C6B7", +"z c #D2AF8D", +"A c #84473C", +"B c #6D1E1F", +"C c #975F59", +"D c #BDBDAB", +"E c #878593", +"F c #909095", +"G c #C0BEAF", +"H c #A09EAD", +"I c #A6A5A9", +"J c #C19978", +"K c #7C3D33", +"L c #641C1F", +"M c #DBDCB8", +"N c #B4B492", +"O c #E5D9AA", +"P c #9F755A", +"Q c #50231F", +"R c #672424", +"S c #E4E3BC", +"T c #A5A28D", +"U c #D2D1B5", +"V c #E7E5C1", +"W c #E3DFC0", +"X c #E4CCA2", +"Y c #894E3A", +"Z c #461715", +"` c #632524", +" . c #665E46", +".. c #C0B396", +"+. c #AAAB90", +"@. c #463F31", +"#. c #7C7968", +"$. c #B3AF92", +"%. c #D4BD97", +"&. c #804B37", +"*. c #461F19", +"=. c #42201F", +"-. c #5A4F43", +";. c #504334", +">. c #979183", +",. c #DCD8B5", +"'. c #D0BC9D", +"). c #C8A487", +"!. c #82493F", +"~. c #3F1310", +"{. c #401613", +"]. c #664B46", +"^. c #DCD9BC", +"/. c #B8B59D", +"(. c #8C8977", +"_. c #E9E7C0", +":. c #A2897B", +"<. c #AE8872", +"[. c #CFB89A", +"}. c #A6715F", +"|. c #4B1D19", +"1. c #68272E", +"2. c #767361", +"3. c #7F8170", +"4. c #7B7B6C", +"5. c #8E897E", +"6. c #827F6E", +"7. c #83876F", +"8. c #847E70", +"9. c #9C7964", +"0. c #662F2A", +"a. c #5D2D2E", +"b. c #783C3F", +"c. c #87826E", +"d. c #B3B99A", +"e. c #D1D1AB", +"f. c #DFDDB9", +"g. c #C3B191", +"h. c #826453", +"i. c #6D2B2A", +"j. c #884144", +"k. c #772B2F", +"l. c #3A3A3A", +"m. c #AEA28C", +"n. c #C1C3A2", +"o. c #AEA07E", +"p. c #C8C09F", +"q. c #C4C6A3", +"r. c #B6886B", +"s. c #774237", +"t. c #7E3E3D", +"u. c #854748", +"v. c #78373B", +"w. c #000000", +"x. c #65635C", +"y. c #9F9D96", +"z. c #7C474A", +"A. c #815655", +"B. c #7F534F", +"C. c #8A5C54", +"D. c #74504B", +"E. c #8C615F", +"F. c #7E2C29", +"G. c #8C4240", +"H. c #7C322F", +"I. c #703634", +"J. c #807D74", +"K. c #3C3C3C", +"L. c #6D1B27", +"M. c #631D22", +"N. c #65101D", +"O. c #76746B", +"P. c #5D5C55", +"Q. c #6D6B63", +"R. c #B3B3B1", +"S. c #B50000", +"T. c #AA7979", +"U. c #8C8B89", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 ", +" 4 ^ ^ ^ ^ ^ ^ ^ ^ ^ 5 6 7 ", +" 8 ^ 9 0 ^ a 9 b ^ ^ c d e ", +" f g h i j k h l m ^ n o p ", +" q r s t u v w x y ^ z A B C ", +" ] D E F ^ G H I ^ ^ J K L ", +" ] ^ M N ^ ^ ^ ^ ^ ^ O P Q R C ", +" ] ^ S T U V W ^ ^ ^ ^ X Y Z ` ", +" .....+.@. .#.$.......^ %.&.*.=. ", +"....^ ^ -.;.>.,.^ ^ ^ '.).!.~.{. ", +" .].^.^ /.(._.^ :.<.[.^ }.|.1. ", +" 2.2.3.4.5.6.7.8.^ ^ 9.0.a.b. ", +" c.^ d.^ ^ e.f.^ g.h.i.j.k. l.l. ", +" m.n...o.p.q.r.s.t.u.v. w.x.w.y.y.w.x.w. ", +" z.A.B.C.D.E.F.G.H.I. x.y.y.y.J.J.J.K. ", +" L.C M. N. w.y.y.O.J.P.Q.w. ", +" l.y.y.O.w.w.R.x.x.l.", +" S.S.T. S.S.T. S.S.T. l.y.J.J.w.U.R.x.K.l.", +" S. S. S. S. S. w.J.P.R.R.J.K.w. ", +" S.S.T. S. S. S.S. x.J.Q.x.x.K.K.K. ", +" S. S. S. S. w.K.w.x.K.w.K.w. ", +" S. S.S.T. S. l.l. "}; diff --git a/elpa/auctex-13.1.3/images/exectex.xpm b/elpa/auctex-13.1.3/images/exectex.xpm new file mode 100644 index 0000000..74f724a --- /dev/null +++ b/elpa/auctex-13.1.3/images/exectex.xpm @@ -0,0 +1,203 @@ +/* XPM */ +static char * exectex40_xpm[] = { +"24 24 176 2", +" c None s backgroundToolBarColor", +". c #3E9543", +"+ c #409644", +"@ c #3D9D45", +"# c #3F9B42", +"$ c #4C2A1F", +"% c #4E3124", +"& c #727E51", +"* c #598A4E", +"= c #5B6647", +"- c #88624F", +"; c #89383B", +"> c #8B343B", +", c #6D5852", +"' c #506D48", +") c #4C843E", +"! c #648752", +"~ c #B8A789", +"{ c #80624D", +"] c #7D6951", +"^ c #FFFFC1", +"/ c #94A676", +"( c #8F8668", +"_ c #977567", +": c #A86660", +"< c #986C6A", +"[ c #758660", +"} c #708C60", +"| c #6A6C4E", +"1 c #C3C599", +"2 c #988167", +"3 c #5A3125", +"4 c #958066", +"5 c #BEA384", +"6 c #68372B", +"7 c #672124", +"8 c #5B392F", +"9 c #94917B", +"0 c #AFAC91", +"a c #B8B39C", +"b c #BDBCA0", +"c c #B39073", +"d c #582522", +"e c #712E2B", +"f c #83826F", +"g c #908F88", +"h c #F8FFFD", +"i c #686C8D", +"j c #D7DBB8", +"k c #716D76", +"l c #7B7B92", +"m c #D5D5B3", +"n c #DBBD9A", +"o c #81463B", +"p c #691A19", +"q c #838270", +"r c #888791", +"s c #6462D0", +"t c #2C2B87", +"u c #DAD9C7", +"v c #868394", +"w c #716DDC", +"x c #2F2C94", +"y c #C7C6B7", +"z c #D2AF8D", +"A c #84473C", +"B c #6D1E1F", +"C c #975F59", +"D c #BDBDAB", +"E c #878593", +"F c #909095", +"G c #C0BEAF", +"H c #A09EAD", +"I c #A6A5A9", +"J c #C19978", +"K c #7C3D33", +"L c #641C1F", +"M c #DBDCB8", +"N c #B4B492", +"O c #E5D9AA", +"P c #9F755A", +"Q c #50231F", +"R c #672424", +"S c #E4E3BC", +"T c #A5A28D", +"U c #D2D1B5", +"V c #E7E5C1", +"W c #E3DFC0", +"X c #E4CCA2", +"Y c #894E3A", +"Z c #461715", +"` c #632524", +" . c #979183", +".. c #665E46", +"+. c #C0B396", +"@. c #AAAB90", +"#. c #463F31", +"$. c #7C7968", +"%. c #B3AF92", +"&. c #D4BD97", +"*. c #804B37", +"=. c #461F19", +"-. c #42201F", +";. c #5A4F43", +">. c #504334", +",. c #DCD8B5", +"'. c #D0BC9D", +"). c #C8A487", +"!. c #82493F", +"~. c #3F1310", +"{. c #401613", +"]. c #664B46", +"^. c #DCD9BC", +"/. c #B8B59D", +"(. c #8C8977", +"_. c #E9E7C0", +":. c #A2897B", +"<. c #AE8872", +"[. c #CFB89A", +"}. c #A6715F", +"|. c #4B1D19", +"1. c #68272E", +"2. c #767361", +"3. c #7F8170", +"4. c #7B7B6C", +"5. c #8E897E", +"6. c #827F6E", +"7. c #83876F", +"8. c #847E70", +"9. c #9C7964", +"0. c #662F2A", +"a. c #5D2D2E", +"b. c #783C3F", +"c. c #87826E", +"d. c #B3B99A", +"e. c #D1D1AB", +"f. c #DFDDB9", +"g. c #C3B191", +"h. c #826453", +"i. c #6D2B2A", +"j. c #884144", +"k. c #772B2F", +"l. c #3A3A3A", +"m. c #AEA28C", +"n. c #C1C3A2", +"o. c #AEA07E", +"p. c #C8C09F", +"q. c #C4C6A3", +"r. c #B6886B", +"s. c #774237", +"t. c #7E3E3D", +"u. c #854748", +"v. c #78373B", +"w. c #000000", +"x. c #65635C", +"y. c #9F9D96", +"z. c #7C474A", +"A. c #815655", +"B. c #7F534F", +"C. c #8A5C54", +"D. c #74504B", +"E. c #8C615F", +"F. c #7E2C29", +"G. c #8C4240", +"H. c #7C322F", +"I. c #703634", +"J. c #807D74", +"K. c #3C3C3C", +"L. c #6D1B27", +"M. c #631D22", +"N. c #65101D", +"O. c #76746B", +"P. c #5D5C55", +"Q. c #6D6B63", +"R. c #B3B3B1", +"S. c #8C8B89", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 ", +" 4 ^ ^ ^ ^ ^ ^ ^ ^ ^ 5 6 7 ", +" 8 ^ 9 0 ^ a 9 b ^ ^ c d e ", +" f g h i j k h l m ^ n o p ", +" q r s t u v w x y ^ z A B C ", +" ] D E F ^ G H I ^ ^ J K L ", +" ] ^ M N ^ ^ ^ ^ ^ ^ O P Q R C ", +" ] ^ S T U V W ^ ^ ^ ^ X Y Z ` ", +" ...+.+.@.#...$.%.+.+.+.^ &.*.=.-. ", +" +.+.^ ^ ;.>. .,.^ ^ ^ '.).!.~.{. ", +" ...].^.^ /.(._.^ :.<.[.^ }.|.1. ", +" 2.2.3.4.5.6.7.8.^ ^ 9.0.a.b. ", +" c.^ d.^ ^ e.f.^ g.h.i.j.k. l.l. ", +" m.n.+.o.p.q.r.s.t.u.v. w.x.w.y.y.w.x.w. ", +" z.A.B.C.D.E.F.G.H.I. x.y.y.y.J.J.J.K. ", +" L.C M. N. w.y.y.O.J.P.Q.w. ", +" l.y.y.O.w.w.R.x.x.l.", +" l.y.J.J.w.S.R.x.K.l.", +" w.J.P.R.R.J.K.w. ", +" x.J.Q.x.x.K.K.K. ", +" w.K.w.x.K.w.K.w. ", +" l.l. "}; diff --git a/elpa/auctex-13.1.3/images/execviewdvi.xpm b/elpa/auctex-13.1.3/images/execviewdvi.xpm new file mode 100644 index 0000000..177c623 --- /dev/null +++ b/elpa/auctex-13.1.3/images/execviewdvi.xpm @@ -0,0 +1,46 @@ +/* XPM */ +static char * execviewdvi11_xpm[] = { +"24 24 19 1", +" c None s backgroundToolBarColor", +". c #295E29", +"+ c #5ABD5A", +"@ c #488148", +"# c #4CA14C", +"$ c #4D904D", +"% c #000000", +"& c #4FA64F", +"* c #FFFFFF", +"= c #3A3A3A", +"- c #65635C", +"; c #9F9D96", +"> c #807D74", +", c #3C3C3C", +"' c #76746B", +") c #5D5C55", +"! c #6D6B63", +"~ c #B3B3B1", +"{ c #8C8B89", +" ...+ . . . ", +" . . . . . ", +" . . . . . ", +" . . @ @ . ", +" . . #$$# . ", +" . . @@ . ", +" %% ...+ && . ", +" % % ", +" % % ", +" % % %% ", +" %% % % ", +"%* % % % ", +"%** % %% % % ", +"%** %%%* %% ", +" % % %** % == ", +" %% %** % %-%;;%-% ", +" % % -;;;>>>, ", +" %% %;;'>)!% ", +" =;;'%%~--=", +" =;>>%{~-,=", +" %>)~~>,% ", +" ->!--,,, ", +" %,%-,%,% ", +" == "}; diff --git a/elpa/auctex-13.1.3/images/execviewpdf.xpm b/elpa/auctex-13.1.3/images/execviewpdf.xpm new file mode 100644 index 0000000..fded37a --- /dev/null +++ b/elpa/auctex-13.1.3/images/execviewpdf.xpm @@ -0,0 +1,42 @@ +/* XPM */ +static char * execviewpdf4_xpm[] = { +"24 24 15 1", +" c None s backgroundToolBarColor", +". c #B50000", +"+ c #AA7979", +"@ c #000000", +"# c #FFFFFF", +"$ c #3A3A3A", +"% c #65635C", +"& c #9F9D96", +"* c #807D74", +"= c #3C3C3C", +"- c #76746B", +"; c #5D5C55", +"> c #6D6B63", +", c #B3B3B1", +"' c #8C8B89", +" ...+ ...+ ...+", +" . . . . . ", +" . . . . . ", +" ...+ . . ..+ ", +" . . . . ", +" . . . . ", +" @@ . ...+ . ", +" @ @ ", +" @ @ ", +" @ @ @@ ", +" @@ @ @ ", +"@# @ @ @ ", +"@## @ @@ @ @ ", +"@## @@@# @@ ", +" @ @ @## @ $$ ", +" @@ @## @ @%@&&@%@ ", +" @ @ %&&&***= ", +" @@ @&&-*;>@ ", +" $&&-@@,%%$", +" $&**@',%=$", +" @*;,,*=@ ", +" %*>%%=== ", +" @=@%=@=@ ", +" $$ "}; diff --git a/elpa/auctex-13.1.3/images/execviewps.xpm b/elpa/auctex-13.1.3/images/execviewps.xpm new file mode 100644 index 0000000..d62117f --- /dev/null +++ b/elpa/auctex-13.1.3/images/execviewps.xpm @@ -0,0 +1,42 @@ +/* XPM */ +static char * execviewps12_xpm[] = { +"24 24 15 1", +" c None s backgroundToolBarColor", +". c #0037C4", +"+ c #6C84B7", +"@ c #000000", +"# c #FFFFFF", +"$ c #3A3A3A", +"% c #65635C", +"& c #9F9D96", +"* c #807D74", +"= c #3C3C3C", +"- c #76746B", +"; c #5D5C55", +"> c #6D6B63", +", c #B3B3B1", +"' c #8C8B89", +" ...+ +..+ ", +" . . . . ", +" . . . ", +" ...+ +..+ ", +" . . ", +" . . . ", +" @@ . +..+ ", +" @ @ ", +" @ @ ", +" @ @ @@ ", +" @@ @ @ ", +"@# @ @ @ ", +"@## @ @@ @ @ ", +"@## @@@# @@ ", +" @ @ @## @ $$ ", +" @@ @## @ @%@&&@%@ ", +" @ @ %&&&***= ", +" @@ @&&-*;>@ ", +" $&&-@@,%%$", +" $&**@',%=$", +" @*;,,*=@ ", +" %*>%%=== ", +" @=@%=@=@ ", +" $$ "}; diff --git a/elpa/auctex-13.1.3/images/gv.xpm b/elpa/auctex-13.1.3/images/gv.xpm new file mode 100644 index 0000000..92dfb23 --- /dev/null +++ b/elpa/auctex-13.1.3/images/gv.xpm @@ -0,0 +1,158 @@ +/* XPM */ +static char * gv7_xpm[] = { +"24 24 131 2", +" c None s backgroundToolBarColor", +". c #9F9F9F", +"+ c #2F2F2F", +"@ c #373737", +"# c #323232", +"$ c #303030", +"% c #525252", +"& c #ECECEC", +"* c #FFFFFF", +"= c #F4F4F4", +"- c #BE5858", +"; c #FD6F6F", +"> c #FF7070", +", c #FF9898", +"' c #FFE1E1", +") c #FE7070", +"! c #C96363", +"~ c #FF6B6B", +"{ c #DD6666", +"] c #FDCFCF", +"^ c #FFD1D1", +"/ c #FF8888", +"( c #FFCACA", +"_ c #F37C7C", +": c #F56767", +"< c #DA6363", +"[ c #ECE6E6", +"} c #F2F2F2", +"| c #B6B6B6", +"1 c #D0CBCB", +"2 c #FD8686", +"3 c #FE7878", +"4 c #FE8787", +"5 c #DCD6D6", +"6 c #E1E1E1", +"7 c #F5EFEF", +"8 c #895B5B", +"9 c #848484", +"0 c #000000", +"a c #2B2B2B", +"b c #DAACAC", +"c c #F3C5C5", +"d c #414141", +"e c #4C4C4C", +"f c #B18383", +"g c #5B5B5B", +"h c #F86969", +"i c #A5A5A5", +"j c #3E3E3E", +"k c #E4B6B6", +"l c #F6C8C8", +"m c #5D5D5D", +"n c #6C6C6C", +"o c #F56666", +"p c #1C1C1C", +"q c #AFAFAF", +"r c #F6F6F6", +"s c #FA9494", +"t c #F67F7F", +"u c #FFF9F9", +"v c #FCFCFC", +"w c #EDEDED", +"x c #F3EDED", +"y c #FF7878", +"z c #F6F0F0", +"A c #F8F8F8", +"B c #EB7474", +"C c #DA7373", +"D c #E2E2E2", +"E c #A4A4A4", +"F c #F0F0F0", +"G c #D5D5D5", +"H c #393939", +"I c #161616", +"J c #8C8C8C", +"K c #F7F7F7", +"L c #BEBEBE", +"M c #191919", +"N c #989898", +"O c #BCBCBC", +"P c #2A2A2A", +"Q c #1B1B1B", +"R c #313131", +"S c #AAAAAA", +"T c #C7C7C7", +"U c #101010", +"V c #D3D3D3", +"W c #595959", +"X c #E4E4E4", +"Y c #969696", +"Z c #FBFBFB", +"` c #D1D1D1", +" . c #717171", +".. c #0A0A0A", +"+. c #B7B7B7", +"@. c #EEEEEE", +"#. c #F9F9F9", +"$. c #DBDBDB", +"%. c #EBEBEB", +"&. c #D2D2D2", +"*. c #6E6E6E", +"=. c #7D7D7D", +"-. c #EAEAEA", +";. c #A2A2A2", +">. c #CCCCCC", +",. c #E8E8E8", +"'. c #4E4E4E", +"). c #ABABAB", +"!. c #F5F5F5", +"~. c #6B6B6B", +"{. c #171717", +"]. c #434343", +"^. c #CECECE", +"/. c #4D4D4D", +"(. c #ADADAD", +"_. c #D0D0D0", +":. c #9E9E9E", +"<. c #808080", +"[. c #FAFAFA", +"}. c #858585", +"|. c #A0A0A0", +"1. c #BDBDBD", +"2. c #838383", +"3. c #181818", +"4. c #8F8F8F", +"5. c #959595", +"6. c #D6D6D6", +"7. c #DDDDDD", +"8. c #C1C1C1", +"9. c #7B7B7B", +"0. c #8E8E8E", +" ", +" . + @ @ @ # . ", +" $ % & * * * = % % ", +" - ; > , ' * ' , > ) ! ", +" ~ { ] ^ / > ( > / ^ ^ _ : ", +" ~ < [ } | 1 2 3 4 5 | 6 7 { ~ ", +" ~ 8 * 9 0 a b ~ c d 0 e * f ~ ", +" $ g h 8 * i 0 j k ~ l m 0 n * f o 0 g ", +" p q r s t u v w x 4 y / z w A u B C D D @ ", +" p E F ' > / ^ ^ / > ( > / ^ ^ / ) ' * G H ", +" I @ J K ' , > > , ' * ' , > > , ' * L E H ", +" M N * * * * * * * * * * * * * O P Q ", +" R S * * * * * * * * * * * T a ", +" U S * * * * * * * * * * * V W ", +" U S * * * * * * * * * * * X Y U ", +" U S * * * * * * * * * * * Z ` ... ", +" R +.* * Z @.#.* * * * * $.%.* &.*.Q ", +" 0 =.%.* * -.;.>.v v * * ,.'.).!.v >.~.{. ", +" ].q * * * ^./.(.A A * * _.p :.%.* %.:.p ", +" @ <.@.* [.r }.R |.1.1.L L 2.3.:.%.%.%.4.Q ", +" H 5.6.7.8.).0 0 j % % % % M 0 9.9.9. .% ", +" 3. .0.0.m @ % % % % ", +" @ @ @ @ ", +" "}; diff --git a/elpa/auctex-13.1.3/images/jumpdvi.xpm b/elpa/auctex-13.1.3/images/jumpdvi.xpm new file mode 100644 index 0000000..6cc568d --- /dev/null +++ b/elpa/auctex-13.1.3/images/jumpdvi.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * jumpdvi19_xpm[] = { +"24 24 47 1", +" c None s backgroundToolBarColor", +". c #212121", +"+ c #EAD4CB", +"@ c #E3C5BA", +"# c #DBB4A4", +"$ c #EEDED7", +"% c #FAF7F5", +"& c #F2E5E1", +"* c #D2AC99", +"= c #000000", +"- c #8D9E7C", +"; c #CDD9C2", +"> c #DEE6D7", +", c #DAE2D1", +"' c #9BAD89", +") c #B79382", +"! c #707D63", +"~ c #B4C6A2", +"{ c #ACC098", +"] c #636E57", +"^ c #AB8A7A", +"/ c #E4E9DD", +"( c #657158", +"_ c #C49F8D", +": c #C3D1B5", +"< c #808F70", +"[ c #4C5442", +"} c #58634E", +"| c #E6EBE0", +"1 c #D4DDC9", +"2 c #CAD7BE", +"3 c #90A17F", +"4 c #5F6A53", +"5 c #535C49", +"6 c #E9EDE4", +"7 c #616D56", +"8 c #A8BC95", +"9 c #7C8B6E", +"0 c #4C5443", +"a c #B6C2AA", +"b c #5E6953", +"c c #295E29", +"d c #5ABD5A", +"e c #488148", +"f c #4CA14C", +"g c #4D904D", +"h c #4FA64F", +" ", +" ", +" ", +" ... ", +" ..+@#.. ", +" .$%&@*. ", +" =======+#**. ", +" =-;>,'=###). ", +" =!~{]=##*^. ", +" ==/;{(]=#*_. ", +" ==/;:{<[}=)).. ", +" =|12{{34=5=.. ", +" =6{{{7= == ", +" =>890= ", +" =a]= ", +" =b= ", +" = cccd c c c ", +" c c c c c ", +" c c c c c ", +" c c e e c ", +" c c fggf c ", +" c c ee c ", +" cccd hh c ", +" "}; diff --git a/elpa/auctex-13.1.3/images/ltx-symb-turn-off.xpm b/elpa/auctex-13.1.3/images/ltx-symb-turn-off.xpm new file mode 100644 index 0000000..bcb6d4f --- /dev/null +++ b/elpa/auctex-13.1.3/images/ltx-symb-turn-off.xpm @@ -0,0 +1,47 @@ +/* XPM */ +static char * ltx_symb_turn_off_xpm[] = { +"24 24 20 1", +" c None s backgroundToolBarColor", +". c #AEAEAE", +"+ c #000000", +"@ c #0A0A0A", +"# c #1F1F1F", +"$ c #C9C9C9", +"% c #353535", +"& c #999999", +"* c #4D4D4D", +"= c #777777", +"- c #141414", +"; c #878787", +"> c #686868", +", c #5A5A5A", +"' c #FF5858", +") c #FFB9B9", +"! c #FF0000", +"~ c #FF9595", +"{ c #414141", +"] c #292929", +" ", +" ", +" ", +".+@########++@$ ", +" %@& .*@= ", +" $--$ ;% ", +" .@% >$ ", +" ,+= ", +" %@. ", +" $--$ ' ' ", +" &+* )!' '!)", +" *@$ ~!~ ", +" $#; ~!~ ", +" %, )!' '!)", +" >% ' ' ", +" ;#$ &$ ", +" .-. ${ ", +" ]; .], ", +" *]>>>>>>>>]++. ", +"${{{{{{{{{{{{* ", +" ", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/ltx-symb-turn-on.xpm b/elpa/auctex-13.1.3/images/ltx-symb-turn-on.xpm new file mode 100644 index 0000000..d4d1ea3 --- /dev/null +++ b/elpa/auctex-13.1.3/images/ltx-symb-turn-on.xpm @@ -0,0 +1,46 @@ +/* XPM */ +static char * ltx_symb_turn_on_xpm[] = { +"24 24 19 1", +" c None s backgroundToolBarColor", +". c #AEAEAE", +"+ c #000000", +"@ c #0A0A0A", +"# c #1F1F1F", +"$ c #C9C9C9", +"% c #353535", +"& c #999999", +"* c #4D4D4D", +"= c #777777", +"- c #141414", +"; c #878787", +"> c #686868", +", c #5A5A5A", +"' c #79DECA", +") c #00AA88", +"! c #5DC8B3", +"~ c #414141", +"{ c #292929", +" ", +" ", +" ", +".+@########++@$ ", +" %@& .*@= ", +" $--$ ;% ", +" .@% >$ ", +" ,+= '", +" %@. ) ", +" $--$ )) ", +" &+* ')! )) ", +" *@$ )))) ", +" $#; !)) ", +" %, ')' ", +" >% ", +" ;#$ &$ ", +" .-. $~ ", +" {; .{, ", +" *{>>>>>>>>{++. ", +"$~~~~~~~~~~~~* ", +" ", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/pdftex.xpm b/elpa/auctex-13.1.3/images/pdftex.xpm new file mode 100644 index 0000000..ca94a24 --- /dev/null +++ b/elpa/auctex-13.1.3/images/pdftex.xpm @@ -0,0 +1,206 @@ +/* XPM */ +static char * pdftex22_xpm[] = { +"24 24 179 2", +" c None s backgroundToolBarColor", +". c #3E9543", +"+ c #409644", +"@ c #3D9D45", +"# c #3F9B42", +"$ c #4C2A1F", +"% c #4E3124", +"& c #727E51", +"* c #598A4E", +"= c #5B6647", +"- c #88624F", +"; c #89383B", +"> c #8B343B", +", c #6D5852", +"' c #506D48", +") c #4C843E", +"! c #648752", +"~ c #B8A789", +"{ c #80624D", +"] c #7D6951", +"^ c #FFFFC1", +"/ c #94A676", +"( c #8F8668", +"_ c #977567", +": c #A86660", +"< c #986C6A", +"[ c #758660", +"} c #708C60", +"| c #6A6C4E", +"1 c #C3C599", +"2 c #988167", +"3 c #5A3125", +"4 c #561E1C", +"5 c #958066", +"6 c #BEA384", +"7 c #68372B", +"8 c #672124", +"9 c #5B392F", +"0 c #94917B", +"a c #AFAC91", +"b c #B8B39C", +"c c #BDBCA0", +"d c #B39073", +"e c #582522", +"f c #712E2B", +"g c #6F292C", +"h c #83826F", +"i c #908F88", +"j c #F8FFFD", +"k c #686C8D", +"l c #D7DBB8", +"m c #716D76", +"n c #7B7B92", +"o c #D5D5B3", +"p c #DBBD9A", +"q c #81463B", +"r c #691A19", +"s c #838270", +"t c #888791", +"u c #6462D0", +"v c #2C2B87", +"w c #DAD9C7", +"x c #868394", +"y c #716DDC", +"z c #2F2C94", +"A c #C7C6B7", +"B c #D2AF8D", +"C c #84473C", +"D c #6D1E1F", +"E c #6E262C", +"F c #BDBDAB", +"G c #878593", +"H c #909095", +"I c #C0BEAF", +"J c #A09EAD", +"K c #A6A5A9", +"L c #C19978", +"M c #7C3D33", +"N c #641C1F", +"O c #662633", +"P c #DBDCB8", +"Q c #B4B492", +"R c #E5D9AA", +"S c #9F755A", +"T c #50231F", +"U c #672424", +"V c #8E3B4B", +"W c #E4E3BC", +"X c #A5A28D", +"Y c #D2D1B5", +"Z c #E7E5C1", +"` c #E3DFC0", +" . c #E4CCA2", +".. c #894E3A", +"+. c #461715", +"@. c #632524", +"#. c #95404E", +"$. c #777776", +"%. c #C0B396", +"&. c #AAAB90", +"*. c #463F31", +"=. c #665E46", +"-. c #7C7968", +";. c #B3AF92", +">. c #D4BD97", +",. c #804B37", +"'. c #461F19", +"). c #42201F", +"!. c #5A4F43", +"~. c #504334", +"{. c #979183", +"]. c #DCD8B5", +"^. c #D0BC9D", +"/. c #C8A487", +"(. c #82493F", +"_. c #3F1310", +":. c #401613", +"<. c #664B46", +"[. c #DCD9BC", +"}. c #B8B59D", +"|. c #8C8977", +"1. c #E9E7C0", +"2. c #A2897B", +"3. c #AE8872", +"4. c #CFB89A", +"5. c #A6715F", +"6. c #4B1D19", +"7. c #68272E", +"8. c #6E2933", +"9. c #453E37", +"0. c #767361", +"a. c #7F8170", +"b. c #7B7B6C", +"c. c #8E897E", +"d. c #827F6E", +"e. c #83876F", +"f. c #847E70", +"g. c #9C7964", +"h. c #662F2A", +"i. c #5D2D2E", +"j. c #783C3F", +"k. c #87826E", +"l. c #B3B99A", +"m. c #D1D1AB", +"n. c #DFDDB9", +"o. c #C3B191", +"p. c #826453", +"q. c #6D2B2A", +"r. c #884144", +"s. c #772B2F", +"t. c #702F34", +"u. c #AEA28C", +"v. c #C1C3A2", +"w. c #AEA07E", +"x. c #C8C09F", +"y. c #C4C6A3", +"z. c #B6886B", +"A. c #774237", +"B. c #7E3E3D", +"C. c #854748", +"D. c #78373B", +"E. c #6A2932", +"F. c #5F343C", +"G. c #7C474A", +"H. c #815655", +"I. c #7F534F", +"J. c #8A5C54", +"K. c #74504B", +"L. c #8C615F", +"M. c #7E2C29", +"N. c #8C4240", +"O. c #7C322F", +"P. c #703634", +"Q. c #6D1B27", +"R. c #975F59", +"S. c #631D22", +"T. c #65101D", +"U. c #B50000", +"V. c #AA7979", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 4 ", +" 5 ^ ^ ^ ^ ^ ^ ^ ^ ^ 6 7 8 ", +" 9 ^ 0 a ^ b 0 c ^ ^ d e f g ", +" h i j k l m j n o ^ p q r ", +" s t u v w x y z A ^ B C D E ", +" ] F G H ^ I J K ^ ^ L M N O ", +" ] ^ P Q ^ ^ ^ ^ ^ ^ R S T U V ", +" ] ^ W X Y Z ` ^ ^ ^ ^ ...+.@.#. ", +" $.$.%.%.&.*.=.-.;.%.%.%.^ >.,.'.). ", +" %.%.^ ^ !.~.{.].^ ^ ^ ^./.(._.:. ", +" $.$.<.[.^ }.|.1.^ 2.3.4.^ 5.6.7.8. ", +" 9.0.a.b.c.d.e.f.^ ^ g.h.i.j. ", +" k.^ l.^ ^ m.n.^ o.p.q.r.s.t. ", +" u.v.%.w.x.y.z.A.B.C.D.E.F. ", +" G.H.I.J.K.L.M.N.O.P. ", +" Q.R. S. T. ", +" ", +" U.U.U.V. U.U.U.V. U.U.U.V. ", +" U. U. U. U. U. ", +" U.U.U.V. U. U. U.U.V. ", +" U. U. U. U. ", +" U. U.U.U.V. U. "}; diff --git a/elpa/auctex-13.1.3/images/prverr16.xpm b/elpa/auctex-13.1.3/images/prverr16.xpm new file mode 100644 index 0000000..88d71d3 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prverr16.xpm @@ -0,0 +1,31 @@ +/* XPM */ +static char *noway16[] = { +/* columns rows colors chars-per-pixel */ +"16 16 9 1", +" c red", +". c #FD0D0D", +"X c #FA1C1C", +"o c #F52D2D", +"O c #FB5B5B", +"+ c #FC6060", +"@ c #FFBBBB", +"# c #FEFEFE", +"$ c None", +/* pixels */ +"$$$$$ XXXX $$$$$", +"$$$X. .X$$$", +"$$o o$$", +"$X. .X$", +"$. .$", +" ", +"O@@@@@@@@@@@@@@O", +"+##############+", +"+##############+", +"O@@@@@@@@@@@@@@O", +" ", +"$. .$", +"$X. .X$", +"$$o o$$", +"$$$X. .X$$$", +"$$$$$ XXXX $$$$$" +}; diff --git a/elpa/auctex-13.1.3/images/prverr20.xpm b/elpa/auctex-13.1.3/images/prverr20.xpm new file mode 100644 index 0000000..18e5eae --- /dev/null +++ b/elpa/auctex-13.1.3/images/prverr20.xpm @@ -0,0 +1,35 @@ +/* XPM */ +static char *noway20[] = { +/* columns rows colors chars-per-pixel */ +"20 20 9 1", +" c red", +". c #FF0404", +"X c #FD0F0F", +"o c #F91919", +"O c #F82828", +"+ c #F33636", +"@ c #ED4A4A", +"# c #FEFEFE", +"$ c None", +/* pixels */ +"$$$$$$@+OXXO+@$$$$$$", +"$$$$OO. .OO$$$$", +"$$$@. .@$$$", +"$$@. .@$$", +"$O. .O$", +"$o o$", +"@. .@", +"+ +", +"o##################o", +"o##################o", +"o##################o", +"o##################o", +"+ +", +"@. .@", +"$o o$", +"$O. .O$", +"$$@. .@$$", +"$$$@. .@$$$", +"$$$$OO. .OO$$$$", +"$$$$$$@+OXXO+@$$$$$$" +}; diff --git a/elpa/auctex-13.1.3/images/prverr24.xbm b/elpa/auctex-13.1.3/images/prverr24.xbm new file mode 100644 index 0000000..1a369c5 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prverr24.xbm @@ -0,0 +1,9 @@ +#define wutz_width 24 +#define wutz_height 24 +static unsigned char wutz_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xc0, 0xff, 0x03, 0xf0, 0xff, 0x0f, + 0xf8, 0xff, 0x1f, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0x3f, 0xfc, 0xff, 0x3f, + 0xfe, 0xff, 0x7f, 0x02, 0x00, 0x40, 0x01, 0x00, 0x80, 0x01, 0x00, 0x80, + 0x01, 0x00, 0x80, 0x01, 0x00, 0x80, 0x02, 0x00, 0x40, 0xfe, 0xff, 0x7f, + 0xfc, 0xff, 0x3f, 0xfc, 0xff, 0x3f, 0xf8, 0xff, 0x1f, 0xf8, 0xff, 0x1f, + 0xf0, 0xff, 0x0f, 0xc0, 0xff, 0x03, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00 }; diff --git a/elpa/auctex-13.1.3/images/prverr24.xpm b/elpa/auctex-13.1.3/images/prverr24.xpm new file mode 100644 index 0000000..f855e95 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prverr24.xpm @@ -0,0 +1,39 @@ +/* XPM */ +static char *noway24[] = { +/* columns rows colors chars-per-pixel */ +"24 24 9 1", +" c red", +". c #FF0404", +"X c #FD0C0C", +"o c #F91919", +"O c #F62929", +"+ c #F34C4C", +"@ c #FF9090", +"# c #FEFEFE", +"$ c None", +/* pixels */ +"$$$$$$$$+OOXXOO+$$$$$$$$", +"$$$$$$OX XO$$$$$$", +"$$$$+X X+$$$$", +"$$$+ +$$$", +"$$+ +$$", +"$$X X$$", +"$O O$", +"$X X$", +"+ +", +"O+@@@@@@@@@@@@@@@@@@@@+O", +"o######################o", +"X######################X", +"X######################X", +"o######################o", +"O+@@@@@@@@@@@@@@@@@@@@+O", +"+ +", +"$X X$", +"$O O$", +"$$X X$$", +"$$+ +$$", +"$$$+ +$$$", +"$$$$+X X+$$$$", +"$$$$$$OX XO$$$$$$", +"$$$$$$$$+OOXXOO+$$$$$$$$" +}; diff --git a/elpa/auctex-13.1.3/images/prvtex-cap-up.xpm b/elpa/auctex-13.1.3/images/prvtex-cap-up.xpm new file mode 100644 index 0000000..726d81b --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex-cap-up.xpm @@ -0,0 +1,48 @@ +/* XPM */ +static char * preview_cap_up_xpm[] = { +"33 33 12 1", +" c None", +". c #BFBFBF s backgroundToolBarColor", +"+ c #000000 s foregroundToolBarColor", +"! c #000000", +"@ c #FFFFFF", +"# c #7C7C7C", +"$ c #A0A0A0", +"% c #E5E5E5", +"& c #BABABA", +"* c #1D1D1D", +"= c #424242", +"- c #676767", +".................................", +".....!!!!!!!!!!!!!!!!!!!!!!......", +".....!@@@@@@@@@@@@@@@@@@@@!......", +".....!@@@@@@@@@#$@@@@@@@@@!......", +".....!@@@@@@@@%!&@@@@@@@@@!......", +".....!@@@@@@@@#$@@@@@@@@@@!......", +".....!@@@@@@@%*#%@%%@@@@&@!......", +".....!#!!!!=$*#-!$#!&@@#*@!......", +".....!@@&&@@#$@@%@@%=@%!$@!......", +".....!@@&&@@&-=$@@@@$$-=@@!......", +".....!@@&&@@$##&@@@@@=!&@@!......", +".....!@@&#%@#$@@&&@@@*-@@@!......", +".....!@@@*!@&!#-*@@@$!$@@@!......", +".....!@@@%%@@%#$@@@@!#-@@@!......", +".....!@%==@@@@@@@@@#*@-%@@!......", +"......!=#=@@@@@@@@%!&@%=#@!......", +"......%$$=@@@@@@@@$=@@@&=@!......", +".....#.&$#=&@@@@@@@@@@@@@@!......", +".....#...#-*$@@@@@@@@@@@@@!......", +"......#..###===*%%@@@@@@@@!......", +"......#...#...#.!!!!!!!!!!!......", +".......#..#...#..#.#..#..#.......", +".......#..#...#.##.#..#..#.......", +"........#..##..#.#..###...#......", +"........#.................#......", +"..+++............................", +"..+..+.+.+.+..+..+.+..+..+.+.+...", +"..+..+.++.+.+.+..+...+.+.+.+.+...", +"..+++..+..+++.+..+.+.+++.+.+.+...", +"..+....+..+...+.+..+.+....+.+....", +"..+....+...++..+...+..++..+.+....", +".................................", +"................................."}; diff --git a/elpa/auctex-13.1.3/images/prvtex12.xbm b/elpa/auctex-13.1.3/images/prvtex12.xbm new file mode 100644 index 0000000..2737176 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex12.xbm @@ -0,0 +1,6 @@ +/* Created with The GIMP */ +#define preview12_width 12 +#define preview12_height 12 +static unsigned char preview12_bits[] = { + 0xff, 0x0f, 0x41, 0x08, 0x21, 0x08, 0x6f, 0x0d, 0x35, 0x0a, 0x75, 0x0a, + 0x6b, 0x0b, 0x82, 0x0c, 0x7c, 0x08, 0xf0, 0x08, 0x00, 0x0f, 0x00, 0x00 }; diff --git a/elpa/auctex-13.1.3/images/prvtex12.xpm b/elpa/auctex-13.1.3/images/prvtex12.xpm new file mode 100644 index 0000000..2a205a7 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex12.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * preview12_xpm[] = { +"12 12 17 1", +" c None", +". c #020202", +"+ c #1E1E1A", +"@ c #626256", +"# c #7D7D70", +"$ c #8A8A7A", +"% c #969686", +"& c #A6A692", +"* c #B2B29E", +"= c #46463E", +"- c #BEBEAA", +"; c #1A1A16", +"> c #CECEB2", +", c #363632", +"' c #6E6E62", +") c #0E0E0E", +"! c #52524A", +"............", +".>>>>$*>>>>.", +".>>>>&>>>>>.", +".'.,@+##&$%.", +".>)>'#>>&!>.", +".>=%#%%>@&>.", +"..,@>*>-@&>=", +" # #,>>#-%%.", +" . @,%>>>>.", +" . !;#>>>.", +" . . ,;.", +" . .. .."}; diff --git a/elpa/auctex-13.1.3/images/prvtex16.xbm b/elpa/auctex-13.1.3/images/prvtex16.xbm new file mode 100644 index 0000000..6fbe9c2 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex16.xbm @@ -0,0 +1,7 @@ +/* Created with The GIMP */ +#define preview16_width 16 +#define preview16_height 16 +static unsigned char preview16_bits[] = { + 0xff, 0xff, 0x01, 0x81, 0x81, 0x80, 0xbd, 0xad, 0x49, 0xa8, 0xc9, 0x91, + 0x49, 0x90, 0x9e, 0x99, 0x1c, 0xac, 0x7d, 0x84, 0xf1, 0x80, 0xf2, 0x87, + 0x22, 0xfa, 0x24, 0x52, 0x24, 0x5a, 0xc8, 0x94 }; diff --git a/elpa/auctex-13.1.3/images/prvtex16.xpm b/elpa/auctex-13.1.3/images/prvtex16.xpm new file mode 100644 index 0000000..8414484 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex16.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char * preview16_xpm[] = { +"16 16 17 1", +" c None", +". c #020202", +"+ c #1A1A16", +"@ c #636357", +"# c #6E6E62", +"$ c #828276", +"% c #8A8A7A", +"& c #969686", +"* c #A6A692", +"= c #B2B29E", +"- c #BABAA6", +"; c #363632", +"> c #BEBEAA", +", c #52524A", +"' c #CECEB2", +") c #46463E", +"! c #7A7A6E", +"................", +".''''''>@''''''.", +".''''''%>''''''.", +".'!..#*;,=#*'#=.", +".''.''!*>''&=@'.", +".''.''#@>''>)='.", +".'',,'#!@>'&@''.", +" .;@;''*>'')%''.", +" -$$;'''''%!>@=.", +". &$@;&'''*''>'.", +". @,+$'''''''.", +" . ...;;;+''''.", +" . . . .....", +" . . . . . ", +" . . . .. . ", +" . .. . . ."}; diff --git a/elpa/auctex-13.1.3/images/prvtex20.xpm b/elpa/auctex-13.1.3/images/prvtex20.xpm new file mode 100644 index 0000000..cd6df1d --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex20.xpm @@ -0,0 +1,40 @@ +/* XPM */ +static char * preview20_xpm[] = { +"20 20 17 1", +" c None", +". c #000200", +"+ c #151614", +"@ c #20211F", +"# c #31312A", +"$ c #3D3C35", +"% c #474439", +"& c #504F48", +"* c #626054", +"= c #727063", +"- c #7E7E6F", +"; c #888A7A", +"> c #969987", +", c #A9A992", +"' c #B8B8A1", +") c #C6C5AA", +"! c #CFCDB1", +" .@@@@@@@@@@@@@@@@. ", +" %!!!!!!!''!!!!!!!% ", +" %!!!!!!)&>!!!!!!!% ", +" %!!!!!!>*'!!!!!!!% ", +" %!!!!!)&*')')!!''% ", +" @&@+#*&*=#;&*)'%-% ", +" %!,>!,=;,)!)=,-$'% ", +" %!,>!'=&-!!!'*#;!% ", +" %!,-),=>','!!$&)!% ", +" %!)$$'&&=%)!,+;!!% ", +" %!','!);;!!)%**!!% ", +" $;*$!!!!!!!;%'->)% ", +" *=$!!!!!!)*-!'*;% ", +" @>;*='!!!!),)!!''% ", +" . *&&,!!!!!!!!!!% ", +" ..+##@>,,,,,,,$ ", +" . . . ......... ", +" . . . ... . . ", +" . . . . ... . ", +" . . "}; diff --git a/elpa/auctex-13.1.3/images/prvtex24.xbm b/elpa/auctex-13.1.3/images/prvtex24.xbm new file mode 100644 index 0000000..91c07f3 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex24.xbm @@ -0,0 +1,10 @@ +/* Created with The GIMP */ +#define preview_width 24 +#define preview_height 24 +static unsigned char preview_bits[] = { + 0xfe, 0xff, 0x7f, 0x02, 0x00, 0x40, 0x02, 0x18, 0x40, 0x02, 0x0c, 0x40, + 0x02, 0x04, 0x40, 0x02, 0x00, 0x50, 0xfe, 0xde, 0x59, 0x32, 0x03, 0x49, + 0x32, 0x0f, 0x4f, 0x32, 0x07, 0x46, 0x32, 0x23, 0x46, 0x62, 0x1e, 0x47, + 0x02, 0x0c, 0x47, 0x02, 0x80, 0x4d, 0x32, 0x80, 0x48, 0x2c, 0xc0, 0x58, + 0x42, 0x00, 0x40, 0xc2, 0x01, 0x40, 0xe4, 0x0e, 0x40, 0x44, 0xf4, 0x7f, + 0x48, 0xa4, 0x24, 0x48, 0xb4, 0x24, 0x90, 0x29, 0x47, 0x10, 0x00, 0x40 }; diff --git a/elpa/auctex-13.1.3/images/prvtex24.xpm b/elpa/auctex-13.1.3/images/prvtex24.xpm new file mode 100644 index 0000000..316ae31 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvtex24.xpm @@ -0,0 +1,37 @@ +/* XPM */ +static char * preview_xpm[] = { +"24 24 10 1", +" c None", +". c #000000", +"+ c #CECEB2", +"@ c #656559", +"# c #818174", +"$ c #B9B9A4", +"% c #969686", +"& c #181815", +"* c #363630", +"= c #53534B", +" ...................... ", +" .++++++++++++++++++++. ", +" .+++++++++@#+++++++++. ", +" .++++++++$.%+++++++++. ", +" .++++++++@#++++++++++. ", +" .+++++++$&@$+$$++++%+. ", +" .@....*#&@=.#@.%++@&+. ", +" .++%%++@#++$++$*+$.#+. ", +" .++%%++%=*#++++##=*++. ", +" .++%%++#@@%+++++*.%++. ", +" .++%@$+@#++%%+++&=+++. ", +" .+++&.+%.@=&+++#.#+++. ", +" .+++$$++$@#++++.@=+++. ", +" .+$**+++++++++@&+=$++. ", +" .*@*++++++++$.%+$*@+. ", +" $##*++++++++#*+++%*+. ", +" . %#@*%++++++++++++++. ", +" . @=&#+++++++++++++. ", +" . ...***&$$++++++++. ", +" . . . ........... ", +" . . . . . . . ", +" . . . .. . . . ", +" . .. . . ... . ", +" . . "}; diff --git a/elpa/auctex-13.1.3/images/prvwrk12.xpm b/elpa/auctex-13.1.3/images/prvwrk12.xpm new file mode 100644 index 0000000..7b4bec9 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk12.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * nwork12_xpm[] = { +"12 12 17 1", +" c None", +". c #0F110E", +"+ c #161815", +"@ c #1F211E", +"# c #383937", +"$ c #6A6C69", +"% c #818380", +"& c #E46767", +"* c #FF6467", +"= c #959794", +"- c #DC9897", +"; c #ADAFAC", +"> c #FF9797", +", c #C6C8C5", +"' c #FFCBCA", +") c #E4E6E3", +"! c #FBFDFA", +" >> ", +" '**' ", +" >>>> ", +" '*''*' ", +" >>!)>> ", +" '*,==,*' ", +" >>$@=!>> ", +" '*';#;!'*' ", +" >>!$$=!,-> ", +"'*'=)%!%.@&'", +">>!=!=;..+$>", +" ********** "}; diff --git a/elpa/auctex-13.1.3/images/prvwrk14.xpm b/elpa/auctex-13.1.3/images/prvwrk14.xpm new file mode 100644 index 0000000..6be87c6 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk14.xpm @@ -0,0 +1,34 @@ +/* XPM */ +static char * nwork14_xpm[] = { +"14 14 17 1", +" c None", +". c #000100", +"+ c #161816", +"@ c #222421", +"# c #2A2C29", +"$ c #363836", +"% c #525451", +"& c #686A67", +"* c #828481", +"= c #FF6467", +"- c #949693", +"; c #A4A6A3", +"> c #FF9797", +", c #B8BAB7", +"' c #D8D6D4", +") c #FFCBCA", +"! c #FAFDF9", +" >> ", +" )==) ", +" >>>> ", +" )=))=) ", +" >>!!>> ", +" )=)!!)=) ", +" >>''@!>> ", +" )=&%#!!)=) ", +" >>-@$!!!>> ", +" )=);%&!!!)=) ", +" >>!&&;,!&,>> ", +")=)*',,'@.+'=)", +">>!-!';$+++%>>", +" ============ "}; diff --git a/elpa/auctex-13.1.3/images/prvwrk16.xpm b/elpa/auctex-13.1.3/images/prvwrk16.xpm new file mode 100644 index 0000000..fd74352 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk16.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char * nwork16_xpm[] = { +"16 16 17 1", +" c None", +". c #040703", +"+ c #0E100D", +"@ c #262825", +"# c #434542", +"$ c #4C4E4B", +"% c #5B5D5A", +"& c #70726F", +"* c #868885", +"= c #D86467", +"- c #FF6467", +"; c #A69F9F", +"> c #FF9797", +", c #B6B8B5", +"' c #C7C9C6", +") c #D5D7D4", +"! c #FAFCF9", +" >> ", +" -- ", +" >--> ", +" ->>- ", +" >-!!-> ", +" ->!!>- ", +" >-!!&*-> ", +" -;#@;)>- ", +" >-#&.;!!-> ", +" ->!+@,!!>- ", +" >-!&@%;!!!-> ", +" ->)#,%,,&.;- ", +" >-!%'!#!$..+=> ", +" ->!&!!&&..++#- ", +">->>>>>>>>>>>>->", +" >>>>>>>>>>>>>> "}; diff --git a/elpa/auctex-13.1.3/images/prvwrk20.xpm b/elpa/auctex-13.1.3/images/prvwrk20.xpm new file mode 100644 index 0000000..d4b2045 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk20.xpm @@ -0,0 +1,40 @@ +/* XPM */ +static char * nwork20_xpm[] = { +"20 20 17 1", +" c None", +". c #000100", +"+ c #262825", +"@ c #2B2D2A", +"# c #444643", +"$ c #575956", +"% c #726D6B", +"& c #D16668", +"* c #FF6467", +"= c #979794", +"- c #E4999A", +"; c #B1B3B0", +"> c #FF9797", +", c #C9CBC8", +"' c #D3D5D2", +") c #E5E7E3", +"! c #FDFFFB", +" ** ", +" >**> ", +" **** ", +" >****> ", +" **>>** ", +" >**!!**> ", +" **>!!>** ", +" >**!!)!**> ", +" **>!'.)>** ", +" >*%$$;,!!**> ", +" *&=;.=!!!>** ", +" >*&;@@=!!!!**> ", +" **>,$=;!!!!>** ", +" >**)#%;=!!!!!**> ", +" **>=,;=';!,#;>** ", +" >**)%!)%!!=+..,**> ", +" **>='!)%!;....@-** ", +">**!;!!!='#####$=**>", +"********************", +"********************"}; diff --git a/elpa/auctex-13.1.3/images/prvwrk24.xbm b/elpa/auctex-13.1.3/images/prvwrk24.xbm new file mode 100644 index 0000000..61aea62 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk24.xbm @@ -0,0 +1,12 @@ +/* 2002 David Kastrup, GPL */ +#define prevwork_width 24 +#define prevwork_height 24 +#define prevwork_x_hot 0 +#define prevwork_y_hot 20 +static unsigned char prevwork_bits[] = { + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, + 0x00, 0xe7, 0x00, 0x00, 0xe7, 0x00, 0x80, 0xc3, 0x01, 0x80, 0xc3, 0x01, + 0xc0, 0x81, 0x03, 0xc0, 0x81, 0x03, 0xe0, 0x30, 0x07, 0xe0, 0x3f, 0x07, + 0x70, 0x0d, 0x0e, 0x70, 0x0d, 0x0e, 0x38, 0x0e, 0x1c, 0x38, 0x0f, 0x1c, + 0x1c, 0x1f, 0x38, 0x9c, 0xa5, 0x3b, 0x8e, 0xc4, 0x77, 0xce, 0xe4, 0x7f, + 0x47, 0xec, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; diff --git a/elpa/auctex-13.1.3/images/prvwrk24.xpm b/elpa/auctex-13.1.3/images/prvwrk24.xpm new file mode 100644 index 0000000..7d50b19 --- /dev/null +++ b/elpa/auctex-13.1.3/images/prvwrk24.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char * nwork24_xpm[] = { +"24 24 17 1", +" c None", +". c #000100", +"+ c #141513", +"@ c #212320", +"# c #313230", +"$ c #3B3D3A", +"% c #484947", +"& c #626461", +"* c #8C8E8B", +"= c #FF6467", +"- c #B6AFAC", +"; c #FF9696", +"> c #C4C6C3", +", c #D0D2CE", +"' c #FFCBCA", +") c #DDDFDC", +"! c #FBFDFA", +" ;; ", +" ;==; ", +" ==== ", +" ;====; ", +" ==;;== ", +" ;==''==; ", +" ==;!!;== ", +" ;=='!!'==; ", +" ==;!!!!;== ", +" ;=='!!>,'==; ", +" ==;!!!.%!;== ", +" ;=;$#$*,)!'==; ", +" ==&,*..!!!!;== ", +" ;==#,@.$!!!!'==; ", +" ==;!&.&&!!!!!;== ", +" ;==')*&*&!!!!!'==; ", +" ==;!*#&>&!!!!!!;== ", +" ;==')$)&->-!!)&*'==; ", +" ==;!&-!,&!!-,%..*;== ", +" ;==',%!!)$!!>#....-==; ", +" ==;!&>!!)@!>+.....+;== ", +";=='!-!!!!*!&%%%%%&&*==;", +"========================", +" ====================== "}; diff --git a/elpa/auctex-13.1.3/images/pspdf.xpm b/elpa/auctex-13.1.3/images/pspdf.xpm new file mode 100644 index 0000000..78d2887 --- /dev/null +++ b/elpa/auctex-13.1.3/images/pspdf.xpm @@ -0,0 +1,83 @@ +/* XPM */ +static char * pspdf5_xpm[] = { +"24 24 56 1", +" c None s backgroundToolBarColor", +". c #869CB4", +"+ c #00244C", +"@ c #000000", +"# c #002248", +"$ c #0050A9", +"% c #006FEB", +"& c #0066D9", +"* c #00336D", +"= c #37452B", +"- c #001070", +"; c #004BA2", +"> c #0078FF", +", c #0075FC", +"' c #004DB6", +") c #00072F", +"! c #0047FF", +"~ c #006DFF", +"{ c #0042CA", +"] c #00169E", +"^ c #000A45", +"/ c #445636", +"( c #0024FF", +"_ c #0027FF", +": c #0056ED", +"< c #001FA7", +"[ c #00179F", +"} c #526741", +"| c #001DCE", +"1 c #4C603C", +"2 c #566B43", +"3 c #5A7046", +"4 c #000B4C", +"5 c #0023F5", +"6 c #001492", +"7 c #000E65", +"8 c #00010B", +"9 c #001AB9", +"0 c #0022F0", +"a c #001387", +"b c #000942", +"c c #000C57", +"d c #D37F71", +"e c #0037C4", +"f c #6C84B7", +"g c #CE918A", +"h c #D4897A", +"i c #67102D", +"j c #C47474", +"k c #D69788", +"l c #CB8984", +"m c #D79C8D", +"n c #C8807D", +"o c #5A5A5A", +"p c #B50000", +"q c #AA7979", +" .+ @@@@ ", +" .#$%&* @@@=@@ ", +" -;%>>>,') @ @=@ ", +" -!~>>>{]^ @/@ ", +" -(_!:<[]^ @}@ ", +" -(((|]]]^ @@}}1@@ ", +" -(((|]]]^ @232@ ", +" 45((|]678 @}@ ", +" 490|ab @ ", +" -c ", +" @ ", +" @d@ ", +" eeef feef @ghi@ ", +" e e e @jgkii@ ", +" eeef feef @jlgmiii@ ", +" e e @jnlgmiiii@", +" e e e @jnlgkiii@ ", +" e feef o@jnhii@ ", +" o@di@ ", +"pppq pppq pppq @@ ", +"p p p p p ", +"pppq p p ppq ", +"p p p p ", +"p pppq p "}; diff --git a/elpa/auctex-13.1.3/images/sep.xpm b/elpa/auctex-13.1.3/images/sep.xpm new file mode 100644 index 0000000..151f5df --- /dev/null +++ b/elpa/auctex-13.1.3/images/sep.xpm @@ -0,0 +1,29 @@ +/* XPM */ +static char * sep_xpm[] = { +"1 24 2 1", +" c None s backgroundToolBarColor", +". c #776758", +" ", +" ", +" ", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +".", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/spell.xpm b/elpa/auctex-13.1.3/images/spell.xpm new file mode 100644 index 0000000..b53f451 --- /dev/null +++ b/elpa/auctex-13.1.3/images/spell.xpm @@ -0,0 +1,64 @@ +/* XPM */ +static char * spell_xpm[] = { +"24 24 37 1", +" c None", +". c #000000", +"+ c #8BBB8C", +"@ c #ABD0AC", +"# c #1A3B1A", +"$ c #8ABA88", +"% c #B4D5B4", +"& c #70A770", +"* c #132C13", +"= c #77A676", +"- c #2D2D2D", +"; c #CBDFCB", +"> c #6FAE6E", +", c #A8CBA6", +"' c #6D9D6C", +") c #D0E4D0", +"! c #6FAF6F", +"~ c #587055", +"{ c #B8D6B8", +"] c #5B9159", +"^ c #D4E4D4", +"/ c #67AF67", +"( c #5D905B", +"_ c #9FC59D", +": c #93BE92", +"< c #B5D1B5", +"[ c #67AF68", +"} c #63A261", +"| c #BBD6BA", +"1 c #82B881", +"2 c #75AF74", +"3 c #6B8868", +"4 c #9DC39D", +"5 c #7DB17B", +"6 c #6BA368", +"7 c #485C46", +"8 c #89BA88", +" ", +" ", +" ", +" ", +" ... .... ... ", +" .. . .. . .. . ", +" .. . .... .. ", +" ..... .. . .. ", +" .. . .. . .. . . ", +" .. . .... ... ... ", +" .+. ", +" .. .@# ", +" .$. .%&. ", +" *=. -;>. ", +" .,'. .)!~. ", +" .{].^/(. ", +" ._:<[}~. ", +" .|123. ", +" .4567. ", +" .83. ", +" .37. ", +" .. ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/tex.xpm b/elpa/auctex-13.1.3/images/tex.xpm new file mode 100644 index 0000000..6c55bc5 --- /dev/null +++ b/elpa/auctex-13.1.3/images/tex.xpm @@ -0,0 +1,260 @@ +/* XPM */ +static char * tex6_xpm[] = { +"24 24 233 2", +" c None s backgroundToolBarColor", +". c #3D9944", +"+ c #3E9842", +"@ c #3DA243", +"# c #3C9B47", +"$ c #3EA442", +"% c #290400", +"& c #304116", +"* c #3E8D43", +"= c #3F7744", +"- c #977C5E", +"; c #842835", +"> c #9C3635", +", c #94506A", +"' c #54764E", +") c #3DBA41", +"! c #386C34", +"~ c #CABC9A", +"{ c #C1AE8E", +"] c #795642", +"^ c #907F62", +"/ c #FFFFC1", +"( c #94AC73", +"_ c #664535", +": c #8A6A61", +"< c #6D302B", +"[ c #943A3B", +"} c #772437", +"| c #52382D", +"1 c #664940", +"2 c #99A578", +"3 c #6E4835", +"4 c #6D5642", +"5 c #9DBA88", +"6 c #A3B181", +"7 c #A3A982", +"8 c #B9968B", +"9 c #BF8A7F", +"0 c #CAA8A0", +"a c #6F9966", +"b c #CEE6B0", +"c c #3E8946", +"d c #808C6A", +"e c #947F66", +"f c #916B50", +"g c #370708", +"h c #5D181B", +"i c #664437", +"j c #F2DBB4", +"k c #621E1C", +"l c #782C33", +"m c #411712", +"n c #82806E", +"o c #868266", +"p c #C1BFA2", +"q c #C7C2A8", +"r c #82806A", +"s c #84826C", +"t c #E8E8C7", +"u c #D1B08B", +"v c #4A1A16", +"w c #5C2628", +"x c #7F3630", +"y c #6B262B", +"z c #82826F", +"A c #BBBABD", +"B c #F8FFFD", +"C c #404448", +"D c #48424A", +"E c #FFFEFF", +"F c #BBC0BB", +"G c #9C6D56", +"H c #5D201D", +"I c #712723", +"J c #868471", +"K c #A29EF2", +"L c #3132E4", +"M c #181766", +"N c #807E80", +"O c #2F29CF", +"P c #A46D56", +"Q c #6C0E12", +"R c #6B2731", +"S c #7F7F6F", +"T c #8E8BE8", +"U c #141369", +"V c #504D7F", +"W c #848081", +"X c #2725AA", +"Y c #A46F58", +"Z c #833A33", +"` c #040400", +" . c #BFBE98", +".. c #7F7F6C", +"+. c #8D523D", +"@. c #580F16", +"#. c #66283A", +"$. c #312B23", +"%. c #DCDFBB", +"&. c #E4D7A8", +"*. c #B48566", +"=. c #4E3025", +"-. c #3F0810", +";. c #9C4256", +">. c #31302E", +",. c #E2E0C7", +"'. c #ACA896", +"). c #CFD1B0", +"!. c #ECE6CB", +"~. c #F0D9AC", +"{. c #A26048", +"]. c #50271C", +"^. c #3D030C", +"/. c #392F26", +"(. c #E4E2CB", +"_. c #ACAA92", +":. c #48453B", +"<. c #878364", +"[. c #83806D", +"}. c #B2B496", +"|. c #CFBD94", +"1. c #8C5037", +"2. c #4C2318", +"3. c #351114", +"4. c #522B2B", +"5. c #B07F6B", +"6. c #62433A", +"7. c #A0876A", +"8. c #BFBB96", +"9. c #B8C2A0", +"0. c #1E140C", +"a. c #35210C", +"b. c #2B2106", +"c. c #A09A96", +"d. c #CCBF9A", +"e. c #AA8368", +"f. c #B4846A", +"g. c #AE826A", +"h. c #D2B89A", +"i. c #EAD0AA", +"j. c #9E6852", +"k. c #542D25", +"l. c #441C16", +"m. c #312019", +"n. c #5F2D31", +"o. c #604835", +"p. c #A29A8F", +"q. c #3D3123", +"r. c #A09698", +"s. c #BFBBA2", +"t. c #C7BB9C", +"u. c #B38A71", +"v. c #A05250", +"w. c #1A0400", +"x. c #520308", +"y. c #350010", +"z. c #584C44", +"A. c #444637", +"B. c #7F625E", +"C. c #834A3F", +"D. c #AA7F6D", +"E. c #D2BC9E", +"F. c #E6E4BD", +"G. c #A66456", +"H. c #2B0702", +"I. c #602A2B", +"J. c #5A2229", +"K. c #3C3831", +"L. c #6F6B58", +"M. c #797B6D", +"N. c #484A3E", +"O. c #ACA7A2", +"P. c #4C463E", +"Q. c #807E71", +"R. c #686F5A", +"S. c #605F56", +"T. c #E0D9BC", +"U. c #FDFACB", +"V. c #C5BD9C", +"W. c #8B5E4E", +"X. c #561F1A", +"Y. c #582E2F", +"Z. c #6F3A3A", +"`. c #814247", +" + c #94947D", +".+ c #858B75", +"++ c #9C9E81", +"@+ c #E0DBBB", +"#+ c #CFC19C", +"$+ c #483325", +"%+ c #661718", +"&+ c #995657", +"*+ c #732428", +"=+ c #7B2C2E", +"-+ c #655347", +";+ c #DACDA6", +">+ c #F6E5B8", +",+ c #73503A", +"'+ c #643433", +")+ c #894043", +"!+ c #9C5156", +"~+ c #681B23", +"{+ c #873E43", +"]+ c #5D2E34", +"^+ c #623C46", +"/+ c #775A50", +"(+ c #858271", +"_+ c #987B71", +":+ c #524024", +"<+ c #7D6C56", +"[+ c #8A806F", +"}+ c #7B826D", +"|+ c #853626", +"1+ c #894A3C", +"2+ c #75292C", +"3+ c #93594C", +"4+ c #623739", +"5+ c #8B5A56", +"6+ c #4E0E1C", +"7+ c #7E3F47", +"8+ c #804047", +"9+ c #6E3A3D", +"0+ c #9F6662", +"a+ c #A05A62", +"b+ c #4C2626", +"c+ c #A45862", +"d+ c #731C21", +"e+ c #964648", +"f+ c #722020", +"g+ c #620818", +"h+ c #A0675E", +"i+ c #561014", +"j+ c #5A0414", +" ", +" . + @ + # $ % ", +" % & * = - ; > , ' = ) ! ~ { ] ", +" ^ / ( _ : < [ } | ' 1 _ 2 ~ % 3 ", +" 4 / 5 6 7 8 9 0 a b c d / e f g h ", +" i / / / / / / / / / / / j 3 k l ", +" m / n o p / q r s t / / u v w x y ", +" z z A B C / D E F n / / j G H I ", +" J z K L M / N K O M / / j P h Q R ", +" S z T U V / W T X V / / u Y h Z ", +" ` t ...t / t . ./ / / u +.h @.#. ", +" $.%./ ../ / / / / / / / &.*.=.-.Z ;. ", +" >.,./ '.)./ / !./ / / / / ~.{.].^.Z ;. ", +" /.(./ _.:.<.[...}./ / / / / |.1.2.3.4. ", +"5.5.6.7.8.9.0.a.b.c.d.e.5.f.g.h.i.j.k.l.m.n. ", +" o./ / / p.q.r.s./ / / / / t.u.v.w.x. ", +"5.5.y.z./ / / A./ / / B.C.D.E.F.G.H.I.;.J. ", +" K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. ", +" +/ .+/ / / ++@+/ / #+$+%+&+*+=+ ", +" -+/ / / ;+/ / / >+,+'+)+!+~+{+]+^+ ", +" /+(+_+:+<+[+}+|+1+2+3+4+5+6+ ", +" 7+7+8+9+0+a+b+c+d+e+ f+ ", +" g+h+ i+ j+ ", +" "}; diff --git a/elpa/auctex-13.1.3/images/view.xpm b/elpa/auctex-13.1.3/images/view.xpm new file mode 100644 index 0000000..9a87ecf --- /dev/null +++ b/elpa/auctex-13.1.3/images/view.xpm @@ -0,0 +1,31 @@ +/* XPM */ +static char * view15_xpm[] = { +"24 24 4 1", +" c None s backgroundToolBarColor", +". c #000000", +"+ c #565656", +"@ c #FFFFFF", +" ", +" ", +" ", +" ", +" ... ", +" .+ . ", +" .+ . ", +" .+ .+ ", +" .+ .+ ... ", +" .+ .+ ..", +" .... .+ .", +" .@@ +. .+ .+", +" .@@@ +. .+ .+ ", +" .@@@ . .... .+ ", +" . @ ...@@ +.. ", +" +. +. .@@@ +. ", +" +.++. .@@@ . ", +" +.. . @ . ", +" +. +. ", +" +.++. ", +" +.. ", +" ", +" ", +" "}; diff --git a/elpa/auctex-13.1.3/images/viewdvi.xpm b/elpa/auctex-13.1.3/images/viewdvi.xpm new file mode 100644 index 0000000..a527f55 --- /dev/null +++ b/elpa/auctex-13.1.3/images/viewdvi.xpm @@ -0,0 +1,58 @@ +/* XPM */ +static char * viewdvi11_xpm[] = { +"24 24 31 1", +" c None s backgroundToolBarColor", +". c #090909", +"+ c #000000", +"@ c #292929", +"# c #8E8E8E", +"$ c #2D2D2D", +"% c #303030", +"& c #2B2B2B", +"* c #3C3C3C", +"= c #1F1F1F", +"- c #101010", +"; c #1A1A1A", +"> c #2E2E2E", +", c #FFFFFF", +"' c #C3C3C3", +") c #252525", +"! c #191919", +"~ c #131313", +"{ c #1D1D1D", +"] c #0D0D0D", +"^ c #121212", +"/ c #444444", +"( c #3B3B3B", +"_ c #3D3D3D", +": c #080808", +"< c #295E29", +"[ c #5ABD5A", +"} c #488148", +"| c #4CA14C", +"1 c #4D904D", +"2 c #4FA64F", +" .+ ", +" @# + ", +" $# @ ", +" %# &# ", +" @# ++ ", +" *=- ;# + ", +" >,,') !# ~ ", +" >,, + !# {# ", +" ],, ++ *=- =# ", +" #^ /+ >,,')# ", +" ($_: >,, + ", +" ## ],, + ", +" #^ /+ ", +" ($_: ", +" ## ", +" ", +" <<<[ < < <", +" < < < < <", +" < < < < <", +" < < } } <", +" < < |11| <", +" < < }} <", +" <<<[ 22 <", +" "}; diff --git a/elpa/auctex-13.1.3/images/viewpdf.xpm b/elpa/auctex-13.1.3/images/viewpdf.xpm new file mode 100644 index 0000000..4a31737 --- /dev/null +++ b/elpa/auctex-13.1.3/images/viewpdf.xpm @@ -0,0 +1,54 @@ +/* XPM */ +static char * viewpdf5_xpm[] = { +"24 24 27 1", +" c None s backgroundToolBarColor", +". c #090909", +"+ c #000000", +"@ c #292929", +"# c #8E8E8E", +"$ c #2D2D2D", +"% c #303030", +"& c #2B2B2B", +"* c #3C3C3C", +"= c #1F1F1F", +"- c #101010", +"; c #1A1A1A", +"> c #2E2E2E", +", c #FFFFFF", +"' c #C3C3C3", +") c #252525", +"! c #191919", +"~ c #131313", +"{ c #1D1D1D", +"] c #0D0D0D", +"^ c #121212", +"/ c #444444", +"( c #3B3B3B", +"_ c #3D3D3D", +": c #080808", +"< c #B50000", +"[ c #AA7979", +" .+ ", +" @# + ", +" $# @ ", +" %# &# ", +" @# ++ ", +" *=- ;# + ", +" >,,') !# ~ ", +" >,, + !# {# ", +" ],, ++ *=- =# ", +" #^ /+ >,,')# ", +" ($_: >,, + ", +" ## ],, + ", +" #^ /+ ", +" ($_: ", +" ## ", +" ", +" <<<[ <<<[ <<<[", +" < < < < < ", +" < < < < < ", +" <<<[ < < <<[ ", +" < < < < ", +" < < < < ", +" < <<<[ < ", +" "}; diff --git a/elpa/auctex-13.1.3/images/viewps.xpm b/elpa/auctex-13.1.3/images/viewps.xpm new file mode 100644 index 0000000..c8b467a --- /dev/null +++ b/elpa/auctex-13.1.3/images/viewps.xpm @@ -0,0 +1,54 @@ +/* XPM */ +static char * viewps8_xpm[] = { +"24 24 27 1", +" c None s backgroundToolBarColor", +". c #090909", +"+ c #000000", +"@ c #292929", +"# c #8E8E8E", +"$ c #2D2D2D", +"% c #303030", +"& c #2B2B2B", +"* c #3C3C3C", +"= c #1F1F1F", +"- c #101010", +"; c #1A1A1A", +"> c #2E2E2E", +", c #FFFFFF", +"' c #C3C3C3", +") c #252525", +"! c #191919", +"~ c #131313", +"{ c #1D1D1D", +"] c #0D0D0D", +"^ c #121212", +"/ c #444444", +"( c #3B3B3B", +"_ c #3D3D3D", +": c #080808", +"< c #0037C4", +"[ c #6C84B7", +" .+ ", +" @# + ", +" $# @ ", +" %# &# ", +" @# ++ ", +" *=- ;# + ", +" >,,') !# ~ ", +" >,, + !# {# ", +" ],, ++ *=- =# ", +" #^ /+ >,,')# ", +" ($_: >,, + ", +" ## ],, + ", +" #^ /+ ", +" ($_: ", +" ## ", +" ", +" <<<[ [<<[ ", +" < < < < ", +" < < < ", +" <<<[ [<<[ ", +" < < ", +" < < < ", +" < [<<[ ", +" "}; diff --git a/elpa/auctex-13.1.3/latex-flymake.el b/elpa/auctex-13.1.3/latex-flymake.el new file mode 100644 index 0000000..2a86ebe --- /dev/null +++ b/elpa/auctex-13.1.3/latex-flymake.el @@ -0,0 +1,104 @@ +;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- + +;; Copyright (C), 2018 Free Software Foundation, Inc. + +;; Author: Alex Branham <branham@utexas.edu> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-02-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides flymake integration for latex documents using +;; "chktex" as a backend. You must be running Emacs 26 or newer. +;; Enable it by adding the following to your init file: + +;; (add-hook 'LaTeX-mode-hook #'flymake-mode) + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) +(require 'flymake) + +(defvar-local LaTeX--flymake-proc nil) + +(defun LaTeX-flymake (report-fn &rest _args) + "Setup flymake integration. + +REPORT-FN is flymake's callback function." + (unless (executable-find "chktex") + (error "Cannot find chktex")) + (when (process-live-p LaTeX--flymake-proc) + (kill-process LaTeX--flymake-proc)) + (let ((source (current-buffer))) + (save-restriction + (widen) + (setq + LaTeX--flymake-proc + (make-process + :name "LaTeX-flymake" :noquery t :connection-type 'pipe + :buffer (generate-new-buffer " *LaTeX-flymake*") + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :sentinel + (lambda (proc _event) + (when (eq 'exit (process-status proc)) + (unwind-protect + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (cl-loop + while (search-forward-regexp + (rx line-start "stdin:" + ;; line + (group-n 1 (one-or-more num)) + ":" + ;; column + (group-n 2 (one-or-more num)) + ":" + ;; This is information about the + ;; number of the warning, which we + ;; probably don't care about: + (one-or-more num) + ":" + ;; Warning message: + (group-n 3 (one-or-more not-newline)) line-end) + nil t) + for msg = (match-string 3) + for (beg . end) = (flymake-diag-region + source + (string-to-number (match-string 1)) + (string-to-number (match-string 2))) + for type = :warning + collect (flymake-make-diagnostic source + beg + end + type + msg) + into diags + finally (funcall report-fn diags))) + (flymake-log :warning "Canceling obsolete check %s" + proc)) + (kill-buffer (process-buffer proc))))))) + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) + (process-send-eof LaTeX--flymake-proc)))) + +(provide 'latex-flymake) +;;; latex-flymake.el ends here diff --git a/elpa/auctex-13.1.3/latex-flymake.elc b/elpa/auctex-13.1.3/latex-flymake.elc Binary files differnew file mode 100644 index 0000000..e77ca5d --- /dev/null +++ b/elpa/auctex-13.1.3/latex-flymake.elc diff --git a/elpa/auctex-13.1.3/latex.el b/elpa/auctex-13.1.3/latex.el new file mode 100644 index 0000000..5747449 --- /dev/null +++ b/elpa/auctex-13.1.3/latex.el @@ -0,0 +1,8146 @@ +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*- + +;; Copyright (C) 1991, 1993-2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides AUCTeX support for LaTeX. + +;;; Code: + +(require 'tex) +(require 'tex-style) +(require 'tex-ispell) +(when (<= 26 emacs-major-version) + ;; latex-flymake requires Emacs 26. + (require 'latex-flymake)) +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler for functions: +(declare-function outline-level "ext:outline" + nil) +(declare-function outline-mark-subtree "ext:outline" + nil) +(declare-function turn-off-filladapt-mode "ext:filladapt" + nil) + +;; This function is reported to be unknown when built +;; `with-native-compilation': +(declare-function LaTeX-flymake "latex-flymake" + (report-fn &rest _args)) + +;; Silence the compiler for variables: +(defvar outline-heading-alist) +(defvar TeX-auto-file) +(defvar LaTeX-section-list-changed) + +;;; Syntax + +(defvar LaTeX-optop "[" + "The LaTeX optional argument opening character.") + +(defvar LaTeX-optcl "]" + "The LaTeX optional argument closeing character.") + +;;; Style + +(defcustom LaTeX-default-style "article" + "Default when creating new documents." + :group 'LaTeX-environment + :type 'string) + +(defcustom LaTeX-default-options nil + "Default options to documentclass. +A comma-seperated list of strings." + :group 'LaTeX-environment + :type '(repeat (string :format "%v"))) + +(make-variable-buffer-local 'LaTeX-default-options) + +(defcustom LaTeX-insert-into-comments t + "Whether insertion commands stay in comments. +This allows using the insertion commands even when +the lines are outcommented, like in dtx files." + :group 'LaTeX-environment + :type 'boolean) + +(defun LaTeX-newline () + "Start a new line potentially staying within comments. +This depends on `LaTeX-insert-into-comments'." + (interactive) + (if LaTeX-insert-into-comments + (cond ((and (save-excursion (skip-chars-backward " \t") (bolp)) + (save-excursion + (skip-chars-forward " \t") + (looking-at (concat TeX-comment-start-regexp "+")))) + (beginning-of-line) + (insert (buffer-substring-no-properties + (line-beginning-position) (match-end 0))) + (newline)) + ((and (not (bolp)) + (save-excursion + (skip-chars-forward " \t") (not (TeX-escaped-p))) + (looking-at + (concat "[ \t]*" TeX-comment-start-regexp "+[ \t]*"))) + (delete-region (match-beginning 0) (match-end 0)) + (indent-new-comment-line)) + ;; `indent-new-comment-line' does nothing when + ;; `comment-auto-fill-only-comments' is non-nil, so we + ;; must be sure to be in a comment before calling it. In + ;; any other case `newline' is used. + ((TeX-in-comment) + (indent-new-comment-line)) + (t + (newline))) + (newline))) + + +;;; Syntax Table + +(defvar LaTeX-mode-syntax-table (copy-syntax-table TeX-mode-syntax-table) + "Syntax table used in LaTeX mode.") + +(progn ; set [] to match for LaTeX. + (modify-syntax-entry (string-to-char LaTeX-optop) + (concat "(" LaTeX-optcl) + LaTeX-mode-syntax-table) + (modify-syntax-entry (string-to-char LaTeX-optcl) + (concat ")" LaTeX-optop) + LaTeX-mode-syntax-table)) + +;;; Sections + +;; Declare dynamically scoped vars. +(defvar LaTeX-title nil "Dynamically bound by `LaTeX-section'.") +(defvar LaTeX-name nil "Dynamically bound by `LaTeX-section'.") +(defvar LaTeX-level nil "Dynamically bound by `LaTeX-section'.") +(defvar LaTeX-done-mark nil "Dynamically bound by `LaTeX-section'.") +(defvar LaTeX-toc nil "Dynamically bound by `LaTeX-section'.") + +(defun LaTeX-section (arg) + "Insert a template for a LaTeX section. +Determine the type of section to be inserted, by the argument ARG. + +If ARG is nil or missing, use the current level. +If ARG is a list (selected by \\[universal-argument]), go downward one level. +If ARG is negative, go up that many levels. +If ARG is positive or zero, use absolute level: + + 0 : part + 1 : chapter + 2 : section + 3 : subsection + 4 : subsubsection + 5 : paragraph + 6 : subparagraph + +The following variables can be set to customize: + +`LaTeX-section-hook' Hooks to run when inserting a section. +`LaTeX-section-label' Prefix to all section labels." + + (interactive "*P") + (let* ((val (prefix-numeric-value arg)) + (LaTeX-level (cond ((null arg) + (LaTeX-current-section)) + ((listp arg) + (LaTeX-down-section)) + ((< val 0) + (LaTeX-up-section (- val))) + (t val))) + (LaTeX-name (LaTeX-section-name LaTeX-level)) + (LaTeX-toc nil) + (LaTeX-title (if (TeX-active-mark) + (buffer-substring (region-beginning) + (region-end)) + "")) + (LaTeX-done-mark (make-marker))) + (run-hooks 'LaTeX-section-hook) + (LaTeX-newline) + (if (marker-position LaTeX-done-mark) + (goto-char (marker-position LaTeX-done-mark))) + (set-marker LaTeX-done-mark nil))) + +(defun LaTeX-current-section () + "Return the level of the section that contain point. +See also `LaTeX-section' for description of levels." + (save-excursion + (max (LaTeX-largest-level) + (if (re-search-backward (LaTeX-outline-regexp) nil t) + (- (LaTeX-outline-level) (LaTeX-outline-offset)) + (LaTeX-largest-level))))) + +(defun LaTeX-down-section () + "Return the value of a section one level under the current. +Tries to find what kind of section that have been used earlier in the +text, if this fail, it will just return one less than the current +section." + (save-excursion + (let ((current (LaTeX-current-section)) + (next nil) + (regexp (LaTeX-outline-regexp))) + (if (not (re-search-backward regexp nil t)) + (1+ current) + (while (not next) + (cond + ((eq (LaTeX-current-section) current) + (if (re-search-forward regexp nil t) + (if (<= (setq next (LaTeX-current-section)) current) ;Wow! + (setq next (1+ current))) + (setq next (1+ current)))) + ((not (re-search-backward regexp nil t)) + (setq next (1+ current))))) + next)))) + +(defun LaTeX-up-section (arg) + "Return the value of the section ARG levels above this one." + (save-excursion + (if (zerop arg) + (LaTeX-current-section) + (let ((current (LaTeX-current-section))) + (while (and (>= (LaTeX-current-section) current) + (re-search-backward (LaTeX-outline-regexp) + nil t))) + (LaTeX-up-section (1- arg)))))) + +(defvar LaTeX-section-list '(("part" 0) + ("chapter" 1) + ("section" 2) + ("subsection" 3) + ("subsubsection" 4) + ("paragraph" 5) + ("subparagraph" 6)) + "List which elements is the names of the sections used by LaTeX.") + +(defvar LaTeX-section-menu nil) +(make-variable-buffer-local 'LaTeX-section-menu) + +(defun LaTeX-section-list-add-locally (sections &optional clean) + "Add SECTIONS to `LaTeX-section-list'. +SECTIONS can be a single list containing the section macro name +as a string and the level as an integer or a list of such lists. + +If optional argument CLEAN is non-nil, remove any existing +entries from `LaTeX-section-list' before adding the new ones. + +The function will make `LaTeX-section-list' buffer-local and +invalidate the section submenu in order to let the menu filter +regenerate it. It is mainly a convenience function which can be +used in style files." + (when (stringp (car sections)) + (setq sections (list sections))) + (make-local-variable 'LaTeX-section-list) + (when clean (setq LaTeX-section-list nil)) + (dolist (elt sections) (add-to-list 'LaTeX-section-list elt t)) + (setq LaTeX-section-list + (sort (copy-sequence LaTeX-section-list) + (lambda (a b) (< (nth 1 a) (nth 1 b))))) + (setq LaTeX-section-menu nil)) + +(defun LaTeX-section-name (level) + "Return the name of the section corresponding to LEVEL." + (let ((entry (TeX-member level LaTeX-section-list + (lambda (a b) (equal a (nth 1 b)))))) + (if entry + (nth 0 entry) + nil))) + +(defun LaTeX-section-level (name) + "Return the level of the section NAME." + (let ((entry (TeX-member name LaTeX-section-list + (lambda (a b) (equal a (nth 0 b)))))) + + (if entry + (nth 1 entry) + nil))) + +(defcustom TeX-outline-extra nil + "List of extra TeX outline levels. + +Each element is a list with two entries. The first entry is the +regular expression matching a header, and the second is the level of +the header. See `LaTeX-section-list' for existing header levels." + :group 'LaTeX + :type '(repeat (group (regexp :tag "Match") + (integer :tag "Level")))) + +(defun LaTeX-outline-regexp (&optional anywhere) + "Return regexp for LaTeX sections. + +If optional argument ANYWHERE is not nil, do not require that the +header is at the start of a line." + (concat (if anywhere "" "^") + "[ \t]*" + (regexp-quote TeX-esc) + "\\(appendix\\|documentstyle\\|documentclass\\|" + (mapconcat #'car LaTeX-section-list "\\|") + "\\)\\b" + (if TeX-outline-extra + "\\|" + "") + (mapconcat #'car TeX-outline-extra "\\|") + "\\|" TeX-header-end + "\\|" TeX-trailer-start)) + +(defvar LaTeX-largest-level nil + "Largest sectioning level with current document class.") + +(make-variable-buffer-local 'LaTeX-largest-level) + +(defun LaTeX-largest-level () + "Return largest sectioning level with current document class. +Run style hooks before it has not been done." + (TeX-update-style) + LaTeX-largest-level) + +(defun LaTeX-largest-level-set (section) + "Set `LaTeX-largest-level' to the level of SECTION. +SECTION has to be a string contained in `LaTeX-section-list'. +Additionally the function will invalidate the section submenu in +order to let the menu filter regenerate it." + (setq LaTeX-largest-level (LaTeX-section-level section)) + (let ((offset (LaTeX-outline-offset))) + (when (> offset 0) + (let (lst) + (dolist (tup outline-heading-alist) + (setq lst (cons (cons (car tup) + (+ offset (cdr tup))) + lst))) + (setq outline-heading-alist (nreverse lst))))) + (setq LaTeX-section-menu nil)) + +(defun LaTeX-outline-offset () + "Offset to add to `LaTeX-section-list' levels to get outline level." + (- 2 (LaTeX-largest-level))) + +(defun TeX-look-at (list) + "Check if we are looking at the first element of a member of LIST. +If so, return the second element, otherwise return nil." + (while (and list + (not (looking-at (nth 0 (car list))))) + (setq list (cdr list))) + (if list + (nth 1 (car list)) + nil)) + +(defvar LaTeX-header-end + (concat "^[^%\n]*" (regexp-quote TeX-esc) "begin *" + TeX-grop "document" TeX-grcl) + "Default end of header marker for LaTeX documents.") + +(defvar LaTeX-trailer-start + (concat "^[^%\n]*" (regexp-quote TeX-esc) "end *" + TeX-grop "document" TeX-grcl) + "Default start of trailer marker for LaTeX documents.") + +(defun LaTeX-outline-level () + "Find the level of current outline heading in an LaTeX document." + (cond ((looking-at LaTeX-header-end) 1) + ((looking-at LaTeX-trailer-start) 1) + ((TeX-look-at TeX-outline-extra) + (max 1 (+ (TeX-look-at TeX-outline-extra) + (LaTeX-outline-offset)))) + (t + (save-excursion + (skip-chars-forward " \t") + (forward-char 1) + (cond ((looking-at "appendix") 1) + ((looking-at "documentstyle") 1) + ((looking-at "documentclass") 1) + ((TeX-look-at LaTeX-section-list) + (max 1 (+ (TeX-look-at LaTeX-section-list) + (LaTeX-outline-offset)))) + (t (outline-level))))))) + +(defun LaTeX-outline-name () + "Guess a name for the current header line." + (save-excursion + (if (re-search-forward "{\\([^\}]*\\)}" (+ (point) fill-column 10) t) + (match-string 1) + (buffer-substring (point) (min (point-max) (+ 20 (point))))))) + +(add-hook 'TeX-remove-style-hook + (lambda () (setq LaTeX-largest-level nil))) + +(defcustom LaTeX-section-hook + '(LaTeX-section-heading + LaTeX-section-title + ;; LaTeX-section-toc ; Most people won't want this + LaTeX-section-section + LaTeX-section-label) + "List of hooks to run when a new section is inserted. + +The following variables are set before the hooks are run + +LaTeX-level - numeric section level, see the documentation of `LaTeX-section'. +LaTeX-name - name of the sectioning command, derived from `LaTeX-level'. +LaTeX-title - The title of the section, default to an empty string. +LaTeX-toc - Entry for the table of contents list, default nil. +LaTeX-done-mark - Position of point afterwards, default nil (meaning end). + +The following standard hooks exist - + +LaTeX-section-heading: Query the user about the name of the +sectioning command. Modifies `LaTeX-level' and `LaTeX-name'. + +LaTeX-section-title: Query the user about the title of the +section. Modifies `LaTeX-title'. + +LaTeX-section-toc: Query the user for the toc entry. Modifies +`LaTeX-toc'. + +LaTeX-section-section: Insert LaTeX section command according to +`LaTeX-name', `LaTeX-title', and `LaTeX-toc'. If `LaTeX-toc' is +nil, no toc entry is inserted. If `LaTeX-toc' or `LaTeX-title' +are empty strings, `LaTeX-done-mark' will be placed at the point +they should be inserted. + +LaTeX-section-label: Insert a label after the section command. +Controled by the variable `LaTeX-section-label'. + +To get a full featured `LaTeX-section' command, insert + + (setq LaTeX-section-hook + \\='(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-toc + LaTeX-section-section + LaTeX-section-label)) + +in your init file such as .emacs.d/init.el or .emacs." + :group 'LaTeX-macro + :type 'hook + :options '(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-toc + LaTeX-section-section + LaTeX-section-label)) + + +(defcustom LaTeX-section-label + '(("part" . "part:") + ("chapter" . "chap:") + ("section" . "sec:") + ("subsection" . "sec:") + ("subsubsection" . "sec:")) + "Default prefix when asking for a label. + +Some LaTeX packages \(such as `fancyref'\) look at the prefix to generate some +text around cross-references automatically. When using those packages, you +should not change this variable. + +If it is a string, it it used unchanged for all kinds of sections. +If it is nil, no label is inserted. +If it is a list, the list is searched for a member whose car is equal +to the name of the sectioning command being inserted. The cdr is then +used as the prefix. If the name is not found, or if the cdr is nil, +no label is inserted." + :group 'LaTeX-label + :type '(choice (const :tag "none" nil) + (string :format "%v" :tag "Common") + (repeat :menu-tag "Level specific" + :format "\n%v%i" + (cons :format "%v" + (string :tag "Type") + (choice :tag "Prefix" + (const :tag "none" nil) + (string :format "%v")))))) + +;;; Section Hooks. + +(defun LaTeX-section-heading () + "Hook to prompt for LaTeX section name. +Insert this hook into `LaTeX-section-hook' to allow the user to change +the name of the sectioning command inserted with \\[LaTeX-section]." + (let ((string (completing-read + (concat "Level (default " LaTeX-name "): ") + LaTeX-section-list + nil nil nil nil LaTeX-name))) + ;; Update LaTeX-name + (if (not (zerop (length string))) + (setq LaTeX-name string)) + ;; Update level + (setq LaTeX-level (LaTeX-section-level LaTeX-name)))) + +(defun LaTeX-section-title () + "Hook to prompt for LaTeX section title. +Insert this hook into `LaTeX-section-hook' to allow the user to change +the title of the section inserted with \\[LaTeX-section]." + (setq LaTeX-title (TeX-read-string "Title: " LaTeX-title)) + (let ((region (and (TeX-active-mark) + (cons (region-beginning) (region-end))))) + (when region (delete-region (car region) (cdr region))))) + +(defun LaTeX-section-toc () + "Hook to prompt for the LaTeX section entry in the table of contents. +Insert this hook into `LaTeX-section-hook' to allow the user to insert +a different entry for the section in the table of contents." + (setq LaTeX-toc (TeX-read-string "Toc Entry: ")) + (if (zerop (length LaTeX-toc)) + (setq LaTeX-toc nil))) + +(defun LaTeX-section-section () + "Hook to insert LaTeX section command into the file. +Insert this hook into `LaTeX-section-hook' after those hooks that +set the `LaTeX-name', `LaTeX-title', and `LaTeX-toc' variables, +but before those hooks that assume that the section is already +inserted." + ;; insert a new line if the current line and the previous line are + ;; not empty (except for whitespace), with one exception: do not + ;; insert a new line if the previous (or current, sigh) line starts + ;; an environment (i.e., starts with `[optional whitespace]\begin') + (unless (save-excursion + (re-search-backward + (concat "^\\s-*\n\\s-*\\=\\|^\\s-*" (regexp-quote TeX-esc) + "begin") + (line-beginning-position 0) t)) + (LaTeX-newline)) + (insert TeX-esc LaTeX-name) + (cond ((null LaTeX-toc)) + ((zerop (length LaTeX-toc)) + (insert LaTeX-optop) + (set-marker LaTeX-done-mark (point)) + (insert LaTeX-optcl)) + (t + (insert LaTeX-optop LaTeX-toc LaTeX-optcl))) + (insert TeX-grop) + (if (zerop (length LaTeX-title)) + (set-marker LaTeX-done-mark (point))) + (insert LaTeX-title TeX-grcl) + (LaTeX-newline) + ;; If RefTeX is available, tell it that we've just made a new section + (and (fboundp 'reftex-notice-new-section) + (reftex-notice-new-section))) + +(defun LaTeX-section-label () + "Hook to insert a label after the sectioning command. +Insert this hook into `LaTeX-section-hook' to prompt for a label to be +inserted after the sectioning command. + +The behaviour of this hook is controlled by variable `LaTeX-section-label'." + (and (LaTeX-label LaTeX-name 'section) + (LaTeX-newline))) + +;;; Environments + +(defgroup LaTeX-environment nil + "Environments in AUCTeX." + :group 'LaTeX-macro) + +(defcustom LaTeX-default-environment "itemize" + "The default environment when creating new ones with `LaTeX-environment'. +It is overridden by `LaTeX-default-document-environment' when it +is non-nil and the current environment is \"document\"." + :group 'LaTeX-environment + :type 'string) +(make-variable-buffer-local 'LaTeX-default-environment) + +(defvar LaTeX-default-document-environment nil + "The default environment when creating new ones with +`LaTeX-environment' and the current one is \"document\". This +variable overrides `LaTeX-default-environment'.") +(make-variable-buffer-local 'LaTeX-default-document-environment) + +(defvar LaTeX-default-tabular-environment "tabular" + "The default tabular-like environment used when inserting a table env. +Styles such as tabularx may set it according to their needs.") +(make-variable-buffer-local 'LaTeX-default-tabular-environment) + +(defvar LaTeX-environment-history nil) + +;; Variable used to cache the current environment, e.g. for repeated +;; tasks in an environment, like indenting each line in a paragraph to +;; be filled. It must not have a non-nil value in general. That +;; means it is usually let-bound for such operations. +(defvar LaTeX-current-environment nil) + +(defun LaTeX-environment (arg) + "Make LaTeX environment (\\begin{...}-\\end{...} pair). +With optional ARG, modify current environment. + +It may be customized with the following variables: + +`LaTeX-default-environment' Your favorite environment. +`LaTeX-default-style' Your favorite document class. +`LaTeX-default-options' Your favorite document class options. +`LaTeX-float' Where you want figures and tables to float. +`LaTeX-table-label' Your prefix to labels in tables. +`LaTeX-figure-label' Your prefix to labels in figures. +`LaTeX-default-format' Format for array and tabular. +`LaTeX-default-width' Width for minipage and tabular*. +`LaTeX-default-position' Position for array and tabular." + + (interactive "*P") + (let* ((default (cond + ((TeX-near-bobp) "document") + ((and LaTeX-default-document-environment + (string-equal (LaTeX-current-environment) "document")) + LaTeX-default-document-environment) + (t LaTeX-default-environment))) + (environment (completing-read (concat "Environment type (default " + default "): ") + (LaTeX-environment-list-filtered) nil nil + nil 'LaTeX-environment-history default))) + ;; Use `environment' as default for the next time only if it is different + ;; from the current default. + (unless (equal environment default) + (setq LaTeX-default-environment environment)) + + (let ((entry (assoc environment (LaTeX-environment-list)))) + (if (null entry) + (LaTeX-add-environments (list environment))) + + (if arg + (LaTeX-modify-environment environment) + (LaTeX-environment-menu environment))))) + +(defun LaTeX-environment-menu (environment) + "Insert ENVIRONMENT around point or region." + (let ((entry (assoc environment (LaTeX-environment-list)))) + (cond ((not (and entry (nth 1 entry))) + (LaTeX-insert-environment environment)) + ((numberp (nth 1 entry)) + (let ((count (nth 1 entry)) + (args "")) + (while (> count 0) + (setq args (concat args TeX-grop TeX-grcl)) + (setq count (- count 1))) + (LaTeX-insert-environment environment args))) + ((or (stringp (nth 1 entry)) (vectorp (nth 1 entry))) + (let ((prompts (cdr entry)) + (args "")) + (dolist (elt prompts) + (let* ((optional (vectorp elt)) + (elt (if optional (elt elt 0) elt)) + (arg (TeX-read-string (concat (when optional "(Optional) ") + elt ": ")))) + (setq args (concat args + (cond ((and optional (> (length arg) 0)) + (concat LaTeX-optop arg LaTeX-optcl)) + ((not optional) + (concat TeX-grop arg TeX-grcl))))))) + (LaTeX-insert-environment environment args))) + (t + (apply (nth 1 entry) environment (nthcdr 2 entry)))))) + +(defun LaTeX-close-environment (&optional reopen) + "Create an \\end{...} to match the current environment. +With prefix-argument, reopen environment afterwards." + (interactive "*P") + (if (> (point) + (save-excursion + (beginning-of-line) + (when LaTeX-insert-into-comments + (if (looking-at comment-start-skip) + (goto-char (match-end 0)))) + (skip-chars-forward " \t") + (point))) + (LaTeX-newline)) + (let ((environment (LaTeX-current-environment 1)) marker) + (insert "\\end{" environment "}") + (indent-according-to-mode) + (if (or (not (looking-at "[ \t]*$")) + (and (TeX-in-commented-line) + (save-excursion (beginning-of-line 2) + (not (TeX-in-commented-line))))) + (LaTeX-newline) + (unless (= (forward-line 1) 0) + (insert "\n"))) + (indent-according-to-mode) + (when reopen + (save-excursion + (setq marker (point-marker)) + (set-marker-insertion-type marker t) + (LaTeX-environment-menu environment) + (delete-region (point) + (if (save-excursion (goto-char marker) + (bolp)) + (1- marker) + marker)) + (move-marker marker nil))))) + +(define-obsolete-variable-alias 'LaTeX-after-insert-env-hooks 'LaTeX-after-insert-env-hook "11.89") + +(defvar LaTeX-indent-environment-list) ;; Defined further below. + +(defvar LaTeX-after-insert-env-hook nil + "List of functions to be run at the end of `LaTeX-insert-environment'. +Each function is called with three arguments: the name of the +environment just inserted, the buffer position just before +\\begin and the position just before \\end.") + +(defun LaTeX-insert-environment (environment &optional extra) + "Insert LaTeX ENVIRONMENT with optional argument EXTRA." + (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point))))) + prefix content-start env-start env-end additional-indent) + (when (and active-mark (< (mark) (point))) (exchange-point-and-mark)) + ;; Compute the prefix. + (when (and LaTeX-insert-into-comments (TeX-in-commented-line)) + (save-excursion + (beginning-of-line) + (looking-at + (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)+[ \t]*")) + (setq prefix (match-string 0)))) + ;; What to do with the line containing point. + ;; - Open a new empty line for later insertion of "\begin{foo}" and + ;; put the point there. + ;; - If there were at first any non-whitespace texts between the + ;; point and EOL, send them into their new own line with possible + ;; comment prefix. + (cond (;; When the entire line consists of whitespaces except + ;; possible prefix... + (save-excursion (beginning-of-line) + (looking-at (concat prefix "[ \t]*$"))) + ;; ...make the line empty and put the point there. + (delete-region (match-beginning 0) (match-end 0))) + (;; When there are only whitespaces except possible prefix + ;; between the point and BOL (including the case the point + ;; is at BOL)... + (TeX-looking-at-backward (if prefix + (concat "^\\(" prefix "\\)?[ \t]*") + "^[ \t]*") + (line-beginning-position)) + ;; ...in this case, we have non-whitespace texts between + ;; the point and EOL, so send the entire line into a new + ;; next line and put the point on the empty line just + ;; created. + (beginning-of-line) + (newline) + (beginning-of-line 0) + ;; Take note that there are texts to be indented later + ;; unless the region is activated. + (unless active-mark + (setq additional-indent t))) + (;; In all other cases... + t + ;; ...insert a new empty line after deleting all + ;; whitespaces around the point, put the point there... + (delete-horizontal-space) + (if (eolp) + (newline) + ;; ...and if there were at first any non-whitespace texts + ;; between (the original position of) the point and EOL, + ;; send them into a new next line with possible comment + ;; prefix. + (newline 2) + (when prefix (insert prefix)) + (beginning-of-line 0) + ;; Take note that there are texts to be indented later + ;; unless the region is activated. + (unless active-mark + (setq additional-indent t))))) + ;; What to do with the line containing mark. + ;; If there is active region... + (when active-mark + ;; - Open a new empty line for later insertion of "\end{foo}" + ;; and put the mark there. + ;; - If there were at first any non-whitespace texts between the + ;; mark and EOL, pass them over the empty line and put them on + ;; their own line with possible comment prefix. + (save-excursion + (goto-char (mark)) + (cond (;; When the entire line consists of whitespaces except + ;; possible prefix... + (save-excursion (beginning-of-line) + (looking-at + (if prefix + (concat "\\(" prefix "\\)?[ \t]*$") + "[ \t]*$"))) + ;; ...make the line empty and put the mark there. + (delete-region (match-beginning 0) (match-end 0))) + (;; When there are only whitespaces except possible prefix + ;; between the mark and BOL (including the case the mark + ;; is at BOL)... + (TeX-looking-at-backward (if prefix + (concat "^\\(" prefix "\\)?[ \t]*") + "^[ \t]*") + (line-beginning-position)) + ;; ...in this case, we have non-whitespace texts + ;; between the mark and EOL, so send the entire line + ;; into a new next line and put the mark on the empty + ;; line just created. + (beginning-of-line) + (set-mark (point)) + (newline) + ;; Take note that there are texts to be indented later. + (setq additional-indent t)) + (;; In all other cases... + t + ;; ...make a new empty line after deleting all + ;; whitespaces around the mark, put the mark there... + (delete-horizontal-space) + (insert-before-markers "\n") + ;; ...and if there were at first any non-whitespace + ;; texts between (the original position of) the mark + ;; and EOL, send them into a new next line with + ;; possible comment prefix. + (unless (eolp) + (newline) + (when prefix (insert prefix)) + ;; Take note that there are texts to be indented + ;; later. + (setq additional-indent t)))))) + ;; Now insert the environment. + (when prefix (insert prefix)) + (setq env-start (point)) + (insert TeX-esc "begin" TeX-grop environment TeX-grcl) + (indent-according-to-mode) + (when extra (insert extra)) + (setq content-start (line-beginning-position 2)) + (unless active-mark + (newline) + (when prefix (insert prefix)) + (newline)) + (when active-mark (goto-char (mark))) + (when prefix (insert prefix)) + (insert TeX-esc "end" TeX-grop environment TeX-grcl) + (end-of-line 0) + (if active-mark + (progn + (or (assoc environment LaTeX-indent-environment-list) + (if auto-fill-function + ;; Fill the region only when `auto-fill-mode' is active. + (LaTeX-fill-region content-start (line-beginning-position 2)) + ;; Else just indent the region. (bug#48518) + (indent-region content-start (line-beginning-position 2)))) + (set-mark content-start)) + (indent-according-to-mode)) + ;; Indent \end{foo}. + (save-excursion (beginning-of-line 2) (indent-according-to-mode) + (when additional-indent + ;; Indent texts sent after the inserted + ;; environment. + (forward-line 1) (indent-according-to-mode))) + (TeX-math-input-method-off) + (setq env-end (save-excursion + (search-forward + (concat TeX-esc "end" TeX-grop + environment TeX-grcl)) + (match-beginning 0))) + (run-hook-with-args 'LaTeX-after-insert-env-hook + environment env-start env-end))) + +(defun LaTeX-environment-name-regexp () + "Return the regexp matching the name of a LaTeX environment. +This matches everything different from a TeX closing brace but +allowing one level of TeX group braces." + (concat "\\([^" (regexp-quote TeX-grcl) (regexp-quote TeX-grop) "]*\\(" + (regexp-quote TeX-grop) "[^" (regexp-quote TeX-grcl) + (regexp-quote TeX-grop) "]*" (regexp-quote TeX-grcl) "\\)*[^" + (regexp-quote TeX-grcl) (regexp-quote TeX-grop) "]*\\)")) + +(defvar LaTeX-after-modify-env-hook nil + "List of functions to be run at the end of `LaTeX-modify-environment'. +Each function is called with four arguments: the new name of the +environment, the former name of the environment, the buffer +position just before \\begin and the position just before +\\end.") + +(defun LaTeX-modify-environment (environment) + "Modify current ENVIRONMENT." + (let ((goto-end (lambda () + (LaTeX-find-matching-end) + (re-search-backward (concat (regexp-quote TeX-esc) + "end" + (regexp-quote TeX-grop) + "\\(" + (LaTeX-environment-name-regexp) + "\\)" + (regexp-quote TeX-grcl)) + (save-excursion (beginning-of-line 1) (point))))) + (goto-begin (lambda () + (LaTeX-find-matching-begin) + (prog1 (point) + (re-search-forward (concat (regexp-quote TeX-esc) + "begin" + (regexp-quote TeX-grop) + "\\(" + (LaTeX-environment-name-regexp) + "\\)" + (regexp-quote TeX-grcl)) + (save-excursion (end-of-line 1) (point))))))) + (save-excursion + (funcall goto-end) + (let ((old-env (match-string 1))) + (replace-match environment t t nil 1) + (beginning-of-line 1) + (funcall goto-begin) + (replace-match environment t t nil 1) + (end-of-line 1) + (run-hook-with-args 'LaTeX-after-modify-env-hook + environment old-env + (save-excursion (funcall goto-begin)) + (progn (funcall goto-end) (point))))))) + +(defvar LaTeX-syntactic-comments) ;; Defined further below. + +(defun LaTeX-current-environment (&optional arg) + "Return the name (a string) of the enclosing LaTeX environment. +With optional ARG>=1, find that outer level. + +If function is called inside a comment and +`LaTeX-syntactic-comments' is enabled, try to find the +environment in commented regions with the same comment prefix. + +The functions `LaTeX-find-matching-begin' and `LaTeX-find-matching-end' +work analogously." + (setq arg (if arg (if (< arg 1) 1 arg) 1)) + (let* ((in-comment (TeX-in-commented-line)) + (comment-prefix (and in-comment (TeX-comment-prefix))) + (case-fold-search nil)) + (save-excursion + (while (and (/= arg 0) + (re-search-backward + "\\\\\\(begin\\|end\\) *{\\([^}]+\\)}" nil t)) + (when (or (and LaTeX-syntactic-comments + (eq in-comment (TeX-in-commented-line)) + (or (not in-comment) + ;; Consider only matching prefixes in the + ;; commented case. + (string= comment-prefix (TeX-comment-prefix)))) + (and (not LaTeX-syntactic-comments) + (not (TeX-in-commented-line))) + ;; macrocode*? in docTeX-mode is special since we + ;; have also regular code lines not starting with a + ;; comment-prefix. Hence, the next check just looks + ;; if we're inside such a group and returns t to + ;; recognize such a situation. + (and (eq major-mode 'doctex-mode) + (member (match-string-no-properties 2) + '("macrocode" "macrocode*")))) + (setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg))))) + (if (/= arg 0) + "document" + (match-string-no-properties 2))))) + +(defun docTeX-in-macrocode-p () + "Determine if point is inside a macrocode environment." + (let ((case-fold-search nil)) + (save-excursion + (re-search-backward + (concat "^% " (regexp-quote TeX-esc) + "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") nil 'move) + (not (or (bobp) + (= (char-after (match-beginning 1)) ?e)))))) + + +;;; Environment Hooks + +(defvar LaTeX-document-style-hook nil + "List of hooks to run when inserting a document environment. + +To insert a hook here, you must insert it in the appropriate style file.") + +(defun LaTeX-env-document (&optional _ignore) + "Create new LaTeX document. +Also inserts a \\documentclass macro if there's none already and +prompts for the insertion of \\usepackage macros. + +The compatibility argument IGNORE is ignored." + ;; just assume a single valid \\documentclass, i.e., one not in a + ;; commented line + (let ((found nil)) + (save-excursion + (while (and (not found) + (re-search-backward + "\\\\documentclass\\(\\[[^]\n\r]*\\]\\)?\\({[^}]+}\\)" + nil t)) + (and (not (TeX-in-commented-line)) + (setq found t)))) + (when (not found) + (TeX-insert-macro "documentclass") + (LaTeX-newline) + (LaTeX-newline) + ;; Add a newline only if some `\usepackage' has been inserted. + (if (LaTeX-insert-usepackages) + (LaTeX-newline)) + (LaTeX-newline) + (end-of-line 0))) + (LaTeX-insert-environment "document") + (run-hooks 'LaTeX-document-style-hook) + (setq LaTeX-document-style-hook nil)) + +(defcustom LaTeX-float "" + "Default float position for figures and tables. +If nil, act like the empty string is given, but do not prompt. +\(The standard LaTeX classes use [tbp] as float position if the +optional argument is omitted.)" + :group 'LaTeX-environment + :type '(choice (const :tag "Do not prompt" nil) + (const :tag "Empty" "") + (string :format "%v"))) +(make-variable-buffer-local 'LaTeX-float) + +(defcustom LaTeX-top-caption-list nil + "List of float environments with top caption." + :group 'LaTeX-environment + :type '(repeat (string :format "%v"))) + +(defgroup LaTeX-label nil + "Adding labels for LaTeX commands in AUCTeX." + :group 'LaTeX) + +(defcustom LaTeX-label-function #'LaTeX-label--default + "A function inserting a label at point or returning a label string. +Called with two argument NAME and NO-INSERT where NAME is the environment. +The function has to return the label inserted, or nil if no label was +inserted. If the optional argument NO-INSERT is non-nil, then +the function has to return the label as string without any +insertion or nil if no label was read in." + :group 'LaTeX-label + :type 'function) + +(defcustom LaTeX-figure-label "fig:" + "Default prefix to figure labels." + :group 'LaTeX-label + :group 'LaTeX-environment + :type 'string) + +(defcustom LaTeX-table-label "tab:" + "Default prefix to table labels." + :group 'LaTeX-label + :group 'LaTeX-environment + :type 'string) + +(defcustom LaTeX-listing-label "lst:" + "Default prefix to listing labels. +This prefix should apply to all environments which typeset +code listings and take a caption and label." + :group 'LaTeX-label + :group 'LaTeX-environment + :type 'string) + +(defcustom LaTeX-default-format "" + "Default format for array and tabular environments." + :group 'LaTeX-environment + :type 'string) +(make-variable-buffer-local 'LaTeX-default-format) + +(defcustom LaTeX-default-width "1.0\\linewidth" + "Default width for minipage and tabular* environments." + :group 'LaTeX-environment + :type 'string) +(make-variable-buffer-local 'LaTeX-default-width) + +(defcustom LaTeX-default-position "" + "Default position for array and tabular environments. +If nil, act like the empty string is given, but do not prompt." + :group 'LaTeX-environment + :type '(choice (const :tag "Do not prompt" nil) + (const :tag "Empty" "") + string)) +(make-variable-buffer-local 'LaTeX-default-position) + +(defcustom LaTeX-equation-label "eq:" + "Default prefix to equation labels." + :group 'LaTeX-label + :type 'string) + +(defcustom LaTeX-eqnarray-label LaTeX-equation-label + "Default prefix to eqnarray labels." + :group 'LaTeX-label + :type 'string) + +(defun LaTeX-env-item (environment) + "Insert ENVIRONMENT and the first item." + (LaTeX-insert-environment environment) + (if (TeX-active-mark) + (progn + (LaTeX-find-matching-begin) + (end-of-line 1)) + (end-of-line 0)) + (delete-char 1) + (when (looking-at (concat "^[ \t]+$\\|" + "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) + (delete-region (point) (line-end-position))) + (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (deactivate-mark) + (LaTeX-insert-item) + ;; The inserted \item may have outdented the first line to the + ;; right. Fill it, if appropriate and `auto-fill-mode' is active. + (when (and auto-fill-function + (not (looking-at "$")) + (not (assoc environment LaTeX-indent-environment-list)) + (> (- (line-end-position) (line-beginning-position)) + (current-fill-column))) + (LaTeX-fill-paragraph nil))) + +(defcustom LaTeX-label-alist + '(("figure" . LaTeX-figure-label) + ("table" . LaTeX-table-label) + ("figure*" . LaTeX-figure-label) + ("table*" . LaTeX-table-label) + ("equation" . LaTeX-equation-label) + ("eqnarray" . LaTeX-eqnarray-label)) + "Lookup prefixes for labels. +An alist where the CAR is the environment name, and the CDR +either the prefix or a symbol referring to one. + +If the name is not found, or if the CDR is nil, no label is +automatically inserted for that environment. + +If you want to automatically insert a label for a environment but +with an empty prefix, use the empty string \"\" as the CDR of the +corresponding entry." + :group 'LaTeX-label + :type '(repeat (cons (string :tag "Environment") + (choice (string :tag "Label prefix") + (symbol :tag "Label prefix symbol"))))) + +(make-variable-buffer-local 'LaTeX-label-alist) + +(defvar TeX-read-label-prefix nil + "Initial input for the label in `TeX-read-label'.") + +(defun LaTeX-label (name &optional type no-insert) + "Insert a label for NAME at point. +The optional TYPE argument can be either environment or section: +in the former case this function looks up `LaTeX-label-alist' to +choose which prefix to use for the label, in the latter case +`LaTeX-section-label' will be looked up instead. If TYPE is nil, +you will be always prompted for a label, with an empty default +prefix. + +If `LaTeX-label-function' is a valid function, LaTeX label will +transfer the job to this function. + +If the optional NO-INSERT is non-nil, only the label is returned +and no insertion happens. Otherwise the inserted label is +returned, nil if it is empty." + (let ((TeX-read-label-prefix + (cond + ((eq type 'environment) + (cdr (assoc name LaTeX-label-alist))) + ((eq type 'section) + (if (assoc name LaTeX-section-list) + (if (stringp LaTeX-section-label) + LaTeX-section-label + (and (listp LaTeX-section-label) + (cdr (assoc name LaTeX-section-label)))) + "")) + ((null type) + "") + (t + nil))) + ) ;; label + (when (symbolp TeX-read-label-prefix) + (setq TeX-read-label-prefix (symbol-value TeX-read-label-prefix))) + (when TeX-read-label-prefix + (funcall (or LaTeX-label-function #'LaTeX-label--default) + name no-insert)))) + +(defun LaTeX-label--default (_name no-insert) + ;; Use completing-read as we do with `C-c C-m \label RET' + (let ((label (TeX-read-label t "What label" t))) + ;; No label or empty string entered? + (if (or (string= TeX-read-label-prefix label) + (string= "" label)) + (setq label nil) + ;; We have a label; when NO-INSERT is nil, insert + ;; \label{label} in the buffer, add new label to list of + ;; known labels and return it + (unless no-insert + (insert TeX-esc "label" TeX-grop label TeX-grcl)) + (LaTeX-add-labels label) + label))) + +(defcustom LaTeX-short-caption-prompt-length 40 + "The length that the caption of a figure should be before +propting for \\caption's optional short-version." + :group 'LaTeX-environment + :type 'integer) + +(defun LaTeX-compose-caption-macro (caption &optional short-caption) + "Return a \\caption macro for a given CAPTION as a string. +If SHORT-CAPTION is non-nil pass it as an optional argument to +\\caption." + (let ((short-caption-string + (if (and short-caption + (not (string= short-caption ""))) + (concat LaTeX-optop short-caption LaTeX-optcl)))) + (concat TeX-esc "caption" short-caption-string + TeX-grop caption TeX-grcl))) + +(defun LaTeX-env-figure (environment) + "Create ENVIRONMENT with \\caption and \\label commands." + (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e. + ; do not prompt + (TeX-read-string "(Optional) Float position: " LaTeX-float))) + (caption (TeX-read-string "Caption: ")) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string "(Optional) Short caption: "))) + (center (y-or-n-p "Center? ")) + (active-mark (and (TeX-active-mark) + (not (eq (mark) (point))))) + start-marker end-marker) + (when active-mark + (if (< (mark) (point)) + (exchange-point-and-mark)) + (setq start-marker (point-marker)) + (set-marker-insertion-type start-marker t) + (setq end-marker (copy-marker (mark)))) + (setq LaTeX-float float) + (LaTeX-insert-environment environment + (unless (zerop (length float)) + (concat LaTeX-optop float + LaTeX-optcl))) + (when active-mark + (goto-char start-marker) + (set-marker start-marker nil)) + (when center + (insert TeX-esc "centering") + (indent-according-to-mode) + (LaTeX-newline) + (indent-according-to-mode)) + ;; Insert caption and ask for a label, do nothing if user skips caption + (unless (zerop (length caption)) + (if (member environment LaTeX-top-caption-list) + ;; top caption + (progn + (insert (LaTeX-compose-caption-macro caption short-caption)) + ;; If `auto-fill-mode' is active, fill the caption. + (if auto-fill-function (LaTeX-fill-paragraph)) + (LaTeX-newline) + (indent-according-to-mode) + ;; ask for a label and insert a new line only if a label is + ;; actually inserted + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))) + ;; bottom caption (default) + (when active-mark (goto-char end-marker)) + (save-excursion + (LaTeX-newline) + (indent-according-to-mode) + ;; If there is an active region point is before the backslash of + ;; "\end" macro, go one line upwards. + (when active-mark (forward-line -1) (indent-according-to-mode)) + (insert (LaTeX-compose-caption-macro caption short-caption)) + ;; If `auto-fill-mode' is active, fill the caption. + (if auto-fill-function (LaTeX-fill-paragraph)) + ;; ask for a label and if necessary insert a new line between caption + ;; and label + (when (save-excursion (LaTeX-label environment 'environment)) + (LaTeX-newline) + (indent-according-to-mode))) + ;; Insert an empty line between caption and marked region, if any. + (when active-mark (LaTeX-newline) (forward-line -1)) + (indent-according-to-mode))) + (when (markerp end-marker) + (set-marker end-marker nil)) + (when (and (member environment '("table" "table*")) + ;; Suppose an existing tabular environment should just + ;; be wrapped into a table if there is an active region. + (not active-mark)) + (LaTeX-environment-menu LaTeX-default-tabular-environment)))) + +(defun LaTeX-env-array (environment) + "Insert ENVIRONMENT with position and column specifications. +Just like array and tabular." + (let ((pos (and LaTeX-default-position ; LaTeX-default-position can + ; be nil, i.e. do not prompt + (TeX-read-string "(Optional) Position: " LaTeX-default-position))) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format)))) + (setq LaTeX-default-position pos) + (setq LaTeX-default-format fmt) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop fmt TeX-grcl))) + (LaTeX-item-array t))) + +(defun LaTeX-env-label (environment) + "Insert ENVIRONMENT and prompt for label." + (LaTeX-insert-environment environment) + (when (TeX-active-mark) + ;; Point is at the end of the region. Move it back to the + ;; beginning of the region. + (exchange-point-and-mark) + (indent-according-to-mode)) + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode)) + (when (TeX-active-mark) + (indent-region (point) (mark)) + ;; Restore the positions of point and mark. + (exchange-point-and-mark))) + +(defun LaTeX-env-list (environment) + "Insert ENVIRONMENT and the first item." + (let ((label (TeX-read-string "Default Label: "))) + (LaTeX-insert-environment environment + (format "{%s}{}" label)) + (end-of-line 0) + (delete-char 1) + (delete-horizontal-space)) + (LaTeX-insert-item)) + +(defun LaTeX-env-minipage (environment) + "Create new LaTeX minipage or minipage-like ENVIRONMENT." + (let* ((pos (and LaTeX-default-position ; LaTeX-default-position can + ; be nil, i.e. do not prompt + (completing-read + (TeX-argument-prompt t nil "Position") + '("t" "b" "c")))) + (height (when (and pos (not (string= pos ""))) + (completing-read (TeX-argument-prompt t nil "Height") + ;; A valid length can be a macro + ;; or a length of the form + ;; <value><dimension>. Input + ;; starting with a `\' can be + ;; completed with length macros. + (mapcar (lambda (elt) + (concat TeX-esc (car elt))) + (LaTeX-length-list))))) + (inner-pos (when (and height (not (string= height ""))) + (completing-read + (TeX-argument-prompt t nil "Inner position") + '("t" "b" "c" "s")))) + (width (TeX-read-string + (TeX-argument-prompt nil nil (format "Width (default %s)" + LaTeX-default-width)) + nil nil LaTeX-default-width))) + (setq LaTeX-default-position pos) + (setq LaTeX-default-width width) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (unless (zerop (length height)) + (concat LaTeX-optop height LaTeX-optcl)) + (unless (zerop (length inner-pos)) + (concat LaTeX-optop inner-pos LaTeX-optcl)) + (concat TeX-grop width TeX-grcl))))) + +(defun LaTeX-env-tabular* (environment) + "Insert ENVIRONMENT with width, position and column specifications." + (let ((width (TeX-read-string + (format "Width (default %s): " LaTeX-default-width) + nil nil LaTeX-default-width)) + (pos (and LaTeX-default-position ; LaTeX-default-position can + ; be nil, i.e. do not prompt + (TeX-read-string "(Optional) Position: " LaTeX-default-position))) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format)))) + (setq LaTeX-default-width width) + (setq LaTeX-default-position pos) + (setq LaTeX-default-format fmt) + (LaTeX-insert-environment environment + (concat + (concat TeX-grop width TeX-grcl) ;; not optional! + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop fmt TeX-grcl))) + (LaTeX-item-tabular* t))) + +(defun LaTeX-env-picture (environment) + "Insert ENVIRONMENT with width, height specifications." + (let ((width (TeX-read-string "Width: ")) + (height (TeX-read-string "Height: ")) + (x-offset (TeX-read-string "X Offset: ")) + (y-offset (TeX-read-string "Y Offset: "))) + (if (zerop (length x-offset)) + (setq x-offset "0")) + (if (zerop (length y-offset)) + (setq y-offset "0")) + (LaTeX-insert-environment environment + (concat + (format "(%s,%s)" width height) + (if (not (and (string= x-offset "0") + (string= y-offset "0"))) + (format "(%s,%s)" x-offset y-offset)))))) + +(defun LaTeX-env-bib (environment) + "Insert ENVIRONMENT with label for bibitem." + (LaTeX-insert-environment environment + (concat TeX-grop + (TeX-read-string + (format "Label for BibItem (default %s): " "99") + nil nil "99") + TeX-grcl)) + (end-of-line 0) + (delete-char 1) + (delete-horizontal-space) + (LaTeX-insert-item)) + +(defun LaTeX-env-contents (environment) + "Insert ENVIRONMENT with optional argument and filename for contents." + (let* ((opt '("overwrite" "force" "nosearch")) + (arg (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Options") + (if (string= environment "filecontents*") + opt + (cons "noheader" opt))) + ","))) + (LaTeX-insert-environment environment + (concat + (when (and arg (not (string= arg ""))) + (concat LaTeX-optop arg LaTeX-optcl)) + TeX-grop + (TeX-read-string "File: ") + TeX-grcl))) + (delete-horizontal-space)) + +(defun LaTeX-env-args (environment &rest args) + "Insert ENVIRONMENT and arguments defined by ARGS." + (LaTeX-insert-environment environment) + (save-excursion + (LaTeX-find-matching-begin) + (end-of-line) + (let ((TeX-exit-mark (or TeX-exit-mark + (make-marker)))) + (TeX-parse-arguments args)))) + +(defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals environment) + "Query for a label and insert it in the optional argument of an environment. +OPTIONAL is ignored. Optional KEYWORD is a string to search for +in the optional argument, label is only included if KEYWORD is +found. KEYVALS is a string with key=val's read in. If nil, this +function searchs for key=val's itself. ENVIRONMENT is a string +with the name of environment, if non-nil, don't bother to find +out." + (let ((env-start (make-marker)) + (body-start (make-marker)) + (opt-start (make-marker)) + (opt-end (make-marker)) + (currenv (or environment (LaTeX-current-environment)))) + ;; Save the starting point as we will come back here + (set-marker body-start (point)) + ;; Go to the start of the current environment and save the position + (LaTeX-find-matching-begin) + (set-marker env-start (point)) + ;; Check if an opt. argument is there; assume that it starts in + ;; the same line and save the points in markers + (when (re-search-forward + (concat "\\\\begin{" currenv "}[ \t]*\\[") body-start t) + (set-marker opt-start (1- (point))) + (goto-char opt-start) + (forward-sexp) + (set-marker opt-end (1- (point)))) + ;; If keyword argument is given and keyvals argument is not given, + ;; parse the optional argument and put it into keyvals + (when (and keyword + (marker-position opt-start) + (not keyvals)) + (setq keyvals (buffer-substring-no-properties + (1+ opt-start) opt-end))) + ;; If keyword is given, only insert a label when keyword is found + ;; inside the keyvals. If keyword is nil, then insert a label + ;; anyways + (if (stringp keyword) + (when (and (stringp keyvals) + (not (string= keyvals "")) + (string-match (concat keyword "[ \t]*=") keyvals)) + (goto-char opt-end) + (let ((opt-label (LaTeX-label currenv 'environment t))) + (when opt-label + (insert (if (equal (preceding-char) ?,) + "label=" + ",label=") + TeX-grop opt-label TeX-grcl)))) + (let ((opt-label (LaTeX-label currenv 'environment t))) + (when opt-label + ;; Check if an opt. argument is found and go to the end if + (if (marker-position opt-end) + (progn + (goto-char opt-end) + (insert (if (equal (preceding-char) ?,) + "label=" + ",label=") + TeX-grop opt-label TeX-grcl)) + ;; Otherwise start at the beginning of environment in + ;; order to not mess with any other mandatory arguments + ;; which can be there + (goto-char env-start) + (re-search-forward (concat "\\\\begin{" currenv "}")) + (insert LaTeX-optop "label=" TeX-grop opt-label TeX-grcl LaTeX-optcl))))) + ;; Go to where we started and clean up the markers + (goto-char body-start) + (set-marker env-start nil) + (set-marker body-start nil) + (set-marker opt-start nil) + (set-marker opt-end nil))) + +;;; Item hooks + +(defvar LaTeX-item-list nil + "A list of environments where items have a special syntax. +The cdr is the name of the function, used to insert this kind of items.") + +(defun LaTeX-insert-item () + "Insert a new item in an environment. +You may use `LaTeX-item-list' to change the routines used to insert the item." + (interactive "*") + (let ((environment (LaTeX-current-environment))) + (when (and (TeX-active-mark) + (> (point) (mark))) + (exchange-point-and-mark)) + (unless (bolp) (LaTeX-newline)) + (if (assoc environment LaTeX-item-list) + (funcall (cdr (assoc environment LaTeX-item-list))) + (TeX-insert-macro "item")) + (indent-according-to-mode))) + +(defvar TeX-arg-item-label-p) ;; Defined further below. + +(defun LaTeX-item-argument () + "Insert a new item with an optional argument." + (let ((TeX-arg-item-label-p t) + (TeX-insert-macro-default-style 'show-optional-args)) + (TeX-insert-macro "item"))) + +(defun LaTeX-item-bib () + "Insert a new bibitem." + (TeX-insert-macro "bibitem")) + +(defvar LaTeX-array-skipping-regexp (regexp-opt '("[t]" "[b]" "")) + "Regexp matching between \\begin{xxx} and column specification. +For array and tabular environments. See `LaTeX-insert-ampersands' for +detail.") + +(defvar LaTeX-tabular*-skipping-regexp + ;; Assume width specification contains neither nested curly brace + ;; pair nor escaped "}". + (concat "{[^}]*}[ \t]*" (regexp-opt '("[t]" "[b]" ""))) + "Regexp matching between \\begin{tabular*} and column specification. +For tabular* environment only. See `LaTeX-insert-ampersands' for detail.") + +(defun LaTeX-item-array (&optional suppress) + "Insert line break macro on the last line and suitable number of &'s. +For array and tabular environments. + +If SUPPRESS is non-nil, do not insert line break macro." + (unless suppress + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + (LaTeX-insert-ampersands + LaTeX-array-skipping-regexp #'LaTeX-array-count-columns)) + +(defun LaTeX-item-tabular* (&optional suppress) + "Insert line break macro on the last line and suitable number of &'s. +For tabular* environment only. + +If SUPPRESS is non-nil, do not insert line break macro." + (unless suppress + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + (LaTeX-insert-ampersands + LaTeX-tabular*-skipping-regexp #'LaTeX-array-count-columns)) + +(defun LaTeX-insert-ampersands (regexp func) + "Insert suitable number of ampersands for the current environment. +The number is calculated from REGEXP and FUNC. + +Example 1: +Consider the case that the current environment begins with +\\begin{array}[t]{|lcr|} +. REGEXP must be chosen to match \"[t]\", that is, the text between just +after \"\\begin{array}\" and just before \"{|lcr|}\", which encloses +the column specification. FUNC must return the number of ampersands to +be inserted, which is 2 since this example specifies three columns. +FUNC is called with two arguments START and END, which spans the column +specification (without enclosing braces.) REGEXP is used to determine +these START and END. + +Example 2: +This time the environment begins with +\\begin{tabular*}{1.0\\linewidth}[b]{c@{,}p{5ex}} +. REGEXP must match \"{1.0\\linewidth}[b]\" and FUNC must return 1 from +the text \"c@{,}p{5ex}\" between START and END specified two columns. + +FUNC should return nil if it cannot determine the number of ampersands." + (let* ((cur (point)) + (num + (save-excursion + (ignore-errors + (LaTeX-find-matching-begin) + ;; Skip over "\begin{xxx}" and possible whitespaces. + (forward-list 1) + (skip-chars-forward " \t") + ;; Skip over the text specified by REGEXP and whitespaces. + (when (let ((case-fold-search nil)) + (re-search-forward regexp cur)) + (skip-chars-forward " \t") + (when (eq (following-char) ?{) + ;; We have reached the target "{yyy}" part. + (forward-char 1) + ;; The next line doesn't move point, so point + ;; is left just after the opening brace. + (let ((pos (TeX-find-closing-brace))) + (if pos + ;; Calculate number of ampersands to be inserted. + (funcall func (point) (1- pos)))))))))) + (if (natnump num) + (save-excursion (insert (make-string num ?&)))))) + +(defvar LaTeX-array-column-letters "clrp" + "Column letters for array-like environments. +See `LaTeX-array-count-columns' for detail.") + +(defun LaTeX-array-count-columns (start end) + "Count number of ampersands to be inserted. +The columns are specified by the letters found in the string +`LaTeX-array-column-letters' and the number of those letters within the +text between START and END is basically considered to be the number of +columns. The arguments surrounded between braces such as p{30pt} do not +interfere the count of columns. + +Return one less number than the columns, or nil on failing to count the +right number." + (save-excursion + (let (p (cols 0)) + (goto-char start) + (while (< (setq p (point)) end) + + ;; The below block accounts for one unit of move for + ;; one column. + (setq cols (+ cols + ;; treat *-operator specially. + (if (eq (following-char) ?*) + ;; *-operator is there. + (progn + ;; pick up repetition number and count + ;; how many columns are repeated. + (re-search-forward + "\\*[ \t\r\n%]*{[ \t\r\n%]*\\([0-9]+\\)[ \t\r\n%]*}" end) + (let ((n (string-to-number + (match-string-no-properties 1))) + ;; get start and end of repeated spec. + (s (progn (down-list 1) (point))) + (e (progn (up-list 1) (1- (point))))) + (* n (1+ (LaTeX-array-count-columns s e))))) + ;; not *-operator. + (skip-chars-forward + LaTeX-array-column-letters end)))) + ;; Do not skip over `*' (see above) and `[' (siunitx has `S[key=val]':): + (skip-chars-forward (concat + "^" LaTeX-array-column-letters "*" + TeX-grop LaTeX-optop) end) + (when (or (eq (following-char) ?\{) + (eq (following-char) ?\[)) + (forward-list 1)) + + ;; Not sure whether this is really necessary or not, but + ;; prepare for possible infinite loop anyway. + (when (eq p (point)) + (setq cols nil) + (goto-char end))) + ;; The number of ampersands is one less than column. + (if cols (1- cols))))) + +;;; Parser + +(defvar LaTeX-auto-style nil) +(defvar LaTeX-auto-arguments nil) +(defvar LaTeX-auto-optional nil) +(defvar LaTeX-auto-env-args nil) +(defvar LaTeX-auto-env-args-with-opt nil) + +(TeX-auto-add-type "label" "LaTeX") +(TeX-auto-add-type "bibitem" "LaTeX") +(TeX-auto-add-type "environment" "LaTeX") +(TeX-auto-add-type "bibliography" "LaTeX" "bibliographies") +(TeX-auto-add-type "index-entry" "LaTeX" "index-entries") +(TeX-auto-add-type "pagestyle" "LaTeX") +(TeX-auto-add-type "counter" "LaTeX") +(TeX-auto-add-type "length" "LaTeX") +(TeX-auto-add-type "savebox" "LaTeX" "saveboxes") + +(defvar LaTeX-auto-minimal-regexp-list + '(("\\\\document\\(style\\|class\\)\ +\\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\ +{\\([^#\\.\n\r]+?\\)}" + (3 5 1) LaTeX-auto-style) + ("\\\\use\\(package\\)\\(\\[\\([^]]*\\)\\]\\)?\ +{\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}" + (3 4 1) LaTeX-auto-style)) + "Minimal list of regular expressions matching LaTeX macro definitions.") + +(defvar LaTeX-auto-label-regexp-list + '(("\\\\label{\\([^\n\r%\\{}]+\\)}" 1 LaTeX-auto-label)) + "List of regular expression matching LaTeX labels only.") + +(defvar LaTeX-auto-index-regexp-list + '(("\\\\\\(index\\|glossary\\){\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}" + 2 LaTeX-auto-index-entry)) + "List of regular expression matching LaTeX index/glossary entries only. +Regexp allows for up to 3 levels of parenthesis inside the index argument. +This is necessary since index entries may contain commands and stuff.") + +(defvar LaTeX-auto-class-regexp-list + '(;; \RequirePackage[<options>]{<package>}[<date>] + ("\\\\Require\\(Package\\)\\(\\[\\([^]]*\\)\\]\\)?\ +{\\([^#\\.\n\r]+?\\)}" + (3 4 1) LaTeX-auto-style) + ;; \RequirePackageWithOptions{<package>}[<date>], + ("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}" + (2 3 1) LaTeX-auto-style) + ;; \LoadClass[<options>]{<package>}[<date>] + ("\\\\Load\\(Class\\)\\(\\[\\([^]]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}" + (3 4 1) LaTeX-auto-style) + ;; \LoadClassWithOptions{<package>}[<date>] + ("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}" + (2 3 1) LaTeX-auto-style) + ;; \DeclareRobustCommand{<cmd>}[<num>][<default>]{<definition>}, + ;; \DeclareRobustCommand*{<cmd>}[<num>][<default>]{<definition>} + ("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\ +\\[\\([0-9]+\\)\\]\\[\\([^\n\r]*?\\)\\]" + (1 2 3) LaTeX-auto-optional) + ("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?\\[\\([0-9]+\\)\\]" + (1 2) LaTeX-auto-arguments) + ("\\\\DeclareRobustCommand\\*?{?\\\\\\([A-Za-z]+\\)}?" + 1 TeX-auto-symbol) + ;; Patterns for commands described in "LaTeX2e font selection" (fntguide) + ("\\\\DeclareMath\\(?:Symbol\\|Delimiter\\|Accent\\|Radical\\)\ +{?\\\\\\([A-Za-z]+\\)}?" + 1 TeX-auto-symbol) + ("\\\\\\(Declare\\|Provide\\)Text\ +\\(?:Command\\|Symbol\\|Accent\\|Composite\\){?\\\\\\([A-Za-z]+\\)}?" + 1 TeX-auto-symbol) + ("\\\\Declare\\(?:Text\\|Old\\)FontCommand{?\\\\\\([A-Za-z]+\\)}?" + 1 TeX-auto-symbol)) + "List of regular expressions matching macros in LaTeX classes and packages.") + +(defvar LaTeX-auto-pagestyle-regexp-list + '(("\\\\ps@\\([A-Za-z]+\\)" 1 LaTeX-auto-pagestyle)) + "List of regular expressions matching LaTeX pagestyles only.") + +(defvar LaTeX-auto-counter-regexp-list + '(("\\\\newcounter *{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter) + ("\\\\@definecounter{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter)) + "List of regular expressions matching LaTeX counters only.") + +(defvar LaTeX-auto-length-regexp-list + '(("\\\\newlength *{?\\\\\\([A-Za-z]+\\)}?" 1 LaTeX-auto-length)) + "List of regular expressions matching LaTeX lengths only.") + +(defvar LaTeX-auto-savebox-regexp-list + '(("\\\\newsavebox *{?\\\\\\([A-Za-z]+\\)}?" 1 LaTeX-auto-savebox)) + "List of regular expressions matching LaTeX saveboxes only.") + +(defvar LaTeX-auto-regexp-list + (append + (let ((token TeX-token-char)) + `((,(concat "\\\\\\(re\\)?\\(?:new\\|provide\\)command\\*?" + "{?\\\\\\(" token "+\\)}?\\[\\([0-9]+\\)\\]\\[\\([^\n\r]*\\)\\]") + (2 3 4 1) LaTeX-auto-optional) + (,(concat "\\\\\\(re\\)?\\(?:new\\|provide\\)command\\*?" + "{?\\\\\\(" token "+\\)}?\\[\\([0-9]+\\)\\]") + (2 3 1) LaTeX-auto-arguments) + (,(concat "\\\\\\(?:new\\|provide\\)command\\*?{?\\\\\\(" token "+\\)}?") + 1 TeX-auto-symbol) + ("\\\\\\(re\\)?newenvironment\\*?{\\([^}]+\\)}\\[\\([0-9]+\\)\\]\\[" + (2 3 1) LaTeX-auto-env-args-with-opt) + ("\\\\\\(re\\)?newenvironment\\*?{\\([^}]+\\)}\\[\\([0-9]+\\)\\]" + (2 3 1) LaTeX-auto-env-args) + ("\\\\newenvironment\\*?{\\([^}]+\\)}" + 1 LaTeX-auto-environment) + (,(concat "\\\\newtheorem{\\(" token "+\\)}") 1 LaTeX-auto-environment) + ("\\\\input{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}" + 1 TeX-auto-file) + ("\\\\include{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}" + 1 TeX-auto-file) + (,(concat "\\\\bibitem{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}") + 1 LaTeX-auto-bibitem) + (,(concat "\\\\bibitem\\[[^][\n\r]+\\]{\\(" token "[^, \n\r\t%\"#'()={}]*\\)}") + 1 LaTeX-auto-bibitem) + ("\\\\bibliography{\\([^#}\\\\\n\r]+\\)}" 1 LaTeX-auto-bibliography) + ("\\\\addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r]+\\)\\..+}" + 1 LaTeX-auto-bibliography) + ("\\\\add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\\\\\n\r\.]+\\)\\(?:\\..+\\)?}" 1 LaTeX-auto-bibliography) + ("\\\\newrefsection\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs) + ("\\\\begin{refsection}\\[\\([^]]+\\)\\]" 1 LaTeX-split-bibs))) + LaTeX-auto-class-regexp-list + LaTeX-auto-label-regexp-list + LaTeX-auto-index-regexp-list + LaTeX-auto-minimal-regexp-list + LaTeX-auto-pagestyle-regexp-list + LaTeX-auto-counter-regexp-list + LaTeX-auto-length-regexp-list + LaTeX-auto-savebox-regexp-list) + "List of regular expression matching common LaTeX macro definitions.") + +(defun LaTeX-split-bibs (match) + "Extract bibliography resources from MATCH. +Split the string at commas and remove Biber file extensions." + (let ((bibs (split-string (TeX-match-buffer match) " *, *"))) + (dolist (bib bibs) + (LaTeX-add-bibliographies (replace-regexp-in-string + (concat "\\(?:\\." + (mapconcat #'identity + TeX-Biber-file-extensions + "\\|\\.") + "\\)") + "" bib))))) + +(defun LaTeX-auto-prepare () + "Prepare for LaTeX parsing." + (setq LaTeX-auto-arguments nil + LaTeX-auto-optional nil + LaTeX-auto-env-args nil + LaTeX-auto-style nil + LaTeX-auto-end-symbol nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-auto-prepare) + +(defun LaTeX-listify-package-options (options) + "Return a list from a comma-separated string of package OPTIONS. +The input string may include LaTeX comments and newlines." + ;; We jump through all those hoops and don't just use `split-string' + ;; or the like in order to be able to deal with key=value package + ;; options which can look like this: "pdftitle={A Perfect Day}, + ;; colorlinks=false" + (let (opts match start) + (with-temp-buffer + (set-syntax-table LaTeX-mode-syntax-table) + (insert options) + (newline) ; So that the last entry can be found. + (goto-char (point-min)) + (setq start (point)) + (while (re-search-forward "[{ ,%\n\r]" nil t) + (setq match (match-string 0)) + (cond + ;; Step over groups. (Let's hope nobody uses escaped braces.) + ((string= match "{") + (up-list)) + ;; Get rid of whitespace. + ((string= match " ") + (delete-region (1- (point)) + (save-excursion + (skip-chars-forward " ") + (point)))) + ;; Add entry to output. + ((or (string= match ",") (= (point) (point-max))) + (let ((entry (buffer-substring-no-properties + start (1- (point))))) + (unless (member entry opts) + (setq opts (append opts (list entry))))) + (setq start (point))) + ;; Get rid of comments. + ((string= match "%") + (delete-region (1- (point)) + (line-beginning-position 2))) + ;; Get rid of newlines. + ((or (string= match "\n") (string= match "\r")) + (delete-char -1))))) + opts)) + +(defvar LaTeX-provided-class-options nil + "Alist of options provided to LaTeX classes. +For each element, the CAR is the name of the class, the CDR is +the list of options provided to it. + +For example, its value will be + ((\"book\" \"a4paper\" \"11pt\" \"openany\" \"fleqn\") + ...) +See also `LaTeX-provided-package-options'.") +(make-variable-buffer-local 'LaTeX-provided-class-options) + +(defun LaTeX-provided-class-options-member (class option) + "Return non-nil if OPTION has been given to CLASS at load time. +The value is actually the tail of the list of options given to CLASS." + (member option (cdr (assoc class LaTeX-provided-class-options)))) + +(defun LaTeX-match-class-option (regexp) + "Check if a documentclass option matching REGEXP is active. +Return first found class option matching REGEXP, or nil if not found." + (TeX-member regexp (apply #'append + (mapcar #'cdr LaTeX-provided-class-options)) + #'string-match)) + +(defvar LaTeX-provided-package-options nil + "Alist of options provided to LaTeX packages. +For each element, the CAR is the name of the package, the CDR is +the list of options provided to it. + +For example, its value will be + ((\"babel\" \"german\") + (\"geometry\" \"a4paper\" \"top=2cm\" \"bottom=2cm\" \"left=2.5cm\" \"right=2.5cm\") + ...) +See also `LaTeX-provided-class-options'.") +(make-variable-buffer-local 'LaTeX-provided-package-options) + +(defun LaTeX-provided-package-options-member (package option) + "Return non-nil if OPTION has been given to PACKAGE at load time. +The value is actually the tail of the list of options given to PACKAGE." + (member option (cdr (assoc package LaTeX-provided-package-options)))) + +(defun LaTeX-auto-cleanup () + "Cleanup after LaTeX parsing." + + ;; Cleanup BibTeX/Biber files + (setq LaTeX-auto-bibliography + (apply #'append (mapcar (lambda (arg) + (split-string arg ",")) + LaTeX-auto-bibliography))) + + ;; Reset class and packages options for the current buffer + (setq LaTeX-provided-class-options nil) + (setq LaTeX-provided-package-options nil) + + ;; Cleanup document classes and packages + (unless (null LaTeX-auto-style) + (while LaTeX-auto-style + (let* ((entry (car LaTeX-auto-style)) + (options (nth 0 entry)) + (style (nth 1 entry)) + (class (nth 2 entry))) + + ;; Next document style. + (setq LaTeX-auto-style (cdr LaTeX-auto-style)) + + ;; Get the options. + (setq options (LaTeX-listify-package-options options)) + + ;; Treat documentclass/documentstyle specially. + (if (or (string-equal "package" class) + (string-equal "Package" class)) + (dolist (elt (split-string + style "\\([ \t\r\n]\\|%[^\n\r]*[\n\r]\\|,\\)+")) + ;; Append style to the style list. + (add-to-list 'TeX-auto-file elt t) + ;; Append to `LaTeX-provided-package-options' the name of the + ;; package and the options provided to it at load time. + (unless (equal options '("")) + (TeX-add-to-alist 'LaTeX-provided-package-options + (list (cons elt options))))) + ;; And a special "art10" style file combining style and size. + (add-to-list 'TeX-auto-file style t) + (add-to-list 'TeX-auto-file + (concat + (cond ((string-equal "article" style) + "art") + ((string-equal "book" style) + "bk") + ((string-equal "report" style) + "rep") + ((string-equal "jarticle" style) + "jart") + ((string-equal "jbook" style) + "jbk") + ((string-equal "jreport" style) + "jrep") + ((string-equal "j-article" style) + "j-art") + ((string-equal "j-book" style) + "j-bk") + ((string-equal "j-report" style ) + "j-rep") + (t style)) + (cond ((member "11pt" options) + "11") + ((member "12pt" options) + "12") + (t + "10"))) + t) + (unless (equal options '("")) + (TeX-add-to-alist 'LaTeX-provided-class-options + (list (cons style options))))) + + ;; The third argument if "class" indicates LaTeX2e features. + (cond ((or (string-equal class "class") + (string-equal class "Class")) + (add-to-list 'TeX-auto-file "latex2e")) + ((string-equal class "style") + (add-to-list 'TeX-auto-file "latex2")))))) + + ;; Cleanup optional arguments + (mapc (lambda (entry) + ;; If we're renewcommand-ing and there is already an entry + ;; in `TeX-auto-symbol', delete it first: + (when (and (string= (nth 2 entry) "re") + (assoc (car entry) TeX-auto-symbol)) + (setq TeX-auto-symbol + (assq-delete-all (car (assoc (car entry) + TeX-auto-symbol)) + TeX-auto-symbol))) + (add-to-list 'TeX-auto-symbol + (list (nth 0 entry) + (string-to-number (nth 1 entry))))) + LaTeX-auto-arguments) + + ;; Cleanup default optional arguments + (mapc (lambda (entry) + ;; If we're renewcommand-ing and there is already an entry + ;; in `TeX-auto-symbol', delete it first: + (when (and (string= (nth 3 entry) "re") + (assoc (car entry) TeX-auto-symbol)) + (setq TeX-auto-symbol + (assq-delete-all (car (assoc (car entry) + TeX-auto-symbol)) + TeX-auto-symbol))) + (add-to-list 'TeX-auto-symbol + (list (nth 0 entry) + (vector "argument") + (1- (string-to-number (nth 1 entry)))))) + LaTeX-auto-optional) + + ;; Cleanup environments arguments + (mapc (lambda (entry) + ;; If we're renewenvironment-ing and there is already an + ;; entry in `LaTeX-auto-environment', delete it first: + (when (and (string= (nth 2 entry) "re") + (assoc (car entry) LaTeX-auto-environment)) + (setq LaTeX-auto-environment + (assq-delete-all (car (assoc (car entry) + LaTeX-auto-environment)) + LaTeX-auto-environment))) + (add-to-list 'LaTeX-auto-environment + (list (nth 0 entry) + (string-to-number (nth 1 entry))))) + LaTeX-auto-env-args) + + ;; Ditto for environments with an optional arg + (mapc (lambda (entry) + ;; If we're renewenvironment-ing and there is already an + ;; entry in `LaTeX-auto-environment', delete it first: + (when (and (string= (nth 2 entry) "re") + (assoc (car entry) LaTeX-auto-environment)) + (setq LaTeX-auto-environment + (assq-delete-all (car (assoc (car entry) + LaTeX-auto-environment)) + LaTeX-auto-environment))) + (add-to-list 'LaTeX-auto-environment + (list (nth 0 entry) 'LaTeX-env-args (vector "argument") + (1- (string-to-number (nth 1 entry)))))) + LaTeX-auto-env-args-with-opt) + + ;; Cleanup use of def to add environments + ;; NOTE: This uses an O(N^2) algorithm, while an O(N log N) + ;; algorithm is possible. + (mapc (lambda (symbol) + (if (not (TeX-member symbol TeX-auto-symbol #'equal)) + ;; No matching symbol, insert in list + (add-to-list 'TeX-auto-symbol (concat "end" symbol)) + ;; Matching symbol found, remove from list + (if (equal (car TeX-auto-symbol) symbol) + ;; Is it the first symbol? + (setq TeX-auto-symbol (cdr TeX-auto-symbol)) + ;; Nope! Travel the list + (let ((list TeX-auto-symbol)) + (while (consp (cdr list)) + ;; Until we find it. + (if (equal (car (cdr list)) symbol) + ;; Then remove it. + (setcdr list (cdr (cdr list)))) + (setq list (cdr list))))) + ;; and add the symbol as an environment. + (add-to-list 'LaTeX-auto-environment symbol))) + LaTeX-auto-end-symbol)) + +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-auto-cleanup) + +(advice-add 'LaTeX-add-bibliographies :after #'TeX-run-style-hooks) + +;;; Biber support + +(defvar LaTeX-using-Biber nil + "Used to track whether Biber is in use.") +(make-variable-buffer-local 'LaTeX-using-Biber) + +;;; BibTeX + +(defvar BibTeX-auto-regexp-list + '(("@[Ss][Tt][Rr][Ii][Nn][Gg]" 1 ignore) + ("@[a-zA-Z]+[{(][ \t]*\\([^, \n\r\t%\"#'()={}]*\\)" 1 LaTeX-auto-bibitem)) + "List of regexp-list expressions matching BibTeX items.") + +;;;###autoload +(defun BibTeX-auto-store () + "This function should be called from `bibtex-mode-hook'. +It will setup BibTeX to store keys in an auto file." + ;; We want this to be early in the list, so we do not + ;; add it before we enter BibTeX mode the first time. + (add-hook 'write-contents-functions #'TeX-safe-auto-write nil t) + (TeX-bibtex-set-BibTeX-dialect) + (set (make-local-variable 'TeX-auto-untabify) nil) + (set (make-local-variable 'TeX-auto-parse-length) 999999) + (set (make-local-variable 'TeX-auto-regexp-list) BibTeX-auto-regexp-list) + (set (make-local-variable 'TeX-master) t)) + +;;; Macro Argument Hooks + +(defun TeX-arg-conditional (_optional expr then else) + "Implement if EXPR THEN ELSE. + +If EXPR evaluate to true, parse THEN as an argument list, else +parse ELSE as an argument list. The compatibility argument +OPTIONAL is ignored." + (TeX-parse-arguments (if (eval expr t) then else))) + +(defun TeX-arg-eval (optional &rest args) + "Evaluate ARGS and insert value in buffer. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." + (TeX-argument-insert (eval args t) optional)) + +(defun TeX-read-label (optional &optional prompt definition) + "Prompt for a label completing with known labels and return it. +This function always returns a string depending on user input: +the returned value can be an empty string \"\", the value of +`TeX-read-label-prefix' if present (for example, \"fig:\") or a +complete label input (for example, \"fig:foo\"). If OPTIONAL is +non-nil, indicate optional as part of prompt in minibuffer. Use +PROMPT as the prompt string. If DEFINITION is non-nil, add the +chosen label to the list of defined labels. +`TeX-read-label-prefix' is used as initial input for the label. +Also check if label is already defined and ask user for +confirmation before proceeding." + (let (label valid) + (while (not valid) + (setq label + (completing-read + (TeX-argument-prompt optional prompt "Key") + (LaTeX-label-list) nil nil TeX-read-label-prefix)) + ;; If we're defining a label, check if it's already defined and + ;; ask user for confirmation, otherwise ask again + (cond ((and definition + (assoc label (LaTeX-label-list))) + (ding) + (when (y-or-n-p + ;; Emacs 24 compatibility + (if (fboundp 'format-message) + (format-message "Label `%s' exists. Use anyway? " label) + (format "Label `%s' exists. Use anyway? " label))) + (setq valid t))) + (t + (setq valid t)))) + ;; Only add a newly defined label to list of known one if it is + ;; not empty and not equal to `TeX-read-label-prefix', if given + (when (and definition + (not (string-equal "" label)) + (if TeX-read-label-prefix + (not (string-equal TeX-read-label-prefix label)) + t)) + (LaTeX-add-labels label)) + ;; Return label, can be empty string "", TeX-read-label-prefix + ;; only "fig:" or the real thing like "fig:foo" + label)) + +(defun TeX-arg-label (optional &optional prompt definition) + "Prompt for a label completing with known labels. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen label to the +list of defined labels. `TeX-read-label-prefix' is used as +initial input for the label." + (TeX-argument-insert + (TeX-read-label optional prompt definition) optional optional)) + +(defvar reftex-ref-macro-prompt) + +(defun TeX-arg-ref (optional &optional prompt definition) + "Let-bind `reftex-ref-macro-prompt' to nil and pass arguments +to `TeX-arg-label'. + +See the documentation of `TeX-arg-label' for details on the +arguments: OPTIONAL, PROMPT, and DEFINITION." + (let ((reftex-ref-macro-prompt nil)) + (TeX-arg-label optional prompt definition))) + +(defun TeX-arg-index-tag (optional &optional prompt &rest _args) + "Prompt for an index tag. +This is the name of an index, not the entry. + +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. ARGS is unused." + (TeX-argument-insert + (TeX-read-string (TeX-argument-prompt optional prompt "Index tag")) + optional)) + +(defun TeX-arg-index (optional &optional prompt &rest _args) + "Prompt for an index entry completing with known entries. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. ARGS is unused." + (let ((entry (completing-read (TeX-argument-prompt optional prompt "Key") + (LaTeX-index-entry-list)))) + (if (and (not (string-equal "" entry)) + (not (member (list entry) (LaTeX-index-entry-list)))) + (LaTeX-add-index-entries entry)) + (TeX-argument-insert entry optional optional))) + +(defalias 'TeX-arg-define-index #'TeX-arg-index) + +(defun TeX-arg-macro (optional &optional prompt definition) + "Prompt for a TeX macro with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen macro to the +list of defined macros." + (let ((macro (completing-read (TeX-argument-prompt optional prompt + (concat "Macro: " + TeX-esc) + t) + (TeX-symbol-list)))) + (if (and definition (not (string-equal "" macro))) + (TeX-add-symbols macro)) + (TeX-argument-insert macro optional TeX-esc))) + +(defun TeX-arg-environment (optional &optional prompt definition) + "Prompt for a LaTeX environment with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen environment to +the list of defined environments." + (let ((environment (completing-read (TeX-argument-prompt optional prompt + "Environment") + (LaTeX-environment-list)))) + (if (and definition (not (string-equal "" environment))) + (LaTeX-add-environments environment)) + + (TeX-argument-insert environment optional))) + +;; Why is DEFINITION unused? +(defun TeX-arg-cite (optional &optional prompt _definition) + "Prompt for a BibTeX citation with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. DEFINITION is unused." + (let ((items (multi-prompt "," t (TeX-argument-prompt optional prompt "Key") + (LaTeX-bibitem-list)))) + (apply #'LaTeX-add-bibitems items) + (TeX-argument-insert (mapconcat #'identity items ",") optional optional))) + +(defun TeX-arg-counter (optional &optional prompt definition) + "Prompt for a LaTeX counter. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen counter to +the list of defined counters." + (let ((counter (completing-read (TeX-argument-prompt optional prompt + "Counter") + (LaTeX-counter-list)))) + (if (and definition (not (string-equal "" counter))) + (LaTeX-add-counters counter)) + (TeX-argument-insert counter optional))) + +(defun TeX-arg-savebox (optional &optional prompt definition) + "Prompt for a LaTeX savebox. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If definition is non-nil, the savebox is added to the +list of defined saveboxes." + (let ((savebox (completing-read (TeX-argument-prompt optional prompt + (concat "Savebox: " + TeX-esc) t) + (LaTeX-savebox-list)))) + (if (and definition (not (zerop (length savebox)))) + (LaTeX-add-saveboxes savebox)) + (TeX-argument-insert savebox optional TeX-esc))) + +(defun TeX-arg-length (optional &optional prompt default initial-input + definition) + "Prompt for a LaTeX length. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. DEFAULT is passed to `completing-read', which see. If +INITIAL-INPUT is non-nil, insert it in the minibuffer initially, +with point positioned at the end. If DEFINITION is non-nil, the +length is added to the list of defined length." + (let ((length + (completing-read + (TeX-argument-prompt optional + ;; Cater for the case when PROMPT and + ;; DEFAULT are both given: + (if (and prompt default) + (concat prompt " (default " default ")") + prompt) + (concat "Length" + (when (and default (not optional)) + (concat " (default " default ")")))) + ;; A valid length can be a macro or a length of the form + ;; <value><dimension>. Input starting with a `\' can be + ;; completed with length macros. + (mapcar (lambda (elt) (concat TeX-esc (car elt))) + (LaTeX-length-list)) + ;; Some macros takes as argument only a length macro (e.g., + ;; `\setlength' in its first argument, and `\newlength'), in + ;; this case is convenient to set `\\' as initial input. + nil nil initial-input nil default))) + (if (and definition (not (zerop (length length)))) + ;; Strip leading TeX-esc from macro name + (LaTeX-add-lengths (substring length 1))) + (TeX-argument-insert length optional))) + +(defun TeX-arg-file (optional &optional prompt) + "Prompt for a filename in the current directory. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-argument-insert (read-file-name (TeX-argument-prompt optional + prompt "File") + "" "" nil) + optional)) + +(defun TeX-arg-file-name (optional &optional prompt) + "Prompt for a file name. +Initial input is the name of the file being visited in the +current buffer, with extension. If OPTIONAL is non-nil, insert +it as an optional argument. Use PROMPT as the prompt string." + (let ((name (file-name-nondirectory buffer-file-name))) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional + (when prompt + (if optional + prompt + (format (concat prompt " (default %s)") name))) + (if optional + "Name" + (format "Name (default %s)" name))) + nil nil (if optional nil name)) + optional))) + +(defun TeX-arg-file-name-sans-extension (optional &optional prompt) + "Prompt for a file name. +Initial input is the name of the file being visited in the +current buffer, without extension. If OPTIONAL is non-nil, +insert it as an optional argument. Use PROMPT as the prompt +string." + (let ((name (file-name-sans-extension + (file-name-nondirectory buffer-file-name)))) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional + (when prompt + (if optional + prompt + (format (concat prompt " (default %s)") name))) + (if optional + "Name" + (format "Name (default %s)" name))) + nil nil (if optional nil name)) + optional))) + +(defun TeX-arg-define-label (optional &optional prompt) + "Prompt for a label completing with known labels. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. `TeX-read-label-prefix' is used as initial input for the +label." + (TeX-arg-label optional prompt t)) + +(defun TeX-arg-default-argument-value (optional &optional prompt) + "Prompt for the default value for the first argument of a LaTeX macro. + +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional prompt "Default value for first argument")) + optional)) + +(defun TeX-arg-define-macro-arguments (optional &optional prompt) + "Prompt for the number of arguments for a LaTeX macro. If this +is non-zero, also prompt for the default value for the first +argument. + +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (let ((arg-count (TeX-read-string + (TeX-argument-prompt optional prompt + "Number of arguments" + nil)))) + (unless (or (string= arg-count "0") + (string= arg-count "")) + (TeX-argument-insert arg-count optional) + (unless (string-equal LaTeX-version "2") + (TeX-arg-default-argument-value optional))))) + +(defun TeX-arg-define-macro (optional &optional prompt) + "Prompt for a TeX macro with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-macro optional prompt t)) + +(defun TeX-arg-define-environment (optional &optional prompt) + "Prompt for a LaTeX environment with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-environment optional prompt t)) + +(defun TeX-arg-define-cite (optional &optional prompt) + "Prompt for a BibTeX citation. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-cite optional prompt t)) + +(defun TeX-arg-define-counter (optional &optional prompt) + "Prompt for a LaTeX counter. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-counter optional prompt t)) + +(defun TeX-arg-define-savebox (optional &optional prompt) + "Prompt for a LaTeX savebox. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-savebox optional prompt t)) + +(defun TeX-arg-define-length (optional &optional prompt) + "Prompt for a LaTeX length. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-arg-length optional prompt nil "\\" t)) + +(defcustom LaTeX-style-list '(("amsart") + ("amsbook") + ("article") + ("beamer") + ("book") + ("dinbrief") + ("foils") + ("letter") + ("memoir") + ("minimal") + ("prosper") + ("report") + ("scrartcl") + ("scrbook") + ("scrlttr2") + ("scrreprt") + ("slides")) + "List of document classes offered when inserting a document environment. + +If `TeX-arg-input-file-search' is set to t, you will get +completion with all LaTeX classes available in your distribution +and this variable will be ignored." + :group 'LaTeX-environment + :type '(repeat (group (string :format "%v")))) + +(defvar LaTeX-global-class-files nil + "List of the LaTeX class files. +Initialized once at the first time you prompt for a LaTeX class. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +;; Add the variable to `TeX-normal-mode-reset-list': +(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-class-files) + +(defcustom TeX-arg-input-file-search t + "If `TeX-arg-input-file' should search for files. +If the value is t, files in TeX's search path are searched for +and provided for completion. The file name is then inserted +without directory and extension. If the value is nil, the file +name can be specified manually and is inserted with a path +relative to the directory of the current buffer's file and with +extension. If the value is `ask', you are asked for the method +to use every time `TeX-arg-input-file' is called." + :group 'LaTeX-macro + :type '(choice (const t) (const nil) (const ask))) + +(defvar TeX-after-document-hook nil + "List of functions to be run at the end of `TeX-arg-document'. + +To insert a hook here, you must insert it in the appropiate style file.") + +(defun TeX-arg-document (_optional &optional _ignore) + "Insert arguments to documentclass. +OPTIONAL and IGNORE are ignored." + (let* ((TeX-file-extensions '("cls")) + (crm-separator ",") + style var options defopt optprmpt) + (unless LaTeX-global-class-files + (setq LaTeX-global-class-files + (if (if (eq TeX-arg-input-file-search 'ask) + (not (y-or-n-p "Find class yourself? ")) + TeX-arg-input-file-search) + (prog2 + (message "Searching for LaTeX classes...") + (TeX-search-files-by-type 'texinputs 'global t t) + (message "Searching for LaTeX classes...done")) + LaTeX-style-list))) + (setq style (completing-read + (concat "Document class (default " LaTeX-default-style "): ") + LaTeX-global-class-files nil nil nil nil LaTeX-default-style)) + ;; Clean up hook before use. + (setq TeX-after-document-hook nil) + (TeX-load-style style) + (setq var (intern (format "LaTeX-%s-class-options" style))) + (setq defopt (if (stringp LaTeX-default-options) + LaTeX-default-options + (mapconcat #'identity LaTeX-default-options ","))) + (setq optprmpt + (if (and defopt (not (string-equal defopt ""))) + (format "Options (default %s): " defopt) "Options: ")) + (if (or (and (boundp var) + (listp (symbol-value var))) + (fboundp var)) + (if (functionp var) + (setq options (funcall var)) + (when (symbol-value var) + (setq options + (mapconcat #'identity + (TeX-completing-read-multiple + optprmpt (mapcar #'list (symbol-value var)) + nil nil nil nil defopt) + ",")))) + (setq options (TeX-read-string optprmpt nil nil defopt))) + (unless (zerop (length options)) + (insert LaTeX-optop options LaTeX-optcl) + (let ((opts (LaTeX-listify-package-options options))) + (TeX-add-to-alist 'LaTeX-provided-class-options + (list (cons style opts))))) + (insert TeX-grop style TeX-grcl)) + + (TeX-update-style t) + (run-hooks 'TeX-after-document-hook)) + +(defvar LaTeX-after-usepackage-hook nil + "List of functions to be run at the end of `LaTeX-arg-usepackage'. + +To insert a hook here, you must insert it in the appropiate style file.") + +(defvar TeX-global-input-files nil + "List of the non-local TeX input files. +Initialized once at the first time you prompt for an input file. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +(defvar TeX-global-input-files-with-extension nil + "List of the non-local TeX input files with extension. +Initialized once at the first time you prompt for an input file +inside a file hook command. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +(defvar LaTeX-global-package-files nil + "List of the LaTeX package files. +Initialized once at the first time you prompt for a LaTeX package. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +;; Add the variables to `TeX-normal-mode-reset-list': +(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-input-files) +(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-input-files-with-extension) +(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-global-package-files) + +(defun LaTeX-arg-usepackage-read-packages-with-options () + "Read the packages and the options for the usepackage macro. + +If at least one package is provided, this function returns a cons +cell, whose CAR is the list of packages and the CDR is the string +of the options, nil otherwise." + (let* ((TeX-file-extensions '("sty")) + (crm-separator ",") + packages var options) + (unless LaTeX-global-package-files + (if (if (eq TeX-arg-input-file-search 'ask) + (not (y-or-n-p "Find packages yourself? ")) + TeX-arg-input-file-search) + (progn + (message "Searching for LaTeX packages...") + (setq LaTeX-global-package-files + (mapcar #'list (TeX-search-files-by-type + 'texinputs 'global t t))) + (message "Searching for LaTeX packages...done")))) + (setq packages (TeX-completing-read-multiple + "Packages: " LaTeX-global-package-files)) + ;; Clean up hook before use in `LaTeX-arg-usepackage-insert'. + (setq LaTeX-after-usepackage-hook nil) + (mapc #'TeX-load-style packages) + ;; Prompt for options only if at least one package has been supplied, return + ;; nil otherwise. + (when packages + (setq var (if (= 1 (length packages)) + (intern (format "LaTeX-%s-package-options" (car packages))) + ;; Something like `\usepackage[options]{pkg1,pkg2,pkg3,...}' is + ;; allowed (provided that pkg1, pkg2, pkg3, ... accept same + ;; options). When there is more than one package, set `var' to + ;; a dummy value so next `if' enters else form. + t)) + (if (or (and (boundp var) + (listp (symbol-value var))) + (fboundp var)) + (if (functionp var) + (setq options (funcall var)) + (when (symbol-value var) + (setq options + (mapconcat #'identity + (TeX-completing-read-multiple + "Options: " (mapcar #'list (symbol-value var))) + ",")))) + (setq options (TeX-read-string "Options: "))) + (cons packages options)))) + +(defun LaTeX-arg-usepackage-insert (packages options) + "Actually insert arguments to usepackage." + (unless (zerop (length options)) + (let ((opts (LaTeX-listify-package-options options))) + (mapc (lambda (elt) + (TeX-add-to-alist 'LaTeX-provided-package-options + (list (cons elt opts)))) + packages)) + (insert LaTeX-optop options LaTeX-optcl)) + (insert TeX-grop (mapconcat #'identity packages ",") TeX-grcl) + (run-hooks 'LaTeX-after-usepackage-hook) + (apply #'TeX-run-style-hooks packages)) + +(defun LaTeX-arg-usepackage (_optional) + "Insert arguments to usepackage. +OPTIONAL is ignored." + (let* ((packages-options (LaTeX-arg-usepackage-read-packages-with-options)) + (packages (car packages-options)) + (options (cdr packages-options))) + (LaTeX-arg-usepackage-insert packages options))) + +(defun LaTeX-insert-usepackages () + "Prompt for the insertion of usepackage macros until empty +input is reached. + +Return t if at least one \\usepackage has been inserted, nil +otherwise." + (let (packages-options packages options (inserted nil)) + (while (setq packages-options + (LaTeX-arg-usepackage-read-packages-with-options)) + (setq packages (car packages-options)) + (setq options (cdr packages-options)) + (insert TeX-esc "usepackage") + (LaTeX-arg-usepackage-insert packages options) + (LaTeX-newline) + (setq inserted t)) + inserted)) + +(defcustom LaTeX-search-files-type-alist + '((texinputs "${TEXINPUTS.latex}" ("tex/generic/" "tex/latex/") + TeX-file-extensions) + (docs "${TEXDOCS}" ("doc/") TeX-doc-extensions) + (graphics "${TEXINPUTS}" ("tex/") LaTeX-includegraphics-extensions) + (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-file-extensions) + (bstinputs "${BSTINPUTS}" ("bibtex/bst/") BibTeX-style-extensions) + (bbxinputs "" ("tex/latex/") BibLaTeX-style-extensions) + (biberinputs "${BIBINPUTS}" ("bibtex/bib/") TeX-Biber-file-extensions)) + "Alist of filetypes with locations and file extensions. +Each element of the alist consists of a symbol expressing the +filetype, a variable which can be expanded on kpathsea-based +systems into the directories where files of the given type +reside, a list of absolute directories, relative directories +below the root of a TDS-compliant TeX tree or a list of variables +with either type of directories as an alternative for +non-kpathsea-based systems and a list of extensions to be matched +upon a file search. Note that the directories have to end with a +directory separator. + +Reset the mode for a change of this variable to take effect." + :group 'TeX-file + :type '(alist :key-type symbol + :value-type + (group (string :tag "Kpathsea variable") + (choice :tag "Directories" + (repeat :tag "TDS subdirectories" string) + (repeat :tag "Absolute directories" directory) + (repeat :tag "Variables" variable)) + (choice :tag "Extensions" + variable (repeat string))))) + +(defun TeX-arg-input-file (optional &optional prompt local) + "Prompt for a tex or sty file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. PROMPT is the prompt, +LOCAL is a flag. If the flag is set, only complete with local +files." + (let ((search (if (eq TeX-arg-input-file-search 'ask) + (not (y-or-n-p "Find file yourself? ")) + TeX-arg-input-file-search)) + file style) + (if search + (progn + (unless (or TeX-global-input-files local) + (message "Searching for files...") + (setq TeX-global-input-files + (mapcar #'list (TeX-search-files-by-type + 'texinputs 'global t t))) + (message "Searching for files...done")) + (setq file (completing-read + (TeX-argument-prompt optional prompt "File") + (TeX-delete-dups-by-car + (append (mapcar #'list (TeX-search-files-by-type + 'texinputs 'local t t)) + (unless local + TeX-global-input-files)))) + style file)) + (setq file (read-file-name + (TeX-argument-prompt optional prompt "File") nil "")) + (unless (string-equal file "") + (setq file (file-relative-name file))) + (setq style (file-name-sans-extension (file-name-nondirectory file)))) + (unless (string-equal "" style) + (TeX-run-style-hooks style)) + (TeX-argument-insert file optional))) + +(defvar BibTeX-global-style-files nil + "Association list of BibTeX style files. + +Initialized once at the first time you prompt for an input file. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +(defvar BibLaTeX-global-style-files nil + "Association list of BibLaTeX style files. + +Initialized once at the first time you prompt for a BibLaTeX +style. May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +;; Add both variables to `TeX-normal-mode-reset-list': +(add-to-list 'TeX-normal-mode-reset-list 'BibTeX-global-style-files) +(add-to-list 'TeX-normal-mode-reset-list 'BibLaTeX-global-style-files) + +(defun TeX-arg-bibstyle (optional &optional prompt) + "Prompt for a BibTeX style file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (message "Searching for BibTeX styles...") + (or BibTeX-global-style-files + (setq BibTeX-global-style-files + (mapcar #'list (TeX-search-files-by-type 'bstinputs 'global t t)))) + (message "Searching for BibTeX styles...done") + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "BibTeX style") + (append (mapcar #'list (TeX-search-files-by-type + 'bstinputs 'local t t)) + BibTeX-global-style-files)) + optional)) + +(defvar BibTeX-global-files nil + "Association list of BibTeX files. + +Initialized once at the first time you prompt for a BibTeX file. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +(defvar TeX-Biber-global-files nil + "Association list of Biber files. + +Initialized once at the first time you prompt for an Biber file. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +(add-to-list 'TeX-normal-mode-reset-list 'BibTeX-global-files) +(add-to-list 'TeX-normal-mode-reset-list 'TeX-Biber-global-files) + +(defun TeX-arg-bibliography (optional &optional prompt) + "Prompt for a BibTeX database file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (message "Searching for BibTeX files...") + (or BibTeX-global-files + (setq BibTeX-global-files + (mapcar #'list (TeX-search-files-by-type 'bibinputs 'global t t)))) + (message "Searching for BibTeX files...done") + (let ((styles (multi-prompt + "," t + (TeX-argument-prompt optional prompt "BibTeX files") + (append (mapcar #'list (TeX-search-files-by-type + 'bibinputs 'local t t)) + BibTeX-global-files)))) + (apply #'LaTeX-add-bibliographies styles) + ;; Run style files associated to the bibliography database files in order to + ;; immediately fill `LaTeX-bibitem-list'. + (mapc #'TeX-run-style-hooks styles) + (TeX-argument-insert (mapconcat #'identity styles ",") optional))) + +(defun TeX-arg-corner (optional &optional prompt) + "Prompt for a LaTeX side or corner position with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Position") + '("l" "r" "t" "b" "tl" "tr" "bl" "br") + nil t) + optional)) + +(defun TeX-arg-lr (optional &optional prompt) + "Prompt for a LaTeX side with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Position") + '("l" "r") + nil t) + optional)) + +(defun TeX-arg-tb (optional &optional prompt poslist) + "Prompt for a LaTeX side with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. POSLIST contains the positioning characters offered for +completion. It can be the symbols `center', `stretch' or nil +with the following completion list: + center t, b, c + stretch t, b, c, s + nil t, b" + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Position") + (cond ((eq poslist 'center) + '("t" "b" "c")) + ((eq poslist 'stretch) + '("t" "b" "c" "s")) + (t + '("t" "b"))) + nil t) + optional)) + +(defcustom TeX-date-format "%Y/%m/%d" + "The default date format prompted by `TeX-arg-date'." + :group 'LaTeX-macro + :type 'string) + +(defun TeX-arg-date (optional &optional prompt) + "Prompt for a date, defaulting to the current date. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (let ((default (format-time-string TeX-date-format (current-time)))) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional + (when prompt + (format (concat prompt " (default %s)") default)) + (format "Date (default %s)" default)) + nil nil default) + optional))) + +(defun TeX-arg-version (optional &optional prompt) + "Prompt for the version of a file. +Use as initial input the current date. If OPTIONAL is non-nil, +insert the resulting value as an optional argument, otherwise as +a mandatory one. Use PROMPT as the prompt string." + (let ((version (format-time-string "%Y/%m/%d" (current-time)))) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional + (when prompt + (format (concat prompt " (default %s)") version)) + (format "Version (default %s)" version)) + nil nil version) + optional))) + +(defun TeX-arg-pagestyle (optional &optional prompt definition) + "Prompt for a LaTeX pagestyle with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen pagestyle to +the list of defined pagestyles." + (let ((pagestyle (completing-read (TeX-argument-prompt optional prompt + "Pagestyle") + (LaTeX-pagestyle-list)))) + (if (and definition (not (string-equal "" pagestyle))) + (LaTeX-add-pagestyles pagestyle)) + (TeX-argument-insert pagestyle optional))) + +(defcustom LaTeX-default-verb-delimiter ?| + "Default delimiter for `\\verb' macros." + :group 'LaTeX-macro + :type 'character) + +(defun TeX-arg-verb (_optional &optional _ignore) + "Prompt for delimiter and text. +The compatibility argument OPTIONAL and IGNORE are ignored." + (let ((del (read-quoted-char + (concat "Delimiter (default " + (char-to-string LaTeX-default-verb-delimiter) "): ")))) + (when (<= del ?\ ) (setq del LaTeX-default-verb-delimiter)) + (if (TeX-active-mark) + (progn + (insert del) + (goto-char (mark)) + (insert del)) + (insert del (read-from-minibuffer "Text: ") del)) + (setq LaTeX-default-verb-delimiter del))) + +(defun TeX-arg-verb-delim-or-brace (optional &optional prompt) + "Prompt for delimiter and text. +If OPTIONAL, indicate optional argument in minibuffer. PROMPT is +a string replacing the default one when asking the user for text. +This function is intended for \\verb like macros which take their +argument in delimiters like \"\| \|\" or braces \"\{ \}\"." + (let ((del (read-quoted-char + (concat "Delimiter (default " + (char-to-string LaTeX-default-verb-delimiter) "): ")))) + (when (<= del ?\ ) + (setq del LaTeX-default-verb-delimiter)) + (if (TeX-active-mark) + (progn + (insert del) + (goto-char (mark)) + ;; If the delimiter was an opening brace, close it with a + ;; brace, otherwise use the delimiter again + (insert (if (= del ?\{) + ?\} + del))) + ;; Same thing again + (insert del (read-from-minibuffer + (TeX-argument-prompt optional prompt "Text")) + (if (= del ?\{) + ?\} + del))) + ;; Do not set `LaTeX-default-verb-delimiter' if the user input was + ;; an opening brace. This would give funny results for the next + ;; "C-c C-m \verb RET" + (unless (= del ?\{) + (setq LaTeX-default-verb-delimiter del)))) + +(defun TeX-arg-pair (_optional first second) + "Insert a pair of number, prompted by FIRST and SECOND. + +The numbers are surounded by parenthesizes and separated with a +comma. The compatibility argument OPTIONAL is ignored." + (insert "(" (TeX-read-string (concat first ": ")) "," + (TeX-read-string (concat second ": ")) ")")) + +(defun TeX-arg-size (optional) + "Insert width and height as a pair. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." + (TeX-arg-pair optional "Width" "Height")) + +(defun TeX-arg-coordinate (optional) + "Insert x and y coordinate as a pair. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." + (TeX-arg-pair optional "X position" "Y position")) + +(defconst TeX-braces-default-association + '(("[" . "]") + ("\\{" . "\\}") + ("(" . ")") + ("|" . "|") + ("\\|" . "\\|") + ("/" . "/") + ("\\backslash" . "\\backslash") + ("\\lfloor" . "\\rfloor") + ("\\lceil" . "\\rceil") + ("\\langle" . "\\rangle"))) + +(defcustom TeX-braces-user-association nil + "A list of your personal association of brace symbols. +These are used for \\left and \\right. + +The car of each entry is the brace used with \\left, +the cdr is the brace used with \\right." + :group 'LaTeX-macro + :group 'LaTeX-math + :type '(repeat (cons :format "%v" + (string :tag "Left") + (string :tag "Right")))) + +(defvar TeX-braces-association + (append TeX-braces-user-association + TeX-braces-default-association) + "A list of association of brace symbols for \\left and \\right. +The car of each entry is the brace used with \\left, +the cdr is the brace used with \\right.") + +(defcustom LaTeX-electric-left-right-brace nil + "If non-nil, insert right brace with suitable macro after typing left brace." + :group 'LaTeX-macro + :type 'boolean) + +(defvar TeX-left-right-braces + '(("[") ("]") ("\\{") ("\\}") ("(") (")") ("|") ("\\|") + ("/") ("\\backslash") ("\\lfloor") ("\\rfloor") + ("\\lceil") ("\\rceil") ("\\langle") ("\\rangle") + ("\\uparrow") ("\\Uparrow") ("\\downarrow") ("\\Downarrow") + ("\\updownarrow") ("\\Updownarrow") (".")) + "List of symbols which can follow the \\left or \\right command.") + +(defvar LaTeX-left-right-macros-association + '(("left" . "right") + ("bigl" . "bigr") ("Bigl" . "Bigr") + ("biggl" . "biggr") ("Biggl" . "Biggr")) + "Alist of macros for adjusting size of left and right braces. +The car of each entry is for left brace and the cdr is for right brace.") + +(defun TeX-arg-insert-braces (optional &optional prompt) + "Prompt for a brace for \\left and insert the corresponding \\right. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (let (left-macro) + (save-excursion + ;; Obtain macro name such as "left", "bigl" etc. + (setq left-macro (buffer-substring-no-properties + (point) + (progn (backward-word 1) (point)))) + (backward-char) + (LaTeX-newline) + (indent-according-to-mode) + ;; Delete possibly produced blank line. + (beginning-of-line 0) + (if (looking-at "^[ \t]*$") + (progn (delete-horizontal-space) + (delete-char 1)))) + (let ((left-brace (completing-read + (TeX-argument-prompt optional prompt + "Which brace") + TeX-left-right-braces))) + (insert left-brace) + (LaTeX-newline) + (save-excursion + (if (TeX-active-mark) + (goto-char (mark))) + (LaTeX-newline) + (LaTeX-insert-corresponding-right-macro-and-brace + left-macro left-brace optional prompt) + (indent-according-to-mode)) + (indent-according-to-mode)))) + +(defvar TeX-arg-right-insert-p) ;; Defined further below. + +(defun TeX-arg-insert-right-brace-maybe (optional) + "Insert the suitable right brace macro such as \\rangle. +Insertion is done when `TeX-arg-right-insert-p' is non-nil. +If the left brace macro is preceded by \\left, \\bigl etc., +supply the corresponding macro such as \\right before the right brace macro." + ;; Nothing is done when TeX-arg-right-insert-p is nil. + (when TeX-arg-right-insert-p + (let (left-brace left-macro) + (save-excursion + ;; Obtain left brace macro name such as "\langle". + (setq left-brace (buffer-substring-no-properties + (point) + (progn (backward-word) (backward-char) + (point))) + ;; Obtain the name of preceding left macro, if any, + ;; such as "left", "bigl" etc. + left-macro (LaTeX--find-preceding-left-macro-name))) + (save-excursion + (if (TeX-active-mark) + (goto-char (mark))) + (LaTeX-insert-corresponding-right-macro-and-brace + left-macro left-brace optional))))) + +(defun LaTeX-insert-left-brace (arg) + "Insert typed left brace ARG times and possibly a correspondig right brace. +Automatic right brace insertion is done only if no prefix ARG is given and +`LaTeX-electric-left-right-brace' is non-nil. +Normally bound to keys \(, { and [." + (interactive "*P") + ;; If you change the condition for `auto-p', adjust the condition in + ;; the `delete-selection' property, just below this defun, accordingly. + (let ((auto-p (and LaTeX-electric-left-right-brace (not arg)))) + (if (and auto-p + (TeX-active-mark) + (> (point) (mark))) + (exchange-point-and-mark)) + (if auto-p + ;; Should supply corresponding right brace with possible + ;; \right-like macro. + (let ((lbrace (char-to-string last-command-event)) lmacro skip-p) + ;; Use `insert' rather than `self-insert-command' so that + ;; unexcpected side effects, e.g. `electric-pair-mode', + ;; won't mess up the following outcomes. (bug#47936) + (insert last-command-event) + (save-excursion + (backward-char) + ;; The brace "{" is exceptional in two aspects. + ;; 1. "\{" should be considered as a single brace + ;; like "(" and "[". + ;; 2. "\left{" is nonsense while "\left\{" and + ;; "\left(" are not. + (if (string= lbrace TeX-grop) + ;; If "{" follows "\", set lbrace to "\{". + (if (TeX-escaped-p) + (progn + (backward-char) + (setq lbrace (concat TeX-esc TeX-grop))) + ;; Otherwise, don't search for left macros. + (setq skip-p t))) + (unless skip-p + ;; Obtain the name of preceding left macro, if any, + ;; such as "left", "bigl" etc. + (setq lmacro (LaTeX--find-preceding-left-macro-name)))) + (let ((TeX-arg-right-insert-p t) + ;; "{" and "}" are paired temporally so that typing + ;; a single "{" should insert a pair "{}". + (TeX-braces-association + (cons (cons TeX-grop TeX-grcl) TeX-braces-association))) + (save-excursion + (if (TeX-active-mark) + (goto-char (mark))) + (LaTeX-insert-corresponding-right-macro-and-brace + lmacro lbrace)))) + ;; Don't supply right brace and just act as ordinary + ;; `self-insert-command'. + (self-insert-command (prefix-numeric-value arg))))) +;; Cater for `delete-selection-mode' (bug#36385) +;; See the header comment of delsel.el for detail. +(put #'LaTeX-insert-left-brace 'delete-selection + (lambda () + ;; Consult `delete-selection' property when + ;; `LaTeX-insert-left-brace' works just the same as + ;; `self-insert-command'. + (and (or (not LaTeX-electric-left-right-brace) + current-prefix-arg) + (let ((f (get #'self-insert-command 'delete-selection))) + ;; If `delete-selection' property of + ;; `self-insert-command' is one of the predefined + ;; special symbols, just return itself. + (if (memq f '(yank supersede kill t nil)) + ;; FIXME: if this list of special symbols is + ;; extended in future delsel.el, this discrimination + ;; will become wrong. + f + ;; Otherwise, call it as a function and return + ;; its value. + (funcall f)))))) + +(defun LaTeX-insert-corresponding-right-macro-and-brace + (lmacro lbrace &optional optional prompt) + "Insert right macro and brace correspoinding to LMACRO and LBRACE. +Left-right association is determined through +`LaTeX-left-right-macros-association' and `TeX-braces-association'. + +If brace association can't be determined or `TeX-arg-right-insert-p' +is nil, consult user which brace should be used." + ;; This function is called with LMACRO being one of the following + ;; possibilities. + ;; (1) nil, which means LBRACE is isolated. + ;; (2) null string, which means LBRACE follows right after "\" to + ;; form "\(" or "\[". + ;; (3) a string in CARs of `LaTeX-left-right-macros-association'. + (let ((rmacro (cdr (assoc lmacro LaTeX-left-right-macros-association))) + (rbrace (cdr (assoc lbrace TeX-braces-association)))) + ;; Since braces like "\(" and "\)" should be paired, RMACRO + ;; should be considered as null string in the case (2). + (if (string= lmacro "") + (setq rmacro "")) + ;; Insert right macros such as "\right", "\bigr" etc., if necessary. + ;; Even single "\" will be inserted so that "\)" or "\]" is + ;; inserted after "\(", "\[". + (if rmacro + (insert TeX-esc rmacro)) + (cond + ((and TeX-arg-right-insert-p rbrace) + (insert rbrace)) + (rmacro + (insert (completing-read + (TeX-argument-prompt + optional prompt + (format "Which brace (default %s)" + (or rbrace "."))) TeX-left-right-braces + nil nil nil nil (or rbrace "."))))))) + +(defun LaTeX--find-preceding-left-macro-name () + "Return the left macro name just before the point, if any. +If the preceding macro isn't left macros such as \\left, \\bigl etc., +return nil. +If the point is just after unescaped `TeX-esc', return the null string." + ;; \left-!- => "left" + ;; \-!- => "" + ;; \infty-!- => nil + ;; \&-!- => nil + ;; \mathrm{abc}-!- => nil + ;; {blah blah blah}-!- => nil + ;; \\-!- => nil + (let ((name (buffer-substring-no-properties + (point) + ;; This is only a helper function, so we do not + ;; preserve point by save-excursion. + (progn + ;; Assume left macro names consist of only A-Z and a-z. + (skip-chars-backward "A-Za-z") + (point))))) + (if (and (TeX-escaped-p) + (or (string= name "") + (assoc name LaTeX-left-right-macros-association))) + name))) +(define-obsolete-function-alias + 'LaTeX-find-preceeding-left-macro-name + #'LaTeX--find-preceding-left-macro-name "AUCTeX 12.2" + "Compatibility function for typo in its name.") + +(defcustom LaTeX-default-author 'user-full-name + "Initial input to `LaTeX-arg-author' prompt. +If nil, do not prompt at all." + :group 'LaTeX-macro + :type '(choice (const :tag "User name in Emacs" user-full-name) + (const :tag "Do not prompt" nil) + string)) + +(defun LaTeX-arg-author (optional &optional prompt) + "Prompt for author name. +Insert the given value as a TeX macro argument. If OPTIONAL is +non-nil, insert it as an optional argument. Use PROMPT as the +prompt string. `LaTeX-default-author' is the initial input." + (let ((author (if LaTeX-default-author + (TeX-read-string + (TeX-argument-prompt optional prompt "Author(s)") + (if (symbolp LaTeX-default-author) + (symbol-value LaTeX-default-author) + LaTeX-default-author)) + ""))) + (TeX-argument-insert author optional nil))) + +(defun TeX-read-key-val (optional key-val-alist &optional prompt) + "Prompt for keys and values in KEY-VAL-ALIST and return them. +If OPTIONAL is non-nil, indicate in the prompt that we are +reading an optional argument. KEY-VAL-ALIST is an alist. The +car of each element should be a string representing a key and the +optional cdr should be a list with strings to be used as values +for the key. KEY-VAL-ALIST can be a symbol or a function call +returning an alist. Use PROMPT as the prompt string." + (multi-prompt-key-value + (TeX-argument-prompt optional prompt "Options (k=v)") + (cond ((and (symbolp key-val-alist) + (boundp key-val-alist)) + (symbol-value key-val-alist)) + ((and (listp key-val-alist) + (symbolp (car key-val-alist)) + (fboundp (car key-val-alist))) + (let ((head (car key-val-alist)) + (tail (cdr key-val-alist))) + (apply head tail))) + (t + key-val-alist)))) + +(defun TeX-arg-key-val (optional key-val-alist &optional prompt) + "Prompt for keys and values in KEY-VAL-ALIST. +Insert the given value as a TeX macro argument. If OPTIONAL is +non-nil, insert it as an optional argument. KEY-VAL-ALIST is an +alist. The car of each element should be a string representing a +key and the optional cdr should be a list with strings to be used +as values for the key. Use PROMPT as the prompt string." + (let ((options (TeX-read-key-val optional key-val-alist prompt))) + (TeX-argument-insert options optional))) + +(defun TeX-read-hook () + "Read a LaTeX hook and return it as a string." + (let* ((hook (completing-read + (TeX-argument-prompt nil nil "Hook") + '("cmd" + "env" + ;; From ltfilehook-doc.pdf + "file" "include" "class" "package" + ;; From lthooks-doc.pdf + "begindocument" "enddocument" + "rmfamily" "sffamily" + "ttfamily" "normalfont" + "bfseries" "mdseries" + ;; From ltshipout-doc.pdf + "shipout" + ;; From ltpara-doc.pdf + "para"))) + (place (lambda (&optional opt pr) + (completing-read + (TeX-argument-prompt opt pr "Where") + (cond ((member hook '("env" "para")) + '("after" "before" "begin" "end")) + ((string= hook "include") + '("after" "before" "end" "excluded")) + ((string= hook "begindocument") + '("before" "end")) + ((string= hook "enddocument") + '("afterlastpage" "afteraux" "info" "end")) + ((member hook '("bfseries" "mdseries")) + '("defaults")) + ((string= hook "shipout") + '("before" "after" + "foreground" "background" + "firstpage" "lastpage")) + (t + '("after" "before")))))) + (search (lambda () + (if (eq TeX-arg-input-file-search 'ask) + (not (y-or-n-p "Find file yourself? ")) + TeX-arg-input-file-search))) + name where files) + (cond ((string= hook "cmd") + ;; cmd/<name>/<where>: <where> is one of (before|after) + (setq name (completing-read + (TeX-argument-prompt nil nil "Command") + (TeX-symbol-list))) + (setq where (funcall place))) + + ;; env/<name>/<where>: <where> is one of (before|after|begin|end) + ((string= hook "env") + (setq name (completing-read + (TeX-argument-prompt nil nil "Environment") + (LaTeX-environment-list))) + (setq where (funcall place))) + + ;; file/<file-name.xxx>/<where>: <file-name> is optional and + ;; must be with extension and <where> is one of + ;; (before|after) + ((string= hook "file") + (if (funcall search) + (progn + (unless TeX-global-input-files-with-extension + (setq TeX-global-input-files-with-extension + (prog2 + (message "Searching for files...") + (mapcar #'list + (TeX-search-files-by-type 'texinputs + 'global + t nil)) + (message "Searching for files...done")))) + (setq name + (completing-read + (TeX-argument-prompt t nil "File") + TeX-global-input-files-with-extension))) + (setq name + (file-name-nondirectory + (read-file-name + (TeX-argument-prompt t nil "File") + nil "")))) + (setq where (funcall place))) + + ;; include/<file-name>/<where>: <file-name> is optional and + ;; <where> is one of (before|after|end|excluded) + ((string= hook "include") + (if (funcall search) + (progn + (setq files + (prog2 + (message "Searching for files...") + ;; \include looks for files with TeX content, + ;; so limit the search: + (let* ((TeX-file-extensions '("tex" "ltx"))) + (TeX-search-files-by-type 'texinputs 'local t t)) + (message "Searching for files...done"))) + (setq name (completing-read + (TeX-argument-prompt t nil "File") + files))) + (setq name + (file-name-base + (read-file-name + (TeX-argument-prompt t nil "File") + nil "")))) + (setq where (funcall place))) + + ;; class/<doc-class>/<where>: <doc-class> is optional and + ;; <where> is one of (before|after) + ((string= hook "class") + (if (funcall search) + (progn + (unless LaTeX-global-class-files + (setq LaTeX-global-class-files + (prog2 + (message "Searching for LaTeX classes...") + (let* ((TeX-file-extensions '("cls"))) + (mapcar #'list + (TeX-search-files-by-type 'texinputs + 'global + t t))) + (message "Searching for LaTeX classes...done")))) + (setq name (completing-read + (TeX-argument-prompt t nil "Document class") + LaTeX-global-class-files))) + (setq name + (file-name-base + (read-file-name + (TeX-argument-prompt t nil "Document class") + nil "")))) + (setq where (funcall place))) + + ;; package/<pack-name>/<where>: <pack-name> is optional and + ;; <where> is one of (before|after) + ((string= hook "package") + (if (funcall search) + (progn + (unless LaTeX-global-package-files + (setq LaTeX-global-package-files + (prog2 + (message "Searching for LaTeX packages...") + (let* ((TeX-file-extensions '("sty"))) + (mapcar #'list + (TeX-search-files-by-type 'texinputs + 'global + t t))) + (message "Searching for LaTeX packages...done")))) + (setq name (completing-read + (TeX-argument-prompt t nil "Package") + LaTeX-global-package-files))) + (setq name (file-name-base + (read-file-name + (TeX-argument-prompt t nil "Package") + nil "")))) + (setq where (funcall place))) + + ;; begindocument/<where>: <where> is empty or one of + ;; (before|end) + ((string= hook "begindocument") + (setq where (funcall place t))) + + ;; enddocument/<where>: <where> is empty or one of + ;; (afterlastpage|afteraux|info|end) + ((string= hook "enddocument") + (setq where (funcall place t))) + + ;; bfseries|mdseries/<where>: <where> is empty or defaults + ((member hook '("bfseries" "mdseries")) + (setq where (funcall place t))) + + ;; shipout/<where>: <where> is one of + ;; (before|after|foreground|background|firstpage|lastpage) + ((string= hook "shipout") + (setq where (funcall place))) + + ;; Other hooks or user specific input, do nothing: + (t nil)) + + ;; Process the input: Concat the given parts and return it + (concat hook + (when (and name (not (string= name ""))) + (concat "/" name)) + (when (and where (not (string= where ""))) + (concat "/" where))))) + +(defun TeX-arg-hook (optional) + "Prompt for a LaTeX hook. +Insert the given hook as a TeX macro argument. If OPTIONAL is +non-nil, insert it as an optional argument." + (TeX-argument-insert (TeX-read-hook) optional)) + +;;; Verbatim constructs + +(defcustom LaTeX-verbatim-macros-with-delims + '("verb" "verb*") + "Macros for inline verbatim with arguments in delimiters, like \\foo|...|. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-macros-with-delims' which returns a value +including buffer-local keyword additions via +`LaTeX-verbatim-macros-with-delims-local' as well." + :group 'LaTeX-macro + :type '(repeat (string))) + +(defvar LaTeX-verbatim-macros-with-delims-local nil + "Buffer-local variable for inline verbatim with args in delimiters. + +Style files should add constructs to this variable and not to +`LaTeX-verbatim-macros-with-delims'. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-macros-with-delims' which returns a value +including values of the variable +`LaTeX-verbatim-macros-with-delims' as well.") +(make-variable-buffer-local 'LaTeX-verbatim-macros-with-delims-local) +(put 'LaTeX-verbatim-macros-with-delims-local 'safe-local-variable + #'TeX--list-of-string-p) + + +(defcustom LaTeX-verbatim-macros-with-braces nil + "Macros for inline verbatim with arguments in braces, like \\foo{...}. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-macros-with-braces' which returns a value +including buffer-local keyword additions via +`LaTeX-verbatim-macros-with-braces-local' as well." + :group 'LaTeX-macro + :type '(repeat (string))) + +(defvar LaTeX-verbatim-macros-with-braces-local nil + "Buffer-local variable for inline verbatim with args in braces. + +Style files should add constructs to this variable and not to +`LaTeX-verbatim-macros-with-braces'. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-macros-with-braces' which returns a value +including values of the variable +`LaTeX-verbatim-macros-with-braces' as well.") +(make-variable-buffer-local 'LaTeX-verbatim-macros-with-braces-local) +(put 'LaTeX-verbatim-macros-with-braces-local 'safe-local-variable + #'TeX--list-of-string-p) + +(defcustom LaTeX-verbatim-environments + '("verbatim" "verbatim*" "filecontents" "filecontents*") + "Verbatim environments. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-environments' which returns a value including +buffer-local keyword additions via +`LaTeX-verbatim-environments-local' as well." + :group 'LaTeX-environment + :type '(repeat (string))) + +(defvar LaTeX-verbatim-environments-local nil + "Buffer-local variable for verbatim environments. + +Style files should add constructs to this variable and not to +`LaTeX-verbatim-environments'. + +Programs should not use this variable directly but the function +`LaTeX-verbatim-environments' which returns a value including +values of the variable `LaTeX-verbatim-environments' as well.") +(make-variable-buffer-local 'LaTeX-verbatim-environments-local) +(put 'LaTeX-verbatim-environments-local 'safe-local-variable + #'TeX--list-of-string-p) + +(defun LaTeX-verbatim-macros-with-delims () + "Return list of verbatim macros with delimiters." + (append LaTeX-verbatim-macros-with-delims + LaTeX-verbatim-macros-with-delims-local)) + +(defun LaTeX-verbatim-macros-with-braces () + "Return list of verbatim macros with braces." + (append LaTeX-verbatim-macros-with-braces + LaTeX-verbatim-macros-with-braces-local)) + +(defun LaTeX-verbatim-environments () + "Return list of verbatim environments." + (append LaTeX-verbatim-environments + LaTeX-verbatim-environments-local)) + +(defun LaTeX-verbatim-macro-boundaries () + "Return boundaries of verbatim macro. +Boundaries are returned as a cons cell where the car is the macro +start and the cdr the macro end. + +Only macros which enclose their arguments with special +non-parenthetical delimiters, like \\verb+foo+, are recognized." + (save-excursion + (let ((orig (point)) + (verbatim-regexp (regexp-opt (LaTeX-verbatim-macros-with-delims) t))) + ;; Search backwards for the macro start, unless we are facing one + (unless (looking-at (concat (regexp-quote TeX-esc) verbatim-regexp)) + (catch 'found + (while (progn + (skip-chars-backward (concat "^\n" (regexp-quote TeX-esc)) + (line-beginning-position)) + (when (looking-at verbatim-regexp) (throw 'found nil)) + (or (bobp) (forward-char -1)) + (/= (point) (line-beginning-position)))))) + ;; Search forward for the macro end, unless we failed to find a start + (unless (bolp) + (let* ((beg (1- (point))) + (macro-end (match-end 0)) + ;; XXX: Here we assume we are dealing with \verb which + ;; expects the delimiter right behind the command. + ;; However, \lstinline can also cope with whitespace as + ;; well as an optional argument after the command. + (delimiter (buffer-substring-no-properties + macro-end (1+ macro-end)))) + ;; Heuristic: If an opening brace is encountered, search for + ;; both the opening and the closing brace as an end marker. + ;; Like that the function should work for \verb|...| as well + ;; as for \url{...}. + (when (string= delimiter TeX-grop) + (setq delimiter (concat delimiter TeX-grcl))) + (goto-char (1+ macro-end)) + (skip-chars-forward (concat "^" delimiter)) + (when (<= orig (point)) + (cons beg (1+ (point))))))))) + +(defun LaTeX-current-verbatim-macro () + "Return name of verbatim macro containing point, nil if none is present." + (let ((macro-boundaries (LaTeX-verbatim-macro-boundaries))) + (when macro-boundaries + (save-excursion + (goto-char (car macro-boundaries)) + (forward-char (length TeX-esc)) + (buffer-substring-no-properties + (point) (progn (skip-chars-forward "@A-Za-z*") (point))))))) + +(defun LaTeX-verbatim-p (&optional pos) + "Return non-nil if position POS is in a verbatim-like construct." + (when pos (goto-char pos)) + (save-match-data + (or (when (fboundp 'font-latex-faces-present-p) + (font-latex-faces-present-p 'font-latex-verbatim-face)) + (member (LaTeX-current-verbatim-macro) + (LaTeX-verbatim-macros-with-delims)) + (member (TeX-current-macro) (LaTeX-verbatim-macros-with-braces)) + (member (LaTeX-current-environment) (LaTeX-verbatim-environments))))) + + +;;; Formatting + +(defcustom LaTeX-syntactic-comments t + "If non-nil comments will be handled according to LaTeX syntax. +This variable influences, among others, the behavior of +indentation and filling which will take LaTeX syntax into +consideration just as is in the non-commented source code." + :type 'boolean + :group 'LaTeX) + + +;;; Indentation + +;; We are distinguishing two different types of comments: +;; +;; 1) Comments starting in column one (line comments) +;; +;; 2) Comments starting after column one with only whitespace +;; preceding it. +;; +;; (There is actually a third type: Comments preceded not only by +;; whitespace but by some code as well; so-called code comments. But +;; they are not relevant for the following explanations.) +;; +;; Additionally we are distinguishing two different types of +;; indentation: +;; +;; a) Outer indentation: Indentation before the comment character(s). +;; +;; b) Inner indentation: Indentation after the comment character(s) +;; (taking into account possible comment padding). +;; +;; Comments can be filled syntax-aware or not. +;; +;; In `doctex-mode' line comments should always be indented +;; syntax-aware and the comment character has to be anchored at the +;; first column (unless the appear in a macrocode environment). Other +;; comments not in the documentation parts always start after the +;; first column and can be indented syntax-aware or not. If they are +;; indented syntax-aware both the indentation before and after the +;; comment character(s) have to be checked and adjusted. Indentation +;; should not move the comment character(s) to the first column. With +;; `LaTeX-syntactic-comments' disabled, line comments should still be +;; indented syntax-aware. +;; +;; In `latex-mode' comments starting in different columns don't have +;; to be handled differently. They don't have to be anchored in +;; column one. That means that in any case indentation before and +;; after the comment characters has to be checked and adjusted. + +(defgroup LaTeX-indentation nil + "Indentation of LaTeX code in AUCTeX" + :group 'LaTeX + :group 'TeX-indentation) + +(defcustom LaTeX-indent-level 2 + "Indentation of begin-end blocks in LaTeX." + :group 'LaTeX-indentation + :type 'integer) + +(defcustom LaTeX-item-indent (- LaTeX-indent-level) + "Extra indentation for lines beginning with an item." + :group 'LaTeX-indentation + :type 'integer) + +(defcustom LaTeX-item-regexp "\\(bib\\)?item\\b" + "Regular expression matching macros considered items." + :group 'LaTeX-indentation + :type 'regexp) + +(defcustom LaTeX-indent-environment-list + '(("verbatim" current-indentation) + ("verbatim*" current-indentation) + ("filecontents" current-indentation) + ("filecontents*" current-indentation) + ("tabular" LaTeX-indent-tabular) + ("tabular*" LaTeX-indent-tabular) + ("array" LaTeX-indent-tabular) + ("eqnarray" LaTeX-indent-tabular) + ("eqnarray*" LaTeX-indent-tabular) + ;; envs of amsmath.sty + ("align" LaTeX-indent-tabular) + ("align*" LaTeX-indent-tabular) + ("aligned" LaTeX-indent-tabular) + ("alignat" LaTeX-indent-tabular) + ("alignat*" LaTeX-indent-tabular) + ("alignedat" LaTeX-indent-tabular) + ("xalignat" LaTeX-indent-tabular) + ("xalignat*" LaTeX-indent-tabular) + ("xxalignat" LaTeX-indent-tabular) + ("flalign" LaTeX-indent-tabular) + ("flalign*" LaTeX-indent-tabular) + ("split" LaTeX-indent-tabular) + ("matrix" LaTeX-indent-tabular) + ("pmatrix" LaTeX-indent-tabular) + ("bmatrix" LaTeX-indent-tabular) + ("Bmatrix" LaTeX-indent-tabular) + ("vmatrix" LaTeX-indent-tabular) + ("Vmatrix" LaTeX-indent-tabular) + ("smallmatrix" LaTeX-indent-tabular) + ("cases" LaTeX-indent-tabular) + ;; envs of mathtools.sty + ("matrix*" LaTeX-indent-tabular) + ("pmatrix*" LaTeX-indent-tabular) + ("bmatrix*" LaTeX-indent-tabular) + ("Bmatrix*" LaTeX-indent-tabular) + ("vmatrix*" LaTeX-indent-tabular) + ("Vmatrix*" LaTeX-indent-tabular) + ("smallmatrix*" LaTeX-indent-tabular) + ("psmallmatrix" LaTeX-indent-tabular) + ("psmallmatrix*" LaTeX-indent-tabular) + ("bsmallmatrix" LaTeX-indent-tabular) + ("bsmallmatrix*" LaTeX-indent-tabular) + ("vsmallmatrix" LaTeX-indent-tabular) + ("vsmallmatrix*" LaTeX-indent-tabular) + ("Vsmallmatrix" LaTeX-indent-tabular) + ("Vsmallmatrix*" LaTeX-indent-tabular) + ("dcases" LaTeX-indent-tabular) + ("dcases*" LaTeX-indent-tabular) + ("rcases" LaTeX-indent-tabular) + ("rcases*" LaTeX-indent-tabular) + ("drcases" LaTeX-indent-tabular) + ("drcases*" LaTeX-indent-tabular) + ("cases*" LaTeX-indent-tabular) + ;; The following should have their own, smart indentation function. + ;; Some other day. + ("displaymath") + ("equation") + ("picture") + ("tabbing") + ;; envs from amsmath.sty + ("gather") ("gather*") ("gathered") + ("equation*") ("multline") ("multline*") + ;; envs from doc.sty + ("macrocode") ("macrocode*")) + "Alist of environments with special indentation. +The second element in each entry is the function to calculate the +indentation level in columns. + +Environments present in this list are not filled by filling +functions, see `LaTeX-fill-region-as-paragraph'." + :group 'LaTeX-indentation + :type '(repeat (list (string :tag "Environment") + (option function)))) + +(defcustom LaTeX-indent-environment-check t + "If non-nil, check for any special environments." + :group 'LaTeX-indentation + :type 'boolean) + +(defcustom LaTeX-document-regexp "document" + "Regexp matching environments in which the indentation starts at col 0." + :group 'LaTeX-indentation + :type 'regexp) + +(defcustom LaTeX-begin-regexp "begin\\b\\|\\[" + "Regexp matching macros considered begins." + :group 'LaTeX-indentation + :type 'regexp) + +(defcustom LaTeX-end-regexp "end\\b\\|\\]" + "Regexp matching macros considered ends." + :group 'LaTeX-indentation + :type 'regexp) + +(defcustom LaTeX-left-right-indent-level LaTeX-indent-level + "The level of indentation produced by a \\left macro." + :group 'LaTeX-indentation + :type 'integer) + +(defcustom LaTeX-indent-comment-start-regexp "%" + "Regexp matching comments ending the indent level count. +This means, we just count the LaTeX tokens \\left, \\right, \\begin, +and \\end up to the first occurence of text matching this regexp. +Thus, the default \"%\" stops counting the tokens at a comment. A +value of \"%[^>]\" would allow you to alter the indentation with +comments, for example with comment `%> \\begin'. +Lines which start with `%' are not considered at all, regardless of this +value." + :group 'LaTeX-indentation + :type 'regexp) + +(defvar docTeX-indent-inner-fixed + `((,(concat (regexp-quote TeX-esc) + "\\(begin\\|end\\)[ \t]*{macrocode\\*?}") + 4 t) + (,(concat (regexp-quote TeX-esc) + "\\(begin\\|end\\)[ \t]*{\\(macro\\|environment\\)\\*?}") + 0 nil)) + "List of items which should have a fixed inner indentation. +The items consist of three parts. The first is a regular +expression which should match the respective string. The second +is the amount of spaces to be used for indentation. The third +toggles if comment padding is relevant or not. If t padding is +part of the amount given, if nil the amount of spaces will be +inserted after potential padding.") + +(defvar-local LaTeX-indent-begin-list nil + "List of macros increasing indentation. +Each item in this list is a string with the name of the macro +without a backslash. The final regexp will be calculated by the +function `LaTeX-indent-commands-regexp-make'. A regexp for the +\\if contructs is added by the function as well. AUCTeX styles +should add their macros to this variable and then run +`LaTeX-indent-commands-regexp-make'.") + +(defvar-local LaTeX-indent-begin-exceptions-list nil + "List of macros which shouldn't increase the indentation. +Each item in this list is a string without a backslash and will +mostly start with 'if'. These macros should not increase +indentation although they start with 'if', for example the +'ifthenelse' macro provided by the ifthen package. AUCTeX styles +should add their macros to this variable and then run +`LaTeX-indent-commands-regexp-make'.") + +(defvar-local LaTeX-indent-mid-list nil + "List of macros which backindent the line where they appear. +Each item in this list is a string with the name of the macro +without a backslash. The final regexp will be calculated by the +function `LaTeX-indent-commands-regexp-make' which takes care of +\\else and \\or. AUCTeX styles should add their macros to this +variable and then run `LaTeX-indent-commands-regexp-make'.") + +(defvar-local LaTeX-indent-end-list nil + "List of macros decreasing indentation. +Each item in this list is a string with the name of the macro +without a backslash. The final regexp will be calculated by the +function `LaTeX-indent-commands-regexp-make' which takes care of +\\fi. AUCTeX styles should add their macros to this variable and +then run `LaTeX-indent-commands-regexp-make'.") + +(defvar-local LaTeX-indent-begin-regexp-local nil + "Regexp calculated from `LaTeX-indent-begin-list'. +The value is calculated and set by the function +`LaTeX-indent-commands-regexp-make' which already takes care of +\\if constructs.") + +(defvar-local LaTeX-indent-begin-regexp-exceptions-local nil + "Regexp calculated from `LaTeX-indent-begin-exceptions-list'. +The value is calculated and set by the function +`LaTeX-indent-commands-regexp-make' which already takes care of +\\ifthenelse.") + +(defvar-local LaTeX-indent-mid-regexp-local nil + "Regexp calculated from `LaTeX-indent-mid-list'. +The value is calculated and set by the function +`LaTeX-indent-commands-regexp-make' which already takes care of +\\else and \\or.") + +(defvar-local LaTeX-indent-end-regexp-local nil + "Regexp calculated from `LaTeX-indent-end-list'. +The value is calculated and set by the function +`LaTeX-indent-commands-regexp-make' which already takes care of +\\fi.") + +(defun LaTeX-indent-commands-regexp-make () + "Calculate final regexp for adjusting indentation. +This function takes the elements provided in +`LaTeX-indent-begin-list', `LaTeX-indent-begin-exceptions-list', +`LaTeX-indent-mid-list' and `LaTeX-indent-end-list' and generates +the regexp's which are stored in +`LaTeX-indent-begin-regexp-local', +`LaTeX-indent-begin-regexp-exceptions-local', +`LaTeX-indent-mid-regexp-local' and +`LaTeX-indent-end-regexp-local' accordingly. Some standard +macros are added to the regexp's. This function is called in +`LaTeX-common-initialization' to set the regexp's." + (let* (cmds + symbs + (func (lambda (in regexp out) + (setq cmds nil + symbs nil) + (dolist (elt in) + (if (string-match "[^a-zA-Z@]" elt) + (push elt symbs) + (push elt cmds))) + (set out (concat regexp + (when cmds + (concat "\\|" + (regexp-opt cmds) + "\\b")) + (when symbs + (concat "\\|" + (regexp-opt symbs)))))))) + (funcall func + LaTeX-indent-begin-list + "if[a-zA-Z@]*\\b" + 'LaTeX-indent-begin-regexp-local) + (funcall func + LaTeX-indent-mid-list + "else\\b\\|or\\b" + 'LaTeX-indent-mid-regexp-local) + (funcall func + LaTeX-indent-end-list + "fi\\b" + 'LaTeX-indent-end-regexp-local) + (funcall func + LaTeX-indent-begin-exceptions-list + "ifthenelse\\b" + 'LaTeX-indent-begin-regexp-exceptions-local))) + +(defun LaTeX-indent-line () + "Indent the line containing point, as LaTeX source. +Add `LaTeX-indent-level' indentation in each \\begin{ - \\end{ block. +Lines starting with an item is given an extra indentation of +`LaTeX-item-indent'." + (interactive) + (let* ((case-fold-search nil) + ;; Compute a fill prefix. Whitespace after the comment + ;; characters will be disregarded and replaced by + ;; `comment-padding'. + (fill-prefix + (and (TeX-in-commented-line) + (save-excursion + (beginning-of-line) + (looking-at + (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+")) + (concat (match-string 0) (TeX-comment-padding-string)))))) + (save-excursion + (cond ((and fill-prefix + (TeX-in-line-comment) + (eq major-mode 'doctex-mode)) + ;; If point is in a line comment in `doctex-mode' we only + ;; consider the inner indentation. + (let ((inner-indent (LaTeX-indent-calculate 'inner))) + (when (/= (LaTeX-current-indentation 'inner) inner-indent) + (LaTeX-indent-inner-do inner-indent)))) + ((and fill-prefix + LaTeX-syntactic-comments) + ;; In any other case of a comment we have to consider + ;; outer and inner indentation if we do syntax-aware + ;; indentation. + (let ((inner-indent (LaTeX-indent-calculate 'inner)) + (outer-indent (LaTeX-indent-calculate 'outer))) + (when (/= (LaTeX-current-indentation 'inner) inner-indent) + (LaTeX-indent-inner-do inner-indent)) + (when (/= (LaTeX-current-indentation 'outer) outer-indent) + (LaTeX-indent-outer-do outer-indent)))) + (t + ;; The default is to adapt whitespace before any + ;; non-whitespace character, i.e. to do outer + ;; indentation. + (let ((outer-indent (LaTeX-indent-calculate 'outer))) + (when (/= (LaTeX-current-indentation 'outer) outer-indent) + (LaTeX-indent-outer-do outer-indent)))))) + (when (< (current-column) (save-excursion + (LaTeX-back-to-indentation) (current-column))) + (LaTeX-back-to-indentation)))) + +(defun LaTeX-indent-inner-do (inner-indent) + ;; Small helper function for `LaTeX-indent-line' to perform + ;; indentation after a comment character. It requires that + ;; `LaTeX-indent-line' already set the appropriate variables and + ;; should not be used outside of `LaTeX-indent-line'. + (move-to-left-margin) + (TeX-re-search-forward-unescaped + (concat "\\(" TeX-comment-start-regexp "+[ \t]*\\)+") (line-end-position) t) + (delete-region (line-beginning-position) (point)) + (insert fill-prefix) + (indent-to (+ inner-indent (length fill-prefix)))) + +(defun LaTeX-indent-outer-do (outer-indent) + ;; Small helper function for `LaTeX-indent-line' to perform + ;; indentation of normal lines or before a comment character in a + ;; commented line. It requires that `LaTeX-indent-line' already set + ;; the appropriate variables and should not be used outside of + ;; `LaTeX-indent-line'. + (back-to-indentation) + (delete-region (line-beginning-position) (point)) + (indent-to outer-indent)) + +(defun LaTeX-verbatim-regexp (&optional comment) + "Calculate the verbatim env regex from `LaTeX-verbatim-environments'. +If optional argument COMMENT is non-nil, include comment env from +`LaTeX-comment-env-list'." + (regexp-opt (append (LaTeX-verbatim-environments) + (if comment LaTeX-comment-env-list)))) + +(defun LaTeX-indent-calculate (&optional force-type) + "Return the indentation of a line of LaTeX source. +FORCE-TYPE can be used to force the calculation of an inner or +outer indentation in case of a commented line. The symbols +`inner' and `outer' are recognized." + (save-excursion + (LaTeX-back-to-indentation force-type) + (let ((i 0) + (list-length (safe-length docTeX-indent-inner-fixed)) + (case-fold-search nil) + entry + found) + (cond ((save-excursion (beginning-of-line) (bobp)) 0) + ((and (eq major-mode 'doctex-mode) + fill-prefix + (TeX-in-line-comment) + (progn + (while (and (< i list-length) + (not found)) + (setq entry (nth i docTeX-indent-inner-fixed)) + (when (looking-at (nth 0 entry)) + (setq found t)) + (setq i (1+ i))) + found)) + (if (nth 2 entry) + (- (nth 1 entry) (if (integerp comment-padding) + comment-padding + (length comment-padding))) + (nth 1 entry))) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(begin\\|end\\){" + (LaTeX-verbatim-regexp t) + "}")) + ;; \end{verbatim} must be flush left, otherwise an unwanted + ;; empty line appears in LaTeX's output. + 0) + ((and LaTeX-indent-environment-check + ;; Special environments. + (let ((entry (assoc (or LaTeX-current-environment + (LaTeX-current-environment)) + LaTeX-indent-environment-list))) + (and entry + (nth 1 entry) + (funcall (nth 1 entry)))))) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-end-regexp + "\\)")) + ;; Backindent at \end. + (- (LaTeX-indent-calculate-last force-type) LaTeX-indent-level)) + ((looking-at (concat (regexp-quote TeX-esc) "right\\b")) + ;; Backindent at \right. + (- (LaTeX-indent-calculate-last force-type) + LaTeX-left-right-indent-level)) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-item-regexp + "\\)")) + ;; Items. + (+ (LaTeX-indent-calculate-last force-type) LaTeX-item-indent)) + ;; Other (La)TeX programming constructs which end + ;; something, \fi for example where we backindent: + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-indent-end-regexp-local + "\\)")) + (- (LaTeX-indent-calculate-last force-type) LaTeX-indent-level)) + ;; (La)TeX programming contructs which backindent only the + ;; current line, for example \or or \else where we backindent: + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-indent-mid-regexp-local + "\\)")) + (- (LaTeX-indent-calculate-last force-type) LaTeX-indent-level)) + ((memq (char-after) (append + TeX-indent-close-delimiters '(?\}))) + ;; End brace in the start of the line. + (- (LaTeX-indent-calculate-last force-type) + TeX-brace-indent-level)) + (t (LaTeX-indent-calculate-last force-type)))))) + +(defun LaTeX-indent-level-count () + "Count indentation change caused by macros in the current line. +Macros contain \\left, \\right, \\begin, \\end and \\if-\\fi +constructs. A special case is \\newif where the following +\\if<foo> should not change the indentation." + (save-excursion + (save-restriction + (let ((count 0)) + (narrow-to-region (point) + (save-excursion + (re-search-forward + (concat "[^" TeX-esc "]" + "\\(" LaTeX-indent-comment-start-regexp + "\\)\\|\n\\|\\'")) + (backward-char) + (point))) + (while (search-forward TeX-esc nil t) + (cond + ((looking-at "left\\b") + (setq count (+ count LaTeX-left-right-indent-level))) + ((looking-at "right\\b") + (setq count (- count LaTeX-left-right-indent-level))) + ((looking-at LaTeX-begin-regexp) + (setq count (+ count LaTeX-indent-level))) + ((looking-at LaTeX-end-regexp) + (setq count (- count LaTeX-indent-level))) + ((looking-at "newif\\b") + (search-forward TeX-esc (line-end-position) t)) + ((and (not (looking-at LaTeX-indent-begin-regexp-exceptions-local)) + (looking-at LaTeX-indent-begin-regexp-local)) + (setq count (+ count LaTeX-indent-level))) + ((looking-at LaTeX-indent-end-regexp-local) + (setq count (- count LaTeX-indent-level))) + ((looking-at (regexp-quote TeX-esc)) + (forward-char 1)))) + count)))) + +(defun LaTeX-indent-calculate-last (&optional force-type) + "Return the correct indentation of a normal line of text. +The point is supposed to be at the beginning of the current line. +FORCE-TYPE can be used to force the calculation of an inner or +outer indentation in case of a commented line. The symbols +`inner' and `outer' are recognized." + (let (line-comment-current-flag + line-comment-last-flag + comment-current-flag + comment-last-flag) + (beginning-of-line) + (setq line-comment-current-flag (TeX-in-line-comment) + comment-current-flag (TeX-in-commented-line)) + (if comment-current-flag + (skip-chars-backward "%\n\t ") + (skip-chars-backward "\n\t ")) + (beginning-of-line) + ;; If we are called in a non-comment line, skip over comment + ;; lines. The computation of indentation should in this case + ;; rather take the last non-comment line into account. + ;; Otherwise there might arise problems with e.g. multi-line + ;; code comments. This behavior is not enabled in docTeX mode + ;; where large amounts of line comments may have to be skipped + ;; and indentation should not be influenced by unrelated code in + ;; other macrocode environments. + (while (and (not (eq major-mode 'doctex-mode)) + (not comment-current-flag) + (TeX-in-commented-line) + (not (bobp))) + (skip-chars-backward "\n\t ") + (beginning-of-line)) + (setq line-comment-last-flag (TeX-in-line-comment) + comment-last-flag (TeX-in-commented-line)) + (LaTeX-back-to-indentation force-type) + ;; Separate line comments and other stuff (normal text/code and + ;; code comments). Additionally we don't want to compute inner + ;; indentation when a commented and a non-commented line are + ;; compared. + (cond ((or (and (eq major-mode 'doctex-mode) + (or (and line-comment-current-flag + (not line-comment-last-flag)) + (and (not line-comment-current-flag) + line-comment-last-flag))) + (and force-type + (eq force-type 'inner) + (or (and comment-current-flag + (not comment-last-flag)) + (and (not comment-current-flag) + comment-last-flag)))) + 0) + ((looking-at (concat (regexp-quote TeX-esc) + "begin *{\\(" + LaTeX-document-regexp + "\\)}")) + ;; I dislike having all of the document indented... + (+ (LaTeX-current-indentation force-type) + ;; Some people have opening braces at the end of the + ;; line, e.g. in case of `\begin{letter}{%'. + (TeX-brace-count-line))) + ((and (eq major-mode 'doctex-mode) + (looking-at (concat (regexp-quote TeX-esc) + "end[ \t]*{macrocode\\*?}")) + fill-prefix + (TeX-in-line-comment)) + ;; Reset indentation to zero after a macrocode environment + ;; only when we're not still inside a describing + ;; environment like "macro" or "environment" etc. Text + ;; inside these environments after '\end{macrocode}' is + ;; indented with `LaTeX-indent-level': + (let ((outer-env (LaTeX-current-environment 2))) + (cond ((member outer-env '("macro" "environment")) + LaTeX-indent-level) + ((and (fboundp 'LaTeX-doc-NewDocElement-list) + (LaTeX-doc-NewDocElement-list) + (member outer-env + (mapcar #'cadr (LaTeX-doc-NewDocElement-list)))) + LaTeX-indent-level) + (t 0)))) + ((looking-at (concat (regexp-quote TeX-esc) + "begin *{" + ;; Don't give optional argument here + ;; because indent would be disabled + ;; inside comment env otherwise. + (LaTeX-verbatim-regexp) + "}")) + 0) + ((looking-at (concat (regexp-quote TeX-esc) + "end *{" + (LaTeX-verbatim-regexp t) + "}")) + ;; If I see an \end{verbatim} in the previous line I skip + ;; back to the preceding \begin{verbatim}. + (save-excursion + (if (re-search-backward (concat (regexp-quote TeX-esc) + "begin *{" + (LaTeX-verbatim-regexp t) + "}") 0 t) + (LaTeX-indent-calculate-last force-type) + 0))) + (t (+ (LaTeX-current-indentation force-type) + (if (not (and force-type + (eq force-type 'outer) + (TeX-in-commented-line))) + (+ (LaTeX-indent-level-count) + (TeX-brace-count-line)) + 0) + (cond ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-end-regexp + "\\)")) + LaTeX-indent-level) + ((looking-at + (concat (regexp-quote TeX-esc) "right\\b")) + LaTeX-left-right-indent-level) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-item-regexp + "\\)")) + (- LaTeX-item-indent)) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-indent-end-regexp-local + "\\)")) + LaTeX-indent-level) + ((looking-at (concat (regexp-quote TeX-esc) + "\\(" + LaTeX-indent-mid-regexp-local + "\\)")) + LaTeX-indent-level) + ((memq (char-after) (append + TeX-indent-close-delimiters + '(?\}))) + TeX-brace-indent-level) + (t 0))))))) + +(defun LaTeX-current-indentation (&optional force-type) + "Return the indentation of a line. +FORCE-TYPE can be used to force the calculation of an inner or +outer indentation in case of a commented line. The symbols +`inner' and `outer' are recognized." + (if (and fill-prefix + (or (and force-type + (eq force-type 'inner)) + (and (not force-type) + (or + ;; If `LaTeX-syntactic-comments' is not enabled, + ;; do conventional indentation + LaTeX-syntactic-comments + ;; Line comments in `doctex-mode' are always + ;; indented syntax-aware so we need their inner + ;; indentation. + (and (TeX-in-line-comment) + (eq major-mode 'doctex-mode)))))) + ;; INNER indentation + (save-excursion + (beginning-of-line) + (looking-at (concat "\\(?:[ \t]*" TeX-comment-start-regexp "+\\)+" + "\\([ \t]*\\)")) + (- (length (match-string 1)) (length (TeX-comment-padding-string)))) + ;; OUTER indentation + (current-indentation))) + +(defun LaTeX-back-to-indentation (&optional force-type) + "Move point to the first non-whitespace character on this line. +If it is commented and comments are formatted syntax-aware move +point to the first non-whitespace character after the comment +character(s), but only if `this-command' is not a newline +command, that is, `TeX-newline' or the value of +`TeX-newline-function'. The optional argument FORCE-TYPE can be +used to force point being moved to the inner or outer indentation +in case of a commented line. The symbols `inner' and `outer' are +recognized." + (if (or (and force-type + (eq force-type 'inner)) + (and (not force-type) + (or (and (TeX-in-line-comment) + (eq major-mode 'doctex-mode)) + (and (TeX-in-commented-line) + ;; Only move after the % if we're not + ;; performing a newline command (bug#47757). + (not (memq this-command + `( TeX-newline + ,TeX-newline-function))) + LaTeX-syntactic-comments)))) + (progn + (beginning-of-line) + ;; Should this be anchored at the start of the line? + (TeX-re-search-forward-unescaped + (concat "\\(?:" TeX-comment-start-regexp "+[ \t]*\\)+") + (line-end-position) t)) + (back-to-indentation))) + + +;;; Filling + +;; The default value should try not to break formulae across lines (this is +;; useful for preview-latex) and give a meaningful filling. +(defcustom LaTeX-fill-break-at-separators '(\\\( \\\[) + "List of separators before or after which respectively a line +break will be inserted if they do not fit into one line." + :group 'LaTeX + :type '(set :tag "Contents" + (const :tag "Opening Brace" \{) + (const :tag "Closing Brace" \}) + (const :tag "Opening Bracket" \[) + (const :tag "Opening Inline Math Switches" \\\() + (const :tag "Closing Inline Math Switches" \\\)) + (const :tag "Opening Display Math Switch" \\\[) + (const :tag "Closing Display Math Switch" \\\]))) + +(defcustom LaTeX-fill-break-before-code-comments t + "If non-nil, a line with some code followed by a comment will +be broken before the last non-comment word in case the comment +does not fit into the line." + :group 'LaTeX + :type 'boolean) + +(defcustom LaTeX-fill-excluded-macros nil + "List of macro names (without leading \\) whose arguments must +not be subject to filling." + :group 'LaTeX + :type '(repeat string)) + +(defvar LaTeX-nospace-between-char-regexp "\\c|" + "Regexp matching a character where no interword space is necessary. +Words formed by such characters can be broken across newlines.") + +(defvar LaTeX-fill-newline-hook nil + "Hook run after `LaTeX-fill-newline' inserted and indented a new line.") + +(defun LaTeX-fill-region-as-paragraph (from to &optional justify-flag) + "Fill region as one paragraph. +Break lines to fit `fill-column', but leave all lines ending with +\\\\ \(plus its optional argument) alone. Lines with code +comments and lines ending with `\\par' are included in filling but +act as boundaries. Prefix arg means justify too. From program, +pass args FROM, TO and JUSTIFY-FLAG. + +You can disable filling inside a specific environment by adding +it to `LaTeX-indent-environment-list', only indentation is +performed in that case." + (interactive "*r\nP") + (let ((end-marker (copy-marker to)) has-code-comment has-regexp-match) + (if (or (assoc (LaTeX-current-environment) LaTeX-indent-environment-list) + (member (TeX-current-macro) LaTeX-fill-excluded-macros) + ;; This could be generalized, if there are more cases where + ;; a special string at the start of a region to fill should + ;; inhibit filling. + (progn (save-excursion (goto-char from) + (looking-at (concat TeX-comment-start-regexp + "+[ \t]*" + "Local Variables:"))))) + ;; Filling disabled, only do indentation. + (indent-region from to nil) + ;; XXX: This `save-restriction' is a leftover of older codes and + ;; can now be removed. + (save-restriction + (goto-char from) + (while (< (point) end-marker) + ;; Code comments. + (catch 'found + (while (setq has-code-comment + (TeX-search-forward-comment-start end-marker)) + ;; See if there is at least one non-whitespace + ;; character before the comment starts. + (goto-char has-code-comment) + (skip-chars-backward " \t" (line-beginning-position)) + (if (not (bolp)) + ;; A real code comment. + (throw 'found t) + ;; Not a code comment. Continue the loop. + (forward-line 1) + (if (> (point) end-marker) + (goto-char end-marker))))) + + ;; Go back to the former point for the next regexp search. + (goto-char from) + + (when (setq has-regexp-match + (re-search-forward + (concat + "\\(" + ;; Lines ending with `\par'. + ;; XXX: Why exclude \n? vv + "\\(?:\\=\\|[^" TeX-esc "\n]\\)\\(?:" + (regexp-quote (concat TeX-esc TeX-esc)) + "\\)*" + (regexp-quote TeX-esc) "par[ \t]*" + ;; XXX: What's this "whitespaces in braces" ? + ;; vvvvvvvv + "\\(?:{[ \t]*}\\)?[ \t]*$" + "\\)\\|" + ;; Lines ending with `\\'. + ;; XXX: This matches a line ending with "\\\ ". + ;; Should we avoid such corner case? + (regexp-quote (concat TeX-esc TeX-esc)) + ;; XXX: Why not just "\\s-*\\*?" ? + "\\(?:\\s-*\\*\\)?" + ;; XXX: Why not "\\s-*\\(?:\\[[^]]*\\]\\)?" ? + "\\(?:\\s-*\\[[^]]*\\]\\)?" + "\\s-*$") + (or has-code-comment end-marker) t)) + ;; The regexp matched before the code comment (if any). + (setq has-code-comment nil)) + + ;; Here no need to go back to the former position because + ;; "ELSE" part of the following `if' doesn't rely on the + ;; current point. + ;; (goto-char from) + + (if (or has-code-comment has-regexp-match) + (progn + (goto-char (or has-code-comment has-regexp-match)) + (goto-char (line-end-position)) + (delete-horizontal-space) + ;; I doubt very much if we want justify - + ;; this is a line with \\ + ;; if you think otherwise - uncomment the next line + ;; (and justify-flag (justify-current-line)) + (forward-char) + ;; keep our position in a buffer + (save-excursion + ;; Code comments and lines ending with `\par' are + ;; included in filling. Lines ending with `\\' are + ;; skipped. + (if (or has-code-comment + (match-beginning 1)) + (LaTeX-fill-region-as-para-do from (point) justify-flag) + (LaTeX-fill-region-as-para-do + from (line-beginning-position 0) justify-flag) + ;; At least indent the line ending with `\\'. + (indent-according-to-mode))) + (setq from (point))) + ;; ELSE part follows - loop termination relies on a fact + ;; that (LaTeX-fill-region-as-para-do) moves point past + ;; the filled region + (LaTeX-fill-region-as-para-do from end-marker justify-flag))))) + (set-marker end-marker nil))) + +;; The content of `LaTeX-fill-region-as-para-do' was copied from the +;; function `fill-region-as-paragraph' in `fill.el' (CVS Emacs, +;; January 2004) and adapted to the needs of AUCTeX. + +(defun LaTeX-fill-region-as-para-do (from to &optional justify + nosqueeze squeeze-after) + "Fill the region defined by FROM and TO as one paragraph. +It removes any paragraph breaks in the region and extra newlines at the end, +indents and fills lines between the margins given by the +`current-left-margin' and `current-fill-column' functions. +\(In most cases, the variable `fill-column' controls the width.) +It leaves point at the beginning of the line following the paragraph. + +Normally performs justification according to the `current-justification' +function, but with a prefix arg, does full justification instead. + +From a program, optional third arg JUSTIFY can specify any type of +justification. Fourth arg NOSQUEEZE non-nil means not to make spaces +between words canonical before filling. Fifth arg SQUEEZE-AFTER, if non-nil, +means don't canonicalize spaces before that position. + +Return the `fill-prefix' used for filling. + +If `sentence-end-double-space' is non-nil, then period followed by one +space does not end a sentence, so don't break a line there." + (interactive (progn + (barf-if-buffer-read-only) + (list (region-beginning) (region-end) + (if current-prefix-arg 'full)))) + (unless (memq justify '(t nil none full center left right)) + (setq justify 'full)) + + ;; Make sure "to" is the endpoint. + (goto-char (min from to)) + (setq to (max from to)) + ;; Ignore blank lines at beginning of region. + (skip-chars-forward " \t\n") + + (let ((from-plus-indent (point)) + (oneleft nil)) + + (beginning-of-line) + (setq from (point)) + + ;; Delete all but one soft newline at end of region. + ;; And leave TO before that one. + (goto-char to) + (while (and (> (point) from) (eq ?\n (char-after (1- (point))))) + (if (and oneleft + (not (and use-hard-newlines + (get-text-property (1- (point)) 'hard)))) + (delete-char -1) + (backward-char 1) + (setq oneleft t))) + (setq to (copy-marker (point) t)) + (goto-char from-plus-indent)) + + (if (not (> to (point))) + ;; There is no paragraph, only whitespace: exit now. + (progn + (set-marker to nil) + nil) + + (or justify (setq justify (current-justification))) + + ;; Don't let Adaptive Fill mode alter the fill prefix permanently. + (let ((fill-prefix fill-prefix)) + ;; Figure out how this paragraph is indented, if desired. + (when (and adaptive-fill-mode + (or (null fill-prefix) (string= fill-prefix ""))) + (setq fill-prefix (fill-context-prefix from to)) + ;; Ignore a white-space only fill-prefix + ;; if we indent-according-to-mode. + (when (and fill-prefix fill-indent-according-to-mode + (string-match "\\`[ \t]*\\'" fill-prefix)) + (setq fill-prefix nil))) + + (goto-char from) + (beginning-of-line) + + (if (not justify) ; filling disabled: just check indentation + (progn + (goto-char from) + (while (< (point) to) + (if (and (not (eolp)) + (< (LaTeX-current-indentation) (current-left-margin))) + (fill-indent-to-left-margin)) + (forward-line 1))) + + (when use-hard-newlines + (remove-text-properties from to '(hard nil))) + ;; Make sure first line is indented (at least) to left margin... + (indent-according-to-mode) + ;; Delete the fill-prefix from every line. + (fill-delete-prefix from to fill-prefix) + + (setq from (point)) + + ;; FROM, and point, are now before the text to fill, + ;; but after any fill prefix on the first line. + + (fill-delete-newlines from to justify nosqueeze squeeze-after) + + ;; This is the actual FILLING LOOP. + (goto-char from) + (let* (linebeg + (code-comment-start (save-excursion + (LaTeX-back-to-indentation) + (TeX-search-forward-comment-start + (line-end-position)))) + (end-marker (save-excursion + (goto-char (or code-comment-start to)) + (point-marker))) + (LaTeX-current-environment (LaTeX-current-environment))) + ;; Fill until point is greater than the end point. If there + ;; is a code comment, use the code comment's start as a + ;; limit. + (while (and (< (point) (marker-position end-marker)) + (or (not code-comment-start) + (and code-comment-start + (> (- (marker-position end-marker) + (line-beginning-position)) + fill-column)))) + (setq linebeg (point)) + (move-to-column (current-fill-column)) + (if (when (< (point) (marker-position end-marker)) + ;; Find the position where we'll break the line. + (forward-char 1) ; Use an immediately following + ; space, if any. + (LaTeX-fill-move-to-break-point linebeg) + + ;; Check again to see if we got to the end of + ;; the paragraph. + (skip-chars-forward " \t") + (< (point) (marker-position end-marker))) + ;; Found a place to cut. + (progn + (LaTeX-fill-newline) + (when justify + ;; Justify the line just ended, if desired. + (save-excursion + (forward-line -1) + (justify-current-line justify nil t)))) + + (goto-char end-marker) + ;; Justify this last line, if desired. + (if justify (justify-current-line justify t t)))) + + ;; Fill a code comment if necessary. (Enable this code if + ;; you want the comment part in lines with code comments to + ;; be filled. Originally it was disabled because the + ;; indentation code indented the lines following the line + ;; with the code comment to the column of the comment + ;; starters. That means, it would have looked like this: + ;; | code code code % comment + ;; | % comment + ;; | code code code + ;; This now (2005-07-29) is not the case anymore. But as + ;; filling code comments like this would split a single + ;; paragraph into two separate ones, we still leave it + ;; disabled. I leave the code here in case it is useful for + ;; somebody. + ;; (when (and code-comment-start + ;; (> (- (line-end-position) (line-beginning-position)) + ;; fill-column)) + ;; (LaTeX-fill-code-comment justify)) + + ;; The following is an alternative strategy to minimize the + ;; occurence of overfull lines with code comments. A line + ;; will be broken before the last non-comment word if the + ;; code comment does not fit into the line. + (when (and LaTeX-fill-break-before-code-comments + code-comment-start + (> (- (line-end-position) (line-beginning-position)) + fill-column)) + (beginning-of-line) + (goto-char end-marker) + (while (not (looking-at TeX-comment-start-regexp)) (forward-char)) + (skip-chars-backward " \t") + (skip-chars-backward "^ \t\n") + (unless (or (bolp) + ;; Comment starters and whitespace. + (TeX-looking-at-backward + (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)*" + "[ \t]*") + (line-beginning-position))) + (LaTeX-fill-newline))) + (set-marker end-marker nil))) + ;; Leave point after final newline. + (goto-char to) + (unless (eobp) (forward-char 1)) + (set-marker to nil) + ;; Return the fill-prefix we used + fill-prefix))) + +(defun LaTeX-fill-move-to-break-point (linebeg) + "Move to the position where the line should be broken." + (fill-move-to-break-point linebeg) + ;; Prevent line break between 2-byte char and 1-byte char. + (when (and (or (and (not (looking-at LaTeX-nospace-between-char-regexp)) + (TeX-looking-at-backward + LaTeX-nospace-between-char-regexp 1)) + (and (not (TeX-looking-at-backward + LaTeX-nospace-between-char-regexp 1)) + (looking-at LaTeX-nospace-between-char-regexp))) + (re-search-backward + (concat LaTeX-nospace-between-char-regexp + LaTeX-nospace-between-char-regexp + LaTeX-nospace-between-char-regexp + "\\|" + ".\\ca\\s +\\ca") linebeg t)) + (if (looking-at "..\\c>") + (forward-char 1) + (forward-char 2))) + ;; Cater for Japanese Macro + (when (and (boundp 'japanese-TeX-mode) japanese-TeX-mode + (aref (char-category-set (char-after)) ?j) + (TeX-looking-at-backward (concat (regexp-quote TeX-esc) TeX-token-char "*") + (1- (- (point) linebeg))) + (not (TeX-escaped-p (match-beginning 0)))) + (goto-char (match-beginning 0))) + ;; Cater for \verb|...| (and similar) contructs which should not be + ;; broken. (FIXME: Make it work with shortvrb.sty (also loaded by + ;; doc.sty) where |...| is allowed. Arbitrary delimiters may be + ;; chosen with \MakeShortVerb{<char>}.) This could probably be + ;; handled with `fill-nobreak-predicate', but this is not available + ;; in XEmacs. + (let ((final-breakpoint (point)) + (verb-macros (regexp-opt (append (LaTeX-verbatim-macros-with-delims) + (LaTeX-verbatim-macros-with-braces))))) + (save-excursion + ;; Look for the start of a verbatim macro in the current line. + (when (re-search-backward (concat (regexp-quote TeX-esc) + "\\(?:" verb-macros "\\)\\([^a-z@*]\\)") + (line-beginning-position) t) + ;; Determine start and end of verbatim macro. + (let ((beg (point)) + (end (if (not (string-match "[ [{]" (match-string 1))) + (cdr (LaTeX-verbatim-macro-boundaries)) + (TeX-find-macro-end)))) + ;; Determine if macro end is behind fill column. + (when (and end + (> (- end (line-beginning-position)) + (current-fill-column)) + (> end final-breakpoint)) + ;; Search backwards for place to break before the macro. + (goto-char beg) + (skip-chars-backward "^ \n") + ;; Determine if point ended up at the beginning of the line. + (when (save-excursion (skip-chars-backward " \t%") (bolp)) + ;; Search forward for a place to break after the macro. + (goto-char end) + (skip-chars-forward "^ \n" (point-max))) + (setq final-breakpoint (point)))))) + (goto-char final-breakpoint)) + (when LaTeX-fill-break-at-separators + (let ((orig-breakpoint (point)) + (final-breakpoint (point)) + start-point) + (save-excursion + (beginning-of-line) + (LaTeX-back-to-indentation 'outer) + (setq start-point (point)) + ;; Find occurences of [, $, {, }, \(, \), \[, \] or $$. + (while (and (= final-breakpoint orig-breakpoint) + (TeX-re-search-forward-unescaped + (concat "[[{}]\\|\\$\\$?\\|" + (regexp-quote TeX-esc) "[][()]") + orig-breakpoint t)) + (let ((match-string (match-string 0))) + (cond + ;; [ (opening bracket) (The closing bracket should + ;; already be handled implicitely by the code for the + ;; opening brace.) + ((save-excursion + (and (memq '\[ LaTeX-fill-break-at-separators) + (string= match-string "[") + (TeX-re-search-forward-unescaped (concat "\\][ \t]*{") + (line-end-position) t) + (> (- (or (TeX-find-closing-brace) + (line-end-position)) + (line-beginning-position)) + fill-column))) + (save-excursion + (skip-chars-backward "^ \n") + (when (> (point) start-point) + (setq final-breakpoint (point))))) + ;; { (opening brace) + ((save-excursion + (and (memq '\{ LaTeX-fill-break-at-separators) + (string= match-string "{") + (> (- (save-excursion + ;; `TeX-find-closing-brace' is not enough + ;; if there is no breakpoint in form of + ;; whitespace after the brace. + (goto-char (or (TeX-find-closing-brace) + (line-end-position))) + (skip-chars-forward "^ \t\n") + (point)) + (line-beginning-position)) + fill-column))) + (save-excursion + (skip-chars-backward "^ \n") + ;; The following is a primitive and error-prone method + ;; to cope with point probably being inside square + ;; brackets. A better way would be to use functions + ;; to determine if point is inside an optional + ;; argument and to jump to the start and end brackets. + (when (save-excursion + (TeX-re-search-forward-unescaped + (concat "\\][ \t]*{") orig-breakpoint t)) + (TeX-search-backward-unescaped "[" + (line-beginning-position) t) + (skip-chars-backward "^ \n")) + (when (> (point) start-point) + (setq final-breakpoint (point))))) + ;; } (closing brace) + ((save-excursion + (and (memq '\} LaTeX-fill-break-at-separators) + (string= match-string "}") + (save-excursion + (backward-char 2) + (not (TeX-find-opening-brace + nil (line-beginning-position)))))) + (save-excursion + (skip-chars-forward "^ \n") + (when (> (point) start-point) + (setq final-breakpoint (point))))) + ;; $ or \( or \[ or $$ (opening math) + ((save-excursion + (and (or (and (memq '\\\( LaTeX-fill-break-at-separators) + (or (and (string= match-string "$") + (texmathp)) + (string= match-string "\\("))) + (and (memq '\\\[ LaTeX-fill-break-at-separators) + (or (string= match-string "\\[") + (and (string= match-string "$$") + (texmathp))))) + (> (- (save-excursion + (TeX-search-forward-unescaped + (cond ((string= match-string "\\(") + (concat TeX-esc ")")) + ((string= match-string "$") "$") + ((string= match-string "$$") "$$") + (t (concat TeX-esc "]"))) + (point-max) t) + (skip-chars-forward "^ \n") + (point)) + (line-beginning-position)) + fill-column))) + (save-excursion + (skip-chars-backward "^ \n") + (when (> (point) start-point) + (setq final-breakpoint (point))))) + ;; $ or \) or \] or $$ (closing math) + ((save-excursion + (and (or (and (memq '\\\) LaTeX-fill-break-at-separators) + (or (and (string= match-string "$") + (not (texmathp))) + (string= match-string "\\)"))) + (and (memq '\\\] LaTeX-fill-break-at-separators) + (or (string= match-string "\\]") + (and (string= match-string "$$") + (not (texmathp)))))) + (if (member match-string '("$" "$$")) + (save-excursion + (skip-chars-backward "$") + (TeX-search-backward-unescaped + match-string (line-beginning-position) t)) + (texmathp-match-switch (line-beginning-position))))) + (save-excursion + (skip-chars-forward "^ \n") + (when (> (point) start-point) + (setq final-breakpoint (point))))))))) + (goto-char final-breakpoint)))) + +;; The content of `LaTeX-fill-newline' was copied from the function +;; `fill-newline' in `fill.el' (CVS Emacs, January 2004) and adapted +;; to the needs of AUCTeX. +(defun LaTeX-fill-newline () + "Replace whitespace here with one newline and indent the line." + (skip-chars-backward " \t") + (newline 1) + ;; Give newline the properties of the space(s) it replaces + (set-text-properties (1- (point)) (point) + (text-properties-at (point))) + (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?") + (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|) + (match-end 2)) + ;; When refilling later on, this newline would normally not + ;; be replaced by a space, so we need to mark it specially to + ;; re-install the space when we unfill. + (put-text-property (1- (point)) (point) 'fill-space (match-string 1))) + ;; If we don't want breaks in invisible text, don't insert + ;; an invisible newline. + (if fill-nobreak-invisible + (remove-text-properties (1- (point)) (point) + '(invisible t))) + ;; Insert the fill prefix. + (and fill-prefix (not (equal fill-prefix "")) + ;; Markers that were after the whitespace are now at point: insert + ;; before them so they don't get stuck before the prefix. + (insert-before-markers-and-inherit fill-prefix)) + (indent-according-to-mode) + (run-hooks 'LaTeX-fill-newline-hook)) + +(defun LaTeX-fill-paragraph (&optional justify) + "Like `fill-paragraph', but handle LaTeX comments. +If any of the current line is a comment, fill the comment or the +paragraph of it that point is in. Code comments, that is, comments +with uncommented code preceding them in the same line, will not +be filled unless the cursor is placed on the line with the +code comment. + +If LaTeX syntax is taken into consideration during filling +depends on the value of `LaTeX-syntactic-comments'." + (interactive "P") + (if (save-excursion + (beginning-of-line) + (looking-at (concat TeX-comment-start-regexp "*[ \t]*$"))) + ;; Don't do anything if we look at an empty line and let + ;; `fill-paragraph' think we successfully filled the paragraph. + t + (let (;; Non-nil if the current line contains a comment. + has-comment + ;; Non-nil if the current line contains code and a comment. + has-code-and-comment + code-comment-start + ;; If has-comment, the appropriate fill-prefix for the comment. + comment-fill-prefix) + + ;; Figure out what kind of comment we are looking at. + (cond + ;; A line only with potential whitespace followed by a + ;; comment on it? + ((save-excursion + (beginning-of-line) + (looking-at (concat "^[ \t]*" TeX-comment-start-regexp + "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*"))) + (setq has-comment t + comment-fill-prefix (TeX-match-buffer 0))) + ;; A line with some code, followed by a comment? + ((and (setq code-comment-start (save-excursion + (beginning-of-line) + (TeX-search-forward-comment-start + (line-end-position)))) + (> (point) code-comment-start) + (not (TeX-in-commented-line)) + (save-excursion + (goto-char code-comment-start) + ;; See if there is at least one non-whitespace character + ;; before the comment starts. + (re-search-backward "[^ \t\n]" (line-beginning-position) t))) + (setq has-comment t + has-code-and-comment t))) + + (cond + ;; Code comments. + (has-code-and-comment + (save-excursion + (when (>= (- code-comment-start (line-beginning-position)) + fill-column) + ;; If start of code comment is beyond fill column, fill it as a + ;; regular paragraph before it is filled as a code comment. + (let ((end-marker (save-excursion (end-of-line) (point-marker)))) + (LaTeX-fill-region-as-paragraph (line-beginning-position) + (line-beginning-position 2) + justify) + (goto-char end-marker) + (beginning-of-line) + (set-marker end-marker nil))) + (LaTeX-fill-code-comment justify))) + ;; Syntax-aware filling: + ;; * `LaTeX-syntactic-comments' enabled: Everything. + ;; * `LaTeX-syntactic-comments' disabled: Uncommented code and + ;; line comments in `doctex-mode'. + ((or (or LaTeX-syntactic-comments + (and (not LaTeX-syntactic-comments) + (not has-comment))) + (and (eq major-mode 'doctex-mode) + (TeX-in-line-comment))) + (let ((fill-prefix comment-fill-prefix)) + (save-excursion + (let* ((end (progn (LaTeX-forward-paragraph) + (or (bolp) (newline 1)) + (and (eobp) (not (bolp)) (open-line 1)) + (point))) + (start + (progn + (LaTeX-backward-paragraph) + (while (and (looking-at + (concat "$\\|[ \t]+$\\|" + "[ \t]*" TeX-comment-start-regexp + "+[ \t]*$")) + (< (point) end)) + (forward-line)) + (point)))) + (LaTeX-fill-region-as-paragraph start end justify))))) + ;; Non-syntax-aware filling. + (t + (save-excursion + (save-restriction + (beginning-of-line) + (narrow-to-region + ;; Find the first line we should include in the region to fill. + (save-excursion + (while (and (zerop (forward-line -1)) + (looking-at (concat "^[ \t]*" + TeX-comment-start-regexp)))) + ;; We may have gone too far. Go forward again. + (or (looking-at (concat ".*" TeX-comment-start-regexp)) + (forward-line 1)) + (point)) + ;; Find the beginning of the first line past the region to fill. + (save-excursion + (while (progn (forward-line 1) + (looking-at (concat "^[ \t]*" + TeX-comment-start-regexp)))) + (point))) + ;; The definitions of `paragraph-start' and + ;; `paragraph-separate' will still make + ;; `forward-paragraph' and `backward-paragraph' stop at + ;; the respective (La)TeX commands. If these should be + ;; disregarded, the definitions would have to be changed + ;; accordingly. (Lines with only `%' characters on them + ;; can be paragraph boundaries.) + (let* ((paragraph-start + (concat paragraph-start "\\|" + "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$")) + (paragraph-separate + (concat paragraph-separate "\\|" + "\\(" TeX-comment-start-regexp "\\|[ \t]\\)*$")) + (fill-prefix comment-fill-prefix) + (end (progn (forward-paragraph) + (or (bolp) (newline 1)) + (point))) + (beg (progn (backward-paragraph) + (point)))) + (fill-region-as-paragraph + beg end + justify nil + (save-excursion + (goto-char beg) + (if (looking-at fill-prefix) + nil + (re-search-forward comment-start-skip nil t) + (point))))))))) + t))) + +(defun LaTeX-fill-code-comment (&optional justify-flag) + "Fill a line including code followed by a comment." + (let ((beg (line-beginning-position)) + fill-prefix code-comment-start) + (indent-according-to-mode) + (when (when (setq code-comment-start (save-excursion + (goto-char beg) + (TeX-search-forward-comment-start + (line-end-position)))) + (goto-char code-comment-start) + (while (not (looking-at TeX-comment-start-regexp)) (forward-char)) + ;; See if there is at least one non-whitespace character + ;; before the comment starts. + (save-excursion + (re-search-backward "[^ \t\n]" (line-beginning-position) t))) + (setq fill-prefix + (concat + (if indent-tabs-mode + (concat (make-string (/ (current-column) tab-width) ?\t) + (make-string (% (current-column) tab-width) ?\ )) + (make-string (current-column) ?\ )) + (progn + (looking-at (concat TeX-comment-start-regexp "+[ \t]*")) + (TeX-match-buffer 0)))) + (fill-region-as-paragraph beg (line-beginning-position 2) + justify-flag nil + (save-excursion + (goto-char beg) + (if (looking-at fill-prefix) + nil + (re-search-forward comment-start-skip nil t) + (point))))))) + +(defun LaTeX-fill-region (from to &optional justify what) + "Fill and indent the text in region from FROM to TO as LaTeX text. +Prefix arg (non-nil third arg JUSTIFY, if called from program) +means justify as well. Fourth arg WHAT is a word to be displayed when +formatting." + (interactive "*r\nP") + (save-excursion + (let ((to (set-marker (make-marker) to)) + (next-par (make-marker))) + (goto-char from) + (beginning-of-line) + (setq from (point)) + (catch 'end-of-buffer + (while (and (< (point) to)) + (message "Formatting%s...%d%%" + (or what "") + (/ (* 100 (- (point) from)) (- to from))) + (save-excursion (LaTeX-fill-paragraph justify)) + (if (marker-position next-par) + (goto-char (marker-position next-par)) + (LaTeX-forward-paragraph)) + (when (eobp) (throw 'end-of-buffer t)) + (LaTeX-forward-paragraph) + (set-marker next-par (point)) + (LaTeX-backward-paragraph) + (while (and (not (eobp)) + (looking-at + (concat "^\\($\\|[ \t]+$\\|[ \t]*" + TeX-comment-start-regexp "+[ \t]*$\\)"))) + (forward-line 1)))) + (set-marker next-par nil) + (set-marker to nil))) + (message "Formatting%s...done" (or what ""))) + +(defun LaTeX-find-matching-end () + "Move point to the \\end of the current environment. + +If function is called inside a comment and +`LaTeX-syntactic-comments' is enabled, try to find the +environment in commented regions with the same comment prefix." + (interactive) + (let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b")) + (level 1) + (in-comment (TeX-in-commented-line)) + (comment-prefix (and in-comment (TeX-comment-prefix))) + (case-fold-search nil)) + (let ((pt (point))) + (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop))) + (unless (bolp) + (backward-char 1) + (if (and (looking-at regexp) + (char-equal (char-after (1+ (match-beginning 0))) ?e)) + (setq level 0) + (goto-char pt)))) + (while (and (> level 0) (re-search-forward regexp nil t)) + (when (or (and LaTeX-syntactic-comments + (eq in-comment (TeX-in-commented-line)) + ;; If we are in a commented line, check if the + ;; prefix matches the one we started out with. + (or (not in-comment) + (string= comment-prefix (TeX-comment-prefix)))) + (and (not LaTeX-syntactic-comments) + (not (TeX-in-commented-line)))) + (if (= (char-after (1+ (match-beginning 0))) ?b) ;;begin + (setq level (1+ level)) + (setq level (1- level))))) + (if (= level 0) + (re-search-forward + (concat TeX-grop (LaTeX-environment-name-regexp) TeX-grcl)) + (error "Can't locate end of current environment")))) + +(defun LaTeX-find-matching-begin () + "Move point to the \\begin of the current environment. + +If function is called inside a comment and +`LaTeX-syntactic-comments' is enabled, try to find the +environment in commented regions with the same comment prefix." + (interactive) + (let* ((regexp (concat (regexp-quote TeX-esc) "\\(begin\\|end\\)\\b")) + (level 1) + (in-comment (TeX-in-commented-line)) + (comment-prefix (and in-comment (TeX-comment-prefix))) + (case-fold-search nil)) + (skip-chars-backward (concat "a-zA-Z \t" (regexp-quote TeX-grop))) + (unless (bolp) + (backward-char 1) + (and (looking-at regexp) + (char-equal (char-after (1+ (match-beginning 0))) ?b) + (setq level 0))) + (while (and (> level 0) (re-search-backward regexp nil t)) + (when (or (and LaTeX-syntactic-comments + (eq in-comment (TeX-in-commented-line)) + ;; If we are in a commented line, check if the + ;; prefix matches the one we started out with. + (or (not in-comment) + (string= comment-prefix (TeX-comment-prefix)))) + (and (not LaTeX-syntactic-comments) + (not (TeX-in-commented-line)))) + (if (= (char-after (1+ (match-beginning 0))) ?e) ;;end + (setq level (1+ level)) + (setq level (1- level))))) + (or (= level 0) + (error "Can't locate beginning of current environment")))) + +(defun LaTeX-mark-environment (&optional count) + "Set mark to end of current environment and point to the matching begin. +If prefix argument COUNT is given, mark the respective number of +enclosing environments. The command will not work properly if +there are unbalanced begin-end pairs in comments and verbatim +environments." + (interactive "p") + (setq count (if count (abs count) 1)) + (let ((cur (point)) beg end) + ;; Only change point and mark after beginning and end were found. + ;; Point should not end up in the middle of nowhere if the search fails. + (save-excursion + (dotimes (_ count) (LaTeX-find-matching-end)) + (setq end (line-beginning-position 2)) + (goto-char cur) + (dotimes (_ count) (LaTeX-find-matching-begin)) + (setq beg (point))) + (push-mark end) + (goto-char beg) + (TeX-activate-region))) + +(defun LaTeX-fill-environment (justify) + "Fill and indent current environment as LaTeX text." + (interactive "*P") + (save-excursion + (LaTeX-mark-environment) + (re-search-forward "{\\([^}]+\\)}") + (LaTeX-fill-region (region-beginning) (region-end) justify + (concat " environment " (TeX-match-buffer 1))))) + +(defun LaTeX-fill-section (justify) + "Fill and indent current logical section as LaTeX text." + (interactive "*P") + (save-excursion + (LaTeX-mark-section) + (re-search-forward "{\\([^}]+\\)}") + (LaTeX-fill-region (region-beginning) (region-end) justify + (concat " section " (TeX-match-buffer 1))))) + +(defun LaTeX-mark-section (&optional no-subsections) + "Set mark at end of current logical section, and point at top. +If optional argument NO-SUBSECTIONS is non-nil, mark only the +region from the current section start to the next sectioning +command. Thereby subsections are not being marked. + +If the function `outline-mark-subtree' is not available, +`LaTeX-mark-section' always behaves like this regardless of the +value of NO-SUBSECTIONS." + (interactive "P") + (if (or no-subsections + (not (fboundp 'outline-mark-subtree))) + (progn + (re-search-forward (concat "\\(" (LaTeX-outline-regexp) + "\\|\\'\\)")) + (beginning-of-line) + (push-mark (point) nil t) + (re-search-backward (concat "\\(" (LaTeX-outline-regexp) + "\\|\\`\\)"))) + (outline-mark-subtree) + (when (and transient-mark-mode + (not mark-active)) + (setq mark-active t) + (run-hooks 'activate-mark-hook))) + (TeX-activate-region)) + +(defun LaTeX-fill-buffer (justify) + "Fill and indent current buffer as LaTeX text." + (interactive "*P") + (save-excursion + (LaTeX-fill-region + (point-min) + (point-max) + justify + (concat " buffer " (buffer-name))))) + + +;;; Navigation + +(defvar LaTeX-paragraph-commands-internal + '("[" "]" ; display math + "appendix" "begin" "caption" "chapter" "end" "include" "includeonly" + "label" "maketitle" "newblock" "noindent" "par" "paragraph" "part" + "section" "subsection" "subsubsection" "tableofcontents" + "newpage" "clearpage") + "Internal list of LaTeX macros that should have their own line.") + +(defvar LaTeX-paragraph-commands) + +(defun LaTeX-paragraph-commands-regexp-make () + "Return a regular expression matching defined paragraph commands. +Regexp part containing TeX control words is postfixed with `\\b' +to avoid ambiguities (for example, \\par vs. \\parencite)." + (let (cmds symbs) + (dolist (mac (append LaTeX-paragraph-commands + LaTeX-paragraph-commands-internal)) + (if (string-match "[^a-zA-Z]" mac) + (push mac symbs) + (push mac cmds))) + (concat (regexp-quote TeX-esc) "\\(?:" + (regexp-opt cmds "\\(?:") + "\\b" + "\\|" + (regexp-opt symbs) + "\\)"))) + +(defvar LaTeX-paragraph-commands-regexp) + +(defcustom LaTeX-paragraph-commands nil + "List of LaTeX macros that should have their own line. +The list should contain macro names without the leading backslash." + :group 'LaTeX-macro + :type '(repeat (string)) + :set (lambda (symbol value) + (set-default symbol value) + (setq LaTeX-paragraph-commands-regexp + (LaTeX-paragraph-commands-regexp-make)))) + +(defvar LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make) + "Regular expression matching LaTeX macros that should have their own line.") + +(defun LaTeX-set-paragraph-start () + "Set `paragraph-start'." + (setq paragraph-start + (concat + "[ \t]*%*[ \t]*\\(" + LaTeX-paragraph-commands-regexp "\\|" + (regexp-quote TeX-esc) "\\(" LaTeX-item-regexp "\\)\\|" + "\\$\\$\\|" ; Plain TeX display math (Some people actually use this + ; with LaTeX. Yuck.) + "$\\)"))) + +(defun LaTeX-paragraph-commands-add-locally (commands) + "Make COMMANDS be recognized as paragraph commands. +COMMANDS can be a single string or a list of strings which will +be added to `LaTeX-paragraph-commands-internal'. Additionally +`LaTeX-paragraph-commands-regexp' will be updated and both +variables will be made buffer-local. This is mainly a +convenience function which can be used in style files." + (make-local-variable 'LaTeX-paragraph-commands-internal) + (make-local-variable 'LaTeX-paragraph-commands-regexp) + (unless (listp commands) (setq commands (list commands))) + (dolist (elt commands) + (add-to-list 'LaTeX-paragraph-commands-internal elt)) + (setq LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make)) + (LaTeX-set-paragraph-start)) + +(defun LaTeX-forward-paragraph (&optional count) + "Move forward to end of paragraph. +If COUNT is non-nil, do it COUNT times." + (or count (setq count 1)) + (dotimes (_ count) + (let* ((macro-start (TeX-find-macro-start)) + (paragraph-command-start + (cond + ;; Point is inside of a paragraph command. + ((and macro-start + (save-excursion + (goto-char macro-start) + (looking-at LaTeX-paragraph-commands-regexp))) + (match-beginning 0)) + ;; Point is before a paragraph command in the same line. + ((looking-at + (concat "[ \t]*\\(?:" TeX-comment-start-regexp + "\\(?:" TeX-comment-start-regexp "\\|[ \t]\\)*\\)?" + "\\(" LaTeX-paragraph-commands-regexp "\\)")) + (match-beginning 1)))) + macro-end) + ;; If a paragraph command is encountered there are two cases to be + ;; distinguished: + ;; 1) If the end of the paragraph command coincides (apart from + ;; potential whitespace) with the end of the line, is only + ;; followed by a comment or is directly followed by a macro, + ;; it is assumed that it should be handled separately. + ;; 2) If the end of the paragraph command is followed by other + ;; code, it is assumed that it should be included with the rest + ;; of the paragraph. + (if (and paragraph-command-start + (save-excursion + (goto-char paragraph-command-start) + (setq macro-end (goto-char (TeX-find-macro-end))) + (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+\\|" + "[ \t]*\\($\\|" + TeX-comment-start-regexp "\\)")))) + (progn + (goto-char macro-end) + ;; If the paragraph command is followed directly by + ;; another macro, regard the latter as part of the + ;; paragraph command's paragraph. + (when (looking-at (concat (regexp-quote TeX-esc) "[@A-Za-z]+")) + (goto-char (TeX-find-macro-end))) + (forward-line)) + (let (limit) + (goto-char (min (save-excursion + (forward-paragraph) + (setq limit (point))) + (save-excursion + (TeX-forward-comment-skip 1 limit) + (point))))))))) + +(defun LaTeX-backward-paragraph (&optional count) + "Move backward to beginning of paragraph. +If COUNT is non-nil, do it COUNT times." + (or count (setq count 1)) + (dotimes (_ count) + (let* ((macro-start (TeX-find-macro-start))) + (if (and macro-start + ;; Point really has to be inside of the macro, not before it. + (not (= macro-start (point))) + (save-excursion + (goto-char macro-start) + (looking-at LaTeX-paragraph-commands-regexp))) + ;; Point is inside of a paragraph command. + (progn + (goto-char macro-start) + (beginning-of-line)) + (let (limit + (start (line-beginning-position))) + (goto-char + (max (save-excursion + (backward-paragraph) + (setq limit (point))) + ;; Search for possible transitions from commented to + ;; uncommented regions and vice versa. + (save-excursion + (TeX-backward-comment-skip 1 limit) + (point)) + ;; Search for paragraph commands. + (save-excursion + (let ((end-point 0) macro-bol) + (when (setq macro-bol + (re-search-backward + (format "^[ \t]*%s*[ \t]*\\(%s\\)" + TeX-comment-start-regexp + LaTeX-paragraph-commands-regexp) + limit t)) + (if (and (string= (match-string 1) "\\begin") + (progn + (goto-char (match-end 1)) + (skip-chars-forward "{ \t") + (member (buffer-substring-no-properties + (point) (progn (skip-chars-forward + "A-Za-z*") (point))) + LaTeX-verbatim-environments))) + ;; If inside a verbatim environment, just + ;; use the next line. In such environments + ;; `TeX-find-macro-end' could otherwise + ;; think brackets or braces belong to the + ;; \begin macro. + (setq end-point (line-beginning-position 2)) + ;; Jump to the macro end otherwise. + (goto-char (match-beginning 1)) + (goto-char (TeX-find-macro-end)) + ;; For an explanation of this distinction see + ;; `LaTeX-forward-paragraph'. + (if (looking-at (concat (regexp-quote TeX-esc) + "[@A-Za-z]+\\|[ \t]*\\($\\|" + TeX-comment-start-regexp "\\)")) + (progn + (when (looking-at (regexp-quote TeX-esc)) + (goto-char (TeX-find-macro-end))) + (forward-line 1) + (when (< (point) start) + (setq end-point (point)))) + (setq end-point macro-bol)))) + end-point))))))))) + +(defun LaTeX-search-forward-comment-start (&optional limit) + "Search forward for a comment start from current position till LIMIT. +If LIMIT is omitted, search till the end of the buffer. + +This function makes sure that any comment starters found inside +of verbatim constructs are not considered." + (setq limit (or limit (point-max))) + (save-excursion + (let (start) + (catch 'found + (while (progn + (when (and (TeX-re-search-forward-unescaped + TeX-comment-start-regexp limit 'move) + (not (LaTeX-verbatim-p))) + (setq start (match-beginning 0)) + (throw 'found t)) + (< (point) limit)))) + start))) + + +;;; Math Minor Mode + +(defvar LaTeX-math-mode-map) + +(defgroup LaTeX-math nil + "Mathematics in AUCTeX." + :group 'LaTeX-macro) + +(defvar LaTeX-math-keymap (make-sparse-keymap) + "Keymap used for `LaTeX-math-mode' commands.") + +(defcustom LaTeX-math-abbrev-prefix "`" + "Prefix key for use in `LaTeX-math-mode'. +This has to be a string representing a key sequence in a format +understood by the `kbd' macro. This corresponds to the syntax +usually used in the Emacs and Elisp manuals. + +Setting this variable directly does not take effect; +use \\[customize]." + :group 'LaTeX-math + :initialize #'custom-initialize-default + :set (lambda (symbol value) + (define-key LaTeX-math-mode-map (LaTeX-math-abbrev-prefix) t) + (set-default symbol value) + (define-key LaTeX-math-mode-map + (LaTeX-math-abbrev-prefix) LaTeX-math-keymap)) + :type '(string :tag "Key sequence")) + +(defun LaTeX-math-abbrev-prefix () + "Make a key definition from the variable `LaTeX-math-abbrev-prefix'." + (if (stringp LaTeX-math-abbrev-prefix) + (read-kbd-macro LaTeX-math-abbrev-prefix) + LaTeX-math-abbrev-prefix)) + +(defvar LaTeX-math-menu + '("Math" + ("Greek Uppercase") ("Greek Lowercase") ("Binary Op") ("Relational") + ("Arrows") ("Punctuation") ("Misc Symbol") ("Var Symbol") ("Log-like") + ("Delimiters") ("Constructs") ("Accents") ("AMS")) + "Menu containing LaTeX math commands. +The menu entries will be generated dynamically, but you can specify +the sequence by initializing this variable.") + +(defconst LaTeX-math-default + '((?a "alpha" "Greek Lowercase" 945) ;; #X03B1 + (?b "beta" "Greek Lowercase" 946) ;; #X03B2 + (?g "gamma" "Greek Lowercase" 947) ;; #X03B3 + (?d "delta" "Greek Lowercase" 948) ;; #X03B4 + (?e "epsilon" "Greek Lowercase" 1013) ;; #X03F5 + (?z "zeta" "Greek Lowercase" 950) ;; #X03B6 + (?h "eta" "Greek Lowercase" 951) ;; #X03B7 + (?j "theta" "Greek Lowercase" 952) ;; #X03B8 + (nil "iota" "Greek Lowercase" 953) ;; #X03B9 + (?k "kappa" "Greek Lowercase" 954) ;; #X03BA + (?l "lambda" "Greek Lowercase" 955) ;; #X03BB + (?m "mu" "Greek Lowercase" 956) ;; #X03BC + (?n "nu" "Greek Lowercase" 957) ;; #X03BD + (?x "xi" "Greek Lowercase" 958) ;; #X03BE + (?p "pi" "Greek Lowercase" 960) ;; #X03C0 + (?r "rho" "Greek Lowercase" 961) ;; #X03C1 + (?s "sigma" "Greek Lowercase" 963) ;; #X03C3 + (?t "tau" "Greek Lowercase" 964) ;; #X03C4 + (?u "upsilon" "Greek Lowercase" 965) ;; #X03C5 + (?f "phi" "Greek Lowercase" 981) ;; #X03D5 + (?q "chi" "Greek Lowercase" 967) ;; #X03C7 + (?y "psi" "Greek Lowercase" 968) ;; #X03C8 + (?w "omega" "Greek Lowercase" 969) ;; #X03C9 + ("v e" "varepsilon" "Greek Lowercase" 949) ;; #X03B5 + ("v j" "vartheta" "Greek Lowercase" 977) ;; #X03D1 + ("v p" "varpi" "Greek Lowercase" 982) ;; #X03D6 + ("v r" "varrho" "Greek Lowercase" 1009) ;; #X03F1 + ("v s" "varsigma" "Greek Lowercase" 962) ;; #X03C2 + ("v f" "varphi" "Greek Lowercase" 966) ;; #X03C6 + (?G "Gamma" "Greek Uppercase" 915) ;; #X0393 + (?D "Delta" "Greek Uppercase" 916) ;; #X0394 + (?J "Theta" "Greek Uppercase" 920) ;; #X0398 + (?L "Lambda" "Greek Uppercase" 923) ;; #X039B + (?X "Xi" "Greek Uppercase" 926) ;; #X039E + (?P "Pi" "Greek Uppercase" 928) ;; #X03A0 + (?S "Sigma" "Greek Uppercase" 931) ;; #X03A3 + (?U "Upsilon" "Greek Uppercase" 978) ;; #X03D2 + (?F "Phi" "Greek Uppercase" 934) ;; #X03A6 + (?Y "Psi" "Greek Uppercase" 936) ;; #X03A8 + (?W "Omega" "Greek Uppercase" 937) ;; #X03A9 + (?c LaTeX-math-cal "Cal-whatever") + (nil "pm" "Binary Op" 177) ;; #X00B1 + (nil "mp" "Binary Op" 8723) ;; #X2213 + (?* "times" "Binary Op" 215) ;; #X00D7 + (nil "div" "Binary Op" 247) ;; #X00F7 + (nil "ast" "Binary Op" 8727) ;; #X2217 + (nil "star" "Binary Op" 8902) ;; #X22C6 + (nil "circ" "Binary Op" 8728) ;; #X2218 + (nil "bullet" "Binary Op" 8729) ;; #X2219 + (?. "cdot" "Binary Op" 8901) ;; #X22C5 + (?- "cap" "Binary Op" 8745) ;; #X2229 + (?+ "cup" "Binary Op" 8746) ;; #X222A + (nil "uplus" "Binary Op" 8846) ;; #X228E + (nil "sqcap" "Binary Op" 8851) ;; #X2293 + (?| "vee" "Binary Op" 8744) ;; #X2228 + (?& "wedge" "Binary Op" 8743) ;; #X2227 + (?\\ "setminus" "Binary Op" 8726) ;; #X2216 + (nil "wr" "Binary Op" 8768) ;; #X2240 + (nil "diamond" "Binary Op" 8900) ;; #X22C4 + (nil "bigtriangleup" "Binary Op" 9651) ;; #X25B3 + (nil "bigtriangledown" "Binary Op" 9661) ;; #X25BD + (nil "triangleleft" "Binary Op" 9665) ;; #X25C1 + (nil "triangleright" "Binary Op" 9655) ;; #X25B7 + (nil "lhd" "Binary Op" 8882) ;; #X22B2 + (nil "rhd" "Binary Op" 8883) ;; #X22B3 + (nil "unlhd" "Binary Op" 8884) ;; #X22B4 + (nil "unrhd" "Binary Op" 8885) ;; #X22B5 + (nil "oplus" "Binary Op" 8853) ;; #X2295 + (nil "ominus" "Binary Op" 8854) ;; #X2296 + (nil "otimes" "Binary Op" 8855) ;; #X2297 + (nil "oslash" "Binary Op" 8709) ;; #X2205 + (nil "odot" "Binary Op" 8857) ;; #X2299 + (nil "bigcirc" "Binary Op" 9675) ;; #X25CB + (nil "dagger" "Binary Op" 8224) ;; #X2020 + (nil "ddagger" "Binary Op" 8225) ;; #X2021 + (nil "amalg" "Binary Op" 10815) ;; #X2A3F + (?< "leq" "Relational" 8804) ;; #X2264 + (?> "geq" "Relational" 8805) ;; #X2265 + (nil "qed" "Relational" 8718) ;; #X220E + (nil "equiv" "Relational" 8801) ;; #X2261 + (nil "models" "Relational" 8871) ;; #X22A7 + (nil "prec" "Relational" 8826) ;; #X227A + (nil "succ" "Relational" 8827) ;; #X227B + (nil "sim" "Relational" 8764) ;; #X223C + (nil "perp" "Relational" 10178) ;; #X27C2 + (nil "preceq" "Relational" 10927) ;; #X2AAF + (nil "succeq" "Relational" 10928) ;; #X2AB0 + (nil "simeq" "Relational" 8771) ;; #X2243 + (nil "mid" "Relational" 8739) ;; #X2223 + (nil "ll" "Relational" 8810) ;; #X226A + (nil "gg" "Relational" 8811) ;; #X226B + (nil "asymp" "Relational" 8781) ;; #X224D + (nil "parallel" "Relational" 8741) ;; #X2225 + (?\{ "subset" "Relational" 8834) ;; #X2282 + (?\} "supset" "Relational" 8835) ;; #X2283 + (nil "approx" "Relational" 8776) ;; #X2248 + (nil "bowtie" "Relational" 8904) ;; #X22C8 + (?\[ "subseteq" "Relational" 8838) ;; #X2286 + (?\] "supseteq" "Relational" 8839) ;; #X2287 + (nil "cong" "Relational" 8773) ;; #X2245 + (nil "Join" "Relational" 10781) ;; #X2A1D + (nil "sqsubset" "Relational" 8847) ;; #X228F + (nil "sqsupset" "Relational" 8848) ;; #X2290 + (nil "neq" "Relational" 8800) ;; #X2260 + (nil "smile" "Relational" 8995) ;; #X2323 + (nil "sqsubseteq" "Relational" 8849) ;; #X2291 + (nil "sqsupseteq" "Relational" 8850) ;; #X2292 + (nil "doteq" "Relational" 8784) ;; #X2250 + (nil "frown" "Relational" 8994) ;; #X2322 + (?i "in" "Relational" 8712) ;; #X2208 + (nil "ni" "Relational" 8715) ;; #X220B + (nil "propto" "Relational" 8733) ;; #X221D + (nil "vdash" "Relational" 8866) ;; #X22A2 + (nil "dashv" "Relational" 8867) ;; #X22A3 + (?\C-b "leftarrow" "Arrows" 8592) ;; #X2190 + (nil "Leftarrow" "Arrows" 8656) ;; #X21D0 + (?\C-f "rightarrow" "Arrows" 8594) ;; #X2192 + (nil "Rightarrow" "Arrows" 8658) ;; #X21D2 + (nil "leftrightarrow" "Arrows" 8596) ;; #X2194 + (nil "Leftrightarrow" "Arrows" 8660) ;; #X21D4 + (nil "mapsto" "Arrows" 8614) ;; #X21A6 + (nil "hookleftarrow" "Arrows" 8617) ;; #X21A9 + (nil "leftharpoonup" "Arrows" 8636) ;; #X21BC + (nil "leftharpoondown" "Arrows" 8637) ;; #X21BD + (nil "longleftarrow" "Arrows" 10229) ;; #X27F5 + (nil "Longleftarrow" "Arrows" 10232) ;; #X27F8 + (nil "longrightarrow" "Arrows" 10230) ;; #X27F6 + (nil "Longrightarrow" "Arrows" 10233) ;; #X27F9 + (nil "longleftrightarrow" "Arrows" 10231) ;; #X27F7 + (nil "Longleftrightarrow" "Arrows" 10234) ;; #X27FA + (nil "iff" "Arrows" 10234) ;; #X27FA + (nil "longmapsto" "Arrows" 10236) ;; #X27FC + (nil "hookrightarrow" "Arrows" 8618) ;; #X21AA + (nil "rightharpoonup" "Arrows" 8640) ;; #X21C0 + (nil "rightharpoondown" "Arrows" 8641) ;; #X21C1 + (?\C-p "uparrow" "Arrows" 8593) ;; #X2191 + (nil "Uparrow" "Arrows" 8657) ;; #X21D1 + (?\C-n "downarrow" "Arrows" 8595) ;; #X2193 + (nil "Downarrow" "Arrows" 8659) ;; #X21D3 + (nil "updownarrow" "Arrows" 8597) ;; #X2195 + (nil "Updownarrow" "Arrows" 8661) ;; #X21D5 + (nil "nearrow" "Arrows" 8599) ;; #X2197 + (nil "searrow" "Arrows" 8600) ;; #X2198 + (nil "swarrow" "Arrows" 8601) ;; #X2199 + (nil "nwarrow" "Arrows" 8598) ;; #X2196 + (nil "ldots" "Punctuation" 8230) ;; #X2026 + (nil "cdots" "Punctuation" 8943) ;; #X22EF + (nil "vdots" "Punctuation" 8942) ;; #X22EE + (nil "ddots" "Punctuation" 8945) ;; #X22F1 + (?: "colon" "Punctuation" 58) ;; #X003A + (?N "nabla" "Misc Symbol" 8711) ;; #X2207 + (nil "aleph" "Misc Symbol" 8501) ;; #X2135 + (nil "prime" "Misc Symbol" 8242) ;; #X2032 + (?A "forall" "Misc Symbol" 8704) ;; #X2200 + (?I "infty" "Misc Symbol" 8734) ;; #X221E + (nil "hbar" "Misc Symbol" 8463) ;; #X210F + (?0 "emptyset" "Misc Symbol" 8709) ;; #X2205 + (?E "exists" "Misc Symbol" 8707) ;; #X2203 + (nil "surd" "Misc Symbol" 8730) ;; #X221A + (nil "Box" "Misc Symbol" 9633) ;; #X25A1 + (nil "triangle" "Misc Symbol" 9651) ;; #X25B3 + (nil "Diamond" "Misc Symbol" 9671) ;; #X25C7 + (nil "imath" "Misc Symbol" 120484) ;; #X1D6A4 + (nil "jmath" "Misc Symbol" 120485) ;; #X1D6A5 + (nil "ell" "Misc Symbol" 8467) ;; #X2113 + (nil "neg" "Misc Symbol" 172) ;; #X00AC + (?/ "not" "Misc Symbol" 824) ;; #X0338 + (nil "top" "Misc Symbol" 8868) ;; #X22A4 + (nil "flat" "Misc Symbol" 9837) ;; #X266D + (nil "natural" "Misc Symbol" 9838) ;; #X266E + (nil "sharp" "Misc Symbol" 9839) ;; #X266F + (nil "wp" "Misc Symbol" 8472) ;; #X2118 + (nil "bot" "Misc Symbol" 8869) ;; #X22A5 + (nil "clubsuit" "Misc Symbol" 9827) ;; #X2663 + (nil "diamondsuit" "Misc Symbol" 9826) ;; #X2662 + (nil "heartsuit" "Misc Symbol" 9825) ;; #X2661 + (nil "spadesuit" "Misc Symbol" 9824) ;; #X2660 + (nil "mho" "Misc Symbol" 8487) ;; #X2127 + (nil "Re" "Misc Symbol" 8476) ;; #X211C + (nil "Im" "Misc Symbol" 8465) ;; #X2111 + (nil "angle" "Misc Symbol" 8736) ;; #X2220 + (nil "partial" "Misc Symbol" 8706) ;; #X2202 + (nil "sum" "Var Symbol" 8721) ;; #X2211 + (nil "prod" "Var Symbol" 8719) ;; #X220F + (nil "coprod" "Var Symbol" 8720) ;; #X2210 + (nil "int" "Var Symbol" 8747) ;; #X222B + (nil "oint" "Var Symbol" 8750) ;; #X222E + (nil "bigcap" "Var Symbol" 8898) ;; #X22C2 + (nil "bigcup" "Var Symbol" 8899) ;; #X22C3 + (nil "bigsqcup" "Var Symbol" 10758) ;; #X2A06 + (nil "bigvee" "Var Symbol" 8897) ;; #X22C1 + (nil "bigwedge" "Var Symbol" 8896) ;; #X22C0 + (nil "bigodot" "Var Symbol" 10752) ;; #X2A00 + (nil "bigotimes" "Var Symbol" 10754) ;; #X2A02 + (nil "bigoplus" "Var Symbol" 10753) ;; #X2A01 + (nil "biguplus" "Var Symbol" 10756) ;; #X2A04 + (nil "arccos" "Log-like") + (nil "arcsin" "Log-like") + (nil "arctan" "Log-like") + (nil "arg" "Log-like") + (?\C-c "cos" "Log-like") + (nil "cosh" "Log-like") + (nil "cot" "Log-like") + (nil "coth" "Log-like") + (nil "csc" "Log-like") + (nil "deg" "Log-like") + (?\C-d "det" "Log-like") + (nil "dim" "Log-like") + (?\C-e "exp" "Log-like") + (nil "gcd" "Log-like") + (nil "hom" "Log-like") + (?\C-_ "inf" "Log-like") + (nil "ker" "Log-like") + (nil "lg" "Log-like") + (?\C-l "lim" "Log-like") + (nil "liminf" "Log-like") + (nil "limsup" "Log-like") + (nil "ln" "Log-like") + (nil "log" "Log-like") + (nil "max" "Log-like") + (nil "min" "Log-like") + (nil "Pr" "Log-like") + (nil "sec" "Log-like") + (?\C-s "sin" "Log-like") + (nil "sinh" "Log-like") + (?\C-^ "sup" "Log-like") + (?\C-t "tan" "Log-like") + (nil "tanh" "Log-like") + (nil "{" "Delimiters" ?{) + (nil "}" "Delimiters" ?}) + (nil "lfloor" "Delimiters" 8970) ;; #X230A + (nil "rfloor" "Delimiters" 8971) ;; #X230B + (nil "lceil" "Delimiters" 8968) ;; #X2308 + (nil "rceil" "Delimiters" 8969) ;; #X2309 + (?\( "langle" "Delimiters" 10216) ;; #X27E8 + (?\) "rangle" "Delimiters" 10217) ;; #X27E9 + (nil "rmoustache" "Delimiters" 9137) ;; #X23B1 + (nil "lmoustache" "Delimiters" 9136) ;; #X23B0 + (nil "rgroup" "Delimiters" 9133) ;; #X23AD + (nil "lgroup" "Delimiters" 9129) ;; #X23A9 + (nil "backslash" "Delimiters" 92) ;; #X005C + (nil "|" "Delimiters" 8214) ;; #X2016) + (nil "arrowvert" "Delimiters") + (nil "Arrowvert" "Delimiters") + (nil "bracevert" "Delimiters") + (nil "widetilde" "Constructs" 771) ;; #X0303 + (nil "widehat" "Constructs" 770) ;; #X0302 + (nil "overleftarrow" "Constructs" 8406) ;; #X20D6 + (nil "overrightarrow" "Constructs") + (nil "overline" "Constructs" 773) ;; #X0305 + (nil "underline" "Constructs" 818) ;; #X0332 + (nil "overbrace" "Constructs" 65079) ;; #XFE37 + (nil "underbrace" "Constructs" 65080) ;; #XFE38 + (nil "sqrt" "Constructs" 8730) ;; #X221A + (nil "frac" "Constructs") + (?^ "hat" "Accents" 770) ;; #X0302 + (nil "acute" "Accents" 769) ;; #X0301 + (nil "bar" "Accents" 772) ;; #X0304 + (nil "dot" "Accents" 775) ;; #X0307 + (nil "breve" "Accents" 774) ;; #X0306 + (nil "check" "Accents" 780) ;; #X030C + (nil "grave" "Accents" 768) ;; #X0300 + (nil "vec" "Accents" 8407) ;; #X20D7 + (nil "ddot" "Accents" 776) ;; #X0308 + (?~ "tilde" "Accents" 771) ;; #X0303 + (nil "mathring" "Accents" 778) ;; #X030A + (nil "beth" ("AMS" "Hebrew") 8502) ;; #X2136 + (nil "daleth" ("AMS" "Hebrew") 8504) ;; #X2138 + (nil "gimel" ("AMS" "Hebrew") 8503) ;; #X2137 + (nil "digamma" ("AMS" "Greek Lowercase") 989) ;; #X03DD + ("v k" "varkappa" ("AMS" "Greek Lowercase") 1008) ;; #X03F0 + ("v G" "varGamma" ("AMS" "Greek Uppercase") 120548) ;; #X1D6E4 + ("v D" "varDelta" ("AMS" "Greek Uppercase") 120549) ;; #X1D6E5 + ("v J" "varTheta" ("AMS" "Greek Uppercase") 120553) ;; #X1D6E9 + ("v L" "varLambda" ("AMS" "Greek Uppercase") 120556) ;; #X1D6EC + ("v X" "varXi" ("AMS" "Greek Uppercase") 120559) ;; #X1D6EF + ("v P" "varPi" ("AMS" "Greek Uppercase") 120561) ;; #X1D6F1 + ("v S" "varSigma" ("AMS" "Greek Uppercase") 120564) ;; #X1D6F4 + ("v U" "varUpsilon" ("AMS" "Greek Uppercase") 120566) ;; #X1D6F6 + ("v F" "varPhi" ("AMS" "Greek Uppercase") 120567) ;; #X1D6F7 + ("v Y" "varPsi" ("AMS" "Greek Uppercase") 120569) ;; #X1D6F9 + ("v W" "varOmega" ("AMS" "Greek Uppercase") 120570) ;; #X1D6FA + (nil "dashrightarrow" ("AMS" "Arrows")) + (nil "dashleftarrow" ("AMS" "Arrows")) + (nil "impliedby" ("AMS" "Arrows") 10232) ;; #X27F8 + (nil "implies" ("AMS" "Arrows") 10233) ;; #X27F9 + (nil "leftleftarrows" ("AMS" "Arrows") 8647) ;; #X21C7 + (nil "leftrightarrows" ("AMS" "Arrows") 8646) ;; #X21C6 + (nil "Lleftarrow" ("AMS" "Arrows") 8666) ;; #X21DA + (nil "twoheadleftarrow" ("AMS" "Arrows") 8606) ;; #X219E + (nil "leftarrowtail" ("AMS" "Arrows") 8610) ;; #X21A2 + (nil "looparrowleft" ("AMS" "Arrows") 8619) ;; #X21AB + (nil "leftrightharpoons" ("AMS" "Arrows") 8651) ;; #X21CB + (nil "curvearrowleft" ("AMS" "Arrows") 8630) ;; #X21B6 + (nil "circlearrowleft" ("AMS" "Arrows") 8634) ;; #X21BA + (nil "Lsh" ("AMS" "Arrows") 8624) ;; #X21B0 + (nil "upuparrows" ("AMS" "Arrows") 8648) ;; #X21C8 + (nil "upharpoonleft" ("AMS" "Arrows") 8639) ;; #X21BF + (nil "downharpoonleft" ("AMS" "Arrows") 8643) ;; #X21C3 + (nil "multimap" ("AMS" "Arrows") 8888) ;; #X22B8 + (nil "leftrightsquigarrow" ("AMS" "Arrows") 8621) ;; #X21AD + (nil "looparrowright" ("AMS" "Arrows") 8620) ;; #X21AC + (nil "rightleftharpoons" ("AMS" "Arrows") 8652) ;; #X21CC + (nil "curvearrowright" ("AMS" "Arrows") 8631) ;; #X21B7 + (nil "circlearrowright" ("AMS" "Arrows")) + (nil "Rsh" ("AMS" "Arrows") 8625) ;; #X21B1 + (nil "downdownarrows" ("AMS" "Arrows") 8650) ;; #X21CA + (nil "upharpoonright" ("AMS" "Arrows") 8638) ;; #X21BE + (nil "downharpoonright" ("AMS" "Arrows") 8642) ;; #X21C2 + (nil "rightsquigarrow" ("AMS" "Arrows") 8605) ;; #X219D + (nil "nleftarrow" ("AMS" "Neg Arrows") 8602) ;; #X219A + (nil "nrightarrow" ("AMS" "Neg Arrows") 8603) ;; #X219B + (nil "nLeftarrow" ("AMS" "Neg Arrows") 8653) ;; #X21CD + (nil "nRightarrow" ("AMS" "Neg Arrows") 8655) ;; #X21CF + (nil "nleftrightarrow" ("AMS" "Neg Arrows") 8622) ;; #X21AE + (nil "nLeftrightarrow" ("AMS" "Neg Arrows") 8654) ;; #X21CE + (nil "leqq" ("AMS" "Relational I") 8806) ;; #X2266 + (nil "leqslant" ("AMS" "Relational I") 10877) ;; #X2A7D + (nil "eqslantless" ("AMS" "Relational I") 10901) ;; #X2A95 + (nil "lesssim" ("AMS" "Relational I") 8818) ;; #X2272 + (nil "lessapprox" ("AMS" "Relational I") 10885) ;; #X2A85 + (nil "approxeq" ("AMS" "Relational I") 8778) ;; #X224A + (nil "lessdot" ("AMS" "Relational I") 8918) ;; #X22D6 + (nil "lll" ("AMS" "Relational I") 8920) ;; #X22D8 + (nil "lessgtr" ("AMS" "Relational I") 8822) ;; #X2276 + (nil "lesseqgtr" ("AMS" "Relational I") 8922) ;; #X22DA + (nil "lesseqqgtr" ("AMS" "Relational I") 10891) ;; #X2A8B + (nil "doteqdot" ("AMS" "Relational I") 8785) ;; #X2251 + (nil "risingdotseq" ("AMS" "Relational I") 8787) ;; #X2253 + (nil "fallingdotseq" ("AMS" "Relational I") 8786) ;; #X2252 + (nil "backsim" ("AMS" "Relational I") 8765) ;; #X223D + (nil "backsimeq" ("AMS" "Relational I") 8909) ;; #X22CD + (nil "subseteqq" ("AMS" "Relational I") 10949) ;; #X2AC5 + (nil "Subset" ("AMS" "Relational I") 8912) ;; #X22D0 + (nil "sqsubset" ("AMS" "Relational I") 8847) ;; #X228F + (nil "preccurlyeq" ("AMS" "Relational I") 8828) ;; #X227C + (nil "curlyeqprec" ("AMS" "Relational I") 8926) ;; #X22DE + (nil "precsim" ("AMS" "Relational I") 8830) ;; #X227E + (nil "precapprox" ("AMS" "Relational I") 10935) ;; #X2AB7 + (nil "vartriangleleft" ("AMS" "Relational I") 8882) ;; #X22B2 + (nil "trianglelefteq" ("AMS" "Relational I") 8884) ;; #X22B4 + (nil "vDash" ("AMS" "Relational I") 8872) ;; #X22A8 + (nil "Vvdash" ("AMS" "Relational I") 8874) ;; #X22AA + (nil "smallsmile" ("AMS" "Relational I") 8995) ;; #X2323 + (nil "smallfrown" ("AMS" "Relational I") 8994) ;; #X2322 + (nil "bumpeq" ("AMS" "Relational I") 8783) ;; #X224F + (nil "Bumpeq" ("AMS" "Relational I") 8782) ;; #X224E + (nil "geqq" ("AMS" "Relational II") 8807) ;; #X2267 + (nil "geqslant" ("AMS" "Relational II") 10878) ;; #X2A7E + (nil "eqslantgtr" ("AMS" "Relational II") 10902) ;; #X2A96 + (nil "gtrsim" ("AMS" "Relational II") 8819) ;; #X2273 + (nil "gtrapprox" ("AMS" "Relational II") 10886) ;; #X2A86 + (nil "gtrdot" ("AMS" "Relational II") 8919) ;; #X22D7 + (nil "ggg" ("AMS" "Relational II") 8921) ;; #X22D9 + (nil "gtrless" ("AMS" "Relational II") 8823) ;; #X2277 + (nil "gtreqless" ("AMS" "Relational II") 8923) ;; #X22DB + (nil "gtreqqless" ("AMS" "Relational II") 10892) ;; #X2A8C + (nil "eqcirc" ("AMS" "Relational II") 8790) ;; #X2256 + (nil "circeq" ("AMS" "Relational II") 8791) ;; #X2257 + (nil "triangleq" ("AMS" "Relational II") 8796) ;; #X225C + (nil "thicksim" ("AMS" "Relational II") 8764) ;; #X223C + (nil "thickapprox" ("AMS" "Relational II") 8776) ;; #X2248 + (nil "supseteqq" ("AMS" "Relational II") 10950) ;; #X2AC6 + (nil "Supset" ("AMS" "Relational II") 8913) ;; #X22D1 + (nil "sqsupset" ("AMS" "Relational II") 8848) ;; #X2290 + (nil "succcurlyeq" ("AMS" "Relational II") 8829) ;; #X227D + (nil "curlyeqsucc" ("AMS" "Relational II") 8927) ;; #X22DF + (nil "succsim" ("AMS" "Relational II") 8831) ;; #X227F + (nil "succapprox" ("AMS" "Relational II") 10936) ;; #X2AB8 + (nil "vartriangleright" ("AMS" "Relational II") 8883) ;; #X22B3 + (nil "trianglerighteq" ("AMS" "Relational II") 8885) ;; #X22B5 + (nil "Vdash" ("AMS" "Relational II") 8873) ;; #X22A9 + (nil "shortmid" ("AMS" "Relational II") 8739) ;; #X2223 + (nil "shortparallel" ("AMS" "Relational II") 8741) ;; #X2225 + (nil "between" ("AMS" "Relational II") 8812) ;; #X226C + (nil "pitchfork" ("AMS" "Relational II") 8916) ;; #X22D4 + (nil "varpropto" ("AMS" "Relational II") 8733) ;; #X221D + (nil "blacktriangleleft" ("AMS" "Relational II") 9664) ;; #X25C0 + (nil "therefore" ("AMS" "Relational II") 8756) ;; #X2234 + (nil "backepsilon" ("AMS" "Relational II") 1014) ;; #X03F6 + (nil "blacktriangleright" ("AMS" "Relational II") 9654) ;; #X25B6 + (nil "because" ("AMS" "Relational II") 8757) ;; #X2235 + (nil "nless" ("AMS" "Neg Rel I") 8814) ;; #X226E + (nil "nleq" ("AMS" "Neg Rel I") 8816) ;; #X2270 + (nil "nleqslant" ("AMS" "Neg Rel I")) + (nil "nleqq" ("AMS" "Neg Rel I")) + (nil "lneq" ("AMS" "Neg Rel I") 10887) ;; #X2A87 + (nil "lneqq" ("AMS" "Neg Rel I") 8808) ;; #X2268 + (nil "lvertneqq" ("AMS" "Neg Rel I")) + (nil "lnsim" ("AMS" "Neg Rel I") 8934) ;; #X22E6 + (nil "lnapprox" ("AMS" "Neg Rel I") 10889) ;; #X2A89 + (nil "nprec" ("AMS" "Neg Rel I") 8832) ;; #X2280 + (nil "npreceq" ("AMS" "Neg Rel I")) + (nil "precnsim" ("AMS" "Neg Rel I") 8936) ;; #X22E8 + (nil "precnapprox" ("AMS" "Neg Rel I") 10937) ;; #X2AB9 + (nil "nsim" ("AMS" "Neg Rel I") 8769) ;; #X2241 + (nil "nshortmid" ("AMS" "Neg Rel I") 8740) ;; #X2224 + (nil "nmid" ("AMS" "Neg Rel I") 8740) ;; #X2224 + (nil "nvdash" ("AMS" "Neg Rel I") 8876) ;; #X22AC + (nil "nvDash" ("AMS" "Neg Rel I") 8877) ;; #X22AD + (nil "ntriangleleft" ("AMS" "Neg Rel I") 8938) ;; #X22EA + (nil "ntrianglelefteq" ("AMS" "Neg Rel I") 8940) ;; #X22EC + (nil "nsubseteq" ("AMS" "Neg Rel I") 8840) ;; #X2288 + (nil "subsetneq" ("AMS" "Neg Rel I") 8842) ;; #X228A + (nil "varsubsetneq" ("AMS" "Neg Rel I")) + (nil "subsetneqq" ("AMS" "Neg Rel I") 10955) ;; #X2ACB + (nil "varsubsetneqq" ("AMS" "Neg Rel I")) + (nil "ngtr" ("AMS" "Neg Rel II") 8815) ;; #X226F + (nil "ngeq" ("AMS" "Neg Rel II") 8817) ;; #X2271 + (nil "ngeqslant" ("AMS" "Neg Rel II")) + (nil "ngeqq" ("AMS" "Neg Rel II")) + (nil "gneq" ("AMS" "Neg Rel II") 10888) ;; #X2A88 + (nil "gneqq" ("AMS" "Neg Rel II") 8809) ;; #X2269 + (nil "gvertneqq" ("AMS" "Neg Rel II")) + (nil "gnsim" ("AMS" "Neg Rel II") 8935) ;; #X22E7 + (nil "gnapprox" ("AMS" "Neg Rel II") 10890) ;; #X2A8A + (nil "nsucc" ("AMS" "Neg Rel II") 8833) ;; #X2281 + (nil "nsucceq" ("AMS" "Neg Rel II")) + (nil "succnsim" ("AMS" "Neg Rel II") 8937) ;; #X22E9 + (nil "succnapprox" ("AMS" "Neg Rel II") 10938) ;; #X2ABA + (nil "ncong" ("AMS" "Neg Rel II") 8775) ;; #X2247 + (nil "nshortparallel" ("AMS" "Neg Rel II") 8742) ;; #X2226 + (nil "nparallel" ("AMS" "Neg Rel II") 8742) ;; #X2226 + (nil "nvDash" ("AMS" "Neg Rel II") 8877) ;; #X22AD + (nil "nVDash" ("AMS" "Neg Rel II") 8879) ;; #X22AF + (nil "ntriangleright" ("AMS" "Neg Rel II") 8939) ;; #X22EB + (nil "ntrianglerighteq" ("AMS" "Neg Rel II") 8941) ;; #X22ED + (nil "nsupseteq" ("AMS" "Neg Rel II") 8841) ;; #X2289 + (nil "nsupseteqq" ("AMS" "Neg Rel II")) + (nil "supsetneq" ("AMS" "Neg Rel II") 8843) ;; #X228B + (nil "varsupsetneq" ("AMS" "Neg Rel II")) + (nil "supsetneqq" ("AMS" "Neg Rel II") 10956) ;; #X2ACC + (nil "varsupsetneqq" ("AMS" "Neg Rel II")) + (nil "dotplus" ("AMS" "Binary Op") 8724) ;; #X2214 + (nil "smallsetminus" ("AMS" "Binary Op") 8726) ;; #X2216 + (nil "Cap" ("AMS" "Binary Op") 8914) ;; #X22D2 + (nil "Cup" ("AMS" "Binary Op") 8915) ;; #X22D3 + (nil "barwedge" ("AMS" "Binary Op") 8892) ;; #X22BC + (nil "veebar" ("AMS" "Binary Op") 8891) ;; #X22BB + (nil "doublebarwedge" ("AMS" "Binary Op") 8966) ;; #X2306 + (nil "boxminus" ("AMS" "Binary Op") 8863) ;; #X229F + (nil "boxtimes" ("AMS" "Binary Op") 8864) ;; #X22A0 + (nil "boxdot" ("AMS" "Binary Op") 8865) ;; #X22A1 + (nil "boxplus" ("AMS" "Binary Op") 8862) ;; #X229E + (nil "divideontimes" ("AMS" "Binary Op") 8903) ;; #X22C7 + (nil "ltimes" ("AMS" "Binary Op") 8905) ;; #X22C9 + (nil "rtimes" ("AMS" "Binary Op") 8906) ;; #X22CA + (nil "leftthreetimes" ("AMS" "Binary Op") 8907) ;; #X22CB + (nil "rightthreetimes" ("AMS" "Binary Op") 8908) ;; #X22CC + (nil "curlywedge" ("AMS" "Binary Op") 8911) ;; #X22CF + (nil "curlyvee" ("AMS" "Binary Op") 8910) ;; #X22CE + (nil "circleddash" ("AMS" "Binary Op") 8861) ;; #X229D + (nil "circledast" ("AMS" "Binary Op") 8859) ;; #X229B + (nil "circledcirc" ("AMS" "Binary Op") 8858) ;; #X229A + (nil "centerdot" ("AMS" "Binary Op")) + (nil "intercal" ("AMS" "Binary Op") 8890) ;; #X22BA + (nil "hbar" ("AMS" "Misc") 8463) ;; #X210F + (nil "hslash" ("AMS" "Misc") 8463) ;; #X210F + (nil "vartriangle" ("AMS" "Misc") 9653) ;; #X25B5 + (nil "triangledown" ("AMS" "Misc") 9663) ;; #X25BF + (nil "square" ("AMS" "Misc") 9633) ;; #X25A1 + (nil "lozenge" ("AMS" "Misc") 9674) ;; #X25CA + (nil "circledS" ("AMS" "Misc") 9416) ;; #X24C8 + (nil "angle" ("AMS" "Misc") 8736) ;; #X2220 + (nil "measuredangle" ("AMS" "Misc") 8737) ;; #X2221 + (nil "nexists" ("AMS" "Misc") 8708) ;; #X2204 + (nil "mho" ("AMS" "Misc") 8487) ;; #X2127 + (nil "Finv" ("AMS" "Misc") 8498) ;; #X2132 + (nil "Game" ("AMS" "Misc") 8513) ;; #X2141 + (nil "Bbbk" ("AMS" "Misc") 120156) ;; #X1D55C + (nil "backprime" ("AMS" "Misc") 8245) ;; #X2035 + (nil "varnothing" ("AMS" "Misc") 8709) ;; #X2205 + (nil "blacktriangle" ("AMS" "Misc") 9652) ;; #X25B4 + (nil "blacktriangledown" ("AMS" "Misc") 9662) ;; #X25BE + (nil "blacksquare" ("AMS" "Misc") 9632) ;; #X25A0 + (nil "blacklozenge" ("AMS" "Misc") 10731) ;; #X29EB + (nil "bigstar" ("AMS" "Misc") 9733) ;; #X2605 + (nil "sphericalangle" ("AMS" "Misc") 8738) ;; #X2222 + (nil "complement" ("AMS" "Misc") 8705) ;; #X2201 + (nil "eth" ("AMS" "Misc") 240) ;; #X00F0 + (nil "diagup" ("AMS" "Misc") 9585) ;; #X2571 + (nil "diagdown" ("AMS" "Misc") 9586) ;; #X2572 + (nil "dddot" ("AMS" "Accents") 8411) ;; #X20DB + (nil "ddddot" ("AMS" "Accents") 8412) ;; #X20DC + (nil "bigl" ("AMS" "Delimiters")) + (nil "bigr" ("AMS" "Delimiters")) + (nil "Bigl" ("AMS" "Delimiters")) + (nil "Bigr" ("AMS" "Delimiters")) + (nil "biggl" ("AMS" "Delimiters")) + (nil "biggr" ("AMS" "Delimiters")) + (nil "Biggl" ("AMS" "Delimiters")) + (nil "Biggr" ("AMS" "Delimiters")) + (nil "lvert" ("AMS" "Delimiters")) + (nil "rvert" ("AMS" "Delimiters")) + (nil "lVert" ("AMS" "Delimiters")) + (nil "rVert" ("AMS" "Delimiters")) + (nil "ulcorner" ("AMS" "Delimiters") 8988) ;; #X231C + (nil "urcorner" ("AMS" "Delimiters") 8989) ;; #X231D + (nil "llcorner" ("AMS" "Delimiters") 8990) ;; #X231E + (nil "lrcorner" ("AMS" "Delimiters") 8991) ;; #X231F + (nil "nobreakdash" ("AMS" "Special")) + (nil "leftroot" ("AMS" "Special")) + (nil "uproot" ("AMS" "Special")) + (nil "accentedsymbol" ("AMS" "Special")) + (nil "xleftarrow" ("AMS" "Special")) + (nil "xrightarrow" ("AMS" "Special")) + (nil "overset" ("AMS" "Special")) + (nil "underset" ("AMS" "Special")) + (nil "dfrac" ("AMS" "Special")) + (nil "genfrac" ("AMS" "Special")) + (nil "tfrac" ("AMS" "Special")) + (nil "binom" ("AMS" "Special")) + (nil "dbinom" ("AMS" "Special")) + (nil "tbinom" ("AMS" "Special")) + (nil "smash" ("AMS" "Special")) + (nil "eucal" ("AMS" "Special")) + (nil "boldsymbol" ("AMS" "Special")) + (nil "text" ("AMS" "Special")) + (nil "intertext" ("AMS" "Special")) + (nil "substack" ("AMS" "Special")) + (nil "subarray" ("AMS" "Special")) + (nil "sideset" ("AMS" "Special"))) + "Alist of LaTeX math symbols. + +Each entry should be a list with upto four elements, KEY, VALUE, +MENU and CHARACTER, see `LaTeX-math-list' for details.") + +(defcustom LaTeX-math-menu-unicode + (or (string-match "\\<GTK\\>" (emacs-version)) + (eq window-system 'w32)) + "Whether the LaTeX menu should try using Unicode for effect." + :type 'boolean + :group 'LaTeX-math) + +(defvar LaTeX-math-list) ;; Defined further below. + +(defun LaTeX-math-initialize () + (let ((math (reverse (append LaTeX-math-list LaTeX-math-default))) + (map LaTeX-math-keymap) + (unicode LaTeX-math-menu-unicode)) + (while math + (let* ((entry (car math)) + (key (nth 0 entry)) + (prefix + (and unicode + (nth 3 entry))) + value menu name) + (setq math (cdr math)) + (if (and prefix + (setq prefix (nth 3 entry))) + (setq prefix (concat (string prefix) " \\")) + (setq prefix "\\")) + (if (listp (cdr entry)) + (setq value (nth 1 entry) + menu (nth 2 entry)) + (setq value (cdr entry) + menu nil)) + (if (stringp value) + (progn + (setq name (intern (concat "LaTeX-math-" value))) + (fset name (lambda (arg) (interactive "*P") + (LaTeX-math-insert value arg)))) + (setq name value)) + (if key + (progn + (setq key (cond ((numberp key) (char-to-string key)) + ((stringp key) (read-kbd-macro key)) + (t (vector key)))) + (define-key map key name))) + (if menu + (let ((parent LaTeX-math-menu)) + (if (listp menu) + (progn + (while (cdr menu) + (let ((sub (assoc (car menu) LaTeX-math-menu))) + (if sub + (setq parent sub) + (setcdr parent (cons (list (car menu)) (cdr parent)))) + (setq menu (cdr menu)))) + (setq menu (car menu)))) + (let ((sub (assoc menu parent))) + (if sub + (if (stringp value) + (setcdr sub (cons (vector (concat prefix value) + name t) + (cdr sub))) + (error "Cannot have multiple special math menu items")) + (setcdr parent + (cons (if (stringp value) + (list menu (vector (concat prefix value) + name t)) + (vector menu name t)) + (cdr parent))))))))) + ;; Make the math prefix char available if it has not been used as a prefix. + (unless (lookup-key map (LaTeX-math-abbrev-prefix)) + (define-key map (LaTeX-math-abbrev-prefix) #'self-insert-command)))) + +(defcustom LaTeX-math-list nil + "Alist of your personal LaTeX math symbols. + +Each entry should be a list with up to four elements, KEY, VALUE, +MENU and CHARACTER. + +KEY is the key (after `LaTeX-math-abbrev-prefix') to be redefined +in math minor mode. KEY can be a character (for example ?o) for a +single stroke or a string (for example \"o a\") for a multi-stroke +binding. If KEY is nil, the symbol has no associated +keystroke (it is available in the menu, though). Note that +predefined keys in `LaTeX-math-default' cannot be overridden in +this variable. Currently, only the lowercase letter 'o' is free +for user customization, more options are available in uppercase +area. + +VALUE can be a string with the name of the macro to be inserted, +or a function to be called. The macro must be given without the +leading backslash. + +The third element MENU is the name of the submenu where the +command should be added. MENU can be either a string (for +example \"greek\"), a list (for example (\"AMS\" \"Delimiters\")) +or nil. If MENU is nil, no menu item will be created. + +The fourth element CHARACTER is a Unicode character position for +menu display. When nil, no character is shown. + +See also `LaTeX-math-menu'." + :group 'LaTeX-math + :set (lambda (symbol value) + (set-default symbol value) + (LaTeX-math-initialize)) + :type '(repeat (group (choice :tag "Key" + (const :tag "none" nil) + (choice (character) + (string :tag "Key sequence"))) + (choice :tag "Value" + (string :tag "Macro") + (function)) + (choice :tag "Menu" + (string :tag "Top level menu" ) + (repeat :tag "Submenu" + (string :tag "Menu"))) + (choice :tag "Unicode character" + (const :tag "none" nil) + (integer :tag "Number"))))) + +(defun LaTeX--completion-annotation-from-math-menu (sym) + "Return a completion annotation for a SYM. +The annotation is usually a unicode representation of the macro +SYM's compiled representation, e.g., if SYM is alpha, α is +returned." + (catch 'found + (dolist (var (list LaTeX-math-list LaTeX-math-default)) + (dolist (e var) + (let ((val (cadr e))) + (when (and (stringp val) + (string= val sym)) + (let ((char (nth 3 e))) + (when char + (throw 'found + (concat " " (char-to-string char))))))))))) + +(defvar LaTeX-math-mode-menu) +(define-minor-mode LaTeX-math-mode + "A minor mode with easy access to TeX math macros. + +Easy insertion of LaTeX math symbols. If you give a prefix argument, +the symbols will be surrounded by dollar signs. The following +commands are defined: + +\\{LaTeX-math-mode-map}" + :init-value nil + :lighter nil + :keymap (list (cons (LaTeX-math-abbrev-prefix) LaTeX-math-keymap)) + (TeX-set-mode-name)) +(defalias 'latex-math-mode #'LaTeX-math-mode) + +(easy-menu-define LaTeX-math-mode-menu + LaTeX-math-mode-map + "Menu used in math minor mode." + LaTeX-math-menu) + +(defcustom LaTeX-math-insert-function #'TeX-insert-macro + "Function called with argument STRING to insert \\STRING." + :group 'LaTeX-math + :type 'function) + +(defun LaTeX-math-insert (string dollar) + "Insert \\STRING{}. If DOLLAR is non-nil, put $'s around it. +If `TeX-electric-math' is non-nil wrap that symbols around the +string." + (let ((active (TeX-active-mark)) + m closer) + (if (and active (> (point) (mark))) + (exchange-point-and-mark)) + (when dollar + (insert (or (car TeX-electric-math) "$")) + (save-excursion + (if active (goto-char (mark))) + ;; Store closer string for later reference. + (setq closer (or (cdr TeX-electric-math) "$")) + (insert closer) + ;; Set temporal marker to decide whether to put the point + ;; after the math mode closer or not. + (setq m (point-marker)))) + (funcall LaTeX-math-insert-function string) + (when dollar + ;; If the above `LaTeX-math-insert-function' resulted in + ;; inserting, e.g., a pair of "\langle" and "\rangle" by + ;; typing "`(", keep the point between them. Otherwise + ;; move the point after the math mode closer. + (if (= m (+ (point) (length closer))) + (goto-char m)) + ;; Make temporal marker point nowhere not to slow down the + ;; subsequent editing in the buffer. + (set-marker m nil)))) + +(defun LaTeX-math-cal (char dollar) + "Insert a {\\cal CHAR}. If DOLLAR is non-nil, put $'s around it. +If `TeX-electric-math' is non-nil wrap that symbols around the +char." + (interactive "*c\nP") + (if dollar (insert (or (car TeX-electric-math) "$"))) + (if (member "latex2e" (TeX-style-list)) + (insert "\\mathcal{" (char-to-string char) "}") + (insert "{\\cal " (char-to-string char) "}")) + (if dollar (insert (or (cdr TeX-electric-math) "$")))) + + +;;; Folding + +(defcustom LaTeX-fold-macro-spec-list nil + "List of display strings and macros to fold in LaTeX mode." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1)) + (repeat :tag "Macros" (string)))) + :group 'TeX-fold) + +(defcustom LaTeX-fold-env-spec-list nil + "List of display strings and environments to fold in LaTeX mode." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1)) + (repeat :tag "Environments" (string)))) + :group 'TeX-fold) + +(defcustom LaTeX-fold-math-spec-list + (delete nil + (mapcar (lambda (elt) + (let ((tex-token (nth 1 elt)) + (submenu (nth 2 elt)) + (unicode (nth 3 elt)) + uchar noargp) + (when (integerp unicode) + (setq uchar unicode)) + (when (listp submenu) (setq submenu (nth 1 submenu))) + (setq noargp + (not (string-match + (concat "^" (regexp-opt '("Constructs" + "Accents"))) + submenu))) + (when (and (stringp tex-token) (integerp uchar) noargp) + `(,(char-to-string uchar) (,tex-token))))) + `((nil "to" "" 8594) + (nil "gets" "" 8592) + ,@LaTeX-math-default))) + "List of display strings and math macros to fold in LaTeX mode." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1)) + (repeat :tag "Math Macros" (string)))) + :group 'TeX-fold) + +;;; Narrowing + +(defun LaTeX-narrow-to-environment (&optional count) + "Make text outside current environment invisible. +With optional COUNT keep visible that number of enclosing +environments." + (interactive "p") + (setq count (if count (abs count) 1)) + (save-excursion + (widen) + (let ((opoint (point)) + beg end) + (dotimes (_ count) (LaTeX-find-matching-end)) + (setq end (point)) + (goto-char opoint) + (dotimes (_ count) (LaTeX-find-matching-begin)) + (setq beg (point)) + (narrow-to-region beg end)))) +(put 'LaTeX-narrow-to-environment 'disabled t) + +;;; Keymap + +(defvar LaTeX-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + + ;; Standard + (define-key map "\n" #'reindent-then-newline-and-indent) + + ;; From latex.el + ;; We now set `fill-paragraph-function' instead. + ;; (define-key map "\eq" 'LaTeX-fill-paragraph) ;*** Alias + ;; This key is now used by Emacs for face settings. + ;; (define-key map "\eg" 'LaTeX-fill-region) ;*** Alias + ;; We now set `beginning-of-defun-function' and + ;; `end-of-defun-function' instead. + ;; (define-key map "\e\C-e" #'LaTeX-find-matching-end) + ;; (define-key map "\e\C-a" #'LaTeX-find-matching-begin) + + (define-key map "\C-c\C-q\C-p" #'LaTeX-fill-paragraph) + (define-key map "\C-c\C-q\C-r" #'LaTeX-fill-region) + (define-key map "\C-c\C-q\C-s" #'LaTeX-fill-section) + (define-key map "\C-c\C-q\C-e" #'LaTeX-fill-environment) + + (define-key map "\C-c\C-z" #'LaTeX-command-section) + (define-key map "\C-c\M-z" #'LaTeX-command-section-change-level) + + (define-key map "\C-c." #'LaTeX-mark-environment) ;*** Dubious + (define-key map "\C-c*" #'LaTeX-mark-section) ;*** Dubious + + (define-key map "\C-c\C-e" #'LaTeX-environment) + (define-key map "\C-c\n" #'LaTeX-insert-item) + (or (key-binding "\e\r") + (define-key map "\e\r" #'LaTeX-insert-item)) ;*** Alias + (define-key map "\C-c]" #'LaTeX-close-environment) + (define-key map "\C-c\C-s" #'LaTeX-section) + + (define-key map "\C-c~" #'LaTeX-math-mode) ;*** Dubious + + (define-key map "-" #'LaTeX-babel-insert-hyphen) + (define-key map "(" #'LaTeX-insert-left-brace) + (define-key map "{" #'LaTeX-insert-left-brace) + (define-key map "[" #'LaTeX-insert-left-brace) + + (define-key map "\C-xne" #'LaTeX-narrow-to-environment) + map) + "Keymap used in `LaTeX-mode'.") + +(defvar LaTeX-environment-menu-name "Insert Environment (C-c C-e)") + +(defun LaTeX-environment-menu-entry (entry) + "Create an ENTRY for the environment menu." + (vector (car entry) (list #'LaTeX-environment-menu (car entry)) t)) + +(defvar LaTeX-environment-modify-menu-name "Change Environment (C-u C-c C-e)") + +(defun LaTeX-environment-modify-menu-entry (entry) + "Create an ENTRY for the change environment menu." + (vector (car entry) (list #'LaTeX-modify-environment (car entry)) t)) + +(defun LaTeX-section-enable-symbol (level) + "Symbol used to enable section LEVEL in the menu bar." + (intern (concat "LaTeX-section-" (int-to-string level) "-enable"))) + +(defun LaTeX-section-enable (entry) + "Enable or disable section ENTRY from `LaTeX-section-list'." + (let* ((level (nth 1 entry)) + (symbol (LaTeX-section-enable-symbol level))) + (set symbol (or (= level 0) (>= level LaTeX-largest-level))) + (make-variable-buffer-local symbol))) + +(defun LaTeX-section-menu (level) + "Insert section from menu." + (let ((LaTeX-section-hook (delq 'LaTeX-section-heading + (copy-sequence LaTeX-section-hook)))) + (LaTeX-section level))) + +(defun LaTeX-section-menu-entry (entry) + "Create an ENTRY for the section menu." + (let ((enable (LaTeX-section-enable-symbol (nth 1 entry)))) + (vector (car entry) (list #'LaTeX-section-menu (nth 1 entry)) enable))) + +(defcustom LaTeX-menu-max-items 25 + "Maximum number of items in the menu for LaTeX environments. +If number of entries in a menu is larger than this value, split menu +into submenus of nearly equal length. If nil, never split menu into +submenus." + :group 'LaTeX-environment + :type '(choice (const :tag "no submenus" nil) + (integer))) + +(defcustom LaTeX-submenu-name-format "%-12.12s ... %.12s" + "Format specification of the submenu name. +Used by `LaTeX-split-long-menu' if the number of entries in a menu is +larger than `LaTeX-menu-max-items'. +This string should contain one %s for the name of the first entry and +one %s for the name of the last entry in the submenu. +If the value is a function, it should return the submenu name. The +function is called with two arguments, the names of the first and +the last entry in the menu." + :group 'LaTeX-environment + :type '(choice (string :tag "Format string") + (function))) + +(defun LaTeX-split-long-menu (menu) + "Split MENU according to `LaTeX-menu-max-items'." + (let ((len (length menu))) + (if (or (null LaTeX-menu-max-items) + (null (featurep 'lisp-float-type)) + (<= len LaTeX-menu-max-items)) + menu + ;; Submenu is max 2 entries longer than menu, never shorter, number of + ;; entries in submenus differ by at most one (with longer submenus first) + (let* ((outer (floor (sqrt len))) + (inner (/ len outer)) + (rest (% len outer)) + (result nil)) + (setq menu (reverse menu)) + (while menu + (let ((in inner) + (sub nil) + (to (car menu))) + (while (> in 0) + (setq in (1- in) + sub (cons (car menu) sub) + menu (cdr menu))) + (setq result + (cons (cons (if (stringp LaTeX-submenu-name-format) + (format LaTeX-submenu-name-format + (aref (car sub) 0) (aref to 0)) + (funcall LaTeX-submenu-name-format + (aref (car sub) 0) (aref to 0))) + sub) + result) + rest (1+ rest)) + (if (= rest outer) (setq inner (1+ inner))))) + result)))) + +(defun LaTeX-section-menu-filter (_ignored) + "Filter function for the section submenu in the mode menu. +The argument IGNORED is not used in any way." + (TeX-update-style) + (or LaTeX-section-menu + (progn + (setq LaTeX-section-list-changed nil) + (mapc #'LaTeX-section-enable LaTeX-section-list) + (setq LaTeX-section-menu + (mapcar #'LaTeX-section-menu-entry LaTeX-section-list))))) + +(defvar LaTeX-environment-menu nil) +(make-variable-buffer-local 'LaTeX-environment-menu) +(defvar LaTeX-environment-modify-menu nil) +(make-variable-buffer-local 'LaTeX-environment-modify-menu) +(defun LaTeX-environment-menu-filter (menu) + "Filter function for the environment submenus in the mode menu. +The argument MENU is the name of the submenu in concern and +corresponds to the variables `LaTeX-environment-menu-name' and +`LaTeX-environment-modify-menu-name'." + (TeX-update-style) + (cond + ((string= menu LaTeX-environment-menu-name) + (or LaTeX-environment-menu + (setq LaTeX-environment-menu + (LaTeX-split-long-menu + (mapcar #'LaTeX-environment-menu-entry + (LaTeX-environment-list)))))) + ((string= menu LaTeX-environment-modify-menu-name) + (or LaTeX-environment-modify-menu + (setq LaTeX-environment-modify-menu + (LaTeX-split-long-menu + (mapcar #'LaTeX-environment-modify-menu-entry + (LaTeX-environment-list)))))))) + +(advice-add 'LaTeX-add-environments :after #'LaTeX--invalidate-menus) +(defun LaTeX--invalidate-menus (&rest _) + "Mark the environment menus as being in need of a refresh." + (setq LaTeX-environment-menu nil) + (setq LaTeX-environment-modify-menu nil)) + +(easy-menu-define LaTeX-mode-command-menu + LaTeX-mode-map + "Command menu used in LaTeX mode." + (TeX-mode-specific-command-menu 'latex-mode)) + +(easy-menu-define LaTeX-mode-menu + LaTeX-mode-map + "Menu used in LaTeX mode." + `("LaTeX" + ("Section (C-c C-s)" :filter LaTeX-section-menu-filter) + ["Macro..." TeX-insert-macro + :help "Insert a macro and possibly arguments"] + ["Complete Macro" TeX-complete-symbol + :help "Complete the current macro or environment name"] + ,(list LaTeX-environment-menu-name + :filter (lambda (_ignored) + (LaTeX-environment-menu-filter + LaTeX-environment-menu-name))) + ,(list LaTeX-environment-modify-menu-name + :filter (lambda (_ignored) + (LaTeX-environment-menu-filter + LaTeX-environment-modify-menu-name))) + ["Close Environment" LaTeX-close-environment + :help "Insert the \\end part of the current environment"] + ["Item" LaTeX-insert-item + :help "Insert a new \\item into current environment"] + "-" + ("Insert Font" + ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] + "-" + ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] + ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] + ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] + "-" + ["Medium" (TeX-font nil ?\C-m) :keys "C-c C-f C-m"] + ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] + "-" + ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] + ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] + ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] + ["Swash" (TeX-font nil ?\C-w) :keys "C-c C-f C-w"] + ["Upper Lower" (TeX-font nil ?\C-l) :keys "C-c C-f C-l"] + "-" + ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"] + ["Normal" (TeX-font nil ?\C-n) :keys "C-c C-f C-n"]) + ("Replace Font" + ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] + "-" + ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] + ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] + ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] + "-" + ["Medium" (TeX-font t ?\C-m) :keys "C-u C-c C-f C-m"] + ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] + "-" + ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] + ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] + ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] + ["Swash" (TeX-font t ?\C-w) :keys "C-u C-c C-f C-w"] + ["Upper Lower" (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"] + "-" + ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"] + ["Normal" (TeX-font t ?\C-n) :keys "C-u C-c C-f C-n"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ["Comment or Uncomment Region" + comment-or-uncomment-region + :help "Make the selected region outcommented or active again"] + ["Comment or Uncomment Paragraph" + TeX-comment-or-uncomment-paragraph + :help "Make the current paragraph outcommented or active again"] + ("Formatting and Marking" + ["Format Environment" LaTeX-fill-environment + :help "Fill and indent the current environment"] + ["Format Paragraph" LaTeX-fill-paragraph + :help "Fill and ident the current paragraph"] + ["Format Region" LaTeX-fill-region + :help "Fill and indent the currently selected region"] + ["Format Section" LaTeX-fill-section + :help "Fill and indent the current section"] + "-" + ["Mark Environment" LaTeX-mark-environment + :help "Mark the current environment"] + ["Mark Section" LaTeX-mark-section + :help "Mark the current section"] + "-" + ["Beginning of Environment" LaTeX-find-matching-begin + :help "Move point to the beginning of the current environment"] + ["End of Environment" LaTeX-find-matching-end + :help "Move point to the end of the current environment"]) + ,TeX-fold-menu + ["Math Mode" LaTeX-math-mode + :style toggle :selected LaTeX-math-mode + :help "Toggle math mode"] + "-" + [ "Convert 209 to 2e" LaTeX-209-to-2e + :visible (member "latex2" (TeX-style-list)) ] + . ,TeX-common-menu-entries)) + +(defcustom LaTeX-font-list + '((?\C-a "" "" "\\mathcal{" "}") + (?\C-b "\\textbf{" "}" "\\mathbf{" "}") + (?\C-c "\\textsc{" "}") + (?\C-e "\\emph{" "}") + (?\C-f "\\textsf{" "}" "\\mathsf{" "}") + (?\C-i "\\textit{" "}" "\\mathit{" "}") + (?\C-l "\\textulc{" "}") + (?\C-m "\\textmd{" "}") + (?\C-n "\\textnormal{" "}" "\\mathnormal{" "}") + (?\C-r "\\textrm{" "}" "\\mathrm{" "}") + (?\C-s "\\textsl{" "}" "\\mathbb{" "}") + (?\C-t "\\texttt{" "}" "\\mathtt{" "}") + (?\C-u "\\textup{" "}") + (?\C-w "\\textsw{" "}") + (?\C-d "" "" t)) + "Font commands used with LaTeX2e. See `TeX-font-list'." + :group 'LaTeX-macro + :type '(repeat + (group + :value (?\C-a "" "") + (character :tag "Key") + (string :tag "Prefix") + (string :tag "Suffix") + (option (group + :inline t + (string :tag "Math Prefix") + (string :tag "Math Suffix"))) + (option (sexp :format "Replace\n" :value t))))) + + +;;; Simple Commands + +(defcustom LaTeX-babel-hyphen "\"=" + "String to be used when typing `-'. +This usually is a hyphen alternative or hyphenation aid, like +\"=, \"~ or \"-, provided by babel and the related language style +files. + +Set it to an empty string or nil in order to disable this +feature. Alter `LaTeX-babel-hyphen-language-alist' in case you +want to change the behavior for a specific language only." + :group 'LaTeX-macro + :type 'string) + +(defcustom LaTeX-babel-hyphen-after-hyphen t + "Control insertion of hyphen strings. +If non-nil insert normal hyphen on first key press and swap it +with the language-specific hyphen string specified in the +variable `LaTeX-babel-hyphen' on second key press. If nil do it +the other way round." + :group 'LaTeX-macro + :type 'boolean) + +(defcustom LaTeX-babel-hyphen-language-alist nil + "Alist controlling hyphen insertion for specific languages. +It may be used to override the defaults given by `LaTeX-babel-hyphen' +and `LaTeX-babel-hyphen-after-hyphen' respectively. The first item +in each element is a string specifying the language as set by the +language-specific style file. The second item is the string to be +used instead of `LaTeX-babel-hyphen'. The third element is the +value overriding `LaTeX-babel-hyphen-after-hyphen'." + :group 'LaTeX-macro + :type '(alist :key-type (string :tag "Language") + :value-type (group (string :tag "Hyphen string") + (boolean :tag "Insert plain hyphen first" + :value t)))) + +(defvar LaTeX-babel-hyphen-language nil + "String determining language-specific behavior of hyphen insertion. +It serves as an indicator that the babel hyphenation string +should be used and as a means to find a potential customization +in `LaTeX-babel-hyphen-language-alist' related to the active +language. It is usually set by language-related style files.") +(make-variable-buffer-local 'LaTeX-babel-hyphen-language) + +(defun LaTeX-babel-insert-hyphen (force) + "Insert a hyphen string. +The string can be either a normal hyphen or the string specified +in `LaTeX-babel-hyphen'. Wether one or the other is chosen +depends on the value of `LaTeX-babel-hyphen-after-hyphen' and +the buffer context. +If prefix argument FORCE is non-nil, always insert a regular hyphen." + (interactive "*P") + (if (or force + (zerop (length LaTeX-babel-hyphen)) + (not LaTeX-babel-hyphen-language) + ;; FIXME: It would be nice to check for verbatim constructs in the + ;; non-font-locking case, but things like `LaTeX-current-environment' + ;; are rather expensive in large buffers. + (and (fboundp 'font-latex-faces-present-p) + (font-latex-faces-present-p '(font-latex-verbatim-face + font-latex-math-face + font-lock-comment-face))) + (texmathp) + (TeX-in-comment)) + (call-interactively #'self-insert-command) + (let* ((lang (assoc LaTeX-babel-hyphen-language + LaTeX-babel-hyphen-language-alist)) + (hyphen (if lang (nth 1 lang) LaTeX-babel-hyphen)) + (h-after-h (if lang (nth 2 lang) LaTeX-babel-hyphen-after-hyphen)) + (hyphen-length (length hyphen))) + (cond + ;; "= --> -- / - + ((string= (buffer-substring (max (- (point) hyphen-length) (point-min)) + (point)) + hyphen) + (if h-after-h + (progn (delete-char (- hyphen-length)) + (insert "--")) + (delete-char (- hyphen-length)) + (call-interactively #'self-insert-command))) + ;; -- --> [+]- + ((string= (buffer-substring (max (- (point) 2) (point-min)) + (point)) + "--") + (call-interactively #'self-insert-command)) + ;; - --> "= / [+]- + ((eq (char-before) ?-) + (if h-after-h + (progn (delete-char -1) + (insert hyphen)) + (call-interactively #'self-insert-command))) + (h-after-h + (call-interactively #'self-insert-command)) + (t (insert hyphen)))))) +;; Cater for Delete Selection mode +(put 'LaTeX-babel-insert-hyphen 'delete-selection t) + +(defcustom LaTeX-enable-toolbar t + "Enable LaTeX tool bar." + :group 'TeX-tool-bar + :type 'boolean) + +(defun LaTeX-maybe-install-toolbar () + "Conditionally install tool bar buttons for LaTeX mode. +Install tool bar if `LaTeX-enable-toolbar' and `tool-bar-mode' +are non-nil." + (when (and LaTeX-enable-toolbar tool-bar-mode) + ;; Defined in `tex-bar.el': + (LaTeX-install-toolbar))) + +;;; Error Messages + +(defconst LaTeX-error-description-list + '(("\\(?:Package Preview Error\\|Preview\\):.*" . + "The `auctex' option to `preview' should not be applied manually. +If you see this error message outside of a preview run, either +you did something too clever, or AUCTeX something too stupid.") + + ("Bad \\\\line or \\\\vector argument.*" . + "The first argument of a \\line or \\vector command, which specifies the +slope, is illegal\.") + + ("Bad math environment delimiter.*" . + "TeX has found either a math-mode-starting command such as \\[ or \\( +when it is already in math mode, or else a math-mode-ending command +such as \\) or \\] while in LR or paragraph mode. The problem is caused +by either unmatched math mode delimiters or unbalanced braces\.") + + ("Bad use of \\\\\\\\.*" . + "A \\\\ command appears between paragraphs, where it makes no sense. This +error message occurs when the \\\\ is used in a centering or flushing +environment or else in the scope of a centering or flushing +declaration.") + + ("\\\\begin{[^ ]*} ended by \\\\end{[^ ]*}." . + "LaTeX has found an \\end command that doesn't match the corresponding +\\begin command. You probably misspelled the environment name in the +\\end command, have an extra \\begin, or else forgot an \\end.") + + ("Can be used only in preamble." . + "LaTeX has encountered, after the \\begin{document}, one of the +following commands that should appear only in the preamble: +\\documentclass, \\nofiles, \\includeonly, \\makeindex, or +\\makeglossary. The error is also caused by an extra \\begin{document} +command.") + + ("Command name [^ ]* already used.*" . + "You are using \\newcommand, \\newenvironment, \\newlength, \\newsavebox, +or \\newtheorem to define a command or environment name that is +already defined, or \\newcounter to define a counter that already +exists. (Defining an environment named gnu automatically defines the +command \\gnu.) You'll have to choose a new name or, in the case of +\\newcommand or \\newenvironment, switch to the \\renew ... command.") + + ("Counter too large." . + "1. Some object that is numbered with letters, probably an item in a +enumerated list, has received a number greater than 26. Either you're +making a very long list or you've been resetting counter values. + +2. Footnotes are being ``numbered'' with letters or footnote symbols +and LaTeX has run out of letters or symbols. This is probably caused +by too many \\thanks commands.") + + ("Environment [^ ]* undefined." . + "LaTeX has encountered a \\begin command for a nonexistent environment. +You probably misspelled the environment name. ") + + ("Float(s) lost." . + "You put a figure or table environment or a \\marginpar command inside a +parbox---either one made with a minipage environment or \\parbox +command, or one constructed by LaTeX in making a footnote, figure, +etc. This is an outputting error, and the offending environment or +command may be quite a way back from the point where LaTeX discovered +the problem. One or more figures, tables, and/or marginal notes have +been lost, but not necessarily the one that caused the error.") + + ("Illegal character in array arg." . + "There is an illegal character in the argument of an array or tabular +environment, or in the second argument of a \\multicolumn command.") + + ("Missing \\\\begin{document}." . + "LaTeX produced printed output before encountering a \\begin{document} +command. Either you forgot the \\begin{document} command or there is +something wrong in the preamble. The problem may be a stray character +or an error in a declaration---for example, omitting the braces around +an argument or forgetting the \\ in a command name.") + + ("Missing p-arg in array arg.*" . + "There is a p that is not followed by an expression in braces in the +argument of an array or tabular environment, or in the second argument +of a \\multicolumn command.") + + ("Missing @-exp in array arg." . + "There is an @ character not followed by an @-expression in the +argument of an array or tabular environment, or in the second argument +of a \\multicolumn command.") + + ("No such counter." . + "You have specified a nonexistent counter in a \\setcounter or +\\addtocounter command. This is probably caused by a simple typing +error. However, if the error occurred while a file with the extension +aux is being read, then you probably used a \\newcounter command +outside the preamble.") + + ("Not in outer par mode." . + "You had a figure or table environment or a \\marginpar command in math +mode or inside a parbox.") + + ("\\\\pushtabs and \\\\poptabs don't match." . + "LaTeX found a \\poptabs with no matching \\pushtabs, or has come to the +\\end{tabbing} command with one or more unmatched \\pushtabs commands.") + + ("Something's wrong--perhaps a missing \\\\item." . + "The most probable cause is an omitted \\item command in a list-making +environment. It is also caused by forgetting the argument of a +thebibliography environment.") + + ("Tab overflow." . + "A \\= command has exceeded the maximum number of tab stops that LaTeX +permits.") + + ("There's no line here to end." . + "A \\newline or \\\\ command appears between paragraphs, where it makes no +sense. If you're trying to ``leave a blank line'', use a \\vspace +command.") + + ("This may be a LaTeX bug." . + "LaTeX has become thoroughly confused. This is probably due to a +previously detected error, but it is possible that you have found an +error in LaTeX itself. If this is the first error message produced by +the input file and you can't find anything wrong, save the file and +contact the person listed in your Local Guide.") + + ("Too deeply nested." . + "There are too many list-making environments nested within one another. +How many levels of nesting are permitted may depend upon what computer +you are using, but at least four levels are provided, which should be +enough.") + + ("Too many unprocessed floats." . + "While this error can result from having too many \\marginpar commands +on a page, a more likely cause is forcing LaTeX to save more figures +and tables than it has room for. When typesetting its continuous +scroll, LaTeX saves figures and tables separately and inserts them as +it cuts off pages. This error occurs when LaTeX finds too many figure +and/or table environments before it is time to cut off a page, a +problem that is solved by moving some of the environments farther +towards the end of the input file. The error can also be caused by a +``logjam''---a figure or table that cannot be printed causing others +to pile up behind it, since LaTeX will not print figures or tables out +of order. The jam can be started by a figure or table that either is +too large to fit on a page or won't fit where its optional placement +argument says it must go. This is likely to happen if the argument +does not contain a p option.") + + ("Undefined tab position." . + "A \\>, \\+, \\-, or \\< command is trying to go to a nonexistent tab +position---one not defined by a \\= command.") + + ("\\\\< in mid line." . + "A \\< command appears in the middle of a line in a tabbing environment. +This command should come only at the beginning of a line.") + + ("Double subscript." . + "There are two subscripts in a row in a mathematical +formula---something like x_{2}_{3}, which makes no sense.") + + ("Double superscript." . + "There are two superscripts in a row in a mathematical +formula---something like x^{2}^{3}, which makes no sense.") + + ("Extra alignment tab has been changed to \\\\cr." . + "There are too many separate items (column entries) in a single row of +an array or tabular environment. In other words, there were too many & +'s before the end of the row. You probably forgot the \\\\ at the end of +the preceding row.") + + ("Extra \\}, or forgotten \\$." . + "The braces or math mode delimiters don't match properly. You probably +forgot a {, \\[, \\(, or $.") + + ("Font [^ ]* not loaded: Not enough room left." . + "The document uses more fonts than TeX has room for. If different parts +of the document use different fonts, then you can get around the +problem by processing it in parts.") + + ("I can't find file `.*'." . + "TeX can't find a file that it needs. If the name of the missing file +has the extension tex, then it is looking for an input file that you +specified---either your main file or another file inserted with an +\\input or \\include command. If the missing file has the extension sty +, then you have specified a nonexistent document style or style +option.") + + ("Illegal parameter number in definition of .*" . + "This is probably caused by a \\newcommand, \\renewcommand, +\\newenvironment, or \\renewenvironment command in which a # is used +incorrectly. A # character, except as part of the command name \\#, +can be used only to indicate an argument parameter, as in #2, which +denotes the second argument. This error is also caused by nesting one +of the above four commands inside another, or by putting a parameter +like #2 in the last argument of a \\newenvironment or \\renewenvironment +command.") + + ("Illegal unit of measure ([^ ]* inserted)." . + "If you just got a + + ! Missing number, treated as zero. + +error, then this is part of the same problem. If not, it means that +LaTeX was expecting a length as an argument and found a number +instead. The most common cause of this error is writing 0 instead of +something like 0in for a length of zero, in which case typing return +should result in correct output. However, the error can also be caused +by omitting a command argument.") + + ("Misplaced alignment tab character \\&." . + "The special character &, which should be used only to separate items +in an array or tabular environment, appeared in ordinary text. You +probably meant to type \\&.") + + ("Missing control sequence inserted." . + "This is probably caused by a \\newcommand, \\renewcommand, \\newlength, +or \\newsavebox command whose first argument is not a command name.") + + ("Missing number, treated as zero." . + "This is usually caused by a LaTeX command expecting but not finding +either a number or a length as an argument. You may have omitted an +argument, or a square bracket in the text may have been mistaken for +the beginning of an optional argument. This error is also caused by +putting \\protect in front of either a length command or a command such +as \\value that produces a number.") + + ("Missing [{}] inserted." . + "TeX has become confused. The position indicated by the error locator +is probably beyond the point where the incorrect input is.") + + ("Missing \\$ inserted." . + "TeX probably found a command that can be used only in math mode when +it wasn't in math mode. Remember that unless stated otherwise, all +all the commands of Section 3.3 in LaTeX Book (Lamport) can be used +only in math mode. TeX is not in math mode when it begins processing +the argument of a box-making command, even if that command is inside a +math environment. This error also occurs if TeX encounters a blank +line when it is in math mode.") + + ("Not a letter." . + "Something appears in the argument of a \\hyphenation command that +doesn't belong there.") + + ("Paragraph ended before [^ ]* was complete." . + "A blank line occurred in a command argument that shouldn't contain +one. You probably forgot the right brace at the end of an argument.") + + ("\\\\[^ ]*font [^ ]* is undefined .*" . + "These errors occur when an uncommon font is used in math mode---for +example, if you use a \\sc command in a formula inside a footnote, +calling for a footnote-sized small caps font. This problem is solved +by using a \\load command.") + + ("Font .* not found." . + "You requested a family/series/shape/size combination that is totally +unknown. There are two cases in which this error can occur: + 1) You used the \\size macro to select a size that is not available. + 2) If you did not do that, go to your local `wizard' and + complain fiercely that the font selection tables are corrupted!") + + ("TeX capacity exceeded, sorry .*" . + "TeX has just run out of space and aborted its execution. Before you +panic, remember that the least likely cause of this error is TeX not +having the capacity to process your document. It was probably an +error in your input file that caused TeX to run out of room. The +following discussion explains how to decide whether you've really +exceeded TeX's capacity and, if so, what to do. If the problem is an +error in the input, you may have to use the divide and conquer method +described previously to locate it. LaTeX seldom runs out of space on a +short input file, so if running it on the last few pages before the +error indicator's position still produces the error, then there's +almost certainly something wrong in the input file. + +The end of the error indicator tells what kind of space TeX ran out +of. The more common ones are listed below, with an explanation of +their probable causes. + +buffer size +=========== +Can be caused by too long a piece of text as the argument +of a sectioning, \\caption, \\addcontentsline, or \\addtocontents +command. This error will probably occur when the \\end{document} is +being processed, but it could happen when a \\tableofcontents, +\\listoffigures, or \\listoftables command is executed. To solve this +problem, use a shorter optional argument. Even if you're producing a +table of contents or a list of figures or tables, such a long entry +won't help the reader. + +exception dictionary +==================== +You have used \\hyphenation commands to give TeX +more hyphenation information than it has room for. Remove some of the +less frequently used words from the \\hyphenation commands and insert +\\- commands instead. + +hash size +========= +Your input file defines too many command names and/or uses +too many cross-ref- erencing labels. + +input stack size +================ +This is probably caused by an error in a command +definition. For example, the following command makes a circular +definition, defining \\gnu in terms of itself: + + \\newcommand{\\gnu}{a \\gnu} % This is wrong! + +When TeX encounters this \\gnu command, it will keep chasing its tail +trying to figure out what \\gnu should produce, and eventually run out +of ``input stack''. + +main memory size +================ +This is one kind of space that TeX can run out of when processing a +short file. There are three ways you can run TeX out of main memory +space: (1) defining a lot of very long, complicated commands, (2) +making an index or glossary and having too many \\index or \\glossary +commands on a single page, and (3) creating so complicated a page of +output that TeX can't hold all the information needed to generate it. +The solution to the first two problems is obvious: define fewer +commands or use fewer \\index and \\glossary commands. The third problem +is nastier. It can be caused by large tabbing, tabular, array, and +picture environments. TeX's space may also be filled up with figures +and tables waiting for a place to go. To find out if you've really +exceeded TeX's capacity in this way, put a \\clearpage command in your +input file right before the place where TeX ran out of room and try +running it again. If it doesn't run out of room with the \\clearpage +command there, then you did exceed TeX's capacity. If it still runs +out of room, then there's probably an error in your file. If TeX is +really out of room, you must give it some help. Remember that TeX +processes a complete paragraph before deciding whether to cut the +page. Inserting a \\newpage command in the middle of the paragraph, +where TeX should break the page, may save the day by letting TeX write +the current page before processing the rest of the paragraph. (A +\\pagebreak command won't help.) If the problem is caused by +accumulated figures and tables, you can try to prevent them from +accumulating---either by moving them further towards the end of the +document or by trying to get them to come out sooner. If you are +still writing the document, simply add a \\clearpage command and forget +about the problem until you're ready to produce the final version. +Changes to the input file are likely to make the problem go away. + +pool size +========= +You probably used too many cross-ref-erencing \\labels and/or defined +too many new command names. More precisely, the labels and command +names that you define have too many characters, so this problem can be +solved by using shorter names. However, the error can also be caused +by omitting the right brace that ends the argument of either a counter +command such as \\setcounter, or a \\newenvironment or \\newtheorem +command. + +save size +========= +This occurs when commands, environments, and the scopes of +declarations are nested too deeply---for example, by having the +argument of a \\multiput command contain a picture environment that in +turn has a \\footnotesize declaration whose scope contains a \\multiput +command containing a ....") + + ("Text line contains an invalid character." . + "The input contains some strange character that it shouldn't. A mistake +when creating the file probably caused your text editor to insert this +character. Exactly what could have happened depends upon what text +editor you used. If examining the input file doesn't reveal the +offending character, consult the Local Guide for suggestions.") + + ("Undefined control sequence." . + "TeX encountered an unknown command name. You probably misspelled the +name. If this message occurs when a LaTeX command is being processed, +the command is probably in the wrong place---for example, the error +can be produced by an \\item command that's not inside a list-making +environment. The error can also be caused by a missing \\documentclass +command.") + + ("Use of [^ ]* doesn't match its definition." . + "It's probably one of the picture-drawing commands, and you have used +the wrong syntax for specifying an argument. If it's \\@array that +doesn't match its definition, then there is something wrong in an +@-expression in the argument of an array or tabular +environment---perhaps a fragile command that is not \\protect'ed.") + + ("You can't use `macro parameter character \\#' in [^ ]* mode." . + "The special character # has appeared in ordinary text. You probably +meant to type \\#.") + + ("Overfull \\\\hbox .*" . + "Because it couldn't find a good place for a line break, TeX put more +on this line than it should.") + + ("Overfull \\\\vbox .*" . + "Because it couldn't find a good place for a page break, TeX put more +on the page than it should. ") + + ("Underfull \\\\hbox .*" . + "Check your output for extra vertical space. If you find some, it was +probably caused by a problem with a \\\\ or \\newline command---for +example, two \\\\ commands in succession. This warning can also be +caused by using the sloppypar environment or \\sloppy declaration, or +by inserting a \\linebreak command.") + + ("Underfull \\\\vbox .*" . + "TeX could not find a good place to break the page, so it produced a +page without enough text on it. ") + + ;; New list items should be placed here + ;; + ;; ("err-regexp" . "context") + ;; + ;; the err-regexp item should match anything + + (".*" . "No help available")) ; end definition + "Help messages for errors in LaTeX mode. +Used as buffer local value of `TeX-error-description-list-local'. +See its doc string for detail.") + +;;; Mode + +(defgroup LaTeX-macro nil + "Special support for LaTeX macros in AUCTeX." + :prefix "TeX-" + :group 'LaTeX + :group 'TeX-macro) + +(defcustom TeX-arg-cite-note-p nil + "If non-nil, ask for optional note in citations." + :type 'boolean + :group 'LaTeX-macro) + +(defcustom TeX-arg-footnote-number-p nil + "If non-nil, ask for optional number in footnotes." + :type 'boolean + :group 'LaTeX-macro) + +(defcustom TeX-arg-item-label-p nil + "If non-nil, always ask for optional label in items. +Otherwise, only ask in description environments." + :type 'boolean + :group 'LaTeX-macro) + +(defcustom TeX-arg-right-insert-p t + "If non-nil, always insert automatically the corresponding \\right. +This happens when \\left is inserted." + :type 'boolean + :group 'LaTeX-macro) + +(defcustom LaTeX-mode-hook nil + "A hook run in LaTeX mode buffers." + :type 'hook + :group 'LaTeX) + +(TeX-abbrev-mode-setup latex-mode) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.drv\\'" . latex-mode) t) ;; append to the end of `auto-mode-alist' to give higher priority to Guix/Nix's derivation modes + +;; HeVeA files (LaTeX -> HTML converter: http://hevea.inria.fr/) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.hva\\'" . latex-mode)) + +(declare-function LaTeX-preview-setup "preview") + +;;;###autoload +(defun TeX-latex-mode () + ;; FIXME: Use `define-derived-mode'. + "Major mode in AUCTeX for editing LaTeX files. +See info under AUCTeX for full documentation. + +Special commands: +\\{LaTeX-mode-map} + +Entering LaTeX mode calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `LaTeX-mode-hook'." + (interactive) + (LaTeX-common-initialization) + (setq TeX-base-mode-name "LaTeX") + (setq major-mode 'latex-mode) + (setq TeX-command-default "LaTeX") + (setq TeX-sentinel-default-function #'TeX-LaTeX-sentinel) + (add-hook 'tool-bar-mode-hook #'LaTeX-maybe-install-toolbar nil t) + (LaTeX-maybe-install-toolbar) + ;; Set the value of `LaTeX-using-Biber' based on the local value of + ;; `LaTeX-biblatex-use-Biber'. This should be run within + ;; `TeX-update-style-hook' before toolbarx-refresh, otherwise the bibliography + ;; button could be wrongly set. + (add-hook 'TeX-update-style-hook + (lambda () + (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer)) + (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) + nil t) + + ;; Run style hooks associated with class options. + (add-hook 'TeX-update-style-hook + (lambda () + (let ((TeX-style-hook-dialect :classopt) + ;; Don't record class option names in + ;; `TeX-active-styles'. + (TeX-active-styles nil)) + (apply #'TeX-run-style-hooks + (apply #'append + (mapcar #'cdr LaTeX-provided-class-options))))) + nil t) + (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook) + (when (fboundp 'LaTeX-preview-setup) + (LaTeX-preview-setup)) + (TeX-set-mode-name) + ;; Defeat filladapt + (if (and (boundp 'filladapt-mode) + filladapt-mode) + (turn-off-filladapt-mode)) + (when (< 25 emacs-major-version) + ;; Set up flymake backend, see latex-flymake.el + (add-hook 'flymake-diagnostic-functions #'LaTeX-flymake nil t))) + +(TeX-abbrev-mode-setup doctex-mode) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.dtx\\'" . doctex-mode)) + +;;;###autoload +(define-derived-mode docTeX-mode TeX-latex-mode "docTeX" + "Major mode in AUCTeX for editing .dtx files derived from `LaTeX-mode'. +Runs `LaTeX-mode', sets a few variables and +runs the hooks in `docTeX-mode-hook'." + :abbrev-table doctex-mode-abbrev-table + (setq major-mode 'doctex-mode) + (set (make-local-variable 'LaTeX-insert-into-comments) t) + (set (make-local-variable 'LaTeX-syntactic-comments) t) + (setq TeX-default-extension docTeX-default-extension) + ;; Make filling and indentation aware of DocStrip guards. + (setq paragraph-start (concat paragraph-start "\\|%<") + paragraph-separate (concat paragraph-separate "\\|%<") + TeX-comment-start-regexp "\\(?:%\\(?:<[^>]+>\\)?\\)") + (setq TeX-base-mode-name "docTeX") + (TeX-set-mode-name) + (funcall TeX-install-font-lock)) + +;;This is actually a mess: to fit the scheme properly, our derived +;;mode definition would have had to be made for TeX-doctex-mode in the +;;first place, but then we could not have used define-derived-mode, or +;;all mode-specific variables would have gotten non-AUCTeX names. +;;This solution has the advantage that documentation strings are +;;provided in the autoloads, and has the disadvantage that docTeX-mode +;;is not aliased to doctex-mode (not even when the AUCTeX version is +;;disabled) as would be normal for our scheme. + +;;;###autoload +(defalias 'TeX-doctex-mode #'docTeX-mode) + +(defcustom docTeX-clean-intermediate-suffixes + TeX-clean-default-intermediate-suffixes + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom docTeX-clean-output-suffixes TeX-clean-default-output-suffixes + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom LaTeX-clean-intermediate-suffixes + (append TeX-clean-default-intermediate-suffixes + ;; These are extensions of files created by makeglossaries. + '("\\.acn" "\\.acr" "\\.alg" "\\.glg" "\\.ist")) + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom LaTeX-clean-output-suffixes TeX-clean-default-output-suffixes + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defun LaTeX--after-math-macro-prefix-p () + "Return non-nil if point is after a macro prefix in math mode. +Also sets `match-data' so that group 1 is the already typed +prefix. + +For example, in $a + \\a| - 17$ with | denoting point, the +function would return non-nil and `(match-string 1)' would return +\"a\" afterwards." + (and (texmathp) + (TeX-looking-at-backward "\\\\\\([a-zA-Z]*\\)"))) + +(defun LaTeX-common-initialization () + "Common initialization for LaTeX derived modes." + (VirTeX-common-initialization) + (set-syntax-table LaTeX-mode-syntax-table) + (set (make-local-variable 'indent-line-function) #'LaTeX-indent-line) + + (setq local-abbrev-table latex-mode-abbrev-table) + + ;; Filling + (set (make-local-variable 'paragraph-ignore-fill-prefix) t) + (set (make-local-variable 'fill-paragraph-function) #'LaTeX-fill-paragraph) + (set (make-local-variable 'adaptive-fill-mode) nil) + + (or LaTeX-largest-level + (setq LaTeX-largest-level (LaTeX-section-level "section"))) + + (setq TeX-header-end LaTeX-header-end + TeX-trailer-start LaTeX-trailer-start) + (set (make-local-variable 'TeX-style-hook-dialect) TeX-dialect) + + (require 'outline) + (set (make-local-variable 'outline-level) #'LaTeX-outline-level) + (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t)) + (when (boundp 'outline-heading-alist) + (setq outline-heading-alist + (mapcar (lambda (x) + (cons (concat "\\" (nth 0 x)) (nth 1 x))) + LaTeX-section-list))) + + (setq-local TeX-auto-full-regexp-list + (delete-dups (append LaTeX-auto-regexp-list + ;; Prevent inadvertent destruction + ;; of `plain-TeX-auto-regexp-list'. + (copy-sequence + plain-TeX-auto-regexp-list)))) + + (LaTeX-set-paragraph-start) + (setq paragraph-separate + (concat + "[ \t]*%*[ \t]*\\(" + "\\$\\$" ; Plain TeX display math + "\\|$\\)")) + + (setq TeX-verbatim-p-function #'LaTeX-verbatim-p) + (setq TeX-search-forward-comment-start-function + #'LaTeX-search-forward-comment-start) + (set (make-local-variable 'TeX-search-files-type-alist) + LaTeX-search-files-type-alist) + + (setq-local beginning-of-defun-function #'LaTeX-find-matching-begin) + (setq-local end-of-defun-function #'LaTeX-find-matching-end) + + (LaTeX-indent-commands-regexp-make) + + (set (make-local-variable 'LaTeX-item-list) '(("description" . LaTeX-item-argument) + ("thebibliography" . LaTeX-item-bib) + ("array" . LaTeX-item-array) + ("tabular" . LaTeX-item-array) + ("tabular*" . LaTeX-item-tabular*))) + + (setq TeX-complete-list + (append '(("\\\\cite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\cite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}") + ("\\\\cite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-bibitem-list) + ("\\\\nocite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}") + ("\\\\nocite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-bibitem-list) + ("\\\\[Rr]ef{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\eqref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\pageref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\\\(index\\|glossary\\){\\([^{}\n\r\\%]*\\)" + 2 LaTeX-index-entry-list "}") + ("\\\\begin{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}") + ("\\\\end{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}") + ("\\\\renewcommand\\*?{\\\\\\([A-Za-z]*\\)" + 1 TeX-symbol-list-filtered "}") + ("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)" + 1 LaTeX-environment-list-filtered "}") + ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)" + 2 LaTeX-pagestyle-list "}") + (LaTeX--after-math-macro-prefix-p + 1 (lambda () + (append (mapcar #'cadr LaTeX-math-list) + (mapcar #'cadr LaTeX-math-default))) + (if TeX-insert-braces "{}"))) + TeX-complete-list)) + + (LaTeX-add-environments + '("document" LaTeX-env-document) + '("enumerate" LaTeX-env-item) + '("itemize" LaTeX-env-item) + '("list" LaTeX-env-list) + '("trivlist" LaTeX-env-item) + '("picture" LaTeX-env-picture) + '("tabular" LaTeX-env-array) + '("tabular*" LaTeX-env-tabular*) + '("array" LaTeX-env-array) + '("eqnarray" LaTeX-env-label) + '("equation" LaTeX-env-label) + '("minipage" LaTeX-env-minipage) + + ;; The following have no special support, but are included in + ;; case the auto files are missing. + + "sloppypar" "tabbing" "verbatim" "verbatim*" + "flushright" "flushleft" "displaymath" "math" "quote" "quotation" + "center" "titlepage" "verse" "eqnarray*" + + ;; The following are not defined in latex.el, but in a number of + ;; other style files. I'm to lazy to copy them to all the + ;; corresponding .el files right now. + + ;; This means that AUCTeX will complete e.g. + ;; ``thebibliography'' in a letter, but I guess we can live with + ;; that. + + '("description" LaTeX-env-item) + '("figure" LaTeX-env-figure) + '("figure*" LaTeX-env-figure) + '("table" LaTeX-env-figure) + '("table*" LaTeX-env-figure) + '("thebibliography" LaTeX-env-bib) + '("theindex" LaTeX-env-item)) + + ;; `latex.ltx' defines `plain' and `empty' pagestyles + (LaTeX-add-pagestyles "plain" "empty") + + ;; `latex.ltx' defines the following counters + (LaTeX-add-counters "page" "equation" "enumi" "enumii" "enumiii" + "enumiv" "footnote" "mpfootnote") + + (LaTeX-add-lengths "arraycolsep" "arrayrulewidth" "baselineskip" "baselinestretch" + "bibindent" "columnsep" "columnseprule" "columnwidth" "doublerulesep" + "evensidemargin" "linewidth" "oddsidemargin" "paperwidth" + "paperheight" "parindent" "parskip" "tabcolsep" + "textheight" "textwidth" "topmargin" "unitlength") + + (TeX-add-symbols + '("addtocounter" TeX-arg-counter "Value") + '("alph" TeX-arg-counter) + '("arabic" TeX-arg-counter) + '("fnsymbol" TeX-arg-counter) + '("newcounter" TeX-arg-define-counter + [ TeX-arg-counter "Within counter" ]) + '("roman" TeX-arg-counter) + '("setcounter" TeX-arg-counter "Value") + '("usecounter" TeX-arg-counter) + '("value" TeX-arg-counter) + '("stepcounter" TeX-arg-counter) + '("refstepcounter" TeX-arg-counter) + '("label" TeX-arg-define-label) + '("pageref" TeX-arg-ref) + '("ref" TeX-arg-ref) + ;; \Ref and \labelformat are part of kernel with LaTeX 2019-10-01: + '("Ref" TeX-arg-ref) + '("labelformat" TeX-arg-counter t) + ;; \footref is part of kernel with LaTeX 2021-06-01: + '("footref" TeX-arg-ref) + '("newcommand" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("renewcommand" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + '("newenvironment" TeX-arg-define-environment + [ "Number of arguments"] t t) + '("renewenvironment" TeX-arg-environment + [ "Number of arguments"] t t) + '("providecommand" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("providecommand*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("newcommand*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("renewcommand*" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + '("newenvironment*" TeX-arg-define-environment + [ "Number of arguments"] t t) + '("renewenvironment*" TeX-arg-environment + [ "Number of arguments"] t t) + '("newtheorem" TeX-arg-define-environment + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + '("newfont" TeX-arg-define-macro t) + '("circle" "Diameter") + '("circle*" "Diameter") + '("dashbox" "Dash Length" TeX-arg-size + [ TeX-arg-corner ] t) + '("frame" t) + '("framebox" (TeX-arg-conditional + (string-equal (LaTeX-current-environment) "picture") + (TeX-arg-size [ TeX-arg-corner ] t) + ([ "Length" ] [ TeX-arg-lr ] t))) + '("line" (TeX-arg-pair "X slope" "Y slope") "Length") + '("linethickness" "Dimension") + '("makebox" (TeX-arg-conditional + (string-equal (LaTeX-current-environment) "picture") + (TeX-arg-size [ TeX-arg-corner ] t) + ([ "Length" ] [ TeX-arg-lr ] t))) + '("multiput" + TeX-arg-coordinate + (TeX-arg-pair "X delta" "Y delta") + "Number of copies" + t) + '("oval" TeX-arg-size [ TeX-arg-corner "Portion" ]) + '("put" TeX-arg-coordinate t) + '("savebox" TeX-arg-savebox + (TeX-arg-conditional + (string-equal (LaTeX-current-environment) "picture") + (TeX-arg-size [ TeX-arg-corner ] t) + ([ "Length" ] [ TeX-arg-lr ] t))) + '("shortstack" [ TeX-arg-lr ] t) + '("vector" (TeX-arg-pair "X slope" "Y slope") "Length") + '("cline" "Span `i-j'") + '("multicolumn" "Columns" "Format" t) + '("item" + (TeX-arg-conditional (or TeX-arg-item-label-p + (string-equal (LaTeX-current-environment) + "description")) + ([ "Item label" ]) + ()) + (TeX-arg-literal " ")) + '("bibitem" [ "Bibitem label" ] TeX-arg-define-cite) + '("cite" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) ()) + TeX-arg-cite) + '("nocite" TeX-arg-cite) + '("bibliographystyle" TeX-arg-bibstyle) + '("bibliography" TeX-arg-bibliography) + '("newblock" (TeX-arg-literal " ")) + '("footnote" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("footnotetext" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("footnotemark" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)) + '("newlength" (TeX-arg-define-length "Length macro")) + '("setlength" (TeX-arg-length "Length macro" nil "\\") + (TeX-arg-length "Length value")) + '("addtolength" (TeX-arg-length "Length macro" nil "\\") + (TeX-arg-length "Length to add")) + '("settowidth" (TeX-arg-length "Length macro" nil "\\") "Text") + '("settoheight" (TeX-arg-length "Length macro" nil "\\") "Text") + '("settodepth" (TeX-arg-length "Length macro" nil "\\") "Text") + '("\\" [ "Space" ]) + '("\\*" [ "Space" ]) + '("hyphenation" t) + '("linebreak" [ "How much [0 - 4]" ]) + '("nolinebreak" [ "How much [0 - 4]" ]) + '("nopagebreak" [ "How much [0 - 4]" ]) + '("pagebreak" [ "How much [0 - 4]" ]) + '("stackrel" t nil) + '("frac" t nil) + '("lefteqn" t) + '("overbrace" t) + '("overline" t) + '("overleftarrow" t) + '("overrightarrow" t) + '("sqrt" [ "Root" ] t) + '("underbrace" t) + '("underline" t) + '("acute" t) '("grave" t) '("ddot" t) '("tilde" t) '("bar" t) + '("breve" t) '("check" t) '("hat" t) '("vec" t) '("dot" t) + '("widetilde" t) '("widehat" t) + '("author" LaTeX-arg-author) + '("date" TeX-arg-date) + '("thanks" t) + '("title" t) + '("pagenumbering" (TeX-arg-eval + completing-read "Numbering style: " + '(("arabic") ("roman") ("Roman") ("alph") ("Alph")))) + '("pagestyle" TeX-arg-pagestyle) + '("markboth" t nil) + '("markright" t) + '("thispagestyle" TeX-arg-pagestyle) + '("addvspace" TeX-arg-length) + '("fbox" t) + '("hspace*" TeX-arg-length) + '("hspace" TeX-arg-length) + '("mbox" t) + '("newsavebox" TeX-arg-define-savebox) + '("parbox" + [TeX-arg-tb nil center] + [TeX-arg-length "Height"] + [TeX-arg-tb "Inner position" stretch] + (TeX-arg-length "Width") + t) + '("raisebox" "Raise" [ "Height above" ] [ "Depth below" ] t) + '("rule" [ "Raise" ] "Width" "Thickness") + '("sbox" TeX-arg-savebox t) + '("usebox" TeX-arg-savebox) + '("vspace*" TeX-arg-length) + '("vspace" TeX-arg-length) + '("documentstyle" TeX-arg-document) + '("include" (TeX-arg-input-file "File" t)) + '("includeonly" t) + '("input" TeX-arg-input-file) + '("addcontentsline" + (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot"))) + (TeX-arg-eval completing-read "Numbering style: " LaTeX-section-list) t) + '("addtocontents" + (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot"))) t) + '("typeout" t) + '("typein" [ TeX-arg-define-macro ] t) + '("verb" TeX-arg-verb) + '("verb*" TeX-arg-verb) + '("extracolsep" t) + '("index" TeX-arg-index) + '("glossary" TeX-arg-index) + '("numberline" "Section number" "Heading") + '("caption" t) + '("marginpar" [ "Left margin text" ] "Text") + '("left" TeX-arg-insert-braces) + ;; The following 4 macros are not specific to amsmath. + '("bigl" TeX-arg-insert-braces) + '("Bigl" TeX-arg-insert-braces) + '("biggl" TeX-arg-insert-braces) + '("Biggl" TeX-arg-insert-braces) + + '("langle" TeX-arg-insert-right-brace-maybe) + '("lceil" TeX-arg-insert-right-brace-maybe) + '("lfloor" TeX-arg-insert-right-brace-maybe) + + ;; These have no special support, but are included in case the + ;; auto files are missing. + + "TeX" "LaTeX" + "samepage" "newline" + "smallskip" "medskip" "bigskip" "fill" "stretch" + "thinspace" "negthinspace" "enspace" "enskip" "quad" "qquad" + "nonumber" "centering" "raggedright" + "raggedleft" "kill" "pushtabs" "poptabs" "protect" "arraystretch" + "hline" "vline" "cline" "thinlines" "thicklines" "and" "makeindex" + "makeglossary" "reversemarginpar" "normalmarginpar" + "raggedbottom" "flushbottom" "sloppy" "fussy" "newpage" + "clearpage" "cleardoublepage" "twocolumn" "onecolumn" + + "maketitle" "tableofcontents" "listoffigures" "listoftables" + '("tiny" -1) '("scriptsize" -1) '("footnotesize" -1) '("small" -1) + '("normalsize" -1) '("large" -1) '("Large" -1) '("LARGE" -1) '("huge" -1) + '("Huge" -1) + '("oldstylenums" "Numbers") + ;; The next macro is provided by LaTeX2e 2020-02-02 release: + '("legacyoldstylenums" "Numbers") + "pounds" "copyright" + "hfil" "hfill" "vfil" "vfill" "hrulefill" "dotfill" + "indent" "noindent" "today" + "appendix" + "dots" + "makeatletter" "makeatother" "jobname") + + (when (string-equal LaTeX-version "2e") + (LaTeX-add-environments + '("filecontents" LaTeX-env-contents) + '("filecontents*" LaTeX-env-contents)) + + (TeX-add-symbols + '("enlargethispage" (TeX-arg-length nil "1.0\\baselineskip")) + '("enlargethispage*" (TeX-arg-length nil "1.0\\baselineskip")) + '("tabularnewline" [ TeX-arg-length ]) + '("suppressfloats" [ TeX-arg-tb "Suppress floats position" ]) + '("ensuremath" "Math commands") + '("textsuperscript" "Text") + '("textsubscript" "Text") + '("textcircled" "Text") + '("mathring" t) + '("MakeUppercase" t) + '("MakeLowercase" t) + '("chaptermark" "Text") + '("sectionmark" "Text") + '("subsectionmark" "Text") + '("subsubsectionmark" "Text") + '("paragraphmark" "Text") + '("subparagraphmark" "Text") + + "LaTeXe" + "listfiles" "frontmatter" "mainmatter" "backmatter" + "leftmark" "rightmark" + "textcompwordmark" "textvisiblespace" "textemdash" "textendash" + "textexclamdown" "textquestiondown" "textquotedblleft" + "textquotedblright" "textquoteleft" "textquoteright" + "textbackslash" "textbar" "textless" "textgreater" + "textasciicircum" "textasciitilde" + + ;; With the advent of LaTeX2e release 2020-02-02, all symbols + ;; provided by textcomp.sty are available out of the box by the + ;; kernel. The next block is moved here from textcomp.el: + "capitalgrave" ; Type: Accent -- Slot: 0 + "capitalacute" ; Type: Accent -- Slot: 1 + "capitalcircumflex" ; Type: Accent -- Slot: 2 + "capitaltilde" ; Type: Accent -- Slot: 3 + "capitaldieresis" ; Type: Accent -- Slot: 4 + "capitalhungarumlaut" ; Type: Accent -- Slot: 5 + "capitalring" ; Type: Accent -- Slot: 6 + "capitalcaron" ; Type: Accent -- Slot: 7 + "capitalbreve" ; Type: Accent -- Slot: 8 + "capitalmacron" ; Type: Accent -- Slot: 9 + "capitaldotaccent" ; Type: Accent -- Slot: 10 + "textquotestraightbase" ; Type: Symbol -- Slot: 13 + "textquotestraightdblbase" ; Type: Symbol -- Slot: 18 + "texttwelveudash" ; Type: Symbol -- Slot: 21 + "textthreequartersemdash" ; Type: Symbol -- Slot: 22 + "textcapitalcompwordmark" ; Type: Symbol -- Slot: 23 + "textleftarrow" ; Type: Symbol -- Slot: 24 + "textrightarrow" ; Type: Symbol -- Slot: 25 + "t" ; Type: Accent -- Slot: 26 + "capitaltie" ; Type: Accent -- Slot: 27 + "newtie" ; Type: Accent -- Slot: 28 + "capitalnewtie" ; Type: Accent -- Slot: 29 + "textascendercompwordmark" ; Type: Symbol -- Slot: 31 + "textblank" ; Type: Symbol -- Slot: 32 + "textdollar" ; Type: Symbol -- Slot: 36 + "textquotesingle" ; Type: Symbol -- Slot: 39 + "textasteriskcentered" ; Type: Symbol -- Slot: 42 + "textdblhyphen" ; Type: Symbol -- Slot: 45 + "textfractionsolidus" ; Type: Symbol -- Slot: 47 + "textzerooldstyle" ; Type: Symbol -- Slot: 48 + "textoneoldstyle" ; Type: Symbol -- Slot: 49 + "texttwooldstyle" ; Type: Symbol -- Slot: 50 + "textthreeoldstyle" ; Type: Symbol -- Slot: 51 + "textfouroldstyle" ; Type: Symbol -- Slot: 52 + "textfiveoldstyle" ; Type: Symbol -- Slot: 53 + "textsixoldstyle" ; Type: Symbol -- Slot: 54 + "textsevenoldstyle" ; Type: Symbol -- Slot: 55 + "texteightoldstyle" ; Type: Symbol -- Slot: 56 + "textnineoldstyle" ; Type: Symbol -- Slot: 57 + "textlangle" ; Type: Symbol -- Slot: 60 + "textminus" ; Type: Symbol -- Slot: 61 + "textrangle" ; Type: Symbol -- Slot: 62 + "textmho" ; Type: Symbol -- Slot: 77 + "textbigcircle" ; Type: Symbol -- Slot: 79 + "textohm" ; Type: Symbol -- Slot: 87 + "textlbrackdbl" ; Type: Symbol -- Slot: 91 + "textrbrackdbl" ; Type: Symbol -- Slot: 93 + "textuparrow" ; Type: Symbol -- Slot: 94 + "textdownarrow" ; Type: Symbol -- Slot: 95 + "textasciigrave" ; Type: Symbol -- Slot: 96 + "textborn" ; Type: Symbol -- Slot: 98 + "textdivorced" ; Type: Symbol -- Slot: 99 + "textdied" ; Type: Symbol -- Slot: 100 + "textleaf" ; Type: Symbol -- Slot: 108 + "textmarried" ; Type: Symbol -- Slot: 109 + "textmusicalnote" ; Type: Symbol -- Slot: 110 + "texttildelow" ; Type: Symbol -- Slot: 126 + "textdblhyphenchar" ; Type: Symbol -- Slot: 127 + "textasciibreve" ; Type: Symbol -- Slot: 128 + "textasciicaron" ; Type: Symbol -- Slot: 129 + "textacutedbl" ; Type: Symbol -- Slot: 130 + "textgravedbl" ; Type: Symbol -- Slot: 131 + "textdagger" ; Type: Symbol -- Slot: 132 + "textdaggerdbl" ; Type: Symbol -- Slot: 133 + "textbardbl" ; Type: Symbol -- Slot: 134 + "textperthousand" ; Type: Symbol -- Slot: 135 + "textbullet" ; Type: Symbol -- Slot: 136 + "textcelsius" ; Type: Symbol -- Slot: 137 + "textdollaroldstyle" ; Type: Symbol -- Slot: 138 + "textcentoldstyle" ; Type: Symbol -- Slot: 139 + "textflorin" ; Type: Symbol -- Slot: 140 + "textcolonmonetary" ; Type: Symbol -- Slot: 141 + "textwon" ; Type: Symbol -- Slot: 142 + "textnaira" ; Type: Symbol -- Slot: 143 + "textguarani" ; Type: Symbol -- Slot: 144 + "textpeso" ; Type: Symbol -- Slot: 145 + "textlira" ; Type: Symbol -- Slot: 146 + "textrecipe" ; Type: Symbol -- Slot: 147 + "textinterrobang" ; Type: Symbol -- Slot: 148 + "textinterrobangdown" ; Type: Symbol -- Slot: 149 + "textdong" ; Type: Symbol -- Slot: 150 + "texttrademark" ; Type: Symbol -- Slot: 151 + "textpertenthousand" ; Type: Symbol -- Slot: 152 + "textpilcrow" ; Type: Symbol -- Slot: 153 + "textbaht" ; Type: Symbol -- Slot: 154 + "textnumero" ; Type: Symbol -- Slot: 155 + "textdiscount" ; Type: Symbol -- Slot: 156 + "textestimated" ; Type: Symbol -- Slot: 157 + "textopenbullet" ; Type: Symbol -- Slot: 158 + "textservicemark" ; Type: Symbol -- Slot: 159 + "textlquill" ; Type: Symbol -- Slot: 160 + "textrquill" ; Type: Symbol -- Slot: 161 + "textcent" ; Type: Symbol -- Slot: 162 + "textsterling" ; Type: Symbol -- Slot: 163 + "textcurrency" ; Type: Symbol -- Slot: 164 + "textyen" ; Type: Symbol -- Slot: 165 + "textbrokenbar" ; Type: Symbol -- Slot: 166 + "textsection" ; Type: Symbol -- Slot: 167 + "textasciidieresis" ; Type: Symbol -- Slot: 168 + "textcopyright" ; Type: Symbol -- Slot: 169 + "textordfeminine" ; Type: Symbol -- Slot: 170 + "textcopyleft" ; Type: Symbol -- Slot: 171 + "textlnot" ; Type: Symbol -- Slot: 172 + "textcircledP" ; Type: Symbol -- Slot: 173 + "textregistered" ; Type: Symbol -- Slot: 174 + "textasciimacron" ; Type: Symbol -- Slot: 175 + "textdegree" ; Type: Symbol -- Slot: 176 + "textpm" ; Type: Symbol -- Slot: 177 + "texttwosuperior" ; Type: Symbol -- Slot: 178 + "textthreesuperior" ; Type: Symbol -- Slot: 179 + "textasciiacute" ; Type: Symbol -- Slot: 180 + "textmu" ; Type: Symbol -- Slot: 181 + "textparagraph" ; Type: Symbol -- Slot: 182 + "textperiodcentered" ; Type: Symbol -- Slot: 183 + "textreferencemark" ; Type: Symbol -- Slot: 184 + "textonesuperior" ; Type: Symbol -- Slot: 185 + "textordmasculine" ; Type: Symbol -- Slot: 186 + "textsurd" ; Type: Symbol -- Slot: 187 + "textonequarter" ; Type: Symbol -- Slot: 188 + "textonehalf" ; Type: Symbol -- Slot: 189 + "textthreequarters" ; Type: Symbol -- Slot: 190 + "texteuro" ; Type: Symbol -- Slot: 191 + "texttimes" ; Type: Symbol -- Slot: 214 + "textdiv" ; Type: Symbol -- Slot: 246 + '("textcircled" 1) ; Type: Command -- Slot: N/A + '("capitalcedilla" 1) ; Type: Command -- Slot: N/A + '("capitalogonek" 1) ; Type: Command -- Slot: N/A + + "rmfamily" "sffamily" "ttfamily" + '("mdseries" -1) '("bfseries" -1) + '("itshape" -1) '("slshape" -1) + '("upshape" -1) '("scshape" -1) + '("eminnershape" -1) + ;; The next 3 were added to LaTeX kernel with 2020-02-02 release: + '("sscshape" -1) '("swshape" -1) '("ulcshape" -1) + ;; These are for the default settings: + "sscdefault" "swdefault" "ulcdefault" + ;; This macro is for `spaced small caps'. Currently, only some + ;; commercial fonts offer this. It should be moved into + ;; `LaTeX-font-list' once it is needed more frequently. + '("textssc" t) + ;; User level reset macros: + '("normalfont" -1) '("normalshape" -1) + + ;; LaTeX hook macros: + '("AddToHook" TeX-arg-hook [ "Label" ] t) + '("RemoveFromHook" TeX-arg-hook [ "Label" ]) + '("AddToHookNext" TeX-arg-hook t) + + ;; Added in LaTeX 2021-11-15 + '("counterwithin" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Format") + '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")] + (TeX-arg-counter) + (TeX-arg-counter "Within counter")) + '("counterwithin*" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Format") + '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")] + (TeX-arg-counter) + (TeX-arg-counter "Within counter")) + + '("counterwithout" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Format") + '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")] + (TeX-arg-counter) + (TeX-arg-counter "Within counter")) + '("counterwithout*" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Format") + '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")] + (TeX-arg-counter) + (TeX-arg-counter "Within counter")))) + + (TeX-run-style-hooks "LATEX") + + (make-local-variable 'TeX-font-list) + (make-local-variable 'TeX-font-replace-function) + (if (string-equal LaTeX-version "2") + () + (setq TeX-font-list LaTeX-font-list) + (setq TeX-font-replace-function #'TeX-font-replace-macro) + (TeX-add-symbols + '("newcommand" TeX-arg-define-macro + [ TeX-arg-define-macro-arguments ] t) + '("renewcommand" TeX-arg-macro + [ TeX-arg-define-macro-arguments ] t) + '("providecommand" TeX-arg-define-macro + [ TeX-arg-define-macro-arguments ] t) + '("providecommand*" TeX-arg-define-macro + [ TeX-arg-define-macro-arguments ] t) + '("newcommand*" TeX-arg-define-macro + [ TeX-arg-define-macro-arguments ] t) + '("renewcommand*" TeX-arg-macro + [ TeX-arg-define-macro-arguments ] t) + '("newenvironment" TeX-arg-define-environment + [ TeX-arg-define-macro-arguments ] t t) + '("renewenvironment" TeX-arg-environment + [ TeX-arg-define-macro-arguments ] t t) + '("usepackage" LaTeX-arg-usepackage) + '("RequirePackage" LaTeX-arg-usepackage) + '("ProvidesPackage" (TeX-arg-file-name-sans-extension "Package name") + [ TeX-arg-conditional (y-or-n-p "Insert version? ") + ([ TeX-arg-version ]) nil]) + '("ProvidesClass" (TeX-arg-file-name-sans-extension "Class name") + [ TeX-arg-conditional (y-or-n-p "Insert version? ") + ([ TeX-arg-version ]) nil]) + '("ProvidesFile" (TeX-arg-file-name "File name") + [ TeX-arg-conditional (y-or-n-p "Insert version? ") + ([ TeX-arg-version ]) nil ]) + '("documentclass" TeX-arg-document))) + + (TeX-add-style-hook "latex2e" + ;; Use new fonts for `\documentclass' documents. + (lambda () + (setq TeX-font-list LaTeX-font-list) + (setq TeX-font-replace-function #'TeX-font-replace-macro) + (run-hooks 'LaTeX2e-hook)) + TeX-dialect) + + (TeX-add-style-hook "latex2" + ;; Use old fonts for `\documentstyle' documents. + (lambda () + (setq TeX-font-list (default-value 'TeX-font-list)) + (setq TeX-font-replace-function + (default-value 'TeX-font-replace-function)) + (run-hooks 'LaTeX2-hook)) + TeX-dialect) + + ;; There must be something better-suited, but I don't understand the + ;; parsing properly. -- dak + (TeX-add-style-hook "pdftex" #'TeX-PDF-mode-on :classopt) + (TeX-add-style-hook "pdftricks" #'TeX-PDF-mode-on :classopt) + (TeX-add-style-hook "pst-pdf" #'TeX-PDF-mode-on :classopt) + (TeX-add-style-hook "dvips" + (lambda () + ;; Leave at user's choice whether to disable + ;; `TeX-PDF-mode' or not. + (setq TeX-PDF-from-DVI "Dvips")) + :classopt) + ;; This is now done in style/pstricks.el because it prevents other + ;; pstricks style files from being loaded. + ;; (TeX-add-style-hook "pstricks" 'TeX-PDF-mode-off) + (TeX-add-style-hook "psfrag" #'TeX-PDF-mode-off :classopt) + (TeX-add-style-hook "dvipdf" #'TeX-PDF-mode-off :classopt) + (TeX-add-style-hook "dvipdfm" #'TeX-PDF-mode-off :classopt) + (TeX-add-style-hook "dvipdfmx" + (lambda () + (TeX-PDF-mode-on) + ;; XeLaTeX normally don't use dvipdfmx + ;; explicitly. + (unless (eq TeX-engine 'xetex) + (setq TeX-PDF-from-DVI "Dvipdfmx"))) + :classopt) + ;; (TeX-add-style-hook "DVIoutput" 'TeX-PDF-mode-off) + ;; + ;; Well, DVIoutput indicates that we want to run PDFTeX and expect to + ;; get DVI output. Ugh. + (TeX-add-style-hook "ifpdf" (lambda () + (TeX-PDF-mode-on) + (TeX-PDF-mode-off)) + :classopt) + ;; ifpdf indicates that we cater for either. So calling both + ;; functions will make sure that the default will get used unless the + ;; user overrode it. + + (set (make-local-variable 'imenu-create-index-function) + #'LaTeX-imenu-create-index-function) + + (use-local-map LaTeX-mode-map) + + ;; Initialization of `add-log-current-defun-function': + (set (make-local-variable 'add-log-current-defun-function) + #'TeX-current-defun-name) + + ;; Set LaTeX-specific help messages for error so that it's available + ;; in `TeX-help-error'. + (setq-local TeX-error-description-list-local + LaTeX-error-description-list)) + +(defun LaTeX-imenu-create-index-function () + "Imenu support function for LaTeX." + (TeX-update-style) + (let (entries + (regexp (LaTeX-outline-regexp))) + (goto-char (point-max)) + (while (re-search-backward regexp nil t) + (let* ((name (LaTeX-outline-name)) + (level (make-string (1- (LaTeX-outline-level)) ?\ )) + (label (concat level level name)) + (mark (make-marker))) + (set-marker mark (point)) + (set-text-properties 0 (length label) nil label) + (setq entries (cons (cons label mark) entries)))) + entries)) + +(defvar LaTeX-builtin-opts + '("12pt" "11pt" "10pt" "twocolumn" "twoside" "draft") + "Built in options for LaTeX standard styles.") + +(defun LaTeX-209-to-2e () + "Make a stab at changing 2.09 doc header to 2e style." + (interactive) + (TeX-home-buffer) + (let (optstr optlist 2eoptlist 2epackages docline docstyle) + (goto-char (point-min)) + (if + (search-forward-regexp + "\\\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}" + (point-max) t) + (setq optstr (TeX-match-buffer 1) + docstyle (TeX-match-buffer 2) + optlist (split-string optstr ",")) + (if (search-forward-regexp + "\\\\documentstyle{\\([^}]*\\)}" + (point-max) t) + (setq docstyle (TeX-match-buffer 1)) + (error "No documentstyle defined"))) + (beginning-of-line 1) + (setq docline (point)) + (insert "%%%") + (while optlist + (if (member (car optlist) LaTeX-builtin-opts) + (setq 2eoptlist (cons (car optlist) 2eoptlist)) + (setq 2epackages (cons (car optlist) 2epackages))) + (setq optlist (cdr optlist))) + ;;(message (format "%S %S" 2eoptlist 2epackages)) + (goto-char docline) + (forward-line 1) + (insert "\\documentclass") + (if 2eoptlist + (insert "[" + (mapconcat (lambda (x) x) + (nreverse 2eoptlist) ",") "]")) + (insert "{" docstyle "}\n") + (if 2epackages + (insert "\\usepackage{" + (mapconcat (lambda (x) x) + (nreverse 2epackages) "}\n\\usepackage{") "}\n")) + (if (equal docstyle "slides") + (progn + (goto-char (point-min)) + (while (re-search-forward "\\\\blackandwhite{" nil t) + (replace-match "\\\\input{" nil nil))))) + (TeX-normal-mode nil)) + +(defun LaTeX-env-beginning-pos-col () + "Return a cons: (POINT . COLUMN) for current environment's beginning." + (save-excursion + (LaTeX-find-matching-begin) + (cons (point) (current-column)))) + +(defun LaTeX-hanging-ampersand-position (&optional pos col) + "Return indent column for a hanging ampersand (that is, ^\\s-*&). +When you know the position and column of the beginning of the +current environment, supply them as optional arguments POS and +COL for efficiency." + (cl-destructuring-bind + (beg-pos . beg-col) + (if pos + (cons pos col) + (LaTeX-env-beginning-pos-col)) + (let ((cur-pos (point))) + (save-excursion + (if (and (search-backward "\\\\" beg-pos t) + ;; Give up if the found "\\" belongs to an inner env. + (= beg-pos + (save-excursion + (LaTeX-find-matching-begin) + (point)))) + ;; FIXME: This `how-many' fails to count correctly if + ;; there is an inner env with "&" but without "\\", e.g. + ;; \begin{pmatrix} + ;; a & b + ;; \end{pmatrix} + (let ((cur-idx (how-many "[^\\]&" (point) cur-pos))) + (goto-char beg-pos) + ;; FIXME: This regex search fails if there is an inner + ;; env with "&" in it. + (if (re-search-forward "[^\\]&" cur-pos t (+ 1 cur-idx)) + (- (current-column) 1) + ;; If the above searchs fails, i.e. no "&" found, + ;; (- (current-column) 1) returns -1, which is wrong. + ;; So we use a fallback (+ 2 beg-col) whenever this + ;; happens: + (+ 2 beg-col))) + (+ 2 beg-col)))))) + +(defun LaTeX-indent-tabular () + "Return indent column for the current tabular-like line." + (cl-destructuring-bind + (beg-pos . beg-col) + (LaTeX-env-beginning-pos-col) + (let ((tabular-like-end-regex + (format "\\\\end{%s}" + (regexp-opt + (let (out) + (mapc (lambda (x) + (when (eq (cadr x) #'LaTeX-indent-tabular) + (push (car x) out))) + LaTeX-indent-environment-list) + out))))) + (cond ((looking-at tabular-like-end-regex) + beg-col) + + ((looking-at "\\\\\\\\") + (+ 2 beg-col)) + + ((looking-at "&") + (LaTeX-hanging-ampersand-position beg-pos beg-col)) + + (t + (+ 2 + (let ((any-col + (save-excursion + (when + (catch 'found + ;; Search "\\" or "&" which belongs to + ;; the current env, not an inner env. + (while (re-search-backward + "\\\\\\\\\\|[^\\]&" beg-pos t) + (let ((p (point))) + (when (= beg-pos + (progn + (LaTeX-find-matching-begin) + (point))) + ;; It belongs to the current env. + ;; Go to target position and exit + ;; the loop. + (goto-char (1+ p)) + (throw 'found t) + ;; Otherwise it belongs to an + ;; inner env, so continue the + ;; loop. + )))) + ;; If we found "&", then use its column as + ;; `any-col'. Else, `any-col' will be nil. + (if (= ?& (char-after)) + (current-column)))))) + (or any-col + beg-col)))))))) + +;; Utilities: + +(defmacro LaTeX-check-insert-macro-default-style (&rest body) + "Check for values of `TeX-insert-macro-default-style' and `current-prefix-arg'. +This is a utility macro with code taken from +`TeX-parse-arguments'. It should be used inside more complex +function within AUCTeX style files where optional and mandatory +arguments are queried and inserted. For examples, check the +functions `TeX-arg-color' (style/color.el) or +`LaTeX-arg-bicaption-bicaption' (style/bicaption.el)." + `(unless (if (eq TeX-insert-macro-default-style 'show-all-optional-args) + (equal current-prefix-arg '(4)) + (or + (and (eq TeX-insert-macro-default-style 'show-optional-args) + (equal current-prefix-arg '(4))) + (and (eq TeX-insert-macro-default-style 'mandatory-args-only) + (null (equal current-prefix-arg '(4)))) + TeX-last-optional-rejected)) + ,@body)) + +(defun LaTeX-extract-key-value-label (&optional key num) + "Return a regexp string to match a label in an optional argument. +The optional KEY is a string which is the name of the key in the +key=value, default is \"label\". NUM is an integer for an +explicitly numbered group construct, useful when adding items to +`reftex-label-regexps'. + +As an extra feature, the key can be the symbol `none' where the +entire matching for the key=value is skipped. The regexp then is +useful for skipping complex optional arguments. It should be +wrapped in \\(?:...\\)? then." + ;; The regexp produced here is ideally in sync with the complex one + ;; in `reftex-label-regexps'. + (concat + ;; Match the opening [ and the following chars + "\\[[^][]*" + ;; Allow nested levels of chars enclosed in braces + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^][]*\\)*" + ;; If KEY is the symbol none, don't look for any key=val: + (unless (eq key 'none) + (concat "\\<" + ;; Match the key, default is label + (or key "label") + ;; Optional spaces + "[[:space:]]*=[[:space:]]*" + ;; Match the value; braces around the value are optional + "{?\\(" + ;; Cater for NUM which sets the regexp group + (when (and num (integerp num)) + (concat "?" (number-to-string num) ":")) + ;; One of these chars terminates the value + "[^] ,}\r\n\t%]+" + ;; Close the group + "\\)}?")) + ;; We are done. Just search until the next closing bracket + "[^]]*\\]")) + +(provide 'latex) + +;;; latex.el ends here diff --git a/elpa/auctex-13.1.3/latex.elc b/elpa/auctex-13.1.3/latex.elc Binary files differnew file mode 100644 index 0000000..810be60 --- /dev/null +++ b/elpa/auctex-13.1.3/latex.elc diff --git a/elpa/auctex-13.1.3/latex/README b/elpa/auctex-13.1.3/latex/README new file mode 100644 index 0000000..772f7b6 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/README @@ -0,0 +1,64 @@ +The preview.sty style file +========================== + +Purpose +------- + +The main purpose of the preview package is the extraction of selected +elements from a LaTeX source, like formulas or graphics, into separate +pages of a DVI file. A flexible and convenient interface allows it to +specify what commands and constructs should be extracted. This works +with DVI files postprocessed by either Dvips and Ghostscript or +dvipng, but it also works when you are using PDFTeX for generating PDF +files. + +Current uses of the package include the preview-latex package for +WYSIWYG functionality in the AUCTeX editing environment, generation of +previews in LyX, as part of the operation of the ps4pdf and pst-pdf +packages, the tbook XML system and some other tools. + +Availability +------------ + +The preview package is being developed along and distributed with +AUCTeX. It can therefore be obtained as part of AUCTeX distribution +files available at <URL:https://ftp.gnu.org/pub/gnu/auctex/> or its +mirror at <CTAN:support/auctex>. CTAN also provides a standalone +version at <CTAN:macros/latex/contrib/preview>. The project page at +<URL:https://savannah.gnu.org/projects/auctex/> offers downloads and +anonymous CVS access for cutting edge versions. For more information +about the preview package please refer to the home page of AUCTeX at +<URL:https://www.gnu.org/software/auctex/>. + +Installation +------------ + +To install the preview style file on its own without the entire AUCTeX +package, run +tex preview.ins +If preview.ins happens to be missing, you can regenerate it by running +tex docstrip +on preview.dtx with the option `installer'. + +Running TeX on preview.ins will then extract further files: +preview.drv which you can run through LaTeX in order to get the +documentation for preview.sty, preview.sty itself, a bunch of option +files with extension .def and a few configuration files with extension +.cfg. In case your docstrip configuration has not already taken care +of that, install the files with extension .sty, .def and .cfg to a +location where LaTeX will be able to find them, generate the +documentation and have fun. + +The license of the original file is the GPL which you'll find a copy +of in the complete AUCTeX distribution. The distribution will also +unpack and install the respective LaTeX files with an +autoconf-supported mechanism, so you might consider using that. + +Bug reporting +------------- + +Please report problems to <URL:mailto:bug-auctex@gnu.org>, including a +small example file which uses the \listfiles statement, and the +resulting log file. + +David Kastrup diff --git a/elpa/auctex-13.1.3/latex/bootstrap.ins b/elpa/auctex-13.1.3/latex/bootstrap.ins new file mode 100644 index 0000000..a27ddb2 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/bootstrap.ins @@ -0,0 +1,4 @@ +\input docstrip +\askforoverwritefalse +\generate{\file{preview-mk.ins}{\from{preview.dtx}{installer,make}}} +\endbatchfile diff --git a/elpa/auctex-13.1.3/latex/prauctex.cfg b/elpa/auctex-13.1.3/latex/prauctex.cfg new file mode 100644 index 0000000..39922c9 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prauctex.cfg @@ -0,0 +1,48 @@ +%% +%% This is file `prauctex.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `auccfg') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prauctex.cfg. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\PreviewMacro*[[][#1{}]\footnote +\PreviewMacro*[?[{@{[]}}{}][#1]\item +\PreviewMacro*\emph +\PreviewMacro*\textrm +\PreviewMacro*\textit +\PreviewMacro*\textsc +\PreviewMacro*\textsf +\PreviewMacro*\textsl +\PreviewMacro*\texttt +\PreviewMacro*\textcolor +\PreviewMacro*\mbox +\PreviewMacro*[][#1{}]\author +\PreviewMacro*[][#1{}]\title +\PreviewMacro*\and +\PreviewMacro*\thanks +\PreviewMacro*[][#1{}]\caption +\preview@delay{\@ifundefined{pr@\string\@startsection}{% + \PreviewMacro*[!!!!!!*][#1{}]\@startsection}{}} +\preview@delay{\@ifundefined{pr@\string\chapter}{% + \PreviewMacro*[*][#1{}]\chapter}{}} +\PreviewMacro*\index +\endinput +%% +%% End of file `prauctex.cfg'. diff --git a/elpa/auctex-13.1.3/latex/prauctex.def b/elpa/auctex-13.1.3/latex/prauctex.def new file mode 100644 index 0000000..57420cb --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prauctex.def @@ -0,0 +1,61 @@ +%% +%% This is file `prauctex.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `auctex') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prauctex.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\nofiles +\preview@delay{\nonstopmode} +\begingroup +\lccode`\~=`\- +\lccode`\{=`\< +\lccode`\}=`\> +\lowercase{\endgroup + \def\pr@msgi{{~}}} +\def\pr@msgii{Preview: + Snippet \number\pr@snippet\space} +\begingroup +\catcode`\-=13 +\catcode`\<=13 +\@firstofone{\endgroup +\def\pr@msg#1{{% + \let<\pr@msgi + \def-{\pr@msgii#1}% + \errhelp{Not a real error.}% + \errmessage<}}} +\g@addto@macro\pr@ship@start{\pr@msg{started}} +\g@addto@macro\pr@ship@end{\pr@msg{ended.% + (\number\ht\pr@box+\number\dp\pr@box x\number\wd\pr@box)}} +\hbadness=\maxdimen +\newcount\hbadness +\vbadness=\maxdimen +\let\vbadness=\hbadness +\hfuzz=\maxdimen +\newdimen\hfuzz +\vfuzz=\maxdimen +\let\vfuzz=\hfuzz +\showboxdepth=-1 +\showboxbreadth=-1 +\pr@loadcfg{prauctex} +\endinput +%% +%% End of file `prauctex.def'. diff --git a/elpa/auctex-13.1.3/latex/prcounters.def b/elpa/auctex-13.1.3/latex/prcounters.def new file mode 100644 index 0000000..70bdea4 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prcounters.def @@ -0,0 +1,38 @@ +%% +%% This is file `prcounters.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `counters') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prcounters.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\def\pr@eltprint#1{\expandafter\@gobble\ifnum\value{#1}=0% + \csname pr@c@#1\endcsname\else\relax + \space{#1}{\arabic{#1}}\fi} +\def\pr@eltdef#1{\expandafter\xdef + \csname pr@c@#1\endcsname{\arabic{#1}}} +\def\pr@ckpt#1{{\let\@elt\pr@eltprint\edef\next{\cl@@ckpt}% + \ifx\next\@empty\else\typeout{Preview: Counters\next#1}% + \let\@elt\pr@eltdef\cl@@ckpt\fi}} +\pr@addto@front\pr@ship@start{\pr@ckpt:} +\pr@addto@front\pr@ship@end{\pr@ckpt.} +\endinput +%% +%% End of file `prcounters.def'. diff --git a/elpa/auctex-13.1.3/latex/preview.dtx b/elpa/auctex-13.1.3/latex/preview.dtx new file mode 100644 index 0000000..de4675e --- /dev/null +++ b/elpa/auctex-13.1.3/latex/preview.dtx @@ -0,0 +1,1904 @@ +% \iffalse +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +% +% Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, +% 2010, 2017-2022 Free Software Foundation +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 3 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program; if not, write to the +% Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +% Boston, MA 02110-1301 USA +% \fi +% \CheckSum{1794} +% \GetFileInfo{preview.sty} +% \date{\filedate} +% \author{David Kastrup\thanks{\texttt{bug-auctex@gnu.org}}} +% \title{The \texttt{preview} Package for \LaTeX\\Version \fileversion} +% \maketitle +% \section{Introduction} +% The main purpose of this package is the extraction of certain +% environments (most notably displayed formulas) from \LaTeX\ sources +% as graphics. This works with DVI files postprocessed by either +% Dvips and Ghostscript or dvipng, but it also works when you are +% using PDF\TeX\ for generating PDF files (usually also postprocessed +% by Ghostscript). +% +% Current uses of the package include the \previewlatex\ package for +% WYSIWYG functionality in the AUC\TeX\ editing environment, +% generation of previews in LyX, as part of the operation of the +% pst-pdf package, the tbook XML system and some other tools. +% +% Producing EPS files with Dvips and its derivatives using the +% \texttt{-E} option is not a good alternative: People make do by +% fiddling around with |\thispagestyle{empty}| and hoping for the best +% (namely, that the specified contents will indeed fit on single +% pages), and then trying to guess the baseline of the resulting code +% and stuff, but this is at best dissatisfactory. The preview package +% provides an easy way to ensure that exactly one page per request +% gets shipped, with a well-defined baseline and no page decorations. +% While you still can use the preview package with the `classic' +% \begin{quote} +% |dvips -E -i| +% \end{quote} +% invocation, there are better ways available that don't rely on Dvips +% not getting confused by PostScript specials. +% +% For most applications, you'll want to make use of the |tightpage| +% option. This will embed the page dimensions into the PostScript or +% PDF code, obliterating the need to use the |-E -i| options to Dvips. +% You can then produce all image files with a single run of +% Ghostscript from a single PDF or PostScript (as opposed to EPS) +% file. +% +% Various options exist that will pass \TeX\ dimensions and other +% information about the respective shipped out material (including +% descender size) into the log file, where external applications might +% make use of it. +% +% The possibility for generating a whole set of graphics with a single +% run of Ghostscript (whether from \LaTeX\ or PDF\LaTeX) increases +% both speed and robustness of applications. It is also feasible to +% use dvipng on a DVI file with the options +% \begin{quote} +% |-picky -noghostscript| +% \end{quote} +% to omit generating any image file that requires Ghostscript, then +% let a script generate all missing files using Dvips/Ghostscript. +% This will usually speed up the process significantly. +% +% \section{Package options} +% The package is included with the customary +% \begin{quote} +% |\usepackage|\oarg{options}|{preview}| +% \end{quote} +% You should usually load this package as the last one, since it +% redefines several things that other packages may also provide. +% +% The following options are available: +% \begin{description} +% \item[|active|] is the most essential option. If this option is not +% specified, the |preview| package will be inactive and the document +% will be typeset as if the |preview| package were not loaded, +% except that all declarations and environments defined by the +% package are still legal but have no effect. This allows defining +% previewing characteristics in your document, and only activating +% them by calling \LaTeX\ as +% \begin{quote} +% \raggedright +% |latex '\PassOptionsToPackage{active}{preview}| |\input|\marg{filename}|'| +% \end{quote} +% \item[|noconfig|] Usually the file |prdefault.cfg| gets loaded +% whenever the |preview| package gets activated. |prdefault.cfg| is +% supposed to contain definitions that can cater for otherwise bad +% results, for example, if a certain document class would otherwise +% lead to trouble. It also can be used to override any settings +% made in this package, since it is loaded at the very end of it. +% In addition, there may be configuration files specific for certain +% |preview| options like |auctex| which have more immediate needs. +% The |noconfig| option suppresses loading of those option files, +% too. +% \item[|psfixbb|] Dvips determines the bounding boxes from the +% material in the DVI file it understands. Lots of PostScript +% specials are not part of that. Since the \TeX\ boxes do not make +% it into the DVI file, but merely characters, rules and specials +% do, Dvips might include far too small areas. The option |psfixbb| +% will include |/dev/null| as a graphic file in the ultimate upper +% left and lower right corner of the previewed box. This will make +% Dvips generate an appropriate bounding box. +% \item[|dvips|] If this option is specified as a class option or to +% other packages, several packages pass things like page size +% information to Dvips, or cause crop marks or draft messages +% written on pages. This seriously hampers the usability of +% previews. If this option is specified, the changes will be undone +% if possible. +% \item[|pdftex|] If this option is set, PDF\TeX\ is assumed as the +% output driver. This mainly affects the |tightpage| option. +% \item[|xetex|] If this option is set, Xe\TeX\ is assumed as the +% output driver. This mainly affects the |tightpage| option. +% \item[|displaymath|] will make all displayed math environments +% subject to preview processing. This will typically be the most +% desired option. +% \item[|floats|] will make all float objects subject to preview +% processing. If you want to be more selective about what floats to +% pass through to a preview, you should instead use the +% \cmd{\PreviewSnarfEnvironment} command on the floats you want to +% have previewed. +% \item[|textmath|] will make all text math subject to previews. +% Since math mode is used throughly inside of \LaTeX\ even for other +% purposes, this works by redefining \cmd\(, \cmd\) +% and |$| and the |math| environment (apparently some people use ^^A$ +% that). Only occurences of these text math delimiters in later +% loaded packages and in the main document will thus be affected. +% \item[|graphics|] will subject all \cmd{\includegraphics} commands +% to a preview. +% \item[|sections|] will subject all section headers to a preview. +% \item[|delayed|] will delay all activations and redefinitions the +% |preview| package makes until |\||begin{document}|. The purpose +% of this is to cater for documents which should be subjected to the +% |preview| package without having been prepared for it. You can +% process such documents with +% \begin{quote} +% |latex '\RequirePackage[active,delayed,|\meta{options}|]{preview}| +% |\input|\marg{filename}|'| +% \end{quote} +% This relaxes the requirement to be loading the |preview| package +% as last package. +% \item[\meta{driver}] loads a special driver file +% |pr|\meta{driver}|.def|. The remaining options are implemented +% through the use of driver files. +% \item[|auctex|] This driver will produce fake error messages at the +% start and end of every preview environment that enable the Emacs +% package \previewlatex\ in connection with AUC\TeX\ to pinpoint +% the exact source location where the previews have originated. +% Unfortunately, there is no other reliable means of passing the +% current \TeX\ input position \emph{in} a line to external +% programs. In order to make the parsing more robust, this option +% also switches off quite a few diagnostics that could be +% misinterpreted. +% +% You should not specify this option manually, since it will only be +% needed by automated runs that want to parse the pseudo error +% messages. Those runs will then use \cmd{\PassOptionsToPackage} in +% order to effect the desired behaviour. In addition, +% |prauctex.cfg| will get loaded unless inhibited by the |noconfig| +% option. This caters for the most frequently encountered +% problematic commands. +% \item[|showlabels|] During the editing process, some people like to +% see the label names in their equations, figures and the like. Now +% if you are using Emacs for editing, and in particular +% \previewlatex, I'd strongly recommend that you check out the +% Ref\TeX\ package which pretty much obliterates the need for this +% kind of functionality. If you still want it, standard \LaTeX\ +% provides it with the |showkeys| package, and there is also the +% less encompassing |showlabels| package. Unfortunately, since +% those go to some pain not to change the page layout and spacing, +% they also don't change |preview|'s idea of the \TeX\ dimensions of +% the involved boxes. So if you are using |preview| for determing +% bounding boxes, those packages are mostly useless. The option +% |showlabels| offers a substitute for them. +% \item[|tightpage|] It is not uncommon to want to use the results of +% |preview| as graphic images for some other application. One +% possibility is to generate a flurry of EPS files with +% \begin{quote} +% |dvips -E -i -Pwww -o| \meta{outputfile}|.000| \meta{inputfile} +% \end{quote} +% However, in case those are to be processed further into graphic +% image files by Ghostscript, this process is inefficient since all +% of those files need to be processed one by one. In addition, it +% is necessary to extract the bounding box comments from the EPS +% files and convert them into page dimension parameters for +% Ghostscript in order to avoid full-page graphics. This is not +% even possible if you wanted to use Ghostscript in a~\emph{single} +% run for generating the files from a single PostScript file, since +% Dvips will in that case leave no bounding box information +% anywhere. +% +% The solution is to use the |tightpage| option. That way a single +% command line like +% \begin{quote} +% \raggedright +% \texttt{gs -sDEVICE=png16m -dTextAlphaBits=4 -r300 +% -dGraphicsAlphaBits=4 -dSAFER -q -dNOPAUSE +% -sOutputFile=\meta{outputfile}\%d.png \meta{inputfile}.ps} +% \end{quote} +% will be able to produce tight graphics from a single PostScript +% file generated with Dvips \emph{without} use of the options +% |-E -i|, in a single run. +% +% The |tightpage| option actually also works when using the |pdftex| +% option and generating PDF files with PDF\TeX. The resulting PDF +% file has separate page dimensions for every page and can directly +% be converted with one run of Ghostscript into image files. +% +% If neither |dvips| or |pdftex| have been specified, the +% corresponding option will get autodetected and invoked. +% +% If you need this in a batch environment where you don't want to +% use |preview|'s automatic extraction facilities, no problem: just +% don't use any of the extraction options, and wrap everything to be +% previewed into |preview| environments. This is how LyX does its +% math previews. +% +% If the pages under the |tightpage| option are just too tight, you +% can adjust by setting the length |\PreviewBorder| to a different +% value by using \cmd{\setlength}. The default value is +% |0.50001bp|, which is half of a usual PostScript point, rounded +% up. If you go below this value, the resulting page size may drop +% below |1bp|, and Ghostscript does not seem to like that. If you +% need finer control, you can adjust the bounding box dimensions +% individually by changing the macro |\PreviewBbAdjust| with the +% help of |\renewcommand|. Its default value is +% \begin{quote} +% \raggedright +% |\newcommand| |\PreviewBbAdjust| +% |{-\PreviewBorder| |-\PreviewBorder| +% |\PreviewBorder| |\PreviewBorder}| +% \end{quote} +% This adjusts the left, lower, right and upper borders by the given +% amount. The macro must contain 4~\TeX\ dimensions after another, +% and you may not omit the units if you specify them explicitly +% instead of by register. PostScript points have the unit~|bp|. +% \item[|lyx|] This option is for the sake of LyX developers. It will +% output a few diagnostics relevant for the sake of LyX' preview +% functionality (at the time of writing, mostly implemented for math +% insets, in versions of LyX starting with 1.3.0). +% \item[|counters|] This writes out diagnostics at the start and the +% end of previews. Only the counters changed since the last output +% get written, and if no counters changed, nothing gets written at +% all. The list consists of counter name and value, both enclosed +% in |{}| braces, followed by a space. The last such pair is +% followed by a colon (|:|) if it is at the start of the preview +% snippet, and by a period (|.|) if it is at the end. The order of +% different diagnostics like this being issued depends on the order +% of the specification of the options when calling the package. +% +% Systems like \previewlatex\ use this for keeping counters accurate +% when single previews are regenerated. +% \item[|footnotes|] This makes footnotes render as previews, and only +% as their footnote symbol. A convenient editing feature inside of +% Emacs. +% \end{description} +% The following options are just for debugging purposes of the package +% and similar to the corresponding \TeX\ commands they allude to: +% \begin{description} +% \item[|tracingall|] causes lots of diagnostic output to appear in +% the log file during the preview collecting phases of \TeX's +% operation. In contrast to the similarly named \TeX\ command, it +% will not switch to |\errorstopmode|, nor will it change the +% setting of |\tracingonline|. +% \item[|showbox|] This option will show the contents of the boxes +% shipped out to the DVI files. It also sets |\showboxbreadth| and +% |\showboxdepth| to their maximum values at the end of loading this +% package, but you may reset them if you don't like that. +% \end{description} +% \section{Provided Commands} +% \DescribeEnv{preview} The |preview| environment causes its contents +% to be set as a single preview image. Insertions like figures and +% footnotes (except those included in minipages) will typically lead +% to error messages or be lost. In case the |preview| package has not +% been activated, the contents of this environment will be typeset +% normally. +% +% \DescribeEnv{nopreview} The |nopreview| environment will cause its +% contents not to undergo any special treatment by the |preview| +% package. When |preview| is active, the contents will be discarded +% like all main text that does not trigger the |preview| hooks. When +% |preview| is not active, the contents will be typeset just like the +% main text. +% +% Note that both of these environments typeset things as usual when +% preview is not active. If you need something typeset conditionally, +% use the \cmd{\ifPreview} conditional for it. +% +% \DescribeMacro{\PreviewMacro} If you want to make a macro like +% \cmd{\includegraphics} (actually, this is what is done by the +% |graphics| option to |preview|) produce a preview image, you put a +% declaration like +% \begin{quote} +% |\PreviewMacro[*[[!]{\includegraphics}| +% \end{quote} +% or, more readable, +% \begin{quote} +% |\PreviewMacro[{*[][]{}}]{\includegraphics}| +% \end{quote} +% into your preamble. The optional argument to \cmd{\PreviewMacro} +% specifies the arguments \cmd{\includegraphics} accepts, since this +% is necessary information for properly ending the preview box. Note +% that if you are using the more readable form, you have to enclose +% the argument in a |[{| and |}]| pair. The inner braces are +% necessary to stop any included |[]| pairs from prematurely ending +% the optional argument, and to make a single |{}| +% denoting an optional argument not get stripped away by \TeX's +% argument parsing. +% +% The letters simply mean +% \begin{description} +% \item[|*|] indicates an optional |*| modifier, as in +% |\includegraphics*|. +% \item[|[|]^^A] +% indicates an optional argument in brackets. This syntax +% is somewhat baroque, but brief. +% \item[{|[]|}] also indicates an optional argument in brackets. Be +% sure to have encluded the entire optional argument specification +% in an additional pair of braces as described above. +% \item[|!|] indicates a mandatory argument. +% \item[|\char`{\char`}|] indicates the same. Again, be sure to have +% that additional level of braces around the whole argument +% specification. +% \item[|?|\meta{delimiter}\marg{true case}\marg{false case}] is a +% conditional. The next character is checked against being equal to +% \meta{delimiter}. If it is, the specification \meta{true case} is +% used for the further parsing, otherwise \meta{false case} will be +% employed. In neither case is something consumed from the input, +% so \marg{true case} will still have to deal with the upcoming +% delimiter. +% \item[|@|\marg{literal sequence}] will insert the given sequence +% literally into the executed call of the command. +% \item[|-|] will just drop the next token. It will probably be most +% often used in the true branch of a |?| specification. +% \item[|\#|\marg{argument}\marg{replacement}] is a transformation +% rule that calls a macro with the given argument and replacement +% text on the rest of the argument list. The replacement is used in +% the executed call of the command. This can be used for parsing +% arbitrary constructs. For example, the |[]| option could manually +% be implemented with the option string |?[{#{[#1]}{[{#1}]}}{}|. +% PStricks users might enjoy this sort of flexibility. +% \item[|:|\marg{argument}\marg{replacement}] is again a +% transformation rule. As opposed to |#|, however, the result of +% the transformation is parsed again. You'll rarely need this. +% \end{description} +% +% There is a second optional argument in brackets that can be used to +% declare any default action to be taken instead. This is mostly for +% the sake of macros that influence numbering: you would want to keep +% their effects in that respect. The default action should use |#1| +% for referring to the original (not the patched) command with the +% parsed options appended. Not specifying a second optional argument +% here is equivalent to specifying~|[#1]|. +% +% \DescribeMacro{\PreviewMacro*} A similar invocation +% \cmd{\PreviewMacro*} simply throws the macro and all of its +% arguments declared in the manner above away. This is mostly useful +% for having things like \cmd{\footnote} not do their magic on their +% arguments. More often than not, you don't want to declare any +% arguments to scan to \cmd{\PreviewMacro*} since you would want the +% remaining arguments to be treated as usual text and typeset in that +% manner instead of being thrown away. An exception might be, say, +% sort keys for \cmd{\cite}. +% +% A second optional argument in brackets can be used to declare any +% default action to be taken instead. This is for the sake of macros +% that influence numbering: you would want to keep their effects in +% that respect. The default action might use |#1| for referring to +% the original (not the patched) command with the parsed options +% appended. Not specifying a second optional argument here is +% equivalent to specifying~|[]| since the command usually gets thrown +% away. +% +% As an example for using this argument, you might want to specify +% \begin{quote} +% |\PreviewMacro*[{[]}][#1{}]{\footnote}| +% \end{quote} +% This will replace a footnote by an empty footnote, but taking any +% optional parameter into account, since an optional paramter changes +% the numbering scheme. That way the real argument for the footnote +% remains for processing by \previewlatex. +% +% \DescribeMacro{\PreviewEnvironment} The macro +% \cmd{\PreviewEnvironment} works just as \cmd{\PreviewMacro} does, +% only for environments. \DescribeMacro{\PreviewEnvironment*} And the +% same goes for \cmd{\PreviewEnvironment*} as compared to +% \cmd{\PreviewMacro*}. +% +% \DescribeMacro{\PreviewSnarfEnvironment} This macro does not typeset +% the original environment inside of a preview box, but instead +% typesets just the contents of the original environment inside of the +% preview box, leaving nothing for the original environment. This has +% to be used for figures, for example, since they would +% \begin{enumerate} +% \item produce insertion material that cannot be extracted to the +% preview properly, +% \item complain with an error message about not being in outer par +% mode. +% \end{enumerate} +% +% \DescribeMacro{\PreviewOpen} +% \DescribeMacro{\PreviewClose} +% Those Macros form a matched preview pair. This is for macros that +% behave similar as \cmd{\begin} and \cmd{\end} of an environment. It +% is essential for the operation of \cmd{\PreviewOpen} that the macro +% treated with it will open an additional group even when the preview +% falls inside of another preview or inside of a |nopreview| +% environment. Similarly, the macro treated with \cmd{\PreviewClose} +% will close an environment even when inactive. +% +% \DescribeMacro{\ifPreview} In case you need to know whether +% |preview| is active, you can use the conditional \cmd{\ifPreview} +% together with |\else| and |\fi|. +% +% \StopEventually{} +% \section{The Implementation} +% Here we go: the start is somewhat obtuse since we figure out version +% number and date from RCS strings. This should really be done at +% docstrip time instead. Takers? +% \begin{macro}{\pr@version} +% \begin{macrocode} +%<*style> +%<*!active> +\NeedsTeXFormat{LaTeX2e} \def\reserved@a #1#2$#3: +#4${\xdef#1{\reserved@c #2#4 $}} \def\reserved@c #1 #2${#1} +\begingroup \catcode`\_=12 +\reserved@a\pr@version $Name: release_13_1 $ \ifx\pr@version\@empty +\reserved@a\pr@version CVS-$Revision: 1.126 $ \endgroup \else + \def\next release_{} \lccode`\_=`. + \edef\next{\lowercase{\endgroup + \def\noexpand\pr@version{\expandafter\next\pr@version}}} \next \fi +\reserved@a\next $Date: 2017/04/24 13:20:00 $ +\edef\next{\noexpand\ProvidesPackage{preview}% + [\next\space \pr@version\space (AUCTeX/preview-latex)]} +\next +% \end{macrocode} +% \end{macro} +% Since many parts here will not be needed as long as the package is +% inactive, we will include them enclosed with |<*active>| and +% |</active>| guards. That way, we can append all of this stuff at a +% place where it does not get loaded if not necessary. +% +%\begin{macro}{\ifPreview} +% Setting the \cmd{\ifPreview} command should not be done by the +% user, so we don't use \cmd{\newif} here. As a consequence, there +% are no \cmd{\Previewtrue} and \cmd{\Previewfalse} commands. +% \begin{macrocode} +\let\ifPreview\iffalse +%</!active> +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ifpr@outer} +% We don't allow previews inside of previews. The macro +% \cmd{\ifpr@outer} can be used for checking whether we are outside +% of any preview code. +% \begin{macrocode} +%<*active> +\newif\ifpr@outer +\pr@outertrue +%</active> +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\preview@delay} +% The usual meaning of \cmd{\preview@delay} is to just echo its +% argument in normal |preview| operation. If |preview| is inactive, +% it swallows its argument. If the |delayed| option is active, the +% contents will be passed to the \cmd{\AtBeginDocument} hook. +%\begin{macro}{\pr@advise} +% The core macro for modifying commands is \cmd{\pr@advise}. You +% pass it the original command name as first argument and what should +% be executed before the saved original command as second argument. +%\begin{macro}{\pr@advise@ship} +% The most often used macro for modifying commands is +% \cmd{\pr@advise@ship}. It receives three arguments. The first is +% the macro to modify, the second specifies some actions to be done +% inside of a box to be created before the original macro gets +% executed, the third one specifies actions after the original macro +% got executed. +%\begin{macro}{\pr@loadcfg} +% The macro \cmd{\pr@loadcfg} is used for loading in configuration +% files, unless disabled by the |noconfig| option. After discussion +% with maintainer of pst-pdf package Rolf Niepraschk (Thanks!), we +% add here a check for existence of |luatex85.sty| and load it if +% available. With this, |preview| will also work with newer |luatex| +% versions. +% \begin{macrocode} +%<*!active> +\let\preview@delay=\@gobble +\let\pr@advise=\@gobbletwo +\long\def\pr@advise@ship#1#2#3{} +\def\pr@loadcfg#1{\InputIfFileExists{#1.cfg}{}{}} +\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{} +\DeclareOption{noconfig}{\let\pr@loadcfg=\@gobble} +% \end{macrocode} +%\begin{macro}{\pr@addto@front} +% This adds code globally to the front of a macro. +% \begin{macrocode} +\long\def\pr@addto@front#1#2{% + \toks@{#2}\toks@\expandafter{\the\expandafter\toks@#1}% + \xdef#1{\the\toks@}} +% \end{macrocode} +% \end{macro} +% These commands get more interesting when |preview| is active: +% \begin{macrocode} +\DeclareOption{active}{% + \let\ifPreview\iftrue + \def\pr@advise#1{% + \expandafter\pr@adviseii\csname pr@\string#1\endcsname#1}% + \long\def\pr@advise@ship#1#2#3{\pr@advise#1{\pr@protect@ship{#2}{#3}}}% + \let\preview@delay\@firstofone} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\pr@adviseii} +% Now \cmd{\pr@advise} needs its helper macro. In order to avoid +% recursive definitions, we advise only macros that are not yet +% advised. Or, more exactly, we throw away the old advice and only +% take the new one. We use e\TeX's \cmd{\protected} where available +% for some extra robustness. +% \begin{macrocode} +\long\def\pr@adviseii#1#2#3{\preview@delay{% + \ifx#1\relax \let#1#2\fi + \toks@{#3#1}% + \ifx\@undefined\protected \else \protected\fi + \long\edef#2{\the\toks@}}} +% \end{macrocode} +%\end{macro} +% +% The |delayed| option is easy to implement: this is \emph{not} done +% with \cmd{\let} since at the course of document processing, \LaTeX\ +% redefines \cmd{\AtBeginDocument} and we want to follow that +% redefinition. +% \begin{macrocode} +\DeclareOption{delayed}{% + \ifPreview \def\preview@delay{\AtBeginDocument}\fi +} +% \end{macrocode} +% +%\begin{macro}{\ifpr@fixbb} +% Another conditional. \cmd{\ifpr@fixbb} tells us whether we want to +% surround the typeset materials with invisible rules so that Dvips +% gets the bounding boxes right for, say, pure PostScript inclusions. +% +% If you are installing this on an operating system different from +% the one |preview| has been developed on, you might want to redefine +% |\pr@markerbox| in your |prdefault.cfg| file to use a file known to +% be empty, like |/dev/null| is under Unix. Make this redefinition +% depend on \cmd{\ifpr@fixbb} since only then |\pr@markerbox| will be +% defined. +% \begin{macrocode} +\newif\ifpr@fixbb +\pr@fixbbfalse +\DeclareOption{psfixbb}{\ifPreview% + \pr@fixbbtrue + \newbox\pr@markerbox + \setbox\pr@markerbox\hbox{\special{psfile=/dev/null}}\fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@graphicstype} +% The |dvips| option redefines the |bop-hook| to reset the page +% size. +% \begin{macrocode} +\let\pr@graphicstype=\z@ +\DeclareOption{dvips}{% + \let\pr@graphicstype\@ne + \preview@delay{\AtBeginDvi{% + \special{!/preview@version(\pr@version)def} + \special{!userdict begin/preview-bop-level 0 def% + /bop-hook{/preview-bop-level dup load dup 0 le{/isls false def% + /vsize 792 def/hsize 612 def}if 1 add store}bind def% + /eop-hook{/preview-bop-level dup load dup 0 gt{1 sub}if + store}bind def end}}}} +% \end{macrocode} +% The |pdftex| option just sets \cmd{\pr@graphicstype}. +% \begin{macrocode} +\DeclareOption{pdftex}{% + \let\pr@graphicstype\tw@} +% \end{macrocode} +% And so does the |xetex| option. +% \begin{macrocode} +\DeclareOption{xetex}{% + \let\pr@graphicstype\thr@@} +%</!active> +% \end{macrocode} +% \end{macro} +% \subsection{The internals} +% +% Those are only needed if |preview| is active. +% \begin{macrocode} +%<*active> +% \end{macrocode} +% \begin{macro}{\pr@snippet} +% \cmd{\pr@snippet} is the current snippet number. We need a +% separate counter to \cmd{\c@page} since several other commands +% might fiddle with the page number. +% \begin{macrocode} +\newcount\pr@snippet +\global\pr@snippet=1 +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@protect} +% This macro gets one argument which is unpacked and executed in +% typesetting situations where we are not yet inside of a preview. +% \begin{macrocode} +\def\pr@protect{\ifx\protect\@typeset@protect + \ifpr@outer \expandafter\expandafter\expandafter + \@secondoftwo\fi\fi\@gobble} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@protect@ship} +% Now for the above mentioned \cmd{\pr@protect@ship}. This gets +% three arguments. The first is what to do at the beginning of the +% preview, the second what to do at the end, the third is the macro +% where we stored the original definition. +% +% In case we are not in a typesetting situation, +% \cmd{\pr@protect@ship} leaves the stored macro to fend for its +% own. No better or worse protection than the original. And we +% only do anything different when \cmd{\ifpr@outer} turns out to be +% true. +% \begin{macrocode} +\def\pr@protect@ship{\pr@protect{\@firstoftwo\pr@startbox}% + \@gobbletwo} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@insert} +% \begin{macro}{\pr@mark} +% \begin{macro}{\pr@marks} +% We don't want insertions to end up on our lists. So we disable +% them right now by replacing them with the following: +% \begin{macrocode} +\def\pr@insert{\begingroup\afterassignment\pr@insertii\count@} +\def\pr@insertii{\endgroup\setbox\pr@box\vbox} +% \end{macrocode} +% Similar things hold for marks. +% \begin{macrocode} +\def\pr@mark{{\afterassignment}\toks@} +\def\pr@marks{{\aftergroup\pr@mark\afterassignment}\count@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@box} +% \begin{macro}{\pr@startbox} +% Previews will be stored in \cmd{\box}\cmd{\pr@box}. +% \cmd{\pr@startbox} gets two arguments: code to execute immediately +% before the following stuff, code to execute afterwards. You have +% to cater for \cmd{\pr@endbox} being called at the right time +% yourself. We will use a \cmd{\vsplit} on the box later in order +% to remove any leading glues, penalties and similar stuff. For +% this reason we start off the box with an optimal break point. +% \begin{macrocode} +\newbox\pr@box +\long\def\pr@startbox#1#2{% + \ifpr@outer + \toks@{#2}% + \edef\pr@cleanup{\the\toks@}% + \setbox\pr@box\vbox\bgroup + \break + \pr@outerfalse\@arrayparboxrestore + \let\insert\pr@insert + \let\mark\pr@mark + \let\marks\pr@marks + \expandafter\expandafter\expandafter + \pr@ship@start + \expandafter\@firstofone + \else + \expandafter \@gobble + \fi{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@endbox} +% Cleaning up also is straightforward. If we have to watch the +% bounding \TeX\ box, we want to remove spurious skips. We also +% want to unwrap a possible single line paragraph, so that the box +% is not full line length. We use \cmd{\vsplit} to clean up leading +% glue and stuff, and we make some attempt of removing trailing +% ones. After that, we wrap up the box including possible material +% from \cmd{\AtBeginDvi}. If the |psfixbb| option is active, we +% adorn the upper left and lower right corners with copies of +% \cmd{\pr@markerbox}. The first few lines cater for \LaTeX\ hiding +% things like like the code for \cmd{\paragraph} in \cmd{\everypar}. +% \begin{macrocode} +\def\pr@endbox{% + \let\reserved@a\relax + \ifvmode \edef\reserved@a{\the\everypar}% + \ifx\reserved@a\@empty\else + \dimen@\prevdepth + \noindent\par + \setbox\z@\lastbox\unskip\unpenalty + \prevdepth\dimen@ + \setbox\z@\hbox\bgroup\penalty-\maxdimen\unhbox\z@ + \ifnum\lastpenalty=-\maxdimen\egroup + \else\egroup\box\z@ \fi\fi\fi + \ifhmode \par\unskip\setbox\z@\lastbox + \nointerlineskip\hbox{\unhbox\z@\/}% + \else \unskip\unpenalty\unskip \fi + \egroup + \setbox\pr@box\vbox{% + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \nointerlineskip + \splittopskip\z@skip\setbox\z@\vsplit\pr@box to\z@ + \unvbox\z@ + \nointerlineskip + %\color@setgroup + \box\pr@box + %\color@endgroup + }% +% \end{macrocode} +% \begin{macro}{\pr@ship@end} +% \label{sec:prshipend}At this point, \cmd{\pr@ship@end} gets +% called. You must not under any circumstances change |\box\pr@box| +% in any way that would add typeset material at the front of it, +% except for PostScript header specials, since the front of +% |\box\pr@box| may contain stuff from \cmd{\AtBeginDvi}. +% \cmd{\pr@ship@end} contains two types of code additions: stuff +% that adds to |\box\pr@box|, like the |labels| option does, and +% stuff that measures out things or otherwise takes a look at the +% finished |\box\pr@box|, like the |auctex| or |showbox| option do. +% The former should use \cmd{pr@addto@front} for adding to this +% hook, the latter use \cmd{g@addto@macro} for adding at the end of +% this hook. +% +% Note that we shift the output box up by its height via +% \cmd{\voffset}. This has three reasons: first we make sure that +% no package-inflicted non-zero value of \cmd{\voffset} or +% \cmd{\hoffset} will have any influence on the positioning of our +% box. Second we shift the box such that its basepoint will exactly +% be at the (1in,1in)~mark defined by \TeX. That way we can +% properly take ascenders into account. And the third reason is +% that \TeX\ treats a \cmd{\hbox} and a \cmd{\vbox} differently with +% regard to the treating of its depth. Shifting \cmd{\voffset} and +% \cmd{\hoffset} can be inhibited by setting |\pr@offset@override|. +% \begin{macrocode} + \pr@ship@end + {\let\protect\noexpand + \ifx\pr@offset@override\@undefined + \voffset=-\ht\pr@box + \hoffset=\z@ + \fi + \c@page=\pr@snippet + \pr@shipout + \ifpr@fixbb\hbox{% + \dimen@\wd\pr@box + \@tempdima\ht\pr@box + \@tempdimb\dp\pr@box + \box\pr@box + \llap{\raise\@tempdima\copy\pr@markerbox\kern\dimen@}% + \lower\@tempdimb\copy\pr@markerbox}% + \else \box\pr@box \fi}% + \global\advance\pr@snippet\@ne + \pr@cleanup +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% Oh, and we kill off the usual meaning of \cmd{\shipout} in case +% somebody makes a special output routine. The following test is +% pretty much the same as in |everyshi.sty|. One of its implications +% is that if someone does a \cmd{\shipout} of a \emph{void} box, +% things will go horribly wrong. +% \begin{macro}{\pr@@shipout} +% \begin{macrocode} +\def\pr@@shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb@x + \afterassignment\pr@shipoutegroup\setbox\z@} +\def\pr@shipoutegroup{\ifvoid\z@ \expandafter\aftergroup\fi \egroup} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@shipout} +% We now need to check which command we are replacing. Before +% things got sophisticated in 2020 or 2021, this had been +% \cmd{\shipout} but now it could be \cmd{\tex\_shipout:D}. \LaTeX\ +% got a hook mechanism for managing output routines, but it doesn't +% really work well for wholesale replacement of the \cmd{\shipout} +% command like |preview| does. +% \begin{macrocode} +\ifx\shipout\@undefined + \begingroup + \catcode`\:=10 + \catcode`\_=10 + \ifx\tex_shipout:D\@undefined + \PackageError{preview}{Cannot find \protect\shipout\space primitive}% + {preview needs to replace the \protect\shipout\space primitive with + its own routine to do its work. Due to packages or formats + interfering, it cannot be identified. Please report this.} + \else + \global\let\pr@shipout=\tex_shipout:D + \global\let\tex_shipout:D=\pr@@shipout + \fi + \endgroup +\else + \let\pr@shipout=\shipout + \let\shipout=\pr@@shipout +\fi +% \end{macrocode} +% \end{macro} +% \subsection{Parsing commands} +% \begin{macro}{\pr@parseit} +% \begin{macro}{\pr@endparse} +% \begin{macro}{\pr@callafter} +% The following stuff is for parsing the arguments of commands we +% want to somehow surround with stuff. Usage is +% \begin{quote} +% \cmd{\pr@callafter}\meta{aftertoken}\meta{parsestring}\cmd{\pr@endparse}\\ +% \qquad\meta{macro}\meta{parameters} +% \end{quote} +% \meta{aftertoken} is stored away and gets executed once parsing +% completes, with its first argument being the parsed material. +% \meta{parsestring} would be, for example for the +% \cmd{\includegraphics} macro, |*[[!|, an optional |*| argument +% followed by two optional arguments enclosed in |[]|, followed by +% one mandatory argument. +% +% For the sake of a somewhat more intuitive syntax, we now support +% also the syntax |{*[]{}}| in the optional argument. Since \TeX\ +% strips redundant braces, we have to write |[{{}}]| in this syntax +% for a single mandatory argument. Hard to avoid. We use an +% unusual character for ending the parsing. The implementation is +% rather trivial. +% \begin{macrocode} +\def\pr@parseit#1{\csname pr@parse#1\endcsname} +\let\pr@endparse=\@percentchar +\def\next#1{% +\def\pr@callafter{% + \afterassignment\pr@parseit + \let#1= }} +\expandafter\next\csname pr@parse\pr@endparse\endcsname +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@parse*} +% Straightforward, same mechanism \LaTeX\ itself employs. We take +% some care not to pass potential |#| tokens unprotected through +% macros. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse*\endcsname#1\pr@endparse#2{% + \begingroup\toks@{#1\pr@endparse{#2}}% + \edef\next##1{\endgroup##1\the\toks@}% + \@ifstar{\next{\pr@parse@*}}{\next\pr@parseit}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@parse[} +% \begin{macro}{\pr@brace} +% Copies optional parameters in brackets if present. The additional +% level of braces is necessary to ensure that braces the user might +% have put to hide a~|]| bracket in an optional argument don't get +% lost. There will be no harm if such braces were not there at the +% start. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse[\endcsname#1\pr@endparse#2{% + \begingroup\toks@{#1\pr@endparse{#2}}% + \edef\next##1{\endgroup##1\the\toks@}% + \@ifnextchar[{\next\pr@bracket}{\next\pr@parseit}} +\long\def\pr@bracket#1\pr@endparse#2[#3]{% + \pr@parseit#1\pr@endparse{#2[{#3}]}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@parse]} +% This is basically a do-nothing, so that we may use the syntax +% |{*[][]!}| in the optional argument instead of the more concise +% but ugly |*[[!| which confuses the brace matchers of editors. +% \begin{macrocode} +\expandafter\let\csname pr@parse]\endcsname=\pr@parseit +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@parse} +% \begin{macro}{\pr@parse!} +% Mandatory arguments are perhaps easiest to parse. +% \begin{macrocode} +\long\def\pr@parse#1\pr@endparse#2#3{% + \pr@parseit#1\pr@endparse{#2{#3}}} +\expandafter\let\csname pr@parse!\endcsname=\pr@parse +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@parse?} +% \begin{macro}{\pr@parsecond} +% This does an explicit call of |\@ifnextchar| and forks into the +% given two alternatives as a result. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse?\endcsname#1#2\pr@endparse#3{% + \begingroup\toks@{#2\pr@endparse{#3}}% + \@ifnextchar#1{\pr@parsecond\@firstoftwo}% + {\pr@parsecond\@secondoftwo}} +\def\pr@parsecond#1{\expandafter\endgroup + \expandafter\expandafter\expandafter\pr@parseit + \expandafter#1\the\toks@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@parse@} +% This makes it possible to insert literal material into the +% argument list. +% \begin{macrocode} + \long\def\pr@parse@#1#2\pr@endparse#3{% + \pr@parseit #2\pr@endparse{#3#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@parse-} +% This will just drop the next token. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse-\endcsname + #1\pr@endparse#2{\begingroup + \toks@{\endgroup\pr@parseit #1\pr@endparse{#2}}% + {\aftergroup\the\aftergroup\toks@ \afterassignment}% + \let\next= } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@parse:} +% The following is a transform rule. A macro is being defined with +% the given argument list and replacement, and the transformed +% version replaces the original. The result of the transform is +% still subject to being parsed. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse:\endcsname + #1#2#3\pr@endparse#4{\begingroup + \toks@{\endgroup \pr@parseit#3\pr@endparse{#4}}% + \long\def\next#1{#2}% + \the\expandafter\toks@\next} +% \end{macrocode} +% \end{macro} +% \edef\next{\noexpand\begin{macro}{\noexpand +% \pr@parse\string#}} +% \next +% Another transform rule, but this passes the transformed material +% into the token list. +% \begin{macrocode} +\long\expandafter\def\csname pr@parse#\endcsname + #1#2#3\pr@endparse#4{\begingroup + \toks@{#4}% + \long\edef\next##1{\toks@{\the\toks@##1}}% + \toks@{\endgroup \pr@parseit#3\pr@endparse}% + \long\def\reserved@a#1{{#2}}% + \the\expandafter\next\reserved@a} +%</active> +% \end{macrocode} +% \end{macro} +% +% \subsection{Selection options} +% The |displaymath| option. The |equation| environments in AMS\LaTeX\ +% already do too much before our hook gets to interfere, so we hook +% earlier. Some juggling is involved to ensure we get the original +% |\everydisplay| tokens only once and where appropriate. +% +% The incredible hack with |\dt@ptrue| is necessary for working around +% bug `amslatex/3425'. +% \begin{macrocode} +%<*!active> +\begingroup +\catcode`\*=11 +\@firstofone{\endgroup +\DeclareOption{displaymath}{% + \preview@delay{\toks@{% + \pr@startbox{\noindent$$% + \aftergroup\pr@endbox\@gobbletwo}{$$}\@firstofone}% + \everydisplay\expandafter{\the\expandafter\toks@ + \expandafter{\the\everydisplay}}}% + \pr@advise@ship\equation{\begingroup\aftergroup\pr@endbox + \def\dt@ptrue{\m@ne=\m@ne}\noindent}% + {\endgroup}% + \pr@advise@ship\equation*{\begingroup\aftergroup\pr@endbox + \def\dt@ptrue{\m@ne=\m@ne}\noindent}% + {\endgroup}% + \PreviewOpen[][\def\dt@ptrue{\m@ne=\m@ne}\noindent#1]\[% + \PreviewClose\]% + \PreviewEnvironment[][\noindent#1]{eqnarray}% + \PreviewEnvironment[][\noindent#1]{eqnarray*}% + \PreviewEnvironment{displaymath}% +}} +% \end{macrocode} +% +% The |textmath| option. Some folderol in order to define the active +% |$| +% math mode delimiter. \cmd\pr@textmathcheck is used for checking +% whether we have a single |$| or double |$$|. +% In the latter case, we enter display math (this sort of display math +% is not allowed inside of \LaTeX\ because of inconsistent spacing, +% but surprisingly many people use it nevertheless). Strictly +% speaking, this is incorrect, since not every +% |$$| actually means display math. For example, |\hbox{$$}| will +% because of restricted horizontal mode rather yield an empty text +% math formula. Since our implementation moved the sequence inside of +% a |\vbox|, the interpretation will change. People should just not +% enter rubbish like that. +% \begin{macrocode} +\begingroup +\def\next#1#2{% + \endgroup + \DeclareOption{textmath}{% + \PreviewEnvironment{math}% + \preview@delay{\ifx#1\@undefined \let#1=$%$ + \fi\catcode`\$=\active + \ifx\xyreuncatcodes\@undefined\else + \edef\next{\catcode`@=\the\catcode`@\relax}% + \makeatother\expandafter\xyreuncatcodes\next\fi}% + \pr@advise@ship\(\pr@endaftergroup{}% \) + \pr@advise@ship#1{\@firstoftwo{\let#1=#2% + \futurelet\reserved@a\pr@textmathcheck}}{}}% + \def\pr@textmathcheck{\expandafter\pr@endaftergroup + \ifx\reserved@a#1{#2#2}\expandafter\@gobbletwo\fi#2}} +\lccode`\~=`\$ +\lowercase{\expandafter\next\expandafter~}% + \csname pr@\string$%$ + \endcsname +%</!active> +% \end{macrocode} +% \begin{macro}{\pr@endaftergroup} +% This justs ends the box after the group opened by |#1| is closed +% again. +% \begin{macrocode} +%<*active> +\def\pr@endaftergroup#1{#1\aftergroup\pr@endbox} +%</active> +% \end{macrocode} +% \end{macro} +% +% The |graphics| option. +% \begin{macrocode} +%<*!active> +\DeclareOption{graphics}{% + \PreviewMacro[*[[!]{\includegraphics}%]] +} +% \end{macrocode} +% The |floats| option. The complications here are merely to spare us +% bug reports about broken document classes that use |\let| on +% |\endfigure| and similar. Notable culprits that have not been +% changed in years in spite of reports are |elsart.cls| and +% |IEEEtran.cls|. Complain when you are concerned. +% \begin{macrocode} +\def\pr@floatfix#1#2{\ifx#1#2% + \ifx#1\@undefined\else + \PackageWarningNoLine{preview}{% +Your document class has a bad definition^^J +of \string#1, most likely^^J +\string\let\string#1=\string#2^^J +which has now been changed to^^J +\string\def\string#1{\string#2}^^J +because otherwise subsequent changes to \string#2^^J +(like done by several packages changing float behaviour)^^J +can't take effect on \string#1.^^J +Please complain to your document class author}% + \def#1{#2}\fi\fi} +\begingroup +\def\next#1#2{\endgroup + \DeclareOption{floats}{% + \pr@floatfix\endfigure\end@float + \pr@floatfix\endtable\end@float + \pr@floatfix#1\end@dblfloat + \pr@floatfix#2\end@dblfloat + \PreviewSnarfEnvironment[![]{@float}%] + \PreviewSnarfEnvironment[![]{@dblfloat}%] + }} +\expandafter\next\csname endfigure*\expandafter\endcsname + \csname endtable*\endcsname +% \end{macrocode} +% The |sections| option. Two optional parameters might occur in +% |memoir.cls|. +% \begin{macrocode} +\DeclareOption{sections}{% + \PreviewMacro[!!!!!!*[[!]{\@startsection}%]] + \PreviewMacro[*[[!]{\chapter}%]] +} +% \end{macrocode} +% We now interpret any further options as driver files we load. Note +% that these driver files are loaded even when |preview| is not +% active. The reason is that they might define commands (like +% \cmd{\PreviewCommand}) that should be available even in case of an +% inactive package. Large parts of the |preview| package will not +% have been loaded in this case: you have to cater for that. +% \begin{macrocode} +\DeclareOption* + {\InputIfFileExists{pr\CurrentOption.def}{}{\OptionNotUsed}} +% \end{macrocode} +% +% \subsection{Preview attaching commands} +% \begin{macro}{\PreviewMacro} +% As explained above. Detect possible |*| and call appropriate +% macro. +% \begin{macrocode} +\def\PreviewMacro{\@ifstar\pr@starmacro\pr@macro} +% \end{macrocode} +% The version without |*| is now rather straightforward. +% \begin{macro}{\pr@macro} +% \begin{macro}{\pr@domacro} +% \begin{macro}{\pr@macroii} +% \begin{macro}{\pr@endmacro} +% \begin{macrocode} +\long\def\pr@domacro#1#2{% + \long\def\next##1{#2}% + \pr@callafter\next#1]\pr@endparse} +\newcommand\pr@macro[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise@ship{##2}{\the\toks@{##1\noexpand\pr@endbox}}{}}% + \@ifnextchar[\next\pr@macroii} +\def\pr@macroii{\next[##1]} +\long\def\pr@endmacro#1{#1\pr@endbox} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{PreviewMacro*} +% \begin{macro}{\pr@protect@domacro} +% \begin{macro}{\pr@starmacro} +% The version with |*| has to parse the arguments, then throw them +% away. Some internal macros first, then the interface call. +% \begin{macrocode} +\long\def\pr@protect@domacro#1#2{\pr@protect{% + \long\def\next##1{#2}% + \pr@callafter\next#1]\pr@endparse}} +\newcommand\pr@starmacro[1][]{\toks@{\pr@protect@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise##2{\the\toks@{##1}}}% + \@ifnextchar[\next{\next[]}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\PreviewOpen} +% As explained above. Detect possible |*| and call appropriate macro. +% \begin{macrocode} +\def\PreviewOpen{\@ifstar\pr@starmacro\pr@open} +% \end{macrocode} +% The version without |*| is now rather straightforward. +% \begin{macro}{\pr@open} +% \begin{macrocode} +\newcommand\pr@open[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise##2{\begingroup + \noexpand\pr@protect@ship + {\the\toks@{\begingroup\aftergroup\noexpand\pr@endbox##1}}% + {\endgroup}}}% + \@ifnextchar[\next\pr@macroii} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\PreviewClose} +% As explained above. Detect possible |*| and call appropriate +% macro. +% \begin{macrocode} +\def\PreviewClose{\@ifstar\pr@starmacro\pr@close} +% \end{macrocode} +% The version without |*| is now rather straightforward. +% \begin{macro}{\pr@close} +% \begin{macrocode} +\newcommand\pr@close[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise{##2}{\the\toks@{##1\endgroup}}}% + \@ifnextchar[\next\pr@macroii} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\PreviewEnvironment} +% Actually, this ignores any syntax argument. But don't tell +% anybody. Except for the |*|~variant, it respects (actually +% ignores) any argument! Of course, we'll need to deactivate +% |\end{|\meta{environment}|}| as well. +% \begin{macrocode} +\def\PreviewEnvironment{\@ifstar\pr@starenv\pr@env} +\newcommand\pr@starenv[1][]{\toks@{\pr@starmacro[{#1}]}% + \long\edef\next##1##2{% + \the\toks@[{##2}]##1}% + \begingroup\pr@starenvii} +\newcommand\pr@starenvii[2][]{\endgroup + \expandafter\next\csname#2\endcsname{#1}% + \expandafter\pr@starmacro\csname end#2\endcsname} +\newcommand\pr@env[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\expandafter\noexpand\pr@advise@ship + \noexpand\csname##2\noexpand\endcsname{\the\toks@ + {\begingroup\aftergroup\noexpand\pr@endbox##1}}{\endgroup}}% + \@ifnextchar[\next\pr@macroii %] + } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\PreviewSnarfEnvironment} +% This is a nuisance since we have to advise \emph{both} the +% environment and its end. +% \begin{macrocode} +\newcommand{\PreviewSnarfEnvironment}[2][]{% + \expandafter\pr@advise + \csname #2\endcsname{\pr@snarfafter{#1}}% + \expandafter\pr@advise + \csname end#2\endcsname{\pr@endsnarf}} +%</!active> +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@snarfafter} +% \begin{macro}{\pr@startsnarf} +% \begin{macro}{\pr@endsnarf} +% Ok, this looks complicated, but we have to start a group in order +% to be able to hook \cmd{\pr@endbox} into the game only when +% \cmd{\ifpr@outer} has triggered the start. And we need to get our +% start messages out before parsing the arguments. +% \begin{macrocode} +%<*active> +\let\pr@endsnarf\relax +\long\def\pr@snarfafter#1{\ifpr@outer + \pr@ship@start + \let\pr@ship@start\relax + \let\pr@endsnarf\endgroup + \else + \let\pr@endsnarf\relax + \fi + \pr@protect{\pr@callafter\pr@startsnarf#1]\pr@endparse}} +\def\pr@startsnarf#1{#1\begingroup + \pr@startbox{\begingroup\aftergroup\pr@endbox}{\endgroup}% + \ignorespaces} +%</active> +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\pr@ship@start} +% \begin{macro}{\pr@ship@end} +% The hooks \cmd{\pr@ship@start} and \cmd{\pr@ship@end} can be added +% to by option files by the help of the \cmd{\g@addto@macro} command +% from \LaTeX, and by the \cmd{\pr@addto@front} command from +% |preview.sty| itself. They are called just before starting to +% process some preview, and just after it. Here is the policy for +% adding to them: \cmd{\pr@ship@start} is called inside of the vbox +% |\pr@box| before typeset material gets produced. It is, however, +% preceded by a break command that is intended for usage in +% \cmd{\vsplit}, so that any following glue might disappear. In +% case you want to add any material on the list, you have to precede +% it with \cmd{\unpenalty} and have to follow it with \cmd{\break}. +% You have make sure that under no circumstances any other legal +% breakpoints appear before that, and your material should +% contribute no nonzero dimensions to the page. For the policies of +% the \cmd{\pr@ship@end} hook, see the description on +% page~\pageref{sec:prshipend}. +% \begin{macrocode} +%<*!active> +\let\pr@ship@start\@empty +\let\pr@ship@end\@empty +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{environment}{preview} +% \begin{environment}{nopreview} +% First we write the definitions of these environments when +% |preview| is inactive. We will redefine them if |preview| gets +% activated. +% \begin{macrocode} +\newenvironment{preview}{\ignorespaces}{\ifhmode\unskip\fi} +\newenvironment{nopreview}{\ignorespaces}{\ifhmode\unskip\fi} +% \end{macrocode} +% \end{environment} +% \end{environment} +% +% We now process the options and finish in case we are not active. +% \begin{macrocode} +\ProcessOptions\relax +\ifPreview\else\expandafter\endinput\fi +%</!active> +% \end{macrocode} +% Now for the redefinition of the |preview| and |endpreview| +% environments: +% \begin{macrocode} +%<*active> +\renewenvironment{preview}{\begingroup + \pr@startbox{\begingroup\aftergroup\pr@endbox}% + {\endgroup}% + \ignorespaces}% + {\ifhmode\unskip\fi\endgroup} +\renewenvironment{nopreview}{\pr@outerfalse\ignorespaces}% + {\ifhmode\unskip\fi} +% \end{macrocode} +% We use the normal output routine, but hijack it a bit for our +% purposes to preserve \cmd{\AtBeginDvi} hooks and not get previews +% while in output: that could become rather ugly. +% +% The main work of disabling normal output relies on a \cmd{\shipout} +% redefinition. +% \begin{macro}{\pr@output} +% \begin{macrocode} +\newtoks\pr@output +\pr@output\output +\output{% + \pr@outerfalse + \let\@begindvi\@empty + \the\pr@output} +\let\output\pr@output +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@typeinfos} +% Then we have some document info that style files might want to +% output. +% \begin{macrocode} +\def\pr@typeinfos{\typeout{Preview: Fontsize \f@size pt}% + \ifnum\mag=\@m\else\typeout{Preview: Magnification \number\mag}\fi + \ifx\pdfoutput\@undefined + \ifx\XeTeXversion\@undefined \else + % FIXME: The message should not be emitted if XeTeX does not produce + % PDF. There does not seem to be a primitive for that, though. + \typeout{Preview: PDFoutput 1}% + \fi + \else + \ifx\pdfoutput\relax \else + \ifnum\pdfoutput>\z@ + \typeout{Preview: PDFoutput 1}% + \fi + \fi + \fi +} +\AtBeginDocument{\pr@typeinfos} +% \end{macrocode} +% \end{macro} +% And at the end we load the default configuration file, so that it +% may override settings from this package: +% \begin{macrocode} +\pr@loadcfg{prdefault} +%</active> +%</style> +% \end{macrocode} +% +% \section{The option files} +% \subsection{The \texttt{auctex} option} +% The AUC\TeX\ option will cause error messages to spew. We want them +% on the terminal, but we don't want \LaTeX\ to stop its automated +% run. We delay \cmd{\nonstopmode} in case the user has any +% pseudo-interactive folderol like reading in of file names in his +% preamble. Because we are so good-hearted, we will not break this as +% long as the document has not started, but after that we need the +% error message mechanism operative. +% +% The |\nofiles| command here tries to avoid clobbering input files +% used for references and similar. It will come too late if you call +% the package with \cmd{\AtBeginDocument}, so you'll need to issue +% |\nofiles| yourself in that case. Previously, this was done +% unconditionally in the main style file, but since we don't know what +% the package may be used for, this was inappropriate. +% +% So here is the contents of the |prauctex.def| file: +% \begin{macrocode} +%<auctex>\ifPreview\else\expandafter\endinput\fi +%<auctex>\nofiles +%<auctex>\preview@delay{\nonstopmode} +% \end{macrocode} +% Ok, here comes creative error message formatting. It turns out a +% sizable portion of the runtime is spent in I/O. Making the error +% messages short is an advantage. It is not possible to convince +% \TeX\ to make shorter error messages than this: \TeX\ always wants +% to include context. This is about the shortest \ae sthetic one we +% can muster. +% \begin{macrocode} +%<auctex>\begingroup +%<auctex>\lccode`\~=`\- +%<auctex>\lccode`\{=`\< +%<auctex>\lccode`\}=`\> +%<auctex>\lowercase{\endgroup +%<auctex> \def\pr@msgi{{~}}} +%<auctex>\def\pr@msgii{Preview: +%<auctex> Snippet \number\pr@snippet\space} +%<auctex>\begingroup +%<auctex>\catcode`\-=13 +%<auctex>\catcode`\<=13 +%<auctex>\@firstofone{\endgroup +%<auctex>\def\pr@msg#1{{% +%<auctex> \let<\pr@msgi +%<auctex> \def-{\pr@msgii#1}% +%<auctex> \errhelp{Not a real error.}% +%<auctex> \errmessage<}}} +%<auctex>\g@addto@macro\pr@ship@start{\pr@msg{started}} +%<auctex>\g@addto@macro\pr@ship@end{\pr@msg{ended.% +%<auctex> (\number\ht\pr@box+\number\dp\pr@box x\number\wd\pr@box)}} +% \end{macrocode} +% This looks pretty baffling, but it produces something short and +% semi-graphical, namely |<-><->|. That is a macro |<| that expands +% into |<->|, where |<| and |>| are the braces around an +% \cmd{\errmessage} argument and |-| is a macro expanding to the full +% text of the error message. Cough cough. You did not really want to +% know, did you? +% +% Since over/underfull boxes are about the messiest things to parse, +% we disable them by setting the appropriate badness limits and making +% the variables point to junk. We also disable other stuff. While we +% set \cmd{\showboxbreadth} and \cmd{\showboxdepth} to indicate as +% little diagnostic output as possible, we keep them operative, so +% that the user retains the option of debugging using this stuff. The +% other variables concerning the generation of warnings and +% daignostics, however, are more often set by commonly employed +% packages and macros such as \cmd{\sloppy}. So we kill them off for +% good. +% \begin{macrocode} +%<auctex>\hbadness=\maxdimen +%<auctex>\newcount\hbadness +%<auctex>\vbadness=\maxdimen +%<auctex>\let\vbadness=\hbadness +%<auctex>\hfuzz=\maxdimen +%<auctex>\newdimen\hfuzz +%<auctex>\vfuzz=\maxdimen +%<auctex>\let\vfuzz=\hfuzz +%<auctex>\showboxdepth=-1 +%<auctex>\showboxbreadth=-1 +% \end{macrocode} +% Ok, now we load a possible configuration file. +% \begin{macrocode} +%<auctex>\pr@loadcfg{prauctex} +% \end{macrocode} +% And here we cater for several frequently used commands in +% |prauctex.cfg|: +% \begin{macrocode} +%<auccfg>\PreviewMacro*[[][#1{}]\footnote +%<auccfg>\PreviewMacro*[?[{@{[]}}{}][#1]\item +%<auccfg>\PreviewMacro*\emph +%<auccfg>\PreviewMacro*\textrm +%<auccfg>\PreviewMacro*\textit +%<auccfg>\PreviewMacro*\textsc +%<auccfg>\PreviewMacro*\textsf +%<auccfg>\PreviewMacro*\textsl +%<auccfg>\PreviewMacro*\texttt +%<auccfg>\PreviewMacro*\textcolor +%<auccfg>\PreviewMacro*\mbox +%<auccfg>\PreviewMacro*[][#1{}]\author +%<auccfg>\PreviewMacro*[][#1{}]\title +%<auccfg>\PreviewMacro*\and +%<auccfg>\PreviewMacro*\thanks +%<auccfg>\PreviewMacro*[][#1{}]\caption +%<auccfg>\preview@delay{\@ifundefined{pr@\string\@startsection}{% +%<auccfg> \PreviewMacro*[!!!!!!*][#1{}]\@startsection}{}} +%<auccfg>\preview@delay{\@ifundefined{pr@\string\chapter}{% +%<auccfg> \PreviewMacro*[*][#1{}]\chapter}{}} +%<auccfg>\PreviewMacro*\index +% \end{macrocode} +% +% \subsection{The \texttt{lyx} option} +% The following is the option providing LyX with info for its preview +% implementation. +% \begin{macrocode} +%<lyx>\ifPreview\else\expandafter\endinput\fi +%<lyx>\pr@loadcfg{prlyx} +%<lyx>\g@addto@macro\pr@ship@end{\typeout{Preview: +%<lyx> Snippet \number\pr@snippet\space +%<lyx> \number\ht\pr@box\space \number\dp\pr@box \space\number\wd\pr@box}} +% \end{macrocode} +% +% \subsection{The \texttt{counters} option} +% This outputs a checkpoint. We do this by saving all counter +% registers in backup macros starting with |\pr@c@| in their name. A +% checkpoint first writes out all changed counters (previously +% unchecked counters are not written out unless different from zero), +% then saves all involved counter values. \LaTeX\ tracks its counters +% in the global variable \cmd{\cl@ckpt}. +% \begin{macrocode} +%<counters>\ifPreview\else\expandafter\endinput\fi +%<counters>\def\pr@eltprint#1{\expandafter\@gobble\ifnum\value{#1}=0% +%<counters> \csname pr@c@#1\endcsname\else\relax +%<counters> \space{#1}{\arabic{#1}}\fi} +%<counters>\def\pr@eltdef#1{\expandafter\xdef +%<counters> \csname pr@c@#1\endcsname{\arabic{#1}}} +%<counters>\def\pr@ckpt#1{{\let\@elt\pr@eltprint\edef\next{\cl@@ckpt}% +%<counters> \ifx\next\@empty\else\typeout{Preview: Counters\next#1}% +%<counters> \let\@elt\pr@eltdef\cl@@ckpt\fi}} +%<counters>\pr@addto@front\pr@ship@start{\pr@ckpt:} +%<counters>\pr@addto@front\pr@ship@end{\pr@ckpt.} +% \end{macrocode} +% +% \subsection{Debugging options} +% Those are for debugging the operation of |preview|, and thus are +% mostly of interest for people that want to use |preview| for their +% own purposes. Since debugging output is potentially confusing to +% the error message parsing from AUC\TeX, you should not turn on +% |\tracingonline| or switch from |\nonstopmode| unless you are +% certain your package will never be used with \previewlatex. +% +% \paragraph{The \texttt{showbox} option} will generate diagnostic +% output for every produced box. It does not delay the resetting of +% the |\showboxbreadth| and |\showboxdepth| parameters so that you can +% still change them after the loading of the package. It does, +% however, move them to the end of the package loading, so that they +% will not be affected by the |auctex| option. +% \begin{macrocode} +%<showbox>\ifPreview\else\expandafter\endinput\fi +%<showbox>\AtEndOfPackage{% +%<showbox> \showboxbreadth\maxdimen +%<showbox> \showboxdepth\maxdimen} +%<showbox>\g@addto@macro\pr@ship@end{\showbox\pr@box} +% \end{macrocode} +% +% \paragraph{The \texttt{tracingall} option} is for the really heavy +% diagnostic stuff. For the reasons mentioned above, we do not want +% to change the setting of the interaction mode, nor of the +% |tracingonline| flag. If the user wants them different, he should +% set them outside of the preview boxes. +% \begin{macrocode} +%<tracingall>\ifPreview\else\expandafter\endinput\fi +%<tracingall>\pr@addto@front\pr@ship@start{\let\tracingonline\count@ +%<tracingall> \let\errorstopmode\@empty\tracingall} +% \end{macrocode} +% +% \subsection{Supporting conversions} +% It is not uncommon to want to use the results of |preview| as +% images. One possibility is to generate a flurry of EPS files with +% \begin{quote} +% |dvips -E -i -Ppdf -o| \meta{outputfile}|.000| \meta{inputfile} +% \end{quote} +% However, in case those are to be processed further into graphic +% image files by Ghostscript, this process is inefficient. One cannot +% use Ghostscript in a single run for generating the files, however, +% since one needs to set the page size (or full size pages will be +% produced). The |tightpage| option will set the page dimensions at +% the start of each PostScript page so that the output will be sized +% appropriately. That way, a single pass of Dvips followed by a +% single pass of Ghostscript will be sufficient for generating all +% images. +% +% You will have to specify the output driver to be used, either +% |dvips| or |pdftex|. +% +% \begin{macro}{\PreviewBorder} +% \begin{macro}{\PreviewBbAdjust} +% We start this off with the user tunable parameters which get +% defined even in the case of an inactive package, so that +% redefinitions and assignments to them will always work: +% \begin{macrocode} +%<tightpage>\ifx\PreviewBorder\@undefined +%<tightpage> \newdimen\PreviewBorder +%<tightpage> \PreviewBorder=0.50001bp +%<tightpage>\fi +%<tightpage>\ifx\PreviewBbAdjust\@undefined +%<tightpage> \def\PreviewBbAdjust{-\PreviewBorder -\PreviewBorder +%<tightpage> \PreviewBorder \PreviewBorder} +%<tightpage>\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% Here is stuff used for parsing this: +% \begin{macrocode} +%<tightpage>\ifPreview\else\expandafter\endinput\fi +%<tightpage>\def\pr@nextbb{\edef\next{\next\space\number\dimen@}% +%<tightpage> \expandafter\xdef\csname pr@bb@% +%<tightpage> \romannumeral\count@\endcsname{\the\dimen@}% +%<tightpage> \advance\count@\@ne\ifnum\count@<5 +%<tightpage> \afterassignment\pr@nextbb\dimen@=\fi} +% \end{macrocode} +% And here is the stuff that we fudge into our hook. Of course, we +% have to do it in a box, and we start this box off with our special. +% There is one small consideration here: it might come before any +% |\AtBeginDvi| stuff containing header specials. It turns out Dvips +% rearranges this amicably: header code specials get transferred to +% the appropriate header section, anyhow, so this ensures that we come +% right after the bop section. We insert the 7~numbers here: the +% 4~bounding box adjustments, and the 3~\TeX\ box dimensions. In case +% the box adjustments have changed since the last time, we write them +% out to the console. +% \begin{macrocode} +%<tightpage>\ifnum\pr@graphicstype=\z@ +%<tightpage> \ifcase +%<tightpage> \ifx\XeTeXversion\@undefined +%<tightpage> \ifx\pdfoutput\@undefined \@ne\fi +%<tightpage> \ifx\pdfoutput\relax \@ne\fi +%<tightpage> \ifnum\pdfoutput>\z@ \tw@\fi \@ne +%<tightpage> \else \thr@@\fi +%<tightpage> \or \ExecuteOptions{dvips}\relax +%<tightpage> \or \ExecuteOptions{pdftex}\relax +%<tightpage> \or \ExecuteOptions{xetex}\relax\fi\fi +%<tightpage>\global\let\pr@bbadjust\@empty +%<tightpage>\pr@addto@front\pr@ship@end{\begingroup +%<tightpage> \let\next\@gobble +%<tightpage> \count@\@ne\afterassignment\pr@nextbb +%<tightpage> \dimen@\PreviewBbAdjust +%<tightpage> \ifx\pr@bbadjust\next +%<tightpage> \else \global\let\pr@bbadjust\next +%<tightpage> \typeout{Preview: Tightpage \pr@bbadjust}% +%<tightpage> \fi\endgroup} +%<tightpage>\ifcase\pr@graphicstype +%<tightpage>\or +%<tightpage> \g@addto@macro\pr@ship@end{\setbox\pr@box\hbox{% +%<tightpage> \special{ps::\pr@bbadjust\space +%<tightpage> \number\ifdim\ht\pr@box>\z@ \ht\pr@box +%<tightpage> \else \z@ +%<tightpage> \fi \space +%<tightpage> \number\ifdim\dp\pr@box>\z@ \dp\pr@box +%<tightpage> \else \z@ +%<tightpage> \fi \space +%<tightpage> \number\ifdim\wd\pr@box>\z@ \wd\pr@box +%<tightpage> \else \z@ +%<tightpage> \fi}\box\pr@box}} +%<tightpage>\or +%<tightpage> \g@addto@macro\pr@ship@end{{\dimen@\ht\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi +%<tightpage> \advance\dimen@\pr@bb@iv +%<tightpage> \dimen@ii=\dimen@ +%<tightpage> \global\pdfvorigin\dimen@ +%<tightpage> \dimen@\dp\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi +%<tightpage> \advance\dimen@-\pr@bb@ii +%<tightpage> \advance\dimen@\dimen@ii +%<tightpage> \global\pdfpageheight\dimen@ +%<tightpage> \dimen@\wd\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@=\z@\fi +%<tightpage> \advance\dimen@-\pr@bb@i +%<tightpage> \advance\dimen@\pr@bb@iii +%<tightpage> \global\pdfpagewidth\dimen@ +%<tightpage> \global\pdfhorigin-\pr@bb@i}} +%<tightpage>\or +%<tightpage> \g@addto@macro\pr@ship@end{\dimen@\ht\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi +%<tightpage> \advance\dimen@\pr@bb@iv +%<tightpage> \dimen@ii=\dimen@ +%<tightpage> \voffset=-1in +%<tightpage> \advance\voffset\dimen@ +%<tightpage> \advance\voffset-\ht\pr@box +%<tightpage> \dimen@\dp\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@\z@\fi +%<tightpage> \advance\dimen@-\pr@bb@ii +%<tightpage> \advance\dimen@\dimen@ii +%<tightpage> \global\pdfpageheight\dimen@ +%<tightpage> \global\paperheight\dimen@ +%<tightpage> \dimen@\wd\pr@box +%<tightpage> \ifdim\dimen@<\z@ \dimen@=\z@\fi +%<tightpage> \advance\dimen@-\pr@bb@i +%<tightpage> \advance\dimen@\pr@bb@iii +%<tightpage> \global\pdfpagewidth\dimen@ +%<tightpage> \hoffset=-1in +%<tightpage> \advance\hoffset-\pr@bb@i +%<tightpage> \let\pr@offset@override\@empty} +%<tightpage>\fi +% \end{macrocode} +% Ok, here comes the beef. First we fish the 7~numbers from the file +% with |token| and convert them from \TeX~|sp| to PostScript points. +% \begin{macrocode} +%<tightpage>\ifnum\pr@graphicstype=\@ne +%<tightpage>\preview@delay{\AtBeginDvi{% +% \end{macrocode} +% Backwards-compatibility. Once we are certain that dvipng-1.6 or +% later is widely used, the three following specials can be exchanged +% for the simple |\special{!/preview@tightpage true def}| +% \begin{macrocode} +%<tightpage> \special{!/preview@tightpage true def (% +%<tightpage> compatibility PostScript comment for dvipng<=1.5 } +%<tightpage> \special{!userdict begin/bop-hook{% +%<tightpage> 7{currentfile token not{stop}if +%<tightpage> 65781.76 div DVImag mul}repeat +%<tightpage> 72 add 72 2 copy gt{exch}if 4 2 roll +%<tightpage> neg 2 copy lt{exch}if dup 0 gt{pop 0 exch}% +%<tightpage> {exch dup 0 lt{pop 0}if}ifelse 720 add exch 720 add +%<tightpage> 3 1 roll +%<tightpage> 4{5 -1 roll add 4 1 roll}repeat +%<tightpage> <</PageSize[5 -1 roll 6 index sub 5 -1 roll 5 index sub]% +%<tightpage> /PageOffset[7 -2 roll [1 1 dtransform exch]% +%<tightpage> {0 ge{neg}if exch}forall]>>setpagedevice% +%<tightpage> //bop-hook exec}bind def end} +%<tightpage> \special{!userdict (some extra code to avoid +%<tightpage> dvipng>=1.6 unknown special: +%<tightpage> 7{currentfile token not{stop}if 65781.76 div })) pop} +% \end{macrocode} +% The ``userdict'' at the start of the last special is also there to +% avoid an unknown special in dvipng$<=1.6$. This is the end of the +% backwards-compatibility code. +% \begin{macrocode} +%<tightpage> \special{!userdict begin/bop-hook{% +%<tightpage> preview-bop-level 0 le{% +%<tightpage> 7{currentfile token not{stop}if +%<tightpage> 65781.76 div DVImag mul}repeat +% \end{macrocode} +% Next we produce the horizontal part of the bounding box as +% \[ (1\mathrm{in},1\mathrm{in}) + +% \bigl(\min(|\wd\pr@box|,0),\max(|\wd\pr@box|,0)\bigr) \] +% and roll it to the bottom of the stack: +% \begin{macrocode} +%<tightpage> 72 add 72 2 copy gt{exch}if 4 2 roll +% \end{macrocode} +% Next is the vertical part of the bounding box. Depth counts in +% negatively, and we again take $\min$ and $\max$ of possible extents +% in the vertical direction, limited by 0. 720 corresponds to +% $10\,\mathrm{in}$ and is the famous $1\,\mathrm{in}$ distance away +% from the edge of letterpaper. +% \begin{macrocode} +%<tightpage> neg 2 copy lt{exch}if dup 0 gt{pop 0 exch}% +%<tightpage> {exch dup 0 lt{pop 0}if}ifelse 720 add exch 720 add +%<tightpage> 3 1 roll +% \end{macrocode} +% Ok, we now have the bounding box on the stack in the proper order +% llx, lly, urx, ury. We add the adjustments: +% \begin{macrocode} +%<tightpage> 4{5 -1 roll add 4 1 roll}repeat +% \end{macrocode} +% The page size is calculated as the appropriate differences, the page +% offset consists of the coordinates of the lower left corner, with +% those coordinates negated that would be reckoned positive in the +% device coordinate system. +% \begin{macrocode} +%<tightpage> <</PageSize[5 -1 roll 6 index sub 5 -1 roll 5 index sub]% +%<tightpage> /PageOffset[7 -2 roll [1 1 dtransform exch]% +%<tightpage> {0 ge{neg}if exch}forall]>>setpagedevice}if% +% \end{macrocode} +% So we now bind the old definition of |bop-hook| into our new +% definition and finish it. +% \begin{macrocode} +%<tightpage> //bop-hook exec}bind def end}}} +%<tightpage>\fi +% \end{macrocode} +% +% \subsection{The \texttt{showlabels} option} +% During the editing process, some people like to see the label names +% in their equations, figures and the like. Now if you are using +% Emacs for editing, and in particular \previewlatex, I'd strongly +% recommend that you check out the Ref\TeX\ package which pretty much +% obliterates the need for this kind of functionality. If you still +% want it, standard \LaTeX\ provides it with the |showkeys| package, +% and there is also the less encompassing |showlabels| package. +% Unfortunately, since those go to some pain not to change the page +% layout and spacing, they also don't change |preview|'s idea of the +% \TeX\ dimensions of the involved boxes. +% +% So those packages are mostly useless. So we present here an +% alternative hack that will get the labels through. +% \begin{macro}{\pr@labelbox} +% This works by collecting them into a separate box which we then +% tack to the right of the previews. +% \begin{macrocode} +%<showlabels>\ifPreview\else\expandafter\endinput\fi +%<showlabels>\newbox\pr@labelbox +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@label} +% We follow up with our own definition of the \cmd{\label} macro +% which will be active only in previews. The original definition is +% stored in |\pr@@label|. |\pr@lastlabel| contains the last typeset +% label in order to avoid duplication in certain environments, and +% we keep the stuff in |\pr@labelbox|. +% \begin{macrocode} +%<showlabels>\def\pr@label#1{\pr@@label{#1}% +% \end{macrocode} +% Ok, now we generate the box, by placing the label below any existing +% stuff. +% \begin{macrocode} +%<showlabels> \ifpr@setbox\z@{#1}% +%<showlabels> \global\setbox\pr@labelbox\vbox{\unvbox\pr@labelbox +%<showlabels> \box\z@}\egroup\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpr@setbox} +% |\ifpr@setbox| receives two arguments, |#1| is the box into which +% to set a label, |#2| is the label text itself. If a label needs +% to be set (if it is not a duplicate in the current box, and is +% nonempty, and we are in the course of typesetting and so on), we +% are left in a true conditional and an open group with the preset +% box. If nothing should be set, no group is opened, and we get +% into skipping to the closing of the conditional. Since +% |\ifpr@setbox| is a macro, you should not place the call to it +% into conditional text, since it will not pair up with |\fi| until +% being expanded. +% +% We have some trickery involved here. |\romannumeral\z@| expands +% to empty, and will also remove everything between the two of them +% that also expands to empty, like a chain of |\fi|. +% \begin{macrocode} +%<showlabels>\def\ifpr@setbox#1#2{% +%<showlabels> \romannumeral% +%<showlabels> \ifx\protect\@typeset@protect\ifpr@outer\else +% \end{macrocode} +% Ignore empty labels\dots +% \begin{macrocode} +%<showlabels> \z@\bgroup +%<showlabels> \protected@edef\next{#2}\@onelevel@sanitize\next +%<showlabels> \ifx\next\@empty\egroup\romannumeral\else +% \end{macrocode} +% and labels equal to the last one. +% \begin{macrocode} +%<showlabels> \ifx\next\pr@lastlabel\egroup\romannumeral\else +%<showlabels> \global\let\pr@lastlabel\next +%<showlabels> \setbox#1\pr@boxlabel\pr@lastlabel +%<showlabels> \expandafter\expandafter\romannumeral\fi\fi\fi\fi +%<showlabels> \z@\iffalse\iftrue\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@boxlabel} +% Now the actual typesetting of a label box is done. We use a small +% typewriter font inside of a framed box (the default frame/box +% separating distance is a bit large). +% \begin{macrocode} +%<showlabels>\def\pr@boxlabel#1{\hbox{\normalfont +%<showlabels> \footnotesize\ttfamily\fboxsep0.4ex\relax\fbox{#1}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@maketag} +% And here is a version for |amsmath| equations. They look better +% when the label is right beside the tag, so we place it there, but +% augment |\box\pr@labelbox| with an appropriate placeholder. +% \begin{macrocode} +%<showlabels>\def\pr@maketag#1{\pr@@maketag{#1}% +%<showlabels> \ifpr@setbox\z@{\df@label}% +%<showlabels> \global\setbox\pr@labelbox\vbox{% +%<showlabels> \hrule\@width\wd\z@\@height\z@ +%<showlabels> \unvbox\pr@labelbox}% +% \end{macrocode} +% Set the width of the box to empty so that the label placement gets +% not disturbed, then append it. +% \begin{macrocode} +%<showlabels> \wd\z@\z@\box\z@ \egroup\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pr@lastlabel} +% Ok, here is how we activate this: we clear out box and label info +% \begin{macrocode} +%<showlabels>\g@addto@macro\pr@ship@start{% +%<showlabels> \global\setbox\pr@labelbox\box\voidb@x +%<showlabels> \xdef\pr@lastlabel{}% +% \end{macrocode} +% The definitions above are global because we might be in any amount +% of nesting. We then reassign the appropriate labelling macros: +% \begin{macrocode} +%<showlabels> \global\let\pr@@label\label \let\label\pr@label +%<showlabels> \global\let\pr@@maketag\maketag@@@ +%<showlabels> \let\maketag@@@\pr@maketag +%<showlabels>} +% \end{macrocode} +% \end{macro} +% Now all we have to do is to add the stuff to the box in question. +% The stuff at the front works around a bug in |ntheorem.sty|. +% \begin{macrocode} +%<showlabels>\pr@addto@front\pr@ship@end{% +%<showlabels> \ifx \label\pr@label \global\let\label\pr@@label \fi +%<showlabels> \ifx \maketag@@@\pr@maketag +%<showlabels> \global\let\maketag@@@\pr@@maketag \fi +%<showlabels> \ifvoid\pr@labelbox +%<showlabels> \else \setbox\pr@box\hbox{% +%<showlabels> \box\pr@box\,\box\pr@labelbox}% +%<showlabels> \fi} +% \end{macrocode} +% \subsection{The \texttt{footnotes} option} +% This is rather simplistic right now. It overrides the default +% footnote action (which is to disable footnotes altogether for better +% visibility). +% \begin{macrocode} +%<footnotes>\PreviewMacro[[!]\footnote %] +% \end{macrocode} +% +% \section{Various driver files} +% The installer, in case it is missing. If it is to be used via +% |make|, we don't specify an installation path, since +% \begin{quote} +% |make install| +% \end{quote} +% is supposed to cater for the installation itself. +% \begin{macrocode} +%<installer> \input docstrip +%<installer&make> \askforoverwritefalse +%<installer> \generate{ +%<installer> \file{preview.drv}{\from{preview.dtx}{driver}} +%<installer&!make> \usedir{tex/latex/preview} +%<installer> \file{preview.sty}{\from{preview.dtx}{style} +%<installer> \from{preview.dtx}{style,active}} +%<installer> \file{prauctex.def}{\from{preview.dtx}{auctex}} +%<installer> \file{prauctex.cfg}{\from{preview.dtx}{auccfg}} +%<installer> \file{prshowbox.def}{\from{preview.dtx}{showbox}} +%<installer> \file{prshowlabels.def}{\from{preview.dtx}{showlabels}} +%<installer> \file{prtracingall.def}{\from{preview.dtx}{tracingall}} +%<installer> \file{prtightpage.def}{\from{preview.dtx}{tightpage}} +%<installer> \file{prlyx.def}{\from{preview.dtx}{lyx}} +%<installer> \file{prcounters.def}{\from{preview.dtx}{counters}} +%<installer> \file{prfootnotes.def}{\from{preview.dtx}{footnotes}} +%<installer> } +%<installer> \endbatchfile +% \end{macrocode} +% And here comes the documentation driver. +% \begin{macrocode} +%<driver> \documentclass{ltxdoc} +%<driver> \usepackage{preview} +%<driver> \let\ifPreview\relax +%<driver> \newcommand\previewlatex{\texttt{preview-latex}} +%<driver> \begin{document} +%<driver> \DocInput{preview.dtx} +%<driver> \end{document} +% \end{macrocode} +% \Finale{} +% \iffalse +% Local Variables: +% mode: doctex +% TeX-master: "preview.drv" +% End: +% \fi diff --git a/elpa/auctex-13.1.3/latex/preview.sty b/elpa/auctex-13.1.3/latex/preview.sty new file mode 100644 index 0000000..11f5990 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/preview.sty @@ -0,0 +1,409 @@ +%% +%% This is file `preview.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `style') +%% preview.dtx (with options: `style,active') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from preview.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\NeedsTeXFormat{LaTeX2e} \def\reserved@a #1#2$#3: +#4${\xdef#1{\reserved@c #2#4 $}} \def\reserved@c #1 #2${#1} +\begingroup \catcode`\_=12 +\reserved@a\pr@version $Name: release_13_1 $ \ifx\pr@version\@empty +\reserved@a\pr@version CVS-$Revision: 1.126 $ \endgroup \else + \def\next release_{} \lccode`\_=`. + \edef\next{\lowercase{\endgroup + \def\noexpand\pr@version{\expandafter\next\pr@version}}} \next \fi +\reserved@a\next $Date: 2017/04/24 13:20:00 $ +\edef\next{\noexpand\ProvidesPackage{preview}% + [\next\space \pr@version\space (AUCTeX/preview-latex)]} +\next +\let\ifPreview\iffalse +\let\preview@delay=\@gobble +\let\pr@advise=\@gobbletwo +\long\def\pr@advise@ship#1#2#3{} +\def\pr@loadcfg#1{\InputIfFileExists{#1.cfg}{}{}} +\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{} +\DeclareOption{noconfig}{\let\pr@loadcfg=\@gobble} +\long\def\pr@addto@front#1#2{% + \toks@{#2}\toks@\expandafter{\the\expandafter\toks@#1}% + \xdef#1{\the\toks@}} +\DeclareOption{active}{% + \let\ifPreview\iftrue + \def\pr@advise#1{% + \expandafter\pr@adviseii\csname pr@\string#1\endcsname#1}% + \long\def\pr@advise@ship#1#2#3{\pr@advise#1{\pr@protect@ship{#2}{#3}}}% + \let\preview@delay\@firstofone} +\long\def\pr@adviseii#1#2#3{\preview@delay{% + \ifx#1\relax \let#1#2\fi + \toks@{#3#1}% + \ifx\@undefined\protected \else \protected\fi + \long\edef#2{\the\toks@}}} +\DeclareOption{delayed}{% + \ifPreview \def\preview@delay{\AtBeginDocument}\fi +} +\newif\ifpr@fixbb +\pr@fixbbfalse +\DeclareOption{psfixbb}{\ifPreview% + \pr@fixbbtrue + \newbox\pr@markerbox + \setbox\pr@markerbox\hbox{\special{psfile=/dev/null}}\fi +} +\let\pr@graphicstype=\z@ +\DeclareOption{dvips}{% + \let\pr@graphicstype\@ne + \preview@delay{\AtBeginDvi{% + \special{!/preview@version(\pr@version)def} + \special{!userdict begin/preview-bop-level 0 def% + /bop-hook{/preview-bop-level dup load dup 0 le{/isls false def% + /vsize 792 def/hsize 612 def}if 1 add store}bind def% + /eop-hook{/preview-bop-level dup load dup 0 gt{1 sub}if + store}bind def end}}}} +\DeclareOption{pdftex}{% + \let\pr@graphicstype\tw@} +\DeclareOption{xetex}{% + \let\pr@graphicstype\thr@@} +\begingroup +\catcode`\*=11 +\@firstofone{\endgroup +\DeclareOption{displaymath}{% + \preview@delay{\toks@{% + \pr@startbox{\noindent$$% + \aftergroup\pr@endbox\@gobbletwo}{$$}\@firstofone}% + \everydisplay\expandafter{\the\expandafter\toks@ + \expandafter{\the\everydisplay}}}% + \pr@advise@ship\equation{\begingroup\aftergroup\pr@endbox + \def\dt@ptrue{\m@ne=\m@ne}\noindent}% + {\endgroup}% + \pr@advise@ship\equation*{\begingroup\aftergroup\pr@endbox + \def\dt@ptrue{\m@ne=\m@ne}\noindent}% + {\endgroup}% + \PreviewOpen[][\def\dt@ptrue{\m@ne=\m@ne}\noindent#1]\[% + \PreviewClose\]% + \PreviewEnvironment[][\noindent#1]{eqnarray}% + \PreviewEnvironment[][\noindent#1]{eqnarray*}% + \PreviewEnvironment{displaymath}% +}} +\begingroup +\def\next#1#2{% + \endgroup + \DeclareOption{textmath}{% + \PreviewEnvironment{math}% + \preview@delay{\ifx#1\@undefined \let#1=$%$ + \fi\catcode`\$=\active + \ifx\xyreuncatcodes\@undefined\else + \edef\next{\catcode`@=\the\catcode`@\relax}% + \makeatother\expandafter\xyreuncatcodes\next\fi}% + \pr@advise@ship\(\pr@endaftergroup{}% \) + \pr@advise@ship#1{\@firstoftwo{\let#1=#2% + \futurelet\reserved@a\pr@textmathcheck}}{}}% + \def\pr@textmathcheck{\expandafter\pr@endaftergroup + \ifx\reserved@a#1{#2#2}\expandafter\@gobbletwo\fi#2}} +\lccode`\~=`\$ +\lowercase{\expandafter\next\expandafter~}% + \csname pr@\string$%$ + \endcsname +\DeclareOption{graphics}{% + \PreviewMacro[*[[!]{\includegraphics}%]] +} +\def\pr@floatfix#1#2{\ifx#1#2% + \ifx#1\@undefined\else + \PackageWarningNoLine{preview}{% +Your document class has a bad definition^^J +of \string#1, most likely^^J +\string\let\string#1=\string#2^^J +which has now been changed to^^J +\string\def\string#1{\string#2}^^J +because otherwise subsequent changes to \string#2^^J +(like done by several packages changing float behaviour)^^J +can't take effect on \string#1.^^J +Please complain to your document class author}% + \def#1{#2}\fi\fi} +\begingroup +\def\next#1#2{\endgroup + \DeclareOption{floats}{% + \pr@floatfix\endfigure\end@float + \pr@floatfix\endtable\end@float + \pr@floatfix#1\end@dblfloat + \pr@floatfix#2\end@dblfloat + \PreviewSnarfEnvironment[![]{@float}%] + \PreviewSnarfEnvironment[![]{@dblfloat}%] + }} +\expandafter\next\csname endfigure*\expandafter\endcsname + \csname endtable*\endcsname +\DeclareOption{sections}{% + \PreviewMacro[!!!!!!*[[!]{\@startsection}%]] + \PreviewMacro[*[[!]{\chapter}%]] +} +\DeclareOption* + {\InputIfFileExists{pr\CurrentOption.def}{}{\OptionNotUsed}} +\def\PreviewMacro{\@ifstar\pr@starmacro\pr@macro} +\long\def\pr@domacro#1#2{% + \long\def\next##1{#2}% + \pr@callafter\next#1]\pr@endparse} +\newcommand\pr@macro[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise@ship{##2}{\the\toks@{##1\noexpand\pr@endbox}}{}}% + \@ifnextchar[\next\pr@macroii} +\def\pr@macroii{\next[##1]} +\long\def\pr@endmacro#1{#1\pr@endbox} +\long\def\pr@protect@domacro#1#2{\pr@protect{% + \long\def\next##1{#2}% + \pr@callafter\next#1]\pr@endparse}} +\newcommand\pr@starmacro[1][]{\toks@{\pr@protect@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise##2{\the\toks@{##1}}}% + \@ifnextchar[\next{\next[]}} +\def\PreviewOpen{\@ifstar\pr@starmacro\pr@open} +\newcommand\pr@open[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise##2{\begingroup + \noexpand\pr@protect@ship + {\the\toks@{\begingroup\aftergroup\noexpand\pr@endbox##1}}% + {\endgroup}}}% + \@ifnextchar[\next\pr@macroii} +\def\PreviewClose{\@ifstar\pr@starmacro\pr@close} +\newcommand\pr@close[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\pr@advise{##2}{\the\toks@{##1\endgroup}}}% + \@ifnextchar[\next\pr@macroii} +\def\PreviewEnvironment{\@ifstar\pr@starenv\pr@env} +\newcommand\pr@starenv[1][]{\toks@{\pr@starmacro[{#1}]}% + \long\edef\next##1##2{% + \the\toks@[{##2}]##1}% + \begingroup\pr@starenvii} +\newcommand\pr@starenvii[2][]{\endgroup + \expandafter\next\csname#2\endcsname{#1}% + \expandafter\pr@starmacro\csname end#2\endcsname} +\newcommand\pr@env[1][]{% + \toks@{\pr@domacro{#1}}% + \long\edef\next[##1]##2{% + \noexpand\expandafter\noexpand\pr@advise@ship + \noexpand\csname##2\noexpand\endcsname{\the\toks@ + {\begingroup\aftergroup\noexpand\pr@endbox##1}}{\endgroup}}% + \@ifnextchar[\next\pr@macroii %] + } +\newcommand{\PreviewSnarfEnvironment}[2][]{% + \expandafter\pr@advise + \csname #2\endcsname{\pr@snarfafter{#1}}% + \expandafter\pr@advise + \csname end#2\endcsname{\pr@endsnarf}} +\let\pr@ship@start\@empty +\let\pr@ship@end\@empty +\newenvironment{preview}{\ignorespaces}{\ifhmode\unskip\fi} +\newenvironment{nopreview}{\ignorespaces}{\ifhmode\unskip\fi} +\ProcessOptions\relax +\ifPreview\else\expandafter\endinput\fi +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\newif\ifpr@outer +\pr@outertrue +\newcount\pr@snippet +\global\pr@snippet=1 +\def\pr@protect{\ifx\protect\@typeset@protect + \ifpr@outer \expandafter\expandafter\expandafter + \@secondoftwo\fi\fi\@gobble} +\def\pr@protect@ship{\pr@protect{\@firstoftwo\pr@startbox}% + \@gobbletwo} +\def\pr@insert{\begingroup\afterassignment\pr@insertii\count@} +\def\pr@insertii{\endgroup\setbox\pr@box\vbox} +\def\pr@mark{{\afterassignment}\toks@} +\def\pr@marks{{\aftergroup\pr@mark\afterassignment}\count@} +\newbox\pr@box +\long\def\pr@startbox#1#2{% + \ifpr@outer + \toks@{#2}% + \edef\pr@cleanup{\the\toks@}% + \setbox\pr@box\vbox\bgroup + \break + \pr@outerfalse\@arrayparboxrestore + \let\insert\pr@insert + \let\mark\pr@mark + \let\marks\pr@marks + \expandafter\expandafter\expandafter + \pr@ship@start + \expandafter\@firstofone + \else + \expandafter \@gobble + \fi{#1}} +\def\pr@endbox{% + \let\reserved@a\relax + \ifvmode \edef\reserved@a{\the\everypar}% + \ifx\reserved@a\@empty\else + \dimen@\prevdepth + \noindent\par + \setbox\z@\lastbox\unskip\unpenalty + \prevdepth\dimen@ + \setbox\z@\hbox\bgroup\penalty-\maxdimen\unhbox\z@ + \ifnum\lastpenalty=-\maxdimen\egroup + \else\egroup\box\z@ \fi\fi\fi + \ifhmode \par\unskip\setbox\z@\lastbox + \nointerlineskip\hbox{\unhbox\z@\/}% + \else \unskip\unpenalty\unskip \fi + \egroup + \setbox\pr@box\vbox{% + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \nointerlineskip + \splittopskip\z@skip\setbox\z@\vsplit\pr@box to\z@ + \unvbox\z@ + \nointerlineskip + %\color@setgroup + \box\pr@box + %\color@endgroup + }% + \pr@ship@end + {\let\protect\noexpand + \ifx\pr@offset@override\@undefined + \voffset=-\ht\pr@box + \hoffset=\z@ + \fi + \c@page=\pr@snippet + \pr@shipout + \ifpr@fixbb\hbox{% + \dimen@\wd\pr@box + \@tempdima\ht\pr@box + \@tempdimb\dp\pr@box + \box\pr@box + \llap{\raise\@tempdima\copy\pr@markerbox\kern\dimen@}% + \lower\@tempdimb\copy\pr@markerbox}% + \else \box\pr@box \fi}% + \global\advance\pr@snippet\@ne + \pr@cleanup +} +\def\pr@@shipout{\deadcycles\z@\bgroup\setbox\z@\box\voidb@x + \afterassignment\pr@shipoutegroup\setbox\z@} +\def\pr@shipoutegroup{\ifvoid\z@ \expandafter\aftergroup\fi \egroup} +\ifx\shipout\@undefined + \begingroup + \catcode`\:=10 + \catcode`\_=10 + \ifx\tex_shipout:D\@undefined + \PackageError{preview}{Cannot find \protect\shipout\space primitive}% + {preview needs to replace the \protect\shipout\space primitive with + its own routine to do its work. Due to packages or formats + interfering, it cannot be identified. Please report this.} + \else + \global\let\pr@shipout=\tex_shipout:D + \global\let\tex_shipout:D=\pr@@shipout + \fi + \endgroup +\else + \let\pr@shipout=\shipout + \let\shipout=\pr@@shipout +\fi +\def\pr@parseit#1{\csname pr@parse#1\endcsname} +\let\pr@endparse=\@percentchar +\def\next#1{% +\def\pr@callafter{% + \afterassignment\pr@parseit + \let#1= }} +\expandafter\next\csname pr@parse\pr@endparse\endcsname +\long\expandafter\def\csname pr@parse*\endcsname#1\pr@endparse#2{% + \begingroup\toks@{#1\pr@endparse{#2}}% + \edef\next##1{\endgroup##1\the\toks@}% + \@ifstar{\next{\pr@parse@*}}{\next\pr@parseit}} +\long\expandafter\def\csname pr@parse[\endcsname#1\pr@endparse#2{% + \begingroup\toks@{#1\pr@endparse{#2}}% + \edef\next##1{\endgroup##1\the\toks@}% + \@ifnextchar[{\next\pr@bracket}{\next\pr@parseit}} +\long\def\pr@bracket#1\pr@endparse#2[#3]{% + \pr@parseit#1\pr@endparse{#2[{#3}]}} +\expandafter\let\csname pr@parse]\endcsname=\pr@parseit +\long\def\pr@parse#1\pr@endparse#2#3{% + \pr@parseit#1\pr@endparse{#2{#3}}} +\expandafter\let\csname pr@parse!\endcsname=\pr@parse +\long\expandafter\def\csname pr@parse?\endcsname#1#2\pr@endparse#3{% + \begingroup\toks@{#2\pr@endparse{#3}}% + \@ifnextchar#1{\pr@parsecond\@firstoftwo}% + {\pr@parsecond\@secondoftwo}} +\def\pr@parsecond#1{\expandafter\endgroup + \expandafter\expandafter\expandafter\pr@parseit + \expandafter#1\the\toks@} + \long\def\pr@parse@#1#2\pr@endparse#3{% + \pr@parseit #2\pr@endparse{#3#1}} +\long\expandafter\def\csname pr@parse-\endcsname + #1\pr@endparse#2{\begingroup + \toks@{\endgroup\pr@parseit #1\pr@endparse{#2}}% + {\aftergroup\the\aftergroup\toks@ \afterassignment}% + \let\next= } +\long\expandafter\def\csname pr@parse:\endcsname + #1#2#3\pr@endparse#4{\begingroup + \toks@{\endgroup \pr@parseit#3\pr@endparse{#4}}% + \long\def\next#1{#2}% + \the\expandafter\toks@\next} +\long\expandafter\def\csname pr@parse#\endcsname + #1#2#3\pr@endparse#4{\begingroup + \toks@{#4}% + \long\edef\next##1{\toks@{\the\toks@##1}}% + \toks@{\endgroup \pr@parseit#3\pr@endparse}% + \long\def\reserved@a#1{{#2}}% + \the\expandafter\next\reserved@a} +\def\pr@endaftergroup#1{#1\aftergroup\pr@endbox} +\let\pr@endsnarf\relax +\long\def\pr@snarfafter#1{\ifpr@outer + \pr@ship@start + \let\pr@ship@start\relax + \let\pr@endsnarf\endgroup + \else + \let\pr@endsnarf\relax + \fi + \pr@protect{\pr@callafter\pr@startsnarf#1]\pr@endparse}} +\def\pr@startsnarf#1{#1\begingroup + \pr@startbox{\begingroup\aftergroup\pr@endbox}{\endgroup}% + \ignorespaces} +\renewenvironment{preview}{\begingroup + \pr@startbox{\begingroup\aftergroup\pr@endbox}% + {\endgroup}% + \ignorespaces}% + {\ifhmode\unskip\fi\endgroup} +\renewenvironment{nopreview}{\pr@outerfalse\ignorespaces}% + {\ifhmode\unskip\fi} +\newtoks\pr@output +\pr@output\output +\output{% + \pr@outerfalse + \let\@begindvi\@empty + \the\pr@output} +\let\output\pr@output +\def\pr@typeinfos{\typeout{Preview: Fontsize \f@size pt}% + \ifnum\mag=\@m\else\typeout{Preview: Magnification \number\mag}\fi + \ifx\pdfoutput\@undefined + \ifx\XeTeXversion\@undefined \else + % FIXME: The message should not be emitted if XeTeX does not produce + % PDF. There does not seem to be a primitive for that, though. + \typeout{Preview: PDFoutput 1}% + \fi + \else + \ifx\pdfoutput\relax \else + \ifnum\pdfoutput>\z@ + \typeout{Preview: PDFoutput 1}% + \fi + \fi + \fi +} +\AtBeginDocument{\pr@typeinfos} +\pr@loadcfg{prdefault} +\endinput +%% +%% End of file `preview.sty'. diff --git a/elpa/auctex-13.1.3/latex/prfootnotes.def b/elpa/auctex-13.1.3/latex/prfootnotes.def new file mode 100644 index 0000000..5831edf --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prfootnotes.def @@ -0,0 +1,28 @@ +%% +%% This is file `prfootnotes.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `footnotes') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prfootnotes.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\PreviewMacro[[!]\footnote %] +\endinput +%% +%% End of file `prfootnotes.def'. diff --git a/elpa/auctex-13.1.3/latex/prlyx.def b/elpa/auctex-13.1.3/latex/prlyx.def new file mode 100644 index 0000000..ac3397e --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prlyx.def @@ -0,0 +1,32 @@ +%% +%% This is file `prlyx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `lyx') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prlyx.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\pr@loadcfg{prlyx} +\g@addto@macro\pr@ship@end{\typeout{Preview: + Snippet \number\pr@snippet\space + \number\ht\pr@box\space \number\dp\pr@box \space\number\wd\pr@box}} +\endinput +%% +%% End of file `prlyx.def'. diff --git a/elpa/auctex-13.1.3/latex/prshowbox.def b/elpa/auctex-13.1.3/latex/prshowbox.def new file mode 100644 index 0000000..32a48d0 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prshowbox.def @@ -0,0 +1,32 @@ +%% +%% This is file `prshowbox.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `showbox') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prshowbox.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\AtEndOfPackage{% + \showboxbreadth\maxdimen + \showboxdepth\maxdimen} +\g@addto@macro\pr@ship@end{\showbox\pr@box} +\endinput +%% +%% End of file `prshowbox.def'. diff --git a/elpa/auctex-13.1.3/latex/prshowlabels.def b/elpa/auctex-13.1.3/latex/prshowlabels.def new file mode 100644 index 0000000..98ef0ef --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prshowlabels.def @@ -0,0 +1,67 @@ +%% +%% This is file `prshowlabels.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `showlabels') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prshowlabels.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\newbox\pr@labelbox +\def\pr@label#1{\pr@@label{#1}% + \ifpr@setbox\z@{#1}% + \global\setbox\pr@labelbox\vbox{\unvbox\pr@labelbox + \box\z@}\egroup\fi} +\def\ifpr@setbox#1#2{% + \romannumeral% + \ifx\protect\@typeset@protect\ifpr@outer\else + \z@\bgroup + \protected@edef\next{#2}\@onelevel@sanitize\next + \ifx\next\@empty\egroup\romannumeral\else + \ifx\next\pr@lastlabel\egroup\romannumeral\else + \global\let\pr@lastlabel\next + \setbox#1\pr@boxlabel\pr@lastlabel + \expandafter\expandafter\romannumeral\fi\fi\fi\fi + \z@\iffalse\iftrue\fi} +\def\pr@boxlabel#1{\hbox{\normalfont + \footnotesize\ttfamily\fboxsep0.4ex\relax\fbox{#1}}} +\def\pr@maketag#1{\pr@@maketag{#1}% + \ifpr@setbox\z@{\df@label}% + \global\setbox\pr@labelbox\vbox{% + \hrule\@width\wd\z@\@height\z@ + \unvbox\pr@labelbox}% + \wd\z@\z@\box\z@ \egroup\fi} +\g@addto@macro\pr@ship@start{% + \global\setbox\pr@labelbox\box\voidb@x + \xdef\pr@lastlabel{}% + \global\let\pr@@label\label \let\label\pr@label + \global\let\pr@@maketag\maketag@@@ + \let\maketag@@@\pr@maketag +} +\pr@addto@front\pr@ship@end{% + \ifx \label\pr@label \global\let\label\pr@@label \fi + \ifx \maketag@@@\pr@maketag + \global\let\maketag@@@\pr@@maketag \fi + \ifvoid\pr@labelbox + \else \setbox\pr@box\hbox{% + \box\pr@box\,\box\pr@labelbox}% + \fi} +\endinput +%% +%% End of file `prshowlabels.def'. diff --git a/elpa/auctex-13.1.3/latex/prtightpage.def b/elpa/auctex-13.1.3/latex/prtightpage.def new file mode 100644 index 0000000..34643d9 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prtightpage.def @@ -0,0 +1,146 @@ +%% +%% This is file `prtightpage.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `tightpage') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prtightpage.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifx\PreviewBorder\@undefined + \newdimen\PreviewBorder + \PreviewBorder=0.50001bp +\fi +\ifx\PreviewBbAdjust\@undefined + \def\PreviewBbAdjust{-\PreviewBorder -\PreviewBorder + \PreviewBorder \PreviewBorder} +\fi +\ifPreview\else\expandafter\endinput\fi +\def\pr@nextbb{\edef\next{\next\space\number\dimen@}% + \expandafter\xdef\csname pr@bb@% + \romannumeral\count@\endcsname{\the\dimen@}% + \advance\count@\@ne\ifnum\count@<5 + \afterassignment\pr@nextbb\dimen@=\fi} +\ifnum\pr@graphicstype=\z@ + \ifcase + \ifx\XeTeXversion\@undefined + \ifx\pdfoutput\@undefined \@ne\fi + \ifx\pdfoutput\relax \@ne\fi + \ifnum\pdfoutput>\z@ \tw@\fi \@ne + \else \thr@@\fi + \or \ExecuteOptions{dvips}\relax + \or \ExecuteOptions{pdftex}\relax + \or \ExecuteOptions{xetex}\relax\fi\fi +\global\let\pr@bbadjust\@empty +\pr@addto@front\pr@ship@end{\begingroup + \let\next\@gobble + \count@\@ne\afterassignment\pr@nextbb + \dimen@\PreviewBbAdjust + \ifx\pr@bbadjust\next + \else \global\let\pr@bbadjust\next + \typeout{Preview: Tightpage \pr@bbadjust}% + \fi\endgroup} +\ifcase\pr@graphicstype +\or + \g@addto@macro\pr@ship@end{\setbox\pr@box\hbox{% + \special{ps::\pr@bbadjust\space + \number\ifdim\ht\pr@box>\z@ \ht\pr@box + \else \z@ + \fi \space + \number\ifdim\dp\pr@box>\z@ \dp\pr@box + \else \z@ + \fi \space + \number\ifdim\wd\pr@box>\z@ \wd\pr@box + \else \z@ + \fi}\box\pr@box}} +\or + \g@addto@macro\pr@ship@end{{\dimen@\ht\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@\pr@bb@iv + \dimen@ii=\dimen@ + \global\pdfvorigin\dimen@ + \dimen@\dp\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@-\pr@bb@ii + \advance\dimen@\dimen@ii + \global\pdfpageheight\dimen@ + \dimen@\wd\pr@box + \ifdim\dimen@<\z@ \dimen@=\z@\fi + \advance\dimen@-\pr@bb@i + \advance\dimen@\pr@bb@iii + \global\pdfpagewidth\dimen@ + \global\pdfhorigin-\pr@bb@i}} +\or + \g@addto@macro\pr@ship@end{\dimen@\ht\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@\pr@bb@iv + \dimen@ii=\dimen@ + \voffset=-1in + \advance\voffset\dimen@ + \advance\voffset-\ht\pr@box + \dimen@\dp\pr@box + \ifdim\dimen@<\z@ \dimen@\z@\fi + \advance\dimen@-\pr@bb@ii + \advance\dimen@\dimen@ii + \global\pdfpageheight\dimen@ + \global\paperheight\dimen@ + \dimen@\wd\pr@box + \ifdim\dimen@<\z@ \dimen@=\z@\fi + \advance\dimen@-\pr@bb@i + \advance\dimen@\pr@bb@iii + \global\pdfpagewidth\dimen@ + \hoffset=-1in + \advance\hoffset-\pr@bb@i + \let\pr@offset@override\@empty} +\fi +\ifnum\pr@graphicstype=\@ne +\preview@delay{\AtBeginDvi{% + \special{!/preview@tightpage true def (% + compatibility PostScript comment for dvipng<=1.5 } + \special{!userdict begin/bop-hook{% + 7{currentfile token not{stop}if + 65781.76 div DVImag mul}repeat + 72 add 72 2 copy gt{exch}if 4 2 roll + neg 2 copy lt{exch}if dup 0 gt{pop 0 exch}% + {exch dup 0 lt{pop 0}if}ifelse 720 add exch 720 add + 3 1 roll + 4{5 -1 roll add 4 1 roll}repeat + <</PageSize[5 -1 roll 6 index sub 5 -1 roll 5 index sub]% + /PageOffset[7 -2 roll [1 1 dtransform exch]% + {0 ge{neg}if exch}forall]>>setpagedevice% + //bop-hook exec}bind def end} + \special{!userdict (some extra code to avoid + dvipng>=1.6 unknown special: + 7{currentfile token not{stop}if 65781.76 div })) pop} + \special{!userdict begin/bop-hook{% + preview-bop-level 0 le{% + 7{currentfile token not{stop}if + 65781.76 div DVImag mul}repeat + 72 add 72 2 copy gt{exch}if 4 2 roll + neg 2 copy lt{exch}if dup 0 gt{pop 0 exch}% + {exch dup 0 lt{pop 0}if}ifelse 720 add exch 720 add + 3 1 roll + 4{5 -1 roll add 4 1 roll}repeat + <</PageSize[5 -1 roll 6 index sub 5 -1 roll 5 index sub]% + /PageOffset[7 -2 roll [1 1 dtransform exch]% + {0 ge{neg}if exch}forall]>>setpagedevice}if% + //bop-hook exec}bind def end}}} +\fi +\endinput +%% +%% End of file `prtightpage.def'. diff --git a/elpa/auctex-13.1.3/latex/prtracingall.def b/elpa/auctex-13.1.3/latex/prtracingall.def new file mode 100644 index 0000000..ec6a839 --- /dev/null +++ b/elpa/auctex-13.1.3/latex/prtracingall.def @@ -0,0 +1,30 @@ +%% +%% This is file `prtracingall.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% preview.dtx (with options: `tracingall') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from prtracingall.def. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file preview.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% The preview style for extracting previews from LaTeX documents. +%% Developed as part of AUCTeX <URL:https://www.gnu.org/software/auctex/>. +\ifPreview\else\expandafter\endinput\fi +\pr@addto@front\pr@ship@start{\let\tracingonline\count@ + \let\errorstopmode\@empty\tracingall} +\endinput +%% +%% End of file `prtracingall.def'. diff --git a/elpa/auctex-13.1.3/multi-prompt.el b/elpa/auctex-13.1.3/multi-prompt.el new file mode 100644 index 0000000..b863271 --- /dev/null +++ b/elpa/auctex-13.1.3/multi-prompt.el @@ -0,0 +1,219 @@ +;;; multi-prompt.el --- Completing read of multiple strings -*- lexical-binding: t; -*- + +;; Copyright (C) 1996-2021 Free Software Foundation, Inc. + +;; Author: Per Abrahamsen <abraham@dina.kvl.dk> +;; Maintainer: auctex-devel@gnu.org +;; Created: 1996-08-31 +;; Keywords: extensions + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This package is written for use in emacs lisp programs, where the +;; user is prompted for a string of the form: +;; +;; FOO,BAR,BAZ +;; +;; where FOO, BAR, and BAZ are elements of some table. The function +;; `multi-prompt' is a replacement `completing-read' that will allow +;; the user to enter a string like the above, yet get completion on +;; all FOO, BAR, and BAZ. + +;;; Code: + +(defvar multi-prompt-found nil + "List of entries currently added during a `multi-prompt'.") + +;; FIXME: Modify all caller (including ones in reftex-auc.el) to use +;; more sophisticated crm.el. After that, we no longer need the +;; former half of this file. +;;;###autoload +(defun multi-prompt (separator + unique prompt table + &optional mp-predicate require-match initial history) + "Completing prompt for a list of strings. +The first argument SEPARATOR should be the string (of length 1) to +separate the elements in the list. The second argument UNIQUE should +be non-nil, if each element must be unique. The remaining elements +are the arguments to `completing-read'. See that." + (let ((old-map (if require-match + minibuffer-local-must-match-map + minibuffer-local-completion-map)) + (new-map (make-sparse-keymap))) + (set-keymap-parent new-map old-map) + (define-key new-map separator (if require-match + #'multi-prompt-next-must-match + #'multi-prompt-next)) + (define-key new-map "\C-?" #'multi-prompt-delete) + (let* ((minibuffer-local-completion-map new-map) + (minibuffer-local-must-match-map new-map) + (multi-prompt-found nil) + (filter (cond (unique + (lambda (x) + (and (not (member (car x) multi-prompt-found)) + (or (null mp-predicate) + (funcall mp-predicate x))))) + (mp-predicate))) + (answer (catch 'multi-prompt-exit + (while t + (let ((extra (catch 'multi-prompt-next + (throw 'multi-prompt-exit + (completing-read prompt + table + filter + require-match + initial + history))))) + (cond ((eq extra 'back) + (when multi-prompt-found + (setq prompt (substring + prompt 0 + (- 0 (length separator) + (length + (car multi-prompt-found)))) + initial (car multi-prompt-found)) + (setq multi-prompt-found + (cdr multi-prompt-found)))) + (t + (setq prompt (concat prompt extra separator) + initial nil) + (setq multi-prompt-found + (cons extra multi-prompt-found))))))))) + (if (string= answer "") + multi-prompt-found + (nreverse (cons answer multi-prompt-found)))))) + +(defun multi-prompt-delete () + (interactive) + (if (bobp) + (throw 'multi-prompt-next 'back) + (call-interactively #'backward-delete-char))) + +(defun multi-prompt-next () + (interactive) + (throw 'multi-prompt-next + (minibuffer-contents-no-properties))) + +(defun multi-prompt-next-must-match () + (interactive) + (when (call-interactively #'minibuffer-complete) + (let ((content (minibuffer-contents-no-properties))) + (when (or ;; (not require-match) + (assoc content minibuffer-completion-table)) + (throw 'multi-prompt-next content))))) + + +;;; Support for key=value completion + +;; The following code was ripped out of crm.el +;; (completing-read-multiple) and extended to support comma-separated +;; key=value lists. The code is separate from the code above. + +;; WARNING: This obviously relies on internals of crm.el and +;; minibuffer.el and will therefore have to be adapted if these +;; change. + +;; TODO: How to support stuff like "caption={[one]two}" or +;; "morekeywords={one,three,five}"? + +(defvar multi-prompt-key-value-sep "=" + "Single-character string separating key=value pairs.") +(defvar multi-prompt-completion-table nil + "Completion table used by `multi-prompt-key-value'.") + +(defun multi-prompt-key-value-collection-fn (string predicate flag) + "Function used by `multi-prompt-key-value' to compute completion values. +The value of STRING is the string to be completed. + +The value of PREDICATE is a function to filter possible matches, or +nil if none. + +The value of FLAG is used to specify the type of completion operation. +A value of nil specifies `try-completion'. A value of t specifies +`all-completions'. A value of lambda specifes a test for an exact match. + +For more information on STRING, PREDICATE, and FLAG, see the Elisp +Reference sections on 'Programmed Completion' and 'Basic Completion +Functions'." + (let ((beg 0) (last 0) matched) + (while (string-match multi-prompt-key-value-sep string beg) + (setq matched t + last beg + beg (match-end 0))) + (completion-table-with-context + (substring string 0 beg) + (if (not matched) + multi-prompt-completion-table + (cadr (assoc (substring string last (1- beg)) + multi-prompt-completion-table))) + (substring string beg) + predicate + flag))) + +(defun multi-prompt-expand-completion-table (table) + "Return an expanded version of completion table TABLE. +This is achieved by eval'ing all variables in the value parts of +the alist elements." + (mapcar (lambda (x) + (if (and (cadr x) (symbolp (cadr x)) (not (functionp (cadr x)))) + (cons (car x) (list (eval (cadr x) t))) + x)) + table)) + +;; Silence the byte compiler. +(defvar crm-local-must-match-map) +(defvar crm-local-completion-map) + +;;;###autoload +(defun multi-prompt-key-value + (prompt table &optional predicate require-match initial-input + hist def inherit-input-method) + "Read multiple strings, with completion and key=value support. +PROMPT is a string to prompt with, usually ending with a colon +and a space. TABLE is an alist. The car of each element should +be a string representing a key and the optional cdr should be a +list with strings to be used as values for the key. + +See the documentation for `completing-read' for details on the +other arguments: PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, +DEF, and INHERIT-INPUT-METHOD. + +The return value is the string as entered in the minibuffer." + (let* ((minibuffer-completion-table #'multi-prompt-key-value-collection-fn) + (minibuffer-completion-predicate predicate) + (minibuffer-completion-confirm + (unless (eq require-match t) require-match)) + (multi-prompt-completion-table + ;; Expand the table here because completion would otherwise + ;; interpret symbols in the table as functions. However, it + ;; would be nicer if this could be done during the actual + ;; completion in order to avoid walking through the whole + ;; table. + (multi-prompt-expand-completion-table table)) + (map (if require-match + crm-local-must-match-map + crm-local-completion-map)) + (input (read-from-minibuffer + prompt initial-input map + nil hist def inherit-input-method))) + (and def (string-equal input "") (setq input def)) + input)) + +(provide 'multi-prompt) + +;;; multi-prompt.el ends here diff --git a/elpa/auctex-13.1.3/multi-prompt.elc b/elpa/auctex-13.1.3/multi-prompt.elc Binary files differnew file mode 100644 index 0000000..4790093 --- /dev/null +++ b/elpa/auctex-13.1.3/multi-prompt.elc diff --git a/elpa/auctex-13.1.3/plain-tex.el b/elpa/auctex-13.1.3/plain-tex.el new file mode 100644 index 0000000..4f06a02 --- /dev/null +++ b/elpa/auctex-13.1.3/plain-tex.el @@ -0,0 +1,330 @@ +;;; plain-tex.el --- Support for plain TeX documents. -*- lexical-binding: t; -*- + +;; Copyright (C) 2010, 2013, 2016-2018, 2021-2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides support for plain TeX in AUCTeX. + +;;; Code: + +(require 'tex) + +;;; Tool bar + +(defcustom plain-TeX-enable-toolbar t + "Enable TeX tool bar in plain TeX mode." + :group 'TeX-tool-bar + :type 'boolean) + +(defun plain-TeX-maybe-install-toolbar () + "Conditionally install tool bar buttons for plain TeX mode. +Install tool bar if `plain-TeX-enable-toolbar' and +`tool-bar-mode' are non-nil." + (when (and plain-TeX-enable-toolbar tool-bar-mode) + ;; Defined in `tex-bar.el': + (TeX-install-toolbar))) + + +;;; Keymap and menu + +(defvar plain-TeX-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + map) + "Keymap used in plain TeX mode.") + +(defvar plain-TeX-menu-entries + `(["Macro..." TeX-insert-macro + :help "Insert a macro and possibly arguments"] + ["Complete" TeX-complete-symbol + :help "Complete the current macro"] + "-" + ("Insert Font" + ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] + ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] + ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] + ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] + ["Sans Serif" (TeX-font nil ?\C-f) :keys "C-c C-f C-f"] + ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] + ["Slanted" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] + ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"] + ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c C-f C-a"]) + ("Replace Font" + ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] + ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] + ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] + ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] + ["Sans Serif" (TeX-font t ?\C-f) :keys "C-u C-c C-f C-f"] + ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] + ["Slanted" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] + ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"] + ["Calligraphic" (TeX-font t ?\C-a) :keys "C-u C-c C-f C-a"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ["Comment or Uncomment Region" comment-or-uncomment-region + :help "Comment or uncomment the currently selected region"] + ["Comment or Uncomment Paragraph" TeX-comment-or-uncomment-paragraph + :help "Comment or uncomment the paragraph containing point"] + ,TeX-fold-menu + "-" . ,TeX-common-menu-entries)) + +(easy-menu-define plain-TeX-mode-command-menu + plain-TeX-mode-map + "Command menu used in TeX mode." + (TeX-mode-specific-command-menu 'plain-tex-mode)) + +(easy-menu-define plain-TeX-mode-menu + plain-TeX-mode-map + "Menu used in plain TeX mode." + (cons "TeX" plain-TeX-menu-entries)) + + +;;; The mode + +(defconst plain-TeX-dialect :plain-tex + "Default dialect for use with function `TeX-add-style-hook' for +argument DIALECT-EXPR when the hook is to be run only on +plain-TeX file, or any mode derived thereof. See variable +`TeX-style-hook-dialect'." ) + +(defcustom plain-TeX-mode-hook nil + "A hook run in plain TeX mode buffers." + :type 'hook + :group 'TeX-misc) + +(TeX-abbrev-mode-setup plain-tex-mode) + +;;;###autoload +(defun TeX-plain-tex-mode () + "Major mode in AUCTeX for editing plain TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{plain-TeX-mode-map} + +Entering `plain-tex-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `plain-TeX-mode-hook'." + (interactive) + (plain-TeX-common-initialization) + (setq major-mode 'plain-tex-mode) + (use-local-map plain-TeX-mode-map) + (setq TeX-base-mode-name "TeX") + (setq TeX-command-default "TeX") + (add-hook 'tool-bar-mode-hook #'plain-TeX-maybe-install-toolbar nil t) + (plain-TeX-maybe-install-toolbar) + (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook) + (TeX-set-mode-name)) + +(defun plain-TeX-common-initialization () + "Common initialization for plain TeX like modes." + (VirTeX-common-initialization) + (set-syntax-table TeX-mode-syntax-table) + (setq local-abbrev-table plain-tex-mode-abbrev-table) + (set (make-local-variable 'TeX-style-hook-dialect) plain-TeX-dialect) + (setq TeX-sentinel-default-function #'TeX-TeX-sentinel) + (setq paragraph-start + (concat + "\\(?:[ \t]*$" + "\\|" (regexp-quote TeX-esc) "par\\|" + "[ \t]*" + (regexp-quote TeX-esc) + "\\(?:" + "begin\\|end\\|part\\|chapter\\|" + "section\\|subsection\\|subsubsection\\|" + "paragraph\\|include\\|includeonly\\|" + "tableofcontents\\|appendix\\|label\\|caption\\|\\(?:item\\)?item" + "\\)" + "\\|" + "[ \t]*\\$\\$" ; display math delimitor + "\\)" )) + (setq paragraph-separate + (concat + "[ \t]*" + "\\(?:" + (regexp-quote TeX-esc) "par\\|" + "%\\|" + "$\\|" + "\\$\\$\\|" + (regexp-quote TeX-esc) + "\\(?:" + "begin\\|end\\|label\\|caption\\|part\\|chapter\\|" + "section\\|subsection\\|subsubsection\\|" + "paragraph\\|include\\|includeonly\\|" + "tableofcontents\\|appendix\\|" (regexp-quote TeX-esc) + "\\)" + "\\)")) + (setq TeX-header-end (regexp-quote "%**end of header")) + (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye"))) + (TeX-add-symbols + ;; From the TeX Book, Appendix B + ;; + ;; XXX: This should be refined and extended by somebody who is + ;; familiar with plain TeX. + "dag" + "ddag" + "copyright" + "TeX" + "dots" + "break" + "nobreak" + "allowbreak" + "hbox" + "slash" + "enskip" + "quad" + "qquad" + "enspace" + "thinspace" + "negthinspace" + "smallskip" + "medskip" + "bigskip" + "eject" + "supereject" + "goodbreak" + "filbreak" + "smallbreak" + "medbreak" + "bigbreak" + "hrulefill" + "dotfill" + "rightarrowfill" + "leftarrowfill" + "upbracefill" + "downbracefill" + "halign" + "valign" + "omit" + "span" + "multispan" + "centerline" + "rightline" + "leftline" + "line" + "par" + "noindent" + "frenchspacing" + "nonfrenchspacing" + "llap" + "rlap" + "raggedright" + "ttraggedright" + "raggedbottom" + "normalbottom" + "obeylines" + "obeyspaces" + "hsize" + "vsize" + "hoffset" + "voffset" + "tolerance" + "looseness" + "parindent" + "baselineskip" + "parskip") + (TeX-run-style-hooks "TEX")) + + +;;; Miscellaneous + +(defcustom plain-TeX-clean-intermediate-suffixes + TeX-clean-default-intermediate-suffixes + "List of regexps matching suffixes of intermediate files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom plain-TeX-clean-output-suffixes TeX-clean-default-output-suffixes + "List of regexps matching suffixes of output files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + + +;;; AmSTeX + +(defvar AmSTeX-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + map) + "Keymap used in `AmSTeX-mode'.") + +;; Menu for AmSTeX mode +(easy-menu-define AmSTeX-mode-command-menu + AmSTeX-mode-map + "Command menu used in AmSTeX mode." + (TeX-mode-specific-command-menu 'ams-tex-mode)) + +(easy-menu-define AmSTeX-mode-menu + AmSTeX-mode-map + "Menu used in AmSTeX mode." + (cons "AmS-TeX" plain-TeX-menu-entries)) + +(defcustom AmS-TeX-mode-hook nil + "A hook run in AmS-TeX mode buffers." + :type 'hook + :group 'TeX-misc) + +;;;###autoload +(defun ams-tex-mode () + "Major mode in AUCTeX for editing AmS-TeX files. +See info under AUCTeX for documentation. + +Special commands: +\\{AmSTeX-mode-map} + +Entering `ams-tex-mode' calls the value of `text-mode-hook', +then the value of `TeX-mode-hook', and then the value +of `AmS-TeX-mode-hook'." + (interactive) + (plain-TeX-common-initialization) + (setq major-mode 'ams-tex-mode) + (use-local-map AmSTeX-mode-map) + + (setq TeX-base-mode-name "AmS-TeX") + (setq TeX-command-default "AmSTeX") + (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'AmS-TeX-mode-hook) + (TeX-set-mode-name)) + +(defcustom AmSTeX-clean-intermediate-suffixes + TeX-clean-default-intermediate-suffixes + "List of regexps matching suffixes of intermediate files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom AmSTeX-clean-output-suffixes TeX-clean-default-output-suffixes + "List of regexps matching suffixes of output files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(provide 'plain-tex) + +;;; plain-tex.el ends here diff --git a/elpa/auctex-13.1.3/plain-tex.elc b/elpa/auctex-13.1.3/plain-tex.elc Binary files differnew file mode 100644 index 0000000..72413c8 --- /dev/null +++ b/elpa/auctex-13.1.3/plain-tex.elc diff --git a/elpa/auctex-13.1.3/preview-latex.info b/elpa/auctex-13.1.3/preview-latex.info new file mode 100644 index 0000000..b6aae47 --- /dev/null +++ b/elpa/auctex-13.1.3/preview-latex.info @@ -0,0 +1,2582 @@ +This is preview-latex.info, produced by makeinfo version 6.8 from +preview-latex.texi. + +This manual is for preview-latex, a LaTeX preview mode for AUCTeX +(version 13.1.3 from 2022-04-16). + + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2017-2019, 2021 +Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and no + Back-Cover Texts. A copy of the license is included in the section + entitled "GNU Free Documentation License." +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs +END-INFO-DIR-ENTRY + +INFO-DIR-SECTION TeX +START-INFO-DIR-ENTRY +* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs +END-INFO-DIR-ENTRY + + +File: preview-latex.info, Node: Top, Prev: (dir), Up: (dir) + +preview-latex +************* + +This manual may be copied under the conditions spelled out in *note +Copying this Manual::. + + preview-latex is a package embedding preview fragments into Emacs +source buffers under the AUCTeX editing environment for LaTeX. It uses +'preview.sty' for the extraction of certain environments (most notably +displayed formulas). Other applications of this style file are possible +and exist. + + The name of the package is really 'preview-latex', all in lowercase +letters, with a hyphen. If you typeset it, you can use a sans-serif +font to visually offset it. + +* Menu: + +* Copying:: Copying +* Introduction:: Getting started. +* Installation:: Make Install. +* Keys and lisp:: Key bindings and user-level lisp functions. +* Simple customization:: To make it fit in. +* Known problems:: When things go wrong. +* For advanced users:: Internals and more customizations. +* ToDo:: Future development. +* Frequently Asked Questions:: All about preview-latex +* Copying this Manual:: GNU Free Documentation License +* Index:: A menu of many topics. + + +File: preview-latex.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top + +Copying +******* + +For the conditions for copying parts of preview-latex, see the General +Public Licenses referred to in the copyright notices of the files, the +General Public Licenses accompanying them and the explanatory section in +*note (auctex)Copying::. + + This manual specifically is covered by the GNU Free Documentation +License (*note Copying this Manual::). + + +File: preview-latex.info, Node: Introduction, Next: Installation, Prev: Copying, Up: Top + +1 Introduction +************** + +Does your neck hurt from turning between previewer windows and the +source too often? This AUCTeX component will render your displayed +LaTeX equations right into the editing window where they belong. + + The purpose of preview-latex is to embed LaTeX environments such as +display math or figures into the source buffers and switch conveniently +between source and image representation. + +* Menu: + +* What use is it?:: +* Activating preview-latex:: +* Getting started:: +* Basic modes of operation:: +* More documentation:: +* Availability:: +* Contacts:: + + +File: preview-latex.info, Node: What use is it?, Next: Activating preview-latex, Prev: Introduction, Up: Introduction + +1.1 What use is it? +=================== + +WYSIWYG (what you see is what you get) sometimes is considered all the +rage, sometimes frowned upon. Do we really want it? Wrong question. +The right question is _what_ we want from it. Except when finetuning +the layout, we don't want to use printer fonts for on-screen text +editing. The low resolution and contrast of a computer screen render +all but the coarsest printer fonts (those for low-quality newsprint) +unappealing, and the margins and pagination of the print are not wanted +on the screen, either. On the other hand, more complex visual +compositions like math formulas and tables can't easily be taken in when +seen only in the source. preview-latex strikes a balance: it only uses +graphic renditions of the output for certain, configurable constructs, +does this only when told, and then right in the source code. Switching +back and forth between the source and preview is easy and natural and +can be done for each image independently. Behind the scenes of +preview-latex, a sophisticated framework of other programs like +'dvipng', Dvips and Ghostscript are employed together with a special +LaTeX style file for extracting the material of interest in the +background and providing fast interactive response. + + +File: preview-latex.info, Node: Activating preview-latex, Next: Getting started, Prev: What use is it?, Up: Introduction + +1.2 Activating preview-latex +============================ + +After installation, the package may need to be activated (and remember +to activate AUCTeX too). If preview-latex is installed via the Emacs +package manager (ELPA), activation should be automatic upon +installation. + + The usual activation (if it is not done automatically) would be + + (load "preview-latex.el" nil t t) + + If you still don't get a "Preview" menu in LaTeX mode in spite of +AUCTeX showing its "Command", your installation is broken. One possible +cause are duplicate Lisp files that might be detectable with 'M-x +list-load-path-shadows <RET>'. + + +File: preview-latex.info, Node: Getting started, Next: Basic modes of operation, Prev: Activating preview-latex, Up: Introduction + +1.3 Getting started +=================== + +Once activated, preview-latex and its documentation will be accessible +via its menus (note that preview-latex requires AUCTeX to be loaded). +When you have loaded a LaTeX document (a sample document 'circ.tex' is +included in the distribution, but most documents including math and/or +figures should do), you can use its menu or 'C-c C-p C-d' (for +'Preview/Document'). Previews will now be generated for various objects +in your document. You can use the time to take a short look at the +other menu entries and key bindings in the 'Preview' menu. You'll see +the previewed objects change into a roadworks sign when preview-latex +has determined just what it is going to preview. Note that you can +freely navigate the buffer while this is going on. When the process is +finished you will see the objects typeset in your buffer. + + It is a bad idea, however, to edit the buffer before the roadworks +signs appear, since that is the moment when the correlation between the +original text and the buffer locations gets established. If the buffer +changes before that point of time, the previews will not be placed where +they belong. If you do want to change some obvious error you just +spotted, we recommend you stop the background process by pressing 'C-c +C-k'. + + To see/edit the LaTeX code for a specific object, put the point (the +cursor) on it and press 'C-c C-p C-p' (for 'Preview/at point'). It will +also do to click with the middle mouse button on the preview. Now you +can edit the code, and generate a new preview by again pressing 'C-c C-p +C-p' (or by clicking with the middle mouse button on the icon before the +edited text). + + If you are using the 'desktop' package, previews will remain from one +session to the next as long as you don't kill your buffer. + + +File: preview-latex.info, Node: Basic modes of operation, Next: More documentation, Prev: Getting started, Up: Introduction + +1.4 Basic modes of operation +============================ + +preview-latex has a number of methods for generating its graphics. Its +default operation is equivalent to using the 'LaTeX' command from +AUCTeX. If this happens to be a call of PDFLaTeX generating PDF output +(you need at least AUCTeX 11.51 for this), then Ghostscript will be +called directly on the resulting PDF file. If a DVI file gets produced, +first Dvips and then Ghostscript get called by default. + + The image type to be generated by Ghostscript can be configured with + + M-x customize-option <RET> preview-image-type <RET> + +The default is 'png' (the most efficient image type). A special setting +is 'dvipng' in case you have the 'dvipng' program installed. In this +case, 'dvipng' will be used for converting DVI files and Ghostscript +(with a 'PNG' device) for converting PDF files. 'dvipng' is much faster +than the combination of Dvips and Ghostscript. You can get downloads, +access to its CVS archive and further information from its project site +(https://savannah.nongnu.org/projects/dvipng). + + +File: preview-latex.info, Node: More documentation, Next: Availability, Prev: Basic modes of operation, Up: Introduction + +1.5 More documentation +====================== + +After the installation, documentation in the form of this info manual +will be available. You can access it with the standalone info reader +with + + info preview-latex + +or by pressing 'C-h i d m preview-latex <RET>' in Emacs. Once +preview-latex is activated, you can instead use 'C-c C-p <TAB>' (or the +menu entry 'Preview/Read documentation'). + + Depending on your installation, a printable manual may also be +available in the form of 'preview-latex.pdf'. + + Detailed documentation for the LaTeX style used for extracting the +preview images is placed in 'preview.pdf' in a suitable directory during +installation; on typical TeX Live-based systems, + + texdoc preview + +will display it. + + +File: preview-latex.info, Node: Availability, Next: Contacts, Prev: More documentation, Up: Introduction + +1.6 Availability +================ + +The preview-latex project is now part of AUCTeX and accessible as part +of the AUCTeX project page (https://savannah.gnu.org/projects/auctex). +You can get its files from the AUCTeX download area +(https://ftp.gnu.org/pub/gnu/auctex/). As of AUCTeX 11.81, +preview-latex should already be integrated into AUCTeX, so no separate +download will be necessary. + + Anonymous Git is available at <git://git.savannah.gnu.org/auctex.git> +or <https://git.savannah.gnu.org/git/auctex.git>. You can also browse +the repository (https://git.savannah.gnu.org/cgit/auctex.git) via web +interface. + + +File: preview-latex.info, Node: Contacts, Prev: Availability, Up: Introduction + +1.7 Contacts +============ + +Bug reports should be sent by using 'M-x preview-report-bug <RET>', as +this will fill in a lot of information interesting to us. If the +installation fails (but this should be a rare event), report bugs to +<bug-auctex@gnu.org>. + + There is a general discussion list for AUCTeX which also covers +preview-latex, look at <https://lists.gnu.org/mailman/listinfo/auctex>. +For more information on the mailing list, send a message with just the +word "help" as subject or body to <auctex-request@gnu.org>. For the +developers, there is the <auctex-devel@gnu.org> list; it would probably +make sense to direct feature requests and questions about internal +details there. There is a low-volume read-only announcement list +available to which you can subscribe by sending a mail with "subscribe" +in the subject to <info-auctex-request@gnu.org>. + + Offers to support further development will be appreciated. If you +want to show your appreciation with a donation to the main developer, +you can do so via PayPal to <dak@gnu.org>, and of course you can arrange +for service contracts or for added functionality. Take a look at the +'TODO' list for suggestions in that area. + + +File: preview-latex.info, Node: Installation, Next: Keys and lisp, Prev: Introduction, Up: Top + +2 Installation +************** + +Installation is now being covered in *note (auctex)Installation::. + + +File: preview-latex.info, Node: Keys and lisp, Next: Simple customization, Prev: Installation, Up: Top + +3 Key bindings and user-level lisp functions +******************************************** + +preview-latex adds key bindings starting with 'C-c C-p' to the supported +modes of AUCTeX (*Note (auctex)Key Index::). It will also add its own +'Preview' menu in the menu bar, as well as an icon in the toolbar. + + The following only describes the interactive use: view the +documentation strings with 'C-h f' if you need the Lisp information. + +'C-c C-p C-p' +'preview-at-point' +Preview/Generate previews (or toggle) at point + If the cursor is positioned on or inside of a preview area, this + toggles its visibility, regenerating the preview if necessary. If + not, it will run the surroundings through preview. The + surroundings include all areas up to the next valid preview, unless + invalid previews occur before, in which case the area will include + the last such preview in either direction. And overriding any + other action, if a region is active ('transient-mark-mode'), it is + run through 'preview-region'. + +'<mouse-2>' + The middle mouse button has a similar action bound to it as + 'preview-at-point', only that it knows which preview to apply it to + according to the position of the click. You can click either + anywhere on a previewed image, or when the preview is opened and + showing the source text, you can click on the icon preceding the + source text. In other areas, the usual mouse key action + (typically: paste) is not affected. + +'<mouse-3>' + The right mouse key pops up a context menu with several options: + toggling the preview, regenerating it, removing it (leaving the + unpreviewed text), copying the text inside of the preview, and + copying it in a form suitable for copying as an image into a mail + or news article. This is a one-image variant of the following + command: + +'C-c C-p C-w' +'preview-copy-region-as-mml' +Copy a region as MML + This command is also available as a variant in the context menu on + the right mouse button (where the region is the preview that has + been clicked on). It copies the current region into the kill + buffer in a form suitable for copying as a text including images + into a mail or news article using mml-mode (*note Composing: + (emacs-mime)Composing.). + + If you regenerate or otherwise kill the preview in its source + buffer before the mail or news gets posted, this will fail. Also + you should generate images you want to send with + 'preview-transparent-border' set to 'nil', or the images will have + an ugly border. preview-latex detects this condition and asks + whether to regenerate the region with borders switched off. As + this is an asynchronous operation running in the background, you'll + need to call this command explicitly again to get the newly + generated images into the kill ring. + + Preview your articles with 'mml-preview' (on 'C-c C-m P') to make + sure they look fine. + +'C-c C-p C-e' +'preview-environment' +Preview/Generate previews for environment + Run preview on LaTeX environment. The environments in + 'preview-inner-environments' are treated as inner levels so that + for instance, the 'split' environment in + '\begin{equation}\begin{split}...\end{split}\end{equation}' is + properly displayed. If called with a numeric argument, the + corresponding number of outward nested environments is treated as + inner levels. + +'C-c C-p C-s' +'preview-section' +Preview/Generate previews for section + Run preview on this LaTeX section. + +'C-c C-p C-r' +'preview-region' +Preview/Generate previews for region + Run preview on current region. + +'C-c C-p C-b' +'preview-buffer' +Preview/Generate previews for buffer + Run preview on the current buffer. + +'C-c C-p C-d' +'preview-document' +Preview/Generate previews for document + Run preview on the current document. + +'C-c C-p C-c C-p' +'preview-clearout-at-point' +Preview/Remove previews at point + Clear out (remove) the previews that are immediately adjacent to + point. + +'C-c C-p C-c C-s' +'preview-clearout-section' +Preview/Remove previews from section + Clear out all previews in current section. + +'C-c C-p C-c C-r' +'preview-clearout' +Preview/Remove previews from region + Clear out all previews in the current region. + +'C-c C-p C-c C-b' +'preview-clearout-buffer' +Preview/Remove previews from buffer + Clear out all previews in current buffer. This makes the current + buffer lose all previews. + +'C-c C-p C-c C-d' +'preview-clearout-document' +Preview/Remove previews from document + Clear out all previews in current document. The document consists + of all buffers that have the same master file as the current + buffer. This makes the current document lose all previews. + +'C-c C-p C-f' +'preview-cache-preamble' +Preview/Turn preamble cache on + Dump a pregenerated format file. For the rest of the session, this + file is used when running on the same master file. Use this if you + know your LaTeX takes a long time to start up, the speedup will be + most noticeable when generating single or few previews. If you + change your preamble, do this again. preview-latex will try to + detect the necessity of that automatically when editing changes to + the preamble are done from within Emacs, but it will not notice if + the preamble effectively changes because some included file or + style file is tampered with. + + Note that support for preamble cache is limited for LaTeX variants. + c.f. <https://github.com/davidcarlisle/dpctex/issues/15> + * XeLaTeX cannot use preamble cache at all. The reason is + intrinsic in XeLaTeX, so preview-latex can't help. + * LuaLaTeX works with preamble cache only when the preamble is + simple enough, i.e., when it doesn't load opentype fonts and + it doesn't use lua codes in preamble. + +'C-c C-p C-c C-f' +'preview-cache-preamble-off' +Preview/Turn preamble cache off + Clear the pregenerated format file and stop using preambles for the + current document. If the caching gives you problems, use this. + +'C-c C-p C-i' +'preview-goto-info-page' +Preview/Read Documentation + Read this info manual. + +'M-x preview-report-bug <RET>' +'preview-report-bug' +Preview/Report Bug + This is the preferred way of reporting bugs as it will fill in what + version of preview-latex you are using as well as versions of + relevant other software, and also some of the more important + settings. Please use this method of reporting, if at all possible + and before reporting a bug, have a look at *note Known problems::. + +'C-c C-k' +LaTeX/TeX Output/Kill Job + Kills the preview-generating process. This is really an AUCTeX + keybinding, but it is included here as a hint. If you are + generating a preview and then make a change to the buffer, + preview-latex may be confused and place the previews wrong. + + +File: preview-latex.info, Node: Simple customization, Next: Known problems, Prev: Keys and lisp, Up: Top + +4 Simple customization +********************** + +Customization options can be found by typing 'M-x customize-group <RET> +preview <RET>'. Remember to set the option when you have changed it. +The list of suggestions can be made very long (and is covered in detail +in *note For advanced users::), but some are: + + * Change the color of the preview background + + If you use a non-white background in Emacs, you might have color + artifacts at the edges of your previews. Playing around with the + option 'preview-transparent-color' in the 'Preview Appearance' + group might improve things. With some settings, the cursor may + cover the whole background of a preview, however. + + This option is specific to the display engine in use. + + * Showing '\label's + + When using preview-latex, the '\label's are hidden by the previews. + It is possible to make them visible in the output by using the + LaTeX package 'showkeys' alternatively 'showlabels'. However, the + boxes of these labels will be outside the region preview-latex + considers as the preview image. To enable a similar mechanism + internal to preview-latex, enable the 'showlabels' option in the + variable 'preview-default-option-list' in the 'Preview Latex' + group. + + It must be noted, however, that a much better idea may be to use + the RefTeX package for managing references. *Note RefTeX in a + Nutshell: (reftex)RefTeX in a Nutshell. + + * Open previews automatically + + The current default is to open previews automatically when you + enter them with cursor left/right motions. Auto-opened previews + will close again once the cursor leaves them again (this is also + done when doing incremental search, or query-replace operations), + unless you changed anything in it. In that case, you will have to + regenerate the preview (via e.g., 'C-c C-p C-p'). Other options + for 'preview-auto-reveal' are available via 'customize'. + + * Automatically cache preambles + + Currently preview-latex asks you whether you want to cache the + document preamble (everything before '\begin{document}') before it + generates previews for a buffer the first time. Caching the + preamble will significantly speed up regeneration of previews. The + larger your preamble is, the more this will be apparent. Once a + preamble is cached, preview-latex will try to keep track of when it + is changed, and dump a fresh format in that case. If you + experience problems with this, or if you want it to happen without + asking you the first time, you can customize the variable + 'preview-auto-cache-preamble'. + + * Attempt to keep counters accurate when editing + + Since preview-latex frequently runs only small regions through + LaTeX, values like equation counters are not consistent from run to + run. If this bothers you, customize the variable + 'preview-preserve-counters' to 't' (this is consulted by + 'preview-required-option-list'). LaTeX will then output a load of + counter information during compilation, and this information will + be used on subsequent updates to keep counters set to useful + values. The additional information takes additional time to + analyze, but this is relevant mostly only when you are regenerating + all previews at once, and maybe you will be less tempted to do so + when counters appear more or less correct. + + * Preview your favourite LaTeX constructs + + If you have a certain macro or environment that you want to + preview, first check if it can be chosen by cutomizing + 'preview-default-option-list' in the 'Preview Latex' group. + + If it is not available there, you can add it to + 'preview-default-preamble' also in the 'Preview Latex' group, by + adding a '\PreviewMacro' or '\PreviewEnvironment' entry (*note + Provided commands::) _after_ the '\RequirePackage' line. For + example, if you want to preview the 'center' environment, press the + <Show> button and the last <INS> button, then add + + \PreviewEnvironment{center} + in the space that just opened. Note that since 'center' is a + generic formatting construct of LaTeX, a general configuration like + that is not quite prudent. You better to do this on a per-document + base so that it is easy to disable this behavior when you find this + particular entry gives you trouble. + + One possibility is to save such settings in the corresponding + file-local variable instead of your global configuration (*note + Local Variables in Files: (emacs)File Variables.). A perhaps more + convenient place for such options would be in a configuration file + in the same directory with your project (*note Package options::). + + The usual file for preview-latex preconfiguration is + 'prauctex.cfg'. If you also want to keep the systemwide defaults, + you should add a line + + \InputIfFileExists{preview/prauctex.cfg}{}{} + to your own version of 'prauctex.cfg' (this is assuming that global + files relating to the 'preview' package are installed in a + subdirectory 'preview', the default behavior). + + * Don't preview inline math + + If you have performance problems because your document is full of + inline math ('$...$'), or if your usage of '$' conflicts with + preview-latex's, you can turn off inline math previews. In the + 'Preview Latex' group, remove 'textmath' from + 'preview-default-option-list' by customizing this variable. + + +File: preview-latex.info, Node: Known problems, Next: For advanced users, Prev: Simple customization, Up: Top + +5 Known problems +**************** + +A number of issues are known concerning the interoperation with various +other software. Some of the known problems can be solved by moving to +newer versions of the problematic software or by simple patches. + +* Menu: + +* Font problems with Dvips:: +* Too small bounding boxes:: +* x-symbol interoperation:: +* Middle-clicks paste instead of toggling:: +* No images are displayed with gs 9.27 and earlier:: + + If you find something not mentioned here, please send a bug report +using 'M-x preview-report-bug <RET>', which will fill in a lot of +information interesting to us and send it to the <bug-auctex@gnu.org> +list. Please use the bug reporting commands if at all possible. + + +File: preview-latex.info, Node: Font problems with Dvips, Next: Too small bounding boxes, Up: Known problems + +5.1 Font problems with Dvips +============================ + +Some fonts have been reported to produce wrong characters with +preview-latex. preview-latex calls Dvips by default with the option +'-Pwww' in order to get scalable fonts for nice results. If you are +using antialiasing, however, the results might be sufficiently nice with +bitmapped fonts, anyway. You might try '-Ppdf' for another stab at +scalable fonts, or other printer definitions. Use + + 'M-x customize-option <RET> preview-fast-dvips-command <RET>' +and + 'M-x customize-option <RET> preview-dvips-command <RET>' +in order to customize this. + + One particular problem is that several printer setup files (typically +in a file called '/usr/share/texmf/dvips/config/config.pdf' if you are +using the '-Ppdf' switch) contain the 'G' option for 'character +shifting'. This option will result in 'fi' being rendered as '£' +(British Pounds sign) in several fonts, unless your version of Dvips has +a long-standing bug in its implementation fixed (only very recent +versions of Dvips have). + + +File: preview-latex.info, Node: Too small bounding boxes, Next: x-symbol interoperation, Prev: Font problems with Dvips, Up: Known problems + +5.2 Too small bounding boxes +============================ + +The bounding box of a preview is determined by the LaTeX package using +the pure TeX bounding boxes. If there is material extending outside of +the TeX box, that material will be missing from the preview image. This +happens for the label-showing boxes from the 'showkeys' package. This +particular problem can be circumvented by using the 'showlabels' option +of the preview package. + + In general, you should try to fix the problem in the TeX code, like +avoiding drawing outside of the picture with PSTricks. + + One possible remedy is to set 'preview-fast-conversion' to 'Off' +(*note The Emacs interface::). The conversion will take more time, but +will then use the bounding boxes from EPS files generated by Dvips. + + Dvips generally does not miss things, but it does not understand +PostScript constructs like '\resizebox' or '\rotate' commands, so will +generate rather wrong boxes for those. Dvips can be helped with the +'psfixbb' package option to preview (*note The LaTeX style file::), +which will tag the corners of the included TeX box. This will mostly be +convenient for _pure_ PostScript stuff like that created by PSTricks, +which Dvips would otherwise reserve no space for. + + +File: preview-latex.info, Node: x-symbol interoperation, Next: Middle-clicks paste instead of toggling, Prev: Too small bounding boxes, Up: Known problems + +5.3 x-symbol interoperation +=========================== + +Thanks to the work of Christoph Wedler, starting with version +'4.0h/beta' of x-symbol, the line parsing of AUCTeX and preview-latex is +fully supported. Earlier versions exhibit problems. However, versions +before '4.2.2' will cause a drastic slowdown of preview-latex's parsing +pass, so we don't recommend to use versions earlier than that. + + If you wonder what x-symbol is, it is a package that transforms +various tokens and subscripts to a more readable form while editing and +offers a few input methods handy especially for dealing with math. Take +a look at <http://x-symbol.sourceforge.net/>. + + x-symbol versions up to '4.5.1-beta' at least require an 8bit-clean +TeX implementation (meaning that its terminal output should not use +'^^'-started escape sequences) for cooperation with preview-latex. +Later versions may get along without it, like preview-latex does now. + + If you experience problems with 'circ.tex' in connection with both +x-symbol and Latin-1 characters, you may need to change your language +environment or, as a last resort, customize the variable +'LaTeX-command-style' by replacing the command 'latex' with 'latex +-translate-file=cp8bit'. + + +File: preview-latex.info, Node: Middle-clicks paste instead of toggling, Next: No images are displayed with gs 9.27 and earlier, Prev: x-symbol interoperation, Up: Known problems + +5.4 Middle-clicks paste instead of toggling +=========================================== + +This is probably the fault of your favorite package. 'isearch.el' is +known to be affected while searches are in progress, but the code is +such a complicated mess that no patch is in sight. Better just end the +search with '<RET>' before toggling and resume with 'C-s C-s' or similar +afterwards. Since previews over the current match will auto-open, +anyway, this should not be much of a problem in practice. + + +File: preview-latex.info, Node: No images are displayed with gs 9.27 and earlier, Prev: Middle-clicks paste instead of toggling, Up: Known problems + +5.5 No images are displayed with gs 9.27 and earlier +==================================================== + +preview-latex tries to adjust the foreground and background colors of +generated images to those of Emacs. Unfortunately, incompatible changes +introduced in Ghostscript 9.27 breaks the traditional method partially, +and preview-latex can display no images under certain circumstances. + + A new method implemented alternatively works only with Ghostscript > +9.27. If you are using Ghostscript 9.27 or earlier, customize the +option 'preview-pdf-adjust-color-method'. + + -- User Option: preview-pdf-adjust-color-method + Method to adjust colors of images generated from PDF. It is not + consulted when the LaTeX command produces DVI files. + + When the option is 't' (default), preview-latex adjusts the FG and + BG colors of the generated images by the new method. This method + requires that Ghostscript has working 'DELAYBIND' feature, thus is + invalid with gs 9.27 (and possibly < 9.27). + + When it is 'compatible', preview-latex uses traditional method. + This option is provided for backward compatibility with older gs. + See the below explanation for detail. + + When 'nil', no adjustment is done and "black on white" image is + generated regardless of Emacs color. This is provided for fallback + for gs 9.27 users with customized foreground color. See the below + explanation for detail. + + When the LaTeX command produces PDF rather than DVI and Emacs has + non-trivial foreground color, the traditional method ('compatible') + makes gs >= 9.27 to stop with error. Here, "non-trivial foreground + color" includes customized themes. + + If you use such non-trivial foreground color and the version of + Ghostscript equals to 9.27, you have two options: + 1. Choose the value 'compatible' and customize + 'preview-reference-face' to have default (black) foreground + color. This makes the generated image almost non-readable on + dark background, so the next option would be your only choice + in that case. + 2. Choose the value 'nil', which forces plain "black on white" + appearance for the generated image. You can at least read + what are written in the image although they may not match with + your Emacs color well. + + The default value used to be 'compatible' for short period before + Ghostscript 9.50 was released but now is 't'. + + +File: preview-latex.info, Node: For advanced users, Next: ToDo, Prev: Known problems, Up: Top + +6 For advanced users +******************** + +This package consists of two parts: a LaTeX style that splits the output +into appropriate parts with one preview object on each page, and an +Emacs-lisp part integrating the thing into Emacs (aided by AUCTeX). + +* Menu: + +* The LaTeX style file:: +* The Emacs interface:: +* The preview images:: +* Misplaced previews:: + + +File: preview-latex.info, Node: The LaTeX style file, Next: The Emacs interface, Prev: For advanced users, Up: For advanced users + +6.1 The LaTeX style file +======================== + +The main purpose of this package is the extraction of certain +environments (most notably displayed formulas) from LaTeX sources as +graphics. This works with DVI files postprocessed by either Dvips and +Ghostscript or dvipng, but it also works when you are using PDFTeX for +generating PDF files (usually also postprocessed by Ghostscript). + + Current uses of the package include the preview-latex package for +WYSIWYG functionality in the AUCTeX editing environment, generation of +previews in LyX, as part of the operation of the pst-pdf package, the +tbook XML system and some other tools. + + Producing EPS files with Dvips and its derivatives using the '-E' +option is not a good alternative: People make do by fiddling around with +'\thispagestyle{empty}' and hoping for the best (namely, that the +specified contents will indeed fit on single pages), and then trying to +guess the baseline of the resulting code and stuff, but this is at best +dissatisfactory. The preview package provides an easy way to ensure +that exactly one page per request gets shipped, with a well-defined +baseline and no page decorations. While you still can use the preview +package with the 'classic' + + dvips -E -i + +invocation, there are better ways available that don't rely on Dvips not +getting confused by PostScript specials. + + For most applications, you'll want to make use of the 'tightpage' +option. This will embed the page dimensions into the PostScript or PDF +code, obliterating the need to use the '-E -i' options to Dvips. You +can then produce all image files with a single run of Ghostscript from a +single PDF or PostScript (as opposed to EPS) file. + + Various options exist that will pass TeX dimensions and other +information about the respective shipped out material (including +descender size) into the log file, where external applications might +make use of it. + + The possibility for generating a whole set of graphics with a single +run of Ghostscript (whether from LaTeX or PDFLaTeX) increases both speed +and robustness of applications. It is also feasible to use dvipng on a +DVI file with the options + + -picky -noghostscript + +to omit generating any image file that requires Ghostscript, then let a +script generate all missing files using Dvips/Ghostscript. This will +usually speed up the process significantly. + +* Menu: + +* Package options:: +* Provided commands:: + + +File: preview-latex.info, Node: Package options, Next: Provided commands, Prev: The LaTeX style file, Up: The LaTeX style file + +6.1.1 Package options +--------------------- + +The package is included with the customary + + \usepackage[OPTIONS]{preview} + +You should usually load this package as the last one, since it redefines +several things that other packages may also provide. + + The following options are available: + +'active' + is the most essential option. If this option is not specified, the + 'preview' package will be inactive and the document will be typeset + as if the 'preview' package were not loaded, except that all + declarations and environments defined by the package are still + legal but have no effect. This allows defining previewing + characteristics in your document, and only activating them by + calling LaTeX as + + latex '\PassOptionsToPackage{active}{preview} \input{FILENAME}' + +'noconfig' + Usually the file 'prdefault.cfg' gets loaded whenever the 'preview' + package gets activated. 'prdefault.cfg' is supposed to contain + definitions that can cater for otherwise bad results, for example, + if a certain document class would otherwise lead to trouble. It + also can be used to override any settings made in this package, + since it is loaded at the very end of it. In addition, there may + be configuration files specific for certain 'preview' options like + 'auctex' which have more immediate needs. The 'noconfig' option + suppresses loading of those option files, too. +'psfixbb' + Dvips determines the bounding boxes from the material in the DVI + file it understands. Lots of PostScript specials are not part of + that. Since the TeX boxes do not make it into the DVI file, but + merely characters, rules and specials do, Dvips might include far + too small areas. The option 'psfixbb' will include '/dev/null' as + a graphic file in the ultimate upper left and lower right corner of + the previewed box. This will make Dvips generate an appropriate + bounding box. +'dvips' + If this option is specified as a class option or to other packages, + several packages pass things like page size information to Dvips, + or cause crop marks or draft messages written on pages. This + seriously hampers the usability of previews. If this option is + specified, the changes will be undone if possible. +'pdftex' + If this option is set, PDFTeX is assumed as the output driver. + This mainly affects the 'tightpage' option. +'xetex' + If this option is set, XeTeX is assumed as the output driver. This + mainly affects the 'tightpage' option. +'displaymath' + will make all displayed math environments subject to preview + processing. This will typically be the most desired option. +'floats' + will make all float objects subject to preview processing. If you + want to be more selective about what floats to pass through to a + preview, you should instead use the '\PreviewSnarfEnvironment' + command on the floats you want to have previewed. +'textmath' + will make all text math subject to previews. Since math mode is + used throughly inside of LaTeX even for other purposes, this works + by redefining '\(', '\)' and '$' and the 'math' environment + (apparently some people use that). Only occurences of these text + math delimiters in later loaded packages and in the main document + will thus be affected. +'graphics' + will subject all '\includegraphics' commands to a preview. +'sections' + will subject all section headers to a preview. +'delayed' + will delay all activations and redefinitions the 'preview' package + makes until '\''begin{document}'. The purpose of this is to cater + for documents which should be subjected to the 'preview' package + without having been prepared for it. You can process such + documents with + + latex '\RequirePackage[active,delayed,OPTIONS]{preview} + \input{FILENAME}' + + This relaxes the requirement to be loading the 'preview' package as + last package. +DRIVER + loads a special driver file 'prDRIVER.def'. The remaining options + are implemented through the use of driver files. +'auctex' + This driver will produce fake error messages at the start and end + of every preview environment that enable the Emacs package + preview-latex in connection with AUCTeX to pinpoint the exact + source location where the previews have originated. Unfortunately, + there is no other reliable means of passing the current TeX input + position _in_ a line to external programs. In order to make the + parsing more robust, this option also switches off quite a few + diagnostics that could be misinterpreted. + + You should not specify this option manually, since it will only be + needed by automated runs that want to parse the pseudo error + messages. Those runs will then use '\PassOptionsToPackage' in + order to effect the desired behaviour. In addition, 'prauctex.cfg' + will get loaded unless inhibited by the 'noconfig' option. This + caters for the most frequently encountered problematic commands. +'showlabels' + During the editing process, some people like to see the label names + in their equations, figures and the like. Now if you are using + Emacs for editing, and in particular preview-latex, I'd strongly + recommend that you check out the RefTeX package which pretty much + obliterates the need for this kind of functionality. If you still + want it, standard LaTeX provides it with the 'showkeys' package, + and there is also the less encompassing 'showlabels' package. + Unfortunately, since those go to some pain not to change the page + layout and spacing, they also don't change 'preview''s idea of the + TeX dimensions of the involved boxes. So if you are using + 'preview' for determing bounding boxes, those packages are mostly + useless. The option 'showlabels' offers a substitute for them. +'tightpage' + It is not uncommon to want to use the results of 'preview' as + graphic images for some other application. One possibility is to + generate a flurry of EPS files with + + dvips -E -i -Pwww -o OUTPUTFILE.000 INPUTFILE + + However, in case those are to be processed further into graphic + image files by Ghostscript, this process is inefficient since all + of those files need to be processed one by one. In addition, it is + necessary to extract the bounding box comments from the EPS files + and convert them into page dimension parameters for Ghostscript in + order to avoid full-page graphics. This is not even possible if + you wanted to use Ghostscript in a _single_ run for generating the + files from a single PostScript file, since Dvips will in that case + leave no bounding box information anywhere. + + The solution is to use the 'tightpage' option. That way a single + command line like + + gs -sDEVICE=png16m -dTextAlphaBits=4 -r300 + -dGraphicsAlphaBits=4 -dSAFER -q -dNOPAUSE + -sOutputFile=OUTPUTFILE%d.png INPUTFILE.ps + + will be able to produce tight graphics from a single PostScript + file generated with Dvips _without_ use of the options '-E -i', in + a single run. + + The 'tightpage' option actually also works when using the 'pdftex' + option and generating PDF files with PDFTeX. The resulting PDF + file has separate page dimensions for every page and can directly + be converted with one run of Ghostscript into image files. + + If neither 'dvips' or 'pdftex' have been specified, the + corresponding option will get autodetected and invoked. + + If you need this in a batch environment where you don't want to use + 'preview''s automatic extraction facilities, no problem: just don't + use any of the extraction options, and wrap everything to be + previewed into 'preview' environments. This is how LyX does its + math previews. + + If the pages under the 'tightpage' option are just too tight, you + can adjust by setting the length '\PreviewBorder' to a different + value by using '\setlength'. The default value is '0.50001bp', + which is half of a usual PostScript point, rounded up. If you go + below this value, the resulting page size may drop below '1bp', and + Ghostscript does not seem to like that. If you need finer control, + you can adjust the bounding box dimensions individually by changing + the macro '\PreviewBbAdjust' with the help of '\renewcommand'. Its + default value is + + \newcommand \PreviewBbAdjust + {-\PreviewBorder -\PreviewBorder + \PreviewBorder \PreviewBorder} + + This adjusts the left, lower, right and upper borders by the given + amount. The macro must contain 4 TeX dimensions after another, and + you may not omit the units if you specify them explicitly instead + of by register. PostScript points have the unit 'bp'. +'lyx' + This option is for the sake of LyX developers. It will output a + few diagnostics relevant for the sake of LyX' preview functionality + (at the time of writing, mostly implemented for math insets, in + versions of LyX starting with 1.3.0). +'counters' + This writes out diagnostics at the start and the end of previews. + Only the counters changed since the last output get written, and if + no counters changed, nothing gets written at all. The list + consists of counter name and value, both enclosed in '{}' braces, + followed by a space. The last such pair is followed by a colon + (':') if it is at the start of the preview snippet, and by a period + ('.') if it is at the end. The order of different diagnostics like + this being issued depends on the order of the specification of the + options when calling the package. + + Systems like preview-latex use this for keeping counters accurate + when single previews are regenerated. +'footnotes' + This makes footnotes render as previews, and only as their footnote + symbol. A convenient editing feature inside of Emacs. + + The following options are just for debugging purposes of the package +and similar to the corresponding TeX commands they allude to: + +'tracingall' + causes lots of diagnostic output to appear in the log file during + the preview collecting phases of TeX's operation. In contrast to + the similarly named TeX command, it will not switch to + '\errorstopmode', nor will it change the setting of + '\tracingonline'. +'showbox' + This option will show the contents of the boxes shipped out to the + DVI files. It also sets '\showboxbreadth' and '\showboxdepth' to + their maximum values at the end of loading this package, but you + may reset them if you don't like that. + + +File: preview-latex.info, Node: Provided commands, Prev: Package options, Up: The LaTeX style file + +6.1.2 Provided commands +----------------------- + +'\begin{preview}...\end{preview}' + The 'preview' environment causes its contents to be set as a single + preview image. Insertions like figures and footnotes (except those + included in minipages) will typically lead to error messages or be + lost. In case the 'preview' package has not been activated, the + contents of this environment will be typeset normally. + +'\begin{nopreview}...\end{nopreview}' + The 'nopreview' environment will cause its contents not to undergo + any special treatment by the 'preview' package. When 'preview' is + active, the contents will be discarded like all main text that does + not trigger the 'preview' hooks. When 'preview' is not active, the + contents will be typeset just like the main text. + + Note that both of these environments typeset things as usual when + preview is not active. If you need something typeset + conditionally, use the '\ifPreview' conditional for it. + +'\PreviewMacro' + If you want to make a macro like '\includegraphics' (actually, this + is what is done by the 'graphics' option to 'preview') produce a + preview image, you put a declaration like + + \PreviewMacro[*[[!]{\includegraphics} + + or, more readable, + + \PreviewMacro[{*[][]{}}]{\includegraphics} + + into your preamble. The optional argument to '\PreviewMacro' + specifies the arguments '\includegraphics' accepts, since this is + necessary information for properly ending the preview box. Note + that if you are using the more readable form, you have to enclose + the argument in a '[{' and '}]' pair. The inner braces are + necessary to stop any included '[]' pairs from prematurely ending + the optional argument, and to make a single '{}' denoting an + optional argument not get stripped away by TeX's argument parsing. + + The letters simply mean + + '*' + indicates an optional '*' modifier, as in '\includegraphics*'. + '[' + indicates an optional argument in brackets. This syntax is + somewhat baroque, but brief. + '[]' + also indicates an optional argument in brackets. Be sure to + have encluded the entire optional argument specification in an + additional pair of braces as described above. + '!' + indicates a mandatory argument. + '{}' + indicates the same. Again, be sure to have that additional + level of braces around the whole argument specification. + '?'DELIMITER{TRUE CASE}{FALSE CASE} + is a conditional. The next character is checked against being + equal to DELIMITER. If it is, the specification TRUE CASE is + used for the further parsing, otherwise FALSE CASE will be + employed. In neither case is something consumed from the + input, so {TRUE CASE} will still have to deal with the + upcoming delimiter. + '@'{LITERAL SEQUENCE} + will insert the given sequence literally into the executed + call of the command. + '-' + will just drop the next token. It will probably be most often + used in the true branch of a '?' specification. + '#'{ARGUMENT}{REPLACEMENT} + is a transformation rule that calls a macro with the given + argument and replacement text on the rest of the argument + list. The replacement is used in the executed call of the + command. This can be used for parsing arbitrary constructs. + For example, the '[]' option could manually be implemented + with the option string '?[{#{[#1]}{[{#1}]}}{}'. PStricks + users might enjoy this sort of flexibility. + ':'{ARGUMENT}{REPLACEMENT} + is again a transformation rule. As opposed to '#', however, + the result of the transformation is parsed again. You'll + rarely need this. + + There is a second optional argument in brackets that can be used to + declare any default action to be taken instead. This is mostly for + the sake of macros that influence numbering: you would want to keep + their effects in that respect. The default action should use '#1' + for referring to the original (not the patched) command with the + parsed options appended. Not specifying a second optional argument + here is equivalent to specifying '[#1]'. + +'\PreviewMacro*' + A similar invocation '\PreviewMacro*' simply throws the macro and + all of its arguments declared in the manner above away. This is + mostly useful for having things like '\footnote' not do their magic + on their arguments. More often than not, you don't want to declare + any arguments to scan to '\PreviewMacro*' since you would want the + remaining arguments to be treated as usual text and typeset in that + manner instead of being thrown away. An exception might be, say, + sort keys for '\cite'. + + A second optional argument in brackets can be used to declare any + default action to be taken instead. This is for the sake of macros + that influence numbering: you would want to keep their effects in + that respect. The default action might use '#1' for referring to + the original (not the patched) command with the parsed options + appended. Not specifying a second optional argument here is + equivalent to specifying '[]' since the command usually gets thrown + away. + + As an example for using this argument, you might want to specify + + \PreviewMacro*[{[]}][#1{}]{\footnote} + + This will replace a footnote by an empty footnote, but taking any + optional parameter into account, since an optional paramter changes + the numbering scheme. That way the real argument for the footnote + remains for processing by preview-latex. + +'\PreviewEnvironment' + The macro '\PreviewEnvironment' works just as '\PreviewMacro' does, + only for environments. +'\PreviewEnvironment*' + And the same goes for '\PreviewEnvironment*' as compared to + '\PreviewMacro*'. + +'\PreviewSnarfEnvironment' + This macro does not typeset the original environment inside of a + preview box, but instead typesets just the contents of the original + environment inside of the preview box, leaving nothing for the + original environment. This has to be used for figures, for + example, since they would + + 1. produce insertion material that cannot be extracted to the + preview properly, + 2. complain with an error message about not being in outer par + mode. + +'\PreviewOpen' +'\PreviewClose' + Those Macros form a matched preview pair. This is for macros that + behave similar as '\begin' and '\end' of an environment. It is + essential for the operation of '\PreviewOpen' that the macro + treated with it will open an additional group even when the preview + falls inside of another preview or inside of a 'nopreview' + environment. Similarly, the macro treated with '\PreviewClose' + will close an environment even when inactive. + +'\ifPreview' + In case you need to know whether 'preview' is active, you can use + the conditional '\ifPreview' together with '\else' and '\fi'. + + +File: preview-latex.info, Node: The Emacs interface, Next: The preview images, Prev: The LaTeX style file, Up: For advanced users + +6.2 The Emacs interface +======================= + +You can use 'M-x customize-group <RET> preview-latex <RET>' in order to +customize these variables, or use the menus for it. We explain the +various available options together with explaining how they work +together in making preview-latex work as intended. + +'preview-LaTeX-command' + When you generate previews on a buffer or a region, the command in + 'preview-LaTeX-command' gets run (that variable should only be + changed with Customize since its structure is somewhat peculiar, + though expressive). As usual with AUCTeX, you can continue working + while this is going on. It is not a good idea to change the file + until after preview-latex has established where to place the + previews which it can only do after the LaTeX run completes. This + run produces a host of pseudo-error messages that get parsed by + preview-latex at the end of the LaTeX run and give it the necessary + information about where in the source file the LaTeX code for the + various previews is located exactly. The parsing takes a moment + and will render Emacs busy. + +'preview-LaTeX-command-replacements' + This variable specifies transformations to be used before calling + the configured command. One possibility is to have '\pdfoutput=0 ' + appended to every command starting with 'pdf'. This particular + setting is available as the shortcut + 'preview-LaTeX-disable-pdfoutput'. Since preview-latex can work + with PDF files by now, there is little incentive for using this + option, anymore (for projects not requiring PDF output, the added + speed of 'dvipng' might make this somewhat attractive). + +'preview-required-option-list' + 'preview-LaTeX-command' uses 'preview-required-option-list' in + order to pass options such as 'auctex', 'active' and 'dvips' to the + 'preview' package. This means that the user need (and should) not + supply these in the document itself in case he wants to be able to + still compile his document without it turning into an incoherent + mass of little pictures. These options even get passed in when the + user loads 'preview' explicitly in his document. + + The default includes an option 'counters' that is controlled by the + boolean variable + +'preview-preserve-counters' + This option will cause the 'preview' package to emit information + that will assist in keeping things like equation counters and + section numbers reasonably correct even when you are regenerating + only single previews. + +'preview-default-option-list' +'preview-default-preamble' + If the document does not call in the package 'preview' itself (via + '\usepackage') in the preamble, the preview package is loaded using + default options from 'preview-default-option-list' and additional + commands specified in 'preview-default-preamble'. + +'preview-fast-conversion' + This is relevant only for DVI mode. It defaults to 'On' and + results in the whole document being processed as one large + PostScript file from which the single images are extracted with the + help of parsing the PostScript for use of so-called DSC comments. + The bounding boxes are extracted with the help of TeX instead of + getting them from Dvips. If you are experiencing bounding box + problems, try setting this option to 'Off'. + +'preview-prefer-TeX-bb' + If this option is 'On', it tells preview-latex never to try to + extract bounding boxes from the bounding box comments of EPS files, + but rather rely on the boxes it gets from TeX. If you activated + 'preview-fast-conversion', this is done, anyhow, since there are no + EPS files from which to read this information. The option defaults + to 'Off', simply because about the only conceivable reason to + switch off 'preview-fast-conversion' would be that you have some + bounding box problem and want to get Dvips' angle on that matter. + +'preview-scale-function' +'preview-reference-face' +'preview-document-pt-list' +'preview-default-document-pt' + 'preview-scale-function' determines by what factor images should be + scaled when appearing on the screen. If you specify a numerical + value here, the physical size on the screen will be that of the + original paper output scaled by the specified factor, at least if + Emacs' information about screen size and resolution are correct. + The default is to let 'preview-scale-from-face' determine the scale + function. This function determines the scale factor by making the + size of the default font in the document match that of the + on-screen fonts. + + The size of the screen fonts is deduced from the font + 'preview-reference-face' (usually the default face used for + display), the size of the default font for the document is + determined by calling 'preview-document-pt'. This function + consults the members of 'preview-document-pt-list' in turn until it + gets the desired information. The default consults first + 'preview-parsed-font-size', then calls 'preview-auctex-font-size' + which asks AUCTeX about any size specification like '12pt' to the + documentclass that it might have detected when parsing the + document, and finally reverts to just assuming + 'preview-default-document-pt' as the size used in the document + (defaulting to 10pt). + + If you find that the size of previews and the other Emacs display + clashes, something goes wrong. 'preview-parsed-font-size' is + determined at '\begin{document}' time; if the default font size + changes after that, it will not get reported. If you have an + outdated version of 'preview.sty' in your path, the size might not + be reported at all. If in this case AUCTeX is unable to find a + size specification, and if you are using a document class with a + different default value (like 'KomaScript'), the default fallback + assumption will probably be wrong and preview-latex will scale up + things too large. So better specify those size options even when + you know that LaTeX does not need them: preview-latex might benefit + from them. Another possibility for error is that you have not + enabled AUCTeX's document parsing options. The fallback method of + asking AUCTeX about the size might be disabled in future versions + of preview-latex since in general it is more reliable to get this + information from the LaTeX run itself. + +'preview-fast-dvips-command' +'preview-dvips-command' + The regular command for turning a DVI file into a single PostScript + file is 'preview-fast-dvips-command', while 'preview-dvips-command' + is used for cranking out a DVI file where every preview is in a + separate EPS file. Which of the two commands gets used depends on + the setting of 'preview-fast-conversion'. The printer specified + here is '-Pwww' by default, which will usually get you scalable + fonts where available. If you are experiencing problems, you might + want to try playing around with Dvips options (*Note + (dvips)Command-line options::). + + The conversion of the previews into PostScript or EPS files gets + started after the LaTeX run completes when Emacs recognizes the + first image while parsing the error messages. When Emacs has + finished parsing the error messages, it activates all detected + previews. This entails throwing away any previous previews + covering the same areas, and then replacing the text in its visual + appearance by a placeholder looking like a roadworks sign. + +'preview-nonready-icon-specs' + This is the roadworks sign displayed while previews are being + prepared. You may want to customize the font sizes at which + preview-latex switches over between different icon sizes, and the + ascent ratio which determines how high above the base line the icon + gets placed. + +'preview-error-icon-specs' +'preview-icon-specs' + Those are icons placed before the source code of an opened preview + and, respectively, the image specs to be used for PostScript + errors, and a normal open preview in text representation. + +'preview-inner-environments' + This is a list of environments that are regarded as inner levels of + an outer environment when doing 'preview-environment'. One example + when this is needed is in + '\begin{equation}\begin{split}...\end{split}\end{equation}', and + accordingly 'split' is one entry in 'preview-inner-environments'. + + +File: preview-latex.info, Node: The preview images, Next: Misplaced previews, Prev: The Emacs interface, Up: For advanced users + +6.3 The preview images +====================== + +'preview-image-type' +'preview-image-creators' +'preview-gs-image-type-alist' + What happens when LaTeX is finished depends on the configuration of + 'preview-image-type'. What to do for each of the various settings + is specified in the variable 'preview-image-creators'. The options + to pass into Ghostscript and what Emacs image type to use is + specified in 'preview-gs-image-type-alist'. + + 'preview-image-type' defaults to 'png'. For this to work, your + version of Ghostscript needs to support the 'png16m' device. If + you are experiencing problems here, you might want to reconfigure + 'preview-gs-image-type-alist' or 'preview-image-type'. + Reconfiguring 'preview-image-creators' is only necessary for adding + additional image types. + + Most devices make preview-latex start up a single Ghostscript + process for the entire preview run (as opposed to one per image) + and feed it either sections of a PDF file (if PDFLaTeX was used), + or (after running Dvips) sections of a single PostScript file or + separate EPS files in sequence for conversion into PNG format which + can be displayed much faster by Emacs. Actually, not in sequence + but backwards since you are most likely editing at the end of the + document. And as an added convenience, any preview that happens to + be on-screen is given higher priority so that preview-latex will + first cater for the images that are displayed. There are various + options customizable concerning aspects of that operation, see the + customization group 'Preview Gs' for this. + + Another noteworthy setting of 'preview-image-type' is 'dvipng': in + this case, the 'dvipng' program will get run on DVI output (see + below for PDF). This is in general much faster than Dvips and + Ghostscript. In that case, the option + +'preview-dvipng-command' + will get run for doing the conversion, and it is expected that + +'preview-dvipng-image-type' + images get produced ('dvipng' might be configured for other image + types as well). You will notice that 'preview-gs-image-type-alist' + contains an entry for 'dvipng': this actually has nothing to with + 'dvipng' itself but specifies the image type and Ghostscript device + option to use when 'dvipng' can't be used. This will obviously be + the case for PDF output by PDFLaTeX, but it will also happen if the + DVI file contains PostScript specials in which case the affected + images will get run through Dvips and Ghostscript once 'dvipng' + finishes. + + Note for pLaTeX and upLaTeX users: It is known that 'dvipng' is not + compatible with pLaTeX and upLaTeX. If 'preview-image-type' is set + to 'dvipng' and (u)pLaTeX is used, 'dvipng' just fails and + preview-latex falls back on Dvips and Ghostscript. + +'preview-gs-options' + Most interesting to the user perhaps is the setting of this + variable. It contains the default antialiasing settings + '-dTextAlphaBits=4' and '-dGraphicsAlphaBits=4'. Decreasing those + values to 2 or 1 might increase Ghostscript's performance if you + find it lacking. + + Running and feeding Ghostscript from preview-latex happens +asynchronously again: you can resume editing while the images arrive. +While those pretty pictures filling in the blanks on screen tend to make +one marvel instead of work, rendering the non-displayed images +afterwards will not take away your attention and will eventually +guarantee that jumping around in the document will encounter only +prerendered images. + + +File: preview-latex.info, Node: Misplaced previews, Prev: The preview images, Up: For advanced users + +6.4 Misplaced previews +====================== + +If you are reading this section, the first thing is to check that your +problem is not caused by x-symbol in connection with an installation not +supporting 8-bit characters (*note x-symbol interoperation::). If not, +here's the beef: + + As explained previously, Emacs uses pseudo-error messages generated +by the 'preview' package in order to pinpoint the exact source location +where a preview originated. This works in running text, but fails when +preview material happens to lie in macro arguments, like the contents of +'\emph'. Those macros first read in their entire argument, munge it +through, perhaps transform it somehow, process it and perhaps then +typeset something. When they finally typeset something, where is the +location where the stuff originated? TeX, having read in the entire +argument before, does not know and actually there would be no sane way +of defining it. + + For previews contained inside such a macro argument, the default +behaviour of preview-latex is to use a position immediately after the +closing brace of the argument. All the previews get placed there, all +at a zero-width position, which means that Emacs displays it in an order +that preview-latex cannot influence (currently in Emacs it is even +possible that the order changes between runs). And since the placement +of those previews is goofed up, you will not be able to regenerate them +by clicking on them. The default behaviour is thus somewhat +undesirable. + + The solution (like with other preview problems) is to tell the LaTeX +'preview' package how to tackle this problem (*note The LaTeX style +file::). Simply, you don't need '\emph' do anything at all during +previews! You only want the text math previewed, so the solution is to +use '\PreviewMacro*\emph' in the preamble of your document which will +make LaTeX ignore '\emph' completely as long as it is not part of a +larger preview (in which case it gets typeset as usual). Its argument +thus becomes ordinary text and gets treated like ordinary text. + + Note that it would be a bad idea to declare +'\PreviewMacro*[{{}}]\emph' since then both '\emph' as well as its +argument would be ignored instead of previewed. For user-level macros, +this is almost never wanted, but there may be internal macros where you +might want to ignore internal arguments. + + The same mechanism can be used for a number of other text-formatting +commands like '\textrm', '\textit' and the like. While they all use the +same internal macro '\text@command', it will not do to redefine just +that, since they call it only after having read their argument in, and +then it already is too late. So you need to disable every of those +commands by hand in your document preamble. + + Actually, we wrote all of the above just to scare you. At least all +of the above mentioned macros and a few more are already catered for by +a configuration file 'prauctex.cfg' that gets loaded by default unless +the 'preview' package gets loaded with the 'noconfig' option. You can +make your own copy of this file in a local directory and edit it in case +of need. You can also add loading of a file of your liking to +'preview-default-preamble', or alternatively do the manual disabling of +your favorite macro in 'preview-default-preamble', which is customizable +in the 'Preview Latex' group. + + +File: preview-latex.info, Node: ToDo, Next: Frequently Asked Questions, Prev: For advanced users, Up: Top + +Appendix A ToDo +*************** + + * Support other formats than just LaTeX + + plain TeX users and ConTeXt users should not have to feel left out. + While ConTeXt is not supported yet by released versions of AUCTeX, + at least supporting plain would help people, and be a start for + ConTeXt as well. There are plain-based formats like MusiXTeX that + could benefit a lot from preview-latex. The main part of the + difficulties here is to adapt 'preview.dtx' to produce stuff not + requiring LaTeX. + + * Support nested snippets + + Currently you can't have both a footnote (which gets displayed as + just its footnote number) and math inside of a footnote rendered as + an image: such nesting might be achieved by rerunning preview-latex + on the footnote contents when one opens the footnote for editing. + + * Support other text properties than just images + + Macros like '\textit' can be rendered as images, but the resulting + humungous blob is not suitable for editing, in particular since the + line filling from LaTeX does not coincide with that of Emacs. It + would be much more useful if text properties just switched the + relevant font to italics rather than replacing the whole text with + an image. It would also make editing quite easier. Then there are + things like footnotes that are currently just replaced by their + footnote number. While editing is not a concern here (the number + is not in the original text, anyway), it would save a lot of + conversion time if no images were generated, but Emacs just + displayed a properly fontified version of the footnote number. + Also, this might make preview-latex useful even on text terminals. + + * Find a way to facilitate Source Specials + + Probably in connection with adding appropriate support to 'dvipng', + it would be nice if clicking on an image from a larger piece of + source code would place the cursor at the respective source code + location. + + * Make 'preview.dtx' look reasonable in AUCTeX + + It is a bit embarrassing that 'preview.dtx' is written in a manner + that will not give either good syntax highlighting or good + indentation when employing AUCTeX. + + * Web page work + + Currently, preview-latex's web page is not structured at all. + Better navigation would be desirable, as well as separate News and + Errata eye catchers. + + * Manual improvements + + - Pepper the manual with screen shots and graphics + + This will be of interest for the HTML and TeX renditions of + the texinfo manual. Since Texinfo now supports images as + well, this could well be nice to have. + + - Fix duplicates + + Various stuff appears several times. + + * Implement rendering pipelines for Emacs + + The current preview-latex interface is fundamentally flawed, not + only because of a broken implementation. A general batchable and + daemonizable rendering infrastructure that can work on all kinds of + preview images for embedding into buffers is warranted. The + current implementation has a rather adhoc flavor and is not easily + extended. It will not work outside of AUCTeX, either. + + * Integrate into RefTeX + + When referencing to equations and the like, the preview-images of + the source rather than plain text should be displayed. If the + preview in question covers labels, those should appear in the + bubble help and/or a context menu. Apropos: + + * Implement LaTeX error indicators + + Previews on erroneous LaTeX passages might gain a red border or + similar. + + * Pop up relevant online documentation for frequent errors + + A lot of errors are of the "badly configured" variety. Perhaps the + relevant info pages should be delivered in addition to the error + message. + + * Implement a table editing mode where every table cell gets output + as a separate preview. Alternatively, output the complete table + metrics in a way that lets people click on individual cells for + editing purposes. + + * Benchmark and kill Emacs inefficiencies + + Both the LaTeX run under Emacs control as well as actual image + insertion in Emacs could be faster. CVS Emacs has improved in that + respect, but it still is slower than desirable. + + * Improve image support under Emacs + + The general image and color handling in Emacs is inefficient and + partly defective. This is still the case in CVS. One option would + be to replace the whole color and image handling with GDK routines + when this library is available, since it has been optimized for it. + + +File: preview-latex.info, Node: Frequently Asked Questions, Next: Copying this Manual, Prev: ToDo, Up: Top + +Appendix B Frequently Asked Questions +************************************* + +* Menu: + +* Introduction to FAQ:: +* Requirements:: +* Installation Trouble:: +* Customization:: +* Troubleshooting:: +* Other formats:: + + +File: preview-latex.info, Node: Introduction to FAQ, Next: Requirements, Prev: Frequently Asked Questions, Up: Frequently Asked Questions + +B.1 Introduction +================ + +B.1.1 How can I contribute to the FAQ? +-------------------------------------- + +Send an email with the subject: + Preview FAQ + to <auctex-devel@gnu.org>. + + +File: preview-latex.info, Node: Requirements, Next: Installation Trouble, Prev: Introduction to FAQ, Up: Frequently Asked Questions + +B.2 Requirements +================ + +B.2.1 Which version of Emacs is needed? +--------------------------------------- + +preview-latex nominally requires GNU Emacs with a version of at least +25.1. + +B.2.2 Which versions of Ghostscript and AUCTeX are needed? +---------------------------------------------------------- + +We recommend to use GNU or AFPL Ghostscript with a version of at least +7.07. + + preview-latex has been distributed as part of AUCTeX since version +11.80. If your version of AUCTeX is older than that, or if it does not +contain a working copy of preview-latex, complain to wherever you got it +from. + +B.2.3 I have trouble with the display format... +----------------------------------------------- + +We recommend keeping the variable 'preview-image-type' set to 'dvipng' +(if you have it installed) or 'png'. This is the default and can be set +via the 'Preview/Customize' menu. + + All other formats are known to have inconveniences, either in file +size or quality. There are some Emacs versions around not supporting +PNG; the proper way to deal with that is to complain to your Emacs +provider. Short of that, checking out PNM or JPEG formats might be a +good way to find out whether the lack of PNG format support might be the +only problem with your Emacs. + +B.2.4 For which OS does preview work? +------------------------------------- + +It is known to work under the X Window System for Linux and for several +flavors of Unix: we have reports for HP and Solaris. + + There are several development versions of Emacs around for native +MacOS Carbon, and preview-latex is working with them, too. + + With Windows, both native Emacs and Cygwin Emacs should work. +However, it is known that MiKTeX (https://miktex.org/) sometimes doesn't +work with preview-latex. In that case, use TeX Live +(https://tug.org/texlive/) instead. + + +File: preview-latex.info, Node: Installation Trouble, Next: Customization, Prev: Requirements, Up: Frequently Asked Questions + +B.3 Installation Trouble +======================== + +B.3.1 I just get 'LaTeX found no preview images'. +------------------------------------------------- + +The reason for this is that LaTeX found no preview images in the +document in question. + + One reason might be that there are no previews to be seen. If you +have not used preview-latex before, you might not know its manner of +operation. One sure-fire way to test if you just have a document where +no previews are to be found is to use the provided example document +'circ.tex' (you will have to copy it to some directory where you have +write permissions). If the symptom persists, you have a problem, and +the problem is most likely a LaTeX problem. Here are possible reasons: + +Filename database not updated + Various TeX distributions have their own ways of knowing where the + files are without actually searching directories. The normal + preview-latex installation should detect common tools for that + purpose and use them. If this goes wrong, or if the files get + installed into a place where they are not looked for, the LaTeX run + will fail. + +An incomplete manual installation + This should not happen if you followed installation instructions. + Unfortunately, people know better all the time. If only + 'preview.sty' gets installed without a set of supplementary files + also in the 'latex' subdirectory, preview-latex runs will not + generate any errors, but they will not produce any previews, + either. + +An outdated 'preview' installation + The 'preview.sty' package is useful for more than just + preview-latex. For example, it is part of TeX Live. So you have + to make sure that preview-latex does not get to work with outdated + style and configuration files: some newer features will not work + with older TeX style files, and really old files will make + preview-latex fail completely. There usual is a local 'texmf' + tree, or even a user-specific tree that are searched before the + default tree. Make sure that the first version of those files that + gets found is the correct one. + + +File: preview-latex.info, Node: Customization, Next: Troubleshooting, Prev: Installation Trouble, Up: Frequently Asked Questions + +B.4 Customization +================= + +B.4.1 How to include additional environments like 'enumerate' +------------------------------------------------------------- + +By default, preview-latex is intended mainly for displaying mathematical +formulas, so environments like 'enumerate' or 'tabular' (except where +contained in a float) are not included. You can include them however +manually by adding the lines: + + \usepackage[displaymath,textmath,sections,graphics,floats]{preview} + \PreviewEnvironment{enumerate} +in your document header, that is before + + \begin{document} +In general, 'preview' should be loaded as the last thing before the +start of document. + + Be aware that + + \PreviewEnvironment{...} +does not accept a comma separated list! Also note that by putting more +and more + + \PreviewEnvironment{...} +in your document, it will look more and more like a DVI file preview +when running preview-latex. Since each preview is treated as one large +monolithic block by Emacs, one should really restrict previews to those +elements where the improvement in visual representation more than makes +up for the decreased editability. + +B.4.2 What if I don't want to change the document? +-------------------------------------------------- + +The easiest way is to generate a configuration file in the current +directory. You can basically either create 'prdefault.cfg' which is +used for any use of the 'preview' package, or you can use 'prauctex.cfg' +which only applies to the use from with Emacs. Let us assume you use +the latter. In that case you should write something like + + \InputIfFileExists{preview/prauctex.cfg}{}{} + \PreviewEnvironment{enumerate} +in it. The first line inputs the system-wide default configuration (the +file name should match that, but not your own 'prauctex.cfg'), then you +add your own stuff. + +B.4.3 Suddenly I get gazillions of ridiculous pages?!? +------------------------------------------------------ + +When preview-latex works on extracting its stuff, it typesets each +single preview on a page of its own. This only happens when actual +previews get generated. Now if you want to configure preview-latex in +your document, you need to add your own '\usepackage' call to 'preview' +so that it will be able to interpret its various definition commands. +It is an error to add the 'active' option to this invocation: you don't +want the package to be active unless preview-latex itself enables the +previewing operation (which it will). + +B.4.4 Does preview-latex work with presentation classes? +-------------------------------------------------------- + +preview-latex should work with most presentation classes. However, +since those classes often have macros or pseudo environments +encompassing a complete slide, you will need to use the customization +facilities of 'preview.sty' to tell it how to resolve this, whether you +want no previews, previews of whole slides or previews of inner +material. + + +File: preview-latex.info, Node: Troubleshooting, Next: Other formats, Prev: Customization, Up: Frequently Asked Questions + +B.5 Troubleshooting +=================== + +B.5.1 Preview causes all sort of strange error messages +------------------------------------------------------- + +When running preview-latex and taking a look at either log file or +terminal output, lots of messages like + + ! Preview: Snippet 3 started. + <-><-> + + l.52 \item Sie lassen sich als Funktion $ + y = f(x)$ darstellen. + ! Preview: Snippet 3 ended.(491520+163840x2494310). + <-><-> + + l.52 \item Sie lassen sich als Funktion $y = f(x)$ + darstellen. +appear (previous versions generated messages looking even more like +errors). Those are not real errors (as will be noted in the log file). +Or rather, while they *are* really TeX error messages, they are +intentional. This currently is the only reliable way to pass the +information from the LaTeX run of preview-latex to its Emacs part about +where the previews originated in the source text. Since they are actual +errors, you will also get AUCTeX to state + Preview-LaTeX exited as expected with code 1 at Wed Sep 4 17:03:30 +after the LaTeX run in the run buffer. This merely indicates that +errors were present, and errors will always be present when +preview-latex is operating. There might be also real errors, so in case +of doubt, look for them explicitly in either run buffer or the resulting +'.log' file. + +B.5.2 Why do my DVI and PDF output files vanish? +------------------------------------------------ + +In order to produce the preview images preview-latex runs LaTeX on the +master or region file. The resulting DVI or PDF file can happen to have +the same name as the output file of a regular LaTeX run. So the regular +output file gets overwritten and is subsequently deleted by +preview-latex. + +B.5.3 My output file suddenly only contains preview images?! +------------------------------------------------------------ + +As mentioned in the previews FAQ entry, preview-latex might use the file +name of the original output file for the creation of preview images. If +the original output file is being displayed with a viewer when this +happens, you might see strange effects depending on the viewer, e.g. a +message about the file being corrupted or the display of all the preview +images instead of your typeset document. (Also *note Customization::.) + + +File: preview-latex.info, Node: Other formats, Prev: Troubleshooting, Up: Frequently Asked Questions + +B.6 preview-latex when not using LaTeX +====================================== + +B.6.1 Does preview-latex work with PDFLaTeX? +-------------------------------------------- + +Yes, as long as you use AUCTeX's own PDFLaTeX mode and have not messed +with 'TeX-command-list'. + +B.6.2 Does preview-latex work with 'elatex'? +-------------------------------------------- + +No problem here. If you configure your AUCTeX to use 'elatex', or +simply have 'latex' point to 'elatex', this will work fine. Modern TeX +distributions use eTeX for LaTeX, anyway. + +B.6.3 Does preview-latex work with ConTeXt? +------------------------------------------- + +In short, no. The 'preview' package is LaTeX-dependent. Adding support +for other formats requires volunteers. + +B.6.4 Does preview-latex work with plain TeX? +--------------------------------------------- + +Again, no. Restructuring the 'preview' package for 'plain' operation +would be required. Volunteers welcome. + + In some cases you might get around by making a wrapper pseudo-Master +file looking like the following: + + \documentclass{article} + \usepackage{plain} + \begin{document} + \begin{plain} + \input myplainfile + \end{plain} + \end{document} + + +File: preview-latex.info, Node: Copying this Manual, Next: Index, Prev: Frequently Asked Questions, Up: Top + +Appendix C Copying this Manual +****************************** + +The copyright notice for this manual is: + + This manual is for preview-latex, a LaTeX preview mode for AUCTeX +(version 13.1.3 from 2022-04-16). + + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2017-2019, 2021 +Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover Texts and no + Back-Cover Texts. A copy of the license is included in the section + entitled "GNU Free Documentation License." + + The full license text can be read here: + +* Menu: + +* GNU Free Documentation License:: License for copying this manual. + + +File: preview-latex.info, Node: GNU Free Documentation License, Up: Copying this Manual + +C.1 GNU Free Documentation License +================================== + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software + Foundation, Inc. <https://fsf.org/> + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + <https://www.gnu.org/licenses/>. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: preview-latex.info, Node: Index, Prev: Copying this Manual, Up: Top + +Index +***** + + +* Menu: + +* \PreviewEnvironment: Provided commands. (line 123) +* \PreviewMacro: Provided commands. (line 25) +* Activation: Activating preview-latex. + (line 6) +* C-c C-k: Keys and lisp. (line 168) +* C-c C-m P: Keys and lisp. (line 62) +* C-c C-p C-b: Keys and lisp. (line 89) +* C-c C-p C-c C-b: Keys and lisp. (line 115) +* C-c C-p C-c C-d: Keys and lisp. (line 121) +* C-c C-p C-c C-p: Keys and lisp. (line 99) +* C-c C-p C-c C-r: Keys and lisp. (line 110) +* C-c C-p C-c C-s: Keys and lisp. (line 105) +* C-c C-p C-d: Keys and lisp. (line 94) +* C-c C-p C-e: Keys and lisp. (line 74) +* C-c C-p C-f: Keys and lisp. (line 128) +* C-c C-p C-i: Keys and lisp. (line 155) +* C-c C-p C-p: Keys and lisp. (line 23) +* C-c C-p C-r: Keys and lisp. (line 84) +* C-c C-p C-s: Keys and lisp. (line 79) +* C-c C-p C-w: Keys and lisp. (line 45) +* C-u C-c C-p C-f: Keys and lisp. (line 149) +* Caching a preamble: Simple customization. + (line 57) +* Contacts: Contacts. (line 6) +* Copying: Copying. (line 6) +* Copyright: Copying. (line 6) +* Distribution: Copying. (line 6) +* Download: Availability. (line 6) +* FDL, GNU Free Documentation License: GNU Free Documentation License. + (line 6) +* Free: Copying. (line 6) +* Free software: Copying. (line 6) +* General Public License: Copying. (line 6) +* GIT access: Availability. (line 6) +* GPL: Copying. (line 6) +* Inline math: Simple customization. + (line 108) +* Kill preview-generating process: Keys and lisp. (line 168) +* License: Copying. (line 6) +* M-x preview-report-bug <RET>: Keys and lisp. (line 160) +* Mailing list: Contacts. (line 6) +* Menu entries: Keys and lisp. (line 6) +* Philosophy of preview-latex: What use is it?. (line 6) +* preview-at-point: Keys and lisp. (line 23) +* preview-auctex-font-size: The Emacs interface. (line 99) +* preview-auto-cache-preamble: Simple customization. + (line 57) +* preview-buffer: Keys and lisp. (line 89) +* preview-cache-preamble: Keys and lisp. (line 128) +* preview-cache-preamble-off: Keys and lisp. (line 149) +* preview-clearout: Keys and lisp. (line 110) +* preview-clearout-at-point: Keys and lisp. (line 99) +* preview-clearout-buffer: Keys and lisp. (line 115) +* preview-clearout-document: Keys and lisp. (line 105) +* preview-clearout-document <1>: Keys and lisp. (line 121) +* preview-copy-region-as-mml: Keys and lisp. (line 45) +* preview-default-document-pt: The Emacs interface. (line 82) +* preview-default-option-list: Simple customization. + (line 30) +* preview-default-option-list <1>: Simple customization. + (line 75) +* preview-default-option-list <2>: Simple customization. + (line 108) +* preview-default-option-list <3>: The Emacs interface. (line 53) +* preview-default-preamble: Simple customization. + (line 75) +* preview-default-preamble <1>: The Emacs interface. (line 54) +* preview-default-preamble <2>: Misplaced previews. (line 60) +* preview-default-preamble <3>: Misplaced previews. (line 61) +* preview-document: Keys and lisp. (line 94) +* preview-document-pt: The Emacs interface. (line 96) +* preview-document-pt-list: The Emacs interface. (line 81) +* preview-dvipng-command: The preview images. (line 40) +* preview-dvipng-image-type: The preview images. (line 43) +* preview-dvips-command: The Emacs interface. (line 124) +* preview-environment: Keys and lisp. (line 74) +* preview-error-icon-specs: The Emacs interface. (line 150) +* preview-fast-conversion: The Emacs interface. (line 60) +* preview-fast-dvips-command: The Emacs interface. (line 123) +* preview-goto-info-page: Keys and lisp. (line 155) +* preview-gs-image-type-alist: The preview images. (line 8) +* preview-gs-options: The preview images. (line 59) +* preview-icon-specs: The Emacs interface. (line 151) +* preview-image-creators: The preview images. (line 7) +* preview-image-type: Basic modes of operation. + (line 16) +* preview-image-type <1>: The preview images. (line 6) +* preview-inner-environments: The Emacs interface. (line 156) +* preview-LaTeX-command: The Emacs interface. (line 11) +* preview-LaTeX-command-replacements: The Emacs interface. (line 25) +* preview-nonready-icon-specs: The Emacs interface. (line 143) +* preview-parsed-font-size: The Emacs interface. (line 99) +* preview-pdf-adjust-color-method: No images are displayed with gs 9.27 and earlier. + (line 15) +* preview-prefer-TeX-bb: The Emacs interface. (line 69) +* preview-preserve-counters: Simple customization. + (line 61) +* preview-preserve-counters <1>: The Emacs interface. (line 47) +* preview-reference-face: The Emacs interface. (line 80) +* preview-region: Keys and lisp. (line 84) +* preview-report-bug: Keys and lisp. (line 160) +* preview-required-option-list: Simple customization. + (line 61) +* preview-required-option-list <1>: The Emacs interface. (line 35) +* preview-scale-function: The Emacs interface. (line 79) +* preview-section: Keys and lisp. (line 79) +* preview-transparent-border: Keys and lisp. (line 55) +* Readme: Introduction. (line 6) +* Report a bug: Keys and lisp. (line 160) +* Right: Copying. (line 6) +* Showing \labels: Simple customization. + (line 21) +* Using dvipng: Basic modes of operation. + (line 18) +* Warranty: Copying. (line 6) + + + +Tag Table: +Node: Top959 +Node: Copying2231 +Node: Introduction2685 +Node: What use is it?3359 +Node: Activating preview-latex4748 +Node: Getting started5499 +Node: Basic modes of operation7446 +Node: More documentation8651 +Node: Availability9520 +Node: Contacts10247 +Node: Installation11520 +Node: Keys and lisp11721 +Node: Simple customization18796 +Node: Known problems24458 +Node: Font problems with Dvips25284 +Node: Too small bounding boxes26454 +Node: x-symbol interoperation27850 +Node: Middle-clicks paste instead of toggling29238 +Node: No images are displayed with gs 9.27 and earlier29923 +Node: For advanced users32565 +Node: The LaTeX style file33024 +Node: Package options35586 +Node: Provided commands46490 +Node: The Emacs interface53835 +Node: The preview images62537 +Node: Misplaced previews66294 +Node: ToDo69750 +Node: Frequently Asked Questions74527 +Node: Introduction to FAQ74850 +Node: Requirements75189 +Node: Installation Trouble77157 +Node: Customization79421 +Node: Troubleshooting82497 +Node: Other formats85007 +Node: Copying this Manual86322 +Node: GNU Free Documentation License87268 +Node: Index112391 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/auctex-13.1.3/preview.el b/elpa/auctex-13.1.3/preview.el new file mode 100644 index 0000000..ad48b09 --- /dev/null +++ b/elpa/auctex-13.1.3/preview.el @@ -0,0 +1,4288 @@ +;;; preview.el --- embed preview LaTeX images in source buffer -*- lexical-binding: t; -*- + +;; Copyright (C) 2001-2022 Free Software Foundation, Inc. + +;; Author: David Kastrup +;; Keywords: tex, wp, convenience + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This style is for the "seamless" embedding of generated images +;; into LaTeX source code. Please see the README and INSTALL files +;; for further instruction. +;; +;; Please use the usual configure script for installation: more than +;; just Elisp files are involved: a LaTeX style, icon files, startup +;; code and so on. +;; +;; Quite a few things with regard to preview-latex's operation can be +;; configured by using +;; M-x customize-group RET preview RET +;; +;; Please report bugs with M-x preview-report-bug RET. + +;;; Code: + +(require 'tex-site) +(require 'tex) +(require 'latex) + +(eval-when-compile + (condition-case nil + (require 'desktop) + (file-error (message "Missing desktop package: +preview-latex buffers will not survive across sessions."))) + (condition-case nil + (require 'reporter) + (file-error (message "Missing reporter library, probably from the mail-lib package: +preview-latex's bug reporting commands will probably not work."))) + (require 'info)) + +(defgroup preview nil "Embed Preview images into LaTeX buffers." + :group 'AUCTeX + :prefix "preview-" + :link '(custom-manual "(preview-latex)Top") + :link '(info-link "(preview-latex)The Emacs interface") + :link '(url-link :tag "Homepage" "https://www.gnu.org/software/auctex/")) + +(defgroup preview-gs nil "Preview's Ghostscript renderer." + :group 'preview + :prefix "preview-") + +(defgroup preview-appearance nil "Preview image appearance." + :group 'preview + :prefix "preview-") + +(defconst preview-specs-type + '(repeat + (list :tag "Image spec" + ;; Use an extra :value keyword to avoid a bug in + ;; `widget-convert' of XEmacs 21.4 and Emacs 21. + ;; Analogously for the following `const' statements. + (const :format "" :value :type) + (choice :tag "Image type" + (const xpm) + (const xbm) + (symbol :tag "Other")) + (set :inline t :tag "Minimum font size" + (list :inline t :tag "" + (const :format "" :value :min) + (integer :tag "pixels"))) + (const :format "" :value :file) (string :tag "Filename") + (set :inline t :tag "Ascent ratio" + (list :inline t :tag "" + (const :format "" :value :ascent) + (integer :tag "percent of image" + :value 50)))))) + +(defun preview-specs-setter (symbol value) + "Set SYMBOL to VALUE and clear `preview-min-alist' property. +This is used in icon specs, so that customizing will +clear cached icons." + (put symbol 'preview-min-alist nil) + (set-default symbol value)) + +(defcustom preview-nonready-icon-specs + '((:type xpm :min 26 :file "prvwrk24.xpm" :ascent 90) + (:type xpm :min 22 :file "prvwrk20.xpm" :ascent 90) + (:type xpm :min 17 :file "prvwrk16.xpm" :ascent 90) + (:type xpm :min 15 :file "prvwrk14.xpm" :ascent 90) + (:type xpm :file "prvwrk12.xpm" :ascent 90) + (:type xbm :file "prvwrk24.xbm" :ascent 90)) + "The icon used for previews to be generated. +The spec must begin with `:type'. File names are relative to +`load-path' and `data-directory', a spec `:min' requires a +minimal pixel height for `preview-reference-face' before the spec +will be considered. Since evaluating the `:file' spec takes +considerable time under XEmacs, it should come after the `:min' +spec to avoid unnecessary evaluation time." + :group 'preview-appearance + :type preview-specs-type + :set #'preview-specs-setter) + +(defvar preview-nonready-icon nil + "The icon used for previews to be generated. +Suitable spec is chosen from `preview-nonready-icon-specs'.") + +(defcustom preview-error-icon-specs + '((:type xpm :min 22 :file "prverr24.xpm" :ascent 90) + (:type xpm :min 18 :file "prverr20.xpm" :ascent 90) + (:type xpm :file "prverr16.xpm" :ascent 90) + (:type xbm :file "prverr24.xbm" :ascent 90)) + "The icon used for PostScript errors. +The spec must begin with `:type'. File names are relative to +`load-path' and `data-directory', a spec `:min' requires a +minimal pixel height for `preview-reference-face' before the spec +will be considered. Since evaluating the `:file' spec takes +considerable time under XEmacs, it should come after the `:min' +spec to avoid unnecessary evaluation time." + :group 'preview-appearance + :type preview-specs-type + :set #'preview-specs-setter +) + +(defvar preview-error-icon nil + "The icon used for PostScript errors. +Suitable spec is chosen from `preview-error-icon-specs'.") + +(defcustom preview-icon-specs + '((:type xpm :min 24 :file "prvtex24.xpm" :ascent 75) + (:type xpm :min 20 :file "prvtex20.xpm" :ascent 75) + (:type xpm :min 16 :file "prvtex16.xpm" :ascent 75) + (:type xpm :file "prvtex12.xpm" :ascent 75) + (:type xbm :min 24 :file "prvtex24.xbm" :ascent 75) + (:type xbm :min 16 :file "prvtex16.xbm" :ascent 75) + (:type xbm :file "prvtex12.xbm" :ascent 75)) + "The icon used for an open preview. +The spec must begin with `:type'. File names are relative to +`load-path' and `data-directory', a spec `:min' requires a +minimal pixel height for `preview-reference-face' before the spec +will be considered. Since evaluating the `:file' spec takes +considerable time under XEmacs, it should come after the `:min' +spec to avoid unnecessary evaluation time." + :group 'preview-appearance + :type preview-specs-type + :set #'preview-specs-setter) + +(defvar preview-icon nil + "The icon used for an open preview. +Suitable spec is chosen from `preview-icon-specs'.") + +(defgroup preview-latex nil "LaTeX options for preview." + :group 'preview + :prefix "preview-") + +(defcustom preview-image-creators + '((dvipng + (open preview-gs-open preview-dvipng-process-setup) + (place preview-gs-place) + (close preview-dvipng-close)) + (png (open preview-gs-open) + (place preview-gs-place) + (close preview-gs-close)) + (jpeg (open preview-gs-open) + (place preview-gs-place) + (close preview-gs-close)) + (pnm (open preview-gs-open) + (place preview-gs-place) + (close preview-gs-close)) + (tiff (open preview-gs-open) + (place preview-gs-place) + (close preview-gs-close))) + "Define functions for generating images. +These functions get called in the process of generating inline +images of the specified type. The open function is called +at the start of a rendering pass, the place function for +placing every image, the close function at the end of +the pass. Look at the documentation of the various +functions used here for the default settings, and at +the function `preview-call-hook' through which those are +called. Additional argument lists specified in here +are passed to the functions before any additional +arguments given to `preview-call-hook'. + +Not all of these image types may be supported by your copy +of Ghostscript, or by your copy of Emacs." + :group 'preview-gs + :type '(alist :key-type (symbol :tag "Preview's image type") + :value-type + (alist :tag "Handler" :key-type (symbol :tag "Operation:") + :value-type (list :tag "Handler" + (function :tag "Handler function") + (repeat :tag "Additional \ +function args" :inline t sexp)) + :options (open place close)))) + +(defcustom preview-gs-image-type-alist + '((png png "-sDEVICE=png16m") + (dvipng png "-sDEVICE=png16m") + (jpeg jpeg "-sDEVICE=jpeg") + (pnm pbm "-sDEVICE=pnmraw") + (tiff tiff "-sDEVICE=tiff12nc")) + "Alist of image types and corresponding Ghostscript options. +The `dvipng' and `postscript' (don't use) entries really specify +a fallback device when images can't be processed by the requested +method, like when PDFTeX was used." + :group 'preview-gs + :type '(repeat (list :tag nil (symbol :tag "preview image-type") + (symbol :tag "Emacs image-type") + (repeat :inline t :tag "Ghostscript options" string)))) + +(defcustom preview-image-type 'png + "Image type to be used in images." + :group 'preview-gs + :type (append '(choice) + (mapcar (lambda (symbol) (list 'const (car symbol))) + preview-image-creators) + '((symbol :tag "Other")))) + +(defun preview-call-hook (symbol &rest rest) + "Call a function from `preview-image-creators'. +This looks up SYMBOL in the `preview-image-creators' entry +for the image type `preview-image-type' and calls the +hook function given there with the arguments specified there +followed by REST. If such a function is specified in there, +that is." + (let ((hook (cdr (assq symbol + (cdr (assq preview-image-type + preview-image-creators)))))) + (when hook + (apply (car hook) (append (cdr hook) rest))))) + + +(defvar TeX-active-tempdir nil + "List of directory name, top directory name and reference count.") +(make-variable-buffer-local 'TeX-active-tempdir) + +(defcustom preview-bb-filesize 1024 + "Size of file area scanned for bounding box information." + :group 'preview-gs :type 'integer) + +(defcustom preview-preserve-indentation t + "Whether to keep additional whitespace at the left of a line." + :group 'preview-appearance :type 'boolean) + +(defun preview-extract-bb (filename) + "Extract EPS bounding box vector from FILENAME." + (with-temp-buffer + (insert-file-contents-literally filename nil 0 preview-bb-filesize + t) + (goto-char (point-min)) + (when (search-forward-regexp "%%BoundingBox:\ + +\\([-+]?[0-9.]+\\)\ + +\\([-+]?[0-9.]+\\)\ + +\\([-+]?[0-9.]+\\)\ + +\\([-+]?[0-9.]+\\)" nil t) + (vector + (if preview-preserve-indentation + (min 72 (string-to-number (match-string 1))) + (string-to-number (match-string 1))) + (string-to-number (match-string 2)) + (string-to-number (match-string 3)) + (string-to-number (match-string 4)) + )))) + +(defcustom preview-prefer-TeX-bb nil + "Prefer TeX bounding box to EPS one if available. +If `preview-fast-conversion' is set, this option is not + consulted since the TeX bounding box has to be used anyway." + :group 'preview-gs + :type 'boolean) + +(defcustom preview-TeX-bb-border 0.5 + "Additional space in pt around Bounding Box from TeX." + :group 'preview-gs + :type 'number) + +(defvar preview-parsed-font-size nil + "Font size as parsed from the log of LaTeX run.") +(make-variable-buffer-local 'preview-parsed-font-size) +(defvar preview-parsed-magnification nil + "Magnification as parsed from the log of LaTeX run.") +(make-variable-buffer-local 'preview-parsed-magnification) +(defvar preview-parsed-pdfoutput nil + "PDFoutput as parsed from the log of LaTeX run.") +(make-variable-buffer-local 'preview-parsed-pdfoutput) +(defvar preview-parsed-counters nil + "Counters as parsed from the log of LaTeX run.") +(make-variable-buffer-local 'preview-parsed-counters) +(defvar preview-parsed-tightpage nil + "Tightpage as parsed from the log of LaTeX run.") +(make-variable-buffer-local 'preview-parsed-tightpage) + +(defun preview-get-magnification () + "Get magnification from `preview-parsed-magnification'." + (if preview-parsed-magnification + (/ preview-parsed-magnification 1000.0) 1.0)) + +(defun preview-TeX-bb (list) + "Calculate bounding box from (ht dp wd). +LIST consists of TeX dimensions in sp (1/65536 TeX point)." + (and + (consp list) + (let* ((dims (vconcat (mapcar + #'(lambda (x) + (/ x 65781.76)) + list))) + (box + (vector + (+ 72 (min 0 (aref dims 2))) + (+ 720 (min (aref dims 0) (- (aref dims 1)) 0)) + (+ 72 (max 0 (aref dims 2))) + (+ 720 (max (aref dims 0) (- (aref dims 1)) 0)))) + (border (if preview-parsed-tightpage + (vconcat (mapcar + #'(lambda(x) + (/ x 65781.76)) + preview-parsed-tightpage)) + (vector (- preview-TeX-bb-border) + (- preview-TeX-bb-border) + preview-TeX-bb-border + preview-TeX-bb-border)))) + (dotimes (i 4) + (aset box i (+ (aref box i) (aref border i)))) + box))) + +(defcustom preview-gs-command + (or ;; The GS wrapper coming with TeX Live + (executable-find "rungs") + ;; The MikTeX builtin GS + (let ((gs (executable-find "mgs"))) + ;; Check if mgs is functional for external non-MikTeX apps. + ;; See http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx + (when (and gs (= 0 (shell-command (concat (shell-quote-argument gs) " -q -dNODISPLAY -c quit")))) + gs)) + ;; Windows ghostscript + (executable-find "GSWIN32C.EXE") + ;; standard GhostScript + (executable-find "gs")) + "How to call gs for conversion from EPS. See also `preview-gs-options'." + :group 'preview-gs + :type 'string) + +(defcustom preview-gs-options '("-q" "-dDELAYSAFER" "-dNOPAUSE" + "-DNOPLATFONTS" "-dPrinted" + "-dTextAlphaBits=4" + "-dGraphicsAlphaBits=4") + "Options with which to call gs for conversion from EPS. +See also `preview-gs-command'." + :group 'preview-gs + :type '(repeat string)) + +(defvar preview-gs-queue nil + "List of overlays to convert using gs. +Buffer-local to the appropriate TeX process buffer.") +(make-variable-buffer-local 'preview-gs-queue) + +(defvar preview-gs-outstanding nil + "Overlays currently processed.") +(make-variable-buffer-local 'preview-gs-outstanding) + +(defcustom preview-gs-outstanding-limit 2 + "Number of requests allowed to be outstanding. +This is the number of not-yet-completed requests we +might at any time have piped into Ghostscript. If +this number is larger, the probability of Ghostscript +working continuously is higher when Emacs is rather +busy. If this number is smaller, redisplay will +follow changes in the displayed buffer area faster." + :group 'preview-gs + :type '(restricted-sexp + :match-alternatives + ((lambda (value) (and + (integerp value) + (> value 0) + (< value 10)))) + :tag "small number")) + +(defvar preview-gs-answer nil + "Accumulated answer of Ghostscript process.") +(make-variable-buffer-local 'preview-gs-answer) + +(defvar preview-gs-image-type nil + "Image type for gs produced images.") +(make-variable-buffer-local 'preview-gs-image-type) + +(defvar preview-gs-sequence nil + "Pair of sequence numbers for gs produced images.") +(make-variable-buffer-local 'preview-gs-sequence) + +(defvar preview-scale nil + "Screen scale of images. +Magnify by this factor to make images blend with other +screen content. Buffer-local to rendering buffer.") +(make-variable-buffer-local 'preview-scale) + +(defvar preview-colors nil + "Color setup list. +An array with elements 0, 1 and 2 for background, +foreground and border colors, respectively. Each element +is a list of 3 real numbers between 0 and 1, or nil +of nothing special should be done for the color") +(make-variable-buffer-local 'preview-colors) + +(defvar preview-gs-init-string nil + "Ghostscript setup string.") +(make-variable-buffer-local 'preview-gs-init-string) + +(defvar preview-ps-file nil + "PostScript file name for fast conversion.") +(make-variable-buffer-local 'preview-ps-file) + +(defvar preview-gs-dsc nil + "Parsed DSC information.") +(make-variable-buffer-local 'preview-gs-dsc) + +(defvar preview-resolution nil + "Screen resolution where rendering started. +Cons-cell of x and y resolution, given in +dots per inch. Buffer-local to rendering buffer.") +(make-variable-buffer-local 'preview-resolution) + +(defun preview-gs-resolution (scale xres yres) + "Generate resolution argument for gs. +Calculated from real-life factor SCALE and XRES and +YRES, the screen resolution in dpi." + (format "-r%gx%g" + (/ (* scale xres) (preview-get-magnification)) + (/ (* scale yres) (preview-get-magnification)))) + +(defun preview-gs-behead-outstanding (err) + "Remove leading element of outstanding queue after error. +Return element if non-nil. ERR is the error string to +show as response of Ghostscript." + (let ((ov (pop preview-gs-outstanding))) + (when ov + (preview-gs-flag-error ov err) + (overlay-put ov 'queued nil)) + ov)) + +(defvar preview-gs-command-line nil) +(make-variable-buffer-local 'preview-gs-command-line) +(defvar preview-gs-file nil) +(make-variable-buffer-local 'preview-gs-file) + +(defcustom preview-fast-conversion t + "Set this for single-file PostScript conversion. +This will have no effect when `preview-image-type' is +set to `postscript'." + :group 'preview-latex + :type 'boolean) + +(defun preview-string-expand (arg &optional separator) + "Expand ARG as a string. +It can already be a string. Or it can be a list, then it is +recursively evaluated using SEPARATOR as separator. If a list +element is in itself a CONS cell, the CAR of the list (after symbol +dereferencing) can evaluate to either a string, in which case it is +used as a separator for the rest of the list, +or a boolean (t or nil) in which case the rest of the list is +either evaluated and concatenated or ignored, respectively. +ARG can be a symbol, and so can be the CDR +of a cell used for string concatenation." + (cond + ((stringp arg) arg) + ((consp arg) + (mapconcat + #'identity + (delq nil + (mapcar + (lambda(x) + (if (consp x) + (let ((sep (car x))) + (while (and (symbolp sep) + (not (memq sep '(t nil)))) + (setq sep (symbol-value sep))) + (if (stringp sep) + (preview-string-expand (cdr x) sep) + (and sep + (preview-string-expand (cdr x))))) + (preview-string-expand x))) + arg)) + (or separator ""))) + ((and (symbolp arg) (not (memq arg '(t nil)))) + (preview-string-expand (symbol-value arg) separator)) + (t (error "Bad string expansion")))) + +(defconst preview-expandable-string + (let ((f (lambda (x) + `(choice + string + (repeat :tag "Concatenate" + (choice + string + (cons :tag "Separated list" + (choice (string :tag "Separator") + (symbol :tag + "Indirect separator or flag")) + ,x) + (symbol :tag "Indirect variable (no separator)"))) + (symbol :tag "Indirect variable (with separator)"))))) + (funcall f (funcall f 'sexp))) + "Type to be used for `preview-string-expand'. +Just a hack until we get to learn how to do this properly. +Recursive definitions are not popular with Emacs, +so we define this type just two levels deep. This +kind of expandible string can either be just a string, or a +cons cell with a separator string in the CAR, and either +an explicit list of elements in the CDR, or a symbol to +be consulted recursively.") + +(defcustom preview-dvipng-command + "dvipng -picky -noghostscript %d -o %m/prev%%03d.png" + "Command used for converting to separate PNG images. + +You might specify options for converting to other image types, +but then you'll need to adapt `preview-dvipng-image-type'." + :group 'preview-latex + :type 'string) + +(defcustom preview-dvipng-image-type + 'png + "Image type that dvipng produces. + +You'll need to change `preview-dvipng-command' too, +if you customize this." + :group 'preview-latex + :type '(choice (const png) + (const gif) + (symbol :tag "Other" :value png))) + +(defcustom preview-dvips-command + "dvips -Pwww -i -E %d -o %m/preview.000" + "Command used for converting to separate EPS images." + :group 'preview-latex + :type 'string) + +(defcustom preview-fast-dvips-command + "dvips -Pwww %d -o %m/preview.ps" + "Command used for converting to a single PS file." + :group 'preview-latex + :type 'string) + +(defcustom preview-pdf2dsc-command + "pdf2dsc %(O?pdf) %m/preview.dsc" + "Command used for generating dsc from a PDF file." + :group 'preview-latex + :type 'string) + +(defun preview-gs-queue-empty () + "Kill off everything remaining in `preview-gs-queue'." + (mapc #'preview-delete preview-gs-outstanding) + (dolist (ov preview-gs-queue) + (if (overlay-get ov 'queued) + (preview-delete ov))) + (setq preview-gs-outstanding nil) + (setq preview-gs-queue nil)) + +(defvar preview-error-condition nil + "Last error raised and to be reported.") + +(defun preview-log-error (err context &optional process) + "Log an error message to run buffer. +ERR is the caught error syndrome, CONTEXT is where it +occured, PROCESS is the process for which the run-buffer +is to be used." + (when (or (null process) (buffer-name (process-buffer process))) + (with-current-buffer (or (and process + (process-buffer process)) + (current-buffer)) + (save-excursion + (goto-char (or (and process + (process-buffer process) + (marker-buffer (process-mark process)) + (process-mark process)) + (point-max))) + (insert-before-markers + (format "%s: %s\n" + context (error-message-string err))) + (display-buffer (current-buffer))))) + (setq preview-error-condition err)) + +(defun preview-reraise-error (&optional process) + "Raise an error that has been logged. +Makes sure that PROCESS is removed from the \"Compilation\" +tag in the mode line." + (when preview-error-condition + (unwind-protect + (signal (car preview-error-condition) (cdr preview-error-condition)) + (setq preview-error-condition nil + compilation-in-progress (delq process compilation-in-progress))))) + +(defcustom preview-pdf-color-adjust-method t + "Method to adjust colors of images generated from PDF. +It is not consulted when the latex command produces DVI files. + +The valid values are: + +t: preview-latex transfers the foreground and background colors +of Emacs to the generated images. This option requires that +Ghostscript has working DELAYBIND feature, thus is invalid with +gs 9.27 (and possibly < 9.27). + +`compatible': preview-latex uses another mothod to transfer +colors. This option is provided for compatibility with older gs. +See the below explanation for detail. + +nil: no adjustment is done and \"black on white\" image is +generated regardless of Emacs color. This is provided for fallback for +gs 9.27 users with customized foreground color. See the below +explanation for detail. + +When the latex command produces PDF rather than DVI and Emacs has +non-trivial foreground color, the traditional method (`compatible') +makes gs >= 9.27 to stop with error. Here, \"non-trivial foreground +color\" includes customized themes. + +If you use such non-trivial foreground color and the version of +Ghostscript equals to 9.27, you have two options: + +- Choose the value `compatible' and customize +`preview-reference-face' to have default (black) foreground +color. This makes the generated image almost non-readable on +dark background, so the next option would be your only choice in +that case. +- Choose the value nil, which forces plain \"black on white\" +appearance for the generated image. You can at least read what +are written in the image although they may not match with your +Emacs color well." + :group 'preview-appearance + :type '(choice + (const :tag "Adjust to Emacs color (gs > 9.27)" t) + (const :tag "Compatibility for gs =< 9.27" compatible) + (const :tag "No adjustment (B/W, for gs 9.27)" nil))) + +(defun preview-gs-sentinel (process string) + "Sentinel function for rendering process. +Gets the default PROCESS and STRING arguments +and tries to restart Ghostscript if necessary." + (condition-case err + (let ((status (process-status process))) + (when (memq status '(exit signal)) + (setq compilation-in-progress (delq process compilation-in-progress))) + (when (buffer-name (process-buffer process)) + (with-current-buffer (process-buffer process) + (goto-char (point-max)) + (insert-before-markers "\n" mode-name " " string) + (forward-char -1) + (insert " at " + (substring (current-time-string) 0 -5)) + (forward-char 1) + (TeX-command-mode-line process) + (when (memq status '(exit signal)) + ;; process died. + ;; Throw away culprit, go on. + (let* ((err (concat preview-gs-answer "\n" + (process-name process) " " string)) + (ov (preview-gs-behead-outstanding err))) + (when (and (null ov) preview-gs-queue) + (save-excursion + (goto-char (if (marker-buffer (process-mark process)) + (process-mark process) + (point-max))) + (insert-before-markers err))) + (delete-process process) + (if (or (null ov) + (eq status 'signal)) + ;; if process was killed explicitly by signal, or if nothing + ;; was processed, we give up on the matter altogether. + (progn + (when preview-ps-file + (condition-case nil + (preview-delete-file preview-ps-file) + (file-error nil))) + (preview-gs-queue-empty)) + + ;; restart only if we made progress since last call + (let (filenames) + (dolist (ov preview-gs-outstanding) + (setq filenames (overlay-get ov 'filenames)) + (condition-case nil + (preview-delete-file (nth 1 filenames)) + (file-error nil)) + (setcdr filenames nil))) + (setq preview-gs-queue (nconc preview-gs-outstanding + preview-gs-queue)) + (setq preview-gs-outstanding nil) + (preview-gs-restart))))))) + (error (preview-log-error err "Ghostscript" process))) + (preview-reraise-error process)) + +(defun preview-gs-filter (process string) + "Filter function for processing Ghostscript output. +Gets the usual PROCESS and STRING parameters, see +`set-process-filter' for a description." + (with-current-buffer (process-buffer process) + (setq preview-gs-answer (concat preview-gs-answer string)) + (while (string-match "GS\\(<[0-9]+\\)?>" preview-gs-answer) + (let* ((pos (match-end 0)) + (answer (substring preview-gs-answer 0 pos))) + (setq preview-gs-answer (substring preview-gs-answer pos)) + (condition-case err + (preview-gs-transact process answer) + (error (preview-log-error err "Ghostscript filter" process)))))) + (preview-reraise-error)) + +(defun preview-gs-restart () + "Start a new Ghostscript conversion process." + (when preview-gs-queue + (if preview-gs-sequence + (setcar preview-gs-sequence (1+ (car preview-gs-sequence))) + (setq preview-gs-sequence (list 1))) + (setcdr preview-gs-sequence 1) + (let* ((process-connection-type nil) + (outfile (format "-sOutputFile=%s" + (file-relative-name + (format "%s/pr%d-%%d.%s" + (car TeX-active-tempdir) + (car preview-gs-sequence) + preview-gs-image-type)))) + (process + (apply #'start-process + "Preview-Ghostscript" + (current-buffer) + preview-gs-command + outfile + preview-gs-command-line))) + (goto-char (point-max)) + (insert-before-markers "Running `Preview-Ghostscript' with ``" + (mapconcat #'shell-quote-argument + (append + (list preview-gs-command + outfile) + preview-gs-command-line) + " ") "''\n") + (setq preview-gs-answer "") + (set-process-query-on-exit-flag process nil) + (set-process-sentinel process #'preview-gs-sentinel) + (set-process-filter process #'preview-gs-filter) + (process-send-string process preview-gs-init-string) + (setq mode-name "Preview-Ghostscript") + (push process compilation-in-progress) + (TeX-command-mode-line process) + (force-mode-line-update) + process))) + +(defun preview-gs-open (&optional setup) + "Start a Ghostscript conversion pass. +SETUP may contain a parser setup function." + (let ((image-info (assq preview-image-type preview-gs-image-type-alist))) + (setq preview-gs-image-type (nth 1 image-info)) + (setq preview-gs-sequence nil) + (setq preview-gs-command-line (append + preview-gs-options + (nthcdr 2 image-info)) + preview-gs-init-string + (format "{DELAYSAFER{.setsafe}if}stopped pop\ +/.preview-BP currentpagedevice/BeginPage get dup \ +null eq{pop{pop}bind}if def\ +<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get 1 ne or\ +{.preview-BP %s}{pop}ifelse}bind/PageSize[1 1]>>setpagedevice\ +/preview-do{/.preview-ST[count 4 roll save]def dup length 0 eq\ +{pop}{setpagedevice}{ifelse exec}\ +stopped{handleerror quit}if \ +.preview-ST aload pop restore}bind def " + (preview-gs-color-string + preview-colors + ;; Compatibility for gs 9.27 with non-trivial + ;; foreground color and dark background. + ;; Suppress color adjustment with PDF backend + ;; when `preview-pdf-color-adjust-method' is nil. + (and (not preview-pdf-color-adjust-method) + ;; The switch `preview-parsed-pdfoutput' isn't + ;; set before parsing the latex output, so use + ;; heuristic here. + (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode + (not (TeX-PDF-from-DVI)))))))) + (preview-gs-queue-empty) + (preview-parse-messages (or setup #'preview-gs-dvips-process-setup)))) + +(defun preview-gs-color-value (value) + "Return string to be used as color value for an RGB component. +Conversion from Emacs color numbers (0 to 65535) in VALUE +to Ghostscript floats." + (format "%g" (/ value 65535.0))) + +(defun preview-pdf-color-string (colors) + "Return a string that patches PDF foreground color to work properly." + (let ((fg (aref colors 1))) + (if fg + (cond ((eq preview-pdf-color-adjust-method t) + ;; New code for gs > 9.27. + ;; This assumes DELAYBIND feature, which is known to be + ;; broken in gs 9.27 (and possibly, < 9.27). + ;; <URL:https://lists.gnu.org/archive/html/auctex-devel/2019-07/msg00000.html> + ;; DELAYBIND is sometimes mentioned in association with + ;; security holes in the changelog of Ghostscript: + ;; <URL:https://www.ghostscript.com/doc/9.27/History9.htm> + ;; Thus we might have to be prepared for removal of this + ;; feature in future Ghostscript. + (concat + "/initgraphics { + //initgraphics + /RG where { + pop " + (mapconcat #'preview-gs-color-value fg " ") + " 3 copy rg RG + } if +} bind def .bindnow ")) + ((eq preview-pdf-color-adjust-method 'compatible) + ;; Traditional code for gs < 9.27. + (concat + "/GS_PDF_ProcSet GS_PDF_ProcSet dup maxlength dict copy dup begin\ +/graphicsbeginpage{//graphicsbeginpage exec " + (mapconcat #'preview-gs-color-value fg " ") + " 3 copy rg RG}bind store end readonly store ")) + (;; Do nothing otherwise. + t + ""))))) + +(defun preview-gs-color-string (colors &optional suppress-fgbg) + "Return a string setting up COLORS. +If optional argument SUPPRESS-FGBG is non-nil, behave as if FG/BG +colors were just the default value." + (let ((bg (and (not suppress-fgbg) + (aref colors 0))) + (fg (and (not suppress-fgbg) + (aref colors 1))) + (mask (aref colors 2)) + (border (aref colors 3))) + (concat + (and (or (and mask border) (and bg (not fg))) + "gsave ") + (and bg + (concat + (mapconcat #'preview-gs-color-value bg " ") + " setrgbcolor clippath fill ")) + (and mask border + (format "%s setrgbcolor false setstrokeadjust %g \ +setlinewidth clippath strokepath \ +matrix setmatrix true \ +{2 index{newpath}if round exch round exch moveto pop false}\ +{round exch round exch lineto}{curveto}{closepath}\ +pathforall pop fill " + (mapconcat #'preview-gs-color-value mask " ") + (* 2 border))) + ;; I hate antialiasing. Warp border to integral coordinates. + (and (or (and mask border) (and bg (not fg))) + "grestore ") + (and fg + (concat + (mapconcat #'preview-gs-color-value fg " ") + " setrgbcolor"))))) + +(defun preview-dvipng-color-string (colors res) + "Return color setup tokens for dvipng. +Makes a string of options suitable for passing to dvipng. +Pure borderless black-on-white will return an empty string." + (let + ((bg (aref colors 0)) + (fg (aref colors 1)) + (mask (aref colors 2)) + (border (aref colors 3))) + (concat + (and bg + (format "--bg \"rgb %s\" " + (mapconcat #'preview-gs-color-value bg " "))) + (and fg + (format "--fg \"rgb %s\" " + (mapconcat #'preview-gs-color-value fg " "))) + (and mask border + (format "--bd \"rgb %s\" " + (mapconcat #'preview-gs-color-value mask " "))) + (and border + (format "--bd %d" (max 1 (round (/ (* res border) 72.0)))))))) + +(defsubst preview-supports-image-type (imagetype) + "Check if IMAGETYPE is supported." + (image-type-available-p imagetype)) + +(defun preview-gs-dvips-process-setup () + "Set up Dvips process for conversions via gs." + (unless (preview-supports-image-type preview-gs-image-type) + (error "preview-image-type setting '%s unsupported by this Emacs" + preview-gs-image-type)) + (setq preview-gs-command-line (append + preview-gs-command-line + (list (preview-gs-resolution + (preview-hook-enquiry preview-scale) + (car preview-resolution) + (cdr preview-resolution))))) + (if preview-parsed-pdfoutput + (preview-pdf2dsc-process-setup) + (let ((process (preview-start-dvips preview-fast-conversion))) + (setq TeX-sentinel-function #'preview-gs-dvips-sentinel) + (list process (current-buffer) TeX-active-tempdir preview-ps-file + preview-gs-image-type)))) + +(defun preview-dvipng-process-setup () + "Set up dvipng process for conversion." + (setq preview-gs-command-line (append + preview-gs-command-line + (list (preview-gs-resolution + (preview-hook-enquiry preview-scale) + (car preview-resolution) + (cdr preview-resolution))))) + (if preview-parsed-pdfoutput + (if (preview-supports-image-type preview-gs-image-type) + (preview-pdf2dsc-process-setup) + (error "preview-image-type setting '%s unsupported by this Emacs" + preview-gs-image-type)) + (unless (preview-supports-image-type preview-dvipng-image-type) + (error "preview-dvipng-image-type setting '%s unsupported by this Emacs" + preview-dvipng-image-type)) + (let ((process (preview-start-dvipng))) + (setq TeX-sentinel-function #'preview-dvipng-sentinel) + (list process (current-buffer) TeX-active-tempdir t + preview-dvipng-image-type)))) + + +(defun preview-pdf2dsc-process-setup () + (let ((process (preview-start-pdf2dsc))) + (setq TeX-sentinel-function #'preview-pdf2dsc-sentinel) + (list process (current-buffer) TeX-active-tempdir preview-ps-file + preview-gs-image-type))) + +(defun preview-dvips-abort () + "Abort a Dvips run." + (preview-gs-queue-empty) + (condition-case nil + (delete-file + (let ((gsfile preview-gs-file)) + (with-current-buffer TeX-command-buffer + (funcall (car gsfile) "dvi" t)))) + (file-error nil)) + (when preview-ps-file + (condition-case nil + (preview-delete-file preview-ps-file) + (file-error nil))) + (setq TeX-sentinel-function nil)) + +(defalias 'preview-dvipng-abort #'preview-dvips-abort) +; "Abort a DviPNG run.") + +(defun preview-gs-dvips-sentinel (process _command &optional gsstart) + "Sentinel function for indirect rendering DviPS process. +The usual PROCESS and COMMAND arguments for +`TeX-sentinel-function' apply. Starts gs if GSSTART is set." + (condition-case err + (let ((status (process-status process)) + (gsfile preview-gs-file)) + (cond ((eq status 'exit) + (delete-process process) + (setq TeX-sentinel-function nil) + (condition-case nil + (delete-file + (with-current-buffer TeX-command-buffer + (funcall (car gsfile) "dvi" t))) + (file-error nil)) + (if preview-ps-file + (preview-prepare-fast-conversion)) + (when gsstart + (if preview-gs-queue + (preview-gs-restart) + (when preview-ps-file + (condition-case nil + (preview-delete-file preview-ps-file) + (file-error nil)))))) + ((eq status 'signal) + (delete-process process) + (preview-dvips-abort)))) + (error (preview-log-error err "DviPS sentinel" process))) + (preview-reraise-error process)) + +(defun preview-pdf2dsc-sentinel (process _command &optional gsstart) + "Sentinel function for indirect rendering PDF process. +The usual PROCESS and COMMAND arguments for +`TeX-sentinel-function' apply. Starts gs if GSSTART is set." + (condition-case err + (let ((status (process-status process))) + (cond ((eq status 'exit) + (delete-process process) + (setq TeX-sentinel-function nil) + ;; Add DELAYBIND option for adjustment of foreground + ;; color to work. + (if (and (eq preview-pdf-color-adjust-method t) + (aref preview-colors 1)) + (setq preview-gs-command-line (append + preview-gs-command-line + '("-dDELAYBIND")))) + (setq preview-gs-init-string + (concat preview-gs-init-string + (preview-pdf-color-string preview-colors))) + (preview-prepare-fast-conversion) + (when gsstart + (if preview-gs-queue + (preview-gs-restart) + (when preview-ps-file + (condition-case nil + (preview-delete-file preview-ps-file) + (file-error nil)))))) + ((eq status 'signal) + (delete-process process) + (preview-dvips-abort)))) + (error (preview-log-error err "PDF2DSC sentinel" process))) + (preview-reraise-error process)) + +(defun preview-gs-close (process closedata) + "Clean up after PROCESS and set up queue accumulated in CLOSEDATA." + (setq preview-gs-queue (nconc preview-gs-queue closedata)) + (if process + (if preview-gs-queue + (if TeX-process-asynchronous + (if (and (eq (process-status process) 'exit) + (null TeX-sentinel-function)) + ;; Process has already finished and run sentinel + (progn + (when preview-ps-file + (condition-case nil + (preview-delete-file preview-ps-file) + (file-error nil))) + (preview-gs-restart)) + (setq TeX-sentinel-function + (let ((fun (if preview-parsed-pdfoutput + #'preview-pdf2dsc-sentinel + #'preview-gs-dvips-sentinel))) + (lambda (process command) + (funcall fun process command t))))) + (TeX-synchronous-sentinel "Preview-DviPS" (cdr preview-gs-file) + process)) + ;; pathological case: no previews although we sure thought so. + (delete-process process) + (unless (eq (process-status process) 'signal) + (preview-dvips-abort))))) + +(defun preview-dvipng-sentinel (process _command &optional placeall) + "Sentinel function for indirect rendering DviPNG process. +The usual PROCESS and COMMAND arguments for +`TeX-sentinel-function' apply. Places all snippets if PLACEALL is set." + (condition-case err + (let ((status (process-status process))) + (cond ((eq status 'exit) + (delete-process process) + (setq TeX-sentinel-function nil) + (when placeall + (preview-dvipng-place-all))) + ((eq status 'signal) + (delete-process process) + (preview-dvipng-abort)))) + (error (preview-log-error err "DviPNG sentinel" process))) + (preview-reraise-error process)) + +(defun preview-dvipng-close (process closedata) + "Clean up after PROCESS and set up queue accumulated in CLOSEDATA." + (if preview-parsed-pdfoutput + (preview-gs-close process closedata) + (setq preview-gs-queue (nconc preview-gs-queue closedata)) + (if process + (if preview-gs-queue + (if TeX-process-asynchronous + (if (and (eq (process-status process) 'exit) + (null TeX-sentinel-function)) + ;; Process has already finished and run sentinel + (preview-dvipng-place-all) + (setq TeX-sentinel-function (lambda (process command) + (preview-dvipng-sentinel + process + command + t)))) + (TeX-synchronous-sentinel "Preview-DviPNG" (cdr preview-gs-file) + process)) + ;; pathological case: no previews although we sure thought so. + (delete-process process) + (unless (eq (process-status process) 'signal) + (preview-dvipng-abort)))))) + +(defun preview-dsc-parse (file) + "Parse DSC comments of FILE. +Return a vector with offset/length pairs corresponding to +the pages. Page 0 corresponds to the initialization section." + (with-temp-buffer + (set-buffer-multibyte nil) + (insert-file-contents-literally file) + (let ((last-pt (point-min)) + trailer + pagelist + lastbegin + pt + case-fold-search + (level 0)) + (while (search-forward-regexp "\ +%%\\(?:\\(BeginDocument:\\)\\|\ +\\(EndDocument[\n\r]\\)\\|\ +\\(Page:\\)\\|\ +\\(Trailer[\n\r]\\)\\)" nil t) + (setq pt (match-beginning 0)) + (cond ((null (memq (char-before pt) '(?\C-j ?\C-m nil)))) + (trailer (error "Premature %%%%Trailer in `%s' at offsets %d/%d" + file trailer pt)) + ((match-beginning 1) + (if (zerop level) + (setq lastbegin pt)) + (setq level (1+ level))) + ((match-beginning 2) + (if (zerop level) + (error "Unmatched %%%%EndDocument in `%s' at offset %d" + file pt) + (setq level (1- level)))) + ((> level 0)) + ((match-beginning 3) + (push (list last-pt (- pt last-pt)) pagelist) + (setq last-pt pt)) + ((match-beginning 4) + (setq trailer pt)))) + (unless (zerop level) + (error "Unmatched %%%%BeginDocument in `%s' at offset %d" + file lastbegin)) + (push (list last-pt + (- (or trailer (point-max)) last-pt)) pagelist) + (vconcat (nreverse pagelist))))) + +(defun preview-gs-dsc-cvx (page dsc) + "Generate PostScript code accessing PAGE in the DSC object. +The returned PostScript code will need the file on +top of the stack, and will replace it with an executable +object corresponding to the wanted page." + (let ((curpage (aref dsc page))) + (format "dup %d setfileposition %d()/SubFileDecode filter cvx" + (1- (car curpage)) (nth 1 curpage)))) + +(defun preview-ps-quote-filename (str &optional nonrel) + "Make a PostScript string from filename STR. +The file name is first made relative unless +NONREL is not nil." + (unless nonrel (setq str (file-relative-name str))) + (let ((index 0)) + (while (setq index (string-match "[\\()]" str index)) + (setq str (replace-match "\\\\\\&" t nil str) + index (+ 2 index))) + (concat "(" str ")"))) + +(defun preview-prepare-fast-conversion () + "This fixes up all parameters for fast conversion." + (let* ((file (if (consp (car preview-ps-file)) + (if (consp (caar preview-ps-file)) + (car (last (caar preview-ps-file))) + (caar preview-ps-file)) + (car preview-ps-file))) + (all-files (if (and (consp (car preview-ps-file)) + (consp (caar preview-ps-file))) + (caar preview-ps-file) + (list file)))) + (setq preview-gs-dsc (preview-dsc-parse file)) + (setq preview-gs-init-string + ;; Add commands for revised file access controls introduced + ;; after gs 9.27 (bug#37719) + (concat (format "systemdict /.addcontrolpath known {%s} if " + (mapconcat (lambda (f) + (format "/PermitFileReading %s .addcontrolpath" + (preview-ps-quote-filename f))) + all-files "\n")) + (format "{<</PermitFileReading[%s]>> setuserparams \ +.locksafe} stopped pop " + (mapconcat #'preview-ps-quote-filename all-files "")) + preview-gs-init-string + (format " %s(r)file /.preview-ST 1 index def %s exec .preview-ST " + (preview-ps-quote-filename file) + (preview-gs-dsc-cvx 0 preview-gs-dsc)))))) + +(defun preview-gs-urgentize (ov buff) + "Make a displayed overlay render with higher priority. +This function is used in fake conditional display properties +for reordering the conversion order to prioritize on-screen +images. OV is the overlay in question, and BUFF is the +Ghostscript process buffer where the buffer-local queue +is located." + ;; It does not matter that ov gets queued twice in that process: the + ;; first version to get rendered will clear the 'queued property. + ;; It cannot get queued more than twice since we remove the + ;; conditional display property responsible for requeuing here. + ;; We don't requeue if the overlay has been killed (its buffer made + ;; nil). Not necessary, but while we are checking... + ;; We must return t. + (preview-remove-urgentization ov) + (when (and (overlay-get ov 'queued) + (overlay-buffer ov)) + (with-current-buffer buff + (push ov preview-gs-queue))) + t) + +(defsubst preview-icon-copy (icon) + "Prepare a later call of `preview-replace-active-icon'." + + ;; This is just a GNU Emacs specific efficiency hack because it + ;; is easy to do. When porting, don't do anything complicated + ;; here, rather deliver just the unchanged icon and make + ;; `preview-replace-active-icon' do the necessary work of replacing + ;; the icon where it actually has been stored, probably + ;; in the car of the strings property of the overlay. This string + ;; might probably serve as a begin-glyph as well, in which case + ;; modifying the string in the strings property would change that + ;; glyph automatically. + + (cons 'image (cdr icon))) + +(defsubst preview-replace-active-icon (ov replacement) + "Replace the active Icon in OV by REPLACEMENT, another icon." + (let ((img (overlay-get ov 'preview-image))) + (setcdr (car img) (cdar replacement)) + (setcdr img (cdr replacement)))) + +(defun preview-gs-place (ov snippet box run-buffer tempdir ps-file _imagetype) + "Generate an image placeholder rendered over by Ghostscript. +This enters OV into all proper queues in order to make it render +this image for real later, and returns the overlay after setting +a placeholder image. SNIPPET gives the number of the +snippet in question for the file to be generated. +BOX is a bounding box if we already know one via TeX. +RUN-BUFFER is the buffer of the TeX process, +TEMPDIR is the correct copy of `TeX-active-tempdir', +PS-FILE is a copy of `preview-ps-file', IMAGETYPE is the image type +for the file extension." + (overlay-put ov 'filenames + (unless (eq ps-file t) + (list + (preview-make-filename + (or ps-file + (format "preview.%03d" snippet)) + tempdir)))) + (overlay-put ov 'queued + (vector box nil snippet)) + (overlay-put ov 'preview-image + (list (preview-icon-copy preview-nonready-icon))) + (preview-add-urgentization #'preview-gs-urgentize ov run-buffer) + (list ov)) + +(defvar view-exit-action) + +(eval-and-compile + (defvar preview-button-1 [mouse-2]) + (defvar preview-button-2 [mouse-3])) + +(defmacro preview-make-clickable (&optional map glyph helpstring click1 click2) + "Generate a clickable string or keymap. +If MAP is non-nil, it specifies a keymap to add to, otherwise +a new one is created. If GLYPH is given, the result is made +to display it wrapped in a string. In that case, +HELPSTRING is a format string with one or two %s specifiers +for preview's clicks, displayed as a help-echo. CLICK1 and CLICK2 +are functions to call on preview's clicks." + `(let ((resmap ,(or map '(make-sparse-keymap)))) + ,@(if click1 + `((define-key resmap preview-button-1 ,click1))) + ,@(if click2 + `((define-key resmap preview-button-2 ,click2))) + ,(if glyph + `(propertize + "x" + 'display ,glyph + 'mouse-face 'highlight + 'help-echo + ,(if (stringp helpstring) + (format helpstring preview-button-1 preview-button-2) + `(format ,helpstring preview-button-1 preview-button-2)) + 'keymap resmap) + 'resmap))) + +(defun preview-mouse-open-error (string) + "Display STRING in a new view buffer on click." + (let ((buff (get-buffer-create + "*Preview-Ghostscript-Error*"))) + (with-current-buffer buff + (kill-all-local-variables) + (set (make-local-variable 'view-exit-action) #'kill-buffer) + (setq buffer-undo-list t) + (erase-buffer) + (insert string) + (goto-char (point-min))) + (view-buffer-other-window buff))) + +(defun preview-mouse-open-eps (file &optional position) + "Display eps FILE in a view buffer on click. +Place point at POSITION, else beginning of file." + (let ((default-mode + ;; FIXME: Yuck! Just arrange for the file name to have the right + ;; extension instead! + (assoc-default "x.ps" auto-mode-alist #'string-match)) + (buff (get-file-buffer file))) + (save-excursion + (if buff + (pop-to-buffer buff) + (view-file-other-window file)) + (if (and (eq major-mode (default-value 'major-mode)) + default-mode) + (funcall default-mode)) + (goto-char (or position (point-min))) + (message "%s" (substitute-command-keys "\ +Try \\[ps-run-start] \\[ps-run-buffer] and \ +\\<ps-run-mode-map>\\[ps-run-mouse-goto-error] on error offset."))))) + +(defun preview-gs-flag-error (ov err) + "Make an eps error flag in overlay OV for ERR string." + (let* ((filenames (overlay-get ov 'filenames)) + (file (car (nth 0 filenames))) + ;; FIXME: This format isn't equal to actual invocation of gs + ;; command constructed in `preview-gs-restart', which + ;; contains "%d". + (outfile (format "-sOutputFile=%s" + (file-relative-name + (car (nth 1 filenames))))) + (ps-open + (let ((string + (concat + (mapconcat #'shell-quote-argument + (append (list + preview-gs-command + outfile) + preview-gs-command-line) + " ") + "\nGS>" + preview-gs-init-string + (aref (overlay-get ov 'queued) 1) + err))) + (lambda () (interactive "@") (preview-mouse-open-error string)))) + (str + (preview-make-clickable + nil + preview-error-icon + "%s views error message +%s more options" + ps-open + (let ((args + (if preview-ps-file + (list + (if (consp (car file)) (nth 1 (car file)) (car file)) + (nth 0 (aref preview-gs-dsc + (aref (overlay-get ov 'queued) 2)))) + (list file)))) + (lambda () (interactive) + (popup-menu + `("PostScript error" + ["View error" ,ps-open] + ["View source" ,(lambda () (interactive "@") + (apply #'preview-mouse-open-eps + args))]))))))) + (overlay-put ov 'strings (cons str str)) + (preview-toggle ov))) + +(defun preview-gs-transact (process answer) + "Work off Ghostscript transaction. +This routine is the action routine called via the process filter. +The Ghostscript process buffer of PROCESS will already be selected, and +and the standard output of Ghostscript up to the next prompt will be +given as ANSWER." + (let ((ov (pop preview-gs-outstanding)) + (have-error (not + (string-match "\\`GS\\(<[0-9]+\\)?>\\'" answer )))) + (when (and ov (overlay-buffer ov)) + (let ((queued (overlay-get ov 'queued))) + (when queued + (let* ((bbox (aref queued 0)) + (filenames (overlay-get ov 'filenames)) + (oldfile (nth 0 filenames)) + (newfile (nth 1 filenames))) + (if have-error + (preview-gs-flag-error ov answer) + (condition-case nil + (preview-delete-file oldfile) + (file-error nil)) + (overlay-put ov 'filenames (cdr filenames)) + (preview-replace-active-icon + ov + (preview-create-icon (car newfile) + preview-gs-image-type + (preview-ascent-from-bb + bbox) + (aref preview-colors 2)))) + (overlay-put ov 'queued nil))))) + (while (and (< (length preview-gs-outstanding) + preview-gs-outstanding-limit) + (setq ov (pop preview-gs-queue))) + (let ((queued (overlay-get ov 'queued))) + (when (and queued + (not (memq ov preview-gs-outstanding)) + (overlay-buffer ov)) + (let* ((filenames (overlay-get ov 'filenames)) + (oldfile (car (nth 0 + (nconc filenames + (list + (preview-make-filename + (format "pr%d-%d.%s" + (car preview-gs-sequence) + (cdr preview-gs-sequence) + preview-gs-image-type) + TeX-active-tempdir)))))) + (bbox (aset queued 0 + (or (and preview-prefer-TeX-bb + (aref queued 0)) + (and (stringp oldfile) + (preview-extract-bb + oldfile)) + (aref queued 0) + (error "No bounding box")))) + (snippet (aref queued 2)) + (gs-line + (format + "%s<<%s>>preview-do\n" + (if preview-ps-file + (concat "dup " + (preview-gs-dsc-cvx + snippet + preview-gs-dsc)) + (format "%s(r)file cvx" + (preview-ps-quote-filename + (if (listp oldfile) + (car (last oldfile)) + oldfile)))) + (if preview-parsed-tightpage + "" + (format "/PageSize[%g %g]/PageOffset[%g \ +%g[1 1 dtransform exch]{0 ge{neg}if exch}forall]" + (- (aref bbox 2) (aref bbox 0)) + (- (aref bbox 3) (aref bbox 1)) + (aref bbox 0) (aref bbox 1)))))) + (setcdr preview-gs-sequence (1+ (cdr preview-gs-sequence))) + (setq preview-gs-outstanding + (nconc preview-gs-outstanding + (list ov))) + (aset queued 1 gs-line) + ;; ignore errors because of dying processes: they will get + ;; caught by the sentinel, anyway. + (condition-case nil + (process-send-string + process + gs-line) + (error nil)))))) + (unless preview-gs-outstanding + (condition-case nil + (process-send-eof process) + (error nil))))) + +(defun preview-hook-enquiry (hook) + "Gets a value from a configured hook. +HOOK is a list or single item, for which the first resolving to +non-nil counts. Entries can be a callable function, or +a symbol that is consulted, or a value. Lists are evaluated +recursively." + (cond ((functionp hook) + (funcall hook)) + ((consp hook) + (let (res) + (while (and (not res) hook) + (setq res (preview-hook-enquiry (car hook)) + hook (cdr hook))) + res)) + ((and (symbolp hook) (boundp hook)) + (symbol-value hook)) + (t hook))) + +(defun preview-inherited-face-attribute (face attribute &optional inherit) + "Fetch face attribute while adhering to inheritance. +This searches FACE for an ATTRIBUTE, using INHERIT +for resolving unspecified or relative specs. See the fourth +argument of function `face-attribute' for details." + (face-attribute face attribute nil inherit)) + +(defcustom preview-scale-function #'preview-scale-from-face + "Scale factor for included previews. +This can be either a function to calculate the scale, or +a fixed number." + :group 'preview-appearance + :type '(choice (function-item preview-scale-from-face) + (const 1.0) + (number :value 1.0) + (function :value preview-scale-from-face))) + +(defcustom preview-default-document-pt 10 + "Assumed document point size for `preview-scale-from-face'. +If the point size (such as 11pt) of the document cannot be +determined from the document options itself, assume this size. +This is for matching screen font size and previews." + :group 'preview-appearance + :type + '(choice (const :tag "10pt" 10) + (const :tag "11pt" 11) + (const :tag "12pt" 12) + (number :tag "Other" :value 11.0))) + +(defcustom preview-document-pt-list '(preview-parsed-font-size + preview-auctex-font-size + preview-default-document-pt) + "How `preview-document-pt' figures out the document size." + :group 'preview-appearance + :type + '(repeat (choice + ;; FIXME: It seems that the bug mentioned below doesn't exist + ;; at least for emacs 27.2. + ;; This is a bug: type function seems to match variables, too. + (restricted-sexp :match-alternatives (functionp) + :tag "Function" :value preview-auctex-font-size) + (variable :value preview-parsed-font-size) + (number :value 11)))) + +(defun preview-auctex-font-size () + "Calculate the default font size of document. +If packages, classes or styles were called with an option +like 10pt, size is taken from the first such option if you +had let your document be parsed by AUCTeX." + (let* ((regexp "\\`\\([0-9]+\\)pt\\'") + (option + (or + (LaTeX-match-class-option regexp) + ;; We don't have `LaTeX-match-package-option'. + (TeX-member regexp + (apply #'append + (mapcar #'cdr LaTeX-provided-package-options)) + #'string-match)))) + (if option (string-to-number (match-string 1 option))))) + +(defsubst preview-document-pt () + "Calculate the default font size of document." + (preview-hook-enquiry preview-document-pt-list)) + +(defun preview-scale-from-face () + "Calculate preview scale from `preview-reference-face'. +This calculates the scale of EPS images from a document assumed +to have a default font size given by function `preview-document-pt' +so that they match the reference face in height." + (let ((d (/ (preview-inherited-face-attribute 'preview-reference-face :height + 'default) + 10.0))) + (lambda () (/ d (preview-document-pt))))) + +(defvar preview-min-spec nil + "Value to filter out too large icons. +Icon specs with :size larger than this value is not used. +Appropriate value is determined at run time according to the +display in use.") + +(defun preview-make-image (symbol) + "Make an image from a preview spec list. +The first spec that is workable (given the current setting of +`preview-min-spec') from the given SYMBOL is used here. The +icon is cached in the property list of the SYMBOL." + (let ((alist (get symbol 'preview-min-alist))) + (cdr (or + (assq preview-min-spec alist) + (car (put symbol 'preview-min-alist + (cons + (cons preview-min-spec + (preview-filter-specs + (symbol-value symbol))) + alist))))))) + +(defun preview-filter-specs (spec-list) + "Find the first of the fitting specs and make an image." + (let (image) + (while (and spec-list + (not (setq image + (catch 'preview-filter-specs + (preview-filter-specs-1 (car spec-list)))))) + (setq spec-list (cdr spec-list))) + image)) + +(defun preview-filter-specs-1 (specs) + (and specs + (if (get 'preview-filter-specs (car specs)) + (apply (get 'preview-filter-specs (car specs)) specs) + `(,(nth 0 specs) ,(nth 1 specs) + ,@(preview-filter-specs-1 (nthcdr 2 specs)))))) + +(put 'preview-filter-specs :min + #'(lambda (_keyword value &rest args) + (if (> value preview-min-spec) + (throw 'preview-filter-specs nil) + (preview-filter-specs-1 args)))) + +(put 'preview-filter-specs :file + #'(lambda (_keyword value &rest args) + `(:file ,(expand-file-name value (expand-file-name "images" + TeX-data-directory)) + ,@(preview-filter-specs-1 args)))) + +(defun preview-ascent-from-bb (bb) + "This calculates the image ascent from its bounding box. +The bounding box BB needs to be a 4-component vector of +numbers (can be float if available)." + ;; baseline is at 1in from the top of letter paper (11in), so it is + ;; at 10in from the bottom precisely, which is 720 in PostScript + ;; coordinates. If our bounding box has its bottom not above this + ;; line, and its top above, we can calculate a useful ascent value. + ;; If not, something is amiss. We just use 100 in that case. + + (let ((bottom (aref bb 1)) + (top (aref bb 3))) + (if (and (<= bottom 720) + (> top 720)) + (round (* 100.0 (/ (- top 720.0) (- top bottom)))) + 100))) + +(defface preview-face '((((background dark)) + (:background "dark slate gray")) + (t + (:background "beige"))) + "Face to use for the preview source." + :group 'preview-appearance) + +(defface preview-reference-face '((t nil)) + "Face consulted for colors and scale of active previews. +Fallback to :inherit and 'default implemented." + :group 'preview-appearance) + +(defcustom preview-auto-reveal + '(eval (preview-arrived-via (key-binding [left]) (key-binding [right]) + #'backward-char #'forward-char)) + "Cause previews to open automatically when entered. +Possibilities are: +t autoopens, +nil doesn't, +a symbol will have its value consulted if it exists, +defaulting to nil if it doesn't. +An integer will specify a maximum cursor movement distance. +Larger movements won't open the preview. +A CONS-cell means to call a function for determining the value. +The CAR of the cell is the function to call which receives +the CDR of the CONS-cell in the rest of the arguments, while +point and current buffer point to the position in question. +All of the options show reasonable defaults." + :group 'preview-appearance + :type '(choice (const :tag "Off" nil) + (const :tag "On" t) + (symbol :tag "Indirect variable" :value reveal-mode) + (integer :tag "Maximum distance" :value 1) + (cons :tag "Function call" + :value (eval (preview-arrived-via + (key-binding [left]) + (key-binding [right]))) + function (list :tag "Argument list" + (repeat :inline t sexp))))) + +(defun preview-auto-reveal-p (mode distance) + "Decide whether to auto-reveal. +Return non-nil if region should be auto-opened. +See `preview-auto-reveal' for definitions of MODE, which gets +set to `preview-auto-reveal'. DISTANCE specifies the movement +distance with which point has been reached in case it has been +a movement starting in the current buffer." + (cond ((symbolp mode) + (and (boundp mode) + (symbol-value mode))) + ((integerp mode) + (and distance (/= 0 distance) (<= (abs distance) mode))) + ((consp mode) + (apply (car mode) (cdr mode))) + (t mode))) + +(defun preview-arrived-via (&rest list) + "Indicate auto-opening. +Return non-nil if called by one of the commands in LIST." + (memq this-command list)) + +(defcustom preview-equality-transforms '(identity + preview-canonical-spaces) +"Transformation functions for region changes. +These functions are tried in turn on the strings from the +regions of a preview to decide whether a preview is to be considered +changed. If any transform leads to equal results, the preview is +considered unchanged." + :group 'preview-appearance + :type '(repeat function)) + +(defcustom preview-transparent-color '(highlight :background) + "Color to appear transparent in previews. +Set this to something unusual when using `preview-transparent-border', +to the default background in most other cases." + :type '(radio (const :tag "None" nil) + (const :tag "Autodetect" t) + (color :tag "By name" :value "white") + (list :tag "Take from face" + :value (default :background) + (face) + (choice :tag "What to take" + (const :tag "Background" :value :background) + (const :tag "Foreground" :value :foreground)))) + :group 'preview-appearance) + +;; Note that the following default introduces a border only when +;; Emacs blinks politely when point is on an image (the tested +;; unrelated function was introduced at about the time image blinking +;; became tolerable). +(defcustom preview-transparent-border nil + "Width of transparent border for previews in pt. +Setting this to a numeric value will add a border of +`preview-transparent-color' around images, and will turn +the heuristic-mask setting of images to default to 't since +then the borders are correctly detected even in case of +palette operations. If the transparent color is something +not present otherwise in the image, the cursor display +will affect just this border. A width of 0 is interpreted +by PostScript as meaning a single pixel, other widths are +interpreted as PostScript points (1/72 of 1in)" + :group 'preview-appearance + :type '(choice (const :value nil :tag "No border") + (number :value 1.5 :tag "Border width in pt"))) + +(defun preview-get-heuristic-mask () + "Get heuristic-mask to use for previews. +Consults `preview-transparent-color'." + (cond ((stringp preview-transparent-color) + (color-values preview-transparent-color)) + ((or (not (consp preview-transparent-color)) + (integerp (car preview-transparent-color))) + preview-transparent-color) + (t (color-values (preview-inherited-face-attribute + (nth 0 preview-transparent-color) + (nth 1 preview-transparent-color) + 'default))))) + +(defsubst preview-create-icon-1 (file type ascent border) + `(image + :file ,file + :type ,type + :ascent ,ascent + ,@(and border + '(:mask (heuristic t))))) + +(defun preview-create-icon (file type ascent border) + "Create an icon from FILE, image TYPE, ASCENT and BORDER." + (list + (preview-create-icon-1 file type ascent border) + file type ascent border)) + +(put 'preview-filter-specs :type + (lambda (_keyword value &rest args) + (if (image-type-available-p value) + `(image :type ,value + ,@(preview-filter-specs-1 args)) + (throw 'preview-filter-specs nil)))) + +(defun preview-import-image (image) + "Convert the printable IMAGE rendition back to an image." + (cond ((stringp image) + (propertize image 'face 'preview-face)) + ((eq (car image) 'image) + image) + (t + (preview-create-icon-1 (nth 0 image) + (nth 1 image) + (nth 2 image) + (if (< (length image) 4) + (preview-get-heuristic-mask) + (nth 3 image)))))) + +;; No defcustom here: does not seem to make sense. + +(defvar preview-tb-icon-specs + '((:type xpm :file "prvtex24.xpm") + (:type xbm :file "prvtex24.xbm"))) + +(defvar preview-tb-icon nil) + +(defun preview-add-urgentization (fun ov &rest rest) + "Cause FUN (function call form) to be called when redisplayed. +FUN must be a form with OV as first argument, +REST as the remainder, returning T." + (let ((dispro (overlay-get ov 'display))) + (unless (eq (car dispro) 'when) + (overlay-put ov 'display `(when (,fun ,ov ,@rest) . ,dispro))))) + +(defun preview-remove-urgentization (ov) + "Undo urgentization of OV by `preview-add-urgentization'. +Return the old arguments to `preview-add-urgentization' +if there was any urgentization." + (let ((dispro (overlay-get ov 'display))) + (when (eq (car-safe dispro) 'when) + (prog1 + (car (cdr dispro)) + (overlay-put ov 'display (cdr (cdr dispro))))))) + +(defvar preview-overlay nil) + +(put 'preview-overlay + 'modification-hooks + '(preview-handle-modification)) + +(put 'preview-overlay + 'insert-in-front-hooks + '(preview-handle-insert-in-front)) + +(put 'preview-overlay + 'insert-behind-hooks + '(preview-handle-insert-behind)) + +;; We have to fake our way around atomicity. + +;; Here is the beef: for best intuitiveness, we want to have +;; insertions be carried out as expected before iconized text +;; passages, but we want to insert *into* the overlay when not +;; iconized. A preview that has become empty can not get content +;; again: we remove it. A disabled preview needs no insert-in-front +;; handler. + +(defvar preview-change-list nil + "List of tentatively changed overlays.") + +(defcustom preview-dump-threshold + "^ *\\\\begin *{document}[ %]*$" + "Regexp denoting end of preamble. +This is the location up to which preamble changes are considered +to require redumping of a format." + :group 'preview-latex + :type 'string) + +(defun preview-preamble-changed-function + (ov _after-change _beg _end &optional _length) + "Hook function for change hooks on preamble. +See info node `(elisp) Overlay Properties' for +definition of OV, AFTER-CHANGE, BEG, END and LENGTH." + (let ((format-cons (overlay-get ov 'format-cons))) + (preview-unwatch-preamble format-cons) + (preview-format-kill format-cons) + (setcdr format-cons t))) + +(defun preview-watch-preamble (file command format-cons) + "Set up a watch on master file FILE. +FILE can be an associated buffer instead of a filename. +COMMAND is the command that generated the format. +FORMAT-CONS contains the format info for the main +format dump handler." + (let ((buffer (if (bufferp file) + file + (find-buffer-visiting file))) ov) + (setcdr + format-cons + (cons command + (when buffer + (with-current-buffer buffer + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (unless (re-search-forward preview-dump-threshold nil t) + (error "Can't find preamble of `%s'" file)) + (setq ov (make-overlay (point-min) (point))) + (overlay-put ov 'format-cons format-cons) + (overlay-put ov 'insert-in-front-hooks + '(preview-preamble-changed-function)) + (overlay-put ov 'modification-hooks + '(preview-preamble-changed-function)) + ov)))))))) + +(defun preview-unwatch-preamble (format-cons) + "Stop watching a format on FORMAT-CONS. +The watch has been set up by `preview-watch-preamble'." + (when (consp (cdr format-cons)) + (when (cddr format-cons) + (delete-overlay (cddr format-cons))) + (setcdr (cdr format-cons) nil))) + +(defun preview-register-change (ov) + "Register not yet changed OV for verification. +This stores the old contents of the overlay in the +`preview-prechange' property and puts the overlay into +`preview-change-list' where `preview-check-changes' will +find it at some later point of time." + (unless (overlay-get ov 'preview-prechange) + (if (eq (overlay-get ov 'preview-state) 'disabled) + (overlay-put ov 'preview-prechange t) + (overlay-put ov 'preview-prechange + (save-restriction + (widen) + (buffer-substring-no-properties + (overlay-start ov) (overlay-end ov))))) + (push ov preview-change-list))) + +(defun preview-check-changes () + "Check whether the contents under the overlay have changed. +Disable it if that is the case. Ignores text properties." + (dolist (ov preview-change-list) + (condition-case nil + (with-current-buffer (overlay-buffer ov) + (let ((text (save-restriction + (widen) + (buffer-substring-no-properties + (overlay-start ov) (overlay-end ov))))) + (if (zerop (length text)) + (preview-delete ov) + (unless + (or (eq (overlay-get ov 'preview-state) 'disabled) + (preview-relaxed-string= + text (overlay-get ov 'preview-prechange))) + (overlay-put ov 'insert-in-front-hooks nil) + (overlay-put ov 'insert-behind-hooks nil) + (preview-disable ov))))) + (error nil)) + (overlay-put ov 'preview-prechange nil)) + (setq preview-change-list nil)) + +(defun preview-handle-insert-in-front + (ov after-change _beg end &optional _length) + "Hook function for `insert-in-front-hooks' property. +See info node `(elisp) Overlay Properties' for +definition of OV, AFTER-CHANGE, BEG, END and LENGTH." + (if after-change + (unless undo-in-progress + (if (eq (overlay-get ov 'preview-state) 'active) + (move-overlay ov end (overlay-end ov)))) + (preview-register-change ov))) + +(defun preview-handle-insert-behind + (ov after-change beg _end &optional _length) + "Hook function for `insert-behind-hooks' property. +This is needed in case `insert-before-markers' is used at the +end of the overlay. See info node `(elisp) Overlay Properties' +for definition of OV, AFTER-CHANGE, BEG, END and LENGTH." + (if after-change + (unless undo-in-progress + (if (eq (overlay-get ov 'preview-state) 'active) + (move-overlay ov (overlay-start ov) beg))) + (preview-register-change ov))) + +(defun preview-handle-modification + (ov after-change _beg _end &optional _length) + "Hook function for `modification-hooks' property. +See info node `(elisp) Overlay Properties' for +definition of OV, AFTER-CHANGE, BEG, END and LENGTH." + (unless after-change + (preview-register-change ov))) + +(defun preview-toggle (ov &optional arg event) + "Toggle visibility of preview overlay OV. +ARG can be one of the following: t displays the overlay, +nil displays the underlying text, and 'toggle toggles. +If EVENT is given, it indicates the window where the event +occured, either by being a mouse event or by directly being +the window in question. This may be used for cursor restoration +purposes." + (let ((old-urgent (preview-remove-urgentization ov)) + (preview-state + (if (if (eq arg 'toggle) + (null (eq (overlay-get ov 'preview-state) 'active)) + arg) + 'active + 'inactive)) + (strings (overlay-get ov 'strings))) + (unless (eq (overlay-get ov 'preview-state) 'disabled) + (overlay-put ov 'preview-state preview-state) + (if (eq preview-state 'active) + (progn + (overlay-put ov 'category 'preview-overlay) + (if (eq (overlay-start ov) (overlay-end ov)) + (overlay-put ov 'before-string (car strings)) + (dolist (prop '(display keymap mouse-face help-echo)) + (overlay-put ov prop + (get-text-property 0 prop (car strings)))) + (overlay-put ov 'before-string nil)) + (overlay-put ov 'face nil)) + (dolist (prop '(display keymap mouse-face help-echo)) + (overlay-put ov prop nil)) + (overlay-put ov 'face 'preview-face) + (unless (cdr strings) + (setcdr strings (preview-inactive-string ov))) + (overlay-put ov 'before-string (cdr strings))) + (if old-urgent + (apply #'preview-add-urgentization old-urgent)))) + (if event + (preview-restore-position + ov + (if (windowp event) + event + (posn-window (event-start event)))))) + +(defvar preview-marker (make-marker) + "Marker for fake intangibility.") + +(defvar preview-temporary-opened nil) + +(defvar preview-last-location nil + "Restored cursor position marker for reopened previews.") +(make-variable-buffer-local 'preview-last-location) + +(defun preview-mark-point () + "Mark position for fake intangibility." + (when (eq (get-char-property (point) 'preview-state) 'active) + (unless preview-last-location + (setq preview-last-location (make-marker))) + (set-marker preview-last-location (point)) + (set-marker preview-marker (point)) + (preview-move-point)) + (set-marker preview-marker (point))) + +(defun preview-restore-position (ov window) + "Tweak position after opening/closing preview. +The treated overlay OV has been triggered in WINDOW. This function +records the original buffer position for reopening, or restores it +after reopening. Note that by using the mouse, you can open/close +overlays not in the active window." + (when (eq (overlay-buffer ov) (window-buffer window)) + (with-current-buffer (overlay-buffer ov) + (if (eq (overlay-get ov 'preview-state) 'active) + (setq preview-last-location + (set-marker (or preview-last-location (make-marker)) + (window-point window))) + (when (and + (markerp preview-last-location) + (eq (overlay-buffer ov) (marker-buffer preview-last-location)) + (< (overlay-start ov) preview-last-location) + (> (overlay-end ov) preview-last-location)) + (set-window-point window preview-last-location)))))) + +(defun preview-move-point () + "Move point out of fake-intangible areas." + (preview-check-changes) + (let* (newlist (pt (point)) (lst (overlays-at pt)) distance) + (setq preview-temporary-opened + (dolist (ov preview-temporary-opened newlist) + (and (overlay-buffer ov) + (eq (overlay-get ov 'preview-state) 'inactive) + (if (and (eq (overlay-buffer ov) (current-buffer)) + (or (<= pt (overlay-start ov)) + (>= pt (overlay-end ov)))) + (preview-toggle ov t) + (push ov newlist))))) + (when lst + (if (or disable-point-adjustment + global-disable-point-adjustment + (preview-auto-reveal-p + preview-auto-reveal + (setq distance + (and (eq (marker-buffer preview-marker) + (current-buffer)) + (- pt (marker-position preview-marker)))))) + (preview-open-overlays lst) + (while lst + (setq lst + (if (and + (eq (overlay-get (car lst) 'preview-state) 'active) + (> pt (overlay-start (car lst)))) + (overlays-at + (setq pt (if (and distance (< distance 0)) + (overlay-start (car lst)) + (overlay-end (car lst))))) + (cdr lst)))) + (goto-char pt))))) + +(defun preview-open-overlays (list &optional pos) + "Open all previews in LIST, optionally restricted to enclosing POS." + (dolist (ovr list) + (when (and (eq (overlay-get ovr 'preview-state) 'active) + (or (null pos) + (and + (> pos (overlay-start ovr)) + (< pos (overlay-end ovr))))) + (preview-toggle ovr) + (push ovr preview-temporary-opened)))) + +(defun preview--open-for-replace (beg end &rest _) + "Make `query-replace' open preview text about to be replaced." + (preview-open-overlays (overlays-in beg end))) + +(defcustom preview-query-replace-reveal t + "Make `query-replace' autoreveal previews." + :group 'preview-appearance + :type 'boolean + :require 'preview + :set (lambda (symbol value) + (set-default symbol value) + (if value + (advice-add 'replace-highlight :before + #'preview--open-for-replace) + (advice-remove 'replace-highlight + #'preview--open-for-replace))) + :initialize #'custom-initialize-reset) + +(defun preview-relaxed-string= (&rest args) +"Check for functional equality of arguments. +The arguments ARGS are checked for equality by using +`preview-equality-transforms' on them until it is exhausted +or one transform returns equality." + (let ((lst preview-equality-transforms)) + (while (and lst (not (apply #'string= (mapcar (car lst) args)))) + (setq lst (cdr lst))) + lst)) + +(defun preview-canonical-spaces (arg) + "Convert ARG into canonical form. +Removes comments and collapses white space, except for multiple newlines." + (let (pos) + (while (setq pos (string-match "\\s<.*[\n\r][ \t]*" arg pos)) + (setq arg (replace-match "" t t arg 0))) + (while (setq pos (string-match "[ \t]*\\(\\([ \t]\\)\\|[\n\r][ \t]*\\)" + arg pos)) + (setq arg (replace-match (if (match-beginning 2) " " "\n") t t arg 0) + pos (1+ pos))) + (while (setq pos (string-match "\n+" arg pos)) + (if (string= "\n" (match-string 0 arg)) + (setq arg (replace-match " " t t arg 0) + pos (1+ pos)) + (setq pos (match-end 0))))) + arg) + +(defun preview-regenerate (ovr) + "Pass the modified region in OVR again through LaTeX." + (let ((begin (overlay-start ovr)) + (end (overlay-end ovr))) + (with-current-buffer (overlay-buffer ovr) + (preview-delete ovr) + (preview-region begin end)))) + +(defcustom preview-inner-environments '("Bmatrix" "Vmatrix" "aligned" + "array" "bmatrix" "cases" + "gathered" "matrix" "pmatrix" + "smallmatrix" "split" + "subarray" "vmatrix") + "Environments not to be previewed on their own." + :group 'preview-latex + :type '(repeat string)) + + +(defun preview-next-border (backwards) + "Search for the next interesting border for `preview-at-point'. +Searches backwards if BACKWARDS is non-nil." + (let (history preview-state (pt (point))) + (catch 'exit + (while + (null + (memq + (setq preview-state + (if backwards + (if (> (setq pt + (previous-single-char-property-change + pt 'preview-state)) (point-min)) + (get-char-property (1- pt) 'preview-state) + (throw 'exit (or history (point-min)))) + (if (< (setq pt + (next-single-char-property-change + pt 'preview-state)) (point-max)) + (get-char-property pt 'preview-state) + (throw 'exit (or history (point-max)))))) + '(active inactive))) + (setq history (and (not preview-state) pt))) + (or history pt)))) + +(defun preview-at-point () + "Do the appropriate preview thing at point. +If point is positioned on or inside of an unmodified preview area, +its visibility is toggled. + +If not, the surroundings are run through preview. The +surroundings don't extend into unmodified previews or past +contiguous previews invalidated by modifications. + +Overriding any other action, if a region is +active (`transient-mark-mode'), it is run through `preview-region'." + (interactive) + (if (TeX-active-mark) + (preview-region (region-beginning) (region-end)) + (catch 'exit + (dolist (ovr (overlays-in (max (point-min) (1- (point))) + (min (point-max) (1+ (point))))) + (let ((preview-state (overlay-get ovr 'preview-state))) + (when preview-state + (unless (eq preview-state 'disabled) + (preview-toggle ovr 'toggle (selected-window)) + (throw 'exit t))))) + (preview-region (preview-next-border t) + (preview-next-border nil))))) + +(defun preview-disabled-string (ov) + "Generate a before-string for disabled preview overlay OV." + (concat (preview-make-clickable + (overlay-get ov 'preview-map) + preview-icon + "\ +%s regenerates preview +%s more options" + (lambda () (interactive) (preview-regenerate ov))) +;; icon on separate line only for stuff starting on its own line + (with-current-buffer (overlay-buffer ov) + (save-excursion + (save-restriction + (widen) + (goto-char (overlay-start ov)) + (if (bolp) "\n" "")))))) + +(defun preview-disable (ovr) + "Change overlay behaviour of OVR after source edits." + (overlay-put ovr 'queued nil) + (preview-remove-urgentization ovr) + (overlay-put ovr 'preview-image nil) + (overlay-put ovr 'timestamp nil) + (setcdr (overlay-get ovr 'strings) (preview-disabled-string ovr)) + (preview-toggle ovr) + (overlay-put ovr 'preview-state 'disabled) + (dolist (filename (overlay-get ovr 'filenames)) + (condition-case nil + (preview-delete-file filename) + (file-error nil)) + (overlay-put ovr 'filenames nil))) + +(defun preview-delete (ovr &rest _ignored) + "Delete preview overlay OVR, taking any associated file along. +IGNORED arguments are ignored, making this function usable as +a hook in some cases" + (let ((filenames (overlay-get ovr 'filenames))) + (overlay-put ovr 'filenames nil) + (delete-overlay ovr) + (dolist (filename filenames) + (condition-case nil + (preview-delete-file filename) + (file-error nil))))) + +(defun preview-clearout (&optional start end timestamp) + "Clear out all previews in the current region. +When called interactively, the current region is used. +Non-interactively, the region between START and END is +affected. Those two values default to the borders of +the entire buffer. If TIMESTAMP is non-nil, previews +with a `timestamp' property of it are kept." + (interactive "r") + (dolist (ov (overlays-in (or start (point-min)) + (or end (point-max)))) + (and (overlay-get ov 'preview-state) + (not (and timestamp + (equal timestamp (overlay-get ov 'timestamp)))) + (preview-delete ov)))) + +(defun preview-clearout-buffer (&optional buffer) + "Clearout BUFFER from previews, current buffer if nil." + (interactive) + (if buffer + (with-current-buffer buffer (preview-clearout)) + (preview-clearout))) + +(defun preview-clearout-section () + "Clearout previews from LaTeX section." + (interactive) + (save-excursion + (LaTeX-mark-section) + (preview-clearout (region-beginning) (region-end)))) + +(defun preview-clearout-at-point () + "Clearout any preview at point." + (interactive) + (preview-clearout (max (point-min) (1- (point))) + (min (point-max) (1+ (point))))) + +(defun preview-walk-document (func) + "Cycle through all buffers belonging to current document. +Each buffer having the same master file as the current file +has FUNC called with its current buffer being set to it." + (let* ((buffers (buffer-list)) + (master (expand-file-name (TeX-master-file t))) + (default-buffers (list (current-buffer) + (find-buffer-visiting master)))) + (while buffers + (with-current-buffer (pop buffers) + (when + (or (memq (current-buffer) default-buffers) + (and (memq major-mode '(plain-tex-mode latex-mode)) + (or (stringp TeX-master) + (eq TeX-master t)) + (string= (expand-file-name (TeX-master-file t)) + master))) + (funcall func)))))) + +(defun preview-clearout-document () + "Clear out all previews in current document. +The document consists of all buffers that have the same master file +as the current buffer. This makes the current document lose +all previews." + (interactive) + (preview-walk-document #'preview-clearout-buffer)) + +(defun preview-kill-buffer-cleanup (&optional buf) + "This is a cleanup function just for use in hooks. +Cleans BUF or current buffer. The difference to +`preview-clearout-buffer' is that previews +associated with the last buffer modification time are +kept." + (with-current-buffer (or buf (current-buffer)) + (save-restriction + (widen) + (preview-clearout (point-min) (point-max) (visited-file-modtime))))) + +(add-hook 'kill-buffer-hook #'preview-kill-buffer-cleanup) +(add-hook 'before-revert-hook #'preview-kill-buffer-cleanup) + +(defvar preview-last-counter nil + "Last counter information.") + +(defun preview-extract-counters (ctr) + (setq preview-last-counter + (prog1 (copy-sequence ctr) + (dolist (elt preview-last-counter) + (setq ctr (delete elt ctr))))) + (apply #'concat ctr)) + +(defun desktop-buffer-preview-misc-data (&rest _ignored) + "Hook function that extracts previews for persistent sessions." + (unless (buffer-modified-p) + (setq preview-last-counter nil) + (save-restriction + (widen) + (let (save-info (timestamp (visited-file-modtime))) + (dolist (ov (sort (overlays-in (point-min) (point-max)) + (lambda (x y) (< (overlay-start x) + (overlay-start y))))) + (when (and (memq (overlay-get ov 'preview-state) '(active inactive)) + (null (overlay-get ov 'queued)) + (cdr (overlay-get ov 'preview-image))) + (push (preview-dissect ov timestamp) save-info))) + (and save-info + (cons 'preview (cons timestamp (nreverse save-info)))))))) + +(eval-after-load "desktop" + '(add-hook + 'desktop-buffer-misc-functions + #'desktop-buffer-preview-misc-data)) + +(defvar preview-temp-dirs nil +"List of top level temporary directories in use from preview. +Any directory not in this list will be cleared out by preview +on first use.") + +(defun preview-dissect (ov timestamp) + "Extract all persistent data from OV and TIMESTAMP it." + (let ((filenames (butlast (nth 0 (overlay-get ov 'filenames))))) + (overlay-put ov 'timestamp timestamp) + (list (overlay-start ov) + (overlay-end ov) + (cdr (overlay-get ov 'preview-image)) + filenames + (let ((ctr (overlay-get ov 'preview-counters))) + (and ctr + (cons (preview-extract-counters (car ctr)) + (preview-extract-counters (cdr ctr)))))))) + +(defun preview-buffer-restore-internal (buffer-misc) + "Restore previews from BUFFER-MISC if proper. +Remove them if they have expired." + (let ((timestamp (visited-file-modtime)) tempdirlist files) + (setq preview-parsed-counters nil) + (when (eq 'preview (pop buffer-misc)) + (preview-get-geometry) + (if (equal (pop buffer-misc) timestamp) + (dolist (ovdata buffer-misc) + (setq tempdirlist + (apply #'preview-reinstate-preview tempdirlist + timestamp ovdata))) + (dolist (ovdata buffer-misc) + (setq files (nth 3 ovdata)) + (condition-case nil + (delete-file (nth 0 files)) + (file-error nil)) + (unless (member (nth 1 files) tempdirlist) + (push (nth 1 files) tempdirlist))) + (dolist (dir tempdirlist) + (condition-case nil + (delete-directory dir) + (file-error nil))))))) + + +(defun preview-buffer-restore (buffer-misc) + "At end of desktop load, reinstate previews. +This delay is so that minor modes changing buffer positions +\(like `x-symbol-mode' does) will not wreak havoc. +BUFFER-MISC is the appropriate data to be used." + (add-hook 'desktop-delay-hook + (let ((buf (current-buffer))) + (lambda () + (with-current-buffer buf + (preview-buffer-restore-internal + buffer-misc)))))) + +(defun desktop-buffer-preview (file-name _buffer-name misc) + "Hook function for restoring persistent previews into a buffer." + (when (and file-name (file-readable-p file-name)) + (let ((buf (find-file-noselect file-name))) + (if (eq (car misc) 'preview) + (with-current-buffer buf + (preview-buffer-restore misc) + buf) + buf)))) + +(eval-after-load "desktop" + '(if (boundp 'desktop-buffer-mode-handlers) + (add-to-list 'desktop-buffer-mode-handlers + '(latex-mode . desktop-buffer-preview)) + (defvar desktop-buffer-file-name) + (defvar desktop-buffer-name) + (defvar desktop-buffer-misc) + (add-hook 'desktop-buffer-handlers (lambda () + (desktop-buffer-preview + desktop-buffer-file-name + desktop-buffer-name + desktop-buffer-misc))))) + +(defcustom preview-auto-cache-preamble 'ask + "Whether to generate a preamble cache format automatically. +Possible values are nil, t, and `ask'." + :group 'preview-latex + :type '(choice (const :tag "Cache" t) + (const :tag "Don't cache" nil) + (const :tag "Ask" ask))) + +(defvar preview-dumped-alist nil + "Alist of dumped masters. +The elements are (NAME . ASSOC). NAME is the master file name +\(without extension), ASSOC is what to do with regard to this +format. Possible values: nil means no format is available +and none should be generated. t means no format is available, +it should be generated on demand. If the value is a cons cell, +the CAR of the cons cell is the command with which the format +has been generated, and the CDR is some Emacs-flavor specific +value used for maintaining a watch on possible changes of the +preamble.") + +(defun preview-cleanout-tempfiles () + "Clean out all directories and files with non-persistent data. +This is called as a hook when exiting Emacs." + (mapc #'preview-kill-buffer-cleanup (buffer-list)) + (mapc #'preview-format-kill preview-dumped-alist)) + +(defun preview-inactive-string (ov) + "Generate before-string for an inactive preview overlay OV. +This is for overlays where the source text has been clicked +visible. For efficiency reasons it is expected that the buffer +is already selected and unnarrowed." + (concat + (preview-make-clickable (overlay-get ov 'preview-map) + preview-icon + "\ +%s redisplays preview +%s more options") +;; icon on separate line only for stuff starting on its own line + (with-current-buffer (overlay-buffer ov) + (save-excursion + (save-restriction + (widen) + (goto-char (overlay-start ov)) + (if (bolp) "\n" "")))))) + +(defun preview-dvipng-place-all () + "Place all images dvipng has created, if any. +Deletes the dvi file when finished." + (let (filename queued oldfiles snippet) + (dolist (ov (prog1 preview-gs-queue (setq preview-gs-queue nil))) + (when (and (setq queued (overlay-get ov 'queued)) + (setq snippet (aref (overlay-get ov 'queued) 2)) + (setq filename (preview-make-filename + (format "prev%03d.%s" + snippet preview-dvipng-image-type) + TeX-active-tempdir))) + (if (file-exists-p (car filename)) + (progn + (overlay-put ov 'filenames (list filename)) + (preview-replace-active-icon + ov + (preview-create-icon (car filename) + preview-dvipng-image-type + (preview-ascent-from-bb + (aref queued 0)) + (aref preview-colors 2))) + (overlay-put ov 'queued nil)) + (push filename oldfiles) + (overlay-put ov 'filenames nil) + (push ov preview-gs-queue)))) + (if (setq preview-gs-queue (nreverse preview-gs-queue)) + (progn + (preview-start-dvips preview-fast-conversion) + (setq TeX-sentinel-function (lambda (process command) + (preview-gs-dvips-sentinel + process + command + t))) + (dolist (ov preview-gs-queue) + (setq snippet (aref (overlay-get ov 'queued) 2)) + (overlay-put ov 'filenames + (list + (preview-make-filename + (or preview-ps-file + (format "preview.%03d" snippet)) + TeX-active-tempdir)))) + (while (setq filename (pop oldfiles)) + (condition-case nil + (preview-delete-file filename) + (file-error nil)))) + (condition-case nil + (let ((gsfile preview-gs-file)) + (delete-file + (with-current-buffer TeX-command-buffer + (funcall (car gsfile) "dvi" t)))) + (file-error nil))))) + +(defun preview-active-string (ov) + "Generate before-string for active image overlay OV." + (preview-make-clickable + (overlay-get ov 'preview-map) + (car (overlay-get ov 'preview-image)) + "%s opens text +%s more options")) + +(defun preview-make-filename (file tempdir) + "Generate a preview filename from FILE and TEMPDIR. +Filenames consist of a CONS-cell with absolute file name as CAR +and TEMPDIR as CDR. TEMPDIR is a copy of `TeX-active-tempdir' +with the directory name, the reference count and its top directory +name elements. If FILE is already in that form, the file name itself +gets converted into a CONS-cell with a name and a reference count." + (if (consp file) + (progn + (if (consp (car file)) + (setcdr (car file) (1+ (cdr (car file)))) + (setcar file (cons (car file) 1))) + file) + (setcar (nthcdr 2 tempdir) (1+ (nth 2 tempdir))) + (cons (expand-file-name file (nth 0 tempdir)) + tempdir))) + +(defun preview-attach-filename (attached file) + "Attaches the absolute file name ATTACHED to FILE." + (if (listp (caar file)) + (setcar (car file) (cons attached (caar file))) + (setcar (car file) (list attached (caar file)))) + file) + +(defun preview-delete-file (file) + "Delete a preview FILE. +See `preview-make-filename' for a description of the data +structure. If the containing directory becomes empty, +it gets deleted as well." + (let ((filename + (if (consp (car file)) + (and (zerop + (setcdr (car file) (1- (cdr (car file))))) + (car (car file))) + (car file)))) + (if filename + (unwind-protect + (if (listp filename) + (dolist (elt filename) (delete-file elt)) + (delete-file filename)) + (let ((tempdir (cdr file))) + (when tempdir + (if (> (nth 2 tempdir) 1) + (setcar (nthcdr 2 tempdir) (1- (nth 2 tempdir))) + (setcdr file nil) + (delete-directory (nth 0 tempdir))))))))) + +(defvar preview-buffer-has-counters nil) +(make-variable-buffer-local 'preview-buffer-has-counters) + +(defun preview-place-preview (snippet start end + box counters tempdir place-opts) + "Generate and place an overlay preview image. +This generates the filename for the preview +snippet SNIPPET in the current buffer, and uses it for the +region between START and END. BOX is an optional preparsed +TeX bounding BOX passed on to the `place' hook. +COUNTERS is the info about saved counter structures. +TEMPDIR is a copy of `TeX-active-tempdir'. +PLACE-OPTS are additional arguments passed into +`preview-parse-messages'. Return +a list with additional info from the placement hook. +Those lists get concatenated together and get passed +to the close hook." + (preview-clearout start end tempdir) + (let ((ov (make-overlay start end nil nil nil))) + (overlay-put ov 'priority (TeX-overlay-prioritize start end)) + (overlay-put ov 'preview-map + (preview-make-clickable + nil nil nil + (lambda (event) (interactive "e") + (preview-toggle ov 'toggle event)) + (lambda (event) (interactive "e") + (preview-context-menu ov event)))) + (overlay-put ov 'timestamp tempdir) + (when (cdr counters) + (overlay-put ov 'preview-counters counters) + (setq preview-buffer-has-counters t)) + (prog1 (apply #'preview-call-hook 'place ov snippet box + place-opts) + (overlay-put ov 'strings + (list (preview-active-string ov))) + (preview-toggle ov t)))) + +(defun preview-counter-find (begin) + "Fetch the next preceding or next preview-counters property. +Factored out because of compatibility macros XEmacs would +not use in advice." + (or (car (get-char-property begin 'preview-counters)) + (cdr (get-char-property (max (point-min) + (1- begin)) + 'preview-counters)) + (cdr (get-char-property + (max (point-min) + (1- (previous-single-char-property-change + begin + 'preview-counters))) + 'preview-counters)) + (car (get-char-property + (next-single-char-property-change begin 'preview-counters) + 'preview-counters)))) + +(defun preview--counter-information (begin) + "Return repeated \\setcounter declaration based on point BEGIN. +If `preview-buffer-has-counters' is non-nil, return string to +insert into region tex file containing as many +\\setcounter{COUNTER}{VALUE} as possible built from +`preview-counters' property near the point BEGIN. Otherwise, +return nil." + (if preview-buffer-has-counters + (mapconcat + #'identity + (cons + "" + (preview-counter-find begin)) + "\\setcounter"))) + +(defun preview-reinstate-preview (tempdirlist timestamp start end + image filename &optional counters) + "Reinstate a single preview. +This gets passed TEMPDIRLIST, a list consisting of the kind +of entries used in `TeX-active-tempdir', and TIMESTAMP, the +time stamp under which the file got read in. It returns an augmented +list. START and END give the buffer location where the preview +is to be situated, IMAGE the image to place there, and FILENAME +the file to use: a triple consisting of filename, its temp directory +and the corresponding topdir. COUNTERS is saved counter information, +if any." + (when + (or (null filename) (file-readable-p (car filename))) + (when filename + (unless (equal (nth 1 filename) (car TeX-active-tempdir)) + (setq TeX-active-tempdir + (or (assoc (nth 1 filename) tempdirlist) + (car (push (append (cdr filename) (list 0)) + tempdirlist)))) + (setcar (cdr TeX-active-tempdir) + (car (or (member (nth 1 TeX-active-tempdir) + preview-temp-dirs) + (progn + (add-hook 'kill-emacs-hook + #'preview-cleanout-tempfiles t) + (push (nth 1 TeX-active-tempdir) + preview-temp-dirs)))))) + (setcar (nthcdr 2 TeX-active-tempdir) + (1+ (nth 2 TeX-active-tempdir))) + (setcdr filename TeX-active-tempdir) + (setq filename (list filename))) + (let ((ov (make-overlay start end nil nil nil))) + (overlay-put ov 'priority (TeX-overlay-prioritize start end)) + (overlay-put ov 'preview-map + (preview-make-clickable + nil nil nil + (lambda (event) (interactive "e") + (preview-toggle ov 'toggle event)) + (lambda (event) (interactive "e") + (preview-context-menu ov event)))) + (when counters + (overlay-put + ov 'preview-counters + (cons + (mapcar #'cdr + (if (string= (car counters) "") + preview-parsed-counters + (setq preview-parsed-counters + (preview-parse-counters (car counters))))) + (mapcar #'cdr + (if (string= (cdr counters) "") + preview-parsed-counters + (setq preview-parsed-counters + (preview-parse-counters (cdr counters))))))) + (setq preview-buffer-has-counters t)) + (overlay-put ov 'filenames filename) + (overlay-put ov 'preview-image (cons (preview-import-image image) + image)) + (overlay-put ov 'strings + (list (preview-active-string ov))) + (overlay-put ov 'timestamp timestamp) + (preview-toggle ov t))) + tempdirlist) + +(defun preview-back-command (&optional nocomplex) + "Move backward a TeX token. +If NOCOMPLEX is set, only basic tokens and no argument sequences +will be skipped over backwards." + (let ((oldpos (point)) oldpoint) + (condition-case nil + (or (search-backward-regexp "\\(\\$\\$?\ +\\|\\\\[^a-zA-Z@]\ +\\|\\\\[a-zA-Z@]+\ +\\|\\\\begin[ \t]*{[^}]+}\ +\\)\\=" (line-beginning-position) t) + nocomplex + (if (eq ?\) (char-syntax (char-before))) + (while + (progn + (setq oldpoint (point)) + (backward-sexp) + (and (not (eq oldpoint (point))) + (eq ?\( (char-syntax (char-after)))))) + (backward-char))) + (error (goto-char oldpos))))) + +(defcustom preview-required-option-list '("active" "tightpage" "auctex" + (preview-preserve-counters + "counters")) + "Specifies required options passed to the preview package. +These are passed regardless of whether there is an explicit +\\usepackage of that package present." + :group 'preview-latex + :type preview-expandable-string) + +(defcustom preview-preserve-counters nil + "Try preserving counters for partial runs if set." + :group 'preview-latex + :type 'boolean) + +(defcustom preview-default-option-list '("displaymath" "floats" + "graphics" "textmath" "sections" + "footnotes") + "Specifies default options to pass to preview package. +These options are only used when the LaTeX document in question does +not itself load the preview package, namely when you use preview +on a document not configured for preview. \"auctex\", \"active\", +\"dvips\" and \"delayed\" need not be specified here." + :group 'preview-latex + :type '(list (set :inline t :tag "Options known to work" + :format "%t:\n%v%h" :doc + "The above options are all the useful ones +at the time of the release of this package. +You should not need \"Other options\" unless you +upgraded to a fancier version of just the LaTeX style. +Please also note that `psfixbb' fails to have an effect if +`preview-fast-conversion' or `preview-prefer-TeX-bb' +are selected." + (const "displaymath") + (const "floats") + (const "graphics") + (const "textmath") + (const "sections") + (const "footnotes") + (const "showlabels") + (const "psfixbb")) + (set :tag "Expert options" :inline t + :format "%t:\n%v%h" :doc + "Expert options should not be enabled permanently." + (const "noconfig") + (const "showbox") + (const "tracingall")) + (repeat :inline t :tag "Other options" (string)))) + +(defcustom preview-default-preamble + '("\\RequirePackage[" ("," . preview-default-option-list) + "]{preview}[2004/11/05]") + "Specifies default preamble code to add to a LaTeX document. +If the document does not itself load the preview package, that is, +when you use preview on a document not configured for preview, this +list of LaTeX commands is inserted just before \\begin{document}." + :group 'preview-latex + :type preview-expandable-string) + +(defcustom preview-LaTeX-command '("%`%l \"\\nonstopmode\\nofiles\ +\\PassOptionsToPackage{" ("," . preview-required-option-list) "}{preview}\ +\\AtBeginDocument{\\ifx\\ifPreview\\undefined" +preview-default-preamble "\\fi}\"%' \"\\detokenize{\" %(t-filename-only) \"}\"") + ;; Since TeXLive 2018, the default encoding for LaTeX files has been + ;; changed to UTF-8 if used with classic TeX or pdfTeX. I.e., + ;; \usepackage[utf8]{inputenc} is enabled by default in (pdf)latex. + ;; c.f. LaTeX News issue 28 + ;; Due to this change, \detokenize is required to recognize + ;; non-ascii characters in the file name when \input is supplemented + ;; implicitly by %`-%' pair. + "Command used for starting a preview. +See description of `TeX-command-list' for details." + :group 'preview-latex + :type preview-expandable-string) + +(defun preview-goto-info-page () + "Read documentation for preview-latex in the info system." + (interactive) + (info "(preview-latex)")) + +(eval-after-load 'info '(add-to-list 'Info-file-list-for-emacs + '("preview" . "preview-latex"))) + +(defvar preview-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-p" #'preview-at-point) + (define-key map "\C-r" #'preview-region) + (define-key map "\C-b" #'preview-buffer) + (define-key map "\C-d" #'preview-document) + (define-key map "\C-f" #'preview-cache-preamble) + (define-key map "\C-c\C-f" #'preview-cache-preamble-off) + (define-key map "\C-i" #'preview-goto-info-page) + ;; (define-key map "\C-q" #'preview-paragraph) + (define-key map "\C-e" #'preview-environment) + (define-key map "\C-s" #'preview-section) + (define-key map "\C-w" #'preview-copy-region-as-mml) + (define-key map "\C-c\C-p" #'preview-clearout-at-point) + (define-key map "\C-c\C-r" #'preview-clearout) + (define-key map "\C-c\C-s" #'preview-clearout-section) + (define-key map "\C-c\C-b" #'preview-clearout-buffer) + (define-key map "\C-c\C-d" #'preview-clearout-document) + map)) + +(defun preview-copy-text (ov) + "Copy the text of OV into the kill buffer." + (with-current-buffer (overlay-buffer ov) + (copy-region-as-kill (overlay-start ov) (overlay-end ov)))) + +(defun preview-copy-mml (ov) + "Copy an MML representation of OV into the kill buffer. +This can be used to send inline images in mail and news when +using MML mode." + (when (catch 'badcolor + (let ((str (car (preview-format-mml ov)))) + (if str + (if (eq last-command #'kill-region) + (kill-append str nil) + (kill-new str)) + (error "No image file available"))) + nil) + (let (preview-transparent-border) + (preview-regenerate ov)))) + +(defun preview-copy-region-as-mml (start end) + (interactive "r") + (when (catch 'badcolor + (let (str lst dont-ask) + (dolist (ov (overlays-in start end)) + (when (setq str (preview-format-mml ov dont-ask)) + (setq dont-ask (cdr str)) + (and + (>= (overlay-start ov) start) + (<= (overlay-end ov) end) + (push (list (- (overlay-start ov) start) + (- (overlay-end ov) start) + (car str)) lst)))) + (setq str (buffer-substring start end)) + (dolist (elt (nreverse (sort lst #'car-less-than-car))) + (setq str (concat (substring str 0 (nth 0 elt)) + (nth 2 elt) + (substring str (nth 1 elt))))) + (if (eq last-command #'kill-region) + (kill-append str nil) + (kill-new str))) + nil) + (let (preview-transparent-border) + (preview-region start end)))) + +(autoload 'mailcap-extension-to-mime "mailcap") + +(defun preview-format-mml (ov &optional dont-ask) + "Return an MML representation of OV as string. +This can be used to send inline images in mail and news when +using MML mode. If there is nothing current available, +nil is returned. If the image has a colored border and the +user wants it removed when asked (unless DONT-ASK is set), +`badcolor' is thrown a t. The MML is returned in the car of the +result, DONT-ASK in the cdr." + (and (memq (overlay-get ov 'preview-state) '(active inactive)) + (not (overlay-get ov 'queued)) + (let* ((text (with-current-buffer (overlay-buffer ov) + (buffer-substring (overlay-start ov) + (overlay-end ov)))) + (image (cdr (overlay-get ov 'preview-image))) + file type) + (cond ((consp image) + (and (not dont-ask) + (nth 3 image) + (if (y-or-n-p "Replace colored borders? ") + (throw 'badcolor t) + (setq dont-ask t))) + (setq file (car (car (last (overlay-get ov 'filenames)))) + type (mailcap-extension-to-mime + (file-name-extension file))) + (cons + (format "<#part %s +description=\"%s\" +filename=%s> +<#/part>" + (if type + (format "type=\"%s\" disposition=inline" type) + "disposition=attachment") + (if (string-match "[\n\"]" text) + "preview-latex image" + text) + (if (string-match "[ \n<>]" file) + (concat "\"" file "\"") + file)) + dont-ask)) + ((stringp image) + (cons image dont-ask)))))) + +(defun preview-active-contents (ov) + "Check whether we have a valid image associated with OV." + (and (memq (overlay-get ov 'preview-state) '(active inactive)) t)) + +(defun preview-context-menu (ov ev) + "Pop up a menu for OV at position EV." + (popup-menu + `("Preview" + ["Toggle" (preview-toggle ,ov 'toggle ',ev) + (preview-active-contents ,ov)] + ["Regenerate" (preview-regenerate ,ov)] + ["Remove" (preview-delete ,ov)] + ["Copy text" (preview-copy-text ,ov)] + ["Copy MIME" (preview-copy-mml ,ov) + (preview-active-contents ,ov)]) + ev)) + +(defvar preview-TeX-style-dir) + +(defun preview-TeX-style-cooked () + "Return `preview-TeX-style-dir' in cooked form. +This will be fine for prepending to a `TEXINPUTS' style +environment variable, including an initial `.' at the front." + (if (or (zerop (length preview-TeX-style-dir)) + (member (substring preview-TeX-style-dir -1) '(";" ":"))) + preview-TeX-style-dir + (let ((sep + (cond + ((stringp TeX-kpathsea-path-delimiter) + TeX-kpathsea-path-delimiter) + ((string-match + "\\`.[:]" + (if (file-name-absolute-p preview-TeX-style-dir) + preview-TeX-style-dir + (expand-file-name preview-TeX-style-dir))) + ";") + (t ":")))) + (concat "." sep preview-TeX-style-dir sep)))) + +(defun preview-set-texinputs (&optional remove) + "Add `preview-TeX-style-dir' into `TEXINPUTS' variables. +With prefix argument REMOVE, remove it again." + (interactive "P") + (let ((case-fold-search nil) + (preview-TeX-style-dir (preview-TeX-style-cooked)) + pattern) + (if remove + (progn + (setq pattern (concat "\\`\\(TEXINPUTS[^=]*\\)=\\(.*\\)" + (regexp-quote preview-TeX-style-dir))) + (dolist (env (copy-sequence process-environment)) + (if (string-match pattern env) + (setenv (match-string 1 env) + (and (or (< (match-beginning 2) (match-end 2)) + (< (match-end 0) (length env))) + (concat (match-string 2 env) + (substring env (match-end 0)))))))) + (setq pattern (regexp-quote preview-TeX-style-dir)) + (dolist (env (cons "TEXINPUTS=" (copy-sequence process-environment))) + (if (string-match "\\`\\(TEXINPUTS[^=]*\\)=" env) + (unless (save-match-data (string-match pattern env)) + (setenv (match-string 1 env) + (concat preview-TeX-style-dir + (substring env (match-end 0)))))))))) + +(defcustom preview-TeX-style-dir nil + "This variable contains the location of uninstalled TeX styles. +If this is nil, the preview styles are considered to be part of +the installed TeX system. + +Otherwise, it can either just specify an absolute directory, or +it can be a complete TEXINPUTS specification. If it is the +latter, it has to be followed by the character with which +kpathsea separates path components, either `:' on Unix-like +systems, or `;' on Windows-like systems. And it should be +preceded with .: or .; accordingly in order to have . first in +the search path. + +The `TEXINPUTS' environment type variables will get this prepended +at load time calling \\[preview-set-texinputs] to reflect this. +You can permanently install the style files using +\\[preview-install-styles]. + +Don't set this variable other than with customize so that its +changes get properly reflected in the environment." + :group 'preview-latex + :set (lambda (var value) + (and (boundp var) + (symbol-value var) + (preview-set-texinputs t)) + (set var value) + (and (symbol-value var) + (preview-set-texinputs))) + :type '(choice (const :tag "Installed" nil) + (string :tag "Style directory or TEXINPUTS path"))) + +;;;###autoload +(defun preview-install-styles (dir &optional force-overwrite + force-save) + "Installs the TeX style files into a permanent location. +This must be in the TeX search path. If FORCE-OVERWRITE is greater +than 1, files will get overwritten without query, if it is less +than 1 or nil, the operation will fail. The default of 1 for interactive +use will query. + +Similarly FORCE-SAVE can be used for saving +`preview-TeX-style-dir' to record the fact that the uninstalled +files are no longer needed in the search path." + (interactive "DPermanent location for preview TeX styles +pp") + (unless preview-TeX-style-dir + (error "Styles are already installed")) + (dolist (file (or + (condition-case nil + (directory-files + (progn + (string-match + "\\`\\(\\.[:;]\\)?\\(.*?\\)\\([:;]\\)?\\'" + preview-TeX-style-dir) + (match-string 2 preview-TeX-style-dir)) + t "\\.\\(sty\\|def\\|cfg\\)\\'") + (error nil)) + (error "Can't find files to install"))) + (copy-file file dir (cond ((eq force-overwrite 1) 1) + ((numberp force-overwrite) + (> force-overwrite 1)) + (t force-overwrite)))) + (if (cond ((eq force-save 1) + (y-or-n-p "Stop using non-installed styles permanently ")) + ((numberp force-save) + (> force-save 1)) + (t force-save)) + (customize-save-variable 'preview-TeX-style-dir nil) + (customize-set-variable 'preview-TeX-style-dir nil))) + +(defun preview-mode-setup () + "Setup proper buffer hooks and behavior for previews." + (set (make-local-variable 'desktop-save-buffer) + #'desktop-buffer-preview-misc-data) + (add-hook 'pre-command-hook #'preview-mark-point nil t) + (add-hook 'post-command-hook #'preview-move-point nil t) + (when buffer-file-name + (let* ((filename (expand-file-name buffer-file-name)) + format-cons) + (when (string-match (concat "\\." TeX-default-extension "\\'") + filename) + (setq filename (substring filename 0 (match-beginning 0)))) + (setq format-cons (assoc filename preview-dumped-alist)) + (when (consp (cdr format-cons)) + (preview-unwatch-preamble format-cons) + (preview-watch-preamble (current-buffer) + (cadr format-cons) + format-cons))))) + +;;;###autoload +(defun LaTeX-preview-setup () + "Hook function for embedding the preview package into AUCTeX. +This is called by `LaTeX-mode-hook' and changes AUCTeX variables +to add the preview functionality." + ;; This has to be done only once. + (unless (and (boundp 'LaTeX-mode-hook) + (memq #'preview-mode-setup LaTeX-mode-hook)) + (remove-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) + (add-hook 'LaTeX-mode-hook #'preview-mode-setup) + (define-key LaTeX-mode-map "\C-c\C-p" preview-map) + (easy-menu-define preview-menu LaTeX-mode-map + "This is the menu for preview-latex." + '("Preview" + "Generate previews" + ["(or toggle) at point" preview-at-point] + ["for environment" preview-environment] + ["for section" preview-section] + ["for region" preview-region mark-active] + ["for buffer" preview-buffer] + ["for document" preview-document] + "---" + "Remove previews" + ["at point" preview-clearout-at-point] + ["from section" preview-clearout-section] + ["from region" preview-clearout mark-active] + ["from buffer" preview-clearout-buffer] + ["from document" preview-clearout-document] + "---" + "Turn preamble cache" + ["on" preview-cache-preamble] + ["off" preview-cache-preamble-off] + "---" + ("Customize" + ["Browse options" + (customize-group 'preview)] + ["Extend this menu" + (easy-menu-add-item + nil '("Preview") + (customize-menu-create 'preview))]) + ["Read documentation" preview-goto-info-page] + ["Report Bug" preview-report-bug])) + (if (eq major-mode 'latex-mode) + (preview-mode-setup)) + (unless preview-tb-icon + (setq preview-tb-icon (preview-filter-specs preview-tb-icon-specs))) + (when preview-tb-icon + (define-key LaTeX-mode-map [tool-bar preview] + `(menu-item "Preview at point" preview-at-point + :image ,preview-tb-icon + :help "Preview on/off at point" + :vert-only t))) + (if (boundp 'desktop-buffer-misc) + (preview-buffer-restore desktop-buffer-misc)))) + +(defun preview-clean-subdir (dir) + "Cleans out a temporary DIR with preview image files." + (condition-case err + (progn + (mapc #'delete-file + (directory-files dir t "\\`pr" t)) + (delete-directory dir)) + (error (message "Deletion of `%s' failed: %s" dir + (error-message-string err))))) + +(defun preview-clean-topdir (topdir) + "Cleans out TOPDIR from temporary directories. +This does not erase the directory itself since its permissions +might be needed for colloborative work on common files." + (mapc #'preview-clean-subdir + (condition-case nil + (directory-files topdir t "\\`tmp" t) + (file-error nil)))) + +(defun preview-create-subdirectory () + "Create a temporary subdir for the current TeX process. +If necessary, generates a fitting top +directory or cleans out an existing one (if not yet +visited in this session), then returns the name of +the created subdirectory relative to the master directory, +in shell-quoted form. `TeX-active-tempdir' is +set to the corresponding TEMPDIR descriptor as described +in `preview-make-filename'. The directory is registered +in `preview-temp-dirs' in order not to be cleaned out +later while in use." + (let ((topdir (expand-file-name (TeX-active-master "prv")))) + (if (file-directory-p topdir) + (unless (member topdir preview-temp-dirs) + ;; Cleans out the top preview directory by + ;; removing subdirs possibly left from a previous session. + (preview-clean-topdir topdir) + (push topdir preview-temp-dirs)) + (make-directory topdir) + (add-to-list 'preview-temp-dirs topdir)) + (add-hook 'kill-emacs-hook #'preview-cleanout-tempfiles t) + (setq TeX-active-tempdir + (list (make-temp-file (expand-file-name + "tmp" (file-name-as-directory topdir)) t) + topdir + 0)) + (shell-quote-argument + (concat (file-name-as-directory + ;; Don't use topdir, because %m expects the path to be + ;; relative to master + (TeX-active-master "prv" t)) + (file-name-nondirectory (nth 0 TeX-active-tempdir)))))) + +(defun preview-parse-counters (string) + "Extract counter information from STRING." + (let ((list preview-parsed-counters) (pos 0)) + (while (eq pos (string-match " *\\({\\([^{}]+\\)}{[-0-9]+}\\)" string pos)) + (setcdr (or (assoc (match-string 2 string) list) + (car (push (list (match-string 2 string)) list))) + (match-string 1 string)) + (setq pos (match-end 1))) + list)) + +(defun preview-parse-tightpage (string) + "Build tightpage vector from STRING," + (read (concat "[" string "]"))) + +(defvar preview-parse-variables + '(("Fontsize" preview-parsed-font-size + "\\` *\\([0-9.]+\\)pt\\'" 1 string-to-number) + ("Magnification" preview-parsed-magnification + "\\` *\\([0-9]+\\)\\'" 1 string-to-number) + ("PDFoutput" preview-parsed-pdfoutput + "" 0 stringp) + ("Counters" preview-parsed-counters + ".*" 0 preview-parse-counters) + ("Tightpage" preview-parsed-tightpage + "\\` *\\(-?[0-9]+ *\\)\\{4\\}\\'" 0 preview-parse-tightpage))) + +(defun preview-error-quote (string) + "Turn STRING with potential ^^ sequences into a regexp. +To preserve sanity, additional ^ prefixes are matched literally, +so the character represented by ^^^ preceding extended characters +will not get matched, usually." + (let (output case-fold-search) + ;; Some coding systems (e.g. japanese-shift-jis) use regexp meta + ;; characters on encoding. Such meta characters would be + ;; interfered with `regexp-quote' below. Thus the idea of + ;; "encoding entire string beforehand and decoding it at the last + ;; stage" does not work for such coding systems. + ;; Rather, we work consistently with decoded text. + + ;; Bytes with value from 0x80 to 0xFF represented with ^^ form are + ;; converted to byte sequence, and decoded by the file coding + ;; system. + (setq string + (preview--decode-^^ab string buffer-file-coding-system)) + + ;; Then, control characters are taken into account. + (while (string-match "\\^\\{2,\\}\\([@-_?]\\)" string) + (setq output + (concat output + (regexp-quote (substring string + 0 + (- (match-beginning 1) 2))) + (concat + "\\(?:" (regexp-quote + (substring string + (- (match-beginning 1) 2) + (match-end 0))) + "\\|" + (char-to-string + (logxor (aref string (match-beginning 1)) 64)) + "\\)")) + string (substring string (match-end 0)))) + (setq output (concat output (regexp-quote string))) + output)) + +(defun preview--decode-^^ab (string coding-system) + "Decode ^^ sequences in STRING with CODING-SYSTEM. +Sequences of control characters such as ^^I are left untouched. + +Return a new string." + ;; Since the given string can contain multibyte characters, decoding + ;; should be performed seperately on each segment made up entirely + ;; with ASCII and raw 8-bit characters. + ;; Raw 8-bit characters can arise if the latex outputs multibyte + ;; characters with partial ^^-quoting. + (let ((result "")) + ;; Here we want to collect all the ASCII and raw 8-bit bytes, + ;; excluding proper multibyte characters. The regexp + ;; [^[:multibyte:]]+ serves for that purpose. The alternative + ;; [\x00-\xFF]+ does the job as well at least for emacs 24-26, so + ;; use it instead if the former becomes invalid in future. + ;; N.B. [[:unibyte:]]+ doesn't match raw 8-bit bytes, contrary to + ;; naive expectation. + (while (string-match "[^[:multibyte:]]+" string) + (setq result + (concat result + (substring string 0 (match-beginning 0)) + (let ((text + (save-match-data + (preview--convert-^^ab + (match-string 0 string))))) + (decode-coding-string text coding-system))) + string (substring string (match-end 0)))) + (setq result (concat result string)) + result)) + +(defun preview--convert-^^ab (string) + "Convert ^^ sequences in STRING to raw 8bit. +Sequences of control characters such as ^^I are left untouched. + +Return a new string." + (let ((result "")) + (while (string-match "\\^\\^[8-9a-f][0-9a-f]" string) + (setq result + (concat result + (substring string 0 (match-beginning 0)) + (let ((byte (string-to-number + (substring string + (+ (match-beginning 0) 2) + (match-end 0)) 16))) + (byte-to-string byte))) + string (substring string (match-end 0)))) + (setq result (concat result string)) + result)) + +(defun preview-parse-messages (open-closure) + "Turn all preview snippets into overlays. +This parses the pseudo error messages from the preview +document style for LaTeX. OPEN-CLOSURE is called once +it is certain that we have a valid output file, and it has +to return in its CAR the PROCESS parameter for the CLOSE +call, and in its CDR the final stuff for the placement hook." + (with-temp-message "locating previews..." + (let (TeX-error-file TeX-error-offset snippet box counters + file line + (lsnippet 0) lstart (lfile "") lline lbuffer lpoint + lcounters + string after-string + offset + parsestate (case-fold-search nil) + (run-buffer (current-buffer)) + (run-directory default-directory) + tempdir + close-data + open-data + fast-hook + slow-hook + TeX-translate-location-file + TeX-translate-location-line + TeX-translate-location-error + TeX-translate-location-offset + TeX-translate-location-context + TeX-translate-location-string) + ;; clear parsing variables + (dolist (var preview-parse-variables) + (set (nth 1 var) nil)) + (goto-char (point-min)) + (unwind-protect + (progn + (while + (re-search-forward "\ +^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|\ +\(\\(/*\ +\\(?:\\.+[^()\r\n{} /]*\\|[^()\r\n{} ./]+\ +\\(?: [^()\r\n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\ +\\(?:/+\\(?:\\.+[^()\r\n{} /]*\\|[^()\r\n{} ./]+\ +\\(?: [^()\r\n{} ./]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\)\ +)*\\(?: \\|\r?$\\)\\|\ +\\()+\\)\\|\ + !\\(?:offset(\\([---0-9]+\\))\\|\ +name(\\([^)]+\\))\\)\\|\ +^Preview: \\([a-zA-Z]+\\) \\([^\n\r]*\\)\r?$" nil t) +;;; Ok, here is a line by line breakdown: +;;; match-alternative 1: +;;; error indicator for TeX error, either style. +;;; match-alternative 2: +;;; The same, but file-line-error-style, matching on file name. +;;; match-alternative 3: +;;; Too ugly to describe in detail. In short, we try to catch file +;;; names built from path components that don't contain spaces or +;;; other special characters once the file extension has started. +;;; +;;; Position for searching immediately after the file name so as to +;;; not miss closing parens or something. +;;; (match-string 3) is the file name. +;;; match-alternative 4: +;;; )+\( \|$\) +;;; a closing paren followed by the end of line or a space: a just +;;; closed file. +;;; match-alternative 5 (wrapped into one shy group with +;;; match-alternative 6, so that the match on first char is slightly +;;; faster): +;;; !offset(\([---0-9]+\)) +;;; an AUCTeX offset message. (match-string 5) is the offset itself +;;; !name(\([^)]+\)) +;;; an AUCTeX file name message. (match-string 6) is the file name +;;; TODO: Actually, the latter two should probably again match only +;;; after a space or newline, since that it what \message produces. +;;; disabled in prauctex.def: +;;; \(?:Ov\|Und\)erfull \\.*[0-9]*--[0-9]* +;;; \(?:.\{79\} +;;; \)*.*$\)\| +;;; This would have caught overfull box messages that consist of +;;; several lines of context all with 79 characters in length except +;;; of the last one. prauctex.def kills all such messages. + (setq file (match-string-no-properties 2)) + (cond + ((match-beginning 1) + (if (looking-at "\ +\\(?:Preview\\|Package Preview Error\\): Snippet \\([---0-9]+\\) \\(started\\|ended\\(\ +\\.? *(\\([---0-9]+\\)\\+\\([---0-9]+\\)x\\([---0-9]+\\))\\)?\\)\\.") + (progn + (when file + (unless TeX-error-file + (push nil TeX-error-file) + (push nil TeX-error-offset)) + (unless (car TeX-error-offset) + (rplaca TeX-error-file file))) + (setq snippet (string-to-number (match-string 1)) + box (unless + (string= (match-string 2) "started") + (if (match-string 4) + (mapcar #'(lambda (x) + (* (preview-get-magnification) + (string-to-number x))) + (list + (match-string 4) + (match-string 5) + (match-string 6))) + t)) + counters (mapcar #'cdr preview-parsed-counters) + + ;; And the line number to position the cursor. + line (progn + (setq lpoint (point)) + (end-of-line) +;;; variant 1: profiling seems to indicate the regexp-heavy solution +;;; to be favorable. Removing incomplete characters from the error +;;; context is an absolute nuisance. + (and (re-search-forward "\ +^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\(?:\\^*\\(?:[89a-f][0-9a-f]\\|[]@-\\_?]\\)\\|\ +\[0-9a-f]?\\)\\)?\\([^\n\r]*?\\)\r? +\\([^\n\r]*?\\)\\(\\(?:\\^+[89a-f]?\\)?\\.\\.\\.\\)?\r?$" nil t) + (string-to-number (match-string 1)))) + ;; And a string of the context to search for. + string (and line (match-string 3)) + after-string (and line (buffer-substring + (+ (match-beginning 4) + (- (match-end 3) + (match-beginning 0))) + (match-end 4))) + + ;; We may use these in another buffer. + offset (or (car TeX-error-offset) 0) + file (car TeX-error-file)) + (when (and (stringp file) + (or (string= file "<none>") + (TeX-match-extension file))) + ;; if we are the first time round, check for fast hooks: + (when (null parsestate) + (setq open-data + (save-excursion (funcall open-closure)) + tempdir TeX-active-tempdir) + (dolist + (lst (if (listp TeX-translate-location-hook) + TeX-translate-location-hook + (list TeX-translate-location-hook))) + (let ((fast + (and (symbolp lst) + (get lst 'TeX-translate-via-list)))) + (if fast + (setq fast-hook + (nconc fast-hook (list fast))) + (setq slow-hook + (nconc slow-hook (list lst))))))) + ;; Functions in `TeX-translate-location-hook' + ;; may examine and modify the following variables. + (setq TeX-translate-location-file file + TeX-translate-location-line line + ;; TeX-translate-location-error error + TeX-translate-location-offset offset + ;; TeX-translate-location-context context + TeX-translate-location-string string) + (condition-case err + (save-excursion (mapc #'funcall slow-hook)) + (error (preview-log-error err "Translation hook"))) + (setq file TeX-translate-location-file + line TeX-translate-location-line + ;; error TeX-translate-location-error + offset TeX-translate-location-offset + ;; context TeX-translate-location-context + string TeX-translate-location-string) + (push (vector file (+ line offset) + string after-string + snippet box counters) + parsestate))) + ;; else normal error message + (forward-line) + (re-search-forward "^l\\.[0-9]" nil t) + (forward-line 2))) + ((match-beginning 3) + ;; New file -- Push on stack + (push (match-string-no-properties 3) TeX-error-file) + (push nil TeX-error-offset) + (goto-char (match-end 3))) + ((match-beginning 4) + ;; End of file -- Pop from stack + (when (> (length TeX-error-file) 1) + (pop TeX-error-file) + (pop TeX-error-offset)) + (goto-char (1+ (match-beginning 0)))) + ((match-beginning 5) + ;; Hook to change line numbers + (setq TeX-error-offset + (list (string-to-number (match-string 5))))) + ((match-beginning 6) + ;; Hook to change file name + (setq TeX-error-file (list (match-string-no-properties 6)))) + ((match-beginning 7) + (let ((var + (assoc (match-string-no-properties 7) + preview-parse-variables)) + (offset (- (match-beginning 0) (match-beginning 8))) + (str (match-string-no-properties 8))) + ;; paste together continuation lines: + (while (= (- (length str) offset) 79) + (search-forward-regexp "^\\([^\n\r]*\\)\r?$") + (setq offset (- (length str)) + str (concat str (match-string-no-properties 1)))) + (when (and var + (string-match (nth 2 var) str)) + (set (nth 1 var) + (funcall (nth 4 var) + (match-string-no-properties + (nth 3 var) + str)))))))) + (when (null parsestate) + (error "LaTeX found no preview images"))) + (unwind-protect + (save-excursion + (setq parsestate (nreverse parsestate)) + (condition-case err + (dolist (fun fast-hook) + (setq parsestate + (save-excursion (funcall fun parsestate)))) + (error (preview-log-error err "Fast translation hook"))) + (setq snippet 0) + (dolist (state parsestate) + (setq lsnippet snippet + file (aref state 0) + line (aref state 1) + string (aref state 2) + after-string (aref state 3) + snippet (aref state 4) + box (aref state 5) + counters (aref state 6)) + (unless (string= lfile file) + (set-buffer (if (string= file "<none>") + (with-current-buffer run-buffer + TeX-command-buffer) + (find-file-noselect + (expand-file-name file run-directory)))) + (setq lfile file)) + (save-excursion + (save-restriction + (widen) + ;; a fast hook might have positioned us already: + (if (number-or-marker-p string) + (progn + (goto-char string) + (setq lpoint + (if (number-or-marker-p after-string) + after-string + (line-beginning-position)))) + (if (and (eq (current-buffer) lbuffer) + (<= lline line)) + ;; while Emacs does the perfectly correct + ;; thing even when when the line differences + ;; get zero or negative, I don't trust this + ;; to be universally the case across other + ;; implementations. Besides, if the line + ;; number gets smaller again, we are probably + ;; rereading the file, and restarting from + ;; the beginning will probably be faster. + (progn + (goto-char lpoint) + (if (/= lline line) + (if (eq selective-display t) + (re-search-forward "[\n\C-m]" nil + 'end + (- line lline)) + (forward-line (- line lline))))) + (goto-char (point-min)) + (forward-line (1- line))) + (setq lpoint (point)) + (cond + ((search-forward (concat string after-string) + (line-end-position) t) + (backward-char (length after-string))) + ;;ok, transform ^^ sequences + ((search-forward-regexp + (concat "\\(" + (setq string + (preview-error-quote + string)) + "\\)" + (setq after-string + (preview-error-quote + after-string))) + (line-end-position) t) + (goto-char (match-end 1))) + ((search-forward-regexp + (concat "\\(" + (if (string-match + "^[^\0-\177]\\{1,6\\}" string) + (setq string + (substring string (match-end 0))) + string) + "\\)" + (if (string-match + "[^\0-\177]\\{1,6\\}$" after-string) + (setq after-string + (substring after-string + 0 (match-beginning 0))))) + (line-end-position) t) + (goto-char (match-end 1))) + (t (search-forward-regexp + string + (line-end-position) t)))) + (setq lline line + lbuffer (current-buffer)) + (if box + (progn + (if (and lstart (= snippet lsnippet)) + (setq close-data + (nconc + (preview-place-preview + snippet + (save-excursion + (preview-back-command + (= (prog1 (point) + (goto-char lstart)) + lstart)) + (point)) + (point) + (preview-TeX-bb box) + (cons lcounters counters) + tempdir + (cdr open-data)) + close-data)) + (with-current-buffer run-buffer + (preview-log-error + (list 'error + (format + "End of Preview snippet %d unexpected" + snippet)) "Parser"))) + (setq lstart nil)) + ;; else-part of if box + (setq lstart (point) lcounters counters) + ;; >= because snippets in between might have + ;; been ignored because of TeX-default-extension + (unless (>= snippet (1+ lsnippet)) + (with-current-buffer run-buffer + (preview-log-error + (list 'error + (format + "Preview snippet %d out of sequence" + snippet)) "Parser")))))))) + (preview-call-hook 'close (car open-data) close-data)))))) + +(defun preview-get-dpi () + ;; TODO: Remove false-case when required emacs version is bumped to + ;; 24.4 or newer as this is the version where + ;; `frame-monitor-attributes' has been introduced. + (if (fboundp 'frame-monitor-attributes) + (let* ((monitor-attrs (frame-monitor-attributes)) + (mm-dims (cdr (assoc 'mm-size monitor-attrs))) + (mm-width (nth 0 mm-dims)) + (mm-height (nth 1 mm-dims)) + (pixel-dims (cdddr (assoc 'geometry monitor-attrs))) + (pixel-width (nth 0 pixel-dims)) + (pixel-height (nth 1 pixel-dims))) + (cons (/ (* 25.4 pixel-width) mm-width) + (/ (* 25.4 pixel-height) mm-height))) + (cons (/ (* 25.4 (display-pixel-width)) + (display-mm-width)) + (/ (* 25.4 (display-pixel-height)) + (display-mm-height))))) + +(defun preview-get-geometry () + "Transfer display geometry parameters from current display. +Return list of scale, resolution and colors. Calculation +is done in current buffer." + (condition-case err + (let* ((geometry + (list (preview-hook-enquiry preview-scale-function) + (preview-get-dpi) + (preview-get-colors))) + (preview-min-spec + (* (cdr (nth 1 geometry)) + (/ + (preview-inherited-face-attribute + 'preview-reference-face :height 'default) + 720.0)))) + (setq preview-icon (preview-make-image 'preview-icon-specs) + preview-error-icon (preview-make-image + 'preview-error-icon-specs) + preview-nonready-icon (preview-make-image + 'preview-nonready-icon-specs)) + geometry) + (error (error "Display geometry unavailable: %s" + (error-message-string err))))) + +(defun preview-set-geometry (geometry) + "Set geometry variables from GEOMETRY. +Buffer-local `preview-scale', `preview-resolution', +and `preview-colors' are set as given." + (setq preview-scale (nth 0 geometry) + preview-resolution (nth 1 geometry) + preview-colors (nth 2 geometry))) + +(defun preview-get-colors () + "Return colors from the current display. +Fetches the current screen colors and makes a vector +of colors as numbers in the range 0..65535. +Pure borderless black-on-white will return triple nil. +The fourth value is the transparent border thickness." + (let + ((bg (color-values (preview-inherited-face-attribute + 'preview-reference-face :background 'default))) + (fg (color-values (preview-inherited-face-attribute + 'preview-reference-face :foreground 'default))) + (mask (preview-get-heuristic-mask))) + (if (equal '(65535 65535 65535) bg) + (setq bg nil)) + (if (equal '(0 0 0) fg) + (setq fg nil)) + (unless (and (numberp preview-transparent-border) + (consp mask) (integerp (car mask))) + (setq mask nil)) + (vector bg fg mask preview-transparent-border))) + +(defun preview-start-dvipng () + "Start a DviPNG process.." + (let* (;; (file preview-gs-file) + tempdir + (res (/ (* (car preview-resolution) + (preview-hook-enquiry preview-scale)) + (preview-get-magnification))) + (resolution (format " -D%d " res)) + (colors (preview-dvipng-color-string preview-colors res)) + (command (with-current-buffer TeX-command-buffer + (prog1 + (concat (TeX-command-expand preview-dvipng-command) + " " colors resolution) + (setq tempdir TeX-active-tempdir)))) + (name "Preview-DviPNG")) + (setq TeX-active-tempdir tempdir) + (goto-char (point-max)) + (insert-before-markers "Running `" name "' with ``" command "''\n") + (setq mode-name name) + (setq TeX-sentinel-function + (lambda (_process name) (message "%s: done." name))) + (if TeX-process-asynchronous + (let ((process (start-process name (current-buffer) TeX-shell + TeX-shell-command-option + command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (TeX-command-mode-line process) + (set-process-filter process #'TeX-command-filter) + (set-process-sentinel process #'TeX-command-sentinel) + (set-marker (process-mark process) (point-max)) + (push process compilation-in-progress) + (sit-for 0) + process) + (setq mode-line-process ": run") + (force-mode-line-update) + (call-process TeX-shell nil (current-buffer) nil + TeX-shell-command-option + command)))) + +(defun preview-start-dvips (&optional fast) + "Start a DviPS process. +If FAST is set, do a fast conversion." + (let* (;; (file preview-gs-file) + tempdir + (command (with-current-buffer TeX-command-buffer + (prog1 + (TeX-command-expand (if fast + preview-fast-dvips-command + preview-dvips-command)) + (setq tempdir TeX-active-tempdir)))) + (name "Preview-DviPS")) + (setq TeX-active-tempdir tempdir) + (setq preview-ps-file (and fast + (preview-make-filename + (preview-make-filename + "preview.ps" tempdir) + tempdir))) + (goto-char (point-max)) + (insert-before-markers "Running `" name "' with ``" command "''\n") + (setq mode-name name) + (setq TeX-sentinel-function + (lambda (_process name) (message "%s: done." name))) + (if TeX-process-asynchronous + (let ((process (start-process name (current-buffer) TeX-shell + TeX-shell-command-option + command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (TeX-command-mode-line process) + (set-process-filter process #'TeX-command-filter) + (set-process-sentinel process #'TeX-command-sentinel) + (set-marker (process-mark process) (point-max)) + (push process compilation-in-progress) + (sit-for 0) + process) + (setq mode-line-process ": run") + (force-mode-line-update) + (call-process TeX-shell nil (current-buffer) nil + TeX-shell-command-option + command)))) + +(defun preview-start-pdf2dsc () + "Start a PDF2DSC process." + (let* ((file preview-gs-file) + tempdir + pdfsource + (command (with-current-buffer TeX-command-buffer + (prog1 + (TeX-command-expand preview-pdf2dsc-command) + (setq tempdir TeX-active-tempdir + pdfsource (funcall (car file) "pdf" t))))) + (name "Preview-PDF2DSC")) + (setq TeX-active-tempdir tempdir) + (setq preview-ps-file (preview-attach-filename + pdfsource + (preview-make-filename + (preview-make-filename + "preview.dsc" tempdir) + tempdir))) + (goto-char (point-max)) + (insert-before-markers "Running `" name "' with ``" command "''\n") + (setq mode-name name) + (setq TeX-sentinel-function + (lambda (_process name) (message "%s: done." name))) + (if TeX-process-asynchronous + (let ((process (start-process name (current-buffer) TeX-shell + TeX-shell-command-option + command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (TeX-command-mode-line process) + (set-process-filter process #'TeX-command-filter) + (set-process-sentinel process #'TeX-command-sentinel) + (set-marker (process-mark process) (point-max)) + (push process compilation-in-progress) + (sit-for 0) + process) + (setq mode-line-process ": run") + (force-mode-line-update) + (call-process TeX-shell nil (current-buffer) nil + TeX-shell-command-option + command)))) + +(defun preview-TeX-inline-sentinel (process _name) + "Sentinel function for preview. +See `TeX-sentinel-function' and `set-process-sentinel' +for definition of PROCESS and NAME." + (if process (TeX-format-mode-line process)) + (let ((status (process-status process))) + (if (memq status '(signal exit)) + (delete-process process)) + (when (eq status 'exit) + (save-excursion + (goto-char (point-max)) + (forward-line -1) + (if (search-forward "abnormally with code 1" nil t) + (replace-match "as expected with code 1" t t) + (if (search-forward "finished" nil t) + (insert " with nothing to show")))) + (condition-case err + (preview-call-hook 'open) + (error (preview-log-error err "LaTeX" process))) + (preview-reraise-error process)))) + +(defcustom preview-format-extensions '(".fmt" ".efmt") + "Possible extensions for format files. +Those are just needed for cleanup." + :group 'preview-latex + :type '(repeat string)) + +(defun preview-format-kill (format-cons) + "Kill a cached format. +FORMAT-CONS is intended to be an element of `preview-dumped-alist'. +Tries through `preview-format-extensions'." + (dolist (ext preview-format-extensions) + (condition-case nil + (delete-file (preview-dump-file-name (concat (car format-cons) ext))) + (file-error nil)))) + +(defun preview-dump-file-name (file) + "Make a file name suitable for dumping from FILE." + (if file + (concat (file-name-directory file) + "prv_" + (progn + (setq file (file-name-nondirectory file)) + (while (string-match " " file) + (setq file (replace-match "_" t t file))) + file)) + "prv_texput")) + +(defun preview-do-replacements (string replacements) + "Perform replacements in string. +STRING is the input string, REPLACEMENTS is a list of replacements. +A replacement is a cons-cell, where the car is the match string, +and the cdr is a list of strings or symbols. Symbols get dereferenced, +and strings get evaluated as replacement strings." + (let (rep case-fold-search) + (while replacements + (setq rep (pop replacements)) + (cond ((symbolp rep) + (setq string (preview-do-replacements + string (symbol-value rep)))) + ((string-match (car rep) string) + (setq string + (mapconcat (lambda(x) + (if (symbolp x) + (symbol-value x) + (replace-match x t nil string))) + (cdr rep) "")))))) + string) + +(defconst preview-LaTeX-disable-pdfoutput + '(("\\`\\(pdf[^ ]*\\)\ +\\(\\( +[-&]\\([^ \"]\\|\"[^\"]*\"\\)*\\|\ + +\"[-&][^\"]*\"\\)*\\)\\(.*\\)\\'" + . ("\\1\\2 \"\\\\pdfoutput=0 \" \\5"))) + "This replacement places `\"\\pdfoutput=0 \"' after the options +of any command starting with `pdf'.") + +(defcustom preview-LaTeX-command-replacements + nil + "Replacement for `preview-LaTeX-command'. +This is passed through `preview-do-replacements'." + :group 'preview-latex + :type '(repeat + (choice + (symbol :tag "Named replacement" :value preview-LaTeX-disable-pdfoutput) + (cons (string :tag "Matched string") + (repeat :tag "Concatenated elements for replacement" + (choice (symbol :tag "Variable with literal string") + (string :tag "non-literal regexp replacement"))))))) + +(defvar preview-format-name nil + "Format name when enabling preamble cache.") + +(defcustom preview-dump-replacements + '(preview-LaTeX-command-replacements + ;; If -kanji option exists, pick it up as the second match. + ;; Discard all other options. + ("\\`\\([^ ]+\\)\ +\\(?: +\\(?:\\(--?kanji[= ][^ ]+\\)\\|\\(--?output-directory[= ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*\\(.*\\)\\'" + . ("\\1 -ini \\2 \\3 -interaction=nonstopmode \"&\\1\" " preview-format-name ".ini \\4"))) + "Generate a dump command from the usual preview command." + :group 'preview-latex + :type '(repeat + (choice (symbol :tag "Named replacement") + (cons string (repeat (choice symbol string)))))) + +(defcustom preview-undump-replacements + ;; If -kanji option exists, pick it up as the second match. + ;; Discard all other options. + '(("\\`\\([^ ]+\\)\ +\\(?: +\\(?:\\(--?kanji[= ][^ ]+\\)\\|\\(--?output-directory[= ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*.*\ + \"\\\\input\" \"\\\\detokenize{\" \\(.*\\) \"}\"\\'" + . ("\\1 \\2 \\3 -interaction=nonstopmode -file-line-error " + preview-format-name " \"/AUCTEXINPUT{\" \\4 \"}\""))) + ;; See the ini file code below in `preview-cache-preamble' for the + ;; weird /AUCTEXINPUT construct. In short, it is crafted so that + ;; dumped format file can read file of non-ascii name. + "Use a dumped format for reading preamble." + :group 'preview-latex + :type '(repeat + (choice (symbol :tag "Named replacement") + (cons string (repeat (choice symbol string)))))) + + +(defun preview-cache-preamble (&optional format-cons) + "Dump a pregenerated format file. +For the rest of the session, this file is used when running +on the same master file. + +Return the process for dumping, nil if there is still a valid +format available. + +If FORMAT-CONS is non-nil, a previous format may get reused." + (interactive) + (setq TeX-current-process-region-p nil) + (let* ((dump-file + (expand-file-name (preview-dump-file-name (TeX-master-file "ini")))) + (master (TeX-master-file)) + (format-name (expand-file-name master)) + (preview-format-name (shell-quote-argument + (preview-dump-file-name (file-name-nondirectory + master)))) + (master-file (expand-file-name (TeX-master-file t))) + (command (preview-do-replacements + (TeX-command-expand + (preview-string-expand preview-LaTeX-command)) + preview-dump-replacements)) + (preview-auto-cache-preamble nil)) + (unless (and (consp (cdr format-cons)) + (string= command (cadr format-cons))) + (unless format-cons + (setq format-cons (assoc format-name preview-dumped-alist))) + (if format-cons + (preview-cache-preamble-off format-cons) + (setq format-cons (list format-name)) + (push format-cons preview-dumped-alist)) + ;; mylatex.ltx expects a file name to follow. Bad. `.tex' + ;; in the tools bundle is an empty file. + (write-region "\\let\\PREVIEWdump\\dump\\def\\dump{% +\\edef\\next{{\\ifx\\pdfoutput\\undefined\\else\ +\\pdfoutput=\\the\\pdfoutput\\relax\\fi\ +\\the\\everyjob}}\\everyjob\\next\\catcode`\\ 10 % +\\catcode`/ 0 % +\\def\\AUCTEXINPUT##1{\\catcode`/ 12\\relax\\catcode`\\ 9\\relax\\input\\detokenize{##1}\\relax}% +\\let\\dump\\PREVIEWdump\\dump}\\input mylatex.ltx \\relax%\n" nil dump-file) + (TeX-save-document #'TeX-master-file) + (prog1 (preview-generate-preview master command) + (add-hook 'kill-emacs-hook #'preview-cleanout-tempfiles t) + (setq TeX-sentinel-function + (lambda (process _status) + (condition-case err + (progn + (if (and (eq (process-status process) 'exit) + (zerop (process-exit-status process))) + (preview-watch-preamble + master-file + command + format-cons) + (preview-format-kill format-cons)) + (delete-file dump-file)) + (error (preview-log-error err "Dumping" process))) + (preview-reraise-error process))))))) + +(defun preview-cache-preamble-off (&optional old-format) + "Clear the pregenerated format file. +The use of the format file is discontinued. +OLD-FORMAT may already contain a format-cons as +stored in `preview-dumped-alist'." + (interactive) + (unless old-format + (setq old-format + (let ((master-file (expand-file-name (TeX-master-file)))) + (or (assoc master-file preview-dumped-alist) + (car (push (list master-file) preview-dumped-alist)))))) + (preview-unwatch-preamble old-format) + (preview-format-kill old-format) + (setcdr old-format nil)) + +(defun preview-region (begin end) + "Run preview on region between BEGIN and END." + (interactive "r") + (let ((TeX-region-extra + ;; Write out counter information to region. + (concat (preview--counter-information begin) + TeX-region-extra))) + (TeX-region-create (TeX-region-file TeX-default-extension) + (buffer-substring-no-properties begin end) + (if buffer-file-name + (file-name-nondirectory buffer-file-name) + "<none>") + (TeX-current-offset begin))) + (setq TeX-current-process-region-p t) + (preview-generate-preview (TeX-region-file) + (preview-do-replacements + (TeX-command-expand + (preview-string-expand preview-LaTeX-command)) + preview-LaTeX-command-replacements))) + +(defun preview-buffer () + "Run preview on current buffer." + (interactive) + (preview-region (point-min) (point-max))) + +;; We have a big problem: When we are dumping preambles, diagnostics +;; issued in later runs will not make it to the output when the +;; predumped format skips the preamble. So we have to place those +;; after \begin{document}. This we can only do if regions never +;; include the preamble. We could do this in our own functions, but +;; that would not extend to the operation of C-c C-r g RET. So we +;; make this preamble skipping business part of TeX-region-create. +;; This will fail if the region is to contain just part of the +;; preamble -- a bad idea anyhow. + +(defun preview--skip-preamble-region (region-text region-offset) + "Skip preamble for the sake of predumped formats. +Helper function of `TeX-region-create'. + +If REGION-TEXT doesn't contain preamble, it returns nil. +Otherwise, it returns cons (ALTERED-TEXT . ALTERED-OFFSET) where +ALTERED-TEXT is REGION-TEXT without the preamble part and +ALTERED-OFFSET is REGION-OFFSET increased by the number of lines +of the preamble part of REGION-TEXT." + (if (string-match TeX-header-end region-text) + (cons (substring region-text (match-end 0)) + (with-temp-buffer + (insert (substring region-text 0 (match-end 0))) + (+ region-offset (TeX-current-offset)))))) + +(defun preview-document () + "Run preview on master document." + (interactive) + (TeX-save-document #'TeX-master-file) + (setq TeX-current-process-region-p nil) + (preview-generate-preview + (TeX-master-file) + (preview-do-replacements + (TeX-command-expand + (preview-string-expand preview-LaTeX-command)) + preview-LaTeX-command-replacements))) + +(defun preview-environment (count) + "Run preview on LaTeX environment. +This avoids running environments through preview that are +indicated in `preview-inner-environments'. If you use a prefix +argument COUNT, the corresponding level of outward nested +environments is selected." + (interactive "p") + (save-excursion + (let (currenv) + (dotimes (_ (1- count)) + (setq currenv (LaTeX-current-environment)) + (if (string= currenv "document") + (error "No enclosing outer environment found")) + (LaTeX-find-matching-begin)) + (while (member (setq currenv (LaTeX-current-environment)) + preview-inner-environments) + (LaTeX-find-matching-begin)) + (if (string= currenv "document") + (error "No enclosing outer environment found")) + (preview-region + (save-excursion (LaTeX-find-matching-begin) (point)) + (save-excursion (LaTeX-find-matching-end) (point)))))) + +(defun preview-section () + "Run preview on LaTeX section." (interactive) + (save-excursion + (LaTeX-mark-section) + (preview-region (region-beginning) (region-end)))) + + +(defun preview-generate-preview (file command) + "Generate a preview. +FILE the file (without default extension), COMMAND is the command +to use. + +It returns the started process." + (let* ((geometry (preview-get-geometry)) + (commandbuff (current-buffer)) + (pr-file (cons + #'TeX-active-master + (file-name-nondirectory file))) + (master (TeX-master-file)) + (master-file (expand-file-name master)) + (dumped-cons (assoc master-file + preview-dumped-alist)) + process) + (unless dumped-cons + (push (setq dumped-cons (cons master-file + (if (eq preview-auto-cache-preamble 'ask) + (y-or-n-p "Cache preamble? ") + preview-auto-cache-preamble))) + preview-dumped-alist)) + (when (cdr dumped-cons) + (let* (TeX-current-process-region-p) + (setq process (preview-cache-preamble dumped-cons)) + (if process + ;; FIXME: Use `add-function'. + (setq TeX-sentinel-function + (let ((prev-fun TeX-sentinel-function)) + (lambda (process string) + (funcall prev-fun process string) + (TeX-inline-preview-internal + command file + pr-file commandbuff + dumped-cons + master + geometry + (buffer-string)))))))) + (or process + (TeX-inline-preview-internal command file + pr-file commandbuff + dumped-cons master + geometry)))) + +(defun TeX-inline-preview-internal (command file pr-file + commandbuff dumped-cons _master + geometry + &optional str) + "Internal stuff for previewing. +COMMAND and FILE should be explained in `TeX-command-list'. +PR-FILE is the target file name in the form for `preview-gs-file'. +COMMANDBUFF, DUMPED-CONS, MASTER, and GEOMETRY are +internal parameters, STR may be a log to insert into the current log." + (set-buffer commandbuff) + (let* + ((preview-format-name (shell-quote-argument + (concat "&" + (preview-dump-file-name + ;; Get the filename from + ;; `TeX-master-file' with prv to + ;; get the correct path but then + ;; strip the extension + (file-name-sans-extension + (TeX-master-file "prv" t)))))) + (process-environment (copy-sequence process-environment)) + (process + (progn + ;; Fix Bug#20773, Bug#27088. + ;; Make LaTeX not to insert newline in lines necessary to + ;; identify Bounding Boxes. + (setenv "max_print_line" "1000") + (TeX-run-command + "Preview-LaTeX" + (if (consp (cdr dumped-cons)) + (preview-do-replacements + command + preview-undump-replacements) + command) + file)))) + (condition-case err + (progn + (when str + (save-excursion + (goto-char (point-min)) + (insert str) + (when (= (process-mark process) (point-min)) + (set-marker (process-mark process) (point))))) + (preview-set-geometry geometry) + (setq preview-gs-file pr-file) + (setq TeX-sentinel-function #'preview-TeX-inline-sentinel) + (TeX-parse-reset) + (setq TeX-parse-function #'TeX-parse-TeX) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel "Preview-LaTeX" file process))) + (error (preview-log-error err "Preview" process) + (delete-process process) + (preview-reraise-error process))))) + +(defconst preview-version AUCTeX-version + "Preview version. +If not a regular release, the date of the last change.") + +(defconst preview-release-date AUCTeX-date + "Preview release date using the ISO 8601 format, yyyy-mm-dd.") + +(defun preview-dump-state (buffer) + (condition-case nil + (progn + (unless (local-variable-p 'TeX-command-buffer (current-buffer)) + (setq buffer (with-current-buffer buffer (TeX-active-buffer)))) + (when (bufferp buffer) + (insert "\nRun buffer contents:\n\n") + (if (< (buffer-size buffer) 5000) + (insert-buffer-substring buffer) + (insert-buffer-substring buffer 1 2500) + (insert "...\n\n[...]\n\n\t...") + (insert-buffer-substring buffer + (- (buffer-size buffer) 2500) + (buffer-size buffer))) + (insert "\n"))) + (error nil))) + +;;;###autoload +(defun preview-report-bug () "Report a bug in the preview-latex package." + (interactive) + (let ((reporter-prompt-for-summary-p "Bug report subject: ")) + (reporter-submit-bug-report + "bug-auctex@gnu.org" + preview-version + '(AUCTeX-version + LaTeX-command-style + image-types + preview-image-type + preview-image-creators + preview-dvipng-image-type + preview-dvipng-command + preview-pdf2dsc-command + preview-gs-command + preview-gs-options + preview-gs-image-type-alist + preview-fast-conversion + preview-prefer-TeX-bb + preview-dvips-command + preview-fast-dvips-command + preview-scale-function + preview-LaTeX-command + preview-required-option-list + preview-preserve-counters + preview-default-option-list + preview-default-preamble + preview-LaTeX-command-replacements + preview-dump-replacements + preview-undump-replacements + preview-auto-cache-preamble + preview-TeX-style-dir) + (let ((buf (current-buffer))) + (lambda () (preview-dump-state buf))) + (lambda () + (insert (format "\nOutput from running `%s -h':\n" + preview-gs-command)) + (call-process preview-gs-command nil t nil "-h") + (insert "\n")) + "Remember to cover the basics. Including a minimal LaTeX example +file exhibiting the problem might help." + ))) + +(provide 'preview) +;;; preview.el ends here diff --git a/elpa/auctex-13.1.3/preview.elc b/elpa/auctex-13.1.3/preview.elc Binary files differnew file mode 100644 index 0000000..73c57c7 --- /dev/null +++ b/elpa/auctex-13.1.3/preview.elc diff --git a/elpa/auctex-13.1.3/style/.nosearch b/elpa/auctex-13.1.3/style/.nosearch new file mode 100644 index 0000000..aa31332 --- /dev/null +++ b/elpa/auctex-13.1.3/style/.nosearch @@ -0,0 +1 @@ +;; AUCTeX style/ and auto/ directories should not appear in load path. diff --git a/elpa/auctex-13.1.3/style/Alegreya.el b/elpa/auctex-13.1.3/style/Alegreya.el new file mode 100644 index 0000000..84adaa5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/Alegreya.el @@ -0,0 +1,106 @@ +;;; Alegreya.el --- AUCTeX style for `Alegreya.sty' (v2015/10/22) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `Alegreya.sty' (v2015/10/22). +;; `Alegreya.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "Alegreya" + (lambda () + + ;; Run style hook for packages loaded by Alegreya + (TeX-run-style-hooks "textcomp") + + ;; Load `fontaxes' or `fontspec' dep. on `type1' option: + (if (or (LaTeX-provided-package-options-member "Alegreya" "type1") + (LaTeX-provided-package-options-member "Alegreya" "type1=true")) + (TeX-run-style-hooks "fontaxes") + (TeX-run-style-hooks "fontspec")) + + (TeX-add-symbols + ;; Should be used in preamble only + '("useosf") + ;; Text commands + '("Alegreya" -1) + '("AlegreyaBlack" -1) + '("AlegreyaLF" -1) + '("AlegreyaOsF" -1) + '("AlegreyaTLF" -1) + '("AlegreyaTOsF" -1) + '("textsu" t) ; superior figures + '("sufigures" -1) ; + '("textin" t) ; inferior figures + '("infigures" -1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textsu" "{") + ("textin" "{")) + 'type-command) + (font-latex-add-keywords '(("Alegreya" "") + ("AlegreyaBlack" "") + ("AlegreyaLF" "") + ("AlegreyaOsF" "") + ("AlegreyaTLF" "") + ("AlegreyaTOsF" "") + ("sufigures" "") + ("infigures" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-Alegreya-package-options-list + '(("lining" ("true" "false")) + ("lf" ("true" "false")) + ("oldstyle" ("true" "false")) + ("osf" ("true" "false")) + ("tabular" ("true" "false")) + ("tf" ("true" "false")) + ("proportional" ("true" "false")) + ("pf" ("true" "false")) + ("black" ("true" "false")) + ("type1" ("true" "false")) + ("scaled") + ("scale")) + "Package options for the Alegreya package.") + +(defun LaTeX-Alegreya-package-options () + "Prompt for package options for the Alegreya package." + (TeX-read-key-val t LaTeX-Alegreya-package-options-list)) + +;;; Alegreya.el ends here diff --git a/elpa/auctex-13.1.3/style/Alegreya.elc b/elpa/auctex-13.1.3/style/Alegreya.elc Binary files differnew file mode 100644 index 0000000..4df5db3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/Alegreya.elc diff --git a/elpa/auctex-13.1.3/style/AlegreyaSans.el b/elpa/auctex-13.1.3/style/AlegreyaSans.el new file mode 100644 index 0000000..3b31527 --- /dev/null +++ b/elpa/auctex-13.1.3/style/AlegreyaSans.el @@ -0,0 +1,118 @@ +;;; AlegreyaSans.el --- AUCTeX style for `AlegreyaSans.sty' (v2015/10/22) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `AlegreyaSans.sty' (v2015/10/22). +;; `AlegreyaSans.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "AlegreyaSans" + (lambda () + + ;; Run style hook for packages loaded by AlegreyaSans + (TeX-run-style-hooks "textcomp") + + ;; Load `fontaxes' or `fontspec' dep. on `type1' option: + (if (or (LaTeX-provided-package-options-member "AlegreyaSans" "type1") + (LaTeX-provided-package-options-member "AlegreyaSans" "type1=true")) + (TeX-run-style-hooks "fontaxes") + (TeX-run-style-hooks "fontspec")) + + (TeX-add-symbols + ;; Should be used in preamble only + '("useosf") + ;; Text commands + '("AlegreyaSans" -1) + '("AlegreyaSansLF" -1) + '("AlegreyaSansOsF" -1) + '("AlegreyaSansTLF" -1) + '("AlegreyaSansTOsF" -1) + '("AlegreyaSansThin" -1) + '("AlegreyaSansLight" -1) + '("AlegreyaSansMedium" -1) + '("AlegreyaSansExtraBold" -1) + '("AlegreyaSansBlack" -1) + '("textsu" t) ; superior figures + '("sufigures" -1) ; + '("textin" t) ; inferior figures + '("infigures" -1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textsu" "{") + ("textin" "{")) + 'type-command) + (font-latex-add-keywords '(("AlegreyaSans" "") + ("AlegreyaSansLF" "") + ("AlegreyaSansOsF" "") + ("AlegreyaSansTLF" "") + ("AlegreyaSansTOsF" "") + ("AlegreyaSansLight" "") + ("AlegreyaSansMedium" "") + ("AlegreyaSansExtraBold" "") + ("AlegreyaSansBlack" "") + ("sufigures" "") + ("infigures" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-AlegreyaSans-package-options-list + '(("lining" ("true" "false")) + ("lf" ("true" "false")) + ("oldstyle" ("true" "false")) + ("osf" ("true" "false")) + ("tabular" ("true" "false")) + ("tf" ("true" "false")) + ("proportional" ("true" "false")) + ("pf" ("true" "false")) + ("black" ("true" "false")) + ("extrabold" ("true" "false")) + ("thin" ("true" "false")) + ("light" ("true" "false")) + ("medium" ("true" "false")) + ("type1" ("true" "false")) + ("sfdefault" ("true" "false")) + ("scaled") + ("scale")) + "Package options for the AlegreyaSans package.") + +(defun LaTeX-AlegreyaSans-package-options () + "Prompt for package options for the AlegreyaSans package." + (TeX-read-key-val t LaTeX-AlegreyaSans-package-options-list)) + +;;; AlegreyaSans.el ends here diff --git a/elpa/auctex-13.1.3/style/AlegreyaSans.elc b/elpa/auctex-13.1.3/style/AlegreyaSans.elc Binary files differnew file mode 100644 index 0000000..b636def --- /dev/null +++ b/elpa/auctex-13.1.3/style/AlegreyaSans.elc diff --git a/elpa/auctex-13.1.3/style/AnonymousPro.el b/elpa/auctex-13.1.3/style/AnonymousPro.el new file mode 100644 index 0000000..778c703 --- /dev/null +++ b/elpa/auctex-13.1.3/style/AnonymousPro.el @@ -0,0 +1,92 @@ +;;; AnonymousPro.el --- AUCTeX style for `AnonymousPro.sty' (v2.2) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2019, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-30 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `AnonymousPro.sty' (v2.2) from +;; 2019/07/07. `AnonymousPro.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "AnonymousPro" + (lambda () + + ;; Run style hook for textcomp + (TeX-run-style-hooks "textcomp") + + ;; New symbols + (TeX-add-symbols + "ANPapplelogo" + "ANPappleopen" + "ANPapproxequal" + "ANPback" + "ANPblackdiamond" + "ANPcheckmark" + "ANPcopy" + "ANPellipsis" + "ANPendtab" + "ANPerasetotheright" + "ANPgreaterequal" + "ANPHbar" + "ANPhbar" + "ANPinfinity" + "ANPinsert" + "ANPintegral" + "ANPlessequal" + "ANPlozenge" + "ANPnotequal" + "ANPoptionkey" + "ANPpartialdiff" + "ANPPi" + "ANPpi" + "ANPproduct" + "ANPshift" + "ANPshiftlock" + "ANPSigma" + "ANPsigma" + "ANPsigmaone" + "ANPsummation" + "ANPtab" + "ANPReturnSign" + "ANPShoulderedOpenBox" + "ANPUpArrowHead" + "ANPInsertSign" + "ANPUpArrowHeadBars" + "ANPHelm" + "ANPOpenBox" + "ANPDelta" + "ANPverticaltab" + "ANPNumeroSign")) + TeX-dialect) + +(defvar LaTeX-AnonymousPro-package-options + '("ttdefault" "scale" "scaled") + "Package options for the AnonymousPro package.") + +;;; AnonymousPro.el ends here diff --git a/elpa/auctex-13.1.3/style/AnonymousPro.elc b/elpa/auctex-13.1.3/style/AnonymousPro.elc Binary files differnew file mode 100644 index 0000000..eff5ecf --- /dev/null +++ b/elpa/auctex-13.1.3/style/AnonymousPro.elc diff --git a/elpa/auctex-13.1.3/style/CJK.el b/elpa/auctex-13.1.3/style/CJK.el new file mode 100644 index 0000000..baee5d9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/CJK.el @@ -0,0 +1,97 @@ +;;; CJK.el --- AUCTeX style for the CJK package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the CJK package, version 4.8.0 +;; (22-May-2008). + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-CJK-package-options + '("lowercase" "global" "local" "active" "encapsulated") + "Package options for the CJK package.") + +(defvar LaTeX-CJK-enc-list + '("Bg5" "Bg5+" "HK" "GB" "GBt" "GBK" "JIS" "JIS2" "SJIS" "KS" "UTF8" "CNS1" + "CNS2" "CNS3" "CNS4" "CNS5" "CNS6" "CNS7" "CEFX" "CEFY") + "List of encodings supported by the CJK package.") + +(defun LaTeX-env-CJK (env) + "Prompt for the arguments of ENV and insert it. +The function can be used for CJK and CJK* environments." + (LaTeX-insert-environment + env + (concat + (let ((font-enc (TeX-read-string "(Optional) Font encoding: "))) + (unless (zerop (length font-enc)) (format "[%s]" font-enc))) + (format "{%s}" (completing-read "Encoding: " + (mapcar #'list LaTeX-CJK-enc-list))) + (format "{%s}" (TeX-read-string "Font family: "))))) + +(TeX-add-style-hook + "CJK" + (lambda () + ;; New symbols + (TeX-add-symbols + '("CJKencfamily" ["Font encoding"] "Encoding" "Font family") + '("CJKchar" ["Encoding"] "First byte" "Second byte") + '("CJKcaption" 1) + '("CJKfamily" 1) + '("CJKfontenc" "Encoding" "Font encoding") + '("CJKenc" 1) + '("Unicode" "First byte" "Second byte") + '("CJKsymbols" 2) + '("CJKsymbol" 1) + "CJKbold" + "CJKnormal" + "CJKboldshift" + "CJKCJKchar" + "CJKhangulchar" + "CJKlatinchar" + "CJKhwkatakana" + "CJKnohwkatakana" + "CJKglue" + "CJKtolerance" + "CJKtilde" + "nbs" + "standardtilde" + "CJKspace" + "CJKnospace" + "CJKindent" + '("CJKaddEncHook" 2) + "CJKkern" + "CJKverbatim") + ;; New environments + (LaTeX-add-environments + '("CJK" LaTeX-env-CJK) + '("CJK*" LaTeX-env-CJK))) + TeX-dialect) + +;;; CJK.el ends here diff --git a/elpa/auctex-13.1.3/style/CJK.elc b/elpa/auctex-13.1.3/style/CJK.elc Binary files differnew file mode 100644 index 0000000..d0b2924 --- /dev/null +++ b/elpa/auctex-13.1.3/style/CJK.elc diff --git a/elpa/auctex-13.1.3/style/CJKutf8.el b/elpa/auctex-13.1.3/style/CJKutf8.el new file mode 100644 index 0000000..d522015 --- /dev/null +++ b/elpa/auctex-13.1.3/style/CJKutf8.el @@ -0,0 +1,41 @@ +;;; CJKutf8.el --- AUCTeX style for the CJKutf8 package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the CJKutf8 package. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "CJKutf8" + (lambda () + (TeX-run-style-hooks "CJK")) + TeX-dialect) + +;;; CJKutf8.el ends here diff --git a/elpa/auctex-13.1.3/style/CJKutf8.elc b/elpa/auctex-13.1.3/style/CJKutf8.elc Binary files differnew file mode 100644 index 0000000..0d8d83a --- /dev/null +++ b/elpa/auctex-13.1.3/style/CJKutf8.elc diff --git a/elpa/auctex-13.1.3/style/FiraMono.el b/elpa/auctex-13.1.3/style/FiraMono.el new file mode 100644 index 0000000..a612291 --- /dev/null +++ b/elpa/auctex-13.1.3/style/FiraMono.el @@ -0,0 +1,78 @@ +;;; FiraMono.el --- AUCTeX style for `FiraMono.sty' (v2016/02/13) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-11-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `FiraMono.sty' (v2016/02/13). +;; `FiraMono.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "FiraMono" + (lambda () + + ;; `textcomp' is always loaded: + (TeX-run-style-hooks "textcomp") + + ;; If package option `type1' is given, load `fontaxes': + (when (LaTeX-provided-package-options-member "FiraMono" "type1") + (TeX-run-style-hooks "fontaxes")) + + ;; Macros: + (TeX-add-symbols + '("sufigures" -1) + '("firamonooldstyle" -1) + '("firamonolining" -1) + '("firamonomedium" -1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("sufigures" "") + ("firamonooldstyle" "") + ("firamonolining" "") + ("firamonomedium" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-FiraMono-package-options '("scaled" "scale" + "type1" + "lining" "lf" + "oldstyle" "osf" + "nomap" + "medium" "mb") + "Package options for the FiraMono package.") + +;;; FiraMono.el ends here diff --git a/elpa/auctex-13.1.3/style/FiraMono.elc b/elpa/auctex-13.1.3/style/FiraMono.elc Binary files differnew file mode 100644 index 0000000..41cfd37 --- /dev/null +++ b/elpa/auctex-13.1.3/style/FiraMono.elc diff --git a/elpa/auctex-13.1.3/style/FiraSans.el b/elpa/auctex-13.1.3/style/FiraSans.el new file mode 100644 index 0000000..10ac530 --- /dev/null +++ b/elpa/auctex-13.1.3/style/FiraSans.el @@ -0,0 +1,110 @@ +;;; FiraSans.el --- AUCTeX style for `FiraSans.sty' (v2016/11/20) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-11-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `FiraSans.sty' (v2016/11/20). +;; `FiraSans.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "FiraSans" + (lambda () + + ;; `textcomp' is always loaded: + (TeX-run-style-hooks "textcomp") + + ;; If package option `type1' is given, load `fontaxes': + (when (LaTeX-provided-package-options-member "FiraSans" "type1") + (TeX-run-style-hooks "fontaxes")) + + ;; Macros: + (TeX-add-symbols + '("sufigures" -1) + '("firaoldstyle" -1) + '("firalining" -1) + '("firatabular" -1) + '("firaproportional" -1) + '("firathin" -1) + '("firalight" -1) + '("firaextralight" -1) + '("firaultralight" -1) + '("firamedium" -1) + '("firabook" -1) + '("firasemibold" -1) + '("firaextrabold" -1) + '("firaheavy" -1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("sufigures" "") + ("firaoldstyle" "") + ("firalining" "") + ("firatabular" "") + ("firaproportional" "") + ("firathin" "") + ("firalight" "") + ("firaextralight" "") + ("firaultralight" "") + ("firamedium" "") + ("firabook" "") + ("firasemibold" "") + ("firaextrabold" "") + ("firaheavy" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-FiraSans-package-options + '("scaled" "scale" + "type1" + "lining" "lf" + "oldstyle" "osf" + "tabular" "t" + "proportional" "p" + "book" + "medium" "mb" + "semibold" "sb" + "light" "l" + "extralight" + "ultralight" + "thin" + "extrabold" + "heavy" + "default" + "sfdefault") + "Package options for the FiraSans package.") + +;;; FiraSans.el ends here diff --git a/elpa/auctex-13.1.3/style/FiraSans.elc b/elpa/auctex-13.1.3/style/FiraSans.elc Binary files differnew file mode 100644 index 0000000..be71bcb --- /dev/null +++ b/elpa/auctex-13.1.3/style/FiraSans.elc diff --git a/elpa/auctex-13.1.3/style/MinionPro.el b/elpa/auctex-13.1.3/style/MinionPro.el new file mode 100644 index 0000000..ff76329 --- /dev/null +++ b/elpa/auctex-13.1.3/style/MinionPro.el @@ -0,0 +1,76 @@ +;;; MinionPro.el -- AUCTeX style for MinionPro.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2005, 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2005-11-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `MinionPro.sty' (v2.3) from 2012/08/03. +;; The latest version of MinionPro is available as part of FontPro +;; bundle from <https://www.github.com/sebschub>. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "MinionPro" + (lambda () + + ;; New symbols + (TeX-add-symbols + '("smallfrac" "Numerator" "Denominator") + '("slantfrac" "Numerator" "Denominator")) + + ;; Run style hook for amsmath which is loaded via MnSymbol + (TeX-run-style-hooks "amsmath" "fontaxes" "textcomp") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("smallfrac" "{{") + ("slantfrac" "{{")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-MinionPro-package-options + '("smallfamily" "medfamily" "fullfamily" "noopticals" "opticals" + "slides" "textosf" "mathosf" "osf" "textlf" "mathlf" "lf" + "mathtabular" "mnsy" "cmsy" "swash" "abx" "amsbb" "fourierbb" + "lucidabb" "mixedgreek" "italicgreek" "frenchmath" "minionint" + "footnotefigures" + + ;; Additional options in v2.1 + "onlytext" "onlymath" "loosequotes" "openg" "normalsize" "nonormalsize" + + ;; Additional option in v2.2 + "scale") + "Package options for the MinionPro package.") + +;;; MinionPro.el ends here diff --git a/elpa/auctex-13.1.3/style/MinionPro.elc b/elpa/auctex-13.1.3/style/MinionPro.elc Binary files differnew file mode 100644 index 0000000..b63b3ef --- /dev/null +++ b/elpa/auctex-13.1.3/style/MinionPro.elc diff --git a/elpa/auctex-13.1.3/style/MyriadPro.el b/elpa/auctex-13.1.3/style/MyriadPro.el new file mode 100644 index 0000000..0f3de7d --- /dev/null +++ b/elpa/auctex-13.1.3/style/MyriadPro.el @@ -0,0 +1,102 @@ +;;; MyriadPro.el --- AUCTeX style for `MyriadPro.sty' (v0.5) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `MyriadPro.sty' (v0.5) from 2013/04/20. +;; The latest version of MyriadPro is available as part of FontPro +;; bundle from <https://www.github.com/sebschub>. `MyriadPro.sty' is +;; not part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "MyriadPro" + (lambda () + + ;; Run style hook for various packages loaded by MyriadPro + (TeX-run-style-hooks "textcomp" "amsmath" "fontaxes" "mdsymbol") + + ;; New symbols + (TeX-add-symbols + '("smallfrac" "Numerator" "Denominator") + '("slantfrac" "Numerator" "Denominator") + '("boldsymbol" "Symbol")) + + ;; More control over spacing in `\slantfrac': + (LaTeX-add-lengths "MdSlantfracSpacingBeforeSlash" + "MdSlantfracSpacingAfterSlash") + + ;; `\mathversion' is available with sansmath option + (when (LaTeX-provided-package-options-member "MyriadPro" "sansmath") + (TeX-add-symbols + '("mathversion" + (TeX-arg-eval completing-read "Math version: " + '(("sans") ("sansbold") + ("sanstabular") ("sansboldtabular")))))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("smallfrac" "{{") + ("slantfrac" "{{")) + 'textual) + (font-latex-add-keywords '(("mathversion" "{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-MyriadPro-package-options + '(;; Font selection + "smallfamily" "medfamily" "onlytext" "onlymath" "math" "sansmath" + + ;; Figure selection + "textosf" "mathosf" "osf" "textlf" "mathlf" "lf" "mathtabular" + + ;; Calligraphic fonts + "cmsy" "swash" "abx" + + ;; Blackboard bold letters + "amsbb" "fourierbb" "lucidabb" + + ;; Greek letters + "mixedgreek" "italicgreek" "frenchmath" + + ;; Miscellaneous options + "scale" "loosequotes" "footnotefigures" + + ;; Additional mathversions + "sansmath") + "Package options for the MyriadPro package.") + +;;; MyriadPro.el ends here diff --git a/elpa/auctex-13.1.3/style/MyriadPro.elc b/elpa/auctex-13.1.3/style/MyriadPro.elc Binary files differnew file mode 100644 index 0000000..1596d1e --- /dev/null +++ b/elpa/auctex-13.1.3/style/MyriadPro.elc diff --git a/elpa/auctex-13.1.3/style/XCharter.el b/elpa/auctex-13.1.3/style/XCharter.el new file mode 100644 index 0000000..6f35b36 --- /dev/null +++ b/elpa/auctex-13.1.3/style/XCharter.el @@ -0,0 +1,97 @@ +;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2017, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-30 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `XCharter.sty' (v1.094) from 2017/08/08. +;; `XCharter.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "XCharter" + (lambda () + + ;; Run style hook for various packages loaded by XCharter + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + + ;; Only preamble commands + '("useosf" 0) + '("useosfI" 0) + + ;; Text commands + '("textsu" t) ; superior figures + '("sustyle" -1) ; + '("textin" t) ; inferior figures + '("instyle" -1) ; + '("textlf" t) ; lining figures + '("lfstyle" -1) ; + '("textosf" t) ; oldstyle figures + '("textosfI" t) ; oldstyle figures alternate + '("osfstyle" -1) ; whatever oldstyle option is in force + '("textnumerator" t) ; numerators + '("textnu" t) ; + '("textdenominator" t) ; denominators + '("textde" t) ; + '("textfrac" 2)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textsu" "{") + ("textin" "{") + ("textlf" "{") + ("textosf" "{") + ("textosfI" "{") + ("textnumerator" "{") + ("textnu" "{") + ("textdenominator" "{") + ("textde" "{") + ("textfrac" "{{")) + 'type-command) + (font-latex-add-keywords '(("sustyle" "") + ("instyle" "") + ("lfstyle" "") + ("osfstyle" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-XCharter-package-options + '("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI" + "scaled" "sups" "scosf") + "Package options for the XCharter package.") + +;;; XCharter.el ends here diff --git a/elpa/auctex-13.1.3/style/XCharter.elc b/elpa/auctex-13.1.3/style/XCharter.elc Binary files differnew file mode 100644 index 0000000..8a11dda --- /dev/null +++ b/elpa/auctex-13.1.3/style/XCharter.elc diff --git a/elpa/auctex-13.1.3/style/acro.el b/elpa/auctex-13.1.3/style/acro.el new file mode 100644 index 0000000..56291a1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/acro.el @@ -0,0 +1,300 @@ +;;; acro.el --- AUCTeX style for `acro.sty' version 1.2a. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2015, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `acro.sty' version 1.2a. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-acro-package-options-list + '(;; General Options + ("version" ("0" "1")) + ("single" ("true" "false")) + ("hyperref" ("true" "false")) + ("record-pages" ("true" "false")) + ("only-used" ("true" "false")) + ("mark-as-used" ("first" "any")) + ("macros" ("true" "false")) + ("xspace" ("true" "false")) + ("strict" ("true" "false")) + ("sort" ("true" "false")) + ("cite" ("all" "first" "none")) + ("cite-cmd") + ("cite-space") + ("index-cmd") + ("accsupp" ("true" "false")) + ("uc-cmd") + ;; Options Regarding Acronyms + ("short-format") + ("long-format") + ("first-long-format") + ("list-short-format") + ("list-long-format") + ("extra-format") + ("first-style" ("default" "plain" "empty" "square" "short" "reversed" + "plain-reversed" "footnote" "sidenote")) + ("extra-style" ("default" "plain" "comma" "paren" "bracket")) + ("plural-ending") + ;; Options Regarding the List + ("page-ref" ("none" "plain" "comma" "paren")) + ("page-name") + ("pages-name") + ("page-ranges" ("true" "false")) + ("next-page") + ("next-pages") + ("list-type" ("table" "itemize" "description")) + ("list-style" ("list" "tabular" "longtable" "extra-tabular" "extra-longtable" + "extra-tabular-rev" "extra-longtable-rev")) + ("list-header" ("chapter" "chapter*" "section" "section*" "subsection" + "subsection*" "addchap" "addsec")) + ("list-name") + ("list-table-width") + ("list-caps" ("true" "false"))) + "Package options for the acro package.") + +(TeX-auto-add-type "acro-acronym" "LaTeX") + +;; Self Parsing -- see (info "(auctex)Hacking the Parser"). +(defvar LaTeX-acro-regexp + (concat "\\\\DeclareAcronym" "{\\([^\n\r%\\{}]+\\)}") + "Matches `acro' acronym definitions.") + +(defvar LaTeX-auto-acro-acronym nil + "Temporary for parsing `acro' acronym definitions.") + +(defun LaTeX-acro-prepare () + "Clear `LaTex-auto-acro-acronym' before use." + (setq LaTeX-auto-acro-acronym nil)) + +(defun LaTeX-acro-cleanup () + "Move acronyms from `LaTeX-auto-acro-acronym' to +`LaTeX-acro-list' and to `TeX-auto-symbol' if option `macros' is +set to `true'." + (mapc (lambda (acronym) + (add-to-list 'LaTeX-acro-acronym-list (list acronym))) + LaTeX-auto-acro-acronym) + (when (or (LaTeX-provided-package-options-member "acro" "macros") + (LaTeX-provided-package-options-member "acro" "macros=true")) + (add-to-list 'TeX-auto-symbol LaTeX-auto-acro-acronym))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-acro-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acro-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defvar LaTeX-acro-acronym-history nil + "History of acronyms in acro.") + +(defun LaTeX-arg-acro-acronym (optional &optional prompt definition) + "Prompt for an acronym completing with known acronyms. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen acronym to the +list of defined acronyms." + (let ((acronym (completing-read (TeX-argument-prompt optional prompt "Acronym") + (LaTeX-acro-acronym-list) nil nil nil + 'LaTeX-acro-acronym-history))) + (if (and definition (not (string-equal "" acronym))) + (LaTeX-add-acro-acronyms acronym)) + (TeX-argument-insert acronym optional optional))) + +(defun LaTeX-arg-define-acro-acronym (optional &optional prompt) + "Prompt for an acronym completing with known acronyms. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (LaTeX-arg-acro-acronym optional prompt t)) + +(defvar LaTeX-acro-declareacronym-keys + '(("short") ("long") ("short-plural") ("long-plural") ("long-plural-form") + ("short-indefinite") ("long-indefinite") ("long-pre") ("long-post") ("alt") + ("alt-indefinite") ("extra") ("sort") ("class") ("cite") ("short-format") + ("long-format") ("first-long-format") ("pdfstring") ("accsupp") + ("index-sort") ("index") ("index-cmd")) + "List of keys accepted by `\\DeclareAcronym' macro of `acro' package +in its second mandatory argument.") + +(defvar LaTeX-acro-printacronyms-keys + '(("include-classes") ("exclude-classes") ("name") ("header")) + "List of keys accepted by `\\printacronyms' macro of `acro' package +in its optional argument.") + +(defun LaTeX-arg-acro-key-val (optional prompt key-val-alist) + "Prompt for keys and values in KEY-VAL-ALIST. +<SPC> key binding in minibuffer is removed temporarily. Insert +the given value as a TeX macro argument. If OPTIONAL is non-nil, +insert it as an optional argument. Use PROMPT as the prompt +string. KEY-VAL-ALIST is an alist. The car of each element +should be a string representing a key and the optional cdr should +be a list with strings to be used as values for the key." + ;; Remove <SPC> key binding from map used in `multi-prompt-key-value' (called + ;; by `TeX-arg-key-val') with `require-match' set to `nil'. + (let ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) crm-local-completion-map))) + (TeX-arg-key-val optional key-val-alist prompt))) + +(TeX-add-style-hook + "acro" + (lambda () + (TeX-auto-add-regexp `(,LaTeX-acro-regexp 1 LaTeX-auto-acro-acronym)) + (TeX-add-symbols + ;; Creating New Acronyms + '("DeclareAcronym" LaTeX-arg-define-acro-acronym + (LaTeX-arg-acro-key-val "Definition of acronym (k=v)" + LaTeX-acro-declareacronym-keys)) + ;; Using the Acronyms + '("ac" LaTeX-arg-acro-acronym) + '("ac*" LaTeX-arg-acro-acronym) + '("Ac" LaTeX-arg-acro-acronym) + '("Ac*" LaTeX-arg-acro-acronym) + '("acs" LaTeX-arg-acro-acronym) + '("acs*" LaTeX-arg-acro-acronym) + '("acl" LaTeX-arg-acro-acronym) + '("acl*" LaTeX-arg-acro-acronym) + '("Acl" LaTeX-arg-acro-acronym) + '("Acl*" LaTeX-arg-acro-acronym) + '("aca" LaTeX-arg-acro-acronym) + '("aca*" LaTeX-arg-acro-acronym) + '("acf" LaTeX-arg-acro-acronym) + '("acf*" LaTeX-arg-acro-acronym) + '("Acf" LaTeX-arg-acro-acronym) + '("Acf*" LaTeX-arg-acro-acronym) + '("acp" LaTeX-arg-acro-acronym) + '("acp*" LaTeX-arg-acro-acronym) + '("Acp" LaTeX-arg-acro-acronym) + '("Acp*" LaTeX-arg-acro-acronym) + '("acsp" LaTeX-arg-acro-acronym) + '("acsp*" LaTeX-arg-acro-acronym) + '("aclp" LaTeX-arg-acro-acronym) + '("aclp*" LaTeX-arg-acro-acronym) + '("Aclp" LaTeX-arg-acro-acronym) + '("Aclp*" LaTeX-arg-acro-acronym) + '("acap" LaTeX-arg-acro-acronym) + '("acap*" LaTeX-arg-acro-acronym) + '("acfp" LaTeX-arg-acro-acronym) + '("acfp*" LaTeX-arg-acro-acronym) + '("Acfp" LaTeX-arg-acro-acronym) + '("Acfp*" LaTeX-arg-acro-acronym) + ;; Indefinite Forms + '("iac" LaTeX-arg-acro-acronym) + '("iac*" LaTeX-arg-acro-acronym) + '("Iac" LaTeX-arg-acro-acronym) + '("Iac*" LaTeX-arg-acro-acronym) + '("iacs" LaTeX-arg-acro-acronym) + '("iacs*" LaTeX-arg-acro-acronym) + '("Iacs" LaTeX-arg-acro-acronym) + '("Iacs*" LaTeX-arg-acro-acronym) + '("iaca" LaTeX-arg-acro-acronym) + '("iaca*" LaTeX-arg-acro-acronym) + '("Iaca" LaTeX-arg-acro-acronym) + '("Iaca*" LaTeX-arg-acro-acronym) + '("iacl" LaTeX-arg-acro-acronym) + '("iacl*" LaTeX-arg-acro-acronym) + '("Iacl" LaTeX-arg-acro-acronym) + '("Iacl*" LaTeX-arg-acro-acronym) + '("iacf" LaTeX-arg-acro-acronym) + '("iacf*" LaTeX-arg-acro-acronym) + '("Iacf" LaTeX-arg-acro-acronym) + '("Iacf*" LaTeX-arg-acro-acronym) + '("iacflike" LaTeX-arg-acro-acronym) + '("iacflike*" LaTeX-arg-acro-acronym) + '("Iacflike" LaTeX-arg-acro-acronym) + '("Iacflike*" LaTeX-arg-acro-acronym) + ;; Simulating the First Appearance + '("acflike" LaTeX-arg-acro-acronym) + '("acflike*" LaTeX-arg-acro-acronym) + '("acfplike" LaTeX-arg-acro-acronym) + '("acfplike*" LaTeX-arg-acro-acronym) + ;; Reset or Mark as Used + '("acreset" "List of acronyms") + '("acresetall" 0) + '("acuse" "List of acronyms") + '("acuseall" 0) + ;; PDF bookmarks + '("acpdfstring" LaTeX-arg-acro-acronym) + '("acpdfstringplural" LaTeX-arg-acro-acronym) + ;; Printing the List + '("printacronyms" [LaTeX-arg-acro-key-val nil LaTeX-acro-printacronyms-keys]) + ;; Customization + '("acsetup" (TeX-arg-key-val LaTeX-acro-package-options-list))) + (TeX-run-style-hooks + "l3sort" + "xspace" + "xtemplate" + "l3keys2e" + "xparse" + "expl3") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("DeclareAcronym" "{{") + ("ac" "*{") + ("Ac" "*{") + ("acs" "*{") + ("acl" "*{") + ("Acl" "*{") + ("aca" "*{") + ("acf" "*{") + ("Acf" "*{") + ("acp" "*{") + ("Acp" "*{") + ("acsp" "*{") + ("aclp" "*{") + ("Aclp" "*{") + ("acap" "*{") + ("acfp" "*{") + ("Acfp" "*{") + ("acflike" "*{") + ("acfplike" "*{") + ("iac" "*{") + ("Iac" "*{") + ("iacs" "*{") + ("Iacs" "*{") + ("iaca" "*{") + ("Iaca" "*{") + ("iacl" "*{") + ("Iacl" "*{") + ("iacf" "*{") + ("Iacf" "*{") + ("iacflike" "*{") + ("Iacflike" "*{") + ("acuse" "{")) + 'function))) + TeX-dialect) + +(defun LaTeX-acro-package-options () + "Prompt for package options for the acro package." + (TeX-read-key-val t LaTeX-acro-package-options-list)) + +;;; acro.el ends here diff --git a/elpa/auctex-13.1.3/style/acro.elc b/elpa/auctex-13.1.3/style/acro.elc Binary files differnew file mode 100644 index 0000000..3388038 --- /dev/null +++ b/elpa/auctex-13.1.3/style/acro.elc diff --git a/elpa/auctex-13.1.3/style/acronym.el b/elpa/auctex-13.1.3/style/acronym.el new file mode 100644 index 0000000..a99fa85 --- /dev/null +++ b/elpa/auctex-13.1.3/style/acronym.el @@ -0,0 +1,185 @@ +;;; acronym.el --- AUCTeX style for `acronym.sty' version 1.38. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2015, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `acronym.sty' version 1.38. + +;;; Code: + +(require 'tex) ;Indispensable when compiling the call to `TeX-auto-add-type'. +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-auto-add-type "acronym" "LaTeX") + +;; Self Parsing -- see (info "(auctex)Hacking the Parser"). +(defvar LaTeX-acronym-regexp + (concat "\\\\\\(?:acro\\|newacro\\|acrodef\\)" "{\\([^\n\r%\\{}]+\\)}") + "Matches acronyms by `acronym' package.") + +(defvar LaTeX-auto-acronym nil + "Temporary for parsing acronym by `acronym' package.") + +(defun LaTeX-acronym-prepare () + "Clear `LaTex-auto-acronym' before use." + (setq LaTeX-auto-acronym nil)) + +(defun LaTeX-acronym-cleanup () + "Move acronyms from `LaTeX-auto-acronym' to `LaTeX-acronym-list'." + (mapc (lambda (acronym) + (add-to-list 'LaTeX-acronym-list (list acronym))) + LaTeX-auto-acronym)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-acronym-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-acronym-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defvar LaTeX-acronym-acronym-history nil + "History of acronyms in acronym.") + +;; The former `acronym' stands for package name, the latter stands for the +;; argument of the macro calling this function. +(defun LaTeX-arg-acronym-acronym (optional &optional prompt definition) + "Prompt for an acronym completing with known acronyms. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If DEFINITION is non-nil, add the chosen acronym to the +list of defined acronyms." + (let ((acronym (completing-read (TeX-argument-prompt optional prompt "Acronym") + (LaTeX-acronym-list) nil nil nil + 'LaTeX-acronym-acronym-history))) + (if (and definition (not (string-equal "" acronym))) + (LaTeX-add-acronyms acronym)) + (TeX-argument-insert acronym optional optional))) + +(defun LaTeX-arg-define-acronym-acronym (optional &optional prompt) + "Prompt for an acronym completing with known acronyms. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (LaTeX-arg-acronym-acronym optional prompt t)) + +(TeX-add-style-hook + "acronym" + (lambda () + (TeX-auto-add-regexp `(,LaTeX-acronym-regexp 1 LaTeX-auto-acronym)) + (LaTeX-add-environments + '("acronym" LaTeX-env-args + [TeX-arg-string "Longest acronym"])) + (TeX-add-symbols + ;; Acronyms in the Text + '("ac" LaTeX-arg-acronym-acronym) + '("acresetall" 0) + '("acf" LaTeX-arg-acronym-acronym) + '("acs" LaTeX-arg-acronym-acronym) + '("acl" LaTeX-arg-acronym-acronym) + '("acp" LaTeX-arg-acronym-acronym) + '("acfp" LaTeX-arg-acronym-acronym) + '("acsp" LaTeX-arg-acronym-acronym) + '("aclp" LaTeX-arg-acronym-acronym) + '("acfi" LaTeX-arg-acronym-acronym) + '("acused" LaTeX-arg-acronym-acronym) + '("acsu" LaTeX-arg-acronym-acronym) + '("aclu" LaTeX-arg-acronym-acronym) + '("iac" LaTeX-arg-acronym-acronym) + '("Iac" LaTeX-arg-acronym-acronym) + '("ac*" LaTeX-arg-acronym-acronym) + '("acf*" LaTeX-arg-acronym-acronym) + '("acs*" LaTeX-arg-acronym-acronym) + '("acl*" LaTeX-arg-acronym-acronym) + '("acp*" LaTeX-arg-acronym-acronym) + '("acfp*" LaTeX-arg-acronym-acronym) + '("acsp*" LaTeX-arg-acronym-acronym) + '("aclp*" LaTeX-arg-acronym-acronym) + '("acfi*" LaTeX-arg-acronym-acronym) + '("acsu*" LaTeX-arg-acronym-acronym) + '("aclu*" LaTeX-arg-acronym-acronym) + '("iac*" LaTeX-arg-acronym-acronym) + '("Iac*" LaTeX-arg-acronym-acronym) + ;; Customization + '("acsfont" 1) + '("acffont" 1) + '("acfsfont" 1) + ;; Defining Acronyms + '("acro" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name") + '("acroextra" "Additional info") + '("newacro" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name") + '("acrodef" LaTeX-arg-define-acronym-acronym [ "Short name" ] "Full name") + ;; Non standard indefinite articles + '("acroindefinite" LaTeX-arg-acronym-acronym + "Short indefinite article" "Long indefinite article") + '("acrodefindefinite" LaTeX-arg-acronym-acronym + "Short indefinite article" "Long indefinite article") + '("newacroindefinite" LaTeX-arg-acronym-acronym + "Short indefinite article" "Long indefinite article") + ;; Non standard and foreign plural forms + '("acroplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural") + '("acrodefplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural") + '("newacroplural" LaTeX-arg-acronym-acronym [ "Short plural" ] "Long plural")) + (TeX-run-style-hooks + "relsize" + "xstring" + "suffix") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("ac" "*{") + ("acf" "*{") + ("acs" "*{") + ("acl" "*{") + ("acp" "*{") + ("acfp" "*{") + ("acsp" "*{") + ("aclp" "*{") + ("acfi" "*{") + ("acused" "{") + ("acsu" "*{") + ("aclu" "*{") + ("iac" "*{") + ("Iac" "*{") + ("acro" "{[{") + ("acroextra" "{") + ("newacro" "{[{") + ("acrodef" "{[{") + ("acroindefinite" "{{{") + ("acrodefindefinite" "{{{") + ("newacroindefinite" "{{{") + ("acroplural" "{[{") + ("acrodefplural" "{[{") + ("newacroplural" "{[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-acronym-package-options + '("footnote" "nohyperlinks" "printonlyused" "withpage" "smaller" "dua" "nolist") + "Package options for the acronym package.") + +;; acronym.el ends here diff --git a/elpa/auctex-13.1.3/style/acronym.elc b/elpa/auctex-13.1.3/style/acronym.elc Binary files differnew file mode 100644 index 0000000..bfe9971 --- /dev/null +++ b/elpa/auctex-13.1.3/style/acronym.elc diff --git a/elpa/auctex-13.1.3/style/afterpage.el b/elpa/auctex-13.1.3/style/afterpage.el new file mode 100644 index 0000000..1601885 --- /dev/null +++ b/elpa/auctex-13.1.3/style/afterpage.el @@ -0,0 +1,46 @@ +;;; afterpage.el --- AUCTeX style for `afterpage.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2013-01-01 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `afterpage.sty' + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "afterpage" + (lambda () + (TeX-add-symbols + '("afterpage" t))) + TeX-dialect) + +(defvar LaTeX-afterpage-package-options nil + "Package options for afterpage.") + +;; afterpage.el ends here diff --git a/elpa/auctex-13.1.3/style/afterpage.elc b/elpa/auctex-13.1.3/style/afterpage.elc Binary files differnew file mode 100644 index 0000000..13a9534 --- /dev/null +++ b/elpa/auctex-13.1.3/style/afterpage.elc diff --git a/elpa/auctex-13.1.3/style/algorithm.el b/elpa/auctex-13.1.3/style/algorithm.el new file mode 100644 index 0000000..8500f44 --- /dev/null +++ b/elpa/auctex-13.1.3/style/algorithm.el @@ -0,0 +1,80 @@ +;;; algorithm.el --- AUCTeX style for the (LaTeX) algorithm package -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Uwe Brauer <oub@mat.ucm.es> +;; Created: 2020-01-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: +;; This file adds support for the algorithm package. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-algorithm-package-options + '(;; Appearance options: + "plain" "ruled" "boxed" + ;; Numbering convention: + "part" "chapter" "section" "subsection" "subsubsection" "nothing") + "Package options for the algorithm package.") + +(defun LaTeX-env-algorithm (environment) + "Insert a algorithm-like ENVIRONMENT with caption and label." + (let* ((pos (completing-read (TeX-argument-prompt t nil "Position") + '(("H")))) + (caption (TeX-read-string "Caption: ")) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string "(Optional) Short caption: ")))) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)))) + ;; top caption -- do nothing if user skips caption + (unless (zerop (length caption)) + ;; insert `\caption[short-caption]{caption': + (insert TeX-esc "caption") + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption) + ;; Add } to close `\caption{' + (insert TeX-grcl) + ;; fill the caption + (when auto-fill-function (LaTeX-fill-paragraph)) + ;; Insert a new line and indent + (LaTeX-newline) + (indent-according-to-mode) + ;; Finally add a \label: + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))))) + +(TeX-add-style-hook + "algorithm" + (lambda () + (LaTeX-add-environments + '("algorithm" LaTeX-env-algorithm)) + (TeX-add-symbols + '("listofalgorithms" 0))) + TeX-dialect) + +;;; algorithm.el ends here diff --git a/elpa/auctex-13.1.3/style/algorithm.elc b/elpa/auctex-13.1.3/style/algorithm.elc Binary files differnew file mode 100644 index 0000000..0c562d0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/algorithm.elc diff --git a/elpa/auctex-13.1.3/style/algpseudocode.el b/elpa/auctex-13.1.3/style/algpseudocode.el new file mode 100644 index 0000000..1d8bdd7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/algpseudocode.el @@ -0,0 +1,143 @@ +;;; algpseudocode.el --- AUCTeX style for the (LaTeX) algpseudocode package -*- lexical-binding: t; -*- + +;; Copyright (C) 2020--2022 Free Software Foundation, Inc. + +;; Author: Uwe Brauer <oub@mat.ucm.es> +;; Created: 2020-01-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the algpseudocode package. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-algpseudocode-package-options + '("compatible" "nocompatible" "end" "noend") + "Package options for the algpseudocode package.") + +(TeX-add-style-hook + "algpseudocode" + (lambda () + (TeX-add-symbols + ;; 2.3 Simple lines + '("State" (TeX-arg-literal " ")) + '("Statex" 0) + + ;; 2.4 Placing comments in sources + '("Comment" 1) + + ;; 2.5 Labels and references + '("algref" (TeX-arg-ref "Algorithm") (TeX-arg-ref "Line")) + + ;; 2.6 Breaking up long algorithms + '("algstore" 1) + '("algstore*" 1) + '("algrestore" 1) + '("algrestore*" 1) + + ;; 3.1.1 The for block + '("For" 1) + '("ForAll" 1) + '("EndFor" 0) + + ;; 3.1.2 The while block + '("While" 1) + '("EndWhile" 0) + + ;; 3.1.3 The repeat block + '("Repeat" 0) + '("Until" 1) + + ;; 3.1.4 The if block + '("If" 1) + '("ElsIf" 1) + '("Else" 0) + '("EndIf" 0) + + ;; 3.1.5 The procedure block + '("Procedure" 2) + '("EndProcedure" 0) + + ;; 3.1.6 The function block + '("Function" 2) + '("EndFunction" 0) + + ;; 3.1.7 The loop block + '("Loop" 0) + '("EndLoop" 0) + + ;; 3.1.8 Other commands in this layout + '("Require" (TeX-arg-literal " ")) + '("Ensure" (TeX-arg-literal " ")) + '("Call" 2)) + + (LaTeX-add-environments + '("algorithmic" [ "Number" ])) + + ;; Indentation: Add the keywords above to the respective variables + ;; and run `LaTeX-indent-commands-regexp-make'. + (let ((beg '("For" "ForAll" + "While" + "Repeat" + "If" + "Procedure" + "Function" + "Loop")) + (mid '("ElsIf" "Else")) + (end '("EndFor" + "EndWhile" + "Until" + "EndIf" + "EndProcedure" + "EndFunction" + "EndLoop"))) + (dolist (elt beg) + (add-to-list 'LaTeX-indent-begin-list elt t)) + (dolist (elt mid) + (add-to-list 'LaTeX-indent-mid-list elt t)) + (dolist (elt end) + (add-to-list 'LaTeX-indent-end-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; Add the 'algorithmic' environment to a local version of + ;; `LaTeX-indent-environment-list'. This effectively kills filling + ;; but indenting works as expected. Hence, 'M-q' gives a better + ;; experience. + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("algorithmic") + t) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("algref" "{{")) + 'reference))) + TeX-dialect) + +;;; algpseudocode.el ends here diff --git a/elpa/auctex-13.1.3/style/algpseudocode.elc b/elpa/auctex-13.1.3/style/algpseudocode.elc Binary files differnew file mode 100644 index 0000000..b62fdbc --- /dev/null +++ b/elpa/auctex-13.1.3/style/algpseudocode.elc diff --git a/elpa/auctex-13.1.3/style/alltt.el b/elpa/auctex-13.1.3/style/alltt.el new file mode 100644 index 0000000..57d1ab2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/alltt.el @@ -0,0 +1,57 @@ +;;; alltt.el --- AUCTeX style for `alltt.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2014, 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-04-30 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `alltt.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(TeX-add-style-hook + "alltt" + (lambda () + (LaTeX-add-environments "alltt") + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("alltt" current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local "alltt") + ;; Fontification + (when (and (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-alltt-package-options nil + "Package options for the alltt package.") + +;;; alltt.el ends here diff --git a/elpa/auctex-13.1.3/style/alltt.elc b/elpa/auctex-13.1.3/style/alltt.elc Binary files differnew file mode 100644 index 0000000..65d84cb --- /dev/null +++ b/elpa/auctex-13.1.3/style/alltt.elc diff --git a/elpa/auctex-13.1.3/style/alphanum.el b/elpa/auctex-13.1.3/style/alphanum.el new file mode 100644 index 0000000..cc24c3b --- /dev/null +++ b/elpa/auctex-13.1.3/style/alphanum.el @@ -0,0 +1,105 @@ +;;; alphanum.el --- AUCTeX style for `alphanum.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Frank Küster <frank@kuesterei.ch> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This is file alphanum.el, which makes AUCTeX usable with jura.cls +;; and its style file alphanum.sty. +;; +;; Contributed by Frank Küster <frank@kuesterei.ch>. The code for +;; reftex has been written by Carsten Dominik, the maintainer of +;; reftex, but all the errors are mine. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function reftex-match-string "reftex" (n)) +(defvar reftex-section-regexp) + +(defun reftex-get-section-level-alphanum () + (save-excursion ; preserve position + (save-match-data ; preserve matching data (important!) + ;; Go back to the beginning of the sectioning command + (goto-char (match-beginning 0)) + ;; Define an initial level number, depending on the current macro. + (let* ((macro (reftex-match-string 3)) ; "toc" or "sub" + (lev (cond ((string= macro "toc") 1) ; min level for "toc" + ((string= macro "sub") 2) ; min level for "sub" + (t 0))) + ;; Make a regular expression which will match sectioning commands + ;; and the levelup macro. + (re (concat "\\(^[^%]*\\\\levelup\\>\\)" + "\\|" + "\\(" reftex-section-regexp "\\)"))) + ;; Now parse backwards for all sectioning and levelup macros, + ;; and keep track of the relative level changes. + (while (re-search-backward re nil t) + (cond + ((match-beginning 1) + ;; levelup matched, reduce level counter + (setq lev (1- lev))) + ((string= (reftex-match-string 4) "toc") + ;; a toc entry, nothing changes + ) + ((string= (reftex-match-string 4) "sub") + ;; a sub entry, increase level counter + (setq lev (1+ lev))))) + ;; return the level + lev)))) + +(TeX-add-style-hook + "alphanum" + (lambda () + (LaTeX-largest-level-set "chapter") + (TeX-add-symbols + '("levelup" (TeX-arg-literal " "))) + (make-local-variable 'LaTeX-section-list) + (LaTeX-section-list-add-locally + '(("part" 0) + ;; the levels don't make sense with alphanum, I randomly chose 0... + ("toc" 0) + ("sub" 0)) + t) + (setq LaTeX-section-label + '(("part" . "part:") + ("toc" . "sec:") + ("sub" . "sec:"))) + ;; + ;; ****************** reftex part ****************** + ;; this won't work in multifile documents, but at least there is + ;; something. + + (if (fboundp 'reftex-add-section-levels) + (reftex-add-section-levels + '(("toc" . reftex-get-section-level-alphanum) + ("sub" . reftex-get-section-level-alphanum))))) + TeX-dialect) + +;; Local Variables: +;; coding: utf-8 +;; End: diff --git a/elpa/auctex-13.1.3/style/alphanum.elc b/elpa/auctex-13.1.3/style/alphanum.elc Binary files differnew file mode 100644 index 0000000..50ba913 --- /dev/null +++ b/elpa/auctex-13.1.3/style/alphanum.elc diff --git a/elpa/auctex-13.1.3/style/amsart.el b/elpa/auctex-13.1.3/style/amsart.el new file mode 100644 index 0000000..7f93f1a --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsart.el @@ -0,0 +1,16 @@ +;;; amsart.el --- Style hook for the AMS-LaTeX article document class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amsart" + (function + (lambda () + (TeX-run-style-hooks "amsmath" "amsthm") + (LaTeX-add-environments "abstract"))) + TeX-dialect) + +;;; amsart.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsart.elc b/elpa/auctex-13.1.3/style/amsart.elc Binary files differnew file mode 100644 index 0000000..7b2e74a --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsart.elc diff --git a/elpa/auctex-13.1.3/style/amsbook.el b/elpa/auctex-13.1.3/style/amsbook.el new file mode 100644 index 0000000..c645767 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsbook.el @@ -0,0 +1,15 @@ +;;; amsbook.el --- Style hook for the AMS-LaTeX book document class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amsbook" + (lambda () + (TeX-run-style-hooks "amsmath" "amsthm") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; amsbook.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsbook.elc b/elpa/auctex-13.1.3/style/amsbook.elc Binary files differnew file mode 100644 index 0000000..a3c0ae1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsbook.elc diff --git a/elpa/auctex-13.1.3/style/amsbsy.el b/elpa/auctex-13.1.3/style/amsbsy.el new file mode 100644 index 0000000..dce3825 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsbsy.el @@ -0,0 +1,21 @@ +;;; amsbsy.el --- Style hook for the AMS-LaTeX amsbsy package. -*- lexical-binding: t; -*- +;;; +;;; AUTHOR: Carsten Dominik <dominik@strw.leidenuniv.nl> + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amsbsy" + (lambda () + (TeX-add-symbols + '("boldsymbol" "Symbol") + '("pmb" "Symbol"))) + TeX-dialect) + +(defvar LaTeX-amsbsy-package-options nil + "Package options for the amsbsy package.") + +;;; amsbsy.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsbsy.elc b/elpa/auctex-13.1.3/style/amsbsy.elc Binary files differnew file mode 100644 index 0000000..7375372 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsbsy.elc diff --git a/elpa/auctex-13.1.3/style/amsfonts.el b/elpa/auctex-13.1.3/style/amsfonts.el new file mode 100644 index 0000000..03556e7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsfonts.el @@ -0,0 +1,61 @@ +;;; amsfonts.el --- AUCTeX style for `amsfonts.sty' version 3.01 -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `amsfonts.sty' version 3.01. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "amsfonts" + (lambda () + (TeX-add-symbols + '("bold" 1)) + ;; New math font by `amsfonts'. + (setq TeX-font-list + (append + TeX-font-list + '((?\C-k "" "" "\\mathfrak{" "}")))) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("bold" "{")) + 'bold-command))) + TeX-dialect) + +;; The `psamsfonts' option is obsolete in AMSFonts v3 +(defvar LaTeX-amsfonts-package-options nil + "Package options for the amsfonts package.") + +;;; amsfonts.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsfonts.elc b/elpa/auctex-13.1.3/style/amsfonts.elc Binary files differnew file mode 100644 index 0000000..a3db471 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsfonts.elc diff --git a/elpa/auctex-13.1.3/style/amsmath.el b/elpa/auctex-13.1.3/style/amsmath.el new file mode 100644 index 0000000..5e7812e --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsmath.el @@ -0,0 +1,259 @@ +;;; amsmath.el --- Style hook for the AMS-LaTeX amsmath package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2005-2007, 2012-2014, 2017-2020, 2022 +;; Free Software Foundation, Inc. +;; FIXME: What about the copyright for <= 2001? + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This will also load the amstext, amsbsy and amsopn style files. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Fontification +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "amsmath" + (lambda () + (LaTeX-add-environments + '("align" LaTeX-env-label) + '("gather" LaTeX-env-label) + '("flalign" LaTeX-env-label) + '("multline" LaTeX-env-label) + '("alignat" LaTeX-amsmath-env-alignat) + '("alignat*" LaTeX-amsmath-env-alignat) + '("xalignat" LaTeX-amsmath-env-alignat) + '("xalignat*" LaTeX-amsmath-env-alignat) + '("xxalignat" LaTeX-amsmath-env-alignat) + '("aligned" ["Vertical position (t or b)"]) + '("gathered" ["Vertical position (t or b)"]) + '("alignedat" LaTeX-amsmath-env-alignedat) + "align*" "gather*" "flalign*" "multline*" "equation*" + "split" + "cases" + "matrix" "smallmatrix" "pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix" + "subequations" + '("subarray" "Alignment")) + + (TeX-add-symbols + '("eqref" TeX-arg-ref) + '("numberwithin" TeX-arg-counter "Section level") + '("raisetag" "Dimension") + '("shoveright" t) '("shoveleft" t) + '("intertext" t) + '("hdotsfor" ["Stretch"] "Number of columns to cover") + '("xleftarrow" ["Below"] "Above") + '("xrightarrow" ["Below"] "Above") + '("overset" "Above symbol" "Symbol") + '("underset" "Below symbol" "Symbol") + '("overunderset" "Above symbol" "Below symbol" "Symbol") + '("dfrac" 2) + '("tfrac" 2) + '("binom" 2) + '("dbinom" 2) + '("tbinom" 2) + '("genfrac" "Left delimiter" "Right delimiter" "Thickness" + "Mathstyle" 2) + '("cfrac" ["position (l or r)"] 2) + '("smash" ["where (t or b)"] t) + '("sideset" "Left" "Right") + '("tag" "(Tag)") + '("tag*" "Tag") + '("displaybreak" ["Weight (0..4)"]) + '("allowdisplaybreaks" ["Weight (1..4)"]) + '("substack" t) + '("leftroot" "Push root index left by") + '("uproot" "Push root index upward by") + '("boxed" t) + '("mspace" t) + '("mod" t) + '("pmod" t) + '("pod" t) + '("overleftrightarrow" t) + '("underleftarrow" t) + '("underrightarrow" t) + '("underleftrightarrow" t) + '("dddot" t) + '("ddddot" t) + "bmod" "notag" + "dots" "dotsb" "dotsc" "dotsi" "dotsm" "dotso" "nobreakdash" + '("lvert" TeX-arg-insert-right-brace-maybe) + '("lVert" TeX-arg-insert-right-brace-maybe) + "rvert" "rVert" + "iint" "iiint" "iiiint" "idotsint") + + (setq LaTeX-item-list + (append '(("split" . LaTeX-item-equation) + ("multline" . LaTeX-item-equation) + ("multline*" . LaTeX-item-equation) + ("gather" . LaTeX-item-equation) + ("gather*" . LaTeX-item-equation) + ("gathered" . LaTeX-item-equation) + ("align" . LaTeX-item-equation) + ("align*" . LaTeX-item-equation) + ("aligned" . LaTeX-item-equation) + ("alignat" . LaTeX-item-equation-alignat) + ("alignat*" . LaTeX-item-equation-alignat) + ("xalignat" . LaTeX-item-equation-alignat) + ("xalignat*" . LaTeX-item-equation-alignat) + ("xxalignat" . LaTeX-item-equation-alignat) + ("alignedat" . LaTeX-item-equation-alignat) + ("flalign" . LaTeX-item-equation) + ("flalign*" . LaTeX-item-equation) + ("matrix" . LaTeX-item-equation) + ("pmatrix" . LaTeX-item-equation) + ("bmatrix" . LaTeX-item-equation) + ("Bmatrix" . LaTeX-item-equation) + ("vmatrix" . LaTeX-item-equation) + ("Vmatrix" . LaTeX-item-equation) + ("smallmatrix" . LaTeX-item-equation) + ("subarray" . LaTeX-item-equation) + ("cases" . LaTeX-item-equation)) + LaTeX-item-list)) + + ;; When `LaTeX-amsmath-label' is nil, use value of LaTeX-equation-label: + (unless LaTeX-amsmath-label + (setq LaTeX-amsmath-label LaTeX-equation-label)) + + (setq LaTeX-label-alist + ;; Append amsmath environments to `LaTeX-label-alist', in order not to + ;; override possible custome values. + (append LaTeX-label-alist + '(("align" . LaTeX-amsmath-label) + ("alignat" . LaTeX-amsmath-label) + ("xalignat" . LaTeX-amsmath-label) + ("multline" . LaTeX-amsmath-label) + ("flalign" . LaTeX-amsmath-label) + ("gather" . LaTeX-amsmath-label)))) + + (set (make-local-variable 'TeX-braces-association) + (append '(("\\lvert" . "\\rvert") + ("\\lVert" . "\\rVert")) + TeX-braces-association)) + (set (make-local-variable 'TeX-left-right-braces) + (append '(("\\lvert") ("\\rvert") ("\\lVert") ("\\rVert")) + TeX-left-right-braces)) + + ;; amsmath includes amstext, amsbsy, & amsopn. + ;; So we run their hooks, too. + (TeX-run-style-hooks "amstext" "amsbsy" "amsopn") + + ;; RefTeX support: Tell RefTeX about amsmath environments. + (when (fboundp 'reftex-add-to-label-alist) + (reftex-add-to-label-alist '(AMSTeX))) + + ;; Add \eqref to `reftex-ref-style-alist' and associate it to `e' + (when (and (boundp 'reftex-ref-style-alist) + ;; check if Emacs is already equipped with this + (not (assoc "AMSmath" reftex-ref-style-alist))) + ;; Append it to a local version in order to avoid a clash with + ;; user settings + (add-to-list (make-local-variable 'reftex-ref-style-alist) + '("AMSmath" "amsmath" (("\\eqref" ?e))) + t)) + + ;; Activate `AMSmath' when `LaTeX-reftex-ref-style-auto-activate' + ;; is non-nil + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "AMSmath")) + + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("boxed" "{")) + 'math-command))) + TeX-dialect) + +(defun LaTeX-amsmath-env-alignat (env) + "Insert ENV with column number specifications. +Insert suitable number of ampersands also if possible." + (let ((ncols (TeX-read-string "Number of columns: "))) + (LaTeX-insert-environment env (concat TeX-grop ncols TeX-grcl)) + (LaTeX-item-equation-alignat t))) + +(defun LaTeX-amsmath-env-alignedat (env) + "Insert ENV with position and column number specifications. +Insert suitable number of ampersands also if possible." + (let ((where (TeX-read-string "(Optional) Vertical position (t or b): ")) + (ncols (TeX-read-string "Number of columns: "))) + (unless (string= where "") + (setq where (concat LaTeX-optop where LaTeX-optcl))) + (LaTeX-insert-environment env (concat where TeX-grop ncols TeX-grcl)) + (LaTeX-item-equation-alignat t))) + +(defun LaTeX-item-equation (&optional suppress) + "Insert contents to terminate a line in multi-line equations environment. +Put line break macro on the last line. If the current environment +wants \\label, insert it also. + +If SUPPRESS is non-nil, do not insert line break macro." + (unless suppress + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\") + (forward-line 1) + (indent-according-to-mode)) + (let ((env (LaTeX-current-environment))) + (when (and (assoc env LaTeX-label-alist) + (LaTeX-label env 'environment)) + (LaTeX-newline) + (indent-according-to-mode)))) + +(defun LaTeX-item-equation-alignat (&optional suppress) + "Insert contents to terminate a line in multi-line equations environment. +Put line break macro on the last line. Next, if the current +environment wants \\label, insert it also. And insert suitable number +of ampersands if possible. + +If SUPPRESS is non-nil, do not insert line break macro." + (LaTeX-item-equation suppress) + (LaTeX-insert-ampersands + (concat "\\(?:" + (regexp-quote LaTeX-optop) "[tb]" (regexp-quote LaTeX-optcl) + "\\)?") + #'LaTeX-amsmath-alignat-number-of-ampersands)) + +(defun LaTeX-amsmath-alignat-number-of-ampersands (start end) + "Return the number of ampersands to insert. +The number is 2N-1 where N is the number taken from the text between +START and END." + (let ((num (string-to-number (buffer-substring-no-properties start end)))) + (if (integerp num) (+ num num -1)))) + +(defvar LaTeX-amsmath-package-options '("intlimits" "nointlimits" + "sumlimits" "nosumlimits" + "namelimits" "nonamelimits" + "leqno" "reqno" "centertags" + "tbtags" "cmex10" "fleqn" "?" + "alignedleftspaceyes" + "alignedleftspaceno" + "alignedleftspaceyesifneg") + "Package options for the amsmath package.") + +;;; amsmath.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsmath.elc b/elpa/auctex-13.1.3/style/amsmath.elc Binary files differnew file mode 100644 index 0000000..5179dd0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsmath.elc diff --git a/elpa/auctex-13.1.3/style/amsopn.el b/elpa/auctex-13.1.3/style/amsopn.el new file mode 100644 index 0000000..10572bd --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsopn.el @@ -0,0 +1,56 @@ +;;; amsopn.el --- AUCTeX style for the `amsnopn.sty' AMS-LaTeX package -*- lexical-binding: t; -*- + +;; Copyright (C) 1997, 2002, 2005, 2013, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `amsnopn.sty' + +(require 'tex) +(require 'latex) + +;;; Code: + +(TeX-add-style-hook + "amsopn" + (lambda () + (TeX-add-symbols + '("DeclareMathOperator" (TeX-arg-define-macro "Math Operator: \\") + "Expansion text for the math operator") + '("DeclareMathOperator*" (TeX-arg-define-macro "Math Operator: \\") + "Expansion text for the math operator") + '("operatorname" t) + '("operatorname*" t)) + + (add-to-list 'LaTeX-auto-regexp-list + '("\\\\DeclareMathOperator\\*?{?\\\\\\([A-Za-z0-9]+\\)}?" + 1 TeX-auto-symbol))) + TeX-dialect + ) + +(defvar LaTeX-amsopn-package-options '("namelimits" "nonamelimits") + "Package options for the amsopn package.") + +;;; amsopn.el ends here. diff --git a/elpa/auctex-13.1.3/style/amsopn.elc b/elpa/auctex-13.1.3/style/amsopn.elc Binary files differnew file mode 100644 index 0000000..51efbfc --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsopn.elc diff --git a/elpa/auctex-13.1.3/style/amssymb.el b/elpa/auctex-13.1.3/style/amssymb.el new file mode 100644 index 0000000..5fdb82c --- /dev/null +++ b/elpa/auctex-13.1.3/style/amssymb.el @@ -0,0 +1,253 @@ +;;; amssymb.el --- AUCTeX style for `amssymb.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `amssymb.sty'. + +;; The commands were just taken out of the \DeclareMathSymbol from +;; amssymb.sty in the order specified there, i.e., \mathord, \mathbin, +;; \mathrel + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amssymb" + (lambda () + (TeX-run-style-hooks "amsfonts") + (TeX-add-symbols + "boxdot" + "boxplus" + "boxtimes" + "square" + "blacksquare" + "centerdot" + "lozenge" + "blacklozenge" + "circlearrowright" + "circlearrowleft" + "leftrightharpoons" + "boxminus" + "Vdash" + "Vvdash" + "vDash" + "twoheadrightarrow" + "twoheadleftarrow" + "leftleftarrows" + "rightrightarrows" + "upuparrows" + "downdownarrows" + "upharpoonright" + "downharpoonright" + "upharpoonleft" + "downharpoonleft" + "rightarrowtail" + "leftarrowtail" + "leftrightarrows" + "rightleftarrows" + "Lsh" + "Rsh" + "rightsquigarrow" + "leftrightsquigarrow" + "looparrowleft" + "looparrowright" + "circeq" + "succsim" + "gtrsim" + "gtrapprox" + "multimap" + "therefore" + "because" + "doteqdot" + "triangleq" + "precsim" + "lesssim" + "lessapprox" + "eqslantless" + "eqslantgtr" + "curlyeqprec" + "curlyeqsucc" + "preccurlyeq" + "leqq" + "leqslant" + "lessgtr" + "backprime" + "risingdotseq" + "fallingdotseq" + "succcurlyeq" + "geqq" + "geqslant" + "gtrless" + "vartriangleright" + "vartriangleleft" + "trianglerighteq" + "trianglelefteq" + "bigstar" + "between" + "blacktriangledown" + "blacktriangleright" + "blacktriangleleft" + "vartriangle" + "blacktriangle" + "triangledown" + "eqcirc" + "lesseqgtr" + "gtreqless" + "lesseqqgtr" + "gtreqqless" + "Rrightarrow" + "Lleftarrow" + "veebar" + "barwedge" + "doublebarwedge" + "measuredangle" + "sphericalangle" + "varpropto" + "smallsmile" + "smallfrown" + "Subset" + "Supset" + "Cup" + "Cap" + "curlywedge" + "curlyvee" + "leftthreetimes" + "rightthreetimes" + "subseteqq" + "supseteqq" + "bumpeq" + "Bumpeq" + "lll" + "ggg" + "circledS" + "pitchfork" + "dotplus" + "backsim" + "backsimeq" + "complement" + "intercal" + "circledcirc" + "circledast" + "circleddash" + "lvertneqq" + "gvertneqq" + "nleq" + "ngeq" + "nless" + "ngtr" + "nprec" + "nsucc" + "lneqq" + "gneqq" + "nleqslant" + "ngeqslant" + "lneq" + "gneq" + "npreceq" + "nsucceq" + "precnsim" + "succnsim" + "lnsim" + "gnsim" + "nleqq" + "ngeqq" + "precneqq" + "succneqq" + "precnapprox" + "succnapprox" + "lnapprox" + "gnapprox" + "nsim" + "ncong" + "diagup" + "diagdown" + "varsubsetneq" + "varsupsetneq" + "nsubseteqq" + "nsupseteqq" + "subsetneqq" + "supsetneqq" + "varsubsetneqq" + "varsupsetneqq" + "subsetneq" + "supsetneq" + "nsubseteq" + "nsupseteq" + "nparallel" + "nmid" + "nshortmid" + "nshortparallel" + "nvdash" + "nVdash" + "nvDash" + "nVDash" + "ntrianglerighteq" + "ntrianglelefteq" + "ntriangleleft" + "ntriangleright" + "nleftarrow" + "nrightarrow" + "nLeftarrow" + "nRightarrow" + "nLeftrightarrow" + "nleftrightarrow" + "divideontimes" + "varnothing" + "nexists" + "Finv" + "Game" + "eth" + "eqsim" + "beth" + "gimel" + "daleth" + "lessdot" + "gtrdot" + "ltimes" + "rtimes" + "shortmid" + "shortparallel" + "smallsetminus" + "thicksim" + "thickapprox" + "approxeq" + "succapprox" + "precapprox" + "curvearrowleft" + "curvearrowright" + "digamma" + "varkappa" + "Bbbk" + "hslash" + "backepsilon")) + TeX-dialect) + +(defvar LaTeX-amssymb-package-options '("psamsfonts") + "Package options for the amssymb package.") + +;;; amssymb.el ends here. diff --git a/elpa/auctex-13.1.3/style/amssymb.elc b/elpa/auctex-13.1.3/style/amssymb.elc Binary files differnew file mode 100644 index 0000000..255a692 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amssymb.elc diff --git a/elpa/auctex-13.1.3/style/amstex.el b/elpa/auctex-13.1.3/style/amstex.el new file mode 100644 index 0000000..7588935 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amstex.el @@ -0,0 +1,63 @@ +;;; amstex.el --- AMS-LaTeX support. -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file is only needed when using AMS-LaTeX 1.1 and LaTeX 2.09. +;; In later versions of LaTeX and AMS-LaTeX this file is never used, +;; because there is no longer a class or package name amstex. +;; +;; As far as AUCTeX is concerned, the old amstex style is fairly +;; similar to the new amsmath package. So we will just run that hook +;; here. +;; +;; amsmath.el should not be loaded, if an AMS-TeX (in contrast to +;; AMS-LaTeX) file is opened. The commands defined in amsmath.el +;; mostly have no meaning in this case and errors about unknown +;; variables or functions may occur due to latex.el possibly not being +;; loaded. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amstex" + (lambda () + (unless (memq major-mode '(plain-tex-mode ams-tex-mode)) + (TeX-run-style-hooks "amsmath"))) + TeX-dialect) + +(defvar LaTeX-amstex-package-options '("noamsfonts" "psamsfonts" + "intlimits" "nointlimits" + "sumlimits" "nosumlimits" + "namelimits" "nonamelimits" + "leqno" "reqno" "centertags" + "tbtags" "fleqn" "righttag" + "ctagsplt" "intlim" "nosumlim" + "nonamelm") + "Package options for the amstex package.") + +;;; amstex.el ends here. diff --git a/elpa/auctex-13.1.3/style/amstex.elc b/elpa/auctex-13.1.3/style/amstex.elc Binary files differnew file mode 100644 index 0000000..9470a94 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amstex.elc diff --git a/elpa/auctex-13.1.3/style/amstext.el b/elpa/auctex-13.1.3/style/amstext.el new file mode 100644 index 0000000..96f1dd1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amstext.el @@ -0,0 +1,20 @@ +;;; amstext.el --- Style hook for the AMS-LaTeX amstext package. -*- lexical-binding: t; -*- +;;; +;;; AUTHOR: Carsten Dominik <dominik@strw.leidenuniv.nl> + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "amstext" + (lambda () + (TeX-add-symbols + '("text" t))) + TeX-dialect) + +(defvar LaTeX-amstext-package-options nil + "Package options for the amstext package.") + +;;; amstext.el ends here. diff --git a/elpa/auctex-13.1.3/style/amstext.elc b/elpa/auctex-13.1.3/style/amstext.elc Binary files differnew file mode 100644 index 0000000..c829e67 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amstext.elc diff --git a/elpa/auctex-13.1.3/style/amsthm.el b/elpa/auctex-13.1.3/style/amsthm.el new file mode 100644 index 0000000..3ea8176 --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsthm.el @@ -0,0 +1,201 @@ +;;; amsthm.el --- Style hook for the AMS-LaTeX amsthm package. -*- lexical-binding: t; -*- + +;; Copyright (C) 1997, 2013--2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; The style provides the function `LaTeX-amsthm-env-label' which +;; enables new defined environments with "\newtheoreom" to interact +;; with AUCTeX and RefTeX mechanisms for inserting labels. Check +;; docstring of `LaTeX-amsthm-env-label' for instructions. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-amsthm-package-options nil + "Package options for the amsthm package.") + +(defvar LaTeX-amsthm-fontdecl + '(;; family + "rmfamily" "sffamily" "ttfamily" + ;; series + "mdseries" "bfseries" + ;; shape + "upshape" "itshape" "slshape" "scshape" + ;; size + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" + ;; reset macro + "normalfont") + "List of font declaration commands for \"\\newtheoremstyle\".") + +(defun LaTeX-arg-amsthm-fontdecl (optional &optional prompt) + "Prompt for font declaration commands in \"\\newtheoremstyle\". +If OPTIONAL is non-nil, insert the resulting value as an optional +argument. Use PROMPT as the prompt string." + (let* ((crm-separator (regexp-quote TeX-esc)) + (fontdecl (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Font: \\" t) + LaTeX-amsthm-fontdecl) + TeX-esc))) + (TeX-argument-insert fontdecl + optional + (when (and fontdecl (not (string= fontdecl ""))) + TeX-esc)))) + +(defun LaTeX-amsthm-env-label (environment) + "Insert ENVIRONMENT, query for an optional argument and prompt +for label. AUCTeX users should add ENVIRONMENT to +`LaTeX-label-alist' via customize or in init-file with: + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + +RefTeX users should customize or add ENVIRONMENT to +`LaTeX-label-alist' and `reftex-label-alist', for example + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + (add-to-list \\='reftex-label-alist + \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\" + nil (\"Lemma\" \"lemma\") nil))" + (let ((opthead (TeX-read-string + (TeX-argument-prompt t nil "Heading")))) + (LaTeX-insert-environment environment + (when (and opthead + (not (string= opthead ""))) + (format "[%s]" opthead)))) + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))) + +;; Setup parsing for \newtheorem +(TeX-auto-add-type "amsthm-newtheorem" "LaTeX") + +;; Setup parsing for \newtheoremstyle +(TeX-auto-add-type "amsthm-newtheoremstyle" "LaTeX") + +(defun LaTeX-amsthm-auto-prepare () + "Clear `LaTeX-auto-amsthm-newtheorem' and +`LaTeX-auto-amsthm-newtheoremstyle' before parsing." + (setq LaTeX-auto-amsthm-newtheorem nil) + (setq LaTeX-auto-amsthm-newtheoremstyle nil)) + +(defun LaTeX-amsthm-auto-cleanup () + "Move parsed results from `LaTeX-auto-amsthm-newtheorem' and +make them available as new environments." + (dolist (newthm (mapcar #'car (LaTeX-amsthm-newtheorem-list))) + (LaTeX-add-environments (list newthm #'LaTeX-amsthm-env-label)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-amsthm-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "amsthm" + (lambda () + ;; Add the pre-defined styles: + (LaTeX-add-amsthm-newtheoremstyles "definition" + "plain" + "remark") + + (LaTeX-add-environments + '("proof" LaTeX-amsthm-env-label)) + + (TeX-add-symbols + ;; Overrule the defintion in `latex.el': + '("newtheorem" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-amsthm-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label)) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + '("newtheorem*" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment"))) + (heading (TeX-read-string + (TeX-argument-prompt nil nil "Heading")))) + (LaTeX-add-amsthm-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-amsthm-env-label)) + (insert (concat TeX-grop nthm TeX-grcl)) + (format "%s" heading))))) + + '("theoremstyle" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Style") + (LaTeX-amsthm-newtheoremstyle-list))) + "qedhere" + "swapnumbers" + + '("newtheoremstyle" + (TeX-arg-eval + (lambda () + (let ((nthmstyle (TeX-read-string + (TeX-argument-prompt nil nil "Style name")))) + (LaTeX-add-amsthm-newtheoremstyles nthmstyle) + (format "%s" nthmstyle)))) + (TeX-arg-length "Space above") + (TeX-arg-length "Space below") + (LaTeX-arg-amsthm-fontdecl "Body font: \\") + "Indent amount" + (LaTeX-arg-amsthm-fontdecl "Theorem head font: \\") + "Punctuation after head" + (TeX-arg-length "Space after head") + "Theorem head spec")) + + (TeX-auto-add-regexp + `(,(concat "\\\\newtheorem\\*?{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-amsthm-newtheorem)) + (TeX-auto-add-regexp + `(,(concat "\\\\newtheoremstyle{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-amsthm-newtheoremstyle)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newtheorem" "*{[{[") + ("theoremstyle" "{") + ("newtheoremstyle" "{{{{{{{{{")) + 'function))) + TeX-dialect) + +;;; amsthm.el ends here diff --git a/elpa/auctex-13.1.3/style/amsthm.elc b/elpa/auctex-13.1.3/style/amsthm.elc Binary files differnew file mode 100644 index 0000000..be4b50f --- /dev/null +++ b/elpa/auctex-13.1.3/style/amsthm.elc diff --git a/elpa/auctex-13.1.3/style/appendix.el b/elpa/auctex-13.1.3/style/appendix.el new file mode 100644 index 0000000..406aef5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/appendix.el @@ -0,0 +1,79 @@ +;;; appendix.el --- AUCTeX style for `appendix.sty' (v1.2c) -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2020-10-10 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `appendix.sty' version 1.2c from +;; 2020/02/08. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "appendix" + (lambda () + + (TeX-add-symbols + "appendixpage" + "addappheadtotoc" + "noappendicestocpagenum" + "appendicestocpagenum" + "appendixname" + "appendixtocname" + "appendixpagename" + + "appendixtocon" + "appendixtocoff" + "appendixpageon" + "appendixpageoff" + "appendixtitleon" + "appendixtitleoff" + "appendixtitletocon" + "appendixtitletocoff" + "appendixheaderon" + "appendixheaderoff" + "restoreapp" + + "setthesection" + "setthesubsection") + + (LaTeX-add-environments + '("appendices") + '("subappendices")) + + ;; Don't indent the content inside \(sub\)?appendices environments: + (unless (string-match "appendices" LaTeX-document-regexp) + (set (make-local-variable 'LaTeX-document-regexp) + (concat LaTeX-document-regexp "\\|\\(?:sub\\)?appendices")))) + TeX-dialect) + +(defvar LaTeX-appendix-package-options '("toc" "page" "title" + "titletoc" "header") + "Package options for the appendix package.") + +;;; appendix.el ends here diff --git a/elpa/auctex-13.1.3/style/appendix.elc b/elpa/auctex-13.1.3/style/appendix.elc Binary files differnew file mode 100644 index 0000000..85e2597 --- /dev/null +++ b/elpa/auctex-13.1.3/style/appendix.elc diff --git a/elpa/auctex-13.1.3/style/arabxetex.el b/elpa/auctex-13.1.3/style/arabxetex.el new file mode 100644 index 0000000..897b9cd --- /dev/null +++ b/elpa/auctex-13.1.3/style/arabxetex.el @@ -0,0 +1,121 @@ +;;; arabxetex.el --- AUCTeX style for `arabxetex.sty' (v1.2.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-08-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `arabxetex.sty' (v1.2.1) from 2015/09/04. +;; `arabxetex.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "arabxetex" + (lambda () + + ;; Run the style hooks for packages required by arabxetex: + (TeX-run-style-hooks "amsmath" "fontspec" "bidi") + + ;; We need xelatex, so check for the engine here: + (TeX-check-engine-add-engines 'xetex) + + ;; New macros & environments: + (let ((langs '("arab" + "farsi" "persian" + "urdu" + "sindhi" + "pashto" + "ottoman" "turk" + "kurdisch" + "kashmiri" + "malay" "jawi" + "uighur"))) + ;; Add \text<language>[option]{...} + (mapc #'TeX-add-symbols + (mapcar + (lambda (symbol) + (list symbol + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + LaTeX-arabxetex-package-options ] + t)) + (mapcar (lambda (lang) (concat "text" lang)) langs))) + ;; + ;; Add \begin{<language>}[option] ... \end{<language>} + (mapc #'LaTeX-add-environments + (mapcar + (lambda (environment) + (list environment + #'LaTeX-env-args + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + LaTeX-arabxetex-package-options ])) + langs)) + ;; + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords (mapcar (lambda (lang) + (list (concat "text" lang) "[{")) + langs) + 'textual))) + + ;; Other macros: + (TeX-add-symbols + '("textLR" t) + '("aemph" t) + + ;; 3.3 Transliteration + '("SetTranslitConvention" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Mapping") + '("dmg" "loc"))) + '("SetTranslitStyle" "Style")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textLR" "{")) + 'textual) + (font-latex-add-keywords '(("aemph" "{")) + 'italic-command) + (font-latex-add-keywords '(("SetTranslitConvention" "{") + ("SetTranslitStyle" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-arabxetex-package-options + '("novoc" "voc" "fullvoc" "trans" "utf") + "Package options for the arabxetex package.") + +;;; arabxetex.el ends here diff --git a/elpa/auctex-13.1.3/style/arabxetex.elc b/elpa/auctex-13.1.3/style/arabxetex.elc Binary files differnew file mode 100644 index 0000000..28a4429 --- /dev/null +++ b/elpa/auctex-13.1.3/style/arabxetex.elc diff --git a/elpa/auctex-13.1.3/style/array.el b/elpa/auctex-13.1.3/style/array.el new file mode 100644 index 0000000..be7baf3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/array.el @@ -0,0 +1,111 @@ +;;; array.el --- AUCTeX style for `array.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `array.sty' + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-auto-add-type "array-newcolumntype" "LaTeX") + +(defvar LaTeX-array-newcolumntype-regexp + '("\\\\newcolumntype{\\([^}]+\\)}" + 1 LaTeX-auto-array-newcolumntype) + "Matches the argument of `\\newcolumntype' from `array' +package.") + +(defun LaTeX-array-auto-prepare () + "Clear `LaTeX-auto-array-newcolumntype' before parsing." + (setq LaTeX-auto-array-newcolumntype nil)) + +(defun LaTeX-array-auto-cleanup () + "Move parsed column specification from +`LaTeX-auto-array-newcolumntype' to `LaTeX-array-column-letters'." + (when (LaTeX-array-newcolumntype-list) + (LaTeX-array-update-column-letters))) + +(defun LaTeX-array-update-column-letters () + "Update and uniquify the value of `LaTeX-array-column-letters' +and make it buffer local. " + (set (make-local-variable 'LaTeX-array-column-letters) + (mapconcat #'identity + (TeX-delete-duplicate-strings + (split-string + (concat LaTeX-array-column-letters + (mapconcat #'car (LaTeX-array-newcolumntype-list) "")) + "" t)) + ""))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-array-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-array-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "array" + (lambda () + + (TeX-auto-add-regexp LaTeX-array-newcolumntype-regexp) + + (TeX-add-symbols + '("newcolumntype" + (TeX-arg-eval + (lambda () + (let ((col (TeX-read-string "Column type: "))) + (LaTeX-add-array-newcolumntypes col) + (LaTeX-array-update-column-letters) + (format "%s" col)))) + [ "Number of arguments" ] t) + '("showcols" 0) + '("firsthline" 0) + '("lasthline" 0)) + + ;; `array.sty' adds a couple of new lengths. They're added here, rather than + ;; in the `TeX-add-symbols' block. + (LaTeX-add-lengths "extratabsurround" "extrarowheight") + + ;; `array.sty' adds some new column specification letters. + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "m" "b" "w" "W")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newcolumntype" "{[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-array-package-options nil + "Package options for array.") + +;; array.el ends here diff --git a/elpa/auctex-13.1.3/style/array.elc b/elpa/auctex-13.1.3/style/array.elc Binary files differnew file mode 100644 index 0000000..1bb2031 --- /dev/null +++ b/elpa/auctex-13.1.3/style/array.elc diff --git a/elpa/auctex-13.1.3/style/article.el b/elpa/auctex-13.1.3/style/article.el new file mode 100644 index 0000000..1278ddb --- /dev/null +++ b/elpa/auctex-13.1.3/style/article.el @@ -0,0 +1,24 @@ +;;; article.el - Special code for article style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-article-class-options + '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final" + "titlepage" "notitlepage" "onecolumn" "twocolumn" "leqno" "fleqn" "openbib") + "Package options for the article class.") + +(TeX-add-style-hook + "article" + (lambda () + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "part" "section" "subsection" "subsubsection" "paragraph" + "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; article.el ends here diff --git a/elpa/auctex-13.1.3/style/article.elc b/elpa/auctex-13.1.3/style/article.elc Binary files differnew file mode 100644 index 0000000..1f4b621 --- /dev/null +++ b/elpa/auctex-13.1.3/style/article.elc diff --git a/elpa/auctex-13.1.3/style/attachfile.el b/elpa/auctex-13.1.3/style/attachfile.el new file mode 100644 index 0000000..c090b5a --- /dev/null +++ b/elpa/auctex-13.1.3/style/attachfile.el @@ -0,0 +1,127 @@ +;;; attachfile.el --- AUCTeX style for `attachfile.sty' (v1.6) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-04-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `attachfile.sty' (v1.6) from 2015/04/04. +;; `attachfile.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-attachfile-key-val-options + '(("appearance" ("true" "false")) + ("author") + ("color") + ("created") + ("date") + ("description") + ("icon" ("Graph" "Paperclip" "PushPin" "Tag")) + ;; This can only be a small excerpt: + ("mimetype" + ("application/javascript" + "application/pdf" + "application/postscript" + "application/vnd.ms-excel" + "application/vnd.ms-powerpoint" + "application/zip" + "audio/mpeg" + "audio/ogg" + "image/jpeg" + "image/png" + "image/tiff" + "text/csv" + "text/plain" + "video/H264" + "video/mp4")) + ("modified") + ("print" ("true" "false")) + ("size") + ("subject") + ("timezone") + ("zoom" ("true" "false"))) + "Key=value options for attachfile macros.") + +(TeX-add-style-hook + "attachfile" + (lambda () + ;; Run style hook for packages loaded by attachfile; both packages + ;; are required for running LaTeX, but not necessary within AUCTeX + (TeX-run-style-hooks "hyperref" "color") + + (TeX-add-symbols + ;; \attachfile[<options>]{<filename>} + '("attachfile" + [TeX-arg-key-val LaTeX-attachfile-key-val-options] + (TeX-arg-eval + (lambda () + (let ((atfi (file-relative-name + (read-file-name "File to attach: ")))) + (format "%s" atfi))))) + + ;; \noattachfile[<options>] + '("noattachfile" + [TeX-arg-key-val LaTeX-attachfile-key-val-options] ) + + ;; \textattachfile[<options>]{<filename>}{<text>} + '("textattachfile" + [TeX-arg-key-val LaTeX-attachfile-key-val-options] + (TeX-arg-eval + (lambda () + (let ((atfi (file-relative-name + (read-file-name "File to attach: ")))) + (format "%s" atfi)))) + t) + + ;; \notextattachfile[<options>]{<text>} + '("notextattachfile" + [TeX-arg-key-val LaTeX-attachfile-key-val-options] t) + + ;; \attachfilesetup{<options>} + '("attachfilesetup" + (TeX-arg-key-val LaTeX-attachfile-key-val-options))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("attachfilesetup" "{") + ("attachfile" "[{") + ("noattachfile" "[") + ("textattachfile" "[{{") + ("notextattachfile" "[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-attachfile-package-options nil + "Prompt for package options for the attachfile package.") + +;;; attachfile.el ends here diff --git a/elpa/auctex-13.1.3/style/attachfile.elc b/elpa/auctex-13.1.3/style/attachfile.elc Binary files differnew file mode 100644 index 0000000..5a334d9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/attachfile.elc diff --git a/elpa/auctex-13.1.3/style/australian.el b/elpa/auctex-13.1.3/style/australian.el new file mode 100644 index 0000000..7d9d830 --- /dev/null +++ b/elpa/auctex-13.1.3/style/australian.el @@ -0,0 +1,42 @@ +;;; australian.el --- AUCTeX style for the `australian' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-07-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Australian text in connection with the +;; `australian' babel option. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "australian" + (lambda () + (TeX-run-style-hooks "english")) + TeX-dialect) + +;;; australian.el ends here diff --git a/elpa/auctex-13.1.3/style/australian.elc b/elpa/auctex-13.1.3/style/australian.elc Binary files differnew file mode 100644 index 0000000..9065a15 --- /dev/null +++ b/elpa/auctex-13.1.3/style/australian.elc diff --git a/elpa/auctex-13.1.3/style/austrian.el b/elpa/auctex-13.1.3/style/austrian.el new file mode 100644 index 0000000..98305fd --- /dev/null +++ b/elpa/auctex-13.1.3/style/austrian.el @@ -0,0 +1,42 @@ +;;; austrian.el --- AUCTeX style for the `austrian' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Austrian text in connection with the +;; `austrian' babel option. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "austrian" + (lambda () + (TeX-run-style-hooks "german")) + TeX-dialect) + +;;; austrian.el ends here diff --git a/elpa/auctex-13.1.3/style/austrian.elc b/elpa/auctex-13.1.3/style/austrian.elc Binary files differnew file mode 100644 index 0000000..c53804b --- /dev/null +++ b/elpa/auctex-13.1.3/style/austrian.elc diff --git a/elpa/auctex-13.1.3/style/babel.el b/elpa/auctex-13.1.3/style/babel.el new file mode 100644 index 0000000..a7d6747 --- /dev/null +++ b/elpa/auctex-13.1.3/style/babel.el @@ -0,0 +1,436 @@ +;;; babel.el --- AUCTeX style for `babel.sty' version 3.31. -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2022 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2005-05-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `babel.sty' version 3.31 from 2019/05/04. + +;;; Code: + +(require 'tex) +(require 'latex) + +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-babel-language-list + '("afrikaans" + "azerbaijani" + "bahasa" "indonesian" "indon" "bahasai" "bahasam" "malay" "meyalu" + "basque" + "breton" + "bulgarian" + "catalan" + "croatian" + "czech" + "danish" + "dutch" + "english" "USenglish" "american" "UKenglish" "british" "canadian" + "australian" "newzealand" + "esperanto" + "estonian" + "finnish" + "french" "francais" "canadien" "acadian" + "galician" + "austrian" "german" "germanb" "ngerman" "naustrian" + "greek" "polutonikogreek" + "hebrew" + "icelandic" + "interlingua" + "irish" + "italian" + "latin" + "lowersorbian" + "samin" + "norsk" "nynorsk" + "polish" + "portuges" "portuguese" "brazilian" "brazil" + "romanian" + "russian" + "scottish" + "spanish" + "slovak" + "slovene" + "swedish" + "serbian" + "turkish" + "ukrainian" + "uppersorbian" + "welsh" + ;; Extra languages mentioned in the `babel' manual. + "albanian" "hindi" "thai" "thaicjk" "latvian" "turkmen" "hungarian" "magyar" + "mongolian" "romansh" "lithuanian" "spanglish" "vietnamese" "japanese" + "pinyin" "arabinc" "farsi" "ibygreek" "bgreek" "serbianic" "frenchle" + "ethiop" "friulan") + "List of languages supported by the babel LaTeX package.") + +(defvar LaTeX-babel-babelprovide-key-val-options + `(("import") + ("captions") + ("hyphenrules" ,(append '("+") LaTeX-babel-language-list)) + ("main") + ("script") + ("language") + ("mapfont") + ("intraspace") + ("intrapenalty")) + "Key=value options for `\\babelprovide' macro from `babel' package.") + +(defun LaTeX-babel-active-languages () + "Return a list of languages used in the document." + (let (main-language active-languages) + ;; Loop over options provided to class and `babel' package at load time. + (dolist (elt (append + ;; In most cases there is only one element in the alist, if + ;; there is more than one element, the first one should + ;; contain the class options of the current buffer. So we can + ;; take the car of `LaTeX-provided-class-options'. + (cdr (car LaTeX-provided-class-options)) + (cdr (assoc "babel" LaTeX-provided-package-options)))) + (setq elt (split-string elt "=")) + (if (equal (car elt) "main") + ;; Starting from version 3.9 of `babel' package, languages can be set + ;; with the following syntax: + ;; \usepackage[latin.medieval,main=danish,spanish.notilde]{babel} + ;; with `danish' being the default language. When the default + ;; language is set with the `main' option, we record it and append to + ;; the list at the end. + (setq main-language (car (cdr elt))) + ;; Get rid of the modifiers (`medieval' and `notilde' in the above + ;; example). + (setq elt (car (split-string (car elt) "\\."))) + (if (member elt LaTeX-babel-language-list) + ;; Append element to `active-languages' to respect loading order. + ;; `babel' package uses as default language the last loaded one, + ;; except if it is set with the `main' option. + (cl-pushnew elt active-languages :test #'equal)))) + (if main-language + (cl-pushnew main-language active-languages :test #'equal)) + (nreverse active-languages))) + +;; Setup for \babeltags: Note that the macro is \babeltags, we use +;; the version without `s' in order to reduce the hassle with AUCTeX +;; auto-generating the plural form: +(TeX-auto-add-type "babel-babeltag" "LaTeX") + +(defvar LaTeX-babel-babeltags-regexp + '("\\\\babeltags{\\([^}]+\\)}" 1 LaTeX-auto-babel-babeltag) + "Matches the argument of `\\babeltags' from `babel' package.") + +(defun LaTeX-babel-cleanup-babeltags () + "Parse defined babel tags and add them to AUCTeX." + ;; Check if we parsed something at all + (when (LaTeX-babel-babeltag-list) + (let (results tag tags cmds) + ;; Clean up the parsed results from characters we don't want; + ;; also remove possible comment lines + (setq results + (replace-regexp-in-string + "%.*\\'\\|[ \n\r\t]" "" + (mapconcat #'car (LaTeX-babel-babeltag-list) ","))) + ;; Look if \babeltags was issued once with multiple entries or + ;; more than once in the document: + (if (string-match-p "," results) + (progn + (dolist (elt (split-string results "," t)) + (setq tag (car (split-string elt "=" t))) + (push tag tags) + (push (list (concat "text" tag) t) cmds) + (push (list tag -1) cmds))) + ;; One \babeltags with one entry only + (setq tag (car (split-string results "=" t))) + (push tag tags) + (push (list (concat "text" tag) t) cmds) + (push (list tag -1) cmds)) + (mapc #'TeX-add-symbols cmds) + (mapc #'LaTeX-add-environments tags) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords (mapcar (lambda (x) + (list (concat "text" x) "{")) + tags) + 'textual) + (font-latex-add-keywords (mapcar (lambda (x) + (list x "")) + tags) + 'type-declaration))))) + +;; Setup for \babelfont: +(TeX-auto-add-type "babel-babelfont" "LaTeX") + +(defvar LaTeX-babel-babelfont-regexp + '("\\\\babelfont\\(?:\\[[^]]*\\]\\)?[ \t\n\r%]*{\\([^}]+\\)}" + 1 LaTeX-auto-babel-babelfont) + "Matches the <font-family> argument of `\\babelfont' from `babel' package.") + +(defun LaTeX-babel-cleanup-babelfont () + "Parse defined font-families and add them to AUCTeX." + (when (LaTeX-babel-babelfont-list) + (dolist (elt (mapcar #'car (LaTeX-babel-babelfont-list))) + ;; Don't do anything for standard font-families: + (unless (member elt '("rm" "sf" "tt")) + ;; Define \<font>family, \<font>default and \text<font>: + (let ((fam (concat elt "family")) + (def (concat elt "default")) + (mac (concat "text" elt))) + (apply #'TeX-add-symbols + `((,fam -1) + (,def -1) + (,mac t))) + ;; Cater for fontification: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,fam "") + (,def "")) + 'type-declaration) + (font-latex-add-keywords `((,mac "{")) + 'type-command))))))) + +(defun LaTeX-babel-auto-prepare () + "Clear `LaTeX-auto-babel-babel*' before parsing." + (setq LaTeX-auto-babel-babeltag nil + LaTeX-auto-babel-babelfont nil)) + +(defun LaTeX-babel-auto-cleanup () + "Process parsed elements." + (LaTeX-babel-cleanup-babeltags) + (LaTeX-babel-cleanup-babelfont)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-babel-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-babel-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-babel-lang (optional &optional prompt) + "Prompt for a language with completion and insert it as an argument." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Language") + (LaTeX-babel-active-languages)) + optional)) + +(defun LaTeX-env-babel-lang (env) + "Prompt for a language and insert it as an argument of ENV." + (LaTeX-insert-environment + env (format "{%s}" (completing-read "Language: " + (LaTeX-babel-active-languages))))) + +(defun LaTeX-babel-load-languages () + "Load style files of babel active languages." + ;; Run style hooks for every active language in loading order, so + ;; `TeX-quote-language' will be correctly set. + (mapc #'TeX-run-style-hooks (LaTeX-babel-active-languages))) + +(TeX-add-style-hook + "babel" + (lambda () + (LaTeX-babel-load-languages) + (add-hook 'LaTeX-after-usepackage-hook #'LaTeX-babel-load-languages nil t) + + ;; Add babel to the parser. + (TeX-auto-add-regexp LaTeX-babel-babeltags-regexp) + (TeX-auto-add-regexp LaTeX-babel-babelfont-regexp) + + ;; New symbols + (TeX-add-symbols + + ;; 1.7 Basic language selectors + '("selectlanguage" TeX-arg-babel-lang) + '("foreignlanguage" TeX-arg-babel-lang t) + + ;; 1.9 More on selection + '("babeltags" t) + '("babelensure" (TeX-arg-key-val + (("include") ("exclude") + ("fontenc" (;; 128+ glyph encodings (text) + "OT1" "OT2" "OT3" "OT4" "OT6" + ;; 256 glyph encodings (text) + "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5" + ;; 256 glyph encodings (text extended) + "X2" + ;; Other encodings + "LY1" "LV1" "LGR")))) + TeX-arg-babel-lang) + ;; 1.10 Shorthands + '("shorthandon" "Shorthands list") + '("shorthandoff" "Shorthands list") + '("shorthandoff*" "Shorthands list") + '("useshorthands" "Character") + '("useshorthands*" "Character") + '("defineshorthand" + [TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Language(s)") + (LaTeX-babel-active-languages)) + ","] + t nil) + '("languageshorthands" TeX-arg-babel-lang) + '("babelshorthand" "Short hand") + '("ifbabelshorthand" "Character" t nil) + '("aliasshorthand" "Original" "Alias") + + ;; 1.12 The base option + '("AfterBabelLanguage" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Language") + LaTeX-babel-language-list) + t) + + ;; 1.14 Selecting fonts + '("babelfont" + [TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Language(s)") + LaTeX-babel-language-list) + ","] + (TeX-arg-eval let ((fontfam (completing-read + (TeX-argument-prompt nil nil "font family") + '("rm" "sf" "tt")))) + ;; Run `TeX-check-engine-add-engines' and then + ;; load `fontspec.el' if not already loaded and + ;; make sure the key-vals are up to date. + (unless (member "fontspec" (TeX-style-list)) + (TeX-check-engine-add-engines 'luatex 'xetex) + (TeX-run-style-hooks "fontspec") + (LaTeX-fontspec-auto-cleanup)) + (LaTeX-add-babel-babelfonts fontfam) + (LaTeX-babel-cleanup-babelfont) + (format "%s" fontfam)) + [TeX-arg-key-val (LaTeX-fontspec-font-features)] + LaTeX-fontspec-arg-font) + + ;; 1.16 Creating a language + '("babelprovide" + [TeX-arg-key-val LaTeX-babel-babelprovide-key-val-options] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Language") + LaTeX-babel-language-list)) + + ;; 1.19 Accessing language info + '("languagename" 0) + '("iflanguage" TeX-arg-babel-lang t nil) + + ;; 1.20 Hyphenation and line breaking + '("babelhyphen" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Type/Text") + '("soft" "hard" "repeat" "nobreak" "empty"))) + '("babelhyphen*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Type/Text") + '("soft" "hard" "repeat" "nobreak" "empty"))) + + '("babelhyphenation" + [TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Language(s)") + LaTeX-babel-language-list) + ","] + t) + + ;; 1.23 Selecting scripts + '("ensureascii" "Text") + + ;; 1.25 Language attributes + '("languageattribute" TeX-arg-babel-lang t)) + + ;; Don't increase indentation at various \if* macros: + (let ((exceptions '("ifbabelshorthand" + "iflanguage"))) + (dolist (elt exceptions) + (add-to-list 'LaTeX-indent-begin-exceptions-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; New environments: 1.8 Auxiliary language selectors + (LaTeX-add-environments + '("otherlanguage" LaTeX-env-babel-lang) + '("otherlanguage*" LaTeX-env-babel-lang) + '("hyphenrules" LaTeX-env-babel-lang)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("selectlanguage" "{") + ("foreignlanguage" "{{") + ("babeltags" "{") + ("babelensure" "{{") + ("shorthandon" "{") + ("shorthandoff" "*{") + ("useshorthands" "*{") + ("languageshorthands" "{") + ("babelshorthand" "{") + ("AfterBabelLanguage" "{") + ("babelfont" "[{[{") + ("babelprovide" "[{") + ("languagename" "") + ("iflanguage" "{{{") + ("babelhyphen" "*{") + ("babelhyphenation" "[{") + ("ensureascii" "{")) + 'function) + (font-latex-add-keywords '(("defineshorthand" "[{{") + ("aliasshorthand" "{{") + ("languageattribute" "{{")) + 'variable))) + TeX-dialect) + +(defun LaTeX-babel-package-options () + "Prompt for package options for the babel package." + (TeX-read-key-val + t + (append + '(("KeepShorthandsActive") + ("activeacute") + ("activegrave") + ("shorthands" ("off")) + ("safe" ("none" "ref" "bib")) + ("math" ("active" "normal")) + ("config") + ("main" LaTeX-babel-language-list) + ("headfoot" LaTeX-babel-language-list) + ("noconfigs") + ("nocase") + ("silent") + ("showlanguages") + ("nocase") + ("silent") + ("strings" ("generic" "unicode" "encoded" + "OT1" "OT2" "OT3" "OT4" "OT6" + "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5" + "X2" "LY1" "LV1" "LGR")) + ("hyphenmap" ("off" "first" "select" "other" "other*")) + ("bidi" ("default" "basic" "basic-r" "bidi-l" "bidi-r")) + ("layout" ("sectioning" "counters" "lists" "contents" "footnotes" + "captions" "columns" "graphics" "extras")) + ("base")) + (mapcar #'list LaTeX-babel-language-list)))) + +;;; babel.el ends here diff --git a/elpa/auctex-13.1.3/style/babel.elc b/elpa/auctex-13.1.3/style/babel.elc Binary files differnew file mode 100644 index 0000000..27cebe0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/babel.elc diff --git a/elpa/auctex-13.1.3/style/backref.el b/elpa/auctex-13.1.3/style/backref.el new file mode 100644 index 0000000..a7a6ef1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/backref.el @@ -0,0 +1,94 @@ +;;; backref.el --- AUCTeX style for `backref.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-02-06 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `backref.sty' v1.41 form 2021-02-04. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "backref" + (lambda () + + (TeX-add-symbols + '("backrefsetup" + (TeX-arg-key-val (("verbose" ("true" "false")) + ("enable" ("true" "false")) + ("disable" ("true" "false"))))) + "backrefparscanfalse" + "backrefparscantrue" + "backrefprint" + "backref" + "backrefalt" + "backrefsep" + "backreftwosep" + "backreflastsep" + "backrefentrycount") + + ;; This is a hack: We want to have the 2 macros + ;; \backrefparscanfalse and \backrefparscantrue indented like + ;; \bibitem, hence we add them to a local version of + ;; `LaTeX-item-regexp': + (unless (string-match-p "backrefparscan" LaTeX-item-regexp) + (setq-local LaTeX-item-regexp + (concat LaTeX-item-regexp + "\\|" "backrefparscan\\(false\\|true\\)\\b"))) + + ;; Only add "backrefprint" here, "backrefparscan*" will be added + ;; via `LaTeX-item-regexp' when `LaTeX-set-paragraph-start' is + ;; called: + (LaTeX-paragraph-commands-add-locally '("backrefprint")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("backrefsetup" "{") + ("backrefparscanfalse" "") + ("backrefparscantrue" "") + ("backrefprint" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-backref-package-options + '("ref" "pageref" "hyperref" "hyperpageref" + "enable" "disable" "verbose" + "english" "american" "australian" "british" "canadian" + "newzealand" "UKenglish" "USenglish" + "german" "ngerman" "austrian" "naustrian" + "french" "acadian" "canadien" "frenchb" "francais" + "spanish" "brazil" "brazilian" "afrikaans") + "Package options for the backref package.") + +;;; backref.el ends here diff --git a/elpa/auctex-13.1.3/style/backref.elc b/elpa/auctex-13.1.3/style/backref.elc Binary files differnew file mode 100644 index 0000000..fe57272 --- /dev/null +++ b/elpa/auctex-13.1.3/style/backref.elc diff --git a/elpa/auctex-13.1.3/style/baskervaldx.el b/elpa/auctex-13.1.3/style/baskervaldx.el new file mode 100644 index 0000000..a4cba48 --- /dev/null +++ b/elpa/auctex-13.1.3/style/baskervaldx.el @@ -0,0 +1,88 @@ +;;; baskervaldx.el --- AUCTeX style for `baskervaldx.sty' (v1.07) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `baskervaldx.sty' (v1.07) from 2015/04/06. +;; `baskervaldx.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "baskervaldx" + (lambda () + + ;; Run style hook for various packages loaded by baskervaldx + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + + ;; Only preamble commands + '("useosf" 0) + + ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration + '("textlf" t) ; proportional lining figures + '("texttlf" t) ; tabular lining figures + '("textosf" t) ; proportional oldstyle figures + '("texttosf" t) ; tabular oldstyle figures + '("textsu" t)) ; superior figures + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-baskervaldx-package-options + '("lining" "lf" "oldstyle" "osf" "tabular" "proportional" "p" + "scale" "scaled" "sups" "swash") + "Package options for the baskervaldx package.") + +;;; baskervaldx.el ends here diff --git a/elpa/auctex-13.1.3/style/baskervaldx.elc b/elpa/auctex-13.1.3/style/baskervaldx.elc Binary files differnew file mode 100644 index 0000000..8cb2457 --- /dev/null +++ b/elpa/auctex-13.1.3/style/baskervaldx.elc diff --git a/elpa/auctex-13.1.3/style/beamer.el b/elpa/auctex-13.1.3/style/beamer.el new file mode 100644 index 0000000..589a26a --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamer.el @@ -0,0 +1,381 @@ +;;; beamer.el --- AUCTeX style for the latex-beamer class -*- lexical-binding: t; -*- + +;; Copyright (C) 2003-2021 Free Software Foundation, Inc. + +;; Author: Thomas Baumann <thomas.baumann@ch.tum.de> +;; Created: 2003-12-20 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the latex-beamer class. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-beamer-after-insert-env (env start _end) + "Do beamer-specific stuff after the insertion of an environment." + ;; Add `fragile' as an optional argument to the frame environment if + ;; a verbatim environment is inserted. + (when (and (TeX-member env (LaTeX-verbatim-environments) #'string-equal) + (save-excursion + (goto-char start) + (string-equal (LaTeX-current-environment) "frame"))) + (save-excursion + (when (re-search-backward "\\\\begin[ \t]*{frame}" nil t) + (let ((end-of-begin (match-end 0))) + (goto-char end-of-begin) + (while (forward-comment 1)) + (if (eq (char-after) (string-to-char LaTeX-optop)) + (progn + (forward-char) + (insert "fragile") + (unless (looking-at (concat "[ \t]*" LaTeX-optcl)) + (insert ","))) + (goto-char end-of-begin) + (insert "[fragile]"))))))) + +(defvar LaTeX-beamer-frametitle-history nil + "History of frame titles in beamer.") + +(TeX-add-style-hook + "beamer" + (lambda () + (add-hook 'LaTeX-after-insert-env-hook #'LaTeX-beamer-after-insert-env nil t) + + (TeX-run-style-hooks "amsmath" "amssymb" "amsthm" "color" "geometry" + "hyperref" "inputenc" "translator" "xcolor") + + (unless LaTeX-beamer-section-labels-flag + (make-local-variable 'LaTeX-section-hook) + (setq LaTeX-section-hook + '(LaTeX-section-heading + LaTeX-section-title + LaTeX-section-section))) + + (setq LaTeX-item-list + (append '(("itemize" . LaTeX-item-beamer) + ("enumerate" . LaTeX-item-beamer)) + LaTeX-item-list)) + + (setq LaTeX-default-document-environment "frame") + + (LaTeX-paragraph-commands-add-locally "frametitle") + + (TeX-add-symbols + '("alert" [ TeX-arg-beamer-overlay-spec ] 1) + '("alt" [ TeX-arg-beamer-overlay-spec ] 2) + '("beamerbutton" 1) + '("beamergotobutton" 1) + '("beamerreturnbutton" 1) + '("beamerskipbutton" 1) + '("frame" TeX-arg-beamer-frametitle) + '("frametitle" + (TeX-arg-eval TeX-read-string "Title: " nil 'LaTeX-beamer-frametitle-history)) + '("hyperlink" [ TeX-arg-beamer-overlay-spec ] 2) + '("hyperlinkslideprev" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkslidenext" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkframestart" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkframeend" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkframestartnext" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkframeendprev" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkpresentationstart" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkpresentationend" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkappendixstart" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkappendixend" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkdocumentstart" [ TeX-arg-beamer-overlay-spec ] 1) + '("hyperlinkdocumentend" [ TeX-arg-beamer-overlay-spec ] 1) + '("hypertarget" [ TeX-arg-beamer-overlay-spec ] 2) + '("institute" 1) + '("invisible" [ TeX-arg-beamer-overlay-spec ] 1) + '("label" [ TeX-arg-beamer-overlay-spec ] 1) + '("logo" 1) + '("note" TeX-arg-beamer-note 1) + '("only" [ TeX-arg-beamer-overlay-spec ] 1) + '("onslide" [ TeX-arg-beamer-overlay-spec ]) + '("partpage") + '("pause" ["Slide number"]) + '("structure" [ TeX-arg-beamer-overlay-spec ] 1) + '("temporal" [ TeX-arg-beamer-overlay-spec ] 3) + '("titlepage") + '("titlegraphic" 1) + '("uncover" [ TeX-arg-beamer-overlay-spec ] 1) + '("usetheme" LaTeX-arg-beamer-theme) + '("useinnertheme" LaTeX-arg-beamer-inner-theme) + '("useoutertheme" LaTeX-arg-beamer-outer-theme) + '("usecolortheme" LaTeX-arg-beamer-color-theme) + '("usefonttheme" LaTeX-arg-beamer-font-theme) + '("usetheme" LaTeX-arg-beamer-theme) + '("visible" [ TeX-arg-beamer-overlay-spec ] 1)) + + (LaTeX-add-environments + '("actionenv") + '("alertblock" 1) + '("beamerboxesrounded" 1) + '("block" (lambda (env &rest ignore) + (LaTeX-insert-environment + env (format "{%s}" (TeX-read-string "Title: "))))) + '("column" "Width") + "columns" + "columnsonlytextwidth" + '("exampleblock" 1) + '("frame" (lambda (env &rest ignore) + (let ((title (TeX-read-string "(Optional) Title: " nil + 'LaTeX-beamer-frametitle-history))) + (LaTeX-insert-environment env) + (unless (zerop (length title)) + (save-excursion + (LaTeX-find-matching-begin) + (end-of-line) + (LaTeX-newline) + ;; Indent the next macro insertion and don't + ;; rely on the fill-function to do it: + (indent-according-to-mode) + (insert (format "\\frametitle{%s}" title)) + ;; This works because \frametitle is a + ;; paragraph command. + (when auto-fill-function + (backward-char) + (LaTeX-fill-paragraph))))))) + '("onlyenv" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((overlay (TeX-read-string "(Optional) Overlay: "))) + (unless (zerop (length overlay)) + (format "<%s>" overlay)))))) + '("overlayarea" "Area width" "Area height") + '("overprint" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((width (TeX-read-string "(Optional) Area width: "))) + (unless (zerop (length width)) + (format "[%s]" width)))))) + "semiverbatim") + + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "lecture" "part" "section" "subsection" "subsubsection" + "subsectionslide" "framenumber" "figure" "table" + "beamerpauses") + (LaTeX-add-pagestyles "navigation") + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("semiverbatim" current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local "semiverbatim") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("title" "[{") + ("subtitle" "[{") + ("author" "[{") + ("date" "[{") + ("frametitle" "<[{")) 'slide-title))) + TeX-dialect) + +(defun TeX-arg-beamer-overlay-spec (optional &optional prompt) + "Prompt for overlay specification. +If OPTIONAL is non-nil, insert the specification only if +non-empty and enclosed in \"<>\". PROMPT replaces the standard +one." + (let ((TeX-arg-opening-brace "<") + (TeX-arg-closing-brace ">")) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional prompt "Overlay")) + optional) + (indent-according-to-mode))) + +(defun TeX-arg-beamer-frametitle (_optional &optional _prompt) + "Prompt for the frametitle." + (let ((title (TeX-read-string "Title: " nil 'LaTeX-beamer-frametitle-history))) + (if (not (zerop (length title))) + (insert TeX-grop TeX-esc "frametitle" TeX-grop + title TeX-grcl TeX-grcl) + (insert TeX-grop TeX-grcl)))) + +(defun LaTeX-item-beamer () + "Insert a new item with an optional overlay argument. You +can turn off the prompt for the overlay argument by setting +`LaTeX-beamer-item-overlay-flag' to nil. Calling the function +with a prefix argument prompts for the overlay specification +unconditionally." + (if (listp current-prefix-arg) + (setq current-prefix-arg (car current-prefix-arg)) + current-prefix-arg) + (TeX-insert-macro "item") + (delete-horizontal-space) + (if (or current-prefix-arg LaTeX-beamer-item-overlay-flag) + (TeX-arg-beamer-overlay-spec 0)) + (insert " ") + (indent-according-to-mode)) + +(defun TeX-arg-beamer-note (_optional &optional _prompt) + "Prompt for overlay specification and optional argument." + (let ((overlay (TeX-read-string "(Optional) Overlay: ")) + (options (TeX-read-string "(Optional) Options: "))) + (unless (zerop (length overlay)) + (insert "<" overlay ">")) + (unless (zerop (length options)) + (insert "[" options "]")) + (indent-according-to-mode))) + +(defun LaTeX-beamer-search-themes (&optional regexp extensions length) + "Search for beamer themes matching REGEXP with EXTENSIONS. +The function removes the first LENGTH characters and the +extension of the file and returns a list of strings. LENGTH may +also be a string. Then the length of the string is used." + (let* ((match (or regexp "^beamertheme[A-Z]")) + (exts (or extensions '("tex" "sty"))) + (chars (cond ((integerp length) + length) + ((stringp length) + (string-width length)) + ;; Try some DWIM magic... + ((and (not length) + (string-match "beamer[A-Za-z0-9]*theme" match)) + (- (match-end 0) (match-beginning 0))) + (t (error "Invalid length: `%s'" length))))) + ;; (message "match=`%s' chars=`%s'" match chars) + (TeX-delete-duplicate-strings + (delete nil + (mapcar + (lambda (file) + (let ((case-fold-search nil)) + (and (numberp (string-match match file)) + (substring file chars)))) + (TeX-search-files nil exts t t)))))) + +(defun LaTeX-arg-beamer-theme (&rest _ignore) + "Prompt for beamer theme with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil nil "Theme") + (mapcar #'list + (cond ((eq LaTeX-beamer-themes 'local) + (set (make-local-variable 'LaTeX-beamer-themes) + (LaTeX-beamer-search-themes))) + ((functionp LaTeX-beamer-themes) + (funcall LaTeX-beamer-themes)) + ((listp LaTeX-beamer-themes) + LaTeX-beamer-themes) + (t (error + "`LaTeX-beamer-themes' should be a list: `%s'" + LaTeX-beamer-themes)))) + nil nil nil) + t)) + +(defun LaTeX-arg-beamer-inner-theme (&rest _ignore) + "Prompt for beamer inner theme with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil nil "Theme") + (mapcar #'list + (cond ((eq LaTeX-beamer-inner-themes 'local) + (set (make-local-variable 'LaTeX-beamer-inner-themes) + (LaTeX-beamer-search-themes "^beamerinnertheme"))) + ((functionp LaTeX-beamer-inner-themes) + (funcall LaTeX-beamer-inner-themes)) + ((listp LaTeX-beamer-inner-themes) + LaTeX-beamer-inner-themes) + (t (error + "`LaTeX-beamer-inner-themes' should be a list: `%s'" + LaTeX-beamer-inner-themes)))) + nil nil nil) + t)) + +(defun LaTeX-arg-beamer-outer-theme (&rest _ignore) + "Prompt for beamer outer theme with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil nil "Theme") + (mapcar #'list + (cond ((eq LaTeX-beamer-outer-themes 'local) + (set (make-local-variable 'LaTeX-beamer-outer-themes) + (LaTeX-beamer-search-themes "^beameroutertheme"))) + ((functionp LaTeX-beamer-outer-themes) + (funcall LaTeX-beamer-outer-themes)) + ((listp LaTeX-beamer-outer-themes) + LaTeX-beamer-outer-themes) + (t (error + "`LaTeX-beamer-outer-themes' should be a list: `%s'" + LaTeX-beamer-outer-themes)))) + nil nil nil) + t)) + +(defun LaTeX-arg-beamer-color-theme (&rest _ignore) + "Prompt for beamer color theme with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil nil "Theme") + (mapcar #'list + (cond ((eq LaTeX-beamer-color-themes 'local) + (set (make-local-variable 'LaTeX-beamer-color-themes) + (LaTeX-beamer-search-themes "^beamercolortheme"))) + ((functionp LaTeX-beamer-color-themes) + (funcall LaTeX-beamer-color-themes)) + ((listp LaTeX-beamer-color-themes) + LaTeX-beamer-color-themes) + (t (error + "`LaTeX-beamer-color-themes' should be a list: `%s'" + LaTeX-beamer-color-themes)))) + nil nil nil) + t)) + +(defun LaTeX-arg-beamer-font-theme (&rest _ignore) + "Prompt for beamer font theme with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil nil "Theme") + (mapcar #'list + (cond ((eq LaTeX-beamer-font-themes 'local) + (set (make-local-variable 'LaTeX-beamer-font-themes) + (LaTeX-beamer-search-themes "^beamerfonttheme"))) + ((functionp LaTeX-beamer-font-themes) + (funcall LaTeX-beamer-font-themes)) + ((listp LaTeX-beamer-font-themes) + LaTeX-beamer-font-themes) + (t (error + "`LaTeX-beamer-font-themes' should be a list: `%s'" + LaTeX-beamer-font-themes)))) + nil nil nil) + t)) + +(defun LaTeX-beamer-class-options () + "Read the beamer class options from the user." + (TeX-load-style "hyperref") + (TeX-read-key-val t '(("usepdftitle" ("false")) ("envcountsect") + ("notheorems") ("noamsthm") ("compress") ("t") ("c") + ("leqno") ("fleqn") ("handout") ("trans") ("pdftex") + ("nativepdf") ("pdfmark") ("dvips") ("dviwindo") + ("dvipsone") ("vtex") ("ps2pdf") ("ignorenonframetext") + ("noamssymb") ("bigger") ("smaller") ("8pt") ("9pt") + ("10pt") ("11pt") ("12pt") ("14pt") ("17pt") ("20pt") + ("draft") ("CJK") ("cjk") ("pgf") + ("hyperref" LaTeX-hyperref-package-options-list) + ("color") ("xcolor") ("ucs") ("utf8x") ("utf8") + ("aspectratio" ("1610" "169" "149" "54" "43" "32"))))) + +;;; beamer.el ends here diff --git a/elpa/auctex-13.1.3/style/beamer.elc b/elpa/auctex-13.1.3/style/beamer.elc Binary files differnew file mode 100644 index 0000000..1a78455 --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamer.elc diff --git a/elpa/auctex-13.1.3/style/beamerarticle.el b/elpa/auctex-13.1.3/style/beamerarticle.el new file mode 100644 index 0000000..136947a --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamerarticle.el @@ -0,0 +1,35 @@ +;;; beamerarticle.el --- AUCTeX style for the latex-beamerarticle class -*- lexical-binding: t; -*- + +;; Copyright (C) 2019, 2020 Free Software Foundation, Inc. + +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Triggers the beamer style when using the beamerarticle style. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "beamerarticle" + (lambda () + (TeX-run-style-hooks "beamer"))) diff --git a/elpa/auctex-13.1.3/style/beamerarticle.elc b/elpa/auctex-13.1.3/style/beamerarticle.elc Binary files differnew file mode 100644 index 0000000..114687f --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamerarticle.elc diff --git a/elpa/auctex-13.1.3/style/beamerswitch.el b/elpa/auctex-13.1.3/style/beamerswitch.el new file mode 100644 index 0000000..d565523 --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamerswitch.el @@ -0,0 +1,35 @@ +;;; beamerswitch.el --- AUCTeX style for the latex-beamerswitch class -*- lexical-binding: t; -*- + +;; Copyright (C) 2019, 2020 Free Software Foundation, Inc. + +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Triggers the beamer style when using the beamerswitch style. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "beamerswitch" + (lambda () + (TeX-run-style-hooks "beamer"))) diff --git a/elpa/auctex-13.1.3/style/beamerswitch.elc b/elpa/auctex-13.1.3/style/beamerswitch.elc Binary files differnew file mode 100644 index 0000000..023a2e1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/beamerswitch.elc diff --git a/elpa/auctex-13.1.3/style/biblatex.el b/elpa/auctex-13.1.3/style/biblatex.el new file mode 100644 index 0000000..43115be --- /dev/null +++ b/elpa/auctex-13.1.3/style/biblatex.el @@ -0,0 +1,645 @@ +;;; biblatex.el --- AUCTeX style for `biblatex.sty' version 2.8a. -*- lexical-binding: t; -*- + +;; Copyright (C) 2012-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2012-11-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `biblatex.sty' version 2.8a. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar reftex-cite-format-builtin) + +(defvar LaTeX-biblatex-entrytype + '(;; Regular Types + "article" "book" "mvbook" "inbook" "bookinbook" "suppbook" "booklet" + "collection" "mvcollection" "incollection" "suppcollection" "manual" "misc" + "online" "patent" "periodical" "suppperiodical" "proceedings" + "mvproceedings" "inproceedings" "reference" "mvreference" "inreference" + "report" "set" "thesis" "unpublished" "xdata" "customa" "customb" "customc" + "customd" "custome" "customf" + ;; Type Aliases + "conference" "electronic" "masterthesis" "phdthesis" "techreport" "www" + ;; Unsupported Types + "artwork" "audio" "bibnote" "commentary" "image" "jurisdiction" + "legislation" "legal" "letter" "movie" "music" "performance" "review" + "software" "standard" "video") + "List of biblatex entry types.") + +(defvar LaTeX-biblatex-executebibliographyoptions-options + '(;; General + ("sorting" ("nty" "nyt" "nyvt" "anyt" "anyvt" "ynt" "ydnt" "none" "debug")) + ("sortcase" ("true" "false")) + ("sortupper" ("true" "false")) + ("sortlocale") + ("sortlos" ("bib" "los")) + ("related" ("true" "false")) + ("sortcites" ("true" "false")) + ("maxnames") + ("minnames") + ("maxbibnames") + ("minbibnames") + ("maxcitenames") + ("mincitenames") + ("maxitems") + ("minitems") + ("autocite" ("plain" "inline" "footnote" "superscript")) + ("autopunct" ("true" "false")) + ("language" (append LaTeX-biblatex-language-list + '("autobib" "autocite" "auto"))) + ("clearlang" ("true" "false")) + ("autolang" ("none" "hyphen" "other" "other*" "langname")) + ("block" ("none" "space" "par" "nbpar" "ragged")) + ("notetype" ("foot+end" "footonly" "endonly")) + ("hyperref" ("true" "false" "auto")) + ("backref" ("true" "false")) + ("backrefstyle" ("none" "three" "two" "two+" "three+" "all+")) + ("backrefsetstyle" ("setonly" "memonly" "setormem" "setandmem" "memandset" + "setplusmem")) + ("indexing" ("true" "false" "cite" "bib")) + ("loadfiles" ("true" "false")) + ("refsection" ("none" "part" "chapter" "section" "subsection")) + ("refsegment" ("none" "part" "chapter" "section" "subsection")) + ("citereset" ("none" "part" "chapter" "section" "subsection")) + ("abbreviate" ("true" "false")) + ("date" ("short" "long" "terse" "comp" "iso8601")) + ("datelabel" ("year" "short" "long" "terse" "comp" "iso8601")) + ("origdate" ("short" "long" "terse" "comp" "iso8601")) + ("eventdate" ("short" "long" "terse" "comp" "iso8601")) + ("urldate" ("short" "long" "terse" "comp" "iso8601")) + ("alldates" ("short" "long" "terse" "comp" "iso8601")) + ("datezeros" ("true" "false")) + ("dateabbrev" ("true" "false")) + ("defernumbers" ("true" "false")) + ("punctfont" ("true" "false")) + ("arxiv" ("abs" "ps" "pdf" "format")) + ("texencoding" ("auto")) + ("bibencoding" ("auto")) + ("safeinputenc" ("true" "false")) + ("bibwarn" ("true" "false")) + ("mincrossrefs") + ;; Style-specific + ("isbn" ("true" "false")) + ("url" ("true" "false")) + ("doi" ("true" "false")) + ("eprint" ("true" "false")) + ;; Internal + ("pagetracker" ("true" "false" "page" "spread")) + ("citecounter" ("true" "false" "context")) + ("citetracker" ("true" "false" "context" "strict" "constrict")) + ("ibidtracker" ("true" "false" "context" "strict" "constrict")) + ("opcittracker" ("true" "false" "context" "strict" "constrict")) + ("loccittracker" ("true" "false" "context" "strict" "constrict")) + ("idemtracker" ("true" "false" "context" "strict" "constrict")) + ("parentracker" ("true" "false")) + ("maxparens") + ("firstinits" ("true" "false")) + ("sortfirstinits" ("true" "false")) + ("terseinits" ("true" "false")) + ("labelalpha" ("true" "false")) + ("maxalphanames") + ("minalphanames") + ("labelnumber" ("true" "false")) + ("labeltitle" ("true" "false")) + ("labeltitleyear" ("true" "false")) + ("labeldate" ("true" "false")) + ("singletitle" ("true" "false")) + ("uniquename" ("true" "false" "init" "full" "allinit" "allfull" "mininit" + "minfull")) + ("uniquelist" ("true" "false" "minyear"))) + "Key=value options for ExecuteBibliographyOptions macro of the biblatex package.") + +;; See table 2 of Biblatex reference manual. +(defvar LaTeX-biblatex-language-list + '("catalan" "croatian" "czech" "danish" "dutch" "american" "british" + "canadian" "australian" "newzealand" "finnish" "french" "german" "austrian" + "ngernam" "naustrian" "greek" "italian" "norwegian" "polish" "brazilian" + "portuguese" "russian" "spanish" "swedish") + "List of languages supported by biblatex packages.") + +(defvar LaTeX-biblatex-addbibresource-options + '(("label") + ("location" ("local" "remote")) + ("type" ("file")) + ("datatype" ("bibtex" "ris" "zoterordfxml" "endnotexml"))) + "Key=value options for addbibresource macro of the biblatex package.") + +(defun LaTeX-arg-addbibresource (optional &optional prompt) + "Prompt for a BibLaTeX database file. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (let (files inputs database) + (if LaTeX-using-Biber + (setq files 'TeX-Biber-global-files + inputs 'biberinputs) + (setq files 'BibTeX-global-files + inputs 'bibinputs)) + (setq files 'TeX-Biber-global-files + inputs 'biberinputs) + (message "Searching for BibLaTeX files...") + (or (symbol-value files) + (set files (mapcar #'list (TeX-search-files-by-type + 'biberinputs 'global t nil)))) + (message "Searching for BibLaTeX files...done") + (setq database (completing-read + (TeX-argument-prompt optional prompt "BibLaTeX files") + (append (mapcar #'list (TeX-search-files-by-type + inputs 'local t nil)) + (symbol-value files)))) + (LaTeX-add-bibliographies database) + ;; Run style file associated to the bibliography database file in order to + ;; immediately fill `LaTeX-bibitem-list'. We need to strip the extension + ;; because AUCTeX style files don't use it. + (TeX-run-style-hooks (file-name-sans-extension database)) + (TeX-argument-insert database optional))) + +;; Support for multicite commands, see § 3.7.3 of Biblatex reference manual. +(defun LaTeX-arg-biblatex-cites (optional &optional prompt) + "Prompt for citations with completion until input is empty. +Prompt also for optional prenotes and postnotes. If OPTIONAL is +non-nil, insert the citation key as an optional argument, +otherwise as a mandatory one. Use PROMPT as the prompt string +for citation keys." + ;; Prompt for global prenote and postnote. + (and TeX-arg-cite-note-p (not current-prefix-arg) + (let ((TeX-arg-opening-brace "(") + (TeX-arg-closing-brace ")") + (prenote (TeX-read-string + (TeX-argument-prompt t nil "Global prenote")))) + (TeX-argument-insert prenote t) + ;; If the prenote is empty the postnote is optional, otherwise it's + ;; mandatory. + (TeX-argument-insert + (TeX-read-string (TeX-argument-prompt t nil "Global postnote")) + (equal prenote "")))) + (let ((items t) (noinsert nil)) + (while items + ;; Prompt for prenote and postnote of the current keys. + (and TeX-arg-cite-note-p (not current-prefix-arg) + (let ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]") + (prenote (TeX-read-string + (TeX-argument-prompt t nil "Prenote")))) + (TeX-argument-insert prenote t) + ;; If the prenote is empty the postnote is optional, otherwise it's + ;; mandatory. + (TeX-argument-insert + (TeX-read-string (TeX-argument-prompt t nil "Postnote")) + (equal prenote "")))) + (setq items (if (and (fboundp 'reftex-citation) + (fboundp 'reftex-plug-flag) + (reftex-plug-flag 3)) + ;; Use RefTeX when enabled. + (reftex-citation t) + ;; Multiple citation keys in each argument are allowed. + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Key(s)") + (LaTeX-bibitem-list)))) + (apply #'LaTeX-add-bibitems items) + ;; If input is empty, insert an empty group only the first time, when + ;; `noinsert' flag is nil. + (unless (and (not items) noinsert) + (TeX-argument-insert (mapconcat #'identity items ",") optional)) + (setq noinsert t)))) + +(defun LaTeX-arg-biblatex-natbib-notes (optional) + "Prompt for two note arguments of a natbib compat citation command." + (when TeX-arg-cite-note-p + (let ((pre (TeX-read-string + (TeX-argument-prompt optional nil "Prenote"))) + (post (TeX-read-string + (TeX-argument-prompt optional nil "Postnote")))) + (TeX-argument-insert pre optional) + (TeX-argument-insert post optional) + ;; pre is given, post is empty: Make sure that we insert an + ;; extra pair of `[]', otherwise pre becomes post + (when (and pre (not (string= pre "")) + (string= post "")) + (insert LaTeX-optop LaTeX-optcl))))) + +(TeX-add-style-hook + "biblatex" + (lambda () + ;; Biblatex uses as default backend biber, run it unless biblatex `backend' + ;; option value is one of `bibtex', `bibtex8', `bibtexu'. Autodetection of + ;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a + ;; local variable. + (setq LaTeX-using-Biber + (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer)) + LaTeX-biblatex-use-Biber + (not (or (LaTeX-provided-package-options-member + "biblatex" "backend=bibtex") + (LaTeX-provided-package-options-member + "biblatex" "backend=bibtex8") + (LaTeX-provided-package-options-member + "biblatex" "backend=bibtexu"))))) + + (TeX-run-style-hooks + "keyval" + "kvoptions" + "logreq" + "ifthen" + "url") + (TeX-add-symbols + ;;; Global Customization + ;; Setting Package Options + '("ExecuteBibliographyOptions" + [TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + "Entry type: " LaTeX-biblatex-entrytype) ","] + (TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options)) + ;;; Bibliography Commands + ;; Resources + '("addbibresource" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options] + LaTeX-arg-addbibresource) + '("addglobalbib" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options] + LaTeX-arg-addbibresource) + '("addsectionbib" [TeX-arg-key-val LaTeX-biblatex-addbibresource-options] + LaTeX-arg-addbibresource) + ;; The Bibliography + '("printbibliography" + [TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote") + ("section") ("segment") ("sorting") ("type") ("nottype") + ("subtype") ("notsubtype") ("keyword") ("notkeyword") + ("categoy") ("notcategory") ("filter") ("check") + ("prefixnumbers") ("resetnumbers" ("true" "false")) + ("omitnumbers" ("true" "false")))]) + '("bibbysection" + [TeX-arg-key-val (("env") ("heading") ("prenote") ("postnote"))]) + '("bibbysegment" + [TeX-arg-key-val (("env") ("heading") ("prenote") ("postnote"))]) + '("bibbycategory" + [TeX-arg-key-val (("env") ("prenote") ("postnote") ("section"))]) + '("printbibheading" + [TeX-arg-key-val (("heading") ("title"))]) + ;; The List of Shorthands + '("printshorthands" + [TeX-arg-key-val (("env") ("heading") ("title") ("prenote") ("postnote") + ("section") ("segment") ("sorting") ("type") ("nottype") + ("subtype") ("notsubtype") ("keyword") ("notkeyword") + ("categoy") ("notcategory") ("filter") ("check"))]) + ;; Bibliography Sections + '("newrefsection" ["Resources"]) + "endrefsection" + ;; Bibliography Segments + "newrefsegment" + "endrefsegment" + ;; Bibliography Categories + '("DeclareBibliographyCategory" "Category") + '("addtocategory" "Category" TeX-arg-cite) + ;; Bibliography Headings and Environments + '("defbibenvironment" "Name" 3) + '("defbibheading" "Name" ["Title"] t) + ;; Bibliography Notes + '("defbibnote" "Name" "Text") + ;; Bibliography Filters and Checks + '("defbibfilter" "Name" t) + '("defbibcheck" "Name" t) + ;; Dynamic Entry Sets + '("defbibentryset" "Set" + (TeX-arg-eval mapconcat #'identity (TeX-completing-read-multiple + "Keys: " (LaTeX-bibitem-list)) ",")) + ;;; Citation Commands + '("cite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Cite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("parencite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Parencite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("footcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("footcitetext" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + ;; Style-specific Commands + '("textcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Textcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("smartcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Smartcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("cite*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("parencite*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("supercite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + ;; Qualified Citation Lists + '("cites" LaTeX-arg-biblatex-cites) + '("Cites" LaTeX-arg-biblatex-cites) + '("parencites" LaTeX-arg-biblatex-cites) + '("Parencites" LaTeX-arg-biblatex-cites) + '("footcites" LaTeX-arg-biblatex-cites) + '("footcitetexts" LaTeX-arg-biblatex-cites) + '("smartcites" LaTeX-arg-biblatex-cites) + '("Smartcites" LaTeX-arg-biblatex-cites) + '("textcites" LaTeX-arg-biblatex-cites) + '("Textcites" LaTeX-arg-biblatex-cites) + '("supercites" LaTeX-arg-biblatex-cites) + ;; Style-independent Commands + '("autocite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Autocite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("autocite*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Autocite*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("autocites" LaTeX-arg-biblatex-cites) + '("Autocites" LaTeX-arg-biblatex-cites) + ;; Text Commands + '("citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Citeauthor" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Citeauthor*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citetitle" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citetitle*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citeyear" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citeyear*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citedate" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citedate*" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("citeurl" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("parentext" "Text") + '("brackettext" "Text") + ;; Special Commands + '("fullcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("footfullcite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("volcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Volcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Pvolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Pvolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("fvolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("ftolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("svolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Svolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("tvolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Tvolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("avolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("Avolcite" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"]) ()) "Volume" + (TeX-arg-conditional TeX-arg-cite-note-p (["Page"]) ()) TeX-arg-cite) + '("notecite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Notecite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("Pnotecite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + '("fnotecite" (TeX-arg-conditional TeX-arg-cite-note-p + (["Prenote"] ["Postnote"]) ()) TeX-arg-cite) + ;; Low-level Commands + '("citename" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ()) + TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ()) + "Name list") + '("citelist" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ()) + TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ()) + "Literal list") + '("citefield" + (TeX-arg-conditional TeX-arg-cite-note-p (["Prenote"] ["Postnote"]) ()) + TeX-arg-cite (TeX-arg-conditional TeX-arg-cite-note-p (["Format"]) ()) + "Field") + ;; Miscellaneous Commands + "citereset" + "citereset*" + "mancite" + "pno" + "ppno" + "nopp" + "psq" + "psqq" + '("RN" "Integer") + '("Rn" "Integer") + ;; Localization Commands + '("DefineBibliographyStrings" + (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t) + '("DefineBibliographyExtras" + (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t) + '("UndefineBibliographyExtras" + (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t) + '("DefineHyphenationExceptions" + (TeX-arg-eval completing-read "Language: " LaTeX-biblatex-language-list) t) + "NewBibliographyString") + + ;; § 3.8.9 natbib Compatibility Commands + (when (or (LaTeX-provided-package-options-member "biblatex" "natbib") + (LaTeX-provided-package-options-member "biblatex" "natbib=true")) + (let ((cmds '(("citet" . 1) ("citet*" . 1) + ("Citet" . 1) ("Citet*" . 1) + ("citep" . 2) ("citep*" . 2) + ("Citep" . 2) ("Citep*" . 2) + ("citealt" . 1) ("citealt*" . 1) + ("Citealt" . 1) ("Citealt*" . 1) + ("citealp" . 2) ("citealp*" . 2) + ("Citealp" . 2) ("Citealp*" . 2)))) + ;; Taken from natbib.el: + (apply + #'TeX-add-symbols + (mapcar + (lambda (cmd) + (cond + ((= (cdr cmd) 1) + ;; Just one optional argument, the post note + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p (["Postnote"]) nil) + #'TeX-arg-cite)) + ((= (cdr cmd) 2) + ;; Pre and post notes + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p + ([LaTeX-arg-biblatex-natbib-notes]) + nil) + #'TeX-arg-cite)))) + cmds)) + + ;; Fontification for compat macros does not go into `font-latex.el': + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("citet" "*[[{") + ("Citet" "*[[{") + ("citep" "*[[{") + ("Citep" "*[[{") + ("citealt" "*[[{") + ("Citealt" "*[[{") + ("citealp" "*[[{") + ("Citealp" "*[[{")) + 'biblatex)))) + + (LaTeX-add-environments + ;;; Bibliography commands + ;; Bibliography Sections + '("refsection" ["Resources"]) + ;; Bibliography Segments + "refsegment") + + ;; Declaring expert macros and environments. Criterion: all macros and + ;; environments to fine tune the bibliography, probably they will be used + ;; only by expert users. + (TeX-declare-expert-macros + "biblatex" + "ExecuteBibliographyOptions" "printshorthands" "newrefsection" + "endrefsection" "newrefsegment" "endrefsegment" + "DeclareBibliographyCategory" "addtocategory" "defbibenvironment" + "defbibheading" "defbibnote" "defbibfilter" "defbibcheck" "defbibentryset" + "citereset" "citereset*" "mancite" "pno" "ppno" "nopp" "psq" "psqq" "RN" + "Rn" "DefineBibliographyStrings" "DefineBibliographyExtras" + "UndefineBibliographyExtras" "DefineHyphenationExceptions" + "NewBibliographyString") + (LaTeX-declare-expert-environments + "biblatex" + "refsection" "refsegment") + + ;; Tell RefTeX: If package option `natbib' is given, activate that + ;; format, otherwise stick with `biblatex': + (when (and LaTeX-reftex-cite-format-auto-activate + (fboundp 'reftex-set-cite-format)) + (if (or (LaTeX-provided-package-options-member "biblatex" "natbib") + (LaTeX-provided-package-options-member "biblatex" "natbib=true")) + (reftex-set-cite-format 'natbib) + ;; The entry `biblatex' is defined in + ;; `reftex-cite-format-builtin' in reftex-vars.el which will be + ;; part of Emacs >= 25.3. So check here if we find an entry, + ;; otherwise do it manually for older Emacsen. + (if (assoc 'biblatex reftex-cite-format-builtin) + (reftex-set-cite-format 'biblatex) + (reftex-set-cite-format + '((?\C-m . "\\cite[][]{%l}") + (?C . "\\cite*[][]{%l}") + (?t . "\\textcite[][]{%l}") + (?T . "\\textcite*[][]{%l}") + (?p . "\\parencite[][]{%l}") + (?P . "\\parencite*[][]{%l}") + (?f . "\\footcite[][]{%l}") + (?s . "\\smartcite[][]{%l}") + (?u . "\\autocite[][]{%l}") + (?U . "\\autocite*[][]{%l}") + (?a . "\\citeauthor{%l}") + (?A . "\\citeauthor*{%l}") + (?i . "\\citetitle{%l}") + (?I . "\\citetitle*{%l}") + (?y . "\\citeyear{%l}") + (?Y . "\\citeyear*{%l}") + (?n . "\\nocite{%l}"))))))) + TeX-dialect) + +(defvar LaTeX-biblatex-package-options-list + (append + ;;; Preamble Options + LaTeX-biblatex-executebibliographyoptions-options + '(;;; Load-time Options + ("backend" ("biber" "bibtex" "bibtexu" "bibtex8")) + ("style" BibLaTeX-global-style-files) + ("bibstyle" BibLaTeX-global-style-files) + ("citestyle" BibLaTeX-global-style-files) + ("natbib" ("true" "false")) + ("mcite" ("true" "false")) + ;;; Entry Options + ;; Preamble/Type/Entry Options + ("useauthor" ("true" "false")) + ("useeditor" ("true" "false")) + ("usetranslator" ("true" "false")) + ("useprefix" ("true" "false")) + ("indexing" ("true" "false" "cite" "bib")) + ;; Type/Entry Options are not available globally. + ;; Legacy Options (deprecated) + ("openbib"))) + "Package options for the biblatex package.") + +(defun LaTeX-biblatex-package-options nil + "Prompt for package options for the biblatex package." + (unless BibLaTeX-global-style-files + (if (if (eq TeX-arg-input-file-search 'ask) + (not (y-or-n-p "Find BibLaTeX style yourself? ")) + TeX-arg-input-file-search) + ;; ...then, search for BibLaTeX styles. + (progn + (message "Searching for BibLaTeX styles...") + (setq BibLaTeX-global-style-files + (TeX-search-files-by-type 'bbxinputs 'global t t)) + (message "Searching for BibLaTeX styles...done")) + ;; ...else, use for completion only standard BibLaTeX styles (see §3.3 of + ;; Biblatex reference manual). + (setq BibLaTeX-global-style-files + '("numeric" "numeric-comp" "numeric-verb" "alphabetic" + "alphabetic-verb" "authoryear" "authoryear-comp" "authoryear-ibid" + "authoryear-icomp" "authortitle" "authortitle-comp" + "authortitle-ibid" "authortitle-icomp" "authortitle-terse" + "authortitle-tcomp" "authortitle-ticomp" "verbose" "verbose-ibid" + "verbose-note" "verbose-inote" "verbose-trad1" "verbose-trad2" + "verbose-trad3" "reading" "draft" "debug")))) + (TeX-read-key-val t LaTeX-biblatex-package-options-list)) + +;;; biblatex.el ends here diff --git a/elpa/auctex-13.1.3/style/biblatex.elc b/elpa/auctex-13.1.3/style/biblatex.elc Binary files differnew file mode 100644 index 0000000..4b0bb19 --- /dev/null +++ b/elpa/auctex-13.1.3/style/biblatex.elc diff --git a/elpa/auctex-13.1.3/style/bicaption.el b/elpa/auctex-13.1.3/style/bicaption.el new file mode 100644 index 0000000..245b454 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bicaption.el @@ -0,0 +1,206 @@ +;;; bicaption.el --- AUCTeX style for `bicaption.sty' (v1.1-158) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-11-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `bicaption.sty' (v1.1-158) from +;; 2016/03/27. `bicaption.sty' is part of TeXLive. + +;; If things do not work or when in doubt, press `C-c C-n'. Comments +;; for improvement are welcome. + +;;; Code: + +;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-babel-active-languages "babel" ()) +(declare-function LaTeX-polyglossia-active-languages "polyglossia" ()) + +(defvar LaTeX-caption-supported-float-types) +(defvar LaTeX-caption-key-val-options) + +(defvar LaTeX-bicaption-key-val-options + '(("bi-lang" ("first" "second" "both")) + ("bi-singlelinecheck" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("bi-slc" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("bi-swap" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("listtype+")) + "Key=value options for bicaption macros.") + +(defun LaTeX-arg-bicaption-bicaption (optional &optional prompt star cap-box label-inside) + "Query for the arguments of \"\\bicaption\" incl. a label and insert them. +PROMPT replaces the standard one. If STAR is non-nil, then do +not query for a \\label and short captions, insert only captions. +If CAP-BOX is non-nil, also query and include optional arguments +for the box command. If LABEL-INSIDE is non-nil, insert \\label +inside the first mandatory argument, otherwise after all +arguments." + ;; \bicaption [<list entry #1>]{<heading #1>}[<list entry #2>]{<heading #2>} + ;; \bicaptionbox[<list entry #1>]{<heading #1>}[<list entry #2>]{<heading #2>} + ;; [<width>][<inner-pos>]{<contents>} + (let* (;; \bisubcaption needs an environment, "minipage" will be + ;; popular. If so, check next higher environment to find out + ;; where we are + (currenv (if (string= (LaTeX-current-environment) "minipage") + (LaTeX-current-environment 2) + (LaTeX-current-environment))) + (captionI (TeX-read-string + (TeX-argument-prompt + optional (when prompt + (concat "1. " prompt "bicaption")) + "1. bicaption"))) + (short-captionI + (when (and (not star) + (>= (length captionI) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t (when prompt + (concat "Short 1. " prompt "bicaption")) + "Short 1. bicaption")))) + (captionII (TeX-read-string + (TeX-argument-prompt + optional (when prompt + (concat "2. " prompt "bicaption")) + "2. bicaption"))) + (short-captionII + (when (and (not star) + (>= (length captionII) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t (when prompt + (concat "Short 2. " prompt "bicaption")) + "Short 2. bicaption"))))) + (indent-according-to-mode) + ;; Insert short & regular 1. caption + (when (and short-captionI (not (string= short-captionI ""))) + (insert LaTeX-optop short-captionI LaTeX-optcl)) + (insert TeX-grop captionI) + ;; For \bi(sub)?captionbox, the label must be inserted here + (when (and label-inside (not star)) + (LaTeX-label currenv 'environment)) + (insert TeX-grcl) + (when auto-fill-function (LaTeX-fill-paragraph)) + (LaTeX-newline) + (indent-according-to-mode) + ;; Insert short & regular 2. caption + (when (and short-captionII (not (string= short-captionII ""))) + (insert LaTeX-optop short-captionII LaTeX-optcl)) + (insert TeX-grop captionII TeX-grcl) + ;; Insert width & pos in case of captionbox macros: + (when cap-box + (let* ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]") + (TeX-last-optional-rejected nil) + (width (LaTeX-check-insert-macro-default-style + (completing-read (TeX-argument-prompt t nil "Width") + (mapcar (lambda (elt) (concat TeX-esc (car elt))) + (LaTeX-length-list))))) + (TeX-last-optional-rejected (or (not width) + (and width (string= width "")))) + (inpos (LaTeX-check-insert-macro-default-style + (if (and width (not (string-equal width ""))) + (completing-read (TeX-argument-prompt t nil "Inner position") + '("c" "l" "r" "s")) + "")))) + (and width (TeX-argument-insert width t)) + (and inpos (TeX-argument-insert inpos t)))) + (when auto-fill-function (LaTeX-fill-paragraph)) + ;; Insert label -- a new line is inserted only if label is there: + (when (and (not label-inside) (not star) + (save-excursion (LaTeX-label currenv 'environment))) + (LaTeX-newline) + (indent-according-to-mode) + (end-of-line)))) + +(defun LaTeX-arg-bicaption-captionsetup (optional) + "Query for 2 arguments for \"\\captionsetup\" with bicaption.sty loaded. +When OPTIONAL is non-nil, include both as optional arguments in +square brackets." + (let* ((flttype (completing-read (TeX-argument-prompt optional nil "Float type") + LaTeX-caption-supported-float-types)) + (biflt (if (and (not (or (string= flttype "bi") + (string= flttype "bi-first") + (string= flttype "bi-second"))) + flttype (not (string= flttype ""))) + (completing-read (TeX-argument-prompt optional nil "Bicaption type") + '("bi" "bi-first" "bi-second")) + ""))) + (TeX-argument-insert flttype optional) + (TeX-argument-insert biflt optional))) + +(TeX-add-style-hook + "bicaption" + (lambda () + + ;; Load caption.el: + (TeX-run-style-hooks "caption") + + ;; Macros + (TeX-add-symbols + '("bicaption" (LaTeX-arg-bicaption-bicaption)) + '("bicaption*" (LaTeX-arg-bicaption-bicaption nil t)) + '("bicaptionbox" (LaTeX-arg-bicaption-bicaption nil nil t t) t) + '("bicaptionbox*" (LaTeX-arg-bicaption-bicaption nil t t) t) + '("bisubcaption" (LaTeX-arg-bicaption-bicaption "sub-")) + '("bisubcaption*" (LaTeX-arg-bicaption-bicaption "sub-" t)) + '("bisubcaptionbox" (LaTeX-arg-bicaption-bicaption "sub-" nil t t) t) + '("bisubcaptionbox*" (LaTeX-arg-bicaption-bicaption "sub-" t t t) t)) + + ;; \bi(sub)?caption(box)? macros should get their own lines + (LaTeX-paragraph-commands-add-locally '("bicaption" "bicaptionbox" + "bisubcaption" "bisubcaptionbox")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("bicaption" "*[{[{") + ("bicaptionbox" "*[{[{[[") + ("bisubcaption" "*[{[{") + ("bisubcaptionbox" "*[{[{[[")) + 'textual))) + TeX-dialect) + +(defun LaTeX-bicaption-package-options () + "Prompt for package options for the bicaption package." + (TeX-load-style "caption") + (TeX-read-key-val t + (append + `(,(list "language" + (cond ((and (member "babel" (TeX-style-list)) + (LaTeX-babel-active-languages)) + (butlast (LaTeX-babel-active-languages))) + ((and (member "polyglossia" (TeX-style-list)) + (LaTeX-polyglossia-active-languages)) + (butlast (LaTeX-babel-active-languages))) + (t nil)))) + LaTeX-bicaption-key-val-options + LaTeX-caption-key-val-options))) + +;;; bicaption.el ends here diff --git a/elpa/auctex-13.1.3/style/bicaption.elc b/elpa/auctex-13.1.3/style/bicaption.elc Binary files differnew file mode 100644 index 0000000..5a1f665 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bicaption.elc diff --git a/elpa/auctex-13.1.3/style/bidi.el b/elpa/auctex-13.1.3/style/bidi.el new file mode 100644 index 0000000..1b17d60 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bidi.el @@ -0,0 +1,196 @@ +;;; bidi.el --- AUCTeX style for the (XeLaTeX) bidi package -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2021 Free Software Foundation, Inc. + +;; Author: Uwe Brauer <oub@mat.ucm.es> +;; Created: 2016-03-06 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the bidi package version 31.7 + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-bidi-package-options + '("RTLdocument" "rldocument" "extrafootnotefeatures") + "Package options for the bidi package.") + +(defun LaTeX-env-bidi-bib (environment) + "Insert bidi-ENVIRONMENT and a bibitem." + (LaTeX-insert-environment environment) + (end-of-line 0) + (delete-char 1) + (delete-horizontal-space) + (LaTeX-insert-item)) + +(TeX-add-style-hook + "bidi" + (lambda () + + ;; bidi.sty requires xelatex, so set the engine + (TeX-check-engine-add-engines 'xetex) + + ;; 1.4 Turning TeX--XeT features on and off + (TeX-add-symbols + '("TeXXeTOn" 0) + '("TeXXeTOff" 0)) + + ;; 1.5 Options of The Package: These macros rely on package option + ;; "extrafootnotefeatures". So check for it first + (when (LaTeX-provided-package-options-member "bidi" "extrafootnotefeatures") + (TeX-add-symbols + '("normalfootnotes" 0) + '("twocolumnfootnotes" 0) + '("threecolumnfootnotes" 0) + '("fourcolumnfootnotes" 0) + '("fivecolumnfootnotes" 0) + '("sixcolumnfootnotes" 0) + '("sevencolumnfootnotes" 0) + '("eightcolumnfootnotes" 0) + '("ninecolumnfootnotes" 0) + '("tencolumnfootnotes" 0) + '("RTLcolumnfootnotes" 0) + '("LTRcolumnfootnotes" 0) + '("paragraphfootnotes" 0) + '("setLTRparagraphfootnotes" 0) + '("setRTLparagraphfootnotes" 0))) + + (TeX-add-symbols + ;; 1.6 Paragraph Switching Commands + '("setLTR" 0) + '("setRTL" 0) + '("setLR" 0) + '("setRL" 0) + '("unsetRL" 0) + '("unsetRTL" 0) + '("unsetLTR" 0) + + ;; 1.8 Typesetting Short LTR and RTL Texts + '("LR" 1) + '("LRE" 1) + '("RLE" 1) + '("RL" 1) + + ;; 1.9 Footnotes + '("LTRfootnote" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("RTLfootnote" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("setfootnoteRL" 0) + '("setfootnoteLR" 0) + '("unsetfootnoteRL" 0) + '("LTRthanks" 1) + '("RTLthanks" 1) + '("LTRfootnotetext" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("RTLfootnotetext" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + + ;; 1.9.1 Footnote Rule + '("autofootnoterule" 0) + '("rightfootnoterule" 0) + '("leftfootnoterule" 0) + '("LRfootnoterule" 0) + '("textwidthfootnoterule" 0) + '("SplitFootnoteRule" 0) + '("debugfootnotedirection" 0) + + ;; 1.10 Two Column Typesetting + '("RTLdblcol" 0) + '("LTRdblcol" 0) + + ;; 1.11 RTL cases + '("RTLcases" t) + + ;; 1.12 Typesetting Logos + '("XeTeX" 0) + '("XeLaTeX" 0) + + ;; 1.13 Separation Mark + '("SepMark" "Mark") + + ;; 1.20 \setLTRbibitems, \setRTLbibitems, and \setdefaultbibitems + ;; commands + '("setLTRbibitems" 0) + '("setRTLbibitems" 0) + '("setdefaultbibitems" 0) + + ;; 1.21 Typesetting margin par + '("setRTLmarginpar" 0) + '("setLTRmarginpar" 0) + '("setdefaultmarginpar" 0) + '("LTRmarginpar" [ "Left margin text" ] "Text") + '("RTLmarginpar" [ "Left margin text" ] "Text")) + + (LaTeX-add-environments + ;; 1.7 Pargraph Switching Environments + "LTR" + "RTL" + + ;; 1.18 LTRitems and RTLitems Environments + '("RTLitems" LaTeX-env-item) + '("LTRitems" LaTeX-env-item) + + ;; 1.19 LTRbibitems and RTLbibitems Environments + '("LTRbibitems" LaTeX-env-bidi-bib) + '("RTLbibitems" LaTeX-env-bidi-bib)) + + ;; Append "LTRbibitems" & "RTLbibitems" to `LaTeX-item-list': + (make-local-variable 'LaTeX-item-list) + (dolist (env '("LTRbibitems" "RTLbibitems")) + (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-bib) t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("LR" "{") + ("LRE" "{") + ("RLE" "{") + ("RL" "{") + ("LTRthanks" "{") + ("RTLthanks" "{")) + 'textual) + (font-latex-add-keywords '(("LTRfootnote" "[{") + ("RTLfootnote" "[{") + ("LTRfootnotetext" "[{") + ("RTLfootnotetext" "[{") + ("LTRmarginpar" "[{") + ("RTLmarginpar" "[{")) + 'reference) + (font-latex-add-keywords '(("XeTeX" "") + ("XeLaTeX" "") + ("SepMark" "{")) + 'function))) + TeX-dialect) + +;;; bidi.el ends here diff --git a/elpa/auctex-13.1.3/style/bidi.elc b/elpa/auctex-13.1.3/style/bidi.elc Binary files differnew file mode 100644 index 0000000..36c3eb1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bidi.elc diff --git a/elpa/auctex-13.1.3/style/bidibeamer.el b/elpa/auctex-13.1.3/style/bidibeamer.el new file mode 100644 index 0000000..f6d2e3a --- /dev/null +++ b/elpa/auctex-13.1.3/style/bidibeamer.el @@ -0,0 +1,42 @@ +;;; bidibeamer.el --- AUCTeX style for the bidibeamer class -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2020 Free Software Foundation + +;; Author: Tassilo Horn <tsdh@gnu.org> +;; Created: 2015-03-08 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the bidibeamer class which offers the same +;; functionality and interface as latex-beamer, so we simply call the style +;; hook of the latter. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "bidibeamer" + (lambda () + (TeX-run-style-hooks "beamer")) + TeX-dialect) + +;;; bidibeamer.el ends here diff --git a/elpa/auctex-13.1.3/style/bidibeamer.elc b/elpa/auctex-13.1.3/style/bidibeamer.elc Binary files differnew file mode 100644 index 0000000..9b703c4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bidibeamer.elc diff --git a/elpa/auctex-13.1.3/style/bigdelim.el b/elpa/auctex-13.1.3/style/bigdelim.el new file mode 100644 index 0000000..cb54da7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bigdelim.el @@ -0,0 +1,101 @@ +;;; bigdelim.el --- AUCTeX style for `bigdelim.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011--2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2011-01-24 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `bigdelim.sty', v2.6 from 2021/01/02. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun TeX-arg-bigdelim-brace (optional side &optional prompt) + "Prompt for a single brace, and do not insert the matching one. +If OPTIONAL is non-nil, include the argument only if not empty. +SIDE is one of the symbols `left' or `right'. PROMPT replaces the +standard one." + (let* ((brace (completing-read + (TeX-argument-prompt optional prompt "Brace") + (if (eq side 'left) + '("(" "[" "{" "\\langle" "|" "\\|" "\\lceil" "\\lfloor") + '(")" "]" "}" "\\rangle" "|" "\\|" "\\rceil" "\\rfloor")))) + (TeX-arg-opening-brace (if (member (substring brace 0 1) + `("{" "}" ,TeX-esc)) + "" + TeX-grop)) + (TeX-arg-closing-brace (if (string= TeX-arg-opening-brace TeX-grop) + TeX-grcl + ""))) + (TeX-argument-insert brace optional (when (member brace '("{" "}")) + TeX-esc)))) + +(TeX-add-style-hook + "bigdelim" + (lambda () + + (TeX-run-style-hooks "multirow") + + (TeX-add-symbols + '("ldelim" + (TeX-arg-bigdelim-brace left) + "Number of rows for multirow" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Width in multirow") + (append + '("*") + (mapcar (lambda (x) + (concat TeX-esc (car x))) + (LaTeX-length-list)))) + [ "Text in multirow" ]) + '("rdelim" + (TeX-arg-bigdelim-brace right) + "Number of rows for multirow" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Width in multirow") + (append + '("*") + (mapcar (lambda (x) + (concat TeX-esc (car x))) + (LaTeX-length-list)))) + [ "Text in multirow" ])) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("ldelim" "|{\\{{[") + ("rdelim" "|{\\{{[")) + 'function))) + TeX-dialect) + +(defvar LaTeX-bigdelim-package-options nil + "Package options for the bigdelim package.") + +;;; bigdelim.el ends here diff --git a/elpa/auctex-13.1.3/style/bigdelim.elc b/elpa/auctex-13.1.3/style/bigdelim.elc Binary files differnew file mode 100644 index 0000000..80d2509 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bigdelim.elc diff --git a/elpa/auctex-13.1.3/style/bigstrut.el b/elpa/auctex-13.1.3/style/bigstrut.el new file mode 100644 index 0000000..8324da3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bigstrut.el @@ -0,0 +1,68 @@ +;;; bigstrut.el --- AUCTeX style for `bigstrut.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2014--2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `bigstrut.sty', v2.6 from 2021/01/02. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "bigstrut" + (lambda () + (TeX-add-symbols + '("bigstrut" [ TeX-arg-bigstrut ])) + + (LaTeX-add-lengths "bigstrutjot") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("bigstrut" "[")) + 'function))) + TeX-dialect) + +(defun TeX-arg-bigstrut (optional &optional prompt) + "Prompt for the optional argument in \\bigstrut. +If OPTIONAL is non-nil, insert the argument in brackets. PROMPT +replaces the standard one." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt + optional prompt "Strut to top (t) or bottom (b)") + '("t" "b")) + optional)) + +(defvar LaTeX-bigstrut-package-options nil + "Package options for the bigstrut package.") + +;;; bigstrut.el ends here diff --git a/elpa/auctex-13.1.3/style/bigstrut.elc b/elpa/auctex-13.1.3/style/bigstrut.elc Binary files differnew file mode 100644 index 0000000..41ddb59 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bigstrut.elc diff --git a/elpa/auctex-13.1.3/style/bm.el b/elpa/auctex-13.1.3/style/bm.el new file mode 100644 index 0000000..7b9cd11 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bm.el @@ -0,0 +1,62 @@ +;;; bm.el --- AUCTeX style for `bm.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `bm.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook "bm" + (lambda () + (TeX-add-symbols + '("bm" 1) + '("hm" 1) + '("DeclareBoldMathCommand" [ "Math version" ] TeX-arg-define-macro "Math expression") + '("bmdefine" TeX-arg-define-macro "Math expression") + '("hmdefine" TeX-arg-define-macro "Math expression")) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("bm" "{") + ("hm" "{")) + 'bold-command) + (font-latex-add-keywords '(("DeclareBoldMathCommand" "[|{\\{") + ("bmdefine" "|{\\{") + ("hmdefine" "|{\\{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-bm-package-options nil + "Package options for the bm package.") + +;; bm.el ends here diff --git a/elpa/auctex-13.1.3/style/bm.elc b/elpa/auctex-13.1.3/style/bm.elc Binary files differnew file mode 100644 index 0000000..92cfc41 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bm.elc diff --git a/elpa/auctex-13.1.3/style/book.el b/elpa/auctex-13.1.3/style/book.el new file mode 100644 index 0000000..4a23d25 --- /dev/null +++ b/elpa/auctex-13.1.3/style/book.el @@ -0,0 +1,24 @@ +;;; book.el - Special code for book style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-book-class-options + '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final" + "titlepage" "notitlepage" "openright" "openany" "onecolumn" "twocolumn" + "leqno" "fleqn" "openbib") + "Package options for the book class.") + +(TeX-add-style-hook + "book" + (lambda () + (LaTeX-largest-level-set "part") + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings")) + TeX-dialect) + +;;; book.el ends here diff --git a/elpa/auctex-13.1.3/style/book.elc b/elpa/auctex-13.1.3/style/book.elc Binary files differnew file mode 100644 index 0000000..011a385 --- /dev/null +++ b/elpa/auctex-13.1.3/style/book.elc diff --git a/elpa/auctex-13.1.3/style/booktabs.el b/elpa/auctex-13.1.3/style/booktabs.el new file mode 100644 index 0000000..79571ea --- /dev/null +++ b/elpa/auctex-13.1.3/style/booktabs.el @@ -0,0 +1,86 @@ +;;; booktabs.el -- AUCTeX style for booktabs.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2003, 2004, 2013, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2003-10-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `booktabs.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-booktabs-arg-paren (optional prompt) + "Prompt for a value and use parentheses when it is inserted. +If OPTIONAL is non-nil the parameter is labeled as optional. +PROMPT is the value of the prompt to be shown." + (let ((TeX-arg-opening-brace "(") + (TeX-arg-closing-brace ")")) + (TeX-parse-argument optional prompt))) + +(TeX-add-style-hook + "booktabs" + (lambda () + ;; Do not append an empty group to toprule, midrule, and bottomrule macros, + ;; otherwise one gets a wrong spacing in the table. + (setq TeX-insert-braces-alist (append TeX-insert-braces-alist + '(("toprule" . nil) + ("midrule" . nil) + ("bottomrule" . nil)))) + ;; New symbols + (TeX-add-symbols + '("toprule" [ "Thickness" ]) + '("midrule" [ "Thickness" ]) + '("bottomrule" [ "Thickness" ]) + ;; The `ignore' resets `TeX-last-optional-rejected' to nil so that the trim + ;; argument is prompted also when the thickness is skipped. + '("cmidrule" [ "Thickness" ] (ignore) [ LaTeX-booktabs-arg-paren "Trim" ] + "Column(s)") + '("addlinespace" [ "Height" ]) + '("morecmidrules") + '("specialrule" "Thickness" "Space above" "Space below")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("toprule" "[") + ("midrule" "[") + ("bottomrule" "[") + ("cmidrule" "[({") + ("addlinespace" "[") + ("morecmidrules" "") + ("specialrule" "{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-booktabs-package-options nil + "Package options for the booktabs package.") + +;;; booktabs.el ends here diff --git a/elpa/auctex-13.1.3/style/booktabs.elc b/elpa/auctex-13.1.3/style/booktabs.elc Binary files differnew file mode 100644 index 0000000..84a75c9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/booktabs.elc diff --git a/elpa/auctex-13.1.3/style/brazil.el b/elpa/auctex-13.1.3/style/brazil.el new file mode 100644 index 0000000..353e771 --- /dev/null +++ b/elpa/auctex-13.1.3/style/brazil.el @@ -0,0 +1,37 @@ +;;; brazil.el --- Setup AUCTeX for editing Brazilian text. -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "brazil" + (lambda () + (TeX-run-style-hooks "brazilian")) + TeX-dialect) + +;;; brazil.el ends here diff --git a/elpa/auctex-13.1.3/style/brazil.elc b/elpa/auctex-13.1.3/style/brazil.elc Binary files differnew file mode 100644 index 0000000..74d94bd --- /dev/null +++ b/elpa/auctex-13.1.3/style/brazil.elc diff --git a/elpa/auctex-13.1.3/style/brazilian.el b/elpa/auctex-13.1.3/style/brazilian.el new file mode 100644 index 0000000..c1ae802 --- /dev/null +++ b/elpa/auctex-13.1.3/style/brazilian.el @@ -0,0 +1,77 @@ +;;; brazilian.el --- Setup AUCTeX for editing Brazilian text. -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Cater for some specialities of Brazilian and Portuguese languages +;; provided by babel package, e.g. special quote and hyphen strings or +;; `"' which is an active character. + +;; Thanks to Gustavo Barros <gusbrs.2016@gmail.com> for requesting +;; this feature and reviewing the code. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(defvar LaTeX-brazilian-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `brazilian' language.") + +(modify-syntax-entry ?\" "w" LaTeX-brazilian-mode-syntax-table) + +(TeX-add-style-hook + "brazilian" + (lambda () + (set-syntax-table LaTeX-brazilian-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language nil)) + (setq LaTeX-babel-hyphen-language "brazilian") + (TeX-add-symbols + "ord" + "ro" + "orda" + "ra") + ;; Fontification + (when (and (eq TeX-install-font-lock 'font-latex-setup) + (featurep 'font-latex)) + (font-latex-add-quotes '("\"<" "\">" french)) + ;; Prevent "| from leading to color bleed. + (font-latex-add-to-syntax-alist (list (cons ?\" "\\")))) + (run-hooks 'TeX-language-pt-br-hook)) + TeX-dialect) + +;;; brazilian.el ends here diff --git a/elpa/auctex-13.1.3/style/brazilian.elc b/elpa/auctex-13.1.3/style/brazilian.elc Binary files differnew file mode 100644 index 0000000..9112924 --- /dev/null +++ b/elpa/auctex-13.1.3/style/brazilian.elc diff --git a/elpa/auctex-13.1.3/style/breqn.el b/elpa/auctex-13.1.3/style/breqn.el new file mode 100644 index 0000000..0352055 --- /dev/null +++ b/elpa/auctex-13.1.3/style/breqn.el @@ -0,0 +1,141 @@ +;;; breqn.el --- AUCTeX style for `breqn.sty' (v0.98j) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017--2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-01-06 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `breqn.sty' (v0.98j) from 2020/04/19. +;; `breqn.sty' is part of TeXLive. + +;; In breqn documentation, there is the following statement: +;; +;; 9 Various environment options +;; +;; Use of the normal \label command instead of the label option +;; works, I think, most of the time (untested). +;; +;; To be on the safe side, a label should be written in the optional +;; argument of an environment as value to the `label' key, e.g.: +;; +;; \begin{dmath}[label={eq:42}] +;; ... +;; \end{dmath} +;; +;; This style achieves this requirement by using the function +;; `LaTeX-env-label-as-keyval'. + +;;; Code: + +(require 'latex) + +(defvar LaTeX-breqn-key-val-options + '(("style" ("\\tiny" "\\scriptsize" "\\footnotesize" "\\small" + "\\normalsize" "\\large" "\\Large" "\\LARGE" + "\\huge" "\\Huge")) + ("number") + ("indentstep") + ("compact") + ("spread") + ("frame") + ("framesep") + ("breakdepth")) + "Key=value options for breqn environments. +The keys \"label\" and \"labelprefix\" are omitted.") + +(defvar LaTeX-breqn-key-val-label-regexp + `(,(concat + "\\\\begin{" + (regexp-opt '("dmath" "dseries" "dgroup" "darray")) + "}" + (LaTeX-extract-key-value-label)) + 1 LaTeX-auto-label) + "Matches the label inside an optional argument after \\begin{<breqn-env's>}.") + +(defun LaTeX-breqn-env (env) + "Insert ENV from breqn package incl. optional key=val argument. +Keys offered for key=val query depend on ENV. \"label\" and +\"labelprefix\" are omitted." + (let ((keyvals + (TeX-read-key-val t + (cond ((or (string= env "dgroup") + (string= env "dgroup*")) + (append '(("noalign") ("brace")) + LaTeX-breqn-key-val-options)) + ((or (string= env "darray") + (string= env "darray*")) + (append '(("noalign") ("brace") ("cols" ("{}"))) + LaTeX-breqn-key-val-options)) + (t LaTeX-breqn-key-val-options))))) + (LaTeX-insert-environment env (when (and keyvals + (not (string= keyvals ""))) + (concat LaTeX-optop keyvals LaTeX-optcl))) + (LaTeX-env-label-as-keyval nil nil keyvals env))) + +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "breqn" + (lambda () + + ;; Add breqn to parser: + (TeX-auto-add-regexp LaTeX-breqn-key-val-label-regexp) + + ;; Tell AUCTeX that we want to prefix the labels with `LaTeX-equation-label': + (let ((envs '("dmath" "dseries" "dgroup" "darray"))) + (dolist (env envs) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-equation-label) t))) + + ;; For RefTeX, we must distinguish between equation and eqnarray-like: + ;; breqn env == equivalent -- starred + ;; dmath == equation -- dmath* == unnumbered + ;; dseries == equation -- dseries* == unnumbered + ;; dgroup == align -- dgroup* == unnumbered + ;; darray == eqnarray -- darray* == unnumbered + (when (fboundp 'reftex-add-label-environments) + (dolist (env '("dmath" "dseries" "dgroup")) + (reftex-add-label-environments `((,env ?e nil nil t)))) + (reftex-add-label-environments '(("darray" ?e nil nil eqnarray-like)))) + + (LaTeX-add-environments + '("dmath" LaTeX-breqn-env) + '("dmath*" LaTeX-breqn-env) + '("dseries" LaTeX-breqn-env) + '("dseries*" LaTeX-breqn-env) + '("dgroup" LaTeX-breqn-env) + '("dgroup*" LaTeX-breqn-env) + '("darray" LaTeX-breqn-env) + '("darray*" LaTeX-breqn-env) + '("dsuspend")) + + (TeX-add-symbols + '("condition" [ "Punctuation mark (default ,)" ] t) + '("condition*" [ "Punctuation mark (default ,)" ] t) + '("hiderel" t))) + TeX-dialect) + +(defvar LaTeX-breqn-package-options nil + "Package options for the breqn package.") + +;;; breqn.el ends here diff --git a/elpa/auctex-13.1.3/style/breqn.elc b/elpa/auctex-13.1.3/style/breqn.elc Binary files differnew file mode 100644 index 0000000..3ce5fbb --- /dev/null +++ b/elpa/auctex-13.1.3/style/breqn.elc diff --git a/elpa/auctex-13.1.3/style/bulgarian.el b/elpa/auctex-13.1.3/style/bulgarian.el new file mode 100644 index 0000000..d571a5f --- /dev/null +++ b/elpa/auctex-13.1.3/style/bulgarian.el @@ -0,0 +1,63 @@ +;;; bulgarian.el --- AUCTeX style for the `bulgarian' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2008, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2008-06-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Bulgarian text in connection with the +;; `bulgarian' babel option. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(defvar LaTeX-bulgarian-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `bulgarian.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-bulgarian-mode-syntax-table) + +(TeX-add-style-hook + "bulgarian" + (lambda () + (set-syntax-table LaTeX-bulgarian-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("bulgarian" "\"`" "\"'" ,TeX-quote-after-quote))) + (setq LaTeX-babel-hyphen-language "bulgarian") + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-bg-hook)) + TeX-dialect) + +;;; bulgarian.el ends here diff --git a/elpa/auctex-13.1.3/style/bulgarian.elc b/elpa/auctex-13.1.3/style/bulgarian.elc Binary files differnew file mode 100644 index 0000000..3203318 --- /dev/null +++ b/elpa/auctex-13.1.3/style/bulgarian.elc diff --git a/elpa/auctex-13.1.3/style/canadian.el b/elpa/auctex-13.1.3/style/canadian.el new file mode 100644 index 0000000..9066fc2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/canadian.el @@ -0,0 +1,42 @@ +;;; canadian.el --- AUCTeX style for the `canadian' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-07-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Canadian text in connection with the +;; `canadian' babel option. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "canadian" + (lambda () + (TeX-run-style-hooks "english")) + TeX-dialect) + +;;; canadian.el ends here diff --git a/elpa/auctex-13.1.3/style/canadian.elc b/elpa/auctex-13.1.3/style/canadian.elc Binary files differnew file mode 100644 index 0000000..6f7d6db --- /dev/null +++ b/elpa/auctex-13.1.3/style/canadian.elc diff --git a/elpa/auctex-13.1.3/style/cancel.el b/elpa/auctex-13.1.3/style/cancel.el new file mode 100644 index 0000000..765fe68 --- /dev/null +++ b/elpa/auctex-13.1.3/style/cancel.el @@ -0,0 +1,63 @@ +;;; cancel.el --- AUCTeX style for `cancel.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-11-24 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `cancel.sty' v2.2 form 2013-04-12. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "cancel" + (lambda () + (TeX-add-symbols + '("cancel" "Expression") + '("bcancel" "Expression") + '("xcancel" "Expression") + '("cancelto" "Value" "Expression") + "CancelColor") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cancel" "|{\\") + ("bcancel" "|{\\") + ("xcancel" "|{\\")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-cancel-package-options + '("thicklines" "samesize" "smaller" "Smaller") + "Package options for the cancel package.") + +;;; cancel.el ends here diff --git a/elpa/auctex-13.1.3/style/cancel.elc b/elpa/auctex-13.1.3/style/cancel.elc Binary files differnew file mode 100644 index 0000000..33e0dd9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/cancel.elc diff --git a/elpa/auctex-13.1.3/style/captcont.el b/elpa/auctex-13.1.3/style/captcont.el new file mode 100644 index 0000000..5bf1ba1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/captcont.el @@ -0,0 +1,54 @@ +;; captcont.el --- AUCTeX style file for captcont.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2003, 2005, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Reiner Steib <Reiner.Steib@gmx.de> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; AUCTeX style file for captcont.sty + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "captcont" + (lambda () + (TeX-add-symbols + '("captcont" [ "list entry" ] "Caption") + '("captcont*" [ "list entry" ] "Caption")) + ;; Fontification + (when (featurep 'font-latex) + (font-latex-add-keywords '(("captcont" "*[{")) 'textual))) + TeX-dialect) + +(defvar LaTeX-captcont-package-options '("figbotcap" "figtopcap" "tabbotcap" + "tabtopcap") + "Package options for the captcont package.") + +;;; captcont.el ends here diff --git a/elpa/auctex-13.1.3/style/captcont.elc b/elpa/auctex-13.1.3/style/captcont.elc Binary files differnew file mode 100644 index 0000000..144f812 --- /dev/null +++ b/elpa/auctex-13.1.3/style/captcont.elc diff --git a/elpa/auctex-13.1.3/style/caption.el b/elpa/auctex-13.1.3/style/caption.el new file mode 100644 index 0000000..134157a --- /dev/null +++ b/elpa/auctex-13.1.3/style/caption.el @@ -0,0 +1,491 @@ +;;; caption.el --- AUCTeX style for `caption.sty' (v3.4a) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-02-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `caption.sty' (v3.4a) from 2019/10/18. +;; `caption.sty' is part of TeXLive. + +;; If things do not work or when in doubt, press `C-c C-n'. Comments +;; for improvement are welcome. + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) + +;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'latex) + +;; Needed for auto-parsing: +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-babel-active-languages "babel" ()) +(declare-function LaTeX-polyglossia-active-languages "polyglossia" ()) +(declare-function LaTeX-newfloat-DeclareFloatingEnvironment-list + "newfloat" ()) + +(defvar LaTeX-bicaption-key-val-options) +(defvar LaTeX-subcaption-key-val-options) + +(defvar LaTeX-caption-key-val-options + '(("aboveskip") + ("belowskip") + ("font" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("font+" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("format" ("plain" "hang")) + ("hangindent") + ("hypcap" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("hypcapspace") + ("indention") + ("justification" ("justified" "centering" "centerlast" "centerfirst" + "raggedright" "RaggedRight" "raggedleft")) + ("labelfont" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("labelfont+" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("labelformat" ("default" "empty" "simple" "brace" "parens" + "autodot" "unnumbered")) + ("labelsep" ("none" "colon" "period" "space" "quad" "newline" "endash")) + ("list" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("listformat" ("empty" "simple" "paren" "subsimple" "subparens")) + ("margin") + ("margin*") + ("maxmargin") + ("minmargin") + ("name") + ("oneside") + ("parindent") + ("parskip") + ("position" ("top" "above" "bottom" "below" "auto")) + ("singlelinecheck" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("slc" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("skip") + ("strut" ("false" "no" "off" "0" "true" "yes" "on" "1")) + ("style" ("base" "default")) + ("textfont" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("textfont+" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" "rm" + "sf" "tt" "singlespacing" "onehalfspacing" "doublespacing" + "stretch" "normalcolor" "color" "normal")) + ("textformat" ("empty" "simple" "period")) + ("twoside") + ("type" ("figure" "table")) + ("type*" ("figure" "table")) + ("width")) + "Key=value options for caption macros.") + +(defun LaTeX-caption-key-val-options () + "Return an updated list of key=vals from caption package. +The key=val list will also contain elements from subcaption +package if loaded." + ;; Update the style list once so we don't run this function more + ;; than once: + (TeX-style-list) + (append + ;; Check if `subcaption.el' is loaded: + (when (member "subcaption" TeX-active-styles) + ;; If loaded, update also the entry for `subrefformat' when + ;; processing the `labelformat'. `subrefformat' keys takes the + ;; same values as `labelformat'. We have to check if we have an + ;; entry for `\DeclareCaptionLabelFormat', otherwise there is no + ;; need to run this procedure: + (if (and (LaTeX-caption-DeclareCaption-list) + (string-match + "\\\\DeclareCaptionLabelFormat" + (mapconcat #'identity + (mapcar #'car + (LaTeX-caption-DeclareCaption-list)) + "|"))) + (progn + (let (result) + (dolist (keyvals (LaTeX-caption-DeclareCaption-list) result) + (when (string-equal (nth 1 keyvals) "LabelFormat") + (let* ((key "subrefformat") + (val (nth 2 keyvals)) + (vals-predefined + (cadr (assoc key + LaTeX-subcaption-key-val-options))) + (vals-parsed + (cadr (assoc key result)))) + (cl-pushnew (list key (TeX-delete-duplicate-strings + (append vals-predefined + vals-parsed + (list val)))) + result :test #'equal)))))) + LaTeX-subcaption-key-val-options)) + ;; Check if `bicaption.el' is loaded: + (when (member "bicaption" TeX-active-styles) + (append + (cond ((and (member "babel" TeX-active-styles) + (LaTeX-babel-active-languages)) + `(,(list "language" + (butlast (LaTeX-babel-active-languages))))) + ((and (member "polyglossia" TeX-active-styles) + (LaTeX-polyglossia-active-languages)) + `(,(list "language" + (butlast (LaTeX-polyglossia-active-languages))))) + (t nil)) + LaTeX-bicaption-key-val-options)) + ;; Support for environments defined with `newfloat.sty': These + ;; environments are added to `type' and `type*' keys: + (when (and (member "newfloat" TeX-active-styles) + (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (let (result) + (dolist (key '("type" "type*") result) + (let ((val (mapcar #'car + (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + (vals-predefined + (cadr (assoc key LaTeX-caption-key-val-options)))) + (cl-pushnew (list key (TeX-delete-duplicate-strings + (append vals-predefined + val))) + result :test #'equal))))) + ;; Update to standard key-vals from `caption.el': + (when (LaTeX-caption-DeclareCaption-list) + (let (result) + (dolist (keyvals (LaTeX-caption-DeclareCaption-list) result) + (let* ((key (if (string-equal (nth 1 keyvals) "LabelSeparator") + (downcase (substring (nth 1 keyvals) 0 8)) + (downcase (nth 1 keyvals)))) + (val (nth 2 keyvals)) + (vals-predefined + (cadr (assoc key LaTeX-caption-key-val-options))) + (vals-parsed (cadr (assoc key result)))) + ;; For `\DeclareCaptionOption', only add the value + ;; (remember: key=^^^^^^, val="defined key") + (if (string-equal key "option") + (cl-pushnew (list val) result :test #'equal) + (cl-pushnew (list key (TeX-delete-duplicate-strings + (append vals-predefined + vals-parsed + (list val)))) + result :test #'equal)))))) + LaTeX-caption-key-val-options)) + +(defvar LaTeX-caption-supported-float-types + '("figure" "table" "ContinuedFloat" ; Standard caption.sty + "sub" "subtable" "subfigure" ; subcaption.sty + "bi" "bi-first" "bi-second" ; bicaption.sty + "ruled" "boxed" ; float.sty + "floatingfigure" "floatingtable" ; floatflt.sty + "lstlisting" ; listings.sty + "longtable" ; longtable.sty + "figwindow" "tabwindow" ; picinpar.sty + "parpic" ; picins.sty + "SCfigure" "SCtable" ; sidecap.sty + "supertabular" "xtabular" ; supertabular.sty & xtab.sty + "threeparttable" "measuredfigure" ; threeparttable.sty + "wrapfigure" "wraptable") ; wrapfigure.sty + "List of float types supported by `caption.sty'. +These types are provided by other LaTeX packages.") + +;; Setup for various \DeclareCaption's: +(TeX-auto-add-type "caption-DeclareCaption" "LaTeX") + +;; The 2. argument to `DeclareCaption[A-Za-z]' contains (La)TeX code. +;; We deliberately ignore that argument in our regex since it is not +;; needed for this style and would pollute the auto generated +;; `docname.el' file. +(defvar LaTeX-caption-DeclareCaption-regexp + `(,(concat "\\\\DeclareCaption\\(Font\\|Format\\|Justification" + "\\|LabelFormat\\|LabelSeparator\\|ListFormat" + "\\|Option\\|Style\\|TextFormat\\)" + "\\*?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + (0 1 2) LaTeX-auto-caption-DeclareCaption) + "Matches the arguments of different `\\DeclareCaption*' from `caption.sty'.") + +(defun LaTeX-caption-auto-prepare () + "Clear `LaTeX-auto-caption-DeclareCaption' before parsing." + (setq LaTeX-auto-caption-DeclareCaption nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-caption-auto-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +;; In `LaTeX-caption-DeclareCaption-regexp', we match (0 1 2). When +;; adding a new `Name', we need something unique for `0'-match until +;; the next `C-c C-n'. We mimic that regex-match bei concat'ing the +;; elements. It will vanish upon next `C-c C-n'. +(defun LaTeX-arg-caption-DeclareCaption (optional format) + "Insert various `\\DeclareCaptionFORMAT' commands. +If OPTIONAL, insert argument in square brackets. FORMAT is the +suffix of the LaTeX macro." + (let ((name (TeX-read-string "Name: "))) + (LaTeX-add-caption-DeclareCaptions + (list (concat "\\DeclareCaption" format "{" name "}") + format name)) + (TeX-argument-insert name optional))) + +;; Support for an undocumented feature of caption.sty: +;; `\captionbox' sets the width of the caption equal to the width of +;; the contents (a feature provided e.g. by `threeparttable.sty'). +;; The starred version typesets the caption without label and without +;; entry to the list of figures or tables. + +;; The first mandatory argument {<heading>} contains the caption text +;; and the label. We used to use `TeX-insert-macro' to do the job +;; (Thanks to M. Giordano for his valuable comments on this!), but now +;; moved to `LaTeX-label'. + +;; Syntax: +;; \captionbox[<list entry>]{<heading>}[<width>][<inner-pos>]{<contents>} +;; \captionbox*{<heading>}[<width>][<inner-pos>]{<contents>} + +(defun LaTeX-arg-caption-captionbox (optional &optional star) + "Query for the arguments of \"\\captionbox\" incl. a label and insert them. +If OPTIONAL is non-nil, indicate it while reading the caption. +If STAR is non-nil, then do not query for a \\label and a short +caption, insert only a caption." + (let* ((currenv (LaTeX-current-environment)) + (caption (TeX-read-string + (TeX-argument-prompt optional nil "Caption"))) + (short-caption + (when (and (not star) + (>= (length caption) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t nil "Short caption"))))) + (indent-according-to-mode) + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption) + (unless star (LaTeX-label currenv 'environment)) + (insert TeX-grcl)) + (let* ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]") + (TeX-last-optional-rejected nil) + (width (LaTeX-check-insert-macro-default-style + (completing-read (TeX-argument-prompt t nil "Width") + (mapcar (lambda (elt) (concat TeX-esc (car elt))) + (LaTeX-length-list))))) + (TeX-last-optional-rejected (or (not width) + (and width (string= width "")))) + (inpos (LaTeX-check-insert-macro-default-style + (if (and width (not (string-equal width ""))) + (completing-read (TeX-argument-prompt t nil "Inner position") + '("c" "l" "r" "s")) + "")))) + (and width (TeX-argument-insert width t)) + (and inpos (TeX-argument-insert inpos t))) + ;; Fill the paragraph before inserting {}. We can use + ;; `LaTeX-fill-paragraph' without messing up the code since + ;; \caption starts a new paragraph with AUCTeX + ;; (cf. `paragraph-start'). + (when auto-fill-function (LaTeX-fill-paragraph))) + +(defun LaTeX-arg-caption-captionof (optional &optional star) + "Query for the arguments of \"\\captionof\" macro and insert them. +If OPTIONAL is non-nil, insert the arguments in brackets. If +STAR is non-nil, do not query for a short-caption and a label." + (let* ((envtype (completing-read (TeX-argument-prompt optional nil "Float type") + LaTeX-caption-supported-float-types)) + (figtypes '("figure" "subfigure" "floatingfigure" + "figwindow" "SCfigure" "measuredfigure" "wrapfigure")) + (tabtypes '("table" "subtable" "floatingtable" "tabwindow" "SCtable" + "supertabular" "xtabular" "threeparttable" "wraptable")) + (caption (TeX-read-string + (TeX-argument-prompt optional nil "Caption"))) + (short-caption + (when (and (not star) + (>= (length caption) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t nil "Short caption"))))) + (indent-according-to-mode) + (TeX-argument-insert envtype optional) + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (TeX-argument-insert caption optional) + (when auto-fill-function (LaTeX-fill-paragraph)) + (when (and (not star) + ;; Check if `envtype' is a figure or a table, also + ;; consult `LaTeX-label-alist' for additions from user + ;; or newfloat.el, then run `LaTeX-label' w/ + ;; 'environment arg, otherwise w/o. + (save-excursion + (if (or (member envtype figtypes) + (member envtype tabtypes) + (assoc envtype LaTeX-label-alist)) + (LaTeX-label (cond ((member envtype figtypes) + "figure") + ((member envtype tabtypes) + "table") + (t envtype)) + 'environment) + (LaTeX-label envtype)))) + (LaTeX-newline) + (indent-according-to-mode) + (end-of-line)))) + +(TeX-add-style-hook + "caption" + (lambda () + + ;; Add caption to the parser. + (TeX-auto-add-regexp LaTeX-caption-DeclareCaption-regexp) + + ;; Caption commands: + (TeX-add-symbols + '("caption*" t) + + '("captionlistentry" + [TeX-arg-eval completing-read (TeX-argument-prompt t nil "Float type") + LaTeX-caption-supported-float-types] + t) + + '("captionof" LaTeX-arg-caption-captionof) + + '("captionof*" (LaTeX-arg-caption-captionof t)) + + '("captionsetup" + (TeX-arg-conditional (member "bicaption" (TeX-style-list)) + ([LaTeX-arg-bicaption-captionsetup]) + ([TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Float type") + LaTeX-caption-supported-float-types])) + (TeX-arg-key-val (LaTeX-caption-key-val-options))) + + '("captionsetup*" + (TeX-arg-conditional (member "bicaption" (TeX-style-list)) + ([LaTeX-arg-bicaption-captionsetup]) + ([TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Float type") + LaTeX-caption-supported-float-types])) + (TeX-arg-key-val (LaTeX-caption-key-val-options))) + + '("clearcaptionsetup" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Single key") + (LaTeX-caption-key-val-options)] + (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type") + LaTeX-caption-supported-float-types)) + + '("clearcaptionsetup*" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Single key") + (LaTeX-caption-key-val-options)] + (TeX-arg-eval completing-read (TeX-argument-prompt nil nil "Float type") + LaTeX-caption-supported-float-types)) + + '("captionbox" (LaTeX-arg-caption-captionbox) t) + + '("captionbox*" (LaTeX-arg-caption-captionbox t) t) + + '("continuedfloat" 0) + '("continuedfloat*" 0) + + '("DeclareCaptionFont" + (LaTeX-arg-caption-DeclareCaption "Font") t) + + '("DeclareCaptionFormat" + (LaTeX-arg-caption-DeclareCaption "Format") t) + + '("DeclareCaptionFormat*" + (LaTeX-arg-caption-DeclareCaption "Format") t) + + '("DeclareCaptionJustification" + (LaTeX-arg-caption-DeclareCaption "Justification") t) + + '("DeclareCaptionLabelFormat" + (LaTeX-arg-caption-DeclareCaption "LabelFormat") t) + + '("DeclareCaptionLabelSeparator" + (LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) + + '("DeclareCaptionLabelSeparator*" + (LaTeX-arg-caption-DeclareCaption "LabelSeparator") t) + + '("DeclareCaptionListFormat" + (LaTeX-arg-caption-DeclareCaption "ListFormat") t) + + '("DeclareCaptionOption" + (LaTeX-arg-caption-DeclareCaption "Option") t) + + '("DeclareCaptionStyle" + (LaTeX-arg-caption-DeclareCaption "Style") + [TeX-arg-key-val (LaTeX-caption-key-val-options) "Additional options"] + (TeX-arg-key-val (LaTeX-caption-key-val-options) "Options")) + + '("DeclareCaptionTextFormat" + (LaTeX-arg-caption-DeclareCaption "TextFormat") t) + + '("bothIfFirst" 2) + + '("bothIfSecond" 2)) + + ;; \caption(box|of) macros should get their own lines + (LaTeX-paragraph-commands-add-locally '("captionbox" "captionof")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("caption" "*[{") + ("captionlistentry" "[{") + ("captionof" "*{[{") + ("captionbox" "*[{[[")) + 'textual) + (font-latex-add-keywords '(("captionsetup" "*[[{") + ("clearcaptionsetup" "*[{") + ("continuedfloat" "") + ("DeclareCaptionFont" "{{") + ("DeclareCaptionFormat" "*{{") + ("DeclareCaptionJustification" "{{") + ("DeclareCaptionLabelFormat" "{{") + ("DeclareCaptionLabelSeparator" "*{{") + ("DeclareCaptionListFormat" "{{") + ("DeclareCaptionOption" "{{") + ("DeclareCaptionStyle" "{[{") + ("DeclareCaptionTextFormat" "{{")) + 'function)) ) + TeX-dialect) + +(defun LaTeX-caption-package-options () + "Prompt for package options for the caption package." + (TeX-read-key-val t + (append '(("compatibility" ("true" "false"))) + '(("figureposition" ("top" "above" "bottom" "below"))) + '(("tableposition" ("top" "above" "bottom" "below"))) + LaTeX-caption-key-val-options))) + +;;; caption.el ends here diff --git a/elpa/auctex-13.1.3/style/caption.elc b/elpa/auctex-13.1.3/style/caption.elc Binary files differnew file mode 100644 index 0000000..9bb293d --- /dev/null +++ b/elpa/auctex-13.1.3/style/caption.elc diff --git a/elpa/auctex-13.1.3/style/changelog.el b/elpa/auctex-13.1.3/style/changelog.el new file mode 100644 index 0000000..a4ebb43 --- /dev/null +++ b/elpa/auctex-13.1.3/style/changelog.el @@ -0,0 +1,163 @@ +;;; changelog.el --- AUCTeX style for `changelog.sty' (v2.0.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2019, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-05-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `changelog.sty' (v2.0.0). +;; `changelog.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar reftex-label-alist) + +(defvar LaTeX-changelog-env-key-val-options + '(("section" ("true" "false")) + ("title")) + "Key=value options for changelog environment. +The keys sectioncmd and label are added in the function +`LaTeX-env-changelog'.") + +(defvar LaTeX-changelog-version-env-key-val-options + '(("version") + ("v") + ("author") + ("date") + ("yanked" ("true" "false")) + ("simple" ("true" "false")) + ("short" ("true" "false"))) + "key=value options for version environment.") + +(defun LaTeX-env-changelog (environment) + "Insert ENVIRONMENT, ask for optional argument and insert a label." + (let* ((seccmds (mapcar #'car LaTeX-section-list)) + ;; Collect the key=vals acc. to environment & documentclass + (opts (TeX-read-key-val + t + (if (string= environment "changelog") + (append + `(("sectioncmd" + ,(if (< (LaTeX-largest-level) 2) + (append + (mapcar (lambda (cmd) (concat TeX-esc cmd)) + seccmds) + (mapcar (lambda (cmd) (concat TeX-esc cmd "*")) + seccmds)) + (append + (mapcar (lambda (cmd) (concat TeX-esc cmd)) + (remove "chapter" seccmds)) + (mapcar (lambda (cmd) (concat TeX-esc cmd "*")) + (remove "chapter" seccmds)))))) + LaTeX-changelog-env-key-val-options + LaTeX-changelog-version-env-key-val-options) + LaTeX-changelog-version-env-key-val-options))) + ;; Extract the chosen sectioning command + (sec (progn + (string-match "sectioncmd=\\\\\\([a-z]+\\)\\(\\*?\\)" opts) + (match-string-no-properties 1 opts))) + ;; Temp. re-bind `LaTeX-label-alist' and pick the label + ;; prefix from `LaTeX-section-label' + (LaTeX-label-alist + (when (and (string= environment "changelog") + (match-string 2 opts) + (not (string= (match-string 2 opts) "*"))) + `(,(cons environment + (cdr (assoc sec LaTeX-section-label)))))) + ;; Temp. re-bind `reftex-label-alist' as well and make + ;; `reftex-label' DTRT: + (reftex-label-alist + (when (and (boundp 'reftex-label-alist) + LaTeX-label-alist + (string= environment "changelog")) + `((,environment ?s ,(cdr (assoc sec LaTeX-section-label)) nil t))))) + (LaTeX-insert-environment + environment + (when (and opts (not (string= opts ""))) + (concat LaTeX-optop opts LaTeX-optcl))) + ;; Add a label into the opt. argument + (when (string= environment "changelog") + (LaTeX-env-label-as-keyval nil "sectioncmd" nil environment)) + ;; Add an \item in version environment + (when (string= environment "version") + (TeX-insert-macro "item") + (indent-according-to-mode)))) + +(TeX-add-style-hook + "changelog" + (lambda () + + (LaTeX-add-environments + '("changelog" LaTeX-env-changelog) + '("version" LaTeX-env-changelog)) + + (TeX-add-symbols + '("added" 0) + '("changed" 0) + '("deprecated" 0) + '("removed" 0) + '("fixed" 0) + '("security" 0) + `("shortversion" (TeX-arg-key-val + ,(append + '(("changes")) + LaTeX-changelog-version-env-key-val-options)))) + + ;; Tell RefTeX that the optional arg of changelog env. can contain a label: + (when (and (boundp 'reftex-label-regexps) + (fboundp 'reftex-compile-variables) + (not (string-match "\\bchangelog\\b" + (mapconcat #'identity + reftex-label-regexps + "|")))) + (add-to-list (make-local-variable 'reftex-label-regexps) + (concat "\\\\begin{changelog}" + (LaTeX-extract-key-value-label nil 1)) + t) + (reftex-compile-variables)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("added" "") + ("changed" "") + ("deprecated" "") + ("removed" "") + ("fixed" "") + ("security" "") + ("shortversion" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-changelog-package-options nil + "Package options for the changelog package.") + +;;; changelog.el ends here diff --git a/elpa/auctex-13.1.3/style/changelog.elc b/elpa/auctex-13.1.3/style/changelog.elc Binary files differnew file mode 100644 index 0000000..5d1f273 --- /dev/null +++ b/elpa/auctex-13.1.3/style/changelog.elc diff --git a/elpa/auctex-13.1.3/style/changes.el b/elpa/auctex-13.1.3/style/changes.el new file mode 100644 index 0000000..9c3bff5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/changes.el @@ -0,0 +1,242 @@ +;;; changes.el --- AUCTeX style for `changes.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-01-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `changes.sty' v4.0.0. from 2021/01/28. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-xcolor-base-colors) +(defvar LaTeX-truncate-package-options) +(defvar LaTeX-ulem-package-options) +(defvar LaTeX-xcolor-package-options) + +(TeX-auto-add-type "changes-definechangesauthor" "LaTeX") + +(defvar LaTeX-changes-definechangesauthor-regexp + `(,(concat "\\\\definechangesauthor" + "[ \t\n\r%]*" + "\\(?:\\[[^]]*\\]\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-changes-definechangesauthor) + "Matches the id defined by \\definechangesauthor.") + +(defun LaTeX-changes-auto-prepare () + "Reset `LaTeX-auto-changes-definechangesauthor'." + (setq LaTeX-auto-changes-definechangesauthor nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-changes-auto-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-arg-changes-definechangesauthor (optional) + "Prompt for the arguments of \\definechangesauthor macro. +While reading the first optional argument, remove space from +`crm-local-completion-map' and `minibuffer-local-completion-map'. +Insert the argument in brackets if OPTIONAL is non-nil." + (let* ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) + crm-local-completion-map)) + (minibuffer-local-completion-map + (remove (assoc 32 minibuffer-local-completion-map) + minibuffer-local-completion-map)) + (TeX-last-optional-rejected nil) + (keyval (LaTeX-check-insert-macro-default-style + (TeX-read-key-val + t + `(("name") + ("color" + ,(cond + ((and (member "xcolor" (TeX-style-list)) + (fboundp 'LaTeX-xcolor-definecolor-list)) + (mapcar #'car (LaTeX-xcolor-definecolor-list))) + ((and (member "color" (TeX-style-list)) + (fboundp 'LaTeX-color-definecolor-list)) + (mapcar #'car (LaTeX-color-definecolor-list))) + (t nil))))))) + (TeX-arg-opening-brace LaTeX-optop) + (TeX-arg-closing-brace LaTeX-optcl)) + (when keyval (TeX-argument-insert keyval t))) + (let ((id (TeX-read-string + (TeX-argument-prompt optional nil "Author ID")))) + (LaTeX-add-changes-definechangesauthors id) + (TeX-argument-insert id optional))) + +(defun LaTeX-arg-changes-markup (optional) + "Prompt for the argument of various markup commands. +Remove space from `crm-local-completion-map' and +`minibuffer-local-completion-map' while reading user input. +Insert the argument in brackets if OPTIONAL is non-nil." + (let* ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) + crm-local-completion-map)) + (minibuffer-local-completion-map + (remove (assoc 32 minibuffer-local-completion-map) + minibuffer-local-completion-map)) + (keyval (TeX-read-key-val + optional + `(("id" ,(mapcar #'car + (LaTeX-changes-definechangesauthor-list))) + ("comment"))))) + (TeX-argument-insert keyval optional))) + +(TeX-add-style-hook + "changes" + (lambda () + + ;; Add changes to the parser + (TeX-auto-add-regexp LaTeX-changes-definechangesauthor-regexp) + + ;; Run AUCTeX style hooks based on given package options: This is + ;; more complicated since we're only looking after "ulem" or + ;; "xcolor" and don't really care about the given options to them: + (when (assoc "changes" LaTeX-provided-package-options) + (dolist (pkg '("ulem" "xcolor")) + (let ((opts (cdr (assoc "changes" + LaTeX-provided-package-options)))) + (when (string-match (concat "\\<" pkg "\\>") + (mapconcat #'identity opts "|")) + (TeX-run-style-hooks pkg))))) + + ;; truncate.sty is always loaded: + (TeX-run-style-hooks "truncate") + + (TeX-add-symbols + ;; 4.2 Change management + '("added" [ LaTeX-arg-changes-markup ] 1) + '("deleted" [ LaTeX-arg-changes-markup ] 1) + '("replaced" [ LaTeX-arg-changes-markup ] 2) + + ;; 4.3 Highlighting and Comments + '("highlight" [ LaTeX-arg-changes-markup ] 1) + '("comment" + [TeX-arg-eval + TeX-read-key-val t `(("id" + ,(mapcar #'car + (LaTeX-changes-definechangesauthor-list))))] + 1) + + ;; 4.4 Overview of changes + '("listofchanges" + [TeX-arg-key-val (("style" ("list" "summary" "compactsummary")) + ("title") + ("show" ("all" "added" "deleted" + "replaced" "highlight" "comment")))]) + + ;; 4.5 Author management \definechangesauthor + '("definechangesauthor" LaTeX-arg-changes-definechangesauthor) + + ;; 4.6 Adaption of the output: + '("setaddedmarkup" "Definition") + '("setdeletedmarkup" "Definition") + '("sethighlightmarkup" "Definition") + '("setcommentmarkup" "Definition") + '("setauthormarkup" "Definition") + '("setauthormarkupposition" + (TeX-arg-eval completing-read + (TeX-argument-prompt optional nil "Position") + '("left" "right"))) + '("setauthormarktext" + (TeX-arg-eval completing-read + (TeX-argument-prompt optional nil "Markup") + '("id" "name"))) + '("settruncatewidth" (TeX-arg-length "Width")) + '("setsummarywidth" (TeX-arg-length "Width")) + '("setsummarytowidth" "Text") + '("setlocextension" "Extension") + '("setsocextension" "Extension")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("definechangesauthor" "[{") + ("setaddedmarkup" "{") + ("setdeletedmarkup" "{") + ("sethighlightmarkup" "{") + ("setcommentmarkup" "{") + ("setauthormarkup" "{") + ("setauthormarkupposition" "{") + ("setauthormarktext" "{") + ("settruncatewidth" "{") + ("setsummarywidth" "{") + ("setsummarytowidth" "{") + ("setlocextension" "{") + ("setsocextension" "{")) + 'function) + (font-latex-add-keywords '(("added" "[{") + ("deleted" "[{") + ("replaced" "[{{") + ("highlight" "[{") + ("comment" "[{")) + 'textual) + (font-latex-add-keywords '(("listofchanges" "[")) + 'reference))) + TeX-dialect) + +(defun LaTeX-changes-package-options () + "Prompt for package options for the changes package." + (TeX-load-style "xcolor") + (TeX-load-style "truncate") + (TeX-load-style "ulem") + (TeX-read-key-val + t + (append + `(("defaultcolor" + ,(if (and (fboundp 'LaTeX-xcolor-definecolor-list) + (LaTeX-xcolor-definecolor-list)) + (mapcar #'car (LaTeX-xcolor-definecolor-list)) + LaTeX-xcolor-base-colors))) + `(("draft") + ("final") + ("commandnameprefix" ("none" "ifneeded" "always")) + ("markup" ("default" "underlined" "bfit" "nocolor")) + ("addedmarkup" ("colored" "uline" "uuline" "uwave" + "dashuline" "dotuline" + "bf" "it" "sl" "em")) + ("deletedmarkup" ("sout" "xout" "colored" + "uline" "uuline" "uwave" + "dashuline" "dotuline" + "bf" "it" "sl" "em")) + ("highlightmarkup" ("background" "uuline" "uwave")) + ("commentmarkup" ("todo" "margin" "footnote" "uwave")) + ("authormarkup" ("superscript" "subscript" "brackets" + "footnote" "none")) + ("authormarkupposition" ("right" "left")) + ("authormarkuptext" ("id" "name")) + ("todonotes") + ("truncate" ,LaTeX-truncate-package-options) + ("ulem" ,LaTeX-ulem-package-options) + ("xcolor" ,LaTeX-xcolor-package-options))))) + +;;; changes.el ends here diff --git a/elpa/auctex-13.1.3/style/changes.elc b/elpa/auctex-13.1.3/style/changes.elc Binary files differnew file mode 100644 index 0000000..bf2e8d3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/changes.elc diff --git a/elpa/auctex-13.1.3/style/cleveref.el b/elpa/auctex-13.1.3/style/cleveref.el new file mode 100644 index 0000000..373dcd8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/cleveref.el @@ -0,0 +1,205 @@ +;;; cleveref.el --- AUCTeX style for `cleveref.sty' (v0.21.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014--2020 Free Software Foundation, Inc. + +;; Author: Matthew Leach <matthew@mattleach.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 13/10/2014 + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `cleveref.sty' (v0.21.4), dated +;; 2018/03/27. + +;;; Code + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun TeX-arg-cleveref-multiple-labels (optional &optional prompt) + "Prompt for a series of labels completing with known labels. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (if (and (fboundp 'reftex-arg-label) + (fboundp 'reftex-plug-flag) + (reftex-plug-flag 2)) + ;; Use RefTeX when enabled + (TeX-arg-ref optional) + ;; Use AUCTeX interface + (let* ((labels (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Keys") + (LaTeX-label-list))) + (labels-string (mapconcat #'identity labels ","))) + (TeX-argument-insert labels-string optional)))) + +(defun TeX-arg-cleveref-crossref-type (optional &optional prompt) + "Insert the cross-reference type for macros of cleveref package. +If OPTIONAL is non-nil, insert the resulting value in brackets. +Use PROMPT as the prompt string." + (let* ((type (mapcar #'list + '("appendix" "subappendix" "subsubappendix" + "subsubsubappendix" "subfigure" "subtable" + "subequation"))) + (types (append (LaTeX-counter-list) type))) + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Type") types) + optional))) + +(defvar LaTeX-cleveref-label-regexp + '("\\\\label\\[[^]]*\\]{\\([^\n\r%\\{}]+\\)}" 1 LaTeX-auto-label) + "Regexp matching a \\label incl. an optional argument.") + +(TeX-add-style-hook + "cleveref" + (lambda () + + (TeX-add-symbols + ;; 4 Typesetting Cross-References + '("cref" TeX-arg-cleveref-multiple-labels) + '("Cref" TeX-arg-cleveref-multiple-labels) + '("crefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)")) + '("Crefrange" (TeX-arg-ref "key (first)") (TeX-arg-ref "Key (last)")) + '("cref*" TeX-arg-cleveref-multiple-labels) + '("Cref*" TeX-arg-cleveref-multiple-labels) + '("crefrange*" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)")) + '("Crefrange*" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)")) + '("cpageref" TeX-arg-cleveref-multiple-labels) + '("Cpageref" TeX-arg-cleveref-multiple-labels) + '("cpagerefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)")) + '("Cpagerefrange" (TeX-arg-ref "Key (first)") (TeX-arg-ref "Key (last)")) + '("namecref" TeX-arg-ref) + '("nameCref" TeX-arg-ref) + '("lcnamecref" TeX-arg-ref) + '("namecrefs" TeX-arg-ref) + '("nameCrefs" TeX-arg-ref) + '("lcnamecrefs" TeX-arg-ref) + '("labelcref" TeX-arg-cleveref-multiple-labels) + '("labelcpageref" TeX-arg-cleveref-multiple-labels) + ;; 6 Overriding the Cross-Reference Type + '("crefalias" TeX-arg-counter "Type") + '("label" [ TeX-arg-cleveref-crossref-type ] TeX-arg-define-label) + + ;; 8.1.1 Global Customisation + '("crefdefaultlabelformat" t) + + ;; 8.1.2 Customising Individual Cross-Reference Types + '("crefname" TeX-arg-cleveref-crossref-type + "Singular name" "Plural name") + '("Crefname" TeX-arg-cleveref-crossref-type + "Singular name" "Plural name") + '("creflabelformat" TeX-arg-cleveref-crossref-type t) + '("crefrangelabelformat" TeX-arg-cleveref-crossref-type t) + + ;; 8.2.1 Single Cross-References + '("crefformat" TeX-arg-cleveref-crossref-type t) + '("Crefformat" TeX-arg-cleveref-crossref-type t) + + ;; 8.2.2 Reference Ranges + '("crefrangeformat" TeX-arg-cleveref-crossref-type t) + '("Crefrangeformat" TeX-arg-cleveref-crossref-type t) + + ;; 8.2.3 Multiple Cross-References + '("crefmultiformat" TeX-arg-cleveref-crossref-type 4) + '("Crefmultiformat" TeX-arg-cleveref-crossref-type 4) + '("crefrangemultiformat" TeX-arg-cleveref-crossref-type 4) + '("Crefrangemultiformat" TeX-arg-cleveref-crossref-type 4)) + + ;; These macros aren't used particularly often during the course of + ;; normal referencing. + (TeX-declare-expert-macros + "cleveref" + "namecref" "nameCref" "lcnamecref" "namecrefs" "nameCrefs" + "lcnamecrefs" "labelcref" "labelcpageref" + "crefdefaultlabelformat" + "crefname" "Crefname" "creflabelformat" "crefrangelabelformat" + "crefformat" "Crefformat" + "crefrangeformat" "Crefrangeformat" + "crefmultiformat" "Crefmultiformat" + "crefrangemultiformat" "Crefrangemultiformat") + + ;; Add \label[type]{label} to AUCTeX parser + (TeX-auto-add-regexp LaTeX-cleveref-label-regexp) + + ;; Tell RefTeX. Check if `reftex-label-regexps' is bound and use a + ;; local version of it. Check if the regexp is already added in + ;; order not to run `reftex-compile-variables' every time the style + ;; hook runs + (when (and (boundp 'reftex-label-regexps) + (fboundp 'reftex-compile-variables)) + (let ((regexp "\\\\label\\[[^]]*\\]{\\(?1:[^\n\r%\\{}]+\\)}")) + (unless (member regexp reftex-label-regexps) + (add-to-list (make-local-variable 'reftex-label-regexps) + regexp t) + (reftex-compile-variables)))) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cref" "*{") + ("Cref" "*{") + ("crefrange" "*{{") + ("Crefrange" "*{{") + ("cpageref" "{") + ("Cpageref" "{") + ("cpagerefrange" "{{") + ("Cpagerefrange" "{{") + ("namecref" "{") + ("nameCref" "{") + ("lcnamecref" "{") + ("namecrefs" "{") + ("nameCrefs" "{") + ("lcnamecrefs" "{") + ("labelcref" "{") + ("labelcpageref" "{") + ("label" "[{")) + 'reference) + (font-latex-add-keywords '(("crefalias" "{{") + ("crefname" "{{{") + ("Crefname" "{{{") + ("creflabelformat" "{{") + ("crefrangelabelformat" "{{") + ("crefdefaultlabelformat" "{") + ("crefformat" "{{") + ("Crefformat" "{{") + ("crefrangeformat" "{{") + ("Crefrangeformat" "{{") + ("crefmultiformat" "{{{{{") + ("Crefmultiformat" "{{{{{") + ("crefrangemultiformat" "{{{{{") + ("Crefrangemultiformat" "{{{{{")) + 'function)) + + ;; Activate RefTeX reference style. + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Cleveref"))) + TeX-dialect) + +(defvar LaTeX-cleveref-package-options + '("capitalise" "nameinlink" "noabbrev" "poorman") + "Package options for the cleveref package.") + +;;; cleveref.el ends here. diff --git a/elpa/auctex-13.1.3/style/cleveref.elc b/elpa/auctex-13.1.3/style/cleveref.elc Binary files differnew file mode 100644 index 0000000..02a53df --- /dev/null +++ b/elpa/auctex-13.1.3/style/cleveref.elc diff --git a/elpa/auctex-13.1.3/style/color.el b/elpa/auctex-13.1.3/style/color.el new file mode 100644 index 0000000..a98b01b --- /dev/null +++ b/elpa/auctex-13.1.3/style/color.el @@ -0,0 +1,317 @@ +;;; color.el --- AUCTeX style for `color.sty' (v1.3d) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-01-16 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `color.sty' (v1.3d) from 2022/01/06. +;; `color.sty' is part of TeXLive. + +;; Many thanks to Tassilo Horn for his percetive comments on +;; implementation of this style and testing. + +;;; Code: + +;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-color-colour-models + '("cmyk" "gray" "named" "rgb") + "List of color models provided by `color.sty'.") + +(defvar LaTeX-color-dvipsnames-colors + '("Apricot" "Aquamarine" "Bittersweet" "Black" + "Blue" "BlueGreen" "BlueViolet" "BrickRed" + "Brown" "BurntOrange" "CadetBlue" "CarnationPink" + "Cerulean" "CornflowerBlue" "Cyan" "Dandelion" + "DarkOrchid" "Emerald" "ForestGreen" "Fuchsia" + "Goldenrod" "Gray" "Green" "GreenYellow" + "JungleGreen" "Lavender" "LimeGreen" "Magenta" + "Mahogany" "Maroon" "Melon" "MidnightBlue" + "Mulberry" "NavyBlue" "OliveGreen" "Orange" + "OrangeRed" "Orchid" "Peach" "Periwinkle" + "PineGreen" "Plum" "ProcessBlue" "Purple" + "RawSienna" "Red" "RedOrange" "RedViolet" + "Rhodamine" "RoyalBlue" "RoyalPurple" "RubineRed" + "Salmon" "SeaGreen" "Sepia" "SkyBlue" + "SpringGreen" "Tan" "TealBlue" "Thistle" + "Turquoise" "Violet" "VioletRed" "White" + "WildStrawberry" "Yellow" "YellowGreen" "YellowOrange") + "List of colors defined by package option `dvipsnames' from `color.sty'.") + +;; Needed for auto-parsing. +(require 'tex) + +;; Plug \definecolor into the parser +(TeX-auto-add-type "color-definecolor" "LaTeX") + +(defvar LaTeX-color-definecolor-regexp + '("\\\\definecolor{\\([^}]+\\)}" 1 LaTeX-auto-color-definecolor) + "Matches the argument of \\definecolor from color package.") + +(defun LaTeX-color-auto-prepare () + "Clear `LaTeX-auto-color-definecolor' before parsing." + (setq LaTeX-auto-color-definecolor nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-color-auto-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-color-definecolor (optional &optional prompt) + "Insert arguments of `\\definecolor' from `color.sty'." + ;; \definecolor{<name>}{<model>}{<color spec>} + ;; Ask for <name>, add to our list and insert it + (let ((colorname (TeX-read-string "Color name: "))) + (LaTeX-add-color-definecolors colorname) + (TeX-argument-insert colorname optional)) + ;; Ask and insert <model> + (let ((model (completing-read + (TeX-argument-prompt optional prompt "Color model") + (if (not (or (LaTeX-provided-package-options-member "color" "dvips") + (LaTeX-provided-package-options-member "color" "dvipsnames"))) + (remove "named" LaTeX-color-colour-models) + LaTeX-color-colour-models)))) + (TeX-argument-insert model optional) + ;; Depending on <model>, ask for <color spec> and insert it + (cond (;; <cmyk> model + (string-equal model "cmyk") + (let ((cyan (TeX-read-string "Value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Value Yellow (between 0,1): ")) + (black (TeX-read-string "Value Black (between 0,1): "))) + (TeX-argument-insert + (concat cyan "," magenta "," yellow "," black) optional))) + ;; <rgb> model + ((string-equal model "rgb") + (let ((red (TeX-read-string "Value Red (between 0,1): ")) + (green (TeX-read-string "Value Green (between 0,1): ")) + (blue (TeX-read-string "Value Blue (between 0,1): "))) + (TeX-argument-insert + (concat red "," green "," blue) optional))) + ;; <gray> model + ((string-equal model "gray") + (let ((grayness (TeX-read-string "Value Gray (between 0,1): "))) + (TeX-argument-insert grayness optional))) + ;; <named> model takes the dvipsnames + ((string-equal model "named") + (let ((color (completing-read "Named Color: " + LaTeX-color-dvipsnames-colors))) + (TeX-argument-insert color optional)))))) + +(defun TeX-arg-color (optional &optional prompt) + "Insert arguments of various color commands from `color.sty'." + ;; \color{<name>} or \color[<model>]{<color spec>} First, ask for + ;; <model>. This happens depending on the values of + ;; `TeX-insert-macro-default-style' and if `current-prefix-arg'. + ;; `named' is removed here from completion if package option is not + ;; given. + (let* ((TeX-last-optional-rejected nil) + (model (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t prompt "Color model") + (if (not (or (LaTeX-provided-package-options-member "color" "dvips") + (LaTeX-provided-package-options-member "color" "dvipsnames"))) + (remove "named" LaTeX-color-colour-models) + LaTeX-color-colour-models))))) + ;; If <model> is non-nil because of 'mandatory-args-only and not + ;; an empty string, then insert it + (if (and model (not (string-equal model ""))) + (progn + (insert (concat LaTeX-optop model LaTeX-optcl)) + (cond (;; <cmyk> model + (string-equal model "cmyk") + (let ((cyan (TeX-read-string "Value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Value Yellow (between 0,1): ")) + (black (TeX-read-string "Value Black (between 0,1): "))) + (TeX-argument-insert + (concat cyan "," magenta "," yellow "," black) optional))) + ;; <rgb> model + ((string-equal model "rgb") + (let ((red (TeX-read-string "Value Red (between 0,1): ")) + (green (TeX-read-string "Value Green (between 0,1): ")) + (blue (TeX-read-string "Value Blue (between 0,1): "))) + (TeX-argument-insert + (concat red "," green "," blue) optional))) + ;; <gray> model + ((string-equal model "gray") + (let ((grayness (TeX-read-string "Value Gray (between 0,1): "))) + (TeX-argument-insert grayness optional))) + ;; <named> model; allowed are dvipsnames. + ((string-equal model "named") + (let ((color (completing-read "Named Color: " + LaTeX-color-dvipsnames-colors))) + (TeX-argument-insert color optional))))) + ;; if empty, ask for <name> with completion + (let ((color (completing-read + (TeX-argument-prompt optional prompt "Color name") + (LaTeX-color-definecolor-list)))) + (TeX-argument-insert color optional))))) + +(defun TeX-arg-color-fcolorbox (optional &optional prompt) + "Insert arguments of `\\fcolorbox' from `color.sty'. " + ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or + ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>} + ;; First, ask for <model> depending on + ;; `TeX-insert-macro-default-style' and `current-prefix-arg'. + ;; Remove `named' if necessary. + (let* ((TeX-last-optional-rejected nil) + (model (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t prompt "Color model") + (if (not (or (LaTeX-provided-package-options-member "color" "dvips") + (LaTeX-provided-package-options-member "color" "dvipsnames"))) + (remove "named" LaTeX-color-colour-models) + LaTeX-color-colour-models))))) + ;; If <model> is non-nil because of 'mandatory-args-only and not + ;; an empty string, then insert [<model>] and cater for 2 + ;; mandatory args. + (if (and model (not (string-equal model ""))) + (progn + (insert (concat LaTeX-optop model LaTeX-optcl)) + (cond (;; <cmyk> model + (string-equal model "cmyk") + (let ((cyan (TeX-read-string "Frame value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Frame value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Frame value Yellow (between 0,1): ")) + (black (TeX-read-string "Frame value Black (between 0,1): "))) + (TeX-argument-insert + (concat cyan "," magenta "," yellow "," black) optional)) + (let ((cyan (TeX-read-string "Box value Cyan (between 0,1): ")) + (magenta (TeX-read-string "Box value Magenta (between 0,1): ")) + (yellow (TeX-read-string "Box value Yellow (between 0,1): ")) + (black (TeX-read-string "Box value Black (between 0,1): "))) + (TeX-argument-insert + (concat cyan "," magenta "," yellow "," black) optional))) + ;; <rgb> model + ((string-equal model "rgb") + (let ((red (TeX-read-string "Frame value Red (between 0,1): ")) + (green (TeX-read-string "Frame value Green (between 0,1): ")) + (blue (TeX-read-string "Frame value Blue (between 0,1): "))) + (TeX-argument-insert + (concat red "," green "," blue) optional)) + (let ((red (TeX-read-string "Box value Red (between 0,1): ")) + (green (TeX-read-string "Box value Green (between 0,1): ")) + (blue (TeX-read-string "box value Blue (between 0,1): "))) + (TeX-argument-insert + (concat red "," green "," blue) optional))) + ;; <gray> model + ((string-equal model "gray") + (let ((grayness (TeX-read-string "Frame value Gray (between 0,1): "))) + (TeX-argument-insert grayness optional)) + (let ((grayness (TeX-read-string "Box value Gray (between 0,1): "))) + (TeX-argument-insert grayness optional))) + ;; <named> model; allowed are dvipsnames. + ((string-equal model "named") + (let ((color (completing-read "Frame named Color: " + LaTeX-color-dvipsnames-colors))) + (TeX-argument-insert color optional)) + (let ((color (completing-read "Box named Color: " + LaTeX-color-dvipsnames-colors))) + (TeX-argument-insert color optional))))) + ;; if empty, ask for {<frame color spce>}{<box color name>} with completion + (let ((frame-color (completing-read + (TeX-argument-prompt optional prompt "Frame color name") + (LaTeX-color-definecolor-list))) + (box-color (completing-read + (TeX-argument-prompt optional prompt "Box color name") + (LaTeX-color-definecolor-list)))) + (TeX-argument-insert frame-color optional) + (TeX-argument-insert box-color optional))))) + +(TeX-add-style-hook + "color" + (lambda () + ;; Add color to the parser. + (TeX-auto-add-regexp LaTeX-color-definecolor-regexp) + + ;; Add list of colors which are always available. + (LaTeX-add-color-definecolors + "black" "blue" "cyan" "green" "magenta" "red" "white" "yellow") + + ;; Add dvips colors in conjunction with `usenames'. + (when (and (LaTeX-provided-package-options-member "color" "usenames") + (or (LaTeX-provided-package-options-member "color" "dvips") + (LaTeX-provided-package-options-member "color" "dvipsnames"))) + (apply #'LaTeX-add-color-definecolors LaTeX-color-dvipsnames-colors)) + + (unless (member "xcolor" (TeX-style-list)) + (TeX-add-symbols + ;; \definecolor{<name>}{<model>}{<color spec>} + '("definecolor" TeX-arg-color-definecolor) + + ;; \color{<name>} or \color[<model>]{<color spec>} + '("color" TeX-arg-color) + + ;; \textcolor{<name>}{<text>} or + ;; \textcolor[<model>]{<color spec>}{<text>} + '("textcolor" TeX-arg-color "Text") + + ;; \mathcolor{<name>}{<math>} or + ;; \mathcolor[<model>]{<color spec>}{<math>} + '("mathcolor" TeX-arg-color "Math") + + ;; \pagecolor{<name>} or + ;; \pagecolor[<model>]{<color spec>} + '("pagecolor" TeX-arg-color) + + ;; \nopagecolor + '("nopagecolor" 0) + + ;; \colorbox{<name>}{<text>} or + ;; \colorbox[<model>]{<color spec>}{<text>} + '("colorbox" TeX-arg-color "Text") + + ;; \fcolorbox{<frame color name>}{<box color name>}{<text>} or + ;; \fcolorbox[<model>]{<frame color spec>}{<box color spec>}{<text>} + '("fcolorbox" TeX-arg-color-fcolorbox "Text")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("color" "[{") + ("pagecolor" "[{")) + 'type-declaration) + (font-latex-add-keywords '(("textcolor" "[{{") + ("colorbox" "[{{" ) + ("fcolorbox" "[{{{")) + 'type-command) + (font-latex-add-keywords '(("definecolor" "{{{")) + 'function)))) + TeX-dialect) + +(defvar LaTeX-color-package-options + '("debugshow" "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsnames" + "dvipsone" "dvisvgm" "dviwin" "dviwindo" "emtex" "luatex" + "monochrome" "nodvipsnames" "nosetpagesize" "oztex" "pctex32" + "pctexhp" "pctexps" "pctexwin" "pdftex" "setpagesize" "tcidvi" + "textures" "truetex" "usenames" "vtex" "xdvi" "xetex") + "Package options for the color package.") + +;;; color.el ends here diff --git a/elpa/auctex-13.1.3/style/color.elc b/elpa/auctex-13.1.3/style/color.elc Binary files differnew file mode 100644 index 0000000..c7f4633 --- /dev/null +++ b/elpa/auctex-13.1.3/style/color.elc diff --git a/elpa/auctex-13.1.3/style/colortbl.el b/elpa/auctex-13.1.3/style/colortbl.el new file mode 100644 index 0000000..7bbab91 --- /dev/null +++ b/elpa/auctex-13.1.3/style/colortbl.el @@ -0,0 +1,100 @@ +;;; colortbl.el --- AUCTeX style for `colortbl.sty' (v1.0a) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-03-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `colortbl.sty' (v1.0a) from 2012/02/13. +;; `colortbl.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "colortbl" + (lambda () + + ;; array.el is always loaded: + (TeX-run-style-hooks "array") + + ;; Load color.el only if xcolor.el is not already loaded. This is + ;; mainly for the option `table' from xcolor.sty which loads + ;; colortbl.sty, but we don't want to load color.el. + (unless (member "xcolor" (TeX-style-list)) + (TeX-run-style-hooks "color")) + + (TeX-add-symbols + ;; `TeX-arg-color' is provided by color.el, + ;; `TeX-arg-xcolor' is provided by xcolor.el. + '("columncolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)) + [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] ) + + '("rowcolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)) + [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] ) + + '("cellcolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)) + [ TeX-arg-length "Left overhang" ] [ TeX-arg-length "Right overhang" ] ) + + '("arrayrulecolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color))) + + '("doublerulesepcolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)))) + + (LaTeX-add-lengths "minrowclearance") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("columncolor" "[{[[") + ("rowcolor" "[{[[") + ("cellcolor" "[{[[") + ("arrayrulecolor" "[{") + ("doublerulesepcolor" "[{")) + 'function))) + TeX-dialect) + +;; colortbl.sty has one option `debugshow'. I ignore that since it +;; would only take more time during insertation in a buffer and I +;; presume that not many users use it anyway. +(defvar LaTeX-colortbl-package-options nil + "Package option for the colortbl package.") + +;;; colortbl.el ends here diff --git a/elpa/auctex-13.1.3/style/colortbl.elc b/elpa/auctex-13.1.3/style/colortbl.elc Binary files differnew file mode 100644 index 0000000..6a91a98 --- /dev/null +++ b/elpa/auctex-13.1.3/style/colortbl.elc diff --git a/elpa/auctex-13.1.3/style/commath.el b/elpa/auctex-13.1.3/style/commath.el new file mode 100644 index 0000000..5c2b491 --- /dev/null +++ b/elpa/auctex-13.1.3/style/commath.el @@ -0,0 +1,109 @@ +;;; commath.el --- AUCTeX style for `commath.sty' (v0.3) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-07-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `commath.sty' (v0.3) from 2006/07/18. +;; `commath.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "commath" + (lambda () + + ;; Only load amsmath.el, ifthen.el is not necessary + (TeX-run-style-hooks "amsmath") + + (TeX-add-symbols + '("dif" 0) + '("Dif" 0) + '("od" [ "Order of differentiation" ] "Function" "Variable") + '("tod" [ "Order of differentiation" ] "Function" "Variable") + '("dod" [ "Order of differentiation" ] "Function" "Variable") + '("pd" [ "Order of differentiation" ] "Function" "Variable") + '("tpd" [ "Order of differentiation" ] "Function" "Variable") + '("dpd" [ "Order of differentiation" ] "Function" "Variable") + '("md" 6) + '("tmd" 6) + '("dmd" 6) + '("del" [ "Size argument (0..4)" ] "Argument") + '("cbr" [ "Size argument (0..4)" ] "Argument") + '("set" [ "Size argument (0..4)" ] "Argument") + '("sbr" [ "Size argument (0..4)" ] "Argument") + '("intoo" [ "Size argument (0..4)" ] "Argument") + '("intcc" [ "Size argument (0..4)" ] "Argument") + '("intoc" [ "Size argument (0..4)" ] "Argument") + '("intco" [ "Size argument (0..4)" ] "Argument") + '("eval" [ "Size argument (0..4)" ] t) + '("sVert" [ "Size argument (0..4)" ]) + '("envert" [ "Size argument (0..4)" ] "Argument") + '("abs" [ "Size argument (0..4)" ] "Argument") + '("enVert" [ "Size argument (0..4)" ] "Argument") + '("norm" [ "Size argument (0..4)" ] "Argument") + '("fullfunction" 5) + + ;; Referencing macros + '("thmref" TeX-arg-ref) + '("exref" TeX-arg-ref) + '("defnref" TeX-arg-ref) + '("secref" TeX-arg-ref) + '("lemref" TeX-arg-ref) + '("propref" TeX-arg-ref) + '("remref" TeX-arg-ref) + '("figref" TeX-arg-ref) + '("colref" TeX-arg-ref) + '("appref" TeX-arg-ref) + '("assref" TeX-arg-ref)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("thmref" "{") + ("exref" "{") + ("defnref" "{") + ("secref" "{") + ("lemref" "{") + ("propref" "{") + ("remref" "{") + ("figref" "{") + ("colref" "{") + ("appref" "{") + ("assref" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-commath-package-options nil + "Package options for the commath package.") + +;;; commath.el ends here diff --git a/elpa/auctex-13.1.3/style/commath.elc b/elpa/auctex-13.1.3/style/commath.elc Binary files differnew file mode 100644 index 0000000..cb7bbb0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/commath.elc diff --git a/elpa/auctex-13.1.3/style/comment.el b/elpa/auctex-13.1.3/style/comment.el new file mode 100644 index 0000000..8d0c90c --- /dev/null +++ b/elpa/auctex-13.1.3/style/comment.el @@ -0,0 +1,168 @@ +;;; comment.el --- AUCTeX style for `comment.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2018--2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-03-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `comment.sty'. + +;;; Code: + +(require 'tex) +(require 'tex-style) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function font-latex-set-syntactic-keywords + "font-latex") +(defvar font-latex-syntactic-keywords-extra) + +;; Prepare for parsing: +(TeX-auto-add-type "comment-incl-excl" "LaTeX") + +(defvar LaTeX-comment-include-exclude-regexp + '("\\\\\\(include\\|exclude\\|special\\)comment[ \t\n\r%]*{\\([^}]+\\)}" + (2 1) LaTeX-auto-comment-incl-excl) + "Matches the name of environments defined by comment macros.") + +(defun LaTeX-comment-auto-prepare () + "Reset the value of `LaTeX-auto-comment-incl-excl'." + (setq LaTeX-auto-comment-incl-excl nil)) + +(defun LaTeX-comment-auto-cleanup () + "Process parsed elements for comment package." + (dolist (elt (LaTeX-comment-incl-excl-list)) + (let ((env (car elt)) + (type (cadr elt))) + ;; Make the environment available for completion + (LaTeX-add-environments env) + ;; Fontification + (when (and (boundp 'font-latex-syntactic-keywords-extra) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; For syntactic fontification. + (if (string= type "exclude") + ;; Argument of \excludecomment: + (progn + (add-to-list 'font-latex-syntactic-keywords-extra + ;; \begin is supposed to start at the + ;; beginning of a line. + `(,(format "^\\\\begin *{%s}.*\\(\n\\)" + env) + (1 "!" t))) + (add-to-list 'font-latex-syntactic-keywords-extra + ;; \end is supposed to start at the + ;; beginning of a line. + `(,(format "^\\(\\\\\\)end *{%s}" + env) + (1 "!" t)))) + ;; Delete the entry from + ;; `font-latex-syntactic-keywords-extra' if argument of + ;; \includecomment or \specialcomment: + (setq font-latex-syntactic-keywords-extra + (delete `(,(format "^\\\\begin *{%s}.*\\(\n\\)" + env) + (1 "!" t)) + font-latex-syntactic-keywords-extra)) + (setq font-latex-syntactic-keywords-extra + (delete `(,(format "^\\(\\\\\\)end *{%s}" + env) + (1 "!" t)) + font-latex-syntactic-keywords-extra)))))) + ;; Recalculate the fontification rules once at the end: + (when (and (LaTeX-comment-incl-excl-list) + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-set-syntactic-keywords))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-comment-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-comment-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "comment" + (lambda () + + ;; Add comment to the parser. + (TeX-auto-add-regexp LaTeX-comment-include-exclude-regexp) + + ;; New symbols + (TeX-add-symbols + '("includecomment" + (TeX-arg-eval let ((env (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-comment-incl-excls `(,env "include")) + (LaTeX-comment-auto-cleanup) + (format "%s" env))) + + '("excludecomment" + (TeX-arg-eval let ((env (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-comment-incl-excls `(,env "exclude")) + (LaTeX-comment-auto-cleanup) + (format "%s" env))) + + '("specialcomment" + (TeX-arg-eval let ((env (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-comment-incl-excls `(,env "special")) + (LaTeX-comment-auto-cleanup) + (format "%s" env)) + "Before commands" "After commands") + + '("processcomment" "Name" "Each-line commands" + "Before commands" "After commands")) + + ;; New environments + (mapc #'LaTeX-add-environments LaTeX-comment-env-list) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; For syntactic fontification. + (add-to-list 'font-latex-syntactic-keywords-extra + ;; \begin is supposed to start at the beginning of a line. + `(,(format "^\\\\begin *{%s}.*\\(\n\\)" + (regexp-opt LaTeX-comment-env-list)) + (1 "!" t))) + (add-to-list 'font-latex-syntactic-keywords-extra + ;; \end is supposed to start at the beginning of a line. + `(,(format "^\\(\\\\\\)end *{%s}" + (regexp-opt LaTeX-comment-env-list)) + (1 "!" t))) + (font-latex-add-keywords '(("includecomment" "{") + ("excludecomment" "{") + ("specialcomment" "{{{") + ("processcomment" "{{{{")) + 'variable) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-comment-package-options nil + "Package options for the comment package.") + +;;; comment.el ends here diff --git a/elpa/auctex-13.1.3/style/comment.elc b/elpa/auctex-13.1.3/style/comment.elc Binary files differnew file mode 100644 index 0000000..c3c4ff5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/comment.elc diff --git a/elpa/auctex-13.1.3/style/csquotes.el b/elpa/auctex-13.1.3/style/csquotes.el new file mode 100644 index 0000000..d5714a3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/csquotes.el @@ -0,0 +1,404 @@ +;;; csquotes.el --- AUCTeX style for `csquotes.sty' (v5.2j) -*- lexical-binding: t; -*- + +;; Copyright (C) 2004--2022 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-11-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `csquotes.sty', version 5.2j from +;; 2019/12/06. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-csquotes-read-language (optional &optional prompt) + "Read and return a language for csquotes macros. +If OPTIONAL is non-nil, indicate it in minibuffer while reading +user input. PROMPT replaces the standard one \"Language\". This +function checks if the functions `LaTeX-babel-active-languages' +or `LaTeX-polyglossia-active-languages' are bound and use them to +retrieve the active languages. If none available, user is +requested to enter a language." + (cond ((and (fboundp 'LaTeX-babel-active-languages) + (LaTeX-babel-active-languages)) + (completing-read + (TeX-argument-prompt optional prompt "Language") + (LaTeX-babel-active-languages))) + ((and (fboundp 'LaTeX-polyglossia-active-languages) + (LaTeX-polyglossia-active-languages)) + (completing-read + (TeX-argument-prompt optional prompt "Language") + (LaTeX-polyglossia-active-languages))) + (t + (TeX-read-string + (TeX-argument-prompt optional prompt "Language"))))) + +(defun LaTeX-arg-csquotes-language (optional &optional prompt) + "Insert a language for csquotes macros. +If OPTIONAL is non-nil, insert the language in square brackets. +PROMPT replaces the standard one \"Language\"." + (TeX-argument-insert + (LaTeX-csquotes-read-language optional prompt) + optional)) + +(TeX-add-style-hook + "csquotes" + (lambda () + (let ((quote-style-variant-list '(("american") ("brazilian") + ("british") ("german") + ("guillemets") ("guillemets*") + ("mexican") ("portuguese") + ("quotes") ("quotes*") + ("spanish") ("swiss"))) + (quote-style-name-list '(("austrian") ("croatian") ("czech") + ("danish") ("dutch") ("english") + ("finnish") ("french") ("german") + ("greek") ("italian") ("norwegian") + ("portuguese") ("russian") ("serbian") + ("spanish") ("swedish")))) + ;; New symbols + (TeX-add-symbols + + ;; 3.1 Quoting Regular Text + '("enquote" 1) + '("enquote*" 1) + + ;; 3.2 Quoting Text in a Foreign Language + '("foreignquote" LaTeX-arg-csquotes-language 1) + '("foreignquote*" LaTeX-arg-csquotes-language 1) + '("hyphenquote" LaTeX-arg-csquotes-language 1) + '("hyphenquote*" LaTeX-arg-csquotes-language 1) + + ;; 3.3 Formal Quoting of Regular Text + '("textquote" ["Citation"] ["Punctuation"] t) + '("textquote*" ["Citation"] ["Punctuation"] t) + + ;; 3.4 Formal Quoting of Text in a Foreign Language + '("foreigntextquote" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + '("foreigntextquote*" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + '("hyphentextquote" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + '("hyphentextquote*" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + + ;; 3.5 Block Quoting of Regular Text + '("blockquote" ["Citation"] ["Punctuation"] t) + + ;; 3.6 Block Quoting of Text in a Foreign Language + '("foreignblockquote" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + '("hyphenblockquote" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + '("hybridblockquote" + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"] t) + + ;; 3.7 Selecting Quote Styles + `("setquotestyle" + [ (TeX-arg-eval completing-read "Quote style variant: " + ',quote-style-variant-list) ] + (TeX-arg-eval completing-read "Quote style name or alias: " + ',quote-style-name-list)) + "setquotestyle*" + + ;; 4.1 Quoting Regular Text + '("MakeInnerQuote" "Character") + '("MakeOuterQuote" "Character") + '("MakeAutoQuote" "Opening quotation mark" "Closing quotation mark") + '("MakeAutoQuote*" "Opening quotation mark" "Closing quotation mark") + + ;; 4.2 Quoting Text in a Foreign Language + '("MakeForeignQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Closing quotation mark") + '("MakeForeignQuote*" LaTeX-arg-csquotes-language + "Opening quotation mark" "Closing quotation mark") + + '("MakeHyphenQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Closing quotation mark") + '("MakeHyphenQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Closing quotation mark") + + ;; 4.3 Block Quoting of Regular Text + '("MakeBlockQuote" "Opening quotation mark" "Delimiter for citation" + "Closing quotation mark") + + ;; 4.4 Block Quoting of Text in a Foreign Language + '("MakeForeignBlockQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Delimiter for citation" "Closing quotation mark") + '("MakeHyphenBlockQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Delimiter for citation" "Closing quotation mark") + '("MakeHybridBlockQuote" LaTeX-arg-csquotes-language + "Opening quotation mark" "Delimiter for citation" "Closing quotation mark") + + ;; 4.5 Controlling Active Quotes + "EnableQuotes" + "DisableQuotes" + "VerbatimQuotes" + "DeleteQuotes" + + ;; 5.1 Formal Quoting of Regular Text + '("textcquote" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("textcquote*" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + + ;; 5.2 Formal Quoting of Text in a Foreign Language + '("foreigntextcquote" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("foreigntextcquote*" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("hyphentextcquote" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("hyphentextcquote*" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + + ;; 5.3 Block Quoting of Regular Text + '("blockcquote" ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + + ;; 5.4 Block Quoting of Text in a Foreign Language + '("foreignblockcquote" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("hyphenblockcquote" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + '("hybridblockcquote" LaTeX-arg-csquotes-language + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"] t) + + ;; 7 Auxiliary Commands + '("textelp" 1) + '("textelp*" 1) + '("textins" 1) + '("textins*" 1) + '("textdel" 1) + + ;; 8.1 Defining Quote Styles + `("DeclareQuoteStyle" + [ (TeX-arg-eval completing-read "Quote style variant: " + ',quote-style-variant-list) ] + (TeX-arg-eval completing-read "Quote style name: " + ',quote-style-name-list) + ["Outer quote initialization"] ["Inner quote initialization"] + "Opening outer quotation mark" ["Middle outer quotation mark"] + "Closing outer quotation mark" ["Kerning between adjoining marks"] + "Opening inner quotation mark" ["Middle inner quotation mark"] + "Closing inner quotation mark") + `("DeclareQuoteAlias" + [ (TeX-arg-eval completing-read "Quote style variant: " + ',quote-style-variant-list) ] + (TeX-arg-eval completing-read "Quote style name: " + ',quote-style-name-list) + "Alias name") + '("DeclareQuoteOption" 1) + '("ExecuteQuoteOptions" 1) + '("DeclarePlainStyle" "Opening outer quotation mark" + "Closing outer quotation mark" "Opening inner quotation mark" + "Closing inner quotation mark") + '("SetBlockThreshold" "Number of lines") + '("SetBlockEnvironment" "Environment") + '("SetCiteCommand" "Command") + + ;; 8.7 Hooks for Quotations and Citations + "mkcitation" + "mkccitation" + "mktextquote" + "mkblockquote" + "mkbegdispquote" + "mkenddispquote" + + ;; 8.8 Additional Tests in Quotation Hooks + '("ifpunctmark" "Character" 2) + '("ifpunct" 2) + '("ifterm" 2) + '("iftextpunctmark" 4) + '("iftextpunct" 3) + '("iftextterm" 3) + '("ifblockquote" 2) + '("ifblank" 3) + "unspace" + + ;; 8.9 Configuring Punctuation Look-Ahead + '("DeclareAutoPunct" "Characters")) + + ;; Don't increase indentation at various \if* macros: + (let ((exceptions '("ifpunctmark" + "ifpunct" + "ifterm" + "iftextpunctmark" + "iftextpunct" + "iftextterm" + "ifblockquote" + "ifblank"))) + (dolist (elt exceptions) + (add-to-list 'LaTeX-indent-begin-exceptions-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; New environments + (LaTeX-add-environments + + ;; 6.1 Basic Display Environments + '("displayquote" LaTeX-env-args + ["Citation"] ["Punctuation"]) + + '("foreigndisplayquote" LaTeX-env-args + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"]) + + '("hyphendisplayquote" LaTeX-env-args + LaTeX-arg-csquotes-language ["Citation"] ["Punctuation"]) + + ;; 6.2 Integrated Display Environments + '("displaycquote" LaTeX-env-args + ["Pre-note"] ["Post-note"] "Key" ["Punctuation"]) + + '("foreigndisplaycquote" LaTeX-env-args + LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" ["Punctuation"]) + + '("hyphendisplaycquote" LaTeX-env-args + LaTeX-arg-csquotes-language["Pre-note"] ["Post-note"] "Key" ["Punctuation"])) + + ;; Quotation marks + (when (and (> (length LaTeX-csquotes-open-quote) 0) + (> (length LaTeX-csquotes-close-quote) 0)) + (setq TeX-quote-language + `(override ,LaTeX-csquotes-open-quote ,LaTeX-csquotes-close-quote + ,LaTeX-csquotes-quote-after-quote))) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("EnableQuotes" "") + ("DisableQuotes" "") + ("VerbatimQuotes" "") + ("DeleteQuotes" "")) + 'function) + (font-latex-add-keywords '(("enquote" "*{") + ("foreignquote" "*{{") + ("hyphenquote" "*{{") + ("textquote" "*[[{") + ("foreigntextquote" "*{[[{") + ("hyphentextquote" "*{[[{") + ("blockquote" "[[{") + ("foreignblockquote" "{[[{") + ("hyphenblockquote" "{[[{") + ("hybridblockquote" "{[[{") + ("textcquote" "*[[{[{") + ("foreigntextcquote" "*{[[{[{") + ("hyphentextcquote" "*{[[{[{") + ("blockcquote" "[[{[{") + ("foreignblockcquote" "{[[{[{") + ("hyphenblockcquote" "{[[{[{") + ("hybridblockcquote" "{[[{[{")) + 'textual) + (font-latex-add-keywords '(("setquotestyle" "[{") + ("MakeOuterQuote" "{") + ("MakeInnerQuote" "{") + ("MakeAutoQuote" "*{{") + ("MakeForeignQuote" "*{{{") + ("MakeHyphenQuote" "*{{{") + ("MakeBlockQuote" "{{{") + ("MakeForeignBlockQuote" "{{{{") + ("MakeHyphenBlockQuote" "{{{{") + ("DeclareQuoteStyle" "[{[[{[{[{[{") + ("DeclareQuoteAlias" "[{{") + ("DeclareQuoteOption" "{") + ("DeclarePlainStyle" "{{{{") + ("SetBlockThreshold" "{") + ("SetBlockEnvironment" "{") + ("SetCiteCommand" "{")) + 'variable)))) + TeX-dialect) + +(defun LaTeX-csquotes-package-options () + "Prompt for package options for the csquotes package." + (TeX-read-key-val t '(("strict" ("true" "false")) + ("style" ("american" + "australian" + "austrian" + "brazil" + "brazilian" + "british" + "canadian" + "croatian" + "czech" + "danish" + "dutch" + "english" + "finnish" + "french" + "german" + "greek" + "italian" + "mexican" + "naustrian" + "newzealand" + "ngerman" + "norsk" + "norwegian" + "nswissgerman" + "nynorsk" + "portuges" + "portuguese" + "russian" + "serbian" + "spanish" + "swedish" + "swiss" + "swissgerman" + "UKenglish" + "USenglish")) + ("autostyle" ("true" "false" "try" "once" "tryonce")) + ("austrian" ("quotes" "guillemets")) + ("croatian" ("quotes" "guillemets" "guillemets*")) + ("czech" ("quotes" "guillemets")) + ("danish" ("quotes" "guillemets" "topquotes")) + ("english" ("american" "british")) + ("estonian") + ("french" ("quotes" "quotes*" "guillemets" "guillemets*")) + ("galician" ("quotes" "guillemets")) + ("german" ("quotes" "guillemets" "swiss")) + ("hungarian") + ("italian" ("guillemets" "quotes")) + ("latvian") + ("norwegian" ("guillemets" "quotes")) + ("polish" ("guillemets" "guillemets*")) + ("portuguese" ("portuguese" "brazilian")) + ("serbian" ("quotes" "guillemets" "german")) + ("spanish" ("spanish" "mexican")) + ("swedish" ("quotes" "guillemets" "guillemets*")) + ("maxlevel") + ("autopunct" ("true" "false")) + ("threshold") + ("thresholdtype" ("lines" "words")) + ("parthreshold" ("true" "false")) + ("splitcomp" ("true" "false")) + ("csdisplay" ("true" "false")) + ("debug" ("true" "false")) + ;; "babel" key is deprecated, replaced by "autostyle": + ;; ("babel" ("true" "false" "try" "once" "tryonce")) + ("version" ("4.4" "3.6" "3.0"))))) + +;;; csquotes.el ends here diff --git a/elpa/auctex-13.1.3/style/csquotes.elc b/elpa/auctex-13.1.3/style/csquotes.elc Binary files differnew file mode 100644 index 0000000..44f40a2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/csquotes.elc diff --git a/elpa/auctex-13.1.3/style/currvita.el b/elpa/auctex-13.1.3/style/currvita.el new file mode 100644 index 0000000..f1f27a3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/currvita.el @@ -0,0 +1,98 @@ +;;; currvita.el --- AUCTeX style for `currvita.sty' (v0.9i) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-01-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `currvita.sty' (v0.9i) from 1999/09/13. +;; `currvita.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; This is a modified version of `LaTeX-env-item'. +(defun LaTeX-currvita-env-with-label (env) + "Insert ENV, a mandatory label and the first item." + (LaTeX-insert-environment + env + (let ((heading (TeX-read-string "Heading of list: "))) + (format "{%s}" heading))) + (if (TeX-active-mark) + (progn + (LaTeX-find-matching-begin) + (end-of-line 1)) + (end-of-line 0)) + (delete-char 1) + (when (looking-at (concat "^[ \t]+$\\|" + "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) + (delete-region (point) (line-end-position))) + (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (deactivate-mark) + (LaTeX-insert-item) + ;; The inserted \item may have outdented the first line to the + ;; right. Fill it, if appropriate. + (when (and auto-fill-function + (not (looking-at "$")) + (not (assoc env LaTeX-indent-environment-list)) + (> (- (line-end-position) (line-beginning-position)) + (current-fill-column))) + (LaTeX-fill-paragraph nil))) + + +(TeX-add-style-hook + "currvita" + (lambda () + + ;; env's defined by currvita.sty + (LaTeX-add-environments + '("cv" "Heading of CV") + '("cvlist" LaTeX-currvita-env-with-label)) + + ;; Add "cvlist" to the list of environments which have an optional + ;; argument for each item + (add-to-list 'LaTeX-item-list '("cvlist" . LaTeX-item-argument)) + + ;; General commands: "\date" is already provided by AUCTeX + (TeX-add-symbols + '("cvplace" t) + "cvheadingfont" + "cvlistheadingfont" + "cvlabelfont" + "cvbibname") + + ;; Add new lengths defined by currvita.sty + (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep")) + TeX-dialect) + +(defvar LaTeX-currvita-package-options + '("LabelsAligned" "TextAligned" "openbib" "ManyBibs" "NoDate") + "Package options for the currvita package.") + +;;; currvita.el ends here diff --git a/elpa/auctex-13.1.3/style/currvita.elc b/elpa/auctex-13.1.3/style/currvita.elc Binary files differnew file mode 100644 index 0000000..bf9cdf7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/currvita.elc diff --git a/elpa/auctex-13.1.3/style/cuted.el b/elpa/auctex-13.1.3/style/cuted.el new file mode 100644 index 0000000..cb769fc --- /dev/null +++ b/elpa/auctex-13.1.3/style/cuted.el @@ -0,0 +1,73 @@ +;;; cuted.el --- AUCTeX style for `cuted.sty' (v2.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `cuted.sty' (v2.0) from 2021/10/04. +;; `cuted.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "cuted" + (lambda () + + ;; Add the only environment provided by the package: + (LaTeX-add-environments "strip") + + ;; This is a glue, in LaTeX set with \setlength: + (LaTeX-add-lengths "stripsep") + + ;; New symbols + (TeX-add-symbols + '("preCutedStrip" t) + '("postCutedStrip" t) + '("oldcolsbreak" t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("preCutedStrip" "{") + ("postCutedStrip" "{") + ("oldcolsbreak" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-cuted-package-options + '("spread" "nospread" "shrink" "noshrink" + "lspread" "nolspread" "lshrink" "nolshrink" + "rspread" "norspread" "rshrink" "norshrink" + "debug" "nodebug") + "Package options for the cuted package.") + +;;; cuted.el ends here diff --git a/elpa/auctex-13.1.3/style/cuted.elc b/elpa/auctex-13.1.3/style/cuted.elc Binary files differnew file mode 100644 index 0000000..4109ea2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/cuted.elc diff --git a/elpa/auctex-13.1.3/style/czech.el b/elpa/auctex-13.1.3/style/czech.el new file mode 100644 index 0000000..d000fe6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/czech.el @@ -0,0 +1,11 @@ +;;; czech.el --- Setup AUCTeX for editing Czech text. -*- lexical-binding: t; -*- + +(require 'tex) + +(TeX-add-style-hook + "czech" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("czech" "\\uv{" "}" ,TeX-quote-after-quote))) + (run-hooks 'TeX-language-cz-hook)) + TeX-dialect) diff --git a/elpa/auctex-13.1.3/style/czech.elc b/elpa/auctex-13.1.3/style/czech.elc Binary files differnew file mode 100644 index 0000000..e7c66de --- /dev/null +++ b/elpa/auctex-13.1.3/style/czech.elc diff --git a/elpa/auctex-13.1.3/style/danish.el b/elpa/auctex-13.1.3/style/danish.el new file mode 100644 index 0000000..a582e9e --- /dev/null +++ b/elpa/auctex-13.1.3/style/danish.el @@ -0,0 +1,26 @@ +;;; danish.el --- Setup AUCTeX for editing Danish text. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(TeX-add-style-hook + "danish" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("danish" "\"`" "\"'" ,TeX-quote-after-quote))) + (setq LaTeX-babel-hyphen-language "danish") + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\">" "\"<" german))) + (run-hooks 'TeX-language-dk-hook)) + TeX-dialect) + +;;; danish.el ends here diff --git a/elpa/auctex-13.1.3/style/danish.elc b/elpa/auctex-13.1.3/style/danish.elc Binary files differnew file mode 100644 index 0000000..ba556f4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/danish.elc diff --git a/elpa/auctex-13.1.3/style/dashundergaps.el b/elpa/auctex-13.1.3/style/dashundergaps.el new file mode 100644 index 0000000..cb58760 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dashundergaps.el @@ -0,0 +1,106 @@ +;;; dashundergaps.el --- AUCTeX style for `dashundergaps.sty' (v2.0d) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-11-24 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `dashundergaps.sty' v2.0d from +;; 2018/11/18. `dashundergaps.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-dashundergaps-key-val-options + `(;; 2.1.1 Gap modes + ("teacher-mode" ("true" "false")) + ("gap-mode" ("true" "false")) + ("teachermode" ("true" "false")) + ;; 2.1.2 Gap formatting + ("gap-format" ("underline" "double-underline" + "dash" "dot" "wave" "blank")) + ("gap-format-adjust" ("true" "false")) + ("teacher-gap-format" ("underline" "double-underline" + "dash" "dot" "wave" "blank")) + ("gap-font" ,(mapcar (lambda (x) + (concat TeX-esc x)) + '("rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries" + "upshape" "itshape" "slshape" "scshape" + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" "normalfont"))) + ("dash") + ("dot") + ;; 2.1.3 Gap numbers + ("gap-numbers" ("true" "false")) + ("gap-number-format") + ("numbers") + ("display-total-gaps" ("true" "false")) + ("displaynbgaps") + ;; 2.1.4 Gap widening + ("gap-widen" ("true" "false")) + ("gap-extend-minimum" ,(mapcar (lambda (x) + (concat TeX-esc x)) + (mapcar #'car (LaTeX-length-list)))) + ("gap-extend-percent") + ("widen")) + "Key=value options for dashundergaps macro.") + +(TeX-add-style-hook + "dashundergaps" + (lambda () + + ;; 2 The user interface + (TeX-add-symbols + '("gap" [ TeX-arg-key-val LaTeX-dashundergaps-key-val-options ] t) + '("gap*" [ TeX-arg-key-val LaTeX-dashundergaps-key-val-options ] t) + + '("TeacherModeOn" 0) + '("TeacherModeOff" 0) + + '("dashundergapssetup" + (TeX-arg-key-val LaTeX-dashundergaps-key-val-options))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("gap" "*[{")) + 'textual) + (font-latex-add-keywords '(("dashundergapssetup" "{") + ("TeacherModeOn" "") + ("TeacherModeOff" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-dashundergaps-package-options nil + "Package options for the dashundergaps package.") + +;;; dashundergaps.el ends here diff --git a/elpa/auctex-13.1.3/style/dashundergaps.elc b/elpa/auctex-13.1.3/style/dashundergaps.elc Binary files differnew file mode 100644 index 0000000..a4901d8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dashundergaps.elc diff --git a/elpa/auctex-13.1.3/style/dcolumn.el b/elpa/auctex-13.1.3/style/dcolumn.el new file mode 100644 index 0000000..8151f59 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dcolumn.el @@ -0,0 +1,51 @@ +;;; dcolumn.el --- AUCTeX style for `dcolumn.sty' (v1.06) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-12-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `dcolumn.sty' (v1.06) from 2014/10/28. +;; `dcolumn.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "dcolumn" + (lambda () + + ;; `dcolumn.sty' adds one new column specification letter: + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "D")) + + ;; Also run style hook for `array': + (TeX-run-style-hooks "array")) + TeX-dialect) + +(defvar LaTeX-dcolumn-package-options nil + "Package options for the dcolumn package.") + +;;; dcolumn.el ends here diff --git a/elpa/auctex-13.1.3/style/dcolumn.elc b/elpa/auctex-13.1.3/style/dcolumn.elc Binary files differnew file mode 100644 index 0000000..ff4b805 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dcolumn.elc diff --git a/elpa/auctex-13.1.3/style/dinbrief.el b/elpa/auctex-13.1.3/style/dinbrief.el new file mode 100644 index 0000000..fe8a5e9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dinbrief.el @@ -0,0 +1,283 @@ +;;; dinbrief.el --- Special code for LaTeX-Style dinbrief. -*- lexical-binding: t; -*- + +;; Copyright (C) 1994-2021 Free Software Foundation, Inc. + +;; Author: Werner Fink <werner@suse.de> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; LaTeX Class: dinbrief.cls + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "dinbrief" + (lambda () + (add-hook 'LaTeX-document-style-hook + #'LaTeX-dinbrief-style) + (LaTeX-add-environments + '("letter" LaTeX-dinbrief-env-recipient) + "dinquote") + (TeX-add-symbols + '("address" "Absender") + '("postremark" "Postvermerk") + '("date" "Datum") + '("subject" "Betreff") + '("handling" "Behandlungsvermerk") + '("cc" "Verteiler") + '("place" "Heutiger Ort") + "makelabels" + "nowindowrules" + "windowrules" + "nowindowtics" + "windowtics" + "disabledraftstandard" + "enabledraftstandard" + "centeraddress" + "normaladdress" + '("encl" "Anlagen: ") + '("backaddress" "Retouradresse") + '("signature" "Unterschrift") + '("opening" "Anrede") + '("closing" "Schluss"))) + TeX-dialect) + +(defmacro LaTeX-dinbrief-insert (&rest args) + "Insert text ignoring active markers." + `(progn (if mark-active (deactivate-mark)) + (insert ,@args))) + +(defun LaTeX-dinbrief-style () + "Insert some useful packages for writing german letters." + ;; COMPATIBILITY for EMACS<26 + (let ((func (if (fboundp 'indent-relative-first-indent-point) + #'indent-relative-first-indent-point + ;; Stay away from using #' to avoid compiler warning. + 'indent-relative-maybe))) + (save-excursion + (goto-char (point-min)) ; insert before \begin{document} + (if (re-search-forward ".begin.document." (point-max) t) + (beginning-of-line 1)) + (open-line 2) + (funcall func) + (LaTeX-dinbrief-insert TeX-esc "usepackage" + LaTeX-optop "latin1,utf8" LaTeX-optcl + TeX-grop "inputenc" TeX-grcl) + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "usepackage" + LaTeX-optop "T1" LaTeX-optcl + TeX-grop "fontenc" TeX-grcl) + (funcall func) + (LaTeX-dinbrief-insert TeX-esc "usepackage" + TeX-grop "ngerman" TeX-grcl)) + (TeX-run-style-hooks "inputenc" "fontenc" "ngerman"))) + +(defun LaTeX-dinbrief-env-recipient (environment) + "Insert ENVIRONMENT and prompt for recipient and address." + (let ((sender (LaTeX-dinbrief-sender)) + (recipient (TeX-read-string "Empfänger: ")) + (address (LaTeX-dinbrief-recipient)) + (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today))) + (postremark (TeX-read-string "Postvermerk: ")) + (fenster (TeX-read-string "Fenster (ja/nein): ")) + (vermerk (TeX-read-string "Behandlungsvermerk: ")) + (verteil (TeX-read-string "Verteiler: ")) + (betreff (TeX-read-string "Betreff: ")) + (opening (TeX-read-string "Anrede: ")) + (closing (TeX-read-string "Schluss: ")) + (signature (TeX-read-string "Unterschrift: ")) + (anlage (TeX-read-string "Anlagen: ")) + ;; COMPATIBILITY for EMACS<26 + (func (if (fboundp 'indent-relative-first-indent-point) + #'indent-relative-first-indent-point + ;; Stay away from using #' to avoid compiler warning. + 'indent-relative-maybe))) + (if (string= fenster "ja") + (progn + (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "centeraddress") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "nowindowrules") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "windowtics") + (newline-and-indent) + (let ((retouradr (TeX-read-string "Retouradresse: " sender))) + (newline-and-indent) + (if (not (zerop (length retouradr))) + (progn + (if mark-active (deactivate-mark)) + (LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop retouradr TeX-grcl) + (newline-and-indent))))) + (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "centeraddress") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "nowindowrules") + (newline-and-indent) + (LaTeX-dinbrief-insert TeX-esc "windowtics")) + (newline-and-indent) + (if (not (zerop (length signature))) + (progn + (LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length date))) + (progn + (LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl) + (newline-and-indent))) + (newline-and-indent) + + (let ((indentation (current-column))) + (LaTeX-insert-environment + environment + (concat TeX-grop recipient + (if (not (zerop (length address))) + (concat + (if (not (zerop (length recipient))) + (concat " " TeX-esc TeX-esc " ")) + address)) + TeX-grcl)) + (save-excursion ; Fix indentation of address + (if (search-backward TeX-grcl nil 'move) + (let ((addr-end (point-marker))) + (if (search-backward TeX-grop nil 'move) + (let ((addr-column (current-column))) + (while (search-forward + (concat TeX-esc TeX-esc) + (marker-position addr-end) 'move) + (progn + (newline) + (indent-to addr-column))))) + (set-marker addr-end nil)))) + (LaTeX-dinbrief-insert "\n") + (indent-to indentation)) + (if (not (zerop (length postremark))) + (progn + (LaTeX-dinbrief-insert TeX-esc "postremark" TeX-grop postremark TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length betreff))) + (progn + (LaTeX-dinbrief-insert TeX-esc "subject" TeX-grop) + (LaTeX-dinbrief-insert betreff TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length vermerk))) + (progn + (LaTeX-dinbrief-insert TeX-esc "handling" TeX-grop vermerk TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length verteil))) + (progn + (LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length anlage))) + (progn + (LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl) + (newline-and-indent))) + (LaTeX-dinbrief-insert TeX-esc "opening" + TeX-grop + (if (zerop (length opening)) + (concat TeX-esc " ") + opening) + TeX-grcl "\n") + + (funcall func) + (save-excursion + (LaTeX-dinbrief-insert "\n" TeX-esc "closing" + TeX-grop + (if (zerop (length closing)) + (concat TeX-esc " ") + closing) + TeX-grcl "\n") + (funcall func)))) + +(defun LaTeX-dinbrief-sender () + "Read and write the senders address." + (interactive) + (let ((name (TeX-read-string "Absender: " (user-full-name))) + (str (TeX-read-string "Meine Strasse: ")) + (ort (TeX-read-string "Mein Wohnort: "))) + (if (not (zerop (length name))) + (progn + (goto-char (point-min)) ; insert before \end{document} + (if (re-search-forward ".end.document." (point-max) t) + (beginning-of-line 1)) + (forward-line -1) + (LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name) + (if (not (zerop (length str))) + (progn + (LaTeX-dinbrief-insert " " TeX-esc TeX-esc) + (newline-and-indent) + (LaTeX-dinbrief-insert str))) + (if (not (zerop (length ort))) + (progn + (LaTeX-dinbrief-insert " " TeX-esc "par") + (newline-and-indent) + (LaTeX-dinbrief-insert ort))) + (LaTeX-dinbrief-insert TeX-grcl) + (newline-and-indent) + (concat name ", " str ", " ort))))) + +(defun LaTeX-dinbrief-recipient () + "Read and return the recipient address." + (interactive) + (let ((str (TeX-read-string "Wohnhaft in Strasse: ")) + (ort (TeX-read-string "Aus der Ortschaft: "))) + (if (not (zerop (length str))) + (if (not (zerop (length ort))) + (concat str " " TeX-esc TeX-esc " " ort) + str) + (if (not (zerop (length ort))) + ort)))) + +(defun LaTeX-dinbrief-today () + "Return a string representing todays date according to flavor." + (interactive) + (let ((ctime-string (current-time-string)) + (month-alist '(("Jan" . "Januar") + ("Feb" . "Februar") + ("Mar" . "M\\\"arz") + ("Apr" . "April") + ("May" . "Mai") + ("Jun" . "Juni") + ("Jul" . "Juli") + ("Aug" . "August") + ("Sep" . "September") + ("Oct" . "Oktober") + ("Nov" . "November") + ("Dec" . "Dezember")))) + (string-match + "^\\S-+\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-+\\S-+\\s-+\\(\\S-+\\)" + ctime-string) + (let ((year (substring ctime-string (match-beginning 3) (match-end 3))) + (month (substring ctime-string (match-beginning 1) (match-end 1))) + (day (substring ctime-string (match-beginning 2) (match-end 2))) + (place (TeX-read-string "Heutiger Ort: "))) + (if (assoc month month-alist) + (progn + (setq month (cdr (assoc month month-alist))) + (if (> 2 (length day)) + (setq day (concat "0" day))))) + (format "%s, den %s. %s %s" place day month year)))) + +;;; dinbrief.el ends here diff --git a/elpa/auctex-13.1.3/style/dinbrief.elc b/elpa/auctex-13.1.3/style/dinbrief.elc Binary files differnew file mode 100644 index 0000000..a058396 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dinbrief.elc diff --git a/elpa/auctex-13.1.3/style/dk-bib.el b/elpa/auctex-13.1.3/style/dk-bib.el new file mode 100644 index 0000000..18db014 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dk-bib.el @@ -0,0 +1,62 @@ +;;; dk-bib.el --- AUCTeX style for `dk-bib.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2021 Free Software Foundation, Inc. + +;; Author: Arne Jørgensen <arne@arnested.dk> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301, USA. + +;;; Commentary: + +;; Prompt for package option for dk-bib.sty. + +;;; Code: + +(require 'tex) + +(defun LaTeX-dk-bib-package-options nil + "Prompt for package options for the dk-bib package." + (let ((options + (mapconcat #'identity + (TeX-completing-read-multiple + "Options: " + '(("isbn") ("issn") ("url") ("annote") + ("printing") ("apalike") ("fixcitedash=false") + ("ordinals2word") ("ordinaldepth="))) + ",")) + (depth -1)) + (when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options) + (while (or (< depth 0) + (> depth 20)) + (setq depth (read-number "Ordinal depth: ")) + (when (or (< depth 0) + (> depth 20)) + (message "Ordinal depth must be between 0 and 20") + (sit-for 1))) + (setq options (concat + (substring options 0 (match-end 1)) + (number-to-string depth) + (substring options (match-end 1))))) + options)) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; dk-bib.el ends here diff --git a/elpa/auctex-13.1.3/style/dk-bib.elc b/elpa/auctex-13.1.3/style/dk-bib.elc Binary files differnew file mode 100644 index 0000000..d28b9c0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dk-bib.elc diff --git a/elpa/auctex-13.1.3/style/dk.el b/elpa/auctex-13.1.3/style/dk.el new file mode 100644 index 0000000..2d7d783 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dk.el @@ -0,0 +1,13 @@ +;;; dk.el - Setup AUCTeX for editing Danish text. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "dk" + (lambda () + (run-hooks 'TeX-language-dk-hook)) + TeX-dialect) + +;;; dk.el ends here diff --git a/elpa/auctex-13.1.3/style/dk.elc b/elpa/auctex-13.1.3/style/dk.elc Binary files differnew file mode 100644 index 0000000..945ebc3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/dk.elc diff --git a/elpa/auctex-13.1.3/style/doc.el b/elpa/auctex-13.1.3/style/doc.el new file mode 100644 index 0000000..63c6580 --- /dev/null +++ b/elpa/auctex-13.1.3/style/doc.el @@ -0,0 +1,466 @@ +;;; doc.el --- AUCTeX style for `doc.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2022 Free Software Foundation, Inc. + +;; Author: Frank Küster <frank@kuesterei.ch> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `doc.sty' (v3.0h) dated 2022/06/01. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(defun LaTeX-env-doc-no-comment (environment) + "Insert ENVIRONMENT and make sure there is no commented empty line inside." + (LaTeX-insert-environment environment) + (unless (TeX-active-mark) + (when (save-excursion + (beginning-of-line) + (looking-at (concat "[ \t]+$\\|[ \t]*" + TeX-comment-start-regexp "+[ \t]*$"))) + (delete-region (line-beginning-position) (line-end-position)) + (indent-according-to-mode)))) + +(defun LaTeX-env-doc-commented (environment) + "Insert ENVIRONMENT and make sure all parts are in comments. +This functions search for the begin and the end of the inserted +environment and makes sure those parts are in comments. The same +applies also to the point inside after the insertion." + (LaTeX-insert-environment + environment + (if (string= environment "macro") + ;; For 'macro' environment, elements will start with a + ;; backslash, so we insert them initially: + (progn + (let ((opt (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Suppress option") + '("noindex" "noprint")) + ",")) + (mac (TeX-read-string + (TeX-argument-prompt nil nil "Macro(s)") + TeX-esc))) + (concat (when (and opt (not (string= opt ""))) + (format "[%s]" opt)) + (format "{%s}" mac)))) + ;; For other environments, we don't know about the elements, + ;; so do nothing. For 'environment', we adjust the prompt in + ;; minibuffer. + (let ((opt (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Suppress option") + '("noindex" "noprint")) + ",")) + (env (TeX-read-string + (TeX-argument-prompt nil nil + (if (string= environment "environment") + "Environment(s)" + "Element(s)"))))) + (concat + (when (and opt (not (string= opt ""))) + (format "[%s]" opt)) + (format "{%s}" env))))) + ;; Now make sure everything is commented: + (let ((p (point-marker)) + (active-mark (and (TeX-active-mark) + (not (eq (mark) (point))))) + (func (lambda () + (if (TeX-in-line-comment) + (indent-according-to-mode) + (delete-horizontal-space) + (beginning-of-line) + (insert "%") + (indent-according-to-mode))))) + ;; Go to the start of the env we have inserted: + (search-backward (concat "\\begin" TeX-grop environment TeX-grcl) + (if active-mark nil (line-beginning-position 0)) + t) + ;; If the line is not commented, insert % + (funcall func) + (goto-char p) + ;; Do the same for the end of the environment + (search-forward (concat "\\end" TeX-grop environment TeX-grcl) + (if active-mark nil (line-end-position 2)) + t) + (goto-char (match-beginning 0)) + (funcall func) + ;; Finally for where we started and clean up only when region was + ;; not active: + (goto-char p) + (unless active-mark (funcall func)) + (set-marker p nil))) + +(defun LaTeX-doc-after-insert-macrocode (env start end) + "Make sure the macrocode environment is properly formatted after insertion." + (when (TeX-member env '("macrocode" "macrocode*") + #'string-equal) + (save-excursion + (goto-char end) + (skip-chars-backward " \t") + (when (bolp) + (insert "%") + (indent-according-to-mode)) + (goto-char start) + (skip-chars-backward " \t") + (when (bolp) + (insert "%") + (indent-according-to-mode))))) + +(defvar LaTeX-doc-newdocelement-key-val-options + '(("macrolike" ("true" "false")) + ("envlike" ("true" "false")) + ("toplevel" ("true" "false")) + ("notoplevel" ("true" "false")) + ("idxtype") + ("printtype") + ("idxgroup") + ("noindex" ("true" "false")) + ("noprint" ("true" "false"))) + "Key=value options for '\\NewDocElement' macro.") + +;; Setup for \NewDocElement: + +(TeX-auto-add-type "doc-NewDocElement" "LaTeX") + +(defvar LaTeX-doc-NewDocElement-regexp + `(,(concat "^[ \t%]*" + "\\\\NewDocElement" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + (1 2) LaTeX-auto-doc-NewDocElement) + "Matches the arguments of '\\NewDocElement' from doc package. +AUCTeX parser doesn't look for text parts commented out. +Therefore, the regexp in this variable explicitly looks for a +percent sign at the beginning of a line before +'\\NewDocElement'.") + +(defun LaTeX-doc-auto-prepare () + "Clear `LaTeX-auto-doc-NewDocElement' before parsing." + (setq LaTeX-auto-doc-NewDocElement nil)) + +(defun LaTeX-doc-auto-cleanup () + "Process elements defined with '\\NewDocElement'." + (when (LaTeX-doc-NewDocElement-list) + ;; Make sure `docTeX-indent-inner-fixed' is local: + (make-local-variable 'docTeX-indent-inner-fixed) + + ;; \NewDocElement[<options>]{<element-name>}{<env-name>} defines: + ;; 1. \Describe<element-name>[<options>]{<element>} + ;; 2. \begin{<env-name>}[<options>]{<element>} + ;; 3. \PrintDescribe<element-name>{<element>} + ;; 4. \Print<element-name>Name + (let (macs) + (dolist (elt (LaTeX-doc-NewDocElement-list)) + (let ((eltname (car elt)) + (envname (cadr elt))) + (TeX-add-symbols + ;; Cater for \Describe<eltname>[options]{<elements query>} + `(,(concat "Describe" eltname) + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Suppress option") + '("noindex" "noprint")] + "Element") + + ;; Cater for \PrintDescribe<eltname>{<elements query>} + `(,(concat "PrintDescribe" eltname) "Element") + + ;; Cater for \Print<eltname>Name + (concat "Print" eltname "Name")) + + ;; Add the \Describe<element-name> to macs + (push (concat "Describe" eltname) macs) + + ;; Cater for \begin{<envname>}[options]{<elements query>} + (LaTeX-add-environments + `(,envname LaTeX-env-doc-commented)) + + ;; Make sure we have fixed inner indent for our environments: + (add-to-list 'docTeX-indent-inner-fixed + `(,(concat (regexp-quote TeX-esc) + "\\(begin\\|end\\)[ \t]*" + (regexp-quote TeX-grop) + envname + (regexp-quote TeX-grcl)) + 0 nil) + t) + ;; Add fontification: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,(concat "Describe" eltname) "[|{\\" )) + 'variable)))) + + ;; Let \Describe<element-name> stay in their own lines: + (LaTeX-paragraph-commands-add-locally macs)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-doc-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-doc-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "doc" + (lambda () + + ;; Add doc to the parser: + (TeX-auto-add-regexp LaTeX-doc-NewDocElement-regexp) + + (add-hook 'LaTeX-after-insert-env-hook #'LaTeX-doc-after-insert-macrocode + nil t) + + (LaTeX-add-environments + ;; 2.3 General conventions + '("macrocode" LaTeX-env-doc-no-comment) + '("macrocode*" LaTeX-env-doc-no-comment) + + ;; 2.5 Describing the definition of macros and environments + '("macro" LaTeX-env-doc-commented) + '("environment" LaTeX-env-doc-commented) + + '("theglossary" LaTeX-env-item)) + + (TeX-add-symbols + ;; 2.1 The driver file + '("DocInput" + (TeX-arg-eval + (lambda () + (let ((file (file-relative-name + (read-file-name + "File to input: " nil nil nil nil + (lambda (x) + (or (file-directory-p x) + (string-match "\\.\\(fdd\\|dtx\\)\\'" x)))) + (TeX-master-directory)))) + (format "%s" file))))) + + '("IndexInput" + (TeX-arg-eval + (lambda () + (let ((file (file-relative-name + (read-file-name + "File to input: " nil nil nil nil + (lambda (x) + (or (file-directory-p x) + (string-match "\\.\\(tex\\|ltx\\|fdd\\|dtx\\)\\'" x)))) + (TeX-master-directory)))) + (format "%s" file))))) + + ;; 2.2 Package options + '("SetupDoc" (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Options") + LaTeX-doc-package-options) + ",")) + + ;; 2.4 Describing the usage of macros and environments + '("DescribeMacro" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Suppress option") + '("noindex" "noprint")] + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Macro") + TeX-esc))) + (format "%s" name))))) + '("DescribeEnv" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Suppress option") + '("noindex" "noprint")] + "Environment") + + ;; 2.5 Describing the definition of macros and environments + "MacroFont" + + ;; 2.6 Formatting names in the margin + '("PrintDescribeMacro" "Element") + '("PrintDescribeEnv" "Element") + "PrintMacroName" + "PrintEnvName" + + ;; 2.7 Providing further documentation items + '("NewDocElement" + [TeX-arg-key-val LaTeX-doc-newdocelement-key-val-options] + "Element name" "Environment name") + + ;; 2.8 Displaying sample code verbatim + ;; "verbatim" environment and "verb" macro are provided by + ;; latex.el, so we don't add them here again. + + ;; 2.9 Using a special escape character + '("SpecialEscapechar" "Character") + + ;; 2.10 Cross-referencing all macros used + "DisableCrossrefs" + "EnableCrossrefs" + ;; We don't fontify the next macro since it is a one-liner anyway + '("DoNotIndex" t) + "CodelineIndex" + "PageIndex" + "theCodelineNo" + "CodelineNumbered" + + ;; 2.11 Producing the actual index entries + "actualchar" + "quotechar" + "encapchar" + "levelchar" + + "SpecialMainMacroIndex" + "SpecialMainEnvIndex" + "SpecialMacroIndex" + "SpecialEnvIndex" + "SpecialIndex" + "SpecialShortIndex" + "SortIndex" + "verbatimchar" + + "subitem" + "subsubitem" + "indexspace" + "efill" + "pfill" + + ;; 2.12 Setting the index entries: theindex environment is + ;; provided by latex.el. + "PrintIndex" + '("IndexPrologue" t) + "IndexParms" + "main" + "usage" + "code" + + ;; 2.13 Changing the default values of style parameters + "DocstyleParms" + + ;; 2.14 Short input of verbatim text pieces: These macros are + ;; provided by 'shortvrb.el' which is run later + + ;; 2.15 Additional bells and whistles + "Web" + "AmSTeX" + "BibTeX" + "SliTeX" + "PlainTeX" + '("meta" "Text") + "OnlyDescription" + '("StopEventually" t) + '("MaybeStop" t) + "Finale" + "AlsoImplementation" + "IndexInput" + '("changes" "version" TeX-arg-date t) + "generalname" + "RecordChanges" + "PrintChanges" + "GlossaryPrologue" + "GlossaryParms" + "bslash" + "MakePrivateLetters" + "DontCheckModules" + "CheckModules" + "Module" + '("AltMacroFont" t) + + ;; 5.1 makeindex bugs + "PercentIndex" + ;; 5.2 File transmission issues + '("CheckSum" t) + '("CharacterTable" t)) + + (TeX-run-style-hooks "shortvrb") + + (LaTeX-add-lengths "MacrocodeTopsep" "MacroTopsep" "MacroIndent" + "IndexMin" "GlossaryMin") + (LaTeX-add-counters "IndexColumns" "GlossaryColumns" "StandardModuleDepth") + + ;; Macros which should be on their own line: + (LaTeX-paragraph-commands-add-locally '("DescribeEnv" + "DescribeMacro" + "changes")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("SetupDoc" "{") + ("NewDocElement" "[{{") + ("RenewDocElement" "[{{") + ("SpecialEscapechar" "{") + ("DisableCrossrefs" "") + ("EnableCrossrefs" "") + ("CodelineIndex" "") + ("PageIndex" "") + ("CodelineNumbered" "") + ("PrintIndex" "") + ("IndexPrologue" "") + ("AmSTeX" "") + ("BibTeX" "") + ("SliTeX" "") + ("PlainTeX" "") + ("OnlyDescription" "") + ("StopEventually" "") + ("MaybeStop" "") + ("Finale" "") + ("AlsoImplementation" "") + ("changes" "{{{") + ("PrintChanges" "") + ("RecordChanges" "")) + 'function) + (font-latex-add-keywords '(("DescribeMacro" "[|{\\") + ("DescribeEnv" "[{")) + 'variable) + (font-latex-add-keywords '(("meta" "{")) + 'textual) + (font-latex-add-keywords '(("DocInput" "{") + ("DocInclude" "{" ) + ("IndexInput" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-doc-package-options + '("hyperref" "nohyperref" + "multicol" "nomulticol" + "debugshow" + "noindex" "noprint" + "reportchangedates") + "Package options for the doc package.") + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; doc.el ends here diff --git a/elpa/auctex-13.1.3/style/doc.elc b/elpa/auctex-13.1.3/style/doc.elc Binary files differnew file mode 100644 index 0000000..6ce6b04 --- /dev/null +++ b/elpa/auctex-13.1.3/style/doc.elc diff --git a/elpa/auctex-13.1.3/style/dutch.el b/elpa/auctex-13.1.3/style/dutch.el new file mode 100644 index 0000000..47da9ca --- /dev/null +++ b/elpa/auctex-13.1.3/style/dutch.el @@ -0,0 +1,13 @@ +;;; dutch.el - Setup AUCTeX for editing Dutch text. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "dutch" + (lambda () + (run-hooks 'TeX-language-nl-hook)) + TeX-dialect) + +;;; dutch.el ends here diff --git a/elpa/auctex-13.1.3/style/dutch.elc b/elpa/auctex-13.1.3/style/dutch.elc Binary files differnew file mode 100644 index 0000000..8ccc47e --- /dev/null +++ b/elpa/auctex-13.1.3/style/dutch.elc diff --git a/elpa/auctex-13.1.3/style/emp.el b/elpa/auctex-13.1.3/style/emp.el new file mode 100644 index 0000000..ad2bc27 --- /dev/null +++ b/elpa/auctex-13.1.3/style/emp.el @@ -0,0 +1,85 @@ +;;; emp.el --- AUCTeX support for emp.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2014, 2020 Free Software Foundation, Inc. + +;; Author: Yvon Henel aka TeXnicien de surface <Yvon.Henel@wanadoo.fr> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;; version 1.0 2004-03-04 + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "emp" + (lambda () + (TeX-add-symbols "empuse" "empTeX" "empaddtoTeX" + "emprelude" "empaddtoprelude" "unitlength") + (LaTeX-add-environments + '("empfile" LaTeX-env-empfile) + '("emp" LaTeX-env-emp-gen) + '("empdef" LaTeX-env-emp-gen) + '("empgraph" LaTeX-env-emp-gen) + '("empcmds"))) + TeX-dialect) + +(defun LaTeX-env-emp-gen (environment-name) + "Ask for file, width and length. Insert environment-name environment +Used for emp, empdef, and empgraph environments." + (let ((emp-fig-name (TeX-read-string "figure name: " "")) + (emp-fig-width (TeX-read-string "figure width: " "1" )) + (emp-fig-height (TeX-read-string "figure height: " "1" )) + ;;; emp.sty demands a width and a height for each of the + ;;; emp, empdef, and empgraph environments + ;;; we give them 1 by default + ;;; not necessarily the best thing to do? + LaTeX-emp-fig-name) + (if (not (zerop (length emp-fig-name))) + (progn + (setq LaTeX-emp-fig-name (concat LaTeX-optop emp-fig-name LaTeX-optcl)) + (LaTeX-insert-environment environment-name LaTeX-emp-fig-name)) + (LaTeX-insert-environment environment-name)) + (forward-line -1) + (end-of-line) + (insert "(" emp-fig-width "," emp-fig-height ")") + (forward-line 1) + (indent-according-to-mode))) + +(defun LaTeX-env-empfile (_optional) + "Ask for file. Insert empfile environment." + (let ((empfile (TeX-read-string "empfile: " "")) + LaTeX-emp-file-name mpost-emp-file-name) + (if (not (zerop (length empfile))) + (progn + (setq LaTeX-emp-file-name (concat LaTeX-optop empfile LaTeX-optcl)) + (setq mpost-emp-file-name (concat empfile ".mp")) + (LaTeX-insert-environment "empfile" LaTeX-emp-file-name)) + (setq mpost-emp-file-name "\\jobname") + (LaTeX-insert-environment "empfile")) + (if LaTeX-write18-enabled-p + (progn + (forward-line 1) + (end-of-line) + (newline-and-indent) + (insert "\\immediate\\write18{mpost -tex=latex " mpost-emp-file-name TeX-grcl) + (forward-line -2))))) + +;;; emp.el ends here diff --git a/elpa/auctex-13.1.3/style/emp.elc b/elpa/auctex-13.1.3/style/emp.elc Binary files differnew file mode 100644 index 0000000..ac57073 --- /dev/null +++ b/elpa/auctex-13.1.3/style/emp.elc diff --git a/elpa/auctex-13.1.3/style/empheq.el b/elpa/auctex-13.1.3/style/empheq.el new file mode 100644 index 0000000..b9f32b1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/empheq.el @@ -0,0 +1,485 @@ +;;; empheq.el --- AUCTeX style for `empheq.sty' (v2.14) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016-2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-08-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `empheq.sty' (v2.14) from 2014/08/04. +;; `empheq.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-item-equation-alignat + "amsmath" (&optional suppress)) + +(defvar LaTeX-mathtools-package-options) + +(defvar LaTeX-empheq-key-val-options + `(("box") + ("innerbox") + ("left" ,(mapcar + (lambda (x) + (concat TeX-esc x)) + '("empheqlbrace" + "empheqlbrack" + "empheqlangle" + "empheqlparen" + "empheqlvert" + "empheqlVert" + "empheqlfloor" + "empheqlceil" + "empheqbiglbrace" + "empheqbiglbrack" + "empheqbiglangle" + "empheqbiglparen" + "empheqbiglvert" + "empheqbiglVert" + "empheqbiglfloor" + "empheqbiglceil"))) + ("right" ,(mapcar + (lambda (x) + (concat TeX-esc x)) + '("empheqrbrace" + "empheqrbrack" + "empheqrangle" + "empheqrparen" + "empheqrvert" + "empheqrVert" + "empheqrfloor" + "empheqrceil" + "empheqbigrbrace" + "empheqbigrbrack" + "empheqbigrangle" + "empheqbigrparen" + "empheqbigrvert" + "empheqbigrVert" + "empheqbigrfloor" + "empheqbigrceil"))) + ("outerbox") + ("marginbox")) + "Key=value options for environments from empheq.sty.") + +(defvar LaTeX-empheq-supported-amsmath-envs + '("equation" "equation*" + "align" "align*" + "gather" "gather*" + "flalign" "flalign*" + "alignat" "alignat*" + "multline" "multline*") + "List of amsmath environments supported by empheq package.") + +(defvar LaTeX-empheq-package-options + '("overload" "overload2" "ntheorem" "newmultline" "oldmultline") + "Package options for the empheq package.") +(TeX-load-style "mathtools") +;; Add elements from `LaTeX-mathtools-package-options' only once +;; and not every time the style hook runs +(dolist (elt LaTeX-mathtools-package-options) + (add-to-list 'LaTeX-empheq-package-options elt)) + +;; Setup for \Declare(Left|Right)Delimiter: + +(TeX-auto-add-type "empheq-declaredelimiter" "LaTeX") + +(defvar LaTeX-empheq-declaredelimiter-regexp + `(,(concat "\\\\Declare\\(Left\\|Right\\)Delimiter" + "[ \t\n\r%]*" + "\\(?:\\[[^]]*\\]\\)?" + "[ \t\n\r%]*" + "{" + (regexp-quote TeX-esc) + "\\([^}]+\\)}") + (2 1) LaTeX-auto-empheq-declaredelimiter) + "Matches the argument of \\Declare(Left|Right)Delimiter from empheq package.") + +(defun LaTeX-empheq-auto-prepare () + "Clear `LaTeX-auto-empheq-declaredelimiter' before parsing." + (setq LaTeX-auto-empheq-declaredelimiter nil)) + +(defun LaTeX-empheq-auto-cleanup () + "Process parsed delimiters." + (dolist (delim (mapcar #'car (LaTeX-empheq-declaredelimiter-list))) + (TeX-add-symbols (concat "empheq" delim) + (concat "empheqbig" delim)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-empheq-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-empheq-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-empheq-key-val-options () + "Return an updated list of key=vals from empheq package. +This function retrieves values of user defined left and right +delimiters and prepends them to variable +`LaTeX-empheq-key-val-options'." + (append + (when (LaTeX-empheq-declaredelimiter-list) + (let ((lvals (copy-sequence + (cadr (assoc "left" LaTeX-empheq-key-val-options)))) + (rvals (copy-sequence + (cadr (assoc "right" LaTeX-empheq-key-val-options))))) + (dolist (delims (LaTeX-empheq-declaredelimiter-list)) + (let ((delim (car delims)) + (where (cadr delims))) + (if (string= where "Left") + (progn + (cl-pushnew (concat TeX-esc "empheq" delim) lvals :test #'equal) + (cl-pushnew (concat TeX-esc "empheqbig" delim) lvals :test #'equal)) + (cl-pushnew (concat TeX-esc "empheq" delim) rvals :test #'equal) + (cl-pushnew (concat TeX-esc "empheqbig" delim) rvals :test #'equal)))) + `(("left" ,lvals) + ("right" ,rvals)))) + LaTeX-empheq-key-val-options)) + +(defun LaTeX-empheq-env (env) + "Query for a supported amsmath environment and insert it accordingly. +ENV is the name of environment passed to the function in the style hook." + (let* ((keyvals (TeX-read-key-val t (LaTeX-empheq-key-val-options))) + (amsenv (completing-read + (TeX-argument-prompt nil nil "amsmath environment") + LaTeX-empheq-supported-amsmath-envs)) + (ncols (when (or (string= amsenv "alignat") + (string= amsenv "alignat*")) + (TeX-read-string + (TeX-argument-prompt nil nil "Number of columns")))) + num) + (LaTeX-insert-environment + env + (concat + (when (and keyvals (not (string= keyvals ""))) + (concat LaTeX-optop keyvals LaTeX-optcl)) + TeX-grop + (if (and ncols (not (string= ncols ""))) + (concat amsenv "=" ncols) + amsenv) + TeX-grcl)) + (when (and (assoc amsenv LaTeX-label-alist) + (LaTeX-label amsenv 'environment)) + (LaTeX-newline) + (indent-according-to-mode)) + (when (and ncols (not (string= ncols ""))) + (setq num (string-to-number ncols)) + (save-excursion + (insert (make-string (+ num num -1) ?&)))))) + +(defun LaTeX-empheq-env-overload (env &optional _ignore) + "Insert amsmath ENV's when option overload is given to empheq package. +This function combines the capabilities of `LaTeX-env-label' and +`LaTeX-amsmath-env-alignat'. It overwrites the definitions of +`amsmath.el'." + (if (or (string= env "alignat") + (string= env "alignat*")) + (let ((ncols (TeX-read-string + (TeX-argument-prompt nil nil "Number of columns"))) + (keyvals (TeX-read-key-val t + (LaTeX-empheq-key-val-options) + "empheq options (k=v)"))) + (LaTeX-insert-environment env + (concat TeX-grop ncols TeX-grcl + (when (and keyvals + (not (string= keyvals ""))) + (concat LaTeX-optop + keyvals + LaTeX-optcl)))) + (LaTeX-item-equation-alignat t)) + (let ((keyvals + (TeX-read-key-val t + (LaTeX-empheq-key-val-options) + "empheq options (k=v)"))) + (LaTeX-insert-environment env + (when (and keyvals + (not (string= keyvals ""))) + (concat LaTeX-optop + keyvals + LaTeX-optcl))) + (when (and (assoc env LaTeX-label-alist) + (LaTeX-label env 'environment)) + (LaTeX-newline) + (indent-according-to-mode))))) + +(defun LaTeX-empheq-item-equation () + "Insert contents to terminate a line in multi-line equations environment. +Put line break macro on the last line. Next, if the current +environment wants \\label, insert it also. And insert suitable +number of ampersands if possible." + (let ((env (LaTeX-current-environment)) + amsenv ncols match) + (save-excursion + (LaTeX-find-matching-begin) + (re-search-forward (concat (regexp-quote TeX-esc) + "begin" TeX-grop env TeX-grcl)) + (when (looking-at "[ \t\n\r%]*\\[") + (forward-sexp)) + (re-search-forward "[ \t\n\r%]*{\\([^}]+\\)}") + (setq match (replace-regexp-in-string "[ \t\n\r%]" "" + (match-string-no-properties 1))) + (if (string-match "=" match) + (progn + (setq amsenv (car (split-string match "="))) + (setq ncols (string-to-number (cadr (split-string match "="))))) + (setq amsenv match))) + ;; Do not ask for "\\" if in "equation" or "equation*" since these + ;; are single line equations only + (if (or (string= amsenv "equation") + (string= amsenv "equation*")) + ;; Nullify the effect of `M-RET' + (progn + (message "This environment does not support multi-line equations") + (end-of-line 0) + (kill-line 1)) + (progn + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\") + (forward-line 1) + (indent-according-to-mode))) + ;; Add a new label only if not in "equation" + (when (and (not (string= amsenv "equation")) + (assoc amsenv LaTeX-label-alist) + (LaTeX-label amsenv 'environment)) + (LaTeX-newline) + (indent-according-to-mode)) + (when ncols + (save-excursion + (insert (make-string (+ ncols ncols -1) ?&)))))) + +(TeX-add-style-hook + "empheq" + (lambda () + + ;; Add empheq to parser + (TeX-auto-add-regexp LaTeX-empheq-declaredelimiter-regexp) + + ;; Load amsmath.el and mathtools.el + (TeX-run-style-hooks "amsmath" "mathtools") + + (LaTeX-add-environments + '("empheq" LaTeX-empheq-env)) + + ;; Add "empheq" to `LaTeX-item-list' and run + ;; `LaTeX-empheq-item-equation' when `M-RET' is invoked + (add-to-list 'LaTeX-item-list '("empheq" . LaTeX-empheq-item-equation) t) + + ;; Reftex support: Use `reftex-add-label-environments' + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments '(("empheq" ?e nil nil t)))) + + (TeX-add-symbols + '("empheqset" (TeX-arg-key-val (LaTeX-empheq-key-val-options))) + + ;; 1.4 Special delimiters + ;; Normal + '("empheqlbrace" TeX-arg-insert-right-brace-maybe) + '("empheqrbrace") + '("empheqlbrack" TeX-arg-insert-right-brace-maybe) + '("empheqrbrack") + '("empheqlangle" TeX-arg-insert-right-brace-maybe) + '("empheqrangle") + '("empheqlparen" TeX-arg-insert-right-brace-maybe) + '("empheqrparen") + '("empheqlvert" TeX-arg-insert-right-brace-maybe) + '("empheqrvert") + '("empheqlVert" TeX-arg-insert-right-brace-maybe) + '("empheqrVert") + '("empheqlfloor" TeX-arg-insert-right-brace-maybe) + '("empheqrfloor") + '("empheqlceil" TeX-arg-insert-right-brace-maybe) + '("empheqrceil") + ;; Bigger + '("empheqbiglbrace" TeX-arg-insert-right-brace-maybe) + '("empheqbigrbrace") + '("empheqbiglbrack" TeX-arg-insert-right-brace-maybe) + '("empheqbigrbrack") + '("empheqbiglangle" TeX-arg-insert-right-brace-maybe) + '("empheqbigrangle") + '("empheqbiglparen" TeX-arg-insert-right-brace-maybe) + '("empheqbigrparen") + '("empheqbiglvert" TeX-arg-insert-right-brace-maybe) + '("empheqbigrvert") + '("empheqbiglVert" TeX-arg-insert-right-brace-maybe) + '("empheqbigrVert") + '("empheqbiglfloor" TeX-arg-insert-right-brace-maybe) + '("empheqbigrfloor") + '("empheqbiglceil" TeX-arg-insert-right-brace-maybe) + '("empheqbigrceil")) + + ;; Append delimiters to `TeX-braces-association' + (make-local-variable 'TeX-braces-association) + (let ((delimiters '(("\\empheqlbrace" . "\\empheqrbrace") + ("\\empheqlbrack" . "\\empheqrbrack") + ("\\empheqlangle" . "\\empheqrangle") + ("\\empheqlparen" . "\\empheqrparen") + ("\\empheqlvert" . "\\empheqrvert") + ("\\empheqlVert" . "\\empheqrVert") + ("\\empheqlfloor" . "\\empheqrfloor") + ("\\empheqlceil" . "\\empheqrceil") + ("\\empheqbiglbrace" . "\\empheqbigrbrace") + ("\\empheqbiglbrack" . "\\empheqbigrbrack") + ("\\empheqbiglangle" . "\\empheqbigrangle") + ("\\empheqbiglparen" . "\\empheqbigrparen") + ("\\empheqbiglvert" . "\\empheqbigrvert") + ("\\empheqbiglVert" . "\\empheqbigrVert") + ("\\empheqbiglfloor" . "\\empheqbigrfloor") + ("\\empheqbiglceil" . "\\empheqbigrceil")))) + (dolist (elt delimiters) + (add-to-list 'TeX-braces-association elt t))) + + ;; 2.2.1 Using multline + (when (LaTeX-provided-package-options-member "empheq" "oldmultline") + (LaTeX-add-environments + '("MTmultlined" LaTeX-mathtools-env-multlined))) + + ;; 2.2.2 The overload option + ;; I simplify it and ignore the additional feature overload2: + (when (or (LaTeX-provided-package-options-member "empheq" "overload") + (LaTeX-provided-package-options-member "empheq" "overload2")) + (LaTeX-add-environments + '("align" LaTeX-empheq-env-overload) + '("alignat" LaTeX-empheq-env-overload) + '("equation" LaTeX-empheq-env-overload) + '("flalign" LaTeX-empheq-env-overload) + '("gather" LaTeX-empheq-env-overload) + '("multline" LaTeX-empheq-env-overload) + '("align*" LaTeX-env-args [TeX-arg-key-val (LaTeX-empheq-key-val-options)]) + '("alignat*" LaTeX-empheq-env-overload) + '("equation*" LaTeX-env-args [TeX-arg-key-val (LaTeX-empheq-key-val-options)]) + '("flalign*" LaTeX-env-args [TeX-arg-key-val (LaTeX-empheq-key-val-options)]) + '("gather*" LaTeX-env-args [TeX-arg-key-val (LaTeX-empheq-key-val-options)]) + '("multline*" LaTeX-env-args [TeX-arg-key-val (LaTeX-empheq-key-val-options)]) + + ;; Original definitions are stored prefixed with "AmS" + '("AmSalign" LaTeX-env-label) + '("AmSalignat" LaTeX-amsmath-env-alignat) + '("AmSequation" LaTeX-env-label) + '("AmSflalign" LaTeX-env-label) + '("AmSgather" LaTeX-env-label) + '("AmSmultline" LaTeX-env-label) + '("AmSalign*") + '("AmSalignat*" LaTeX-amsmath-env-alignat) + '("AmSequation*") + '("AmSflalign*") + '("AmSgather*") + '("AmSmultline*")) + + ;; Append original definitions to `LaTeX-label-alist' + (let ((envs '("AmSalign" + "AmSalignat" + "AmSequation" + "AmSflalign" + "AmSgather" + "AmSmultline"))) + (dolist (env envs) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-amsmath-label) t))) + + ;; RefTeX support: Add original definitions with `reftex-add-label-environments' + (when (fboundp 'reftex-add-label-environments) + (let ((envs '(("AmSalign" ?e nil nil eqnarray-like) + ("AmSequation" ?e nil nil t) + ("AmSgather" ?e nil nil eqnarray-like) + ("AmSmultline" ?e nil nil t) + ("AmSflalign" ?e nil nil eqnarray-like) + ("AmSalignat" ?e nil nil alignat-like)))) + (dolist (env envs) + (reftex-add-label-environments `(,env))))) + + ;; Append original definitions to `LaTeX-item-list'; functions + ;; are provided by amsmath.el + (let ((envs '(("AmSalign" . LaTeX-item-equation) + ("AmSalign*" . LaTeX-item-equation) + ("AmSflalign" . LaTeX-item-equation) + ("AmSalignat" . LaTeX-item-equation-alignat) + ("AmSalignat*" . LaTeX-item-equation-alignat) + ("AmSflalign*" . LaTeX-item-equation) + ("AmSgather" . LaTeX-item-equation) + ("AmSgather*" . LaTeX-item-equation) + ("AmSmultline" . LaTeX-item-equation) + ("AmSmultline*" . LaTeX-item-equation)))) + (dolist (env envs) + (add-to-list 'LaTeX-item-list env t))) + + ;; Ispell skip lists: + (TeX-ispell-skip-setcdr + `(,(cons (concat "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|" + "equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)") + (concat "\\\\end{" + "\\(AmS\\(?:align\\(?:\\*\\|at\\*?\\)?\\|" + "equation\\*?\\|flalign\\*?\\|gather\\*?\\|multline\\*?\\)\\)}"))))) + + ;; 3.2 Support for ntheorem + (LaTeX-add-lengths "mintagvsep") + + ;; 4.1 Creating your own delimiters + (TeX-add-symbols + '("DeclareLeftDelimiter" + [ "Space adjustment" ] + (TeX-arg-eval + (lambda () + (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc)))) + (TeX-add-symbols (concat "empheq" delim) + (concat "empheqbig" delim)) + (LaTeX-add-empheq-declaredelimiters `(,delim "Left")) + (concat TeX-esc delim))))) + + '("DeclareRightDelimiter" + [ "Space adjustment" ] + (TeX-arg-eval + (lambda () + (let ((delim (TeX-read-string (concat "Delimiter: " TeX-esc)))) + (TeX-add-symbols (concat "empheq" delim) + (concat "empheqbig" delim)) + (LaTeX-add-empheq-declaredelimiters `(,delim "Right")) + (concat TeX-esc delim)))))) + + ;; 4.2 Fine-tuning of delimiters + (LaTeX-add-lengths "EmphEqdelimitershortfall") + (LaTeX-add-counters "EmphEqdelimiterfactor") + + (TeX-add-symbols + ;; 4.3 Scaling material yourself + '("EmphEqdisplayheight" 0) + '("EmphEqdisplaydepth" 0) + ;; 6.1 New empheq-like environments + '("EmphEqMainEnv" 0) + '("endEmphEqMainEnv" 0)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("empheqset" "{") + ("DeclareLeftDelimiter" "[{") + ("DeclareRightDelimiter" "[{")) + 'function))) + TeX-dialect) + +;;; empheq.el ends here diff --git a/elpa/auctex-13.1.3/style/empheq.elc b/elpa/auctex-13.1.3/style/empheq.elc Binary files differnew file mode 100644 index 0000000..2bd8dd2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/empheq.elc diff --git a/elpa/auctex-13.1.3/style/english.el b/elpa/auctex-13.1.3/style/english.el new file mode 100644 index 0000000..f8477bb --- /dev/null +++ b/elpa/auctex-13.1.3/style/english.el @@ -0,0 +1,15 @@ +;;; english.el --- Setup AUCTeX for editing English text. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "english" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language nil)) + (run-hooks 'TeX-language-en-hook)) + TeX-dialect) + +;;; english.el ends here diff --git a/elpa/auctex-13.1.3/style/english.elc b/elpa/auctex-13.1.3/style/english.elc Binary files differnew file mode 100644 index 0000000..01ad626 --- /dev/null +++ b/elpa/auctex-13.1.3/style/english.elc diff --git a/elpa/auctex-13.1.3/style/enumitem.el b/elpa/auctex-13.1.3/style/enumitem.el new file mode 100644 index 0000000..d8ad056 --- /dev/null +++ b/elpa/auctex-13.1.3/style/enumitem.el @@ -0,0 +1,525 @@ +;;; enumitem.el --- AUCTeX style for `enumitem.sty' (v3.9) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-20 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `enumitem.sty' (v3.9) from 2019/06/20. +;; `enumitem.sty' is part of TeXLive. + +;; Tassilo Horn's `minted.el' was a major source of inspiration for +;; this style, many thanks to him (also for patiently answering my +;; many other questions, incl. the stupid ones.) + +;; If things do not work or when in doubt, press `C-c C-n'. Comments +;; for improvement are welcome. + +;;; Code: + +(require 'tex) +(require 'latex) +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-enumitem-key-val-options + `(;; 3.1 Label and cross references format + ("label" ("\\alph*" "\\Alph*" "\\arabic*" + "\\roman*" "\\Roman*" "\\value*")) + ("label*" ("\\alph*" "\\Alph*" "\\arabic*" + "\\roman*" "\\Roman*" "\\value*")) + ("ref" ("\\alph*" "\\Alph*" "\\arabic*" + "\\roman*" "\\Roman*" "\\value*")) + ("font" ,(mapcar (lambda (mac) + (concat TeX-esc mac)) + '(;; family + "rmfamily" "sffamily" "ttfamily" + ;; series + "mdseries" "bfseries" + ;; shape + "upshape" "itshape" "slshape" "scshape" + ;; size + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" + ;; reset macro + "normalfont"))) + ("format" ,(mapcar (lambda (mac) + (concat TeX-esc mac)) + '(;; family + "rmfamily" "sffamily" "ttfamily" + ;; series + "mdseries" "bfseries" + ;; shape + "upshape" "itshape" "slshape" "scshape" + ;; size + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" + ;; reset macro + "normalfont"))) + ("align" ("left" "right" "parleft")) + ;; 3.2 Horizontal spacing of labels + ("labelindent" ("*" "!")) + ("left") + ("leftmargin" ("*" "!")) + ("itemindent" ("*" "!")) + ("labelsep" ("*" "!")) + ("labelwidth" ("*" "!")) + ("widest") + ("widest*") + ("labelsep*") + ("labelindent*") + ("rightmargin") + ;; Vertical Spacing + ("topsep") + ("partopsep") + ("parsep") + ("itemsep") + ;; 3.3 Numbering, stopping, and resuming + ("start") + ("resume") + ("resume*") + ;; 3.4 Series + ("series") + ;; 3.5 Penalties + ("beginpenalty") + ("midpenalty") + ("endpenalty") + ;; 3.6 Injecting code + ("before") + ("before*") + ("after") + ("after*") + ("first") + ("first*") + ;; 3.7 Description styles + ("style" ("standard" "unboxed" "nextline" "sameline" "multiline")) + ;; 3.8 Compact lists + ("noitemsep") + ("nosep") + ;; 3.9 Wide lists + ("wide") + ;; 4 Inline lists + ("itemjoin") + ("itemjoin*") + ("afterlabel") + ("mode" ("boxed" "unboxed"))) + "Key=value options for enumitem macros and environments.") + +(defun LaTeX-enumitem-key-val-options () + "Return an updated list of key=vals from enumitem package." + (append + ;; New keys are valueless, so take them as is: + (when (LaTeX-enumitem-SetEnumitemKey-list) + (LaTeX-enumitem-SetEnumitemKey-list)) + ;; New values defined available keys: We have to collect predefined + ;; values (if any) from `LaTeX-enumitem-key-val-options' (stored in + ;; `vals-predefined') and user-defined values (stored in + ;; `vals-parsed') which were parsed and added to `result' in the + ;; previous run of `dolist' and then combine them as value to a + ;; key. + (when (LaTeX-enumitem-SetEnumitemValue-list) + (let (result) + (dolist (keyvals (LaTeX-enumitem-SetEnumitemValue-list) result) + (let* ((key (nth 1 keyvals)) + (val (nth 2 keyvals)) + (vals-predefined + (cadr (assoc key LaTeX-enumitem-key-val-options))) + (vals-parsed (cadr (assoc key result)))) + ;; Remove entry in `result' if there is one for the `key': + (when (assoc key result) + (setq result (assq-delete-all (car (assoc key result)) + result))) + ;; Add the entry to `result'; also remove any duplicates + (cl-pushnew (list key (TeX-delete-duplicate-strings + (append vals-parsed + vals-predefined + (list val)))) + result :test #'equal))))) + ;; New values to `align' key: We collect the predefined ones from + ;; `LaTeX-enumitem-key-val-options' in `vals-predefined' and + ;; prepend them to newly parsed ones: + (when (LaTeX-enumitem-SetLabelAlign-list) + (let* ((key "align") + (vals (mapcar #'car (LaTeX-enumitem-SetLabelAlign-list))) + (vals-predefined (cadr + (assoc key LaTeX-enumitem-key-val-options)))) + `(("align" ,(TeX-delete-duplicate-strings + (append vals-predefined vals)))))) + ;; Predefined key=vals: + LaTeX-enumitem-key-val-options)) + +;; Setup for \newlist: + +(TeX-auto-add-type "enumitem-newlist" "LaTeX") + +(defvar LaTeX-enumitem-newlist-regexp + '("\\\\newlist{\\([^}]+\\)}{\\([^}]+\\)}" + (1 2) LaTeX-auto-enumitem-newlist) + "Matches the arguments of `\\newlist' from `enumitem' package.") + +;; Setup for \SetLabelAlign: + +(TeX-auto-add-type "enumitem-SetLabelAlign" "LaTeX") + +(defvar LaTeX-enumitem-SetLabelAlign-regexp + '("\\\\SetLabelAlign{\\([^}]+\\)}" + 1 LaTeX-auto-enumitem-SetLabelAlign) + "Matches the argument of `\\SetLabelAlign' from `enumitem' package.") + +;; Setup for \SetEnumitemKey: + +(TeX-auto-add-type "enumitem-SetEnumitemKey" "LaTeX") + +(defvar LaTeX-enumitem-SetEnumitemKey-regexp + '("\\\\SetEnumitemKey{\\([^}]+\\)}" + 1 LaTeX-auto-enumitem-SetEnumitemKey) + "Matches the arguments of `\\SetEnumitemKey' from `enumitem' package.") + +;; Setup for \SetEnumitemValue: + +(TeX-auto-add-type "enumitem-SetEnumitemValue" "LaTeX") + +;; Upon Tassilo's recommendation, we include also `0' so that we can +;; use the function `LaTeX-enumitem-SetEnumitemValue-list' while we +;; make sure that `TeX-auto-list-information' doesn't remove multiple +;; defined values to a specific key. For this reason, we also ignore +;; the 3. argument to the `\SetEnumitemValue' macro (i.e., a third +;; {\\([^}]+\\)} in regex) so that we don't pollute the generated +;; `docname.el' with unnecessary (La)TeX code. +(defvar LaTeX-enumitem-SetEnumitemValue-regexp + '("\\\\SetEnumitemValue{\\([^}]+\\)}{\\([^}]+\\)}" + (0 1 2) LaTeX-auto-enumitem-SetEnumitemValue) + "Matches the arguments of `\\SetEnumitemValue' from `enumitem' package.") + +;; Plug them into the machinery. +(defun LaTeX-enumitem-auto-prepare () + "Clear various `LaTeX-enumitem-*' before parsing." + (setq LaTeX-auto-enumitem-newlist nil + LaTeX-auto-enumitem-SetLabelAlign nil + LaTeX-auto-enumitem-SetEnumitemKey nil + LaTeX-auto-enumitem-SetEnumitemValue nil)) + +(defun LaTeX-enumitem-auto-cleanup () + "Move parsing results into right places for further usage." + ;; \newlist{<name>}{<type>}{<max-depth>} + ;; env=<name>, type=<type>, ignored=<max-depth> + (dolist (env-type (LaTeX-enumitem-newlist-list)) + (let* ((env (car env-type)) + (type (cadr env-type))) + (LaTeX-add-environments (list env 'LaTeX-enumitem-env-with-opts)) + ;; Tell AUCTeX about parsed description like environments. + (when (or (string-equal type "description") + (string-equal type "description*")) + (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument))) + ;; Add new env's to `ispell-tex-skip-alist': skip the opt. arg: + (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0)))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-enumitem-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-enumitem-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-enumitem-env-with-opts (env) + "Insert ENV provided by `enumitem' package." + (LaTeX-insert-environment + env + (let ((opts (TeX-read-key-val t (LaTeX-enumitem-key-val-options)))) + (when (and opts (not (string-equal opts ""))) + (format "[%s]" opts)))) + (if (TeX-active-mark) + (progn + (LaTeX-find-matching-begin) + (end-of-line 1)) + (end-of-line 0)) + (delete-char 1) + (when (looking-at (concat "^[ \t]+$\\|" + "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) + (delete-region (point) (line-end-position))) + (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (deactivate-mark) + (LaTeX-insert-item) + ;; The inserted \item may have outdented the first line to the + ;; right. Fill it, if appropriate. + (when (and auto-fill-function + (not (looking-at "$")) + (not (assoc env LaTeX-indent-environment-list)) + (> (- (line-end-position) (line-beginning-position)) + (current-fill-column))) + (LaTeX-fill-paragraph nil))) + +(defun LaTeX-arg-enumitem-SetLabelAlign (optional) + "Ask and insert a new type (value) for the \"align\" key. +Insert value in brackets if OPTIONAL is non-nil." + (let ((val (TeX-read-string "Alignment: "))) + (TeX-argument-insert val optional) + (LaTeX-add-enumitem-SetLabelAligns val))) + +(defun LaTeX-arg-enumitem-SetEnumitemKey (optional) + "Ask and insert a new key and its replacement. +Insert key and value in brackets if OPTIONAL is non-nil." + (let ((key (TeX-read-string "New Key: ")) + (replace (TeX-read-key-val optional + (LaTeX-enumitem-key-val-options) + "Replacement"))) + (TeX-argument-insert key optional) + (TeX-argument-insert replace optional) + (LaTeX-add-enumitem-SetEnumitemKeys key))) + +;; In `LaTeX-enumitem-SetEnumitemValue-regexp', we match (0 1 2). +;; When adding a new `key=val', we need something unique for `0'-match +;; until the next `C-c C-n'. We mimic that regex-match bei concat'ing +;; the elements and pass the result to +;; `LaTeX-add-enumitem-SetEnumitemValues'. It will vanish upon next +;; invocation of `C-c C-n'. +(defun LaTeX-arg-enumitem-SetEnumitemValue (optional) + "Ask and insert for a new value added to an existing key. +Insert key and value in brackets if OPTIONAL is non-nil." + (let ((key (completing-read "Key: " LaTeX-enumitem-key-val-options)) + (val (TeX-read-string "String value: "))) + (TeX-argument-insert key optional) + (TeX-argument-insert val optional) + (LaTeX-add-enumitem-SetEnumitemValues + (list (concat "\\SetEnumitemValue{" key "}{" val "}") + key val)))) + +(defun LaTeX-arg-enumitem-setlist (_optional) + "Insert the arguments of `\\setlist' macro from `enumitem' package. +This function inserts three arguments. The first optional +argument is only available when the package option `sizes' is +provided. OPTIONAL is ignored." + ;; First opt. argument: + (when (LaTeX-provided-package-options-member "enumitem" "sizes") + (let* ((TeX-arg-opening-brace "<") + (TeX-arg-closing-brace ">") + (sizes '("script" "tiny" "footnote" "small" "normal" + "large" "Large" "LARGE" "huge" "Huge")) + (size (completing-read + (TeX-argument-prompt t nil "Size") + (append + (mapcar (lambda (x) (concat "-" x)) sizes) + (mapcar (lambda (x) (concat x "-")) sizes) + sizes)))) + (TeX-argument-insert size t))) + ;; Second opt. argument: + (TeX-argument-insert + (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Environment(s), level(s)") + (append + (when (LaTeX-provided-package-options-member + "enumitem" "includedisplayed") + '("trivlist")) + (mapcar #'car (LaTeX-enumitem-newlist-list)) + '("1" "2" "3" "4"))) + ",") + t) + ;; Mandatory argument: + (TeX-argument-insert + (TeX-read-key-val nil (LaTeX-enumitem-key-val-options)) + nil)) + +(TeX-add-style-hook + "enumitem" + (lambda () + + ;; Add enumitem to the parser. + (TeX-auto-add-regexp LaTeX-enumitem-newlist-regexp) + (TeX-auto-add-regexp LaTeX-enumitem-SetEnumitemKey-regexp) + (TeX-auto-add-regexp LaTeX-enumitem-SetEnumitemValue-regexp) + (TeX-auto-add-regexp LaTeX-enumitem-SetLabelAlign-regexp) + + ;; Add the standard environments: + (LaTeX-add-enumitem-newlists '("itemize" "itemize") + '("enumerate" "enumerate") + '("description" "description")) + + ;; Add the starred versions with the 'inline' package option: + (when (LaTeX-provided-package-options-member "enumitem" "inline") + (LaTeX-add-enumitem-newlists '("itemize*" "itemize*") + '("enumerate*" "enumerate*") + '("description*" "description*"))) + + ;; Standard env's take key-val as optional argument. + (LaTeX-add-environments + '("itemize" LaTeX-enumitem-env-with-opts) + '("enumerate" LaTeX-enumitem-env-with-opts) + '("description" LaTeX-enumitem-env-with-opts)) + + ;; Make inline env's available with package option "inline" + (when (LaTeX-provided-package-options-member "enumitem" "inline") + (LaTeX-add-environments + '("itemize*" LaTeX-enumitem-env-with-opts) + '("enumerate*" LaTeX-enumitem-env-with-opts) + '("description*" LaTeX-enumitem-env-with-opts)) + (add-to-list 'LaTeX-item-list '("description*" . LaTeX-item-argument))) + + (TeX-add-symbols + ;; 6 Size dependent settings + '("SetEnumitemSize" 2) + + ;; 7 Cloning the basic lists + ;; The easy way would be: + ;; '("newlist" + ;; "Name" (TeX-arg-eval + ;; completing-read "Type: " + ;; '(("itemize") ("enumerate") ("description") + ;; ("itemize*") ("enumerate*") ("description*"))) + ;; "Max-depth") + ;; But we go the extra mile to improve the user experience and add + ;; the arguments directly to appropriate lists. + ;; \newlist{<name>}{<type>}{<max-depth>} + '("newlist" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string "Name: ")) + (type (completing-read + "Type: " + (mapcar #'cadr (LaTeX-enumitem-newlist-list)))) + (depth (TeX-read-string "Max-depth: "))) + (when (or (string-equal type "description") + (string-equal type "description*")) + (add-to-list 'LaTeX-item-list `(,name . LaTeX-item-argument))) + (LaTeX-add-environments `(,name LaTeX-enumitem-env-with-opts)) + (LaTeX-add-enumitem-newlists (list name type)) + (TeX-ispell-skip-setcdr `((,name ispell-tex-arg-end 0))) + (TeX-argument-insert name nil) + (TeX-argument-insert type nil) + (format "%s" depth))))) + + ;; \renewlist{<name>}{<type>}{<max-depth>} + '("renewlist" + (TeX-arg-eval completing-read "Name: " + (mapcar #'car (LaTeX-enumitem-newlist-list))) + (TeX-arg-eval completing-read "Type: " + (mapcar #'cadr (LaTeX-enumitem-newlist-list))) + "Max-depth") + + ;; \setlist<size>[<names,levels>]{<key-vals>} + '("setlist" LaTeX-arg-enumitem-setlist) + + ;; \setlist*[<names,levels>]{<key-vals>} + '("setlist*" + [TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Environment(s), level(s)") + (append + (when (LaTeX-provided-package-options-member "enumitem" + "includedisplayed") + '("trivlist")) + (mapcar #'car (LaTeX-enumitem-newlist-list)) + '("1" "2" "3" "4"))) + ","] + (TeX-arg-key-val (LaTeX-enumitem-key-val-options))) ) + + ;; General commands: + (TeX-add-symbols + + ;; Ask for an Integer and insert it. + '("setlistdepth" "Integer") + + ;; Just add the braces and let the user do the rest. + '("AddEnumerateCounter" 3) + '("AddEnumerateCounter*" 3) + + ;; "\restartlist" only works for lists defined with "resume" key. + ;; We will not extract that information and leave that to users. + ;; For completion, extract enumerated environments from + ;; `LaTeX-enumitem-newlist-list' and add "enumerate" to them. + '("restartlist" + (TeX-arg-eval + (lambda () + (let ((enums '("enumerate"))) + (when (LaTeX-provided-package-options-member "enumitem" "inline") + (cl-pushnew "enumerate*" enums :test #'equal)) + (dolist (env-type (LaTeX-enumitem-newlist-list)) + (let ((env (car env-type)) + (type (cadr env-type))) + (when (or (string-equal type "enumerate") + (string-equal type "enumerate*")) + (cl-pushnew env enums :test #'equal)))) + (completing-read "List name: " enums))))) + + ;; "Align" is added as new value to "align" key in key-val list. + '("SetLabelAlign" LaTeX-arg-enumitem-SetLabelAlign t) + + ;; "Key" will be parsed and added to key-val list. + '("SetEnumitemKey" LaTeX-arg-enumitem-SetEnumitemKey) + + ;; "Key" and "Value" are added to our key-val list. + '("SetEnumitemValue" LaTeX-arg-enumitem-SetEnumitemValue "Replacement") + + ;; v3.6 has a macro for visual debugging. + '("DrawEnumitemLabel" 0)) + + ;; Setting enumerate short label + (when (LaTeX-provided-package-options-member "enumitem" "shortlabels") + (TeX-add-symbols + '("SetEnumerateShortLabel" + (TeX-arg-eval completing-read "Key: " + '("A" "a" "I" "i" "1")) + "Replacement"))) + + ;; Add \labelindent to list of known lengths: + (LaTeX-add-lengths "labelindent") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newlist" "{{{") + ("renewlist" "{{{") + ("SetEnumitemSize" "{{") + ("AddEnumerateCounter" "*{{{") + ("SetLabelAlign" "{{") + ("SetEnumitemKey" "{{" ) + ("SetEnumitemValue" "{{{")) + 'function) + ;; Cater for additional optionals arg <size> based on package + ;; option 'sizes': + (font-latex-add-keywords + (if (LaTeX-provided-package-options-member "enumitem" "sizes") + '(("setlist" "*<[{")) + '(("setlist" "*[{"))) + 'function) + + (font-latex-add-keywords '(("restartlist" "{" ) + ("setlistdepth" "{" ) + ("SetEnumerateShortLabel" "{{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-enumitem-package-options + '("inline" "shortlabels" "loadonly" "sizes" + "ignoredisplayed" "includedisplayed") + "Package options for the enumitem package.") + +;;; enumitem.el ends here diff --git a/elpa/auctex-13.1.3/style/enumitem.elc b/elpa/auctex-13.1.3/style/enumitem.elc Binary files differnew file mode 100644 index 0000000..e1a3b31 --- /dev/null +++ b/elpa/auctex-13.1.3/style/enumitem.elc diff --git a/elpa/auctex-13.1.3/style/environ.el b/elpa/auctex-13.1.3/style/environ.el new file mode 100644 index 0000000..3a17f50 --- /dev/null +++ b/elpa/auctex-13.1.3/style/environ.el @@ -0,0 +1,143 @@ +;;; environ.el --- AUCTeX style for `environ.sty' version v0.3 -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-07-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `environ.sty' version v0.3 from +;; 2014/05/04. `environ.sty' is part of TeXLive. + +;; Name of new env's defined with `\NewEnviron' are automatically +;; added to list of known env's, e.g.: +;; +;; \NewEnviron{test}{<macro code>} +;; +;; `test' will be in completion list upon `C-c C-e'. + +;; More sophisticated definions must go through AUCTeX's parser, e.g.: +;; +;; \NewEnviron{test}[2][]{<macro code>} +;; +;; After a definition like this, you have to invoke `C-c C-n' to get +;; the correct completion. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-auto-environ-NewEnviron nil + "Temporary for parsing the arguments of `\\NewEnviron' +from `environ' package.") + +(defvar LaTeX-environ-NewEnviron-regexp + `(,(concat "\\\\\\(?:Ren\\|N\\)ewEnviron" + "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}%?" + "[ \t\n\r]*\\[?\\([0-9]?\\)\\]?%?" + "[ \t\n\r]*\\(\\[\\)?") + (1 2 3) LaTeX-auto-environ-NewEnviron) + "Matches the argument of `\\NewEnviron' and `\\RenewEnviron' +from `environ.sty'.") + +(defun LaTeX-environ-auto-prepare () + "Clear temporary variable from `environ.sty' before parsing." + (setq LaTeX-auto-environ-NewEnviron nil)) + +(defun LaTeX-environ-auto-cleanup () + "Process the parsed results of `\\NewEnviron'." + (dolist (env-args LaTeX-auto-environ-NewEnviron) + (let ((env (car env-args)) + (args (cadr env-args)) + (opt (nth 2 env-args))) + (cond (;; opt. 1st argument and mandatory argument(s) + (and args (not (string-equal args "")) + opt (not (string-equal opt ""))) + (add-to-list 'LaTeX-auto-environment + (list env 'LaTeX-env-args (vector "argument") + (1- (string-to-number args))))) + (;; mandatory argument(s) only + (and args (not (string-equal args "")) + (string-equal opt "")) + (add-to-list 'LaTeX-auto-environment + (list env (string-to-number args)))) + (t ; No args + (add-to-list 'LaTeX-auto-environment (list env))))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-environ-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-environ-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-environ-final-code (_optional) + "Query for the presence of optional `final code' as argument to +`\\NewEnviron' and insert the appropriate brackets." + (let ((fincode (y-or-n-p "With optional final code? "))) + (when fincode + (insert "[]")))) + +(TeX-add-style-hook + "environ" + (lambda () + + ;; Add it to the parser + (TeX-auto-add-regexp LaTeX-environ-NewEnviron-regexp) + + (TeX-add-symbols + + ;; \NewEnviron{<name>}[<No.args>][<Opt.arg.>]{<Macro code>}[<Final code>] + '("NewEnviron" + (TeX-arg-define-environment "Environment") + [ "Number of arguments" ] [ "argument" ] t TeX-arg-environ-final-code) + + '("RenewEnviron" + (TeX-arg-environment "Environment") + [ "Number of arguments" ] [ "argument" ] t TeX-arg-environ-final-code) + + ;; Insert a pair of braces and we're done + '("environfinalcode" t) + + ;; Pre-defined + '("BODY") + + ;; Define another macro instead of \BODY + '("environbodyname" TeX-arg-define-macro)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("NewEnviron" "{[[{[") + ("RenewEnviron" "{[[{[") + ("environbodyname" "|{\\")) + 'function))) + TeX-dialect) + +(defvar LaTeX-environ-package-options nil + "Package options for the environ package.") + +;;; environ.el ends here diff --git a/elpa/auctex-13.1.3/style/environ.elc b/elpa/auctex-13.1.3/style/environ.elc Binary files differnew file mode 100644 index 0000000..5595ed2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/environ.elc diff --git a/elpa/auctex-13.1.3/style/epigraph.el b/elpa/auctex-13.1.3/style/epigraph.el new file mode 100644 index 0000000..14b276f --- /dev/null +++ b/elpa/auctex-13.1.3/style/epigraph.el @@ -0,0 +1,106 @@ +;;; epigraph.el --- AUCTeX style for `epigraph.sty' v1.5c -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2017, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2012-02-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `epigraph.sty' v1.5c from 2009/09/02. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "epigraph" + (lambda () + (TeX-add-symbols + ;; 2.1 The epigraph command + '("epigraph" 2) + ;; 2.2 The epigraphs environment + '("qitem" 2) + ;; 2.3 General + "textflush" + "epigraphflush" + "sourceflush" + "epigraphsize" + ;; 2.4 Epigraphs before chapter headings + '("epigraphhead" [ "Distance (a number)" ] t) + '("dropchapter" TeX-arg-length) + "undodrop" + ;; \cleartoevenpage takes an optional argument. Don't query for + ;; it, just insert the macro and leave the rest to the user + '("cleartoevenpage" 0)) + + ;; 2.2 The epigraphs environment + (LaTeX-add-environments + '("epigraphs" LaTeX-env-item)) + + ;; The value of these lengths can be changed with \setlength + (LaTeX-add-lengths "epigraphwidth" "epigraphrule" + "beforeepigraphskip" + "afterepigraphskip") + + ;; Append epigraphs to `LaTeX-item-list': + (add-to-list 'LaTeX-item-list + '("epigraphs" . LaTeX-epigraph-qitem) t) + + ;; Append qitem to `LaTeX-item-regexp': + (unless (string-match "qitem" LaTeX-item-regexp) + (set (make-local-variable 'LaTeX-item-regexp) + (concat + LaTeX-item-regexp + "\\|" + "qitem\\b")) + (LaTeX-set-paragraph-start)) + + ;; Fontification: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("epigraph" "{{") + ("qitem" "{{") + ("epigraphhead" "[{")) + 'textual) + (font-latex-add-keywords '(("dropchapter" "{") + ("undodrop" "")) + 'variable) + (font-latex-add-keywords '("cleartoevenpage") + 'warning))) + TeX-dialect) + +(defvar LaTeX-epigraph-package-options nil + "Package options for the epigraph package.") + +;; adapted from latex.el:`LaTeX-item-bib' +(defun LaTeX-epigraph-qitem () + "Insert a new qitem for use in the epigraphs environment." + (TeX-insert-macro "qitem")) + +;;; epigraph.el ends here diff --git a/elpa/auctex-13.1.3/style/epigraph.elc b/elpa/auctex-13.1.3/style/epigraph.elc Binary files differnew file mode 100644 index 0000000..6520dfc --- /dev/null +++ b/elpa/auctex-13.1.3/style/epigraph.elc diff --git a/elpa/auctex-13.1.3/style/epsf.el b/elpa/auctex-13.1.3/style/epsf.el new file mode 100644 index 0000000..bfe6279 --- /dev/null +++ b/elpa/auctex-13.1.3/style/epsf.el @@ -0,0 +1,40 @@ +;;; epsf.el - Support for the epsf style option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2014, 2020 Free Software Foundation, Inc. + +;; Contributed by Marc Gemis <makke@wins.uia.ac.be> + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "epsf" + (lambda () + (TeX-add-symbols + '("epsfsize" TeX-arg-epsfsize) + '("epsffile" TeX-arg-file) + '("epsfbox" TeX-arg-file) + "epsflly" "epsfury" "testit" "epsfgetlitbb" + "epsfnormal" "epsfgetbb" "other" "epsfsetgraph" + "PsFragSpecialArgs" "epsfaux" "testit" "epsfgrab" + "epsfllx" "epsflly" "epsfury" "epsfverbosetrue")) + TeX-dialect) + +(defun TeX-arg-epsfsize (_optional &optional _prompt _definition) + "Create a line that print epsf figures at a certain percentage" + (interactive) + (let ((scale (TeX-read-string "Scale in percent (default 75): "))) + (setq scale (if (zerop (length scale)) "75" scale)) + (save-excursion + ; append #1#{scale#1} + (insert "#1#2" TeX-grop "0." scale "#1" TeX-grcl) + ; insert \def before \epsfsize + (beginning-of-line 1) + (newline) + (insert TeX-esc "def") + (forward-line -1) + (insert "% From now on print figures at " scale "% of original size")) + (end-of-line))) + +;;; epsf.el ends here diff --git a/elpa/auctex-13.1.3/style/epsf.elc b/elpa/auctex-13.1.3/style/epsf.elc Binary files differnew file mode 100644 index 0000000..6fa86f2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/epsf.elc diff --git a/elpa/auctex-13.1.3/style/erewhon.el b/elpa/auctex-13.1.3/style/erewhon.el new file mode 100644 index 0000000..c438214 --- /dev/null +++ b/elpa/auctex-13.1.3/style/erewhon.el @@ -0,0 +1,98 @@ +;;; erewhon.el --- AUCTeX style for `erewhon.sty' (v1.04) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `erewhon.sty' (v1.04) from 2015/04/07. +;; `erewhon.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "erewhon" + (lambda () + + ;; Run style hook for various packages loaded by erewhon + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + + ;; Only preamble commands + '("useosf" 0) + '("useproportional" 0) + + ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration + '("textlf" t) ; proportional lining figures + '("texttlf" t) ; tabular lining figures + '("textosf" t) ; proportional oldstyle figures + '("texttosf" t) ; tabular oldstyle figures + '("textsu" t) ; superior figures + '("textin" t) ; inferior figures + '("textnu" t) ; numerator figures + '("textde" t) ; denominator figures + '("textfrac" "Numerator" "Denominator")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{") + ("textin" "{") + ("textnu" "{") + ("textde" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration) + (font-latex-add-keywords '(("textfrac" "{{")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-erewhon-package-options + '("lining" "lf" "oldstyle" "osf" "tabular" "p" "proportional" + "scale" "scaled" "scosf" "space" "sups") + "Package options for the erewhon package.") + +;;; erewhon.el ends here diff --git a/elpa/auctex-13.1.3/style/erewhon.elc b/elpa/auctex-13.1.3/style/erewhon.elc Binary files differnew file mode 100644 index 0000000..5901ad8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/erewhon.elc diff --git a/elpa/auctex-13.1.3/style/eso-pic.el b/elpa/auctex-13.1.3/style/eso-pic.el new file mode 100644 index 0000000..2ee93d0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/eso-pic.el @@ -0,0 +1,90 @@ +;;; eso-pic.el --- AUCTeX style for `eso-pic.sty' (v3.0a) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020, 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `eso-pic.sty' (v3.0a) from 2020/10/14. +;; `eso-pic.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "eso-pic" + (lambda () + + (TeX-add-symbols + ;; Basic commands + '("AddToShipoutPictureBG" t) + '("AddToShipoutPictureBG*" t) + '("AddToShipoutPictureFG" t) + '("AddToShipoutPictureFG*" t) + '("ClearShipoutPictureBG" 0) + '("ClearShipoutPictureFG" 0) + + ;; Helper macros + '("AtPageUpperLeft" t) + '("AtPageLowerLeft" t) + '("AtPageCenter" t) + '("AtTextUpperLeft" t) + '("AtTextLowerLeft" t) + '("AtTextCenter" t) + '("AtStockUpperLeft" t) + '("AtStockLowerLeft" t) + '("AtStockCenter" t) + + ;; Aux. commands + '("LenToUnit" t) + '("gridSetup" + [ "Grid unit name" ] "Grid unit" "Label factor" + "Grid delta" "Grid Delta" "Gap")) + + ;; Declare expert macro + (TeX-declare-expert-macros + "eso-pic" + "gridSetup" "LenToUnit")) + TeX-dialect) + +(defvar LaTeX-eso-pic-package-options-list + '(("pscoord" ("true" "false")) + ("texcoord" ("true" "false")) + ("grid" ("true" "false")) + ("gridBG" ("true" "false")) + ("gridunit" ("mm" "in" "bp" "pt")) + ("gridcolor") + ("subgridcolor") + ("subgridstyle" ("solid" "dotted")) + ("colorgrid" ("true" "false")) + ("dvips" ("true" "false"))) + "Package options for the eso-pic package.") + +(defun LaTeX-eso-pic-package-options nil + "Prompt for package options for the eso-pic package." + (TeX-read-key-val t LaTeX-eso-pic-package-options-list)) + +;;; eso-pic.el ends here diff --git a/elpa/auctex-13.1.3/style/eso-pic.elc b/elpa/auctex-13.1.3/style/eso-pic.elc Binary files differnew file mode 100644 index 0000000..82c935d --- /dev/null +++ b/elpa/auctex-13.1.3/style/eso-pic.elc diff --git a/elpa/auctex-13.1.3/style/etoolbox.el b/elpa/auctex-13.1.3/style/etoolbox.el new file mode 100644 index 0000000..42af6a4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/etoolbox.el @@ -0,0 +1,376 @@ +;;; etoolbox.el --- AUCTeX style for `etoolbox.sty' v2.5k -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Created: 2022-03-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `etoolbox.sty' v2.5k from 2020/10/05. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-arg-etoolbox-csname (optional &optional prompt) + "Query and insert the name of a TeX control sequence. +If OPTIONAL is non-nil, then insert it in square brackets. +PROMPT replaces the standard one." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Control sequence") + (TeX-symbol-list)) + optional)) + +(defun LaTeX-arg-etoolbox-macro-free (optional &optional prompt) + "Query and insert a macro not surrounded by braces. +If OPTIONAL is non-nil, insert the macro only when given by the +user." + (let ((TeX-arg-opening-brace "") + (TeX-arg-closing-brace "") + (macro (completing-read + (TeX-argument-prompt optional prompt + (concat "Macro: " TeX-esc) + t) + (TeX-symbol-list)))) + (TeX-argument-insert macro optional TeX-esc))) + +(TeX-add-style-hook + "etoolbox" + (lambda () + + (TeX-add-symbols + + ;; 2.1 Definitions + '("newrobustcmd" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("newrobustcmd*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("renewrobustcmd" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + '("renewrobustcmd*" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + '("providerobustcmd" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("providerobustcmd*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + + ;; 2.2 Patching + '("robustify" TeX-arg-macro) + + ;; 2.3 Protection + '("protecting" t) + + ;; 2.4 Length and Counter Assignments + '("defcounter" TeX-arg-counter t) + '("deflength" TeX-arg-length t) + + ;; 2.5 Additional Document Hooks + '("AfterPreamble" t) + '("AtEndPreamble" t) + '("AfterEndPreamble" t) + '("AfterEndDocument" t) + + ;; 2.6 Environment Hooks + '("AtBeginEnvironment" TeX-arg-environment t) + '("AtEndEnvironment" TeX-arg-environment t) + '("BeforeBeginEnvironment" TeX-arg-environment t) + '("AfterEndEnvironment" TeX-arg-environment t) + + ;; 3 Author Commands + ;; 3.1.1 Macro Definitions + '("csdef" LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("csgdef" LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("csedef" LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("csxdef" LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("protected@csedef" + LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("protected@csxdef" + LaTeX-arg-etoolbox-csname [TeX-arg-free "Arguments"] t) + '("cslet" LaTeX-arg-etoolbox-csname TeX-arg-macro) + '("letcs" TeX-arg-macro LaTeX-arg-etoolbox-csname) + '("csletcs" LaTeX-arg-etoolbox-csname LaTeX-arg-etoolbox-csname) + '("csuse" LaTeX-arg-etoolbox-csname) + '("undef" LaTeX-arg-etoolbox-macro-free) + '("gundef" LaTeX-arg-etoolbox-macro-free) + '("csundef" LaTeX-arg-etoolbox-csname) + '("csgundef" LaTeX-arg-etoolbox-csname) + '("csmeaning" LaTeX-arg-etoolbox-csname) + '("csshow" LaTeX-arg-etoolbox-csname) + + ;; 3.1.2 Arithmetic Definitions + '("numdef" LaTeX-arg-etoolbox-macro-free "Integer expression") + '("numgdef" LaTeX-arg-etoolbox-macro-free "Integer expression") + '("csnumdef" LaTeX-arg-etoolbox-csname "Integer expression") + '("csnumgdef" LaTeX-arg-etoolbox-csname "Integer expression") + + '("dimdef" LaTeX-arg-etoolbox-macro-free "Dimension expression") + '("dimgdef" LaTeX-arg-etoolbox-macro-free "Dimension expression") + '("csdimdef" LaTeX-arg-etoolbox-csname "Dimension expression") + '("csdimgdef" LaTeX-arg-etoolbox-csname "Dimension expression") + + '("gluedef" LaTeX-arg-etoolbox-macro-free "Glue expression") + '("gluegdef" LaTeX-arg-etoolbox-macro-free "Glue expression") + '("csgluedef" LaTeX-arg-etoolbox-csname "Glue expression") + '("csgluegdef" LaTeX-arg-etoolbox-csname "Glue expression") + + '("mudef" LaTeX-arg-etoolbox-macro-free "Muglue expression") + '("mugdef" LaTeX-arg-etoolbox-macro-free "Muglue expression") + '("csmudef" LaTeX-arg-etoolbox-csname "Muglue expression") + '("csmugdef" LaTeX-arg-etoolbox-csname "Muglue expression") + + ;; 3.2 Expansion Control + '("expandonce" LaTeX-arg-etoolbox-macro-free) + '("csexpandonce" LaTeX-arg-etoolbox-csname) + + ;; 3.3.1 Appending to a Hook + '("appto" LaTeX-arg-etoolbox-macro-free t) + '("gappto" LaTeX-arg-etoolbox-macro-free t) + '("eappto" LaTeX-arg-etoolbox-macro-free t) + '("xappto" LaTeX-arg-etoolbox-macro-free t) + '("protected@eappto" LaTeX-arg-etoolbox-macro-free t) + '("protected@xappto" LaTeX-arg-etoolbox-macro-free t) + + '("csappto" LaTeX-arg-etoolbox-csname t) + '("csgappto" LaTeX-arg-etoolbox-csname t) + '("cseappto" LaTeX-arg-etoolbox-csname t) + '("csxappto" LaTeX-arg-etoolbox-csname t) + '("protected@cseappto" LaTeX-arg-etoolbox-csname t) + '("protected@csxappto" LaTeX-arg-etoolbox-csname t) + + ;; 3.3.2 Prepending to a Hook + '("preto" LaTeX-arg-etoolbox-macro-free t) + '("gpreto" LaTeX-arg-etoolbox-macro-free t) + '("epreto" LaTeX-arg-etoolbox-macro-free t) + '("xpreto" LaTeX-arg-etoolbox-macro-free t) + '("protected@epreto" LaTeX-arg-etoolbox-macro-free t) + '("protected@xpreto" LaTeX-arg-etoolbox-macro-free t) + + '("cspreto" LaTeX-arg-etoolbox-csname t) + '("csgpreto" LaTeX-arg-etoolbox-csname t) + '("csepreto" LaTeX-arg-etoolbox-csname t) + '("csxpreto" LaTeX-arg-etoolbox-csname t) + '("protected@csepreto" LaTeX-arg-etoolbox-csname t) + '("protected@csxpreto" LaTeX-arg-etoolbox-csname t) + + ;; 3.4 Patching + + '("patchcmd" ["Prefix"] TeX-arg-macro 4) + '("ifpatchable" TeX-arg-macro 3) + '("ifpatchable*" TeX-arg-macro 2) + '("apptocmd" TeX-arg-macro 3) + '("pretocmd" TeX-arg-macro 3) + "tracingpatches" + + ;; 3.5.1 TeX Flags + '("newbool" "Name") + '("providebool" "Name") + '("booltrue" "Name") + '("boolfalse" "Name") + '("setbool" "Name" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Value") + '("true" "false"))) + '("ifbool" "Name" 2) + '("notbool" "Name" 2) + + ;; 3.5.2 LaTeX Flags + '("newtoggle" "Name") + '("providetoggle" "Name") + '("toggletrue" "Name") + '("togglefalse" "Name") + '("settoggle" "Name" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Value") + '("true" "false"))) + '("iftoggle" "Name" 2) + '("nottoggle" "Name" 2) + + ;; 3.6.1 Macro Tests + '("ifdef" TeX-arg-macro 2) + '("ifcsdef" LaTeX-arg-etoolbox-csname 2) + '("ifundef" TeX-arg-macro 2) + '("ifcsundef" LaTeX-arg-etoolbox-csname 2) + '("ifdefmacro" TeX-arg-macro 2) + '("ifcsmacro" LaTeX-arg-etoolbox-csname 2) + '("ifdefparam" TeX-arg-macro 2) + '("ifcsparam" LaTeX-arg-etoolbox-csname 2) + '("ifdefprefix" TeX-arg-macro 2) + '("ifcsprefix" LaTeX-arg-etoolbox-csname 2) + '("ifdefprotected" TeX-arg-macro 2) + '("ifcsprotected" LaTeX-arg-etoolbox-csname 2) + '("ifdefltxprotected" TeX-arg-macro 2) + '("ifcsltxprotected" LaTeX-arg-etoolbox-csname 2) + '("ifdefempty" TeX-arg-macro 2) + '("ifcsempty" LaTeX-arg-etoolbox-csname 2) + '("ifdefvoid" TeX-arg-macro 2) + '("ifcsvoid" LaTeX-arg-etoolbox-csname 2) + '("ifdefequal" TeX-arg-macro TeX-arg-macro 2) + '("ifcsequal" LaTeX-arg-etoolbox-csname LaTeX-arg-etoolbox-csname 2) + '("ifdefstring" TeX-arg-macro 3) + '("ifcsstring" LaTeX-arg-etoolbox-csname 3) + '("ifdefstrequal" TeX-arg-macro TeX-arg-macro 2) + '("ifcsstrequal" LaTeX-arg-etoolbox-csname LaTeX-arg-etoolbox-csname 2) + + ;; 3.6.2 Counter and Length Tests + '("ifdefcounter" TeX-arg-macro 2) + '("ifcscounter" LaTeX-arg-etoolbox-csname 2) + '("ifltxcounter" TeX-arg-counter 2) + '("ifdeflength" TeX-arg-length 2) + '("ifcslength" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Length") + (LaTeX-length-list)) + 2) + '("ifdefdimen" TeX-arg-macro 2) + '("ifcsdimen" "Control sequence" 2) + + ;; 3.6.3 String Tests + '("ifstrequal" 4) + '("ifstrempty" 3) + '("ifblank" 3) + '("notblank" 3) + + ;; 3.6.4 Arithmetic Tests + '("ifnumcomp" 5) + '("ifnumequal" 4) + '("ifnumgreater" 4) + '("ifnumless" 4) + '("ifnumodd" 3) + + '("ifdimcomp" 5) + '("ifdimequal" 4) + '("ifdimgreater" 4) + '("ifdimless" 4) + + ;; 3.6.5 Boolean Expressions + '("ifboolexpr" 3) + '("ifboolexpe" 3) + '("whileboolexpr" 2) + '("unlessboolexpr" 2) + + ;; 3.7 List Processing + ;; 3.7.1 User Input + '("DeclareListParser" TeX-arg-define-macro "Separator") + '("DeclareListParser*" TeX-arg-define-macro "Separator") + '("docsvlist" t) + '("forcsvlist" 2) + + ;; 3.7.2 Internal Lists + '("listadd" TeX-arg-macro t) + '("listdadd" TeX-arg-macro t) + '("listeadd" TeX-arg-macro t) + '("listxadd" TeX-arg-macro t) + + '("listcsadd" LaTeX-arg-etoolbox-csname t) + '("listcsgadd" LaTeX-arg-etoolbox-csname t) + '("listcseadd" LaTeX-arg-etoolbox-csname t) + '("listcsxadd" LaTeX-arg-etoolbox-csname t) + + '("listremove" TeX-arg-macro t) + '("listgremove" TeX-arg-macro t) + '("listcsremove" LaTeX-arg-etoolbox-csname t) + '("listcsgremove" LaTeX-arg-etoolbox-csname t) + + '("dolistlool" TeX-arg-macro) + '("dolistcslool" LaTeX-arg-etoolbox-csname) + + '("forlistloop" t TeX-arg-macro) + '("forlistcsloop" t LaTeX-arg-etoolbox-csname) + + '("ifinlist" t TeX-arg-macro nil nil) + '("xifinlist" t TeX-arg-macro nil nil) + + '("ifinlistcs" t LaTeX-arg-etoolbox-csname nil nil) + '("xifinlistcs" t LaTeX-arg-etoolbox-csname nil nil) + + ;; 3.8 Miscellaneous Tools + '("rmntonum" "Roman numeral") + '("ifrmnum" 3)) + + ;; Add the exceptions to `LaTeX-indent-begin-exceptions-list' and + ;; run `LaTeX-indent-commands-regexp-make': + (let ((exceptions '("ifpatchable" + "ifbool" + "iftoggle" + "ifdef" + "ifcsdef" + "ifundef" + "ifcsundef" + "ifdefmacro" + "ifcsmacro" + "ifdefparam" + "ifcsparam" + "ifdefprefix" + "ifcsprefix" + "ifdefprotected" + "ifcsprotected" + "ifdefltxprotected" + "ifcsltxprotected" + "ifdefempty" + "ifcsempty" + "ifdefvoid" + "ifcsvoid" + "ifdefequal" + "ifcsequal" + "ifdefstring" + "ifcsstring" + "ifdefstrequal" + "ifcsstrequal" + "ifdefcounter" + "ifcscounter" + "ifltxcounter" + "ifdeflength" + "ifcslength" + "ifdefdimen" + "ifcsdimen" + "ifstrequal" + "ifstrempty" + "ifblank" + "ifnumcomp" + "ifnumequal" + "ifnumgreater" + "ifnumless" + "ifnumodd" + "ifdimcomp" + "ifdimequal" + "ifdimgreater" + "ifdimless" + "ifboolexpr" + "ifboolexpe" + "ifinlist" + "ifinlistcs" + "ifrmnum"))) + (dolist (elt exceptions) + (add-to-list 'LaTeX-indent-begin-exceptions-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newrobustcmd" "*|{\\[[{") + ("renewrobustcmd" "*|{\\[[{") + ("providerobustcmd" "*|{\\[[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-etoolbox-package-options nil + "Package options for the etoolbox package.") + +;;; etoolbox.el ends here diff --git a/elpa/auctex-13.1.3/style/etoolbox.elc b/elpa/auctex-13.1.3/style/etoolbox.elc Binary files differnew file mode 100644 index 0000000..7f2e473 --- /dev/null +++ b/elpa/auctex-13.1.3/style/etoolbox.elc diff --git a/elpa/auctex-13.1.3/style/everysel.el b/elpa/auctex-13.1.3/style/everysel.el new file mode 100644 index 0000000..f500078 --- /dev/null +++ b/elpa/auctex-13.1.3/style/everysel.el @@ -0,0 +1,47 @@ +;;; everysel.el --- AUCTeX style for `everysel.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2015, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Created: 2012-12-25 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `everysel.sty'. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "everysel" + (lambda () + (TeX-add-symbols + ;; adds a hook (the argument code) to be called after \\selectfont + '("EverySelectfont" 1) + ;; adds a hook to be called after the next \\selectfont + '("AtNextSelectfont" 1))) + TeX-dialect) + +(defvar LaTeX-everysel-package-options nil + "Package options for the everysel package.") + +;;; everysel.el ends here diff --git a/elpa/auctex-13.1.3/style/everysel.elc b/elpa/auctex-13.1.3/style/everysel.elc Binary files differnew file mode 100644 index 0000000..c1d6af5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/everysel.elc diff --git a/elpa/auctex-13.1.3/style/exam.el b/elpa/auctex-13.1.3/style/exam.el new file mode 100644 index 0000000..370a923 --- /dev/null +++ b/elpa/auctex-13.1.3/style/exam.el @@ -0,0 +1,412 @@ +;;; exam.el --- AUCTeX style for the (LaTeX) exam class -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2022 Free Software Foundation, Inc. + +;; Author: Uwe Brauer <oub@mat.ucm.es> +;; Created: 2016-03-06 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the exam class. + +;; Acknowledgements +;; Arash Esbati <arash@gnu.org> for a almost complete rewrite. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-article-class-options) + +(defvar LaTeX-exam-class-options + '("answers" "noanswers" "cancelspace" "nocancelspace" "addpoints") + "Class options for the exam class.") + +(TeX-load-style "article") +;; Add options from `LaTeX-article-class-options' only once: +(dolist (opt LaTeX-article-class-options) + (add-to-list 'LaTeX-exam-class-options opt)) + +(defun LaTeX-exam-insert-item () + "Insert a new item in the current environment from exam class. +Item inserted depends on the environment." + (let ((env (LaTeX-current-environment))) + (TeX-insert-macro + (cond ((string= env "questions") + "question") + ((string= env "parts") + "part") + ((string= env "subparts") + "subpart") + ((string= env "subsubparts") + "subsubpart") + ((member env '("choices" "oneparchoices" + "checkboxes" "oneparcheckboxes")) + "choice") + ;; Fallback + (t "item"))))) + +(defun LaTeX-exam-insert-label (_optional &optional name type) + "Indent the line and query/insert a label incl. the \"\\label\" macro. +Arguments NAME and TYPE are the same as for the function +`LaTeX-label'. OPTIONAL is ignored." + (indent-according-to-mode) + (let ((currenv (LaTeX-current-environment))) + (LaTeX-label (or name currenv) (or type 'environment)))) + +(TeX-add-style-hook + "exam" + (lambda () + (TeX-run-style-hooks "article") + ;; Make our label prefix available ... + (let ((envs '("questions"))) + (dolist (env envs) + ;; to AUCTeX + (add-to-list 'LaTeX-label-alist + (cons env 'LaTeX-exam-label)) + ;; to RefTeX with `reftex-add-label-environments' + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `((,env ,LaTeX-exam-reftex-quick-id-key ,LaTeX-exam-label + "~\\ref{%s}" nil + (regexp "[Qq]uestions?" "[Nn]umbers?"))))))) + (when (or (member "xcolor" (TeX-style-list)) + (member "color" (TeX-style-list))) + (TeX-add-symbols '("shadedsolutions" 0))) + + (LaTeX-add-environments + '("solution" [ "Height" ]) + '("select") + '("choices" LaTeX-env-item) + '("oneparchoices" LaTeX-env-item) + '("checkboxes" LaTeX-env-item) + '("oneparcheckboxes" LaTeX-env-item) + '("solutionorbox" [ "Height" ]) + '("solutionorlines" [ "Height" ]) + '("solutionordottedlines" [ "Height" ]) + '("solutionorgrid" [ "Height" ]) + '("questions" LaTeX-env-item) + '("parts" LaTeX-env-item) + '("subparts" LaTeX-env-item) + '("subsubparts" LaTeX-env-item)) + + ;; Tell AUCTeX about special environments: + (let ((envs '("questions" + "parts" "subparts" "subsubparts" + "choices" "oneparchoices" + "checkboxes" "oneparcheckboxes"))) + (dolist (env envs) + (add-to-list 'LaTeX-item-list + (cons env #'LaTeX-exam-insert-item) + t))) + + ;; Append us only once: + (unless (and (string-match "question" LaTeX-item-regexp) + (string-match "sub" LaTeX-item-regexp)) + (set (make-local-variable 'LaTeX-item-regexp) + (concat + LaTeX-item-regexp + "\\|" + "choice\\b" + "\\|" + "\\(titled\\)?question\\b" + "\\|" + "\\(sub\\)*part\\b")) + (LaTeX-set-paragraph-start)) + + (TeX-add-symbols + '("part" [ "Points" ] (TeX-arg-literal " ")) + '("subpart" [ "Points" ] (TeX-arg-literal " ")) + '("gradetable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("bonusgradetable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("bonuspointtable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("partialgradetable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("partialbonusgradetable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("partialbonuspointtable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("pointtable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + '("partialpointtable" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Orientation") + '("v" "h") ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Table index") + '("questions" "pages") ] ) + + '("subsubpart" [ "Points" ] (TeX-arg-literal " ")) + '("question" ["Points"] (TeX-arg-literal " ")) + '("bonusquestion" ["Points"] (TeX-arg-literal " ")) + '("extrafootheight" [ TeX-arg-length "Extra height 1. page footer" ] + (TeX-arg-length "Extra height footers")) + '("titledquestion" "Title" ["Points"] LaTeX-exam-insert-label (TeX-arg-literal " ")) + '("ContinuedQuestion" 0) + '("CorrectChoice" 0) + '("CorrectChoiceEmphasis" 1) + '("IncompleteQuestion" 0) + '("SolutionEmphasis" 1) + '("addpoints" 0) + '("addquestionobject" 0) + '("answerclearance" 1) + '("answerline" ["Points"] (TeX-arg-literal " ")) + '("begingradingrange" 1) + '("bhpgword" 1) + '("bhpword" 1) + '("bhqword" 1) + '("bhsword" 1) + '("bhtword" 1) + '("bonuspart" 0) + '("bonuspointformat" 0) + '("bonuspointname" 1) + '("bonuspointpoints" 2) + '("bonuspointsinrange" 0) + '("bonuspointsofquestion" 1) + '("bonuspointsonpage" 0) + '("bonusqformat" 1) + '("bonussubpart" 0) + '("bonussubsubpart" 0) + '("bonustitledquestion" "Title" ["Points"] LaTeX-exam-insert-label (TeX-arg-literal " ")) + '("bonustotalformat" 0) + '("boxedpoints" 0) + '("bracketedpoints" 0) + '("bvpgword" 1) + '("bvpword" 1) + '("bvqword" 1) + '("bvsword" 1) + '("bvtword" 1) + '("cancelspace" 0) + '("cellwidth" 1) + '("cfoot" 1) + '("chbpword" 1) + '("chead" 1) + '("checkboxchar" 1) + '("checkboxeshook" 0) + '("checkedchar" 1) + '("choice" (TeX-arg-literal " ")) + '("choicelabel" 0) + '("choiceshook" 0) + '("chpgword" 1) + '("chpword" 1) + '("chqword" 1) + '("chsword" 1) + '("chsword" 1) + '("correctchoice" 0) + '("correctchoiceemphasis" 1) + '("covercfoot" 3) + '("coverchead" 3) + '("coverextrafootheight" 3) + '("coverextraheadheight" 3) + '("coverfirstpagefooter" 3) + '("coverfirstpageheader" 3) + '("coverfooter" 3) + '("coverheader" 3) + '("coverlfoot" 3) + '("coverlhead" 3) + '("coverrfoot" 3) + '("coverrhead" 3) + '("coverrunningfooter" 3) + '("coverrunningheader" 3) + '("cvbpword" 1) + '("cvpgword" 1) + '("cvpword" 1) + '("cvqword" 1) + '("cvsword" 1) + '("cvtword" 1) + '("dottedlinefillheight" 1) + '("droppoints" 0) + '("droptotalbonuspoints" 0) + '("droptotalpoints" 0) + '("endgradingrange" 1) + '("extraheadheight" 1) + '("extrawidth" 1) + '("fillwithdottedlines" 1) + '("fillwithlines" 1) + '("firstpagefooter" 1) + '("firstpagefootrule" 0) + '("firstpageheader" 3) + '("firstpageheadrule" 0) + '("footer" 3) + '("footrule" 0) + '("framedsolutions" 0) + '("fullwidth" 1) + '("gradetablestretch" 0) + '("greeknum" 0) + '("half" 0) + '("hpgword" 1) + '("hpword" 1) + '("hqword" 1) + '("hsword" 1) + '("htword" 1) + '("ifcontinuation" 2) + '("ifincomplete" 2) + '("iflastpage" 2) + '("ifprintanswers" 0) + '("lfoot" 1) + '("lhead" 1) + '("linefillheight" 1) + '("linefillthickness" 1) + '("makeemptybox" 1) + '("marginbonuspointname" 1) + '("marginpointname" 1) + '("marginpointsep" 1) + '("marksnotpoints" 0) + '("noaddpoints" 0) + '("nobonusqformat" 1) + '("noboxedpoints" 0) + '("nobracketedpoints" 0) + '("nocancelspace" 0) + '("nomorequestions" 0) + '("nopointsinmargin" 0) + '("nopointsinrightmargin" 0) + '("noprintanswers" 0) + '("noqformat" 1) + '("numbonuspoints" 0) + '("numcoverpages" 0) + '("numpages" 0) + '("numparts" 0) + '("numpoints" 0) + '("numquestions" 0) + '("numsubparts" 0) + '("numsubsubparts" 0) + '("oddeven" 2) + '("partlabel" 0) + '("partopsep" 0) + '("partshook" 0) + '("pointname" 1) + '("pointpoints" 2) + '("pointsdroppedatright" 0) + '("pointsinmargin" 0) + '("pointsinrightmargin" 0) + '("pointsofquestion" 1) + '("pointsonpage" 1) + '("printanswers" 0) + '("printselectedfalse" 0) + '("printselectedtrue" 0) + '("qformat" 1) + '("questionlabel" 0) + '("questionshook" 0) + '("rfoot" 1) + '("rhead" 1) + '("rightpointsmargin" 0) + '("roman" 0) + '("romannumeral" 0) + '("runningfooter" 3) + '("runningfootrule" 0) + '("runningheader" 3) + '("runningheadrule" 0) + '("settabletotalbonuspoints" 1) + '("settabletotalpoints" 1) + '("shadedsolutions" 0) + '("solutiontitle" 0) + '("subpartlabel" 0) + '("subpartshook" 0) + '("subsubpartlabel" 0) + '("subsubpartshook" 0) + '("thechoice" 0) + '("themarginpoints" 0) + '("thepartno" 0) + '("thequestion" 0) + '("thequestiontitle" 0) + '("thesubpart" 0) + '("thesubsubpart" 0) + '("totalbonuspoints" 0) + '("totalformat" 0) + '("totalnumpages" 0) + '("totalpoints" 0) + '("unframedsolutions" 0) + '("uplevel" 1) + '("usehorizontalhalf" 0) + '("useslantedhalf" 0) + '("vpgword" 1) + '("vpword" 1) + '("vqword" 1) + '("vsword" 1) + '("vtword" 1) + '("thepoints" 0) + ;; ... more stuff here + ) + (LaTeX-add-lengths "answerlinelength" "answerskip") + + ;; Don't increase indentation at various \if* macros: + (let ((exceptions '("ifcontinuation" + "ifincomplete" + "iflastpage"))) + (dolist (elt exceptions) + (add-to-list 'LaTeX-indent-begin-exceptions-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("question" "[") + ("titledquestion" "{[") + ("subpart" "[") + ("subsubpart" "[")) + 'textual))) + TeX-dialect) + +;;; exam.el ends here diff --git a/elpa/auctex-13.1.3/style/exam.elc b/elpa/auctex-13.1.3/style/exam.elc Binary files differnew file mode 100644 index 0000000..44db4da --- /dev/null +++ b/elpa/auctex-13.1.3/style/exam.elc diff --git a/elpa/auctex-13.1.3/style/exercise.el b/elpa/auctex-13.1.3/style/exercise.el new file mode 100644 index 0000000..98ea7da --- /dev/null +++ b/elpa/auctex-13.1.3/style/exercise.el @@ -0,0 +1,66 @@ +;;; exercise.el --- AUCTeX style for `exercise.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020 Free Software Foundation, Inc. + +;; Author: Nicolas Richard <theonewiththeevillook@yahoo.fr> +;; Created: 2014-03-17 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `exercise.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "exercise" + (lambda () + (LaTeX-add-environments + '("Exercise") + '("Exercise*") + '("Answer") + '("ExerciseList") + ) + (TeX-add-symbols + '("Exercise") + '("Exercise*") + '("Answer") + '("ExePart") + '("ExePart*") + '("Question") + '("subQuestion") + '("ExeText") + '("ExerciseSelect") + '("ExerciseStopSelect") + '("refAnswer") + '("marker") + '("DifficultyMarker") + '("listofexercises") + '("ListOfExerciseInToc") + '("ExerciseLevelInToc"))) + TeX-dialect) + +(defvar LaTeX-exercise-package-options '("noexercise" "noanswer" "exerciseonly" "answeronly" "nothing" "answerdelayed" "exercisedelayed" "lastexercise") + "Package options for the exercise package.") + +;;; exercise.el ends here diff --git a/elpa/auctex-13.1.3/style/exercise.elc b/elpa/auctex-13.1.3/style/exercise.elc Binary files differnew file mode 100644 index 0000000..fe9cf56 --- /dev/null +++ b/elpa/auctex-13.1.3/style/exercise.elc diff --git a/elpa/auctex-13.1.3/style/expl3.el b/elpa/auctex-13.1.3/style/expl3.el new file mode 100644 index 0000000..b0d5a38 --- /dev/null +++ b/elpa/auctex-13.1.3/style/expl3.el @@ -0,0 +1,63 @@ +;;; expl3.el --- AUCTeX style for `expl3.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2017-2020 Free Software Foundation, Inc. + +;; Author: Tassilo Horn <tsdh@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-02-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `expl3.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar font-latex-match-simple-include-list) + +(defvar LaTeX-expl3-syntax-table + (let ((st (copy-syntax-table LaTeX-mode-syntax-table))) + ;; Make _ and : symbol chars + (modify-syntax-entry ?\_ "_" st) + (modify-syntax-entry ?\: "_" st) + st)) + +(TeX-add-style-hook + "expl3" + (lambda () + (set-syntax-table LaTeX-expl3-syntax-table) + (when (and (eq TeX-install-font-lock 'font-latex-setup)) + ;; Fontify _ and : as part of macros. + (add-to-list 'font-latex-match-simple-include-list "_" t) + (add-to-list 'font-latex-match-simple-include-list ":" t))) + TeX-dialect) + +(defun LaTeX-expl3-package-options () + "Read the expl3 package options from the user." + (TeX-read-key-val t '(("check-declarations" ("true" "false")) + ("log-functions" ("true" "false")) + ("driver" ("auto" "latex2e" + "dvips" "dvipdfmx" + "pdfmode" "xdvipdfmx"))))) + +;;; expl3.el ends here diff --git a/elpa/auctex-13.1.3/style/expl3.elc b/elpa/auctex-13.1.3/style/expl3.elc Binary files differnew file mode 100644 index 0000000..0ffbb29 --- /dev/null +++ b/elpa/auctex-13.1.3/style/expl3.elc diff --git a/elpa/auctex-13.1.3/style/extramarks.el b/elpa/auctex-13.1.3/style/extramarks.el new file mode 100644 index 0000000..ecf619e --- /dev/null +++ b/elpa/auctex-13.1.3/style/extramarks.el @@ -0,0 +1,72 @@ +;;; extramarks.el --- AUCTeX style for `extramarks.sty' (v4.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-01-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `extramarks.sty' (v4.0) from 2021/01/04. +;; `extramarks.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "extramarks" + (lambda () + + ;; New symbols + (TeX-add-symbols + "firstleftmark" + "lastrightmark" + "firstrightmark" + "lastleftmark" + "firstleftxmark" + "firstrightxmark" + "topleftxmark" + "toprightxmark" + "lastleftxmark" + "lastrightxmark" + "firstxmark" + "lastxmark" + "topxmark" + '("extramarks" 2)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("extramarks" "{{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-extramarks-package-options nil + "Package options for the extramarks package.") + +;;; extramarks.el ends here diff --git a/elpa/auctex-13.1.3/style/extramarks.elc b/elpa/auctex-13.1.3/style/extramarks.elc Binary files differnew file mode 100644 index 0000000..d1f66a8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/extramarks.elc diff --git a/elpa/auctex-13.1.3/style/fancyhdr.el b/elpa/auctex-13.1.3/style/fancyhdr.el new file mode 100644 index 0000000..eb9751a --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyhdr.el @@ -0,0 +1,187 @@ +;;; fancyhdr.el --- AUCTeX style for `fancyhdr.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2013, 2018-2022 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fancyhdr.sty', v4.0 from 2021/01/04. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +;; Because there can be many places, `TeX-completing-read-multiple' is +;; used instead of just `completing-read', and a `collection' argument +;; is provided as the list of places differs between the macros +(defun TeX-arg-fancyhdr-place (optional + &optional prompt collection full) + "Prompt for fancyhdr places with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. If non-nil, PROMPT is +used as the prompt. If non-nil, COLLECTION is used as the +completion list for the place. + +If FULL is non-nil, a full list of places is offered for +completion, otherwise a reduced one omitting place combinations +for H(eader) or F(ooter)." + (let* ((places (or collection + ;; Standard places with no restrictions. + ;; Lower-case versions, and reverse versions + ;; (e.g., OC) are left out for simplicity. + (if full + '("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF" + "C" "CO" "CE" "COH" "COF" "CEH" "CEF" + "R" "RO" "RE" "ROH" "ROF" "REH" "REF") + '("L" "LO" "LE" "C" "CO" "CE" "R" "RE" "RO")))) + (arguments (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional + prompt + "Places") + places) + ","))) + (TeX-argument-insert arguments optional))) + +(defvar LaTeX-fancyhdr-fancypagestyle-regexp + '("\\\\fancypagestyle{\\([^}]+\\)}" + 1 LaTeX-auto-pagestyle) + "Regexp matching the first argument of \\fancypagestyle macro.") + +(TeX-add-style-hook + "fancyhdr" + (lambda () + (TeX-add-symbols + + ;; 2 Using fancyhdr + '("fancyhead" [ TeX-arg-fancyhdr-place ] t) + '("fancyfoot" [ TeX-arg-fancyhdr-place ] t) + '("fancyhf" [ (TeX-arg-fancyhdr-place nil nil t) ] t) + + '("fancyheadoffset" + [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "R" "RO" "RE")) ] + TeX-arg-length) + '("fancyfootoffset" + [ (TeX-arg-fancyhdr-place nil ("LO" "LE" "L" "RO" "RE" "R")) ] + TeX-arg-length) + '("fancyhfoffset" + [ (TeX-arg-fancyhdr-place nil ("L" "LO" "LE" "LOH" "LOF" "LEH" "LEF" + "R" "RO" "RE" "ROH" "ROF" "REH" "REF")) ] + TeX-arg-length) + + "headrulewidth" "footrulewidth" + "headruleskip" "footruleskip" + "headrule" "footrule" + "headwidth" + + '("fancyheadinit" t) + '("fancyfootinit" t) + '("fancyhfinit" t) + + '("fancycenter" + [ TeX-arg-length "Distance" ] [ "Stretch" ] 3) + + '("iftopfloat" 2) + '("ifbotfloat" 2) + '("iffloatpage" 2) + '("iffootnote" 2) + + '("fancypagestyle" + ;; Always add the chosen pagestyle to list of known pagestyles, + ;; dupes are removed when retrieving with the function + ;; `LaTeX-pagestyle-list': + (TeX-arg-pagestyle nil t) + [ TeX-arg-pagestyle "Base pagestyle" ] + t) + + ;; 15 The scoop on LATEX’s marks + '("nouppercase" t)) + + ;; Don't increase indentation at various \if* macros: + (let ((exceptions '("iftopfloat" + "ifbotfloat" + "iffloatpage" + "iffootnote"))) + (dolist (elt exceptions) + (add-to-list 'LaTeX-indent-begin-exceptions-list elt t)) + (LaTeX-indent-commands-regexp-make)) + + ;; 30 Deprecated commands + ;; Don't offer deprecated commands in V4.0 for completion anymore. + ;; '("lhead" t) + ;; '("lfoot" t) + ;; '("chead" t) + ;; '("cfoot" t) + ;; '("rhead" t) + ;; '("rfoot" t) + ;; "plainfootrulewidth" + ;; "plainheadrulewidth" + + ;; `fancyhdr.sty' supplies these two pagestyles. Pagestyle + ;; `fancyplain' is now deprecated. + (LaTeX-add-pagestyles "fancy" "fancydefault") + + ;; Add \fancypagestyle{pagestyle} to AUCTeX parser + (TeX-auto-add-regexp LaTeX-fancyhdr-fancypagestyle-regexp) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fancyhead" "[{") + ("fancyfoot" "[{") + ("fancyhf" "[{") + ("fancyheadoffset" "[{") + ("fancyfootoffset" "[{") + ("fancyhfoffset" "[{") + ("fancyheadinit" "{") + ("fancyfootinit" "{") + ("fancyhfinit" "{") + ;; Fontify deprecated commands for + ;; older documents; to be removed + ;; sometimes ... + ("lhead" "[{") + ("lfoot" "[{") + ("chead" "[{") + ("cfoot" "[{") + ("rhead" "[{") + ("rfoot" "[{") + ;; Don't fontify the last argument; + ;; all macros used there should have + ;; their own fontification since they + ;; can also be used in a document + ;; top-level. + ("fancypagestyle" "{[")) + 'function))) + TeX-dialect) + +(defvar LaTeX-fancyhdr-package-options + '("nocheck" "compatV3" "headings" "myheadings") + "Package options for fancyhdr package.") + +;;; fancyhdr.el ends here diff --git a/elpa/auctex-13.1.3/style/fancyhdr.elc b/elpa/auctex-13.1.3/style/fancyhdr.elc Binary files differnew file mode 100644 index 0000000..661c8ec --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyhdr.elc diff --git a/elpa/auctex-13.1.3/style/fancynum.el b/elpa/auctex-13.1.3/style/fancynum.el new file mode 100644 index 0000000..52ba702 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancynum.el @@ -0,0 +1,49 @@ +;;; fancynum.el --- AUCTeX style for `fancynum.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fancynum.sty' + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "fancynum" + (lambda () + (TeX-add-symbols + '("fnum" t) + '("setfnumdsym" t) + '("setfnummsym" t) + '("setfnumgsym" t))) + TeX-dialect) + +(defvar LaTeX-fancynum-package-options + '("english" "french" "tight" "loose" "commas" "thinspaces" "plain") + "Package options for fancynum.") + +;; fancynum.el ends here + diff --git a/elpa/auctex-13.1.3/style/fancynum.elc b/elpa/auctex-13.1.3/style/fancynum.elc Binary files differnew file mode 100644 index 0000000..a895c05 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancynum.elc diff --git a/elpa/auctex-13.1.3/style/fancyref.el b/elpa/auctex-13.1.3/style/fancyref.el new file mode 100644 index 0000000..22fd1c1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyref.el @@ -0,0 +1,136 @@ +;;; fancyref.el --- AUCTeX style file with support for fancyref.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2014, 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "fancyref" + (lambda () + (TeX-add-symbols + + ;; The macros with label arguments + '("fref" [ TeX-arg-fancyref-format ] TeX-arg-ref) + '("Fref" [ TeX-arg-fancyref-format ] TeX-arg-ref) + + ;; The macros which define new prefixes and formats + '("fancyrefchangeprefix" TeX-arg-macro "Prefix") + '("Frefformat" TeX-arg-fancyref-format TeX-arg-macro "Output") + '("frefformat" TeX-arg-fancyref-format TeX-arg-macro "Output") + + ;; The delimiter + "fancyrefargdelim" + + ;; All those names and abbreviations. + ;; Part + "fancyrefpartlabelprefix" + "Frefpartname" "frefpartname" + ;; Chapter + "fancyrefchalabelprefix" + "Frefchaname" "frefchaname" + ;; Section + "fancyrefseclabelprefix" + "Frefsecname" "frefsecname" + ;; Equation + "fancyrefeqlabelprefix" + "Frefeqname" "frefeqname" + ;; Figure + "fancyreffiglabelprefix" + "Freffigname" "freffigname" "Freffigshortname" + ;; Footnote + "fancyreffnlabelprefix" + "Freffnname" "freffnname" + ;; Item + "fancyrefitemlabelprefix" + "Frefitemname" "frefitemname" + ;; Table + "fancyreftablabelprefix" + "Freftabname" "freftabname" "Freftabshortname" + ;; Page + "Frefpgname" "frefpgname" "Frefpgshortname" + ;; On + "Frefonname" "frefonname" + ;; See + "Frefseename" "frefseename" + + ;; The spacing macros + "fancyrefloosespacing" "fancyreftightspacing" "fancyrefdefaultspacing" + + ;; And the hook + "fancyrefhook") + + ;; Insatall completion for labels and formats + (setq TeX-complete-list + (append + '(("\\\\[fF]ref\\(\\[[^]]*\\]\\)?{\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-label-list "}") + ("\\\\[fF]ref\\[\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-fancyref-formats "]") + ("\\\\[fF]refformat{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-fancyref-formats "}")) + TeX-complete-list)) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fref" "[{") ("Fref" "[{")) 'reference)) + + ;; Activate RefTeX reference style. + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Fancyref"))) + TeX-dialect) + +;; The following list keeps a list of available format names +;; Note that this list is only updated when a format is used, not +;; during buffer parsing. We could install a regexp to look for +;; formats, but this would not work in multifile documents since the +;; formats are not written out to the auto files. +;; For now, we just leave it at that. +(defvar LaTeX-fancyref-formats '(("plain") ("vario") ("margin") ("main")) + "List of formats for fancyref.") + +(defun LaTeX-fancyref-formats () LaTeX-fancyref-formats) + +(defun TeX-arg-fancyref-format (optional &optional prompt _definition) + "Prompt for a fancyref format name. +If the user gives an unknown name, add it to the list." + (let ((format (completing-read (TeX-argument-prompt optional prompt "Format") + LaTeX-fancyref-formats))) + (if (not (string-equal "" format)) + (add-to-list 'LaTeX-fancyref-formats (list format))) + (TeX-argument-insert format optional))) + +(defvar LaTeX-fancyref-package-options '("english" "german" "loose" + "margin" "paren" "plain" "tight" + "vario") + "Package options for the fancyref package.") + +;;; fancyref.el ends here diff --git a/elpa/auctex-13.1.3/style/fancyref.elc b/elpa/auctex-13.1.3/style/fancyref.elc Binary files differnew file mode 100644 index 0000000..2878e5b --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyref.elc diff --git a/elpa/auctex-13.1.3/style/fancyvrb.el b/elpa/auctex-13.1.3/style/fancyvrb.el new file mode 100644 index 0000000..22e52c2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyvrb.el @@ -0,0 +1,772 @@ +;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 3.6. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2014, 2016-2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fancyvrb.sty' version 3.6. + +;; This style has some capabilities to parse user defined macros, +;; environments and saved blocks with `SaveVerbatim' environments and +;; offer them for completion. After defining a new macro or +;; environment, hit `C-c C-n' to parse the document. In case of +;; `SaveVerbatim', a second `C-c C-n' might be necessary. + +;; The command `\CustomVerbatimEnvironment' is not mentioned in the +;; documenation; hence this command is removed from this style. Use +;; `\DefineVerbatimEnvironment' for new environments and customize the +;; standard ones with `\RecustomVerbatimEnvironment'. + +;; The entries in `LaTeX-fancyvrb-key-val-options' cover also some +;; keys which are not mentioned in the manual of the package. + +;; Starting with version 3.6, fancyvrb.sty provides a `reflabel' key +;; in the optional arguments which acts like a `\label' macro. This +;; key makes mostly sense for `\pageref'; referencing number of +;; missing \caption's with `\ref' in a fancyvrb environment isn't +;; useful. This style provides support for AUCTeX and RefTeX in order +;; to add and reference these labels. When inserting an environment +;; with `C-c C-e', choose `reflabel' key during the completion. If +;; you're using RefTeX and want to pass the label insertion job to it, +;; simply leave the key value-less and proceed. Otherwise enter the +;; label value by yourself. AUCTeX and RefTeX will parse the value +;; and offer it for completion once a referencing macros is used. + +;;; Code: + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) +(defvar LaTeX-fvextra-key-val-options) + +(defvar LaTeX-fancyvrb-key-val-options + `(("commentchar" ("none")) + ("gobble") + ("formatcom") + ("formatcom*") ; Undocumented key + ("fontfamily" ("tt" "courier" "helvetica")) + ("fontsize" ("auto" "\\tiny" "\\scriptsize" + "\\footnotesize" "\\small" "\\normalsize" + "\\large" "\\Large" "\\LARGE" "\\huge" "\\Huge")) + ("fontshape" ("auto" "n" "it" "sl" "sc" "scit")) + ("fontseries" ("auto" "m" "b" "bx" "sb" "c" "l" "lc")) + ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single")) + ("framerule") + ("framesep") + ("rulecolor" ("none")) + ("fillcolor" ("none")) + ("label" ("none")) + ("labelposition" ("none" "topline" "bottomline" "all")) + ("numbers" ("none" "left" "right")) + ("numbersep") + ("firstnumber" ("auto" "last" "integer")) + ("stepnumber") + ("numberblanklines" ("true" "false")) + ("firstline") + ("lastline") + ("showspaces" ("true" "false")) + ("showtabs" ("true" "false")) + ("obeytabs" ("true" "false")) + ("tabsize") + ("baselinestretch" ("auto" "dimension")) + ("commandchars" ("none")) + ("xleftmargin") + ("xrightmargin") + ("resetmargins" ("true" "false")) + ("hfuzz") + ("samepage" ("true" "false")) + ("codes") + ("codes*") ; Undocumented key + ("defineactive") + ("defineactive*") ; Undocumented key + ("reflabel") + ;; Undocumented key and introduced in version 2.81 2011/04/06 + ("vspace" ,(mapcar (lambda (x) + (concat TeX-esc (car x))) + (LaTeX-length-list))) + ;; Actually, the following options are used only by the `BVerbatim' + ;; environment. + ("boxwidth" ("auto" "dimension")) + ("baseline" ("b" "c" "t")) + ;; The next key applies only to `\SaveVerb' macro. + ("aftersave")) + "Key=value options for fancyvrb macros and environments.") + +(defun LaTeX-fancyvrb-key-val-options () + "Return an updated list of key=vals from fancyvrb package. +This function also checks if the package fvextra is used and +takes its key=vals into account." + (append + ;; Check if fvextra is loaded in combination with x?color: + (when (and (member "fvextra" (TeX-style-list)) + (or (member "xcolor" TeX-active-styles) + (member "color" TeX-active-styles))) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (keys '("highlightcolor" + "rulecolor" + "fillcolor" + "tabcolor" + "spacecolor")) + (colors (mapcar #'car (funcall colorcmd))) + result) + (dolist (key keys result) + (if (string= key "highlightcolor") + (push (list key colors) result) + (push (list key (cons "none" colors)) result))))) + + ;; Check if fvextra is loaded: + (when (member "fvextra" TeX-active-styles) + LaTeX-fvextra-key-val-options) + + ;; Check if fancyvrb is loaded in combination with x?color: + (when (and (not (member "fvextra" TeX-active-styles)) + (or (member "xcolor" TeX-active-styles) + (member "color" TeX-active-styles))) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (colors (mapcar (lambda (x) + (concat TeX-esc "color" TeX-grop x TeX-grcl)) + (mapcar #'car (funcall colorcmd)))) + (keys '("rulecolor" "fillcolor")) + val result) + (dolist (key keys result) + (setq val (cadr (assoc key LaTeX-fancyvrb-key-val-options))) + (push (list key (append val colors)) result)))) + + ;; Plain fancyvrb: + LaTeX-fancyvrb-key-val-options)) + +(defvar LaTeX-fancyvrb-base-macros + '("VerbatimInput" "BVerbatimInput" "LVerbatimInput" + "SaveVerb" "UseVerb" "Verb") + "List of base macros available with fancyvrb package. +Starred versions are not included in this list.") + +(defvar LaTeX-fancyvrb-base-environments + '("Verbatim" "BVerbatim" "LVerbatim" "SaveVerbatim" "VerbatimOut") + "List of base environments available with fancyvrb package. +Starred versions are not included in this list.") + +(defvar LaTeX-fancyvrb-key-val-skip-regexp + (concat "\\(?:" (LaTeX-extract-key-value-label 'none) "\\)?") + "Helper regexp to skip over an optional argument.") + +;; Setup for defining new Verbatim commands: + +(TeX-auto-add-type "fancyvrb-macro" "LaTeX") + +(defvar LaTeX-fancyvrb-macro-regexp + `(,(concat "\\\\\\(Rec\\|C\\)ustomVerbatimCommand" + "[ \t\n\r]*{?[ \t\n\r]*\\\\\\([A-Za-z]+\\)[ \t\n\r]*}?" + "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}") + (2 3 1) LaTeX-auto-fancyvrb-macro) + "Matches macros by fancyvrb package.") + +;; Setup for defining new Verbatim environments: + +(TeX-auto-add-type "fancyvrb-environment" "LaTeX") + +(defvar LaTeX-fancyvrb-environment-regexp + `(,(concat "\\\\DefineVerbatimEnvironment" + "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z0-9]+\\)[ \t\n\r]*}" + "[ \t\n\r]*{[ \t\n\r]*\\([A-Za-z]+\\)[ \t\n\r]*}") + (1 2) LaTeX-auto-fancyvrb-environment) + "Matches new environments defined by fancyvrb package.") + +;; Setup for names in SaveVerb macros: + +(TeX-auto-add-type "fancyvrb-saveverb" "LaTeX") + +(defvar LaTeX-fancyvrb-saveverb-regexp + `(,(concat "\\\\SaveVerb" + LaTeX-fancyvrb-key-val-skip-regexp + "{\\([^}]+\\)}") + 1 LaTeX-auto-fancyvrb-saveverb) + "Match the name under which verbatim text is saved by SaveVerb macro.") + +;; Setup for names in SaveVerbatim environments: + +(TeX-auto-add-type "fancyvrb-saveverbatim" "LaTeX") + +(defvar LaTeX-fancyvrb-saveverbatim-regexp + `(,(concat "\\\\begin{SaveVerbatim}" + LaTeX-fancyvrb-key-val-skip-regexp + "{\\([^}]+\\)}") + 1 LaTeX-auto-fancyvrb-saveverbatim) + "Match the name under which verbatim text is saved by SaveVerbatim environment.") + +(defun LaTeX-fancyvrb-auto-prepare () + "Clear various LaTeX-auto-fancyvrb-* variables before parsing." + (setq LaTeX-auto-fancyvrb-macro nil + LaTeX-auto-fancyvrb-environment nil + LaTeX-auto-fancyvrb-saveverb nil + LaTeX-auto-fancyvrb-saveverbatim nil)) + +(defun LaTeX-fancyvrb-auto-cleanup () + "Process parsed elements for fancyvrb package." + (LaTeX-fancyvrb-arg-define-macro nil t) + (LaTeX-fancyvrb-arg-define-environment nil t)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-fancyvrb-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-fancyvrb-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-fancyvrb-arg-define-macro (optional &optional cleanup recustom) + "Query and insert a new verbatim macro with fancyvrb package. +If OPTIONAL is non-nil, insert the arguments in brackets. If +CLEANUP is non-nil, do not insert any arguments in the buffer and +update only various AUCTeX variables for verbatim macros. If +RECUSTOM is non-nil, delete macros from the variable +`TeX-symbol-list' before adding the new ones." + ;; This part is only relevant when called by user: + (unless cleanup + (let ((new-mac (if recustom + (completing-read + (TeX-argument-prompt optional nil "Verbatim macro: \\" t) + (mapcar #'car (apply #'append LaTeX-fancyvrb-macro-list))) + (TeX-read-string + (TeX-argument-prompt optional nil "New verbatim macro: \\" t)))) + (base-mac (completing-read (TeX-argument-prompt optional nil "Based on macro") + LaTeX-fancyvrb-base-macros)) + (rec-flag (if recustom "Rec" "C"))) + ;; We are (re-)defining a macro: Insert user queried input and + ;; use `LaTeX-add-fancyvrb-macros' on the input. Do not enclose + ;; the first argument in braces as this will improve + ;; fontification. Otherwise, the part between 2 closing braces + ;; get fontified, i.e.: + ;; \CustomVerbatimCommand{\foo}{Verb}{} + ;; ^ ^ + (let ((TeX-arg-opening-brace "") + (TeX-arg-closing-brace "")) + (TeX-argument-insert new-mac optional TeX-esc)) + (TeX-argument-insert base-mac optional) + (TeX-argument-insert + (TeX-read-key-val optional (LaTeX-fancyvrb-key-val-options)) optional) + (LaTeX-add-fancyvrb-macros `(,new-mac ,base-mac ,rec-flag)))) + ;; + ;; Now run the procdure: Do not use the function + ;; `LaTeX-fancyvrb-macro-list' here which will remove dupes from the + ;; variable `LaTeX-fancyvrb-macro-list' depending on car; we need + ;; the variable as is, hence (apply #'append ...); + (dolist (elt (apply #'append LaTeX-fancyvrb-macro-list)) + (let ((mac-name (nth 0 elt)) + (base-mac (nth 1 elt)) + (flag (nth 2 elt))) + ;; If we're Rec-ustomizing, delete the entry first from + ;; `TeX-symbol-list': + (when (string= flag "Rec") + (setq TeX-symbol-list + (assq-delete-all (car (assoc mac-name (TeX-symbol-list))) TeX-symbol-list))) + ;; Now add the new item: Start with new macros for loading + ;; files: + (cond ((member base-mac '("VerbatimInput" "BVerbatimInput" "LVerbatimInput")) + (TeX-add-symbols + `(,mac-name + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-arg-file-relative)) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,mac-name "[{")) + 'reference))) + ;; New macros for saving verbatim text: + ((string= base-mac "SaveVerb") + (TeX-add-symbols + `(,mac-name + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Save name")))) + (LaTeX-add-fancyvrb-saveverbs name) + (format "%s" name)))) + TeX-arg-verb)) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,mac-name "[{")) + 'textual))) + ;; New macros for using previously saved text: + ((string= base-mac "UseVerb") + (TeX-add-symbols + `(,mac-name + (TeX-arg-eval + completing-read + (TeX-argument-prompt nil nil "Saved name") + (LaTeX-fancyvrb-saveverb-list)))) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,mac-name "{")) + 'textual))) + ;; Anything else is considered as verbatim typesetting macro: + (t + (TeX-add-symbols + `(,mac-name + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + TeX-arg-verb) + ;; Defined macros have a starred version where the + ;; `showspaces' key is set to true + `(,(concat mac-name "*") + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + TeX-arg-verb)) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local + mac-name t) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local + (concat mac-name "*") t) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,mac-name "*[")) + 'textual)))))) + ;; Update font-lock: + (when (and (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-set-syntactic-keywords))) + +(defun LaTeX-fancyvrb-arg-define-environment (optional &optional cleanup) + "Query and insert a new verbatim environment with fancyvrb package. +If OPTIONAL is non-nil, insert the arguments in brackets. If +CLEANUP is non-nil, do not insert any arguments in the buffer and +update only various AUCTeX variables for verbatim environments." + (unless cleanup + (let ((new-env (TeX-read-string + (TeX-argument-prompt optional nil "New verbatim environment"))) + (base-env (completing-read + (TeX-argument-prompt optional nil "Based on environment") + LaTeX-fancyvrb-base-environments))) + ;; We are defining a new env: First insert the arguments and then + ;; run `LaTeX-add-fancyvrb-environments' on '(new-env base-env). + ;; If base-env is SaveVerbatim, run + ;; `LaTeX-add-fancyvrb-saveverbatims' on new-env as well. + (TeX-argument-insert new-env optional) + (TeX-argument-insert base-env optional) + (TeX-argument-insert + (TeX-read-key-val optional (LaTeX-fancyvrb-key-val-options)) optional) + (LaTeX-add-fancyvrb-environments `(,new-env ,base-env)) + (when (string= base-env "SaveVerbatim") + (LaTeX-add-fancyvrb-saveverbatims new-env)))) + ;; + ;; Now run the procdure: + (dolist (elt (LaTeX-fancyvrb-environment-list)) + (let ((env (car elt)) + (type (cadr elt))) + (cond ((string= type "VerbatimOut") + (LaTeX-add-environments + `(,env (lambda (env) + (let ((options (TeX-read-key-val + t (LaTeX-fancyvrb-key-val-options))) + (file (TeX-read-string "Output file: "))) + (LaTeX-insert-environment + env + (concat + (unless (zerop (length options)) + (concat LaTeX-optop options LaTeX-optcl)) + (concat TeX-grop file TeX-grcl)))))))) + ((string= type "SaveVerbatim") + (TeX-auto-add-regexp `(,(concat "\\\\begin{" + env + "}" + LaTeX-fancyvrb-key-val-skip-regexp + "{\\([^}]+\\)}") + 1 LaTeX-auto-fancyvrb-saveverbatim))) + (t + ;; Regular verbatim environments have a starred + ;; version; so add them here; the non-starred additions + ;; to `LaTeX-verbatim-environments-local' and + ;; `LaTeX-indent-environment-list' are done outside + ;; (cond ...): + (LaTeX-add-environments + `(,env LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val)) + (LaTeX-add-environments + `(,(concat env "*") LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val)) + (add-to-list 'LaTeX-verbatim-environments-local (concat env "*")) + (add-to-list 'LaTeX-indent-environment-list + `(,(concat env "*") current-indentation) t) + ;; Tell AUCTeX about label values to reflabel key: + (add-to-list 'LaTeX-label-alist + (cons env 'LaTeX-listing-label) t) + (add-to-list 'LaTeX-label-alist + (cons (concat env "*") 'LaTeX-listing-label) t) + (TeX-auto-add-regexp + `(,(concat (regexp-quote TeX-esc) + "begin[[:space:]]*" + (regexp-quote TeX-grop) + env + "\\*?" + (regexp-quote TeX-grcl) + "[[:space:]]*" + (LaTeX-extract-key-value-label "reflabel")) + 1 LaTeX-auto-label)) + ;; Tell RefTeX: + (when (and (fboundp 'reftex-add-label-environments) + (boundp 'reftex-label-regexps)) + (reftex-add-label-environments + `((,env + ?l ,LaTeX-listing-label "~\\pageref{%s}" + LaTeX-fancyvrb-reftex-label-context-function + (regexp "[Ll]isting" "[Vv]erbatim" + "[Cc]ode" "Quell\\(code\\|text\\)")) + + (,(concat env "*") + ?l ,LaTeX-listing-label "~\\pageref{%s}" + LaTeX-fancyvrb-reftex-label-context-function + (regexp "[Ll]isting" "[Vv]erbatim" + "[Cc]ode" "Quell\\(code\\|text\\)")))) + (add-to-list 'reftex-label-regexps + (concat + (regexp-quote TeX-esc) + "begin[[:space:]]*" + (regexp-quote TeX-grop) + (concat env "\\*?") + (regexp-quote TeX-grcl) + "[[:space:]]*" + (LaTeX-extract-key-value-label "reflabel" 1)) + t)))) + ;; These apply for all environments defined: + (add-to-list 'LaTeX-verbatim-environments-local env) + (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) t))) + ;; Update RefTeX: + (when (fboundp 'reftex-compile-variables) + (reftex-compile-variables)) + ;; Update font-lock: + (when (and (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-set-syntactic-keywords))) + +(defun LaTeX-fancyvrb-arg-file-relative (optional) + "Query and insert a file name relative to current master file. +If OPTIONAL is non-nil, insert the file name in brackets." + (TeX-argument-insert + (file-relative-name + (read-file-name (TeX-argument-prompt optional nil "File")) + (TeX-master-directory)) + optional)) + +(defun LaTeX-fancyvrb-env-reflabel-key-val (_optional) + "Add a label value to reflabel key. +This function checks if the reflabel key is given in the optional +argument of a fancyvrb environment and then adds a label as value +to that key. The label value is inserted only if the key is +value-less; user entered label values are recognized and +respected. OPTIONAL is ignored." + (let ((p (point-marker)) + (s (make-marker))) + (set-marker s (save-excursion + (LaTeX-find-matching-begin) + (re-search-forward (regexp-quote LaTeX-optop) + (line-end-position) + t))) + ;; Search for the reflabel and a potential value: + (when (marker-position s) + (re-search-backward + (concat + "\\(\\<reflabel\\>\\)" + ;; Check if the key already has a label value: + "\\(" + "[[:space:]]*=[[:space:]]*" + (regexp-quote TeX-grop) + "?" + "[[:alnum:]:._-]" + "\\)?") + s t) + ;; Insert a label value only if the key is value-less: + (when (and (not (match-string 2)) + (match-string 1)) + (goto-char (match-end 1)) + (insert "=" + TeX-grop + (format "%s" (LaTeX-label (LaTeX-current-environment) + 'environment + t)) + TeX-grcl))) + ;; At any rate, go to where we started and clean up: + (goto-char p) + (set-marker p nil) + (set-marker s nil))) + +(defun LaTeX-fancyvrb-reftex-label-context-function (env) + "Extract and return a context string for RefTeX. +The context string is the first line of the verbatim environment. +If no reflabel key is found, an error is issued. +ENV is the name of current environment as a string." + (let* ((envstart (save-excursion + (re-search-backward (concat "\\\\begin[[:space:]]*{" + env + "}") + nil t))) + (label-key (save-excursion + (re-search-backward "\\<reflabel[ \t\n\r%]*=[ \t\n\r%]*" + envstart t)))) + (if label-key + (save-excursion + (goto-char envstart) + (re-search-forward (regexp-quote LaTeX-optop) label-key t) + (up-list) + (forward-line) + ;; Return the first line of verbatim env: + (buffer-substring-no-properties (point) + (line-end-position))) + (error "No label found")))) + +(defvar LaTeX-fancyvrb-key-val-label-regexp + `(,(concat + (regexp-quote TeX-esc) + "begin[[:space:]]*" + (regexp-quote TeX-grop) + "[BL]?Verbatim\\*?" + (regexp-quote TeX-grcl) + "[[:space:]]*" + (LaTeX-extract-key-value-label "reflabel")) + 1 LaTeX-auto-label) + "Matches the label inside an optional argument of fancyvrb environments.") + +(TeX-add-style-hook + "fancyvrb" + (lambda () + (TeX-auto-add-regexp LaTeX-fancyvrb-macro-regexp) + (TeX-auto-add-regexp LaTeX-fancyvrb-environment-regexp) + (TeX-auto-add-regexp LaTeX-fancyvrb-saveverb-regexp) + (TeX-auto-add-regexp LaTeX-fancyvrb-saveverbatim-regexp) + (TeX-auto-add-regexp LaTeX-fancyvrb-key-val-label-regexp) + (TeX-run-style-hooks + "keyval") + + (TeX-add-symbols + ;; Verbatim material in footnotes + "VerbatimFootnotes" + ;; Improved verbatim commands + '("Verb" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb) + ;; \Verb also has a starred version: + '("Verb*" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb) + '("DefineShortVerb" (TeX-arg-eval + TeX-read-string + (TeX-argument-prompt nil nil "Character") + TeX-esc)) + '("UndefineShortVerb" (TeX-arg-eval + TeX-read-string + (TeX-argument-prompt nil nil "Character") + TeX-esc)) + ;; Verbatim environments + '("fvset" (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options))) + ;; Changing individual line formatting + "FancyVerbFormatLine" + ;; Line numbering + "theFancyVerbLine" + ;; Selection of lines to print + "FancyVerbStartString" + "FancyVerbStopString" + + ;; Personalized environments + '("DefineVerbatimEnvironment" + LaTeX-fancyvrb-arg-define-environment) + '("RecustomVerbatimEnvironment" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Verbatim environment") + LaTeX-fancyvrb-base-environments) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Based on environment") + LaTeX-fancyvrb-base-environments) + (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options))) + + '("CustomVerbatimCommand" + LaTeX-fancyvrb-arg-define-macro) + '("RecustomVerbatimCommand" + (LaTeX-fancyvrb-arg-define-macro nil t)) + + ;; Saving and restoring verbatim text and environments + '("SaveVerb" + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Save name")))) + (LaTeX-add-fancyvrb-saveverbs name) + (format "%s" name)))) + TeX-arg-verb) + '("UseVerb" (TeX-arg-eval + completing-read + (TeX-argument-prompt nil nil "Saved name") + (LaTeX-fancyvrb-saveverb-list))) + '("UseVerbatim" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Saved name") + (LaTeX-fancyvrb-saveverbatim-list))) + '("LUseVerbatim" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Saved name") + (LaTeX-fancyvrb-saveverbatim-list))) + '("BUseVerbatim" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Saved name") + (LaTeX-fancyvrb-saveverbatim-list))) + + ;; Writing and reading verbatim files + '("VerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-arg-file-relative) + '("BVerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-arg-file-relative) + '("LVerbatimInput" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-arg-file-relative)) + + (LaTeX-add-environments + '("Verbatim" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("Verbatim*" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("BVerbatim" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("BVerbatim*" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("LVerbatim" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("LVerbatim*" LaTeX-env-args + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] + LaTeX-fancyvrb-env-reflabel-key-val) + '("SaveVerbatim" + (lambda (env) + (let ((options (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options))) + (name (TeX-read-string "Save name: "))) + (LaTeX-insert-environment + env + (concat + (unless (zerop (length options)) + (concat LaTeX-optop options LaTeX-optcl)) + (concat TeX-grop name TeX-grcl))) + (LaTeX-add-fancyvrb-saveverbatims name)))) + '("VerbatimOut" + (lambda (env) + (let ((options (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options))) + (file (TeX-read-string "Output file: "))) + (LaTeX-insert-environment + env + (concat (unless (zerop (length options)) + (concat LaTeX-optop options LaTeX-optcl)) + (concat TeX-grop file TeX-grcl))))))) + + (let ((envs '("BVerbatim" "BVerbatim*" + "LVerbatim" "LVerbatim*" + "Verbatim" "Verbatim*"))) + ;; Add pre-defined environments to `LaTeX-label-alist': + (dolist (env envs) + (add-to-list 'LaTeX-label-alist (cons env 'LaTeX-listing-label) t)) + + ;; Tell RefTeX + (when (and (fboundp 'reftex-add-label-environments) + (fboundp 'reftex-compile-variables) + (boundp 'reftex-label-regexps)) + (dolist (env envs) + (reftex-add-label-environments + `((,env ?l ,LaTeX-listing-label "~\\pageref{%s}" + LaTeX-fancyvrb-reftex-label-context-function + (regexp "[Ll]isting" "[Vv]erbatim" + "[Cc]ode" "Quell\\(code\\|text\\)"))))) + + (unless (string-match "\\<reflabel" + (mapconcat #'identity + reftex-label-regexps + "|")) + (make-local-variable 'reftex-label-regexps) + (add-to-list 'reftex-label-regexps + (concat + (regexp-quote TeX-esc) + "begin[[:space:]]*" + (regexp-quote TeX-grop) + "[BL]?Verbatim\\*?" + (regexp-quote TeX-grcl) + "[[:space:]]*" + (LaTeX-extract-key-value-label "reflabel" 1)) + t) + (reftex-compile-variables)))) + + (LaTeX-add-counters + "FancyVerbLine") + + ;; Filling + (add-to-list 'LaTeX-verbatim-environments-local "Verbatim") + (add-to-list 'LaTeX-verbatim-environments-local "Verbatim*") + (add-to-list 'LaTeX-verbatim-environments-local "BVerbatim") + (add-to-list 'LaTeX-verbatim-environments-local "BVerbatim*") + (add-to-list 'LaTeX-verbatim-environments-local "LVerbatim") + (add-to-list 'LaTeX-verbatim-environments-local "LVerbatim*") + (add-to-list 'LaTeX-verbatim-environments-local "SaveVerbatim") + (add-to-list 'LaTeX-verbatim-environments-local "VerbatimOut") + (make-local-variable 'LaTeX-indent-environment-list) + (add-to-list 'LaTeX-indent-environment-list '("Verbatim" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("Verbatim*" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("BVerbatim" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("BVerbatim*" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("LVerbatim" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("LVerbatim*" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("SaveVerbatim" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list '("VerbatimOut" current-indentation) t) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb") + (add-to-list 'LaTeX-verbatim-macros-with-delims-local "Verb*") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("CustomVerbatimCommand" "|{\\{{") + ("RecustomVerbatimCommand" "|{\\{{") + ("DefineVerbatimEnvironment" "{{{") + ("RecustomVerbatimEnvironment" "{{{") + ("DefineShortVerb" "{") + ("UndefineShortVerb" "{") + ("fvset" "{")) + 'function) + (font-latex-add-keywords '(("VerbatimInput" "[{") + ("BVerbatimInput" "[{") + ("LVerbatimInput" "[{")) + 'reference) + (font-latex-add-keywords '(("Verb" "*[") ; The second argument is verbatim. + ("SaveVerb" "[{") + ("UseVerb" "{") + ("UseVerbatim" "{") + ("LUseVerbatim" "{") + ("BUseVerbatim" "{")) + 'textual) + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-fancyvrb-package-options nil + "Package options for the fancyvrb package.") + +;;; fancyvrb.el ends here diff --git a/elpa/auctex-13.1.3/style/fancyvrb.elc b/elpa/auctex-13.1.3/style/fancyvrb.elc Binary files differnew file mode 100644 index 0000000..2752823 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fancyvrb.elc diff --git a/elpa/auctex-13.1.3/style/fbb.el b/elpa/auctex-13.1.3/style/fbb.el new file mode 100644 index 0000000..7a052ae --- /dev/null +++ b/elpa/auctex-13.1.3/style/fbb.el @@ -0,0 +1,88 @@ +;;; fbb.el --- AUCTeX style for `fbb.sty' (v1.07) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014--2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fbb.sty' (v1.07) from 2015/04/06. +;; `fbb.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "fbb" + (lambda () + + ;; Run style hook for various packages loaded by fbb + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + + ;; Only preamble command + '("useosf" 0) + + ;; Text commands + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sufigures" -1) ; superior figures declaration + '("textlf" t) ; proportional lining figures + '("texttlf" t) ; tabular lining figures + '("textosf" t) ; proportional oldstyle figures + '("texttosf" t) ; tabular oldstyle figures + '("textsu" t)) ; superior figures + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sufigures" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-fbb-package-options + '("lining" "osf" "oldstyle" "tabular" "p" "proportional" + "scale" "scaled" "scosf" "sups") + "Package options for the fbb package.") + +;;; fbb.el ends here diff --git a/elpa/auctex-13.1.3/style/fbb.elc b/elpa/auctex-13.1.3/style/fbb.elc Binary files differnew file mode 100644 index 0000000..0e387d4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fbb.elc diff --git a/elpa/auctex-13.1.3/style/fbox.el b/elpa/auctex-13.1.3/style/fbox.el new file mode 100644 index 0000000..8348dfa --- /dev/null +++ b/elpa/auctex-13.1.3/style/fbox.el @@ -0,0 +1,81 @@ +;;; fbox.el --- AUCTeX style for `fbox.sty' (v0.06) -*- lexical-binding: t; -*- + +;; Copyright (C) 2019--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-11-08 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fbox.sty' (v0.06) from 2022/02/20. +;; `fbox.sty' is part of TeXLive. + +;;; Code + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defun LaTeX-fbox-key-val-options () + "Return an updated list of key=vals from fbox package." + (let ((colors (mapcar #'car (LaTeX-xcolor-definecolor-list))) + (lenghts (mapcar (lambda (x) + (concat TeX-esc (car x))) + (LaTeX-length-list)))) + `(("boxrule" ,lenghts) + ("boxsep" ,lenghts) + ("lcolor" ,colors) + ("rcolor" ,colors) + ("bcolor" ,colors) + ("tcolor" ,colors) + ("l") + ("r") + ("b") + ("t")))) + +(TeX-add-style-hook + "fbox" + (lambda () + (TeX-run-style-hooks "xcolor") + (TeX-add-symbols + '("fbox" [TeX-arg-key-val (LaTeX-fbox-key-val-options)] t) + '("fbox*" [TeX-arg-key-val (LaTeX-fbox-key-val-options)] t) + '("fparbox" [TeX-arg-key-val (LaTeX-fbox-key-val-options)] t) + '("fparbox*" [TeX-arg-key-val (LaTeX-fbox-key-val-options)] t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fbox" "*[{") + ("fparbox" "*[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-fbox-package-options nil + "Package options for the fbox package.") + +;;; fbox.el ends here diff --git a/elpa/auctex-13.1.3/style/fbox.elc b/elpa/auctex-13.1.3/style/fbox.elc Binary files differnew file mode 100644 index 0000000..b7bb37c --- /dev/null +++ b/elpa/auctex-13.1.3/style/fbox.elc diff --git a/elpa/auctex-13.1.3/style/filecontents.el b/elpa/auctex-13.1.3/style/filecontents.el new file mode 100644 index 0000000..3c8713a --- /dev/null +++ b/elpa/auctex-13.1.3/style/filecontents.el @@ -0,0 +1,64 @@ +;;; filecontents.el --- AUCTeX style for `filecontents.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013--2016, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2013-01-01 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `filecontents.sty'. The package removes the two +;; constraints that `filecontents' from LaTeX2e has, namely that the environment +;; must be before the documentclass (or \begin{document} according to some +;; sources), and that existing files are not overwritten. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "filecontents" + (lambda () + (LaTeX-add-environments + '("filecontents" LaTeX-env-filecontents) + '("filecontents*" LaTeX-env-filecontents)) + + (make-local-variable 'LaTeX-indent-environment-list) + (add-to-list 'LaTeX-indent-environment-list + '("filecontents" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list + '("filecontents*" current-indentation) t)) + TeX-dialect) + +(defun LaTeX-env-filecontents (environment) + "Insert ENVIRONMENT with filename for contents." + (LaTeX-insert-environment environment + (concat TeX-grop + (TeX-read-string "File: ") + TeX-grcl)) + (delete-horizontal-space)) + +(defvar LaTeX-filecontents-package-options nil + "Package options for filecontents.") + +;; filecontents.el ends here diff --git a/elpa/auctex-13.1.3/style/filecontents.elc b/elpa/auctex-13.1.3/style/filecontents.elc Binary files differnew file mode 100644 index 0000000..5fa9caa --- /dev/null +++ b/elpa/auctex-13.1.3/style/filecontents.elc diff --git a/elpa/auctex-13.1.3/style/flashcards.el b/elpa/auctex-13.1.3/style/flashcards.el new file mode 100644 index 0000000..c163847 --- /dev/null +++ b/elpa/auctex-13.1.3/style/flashcards.el @@ -0,0 +1,69 @@ +;;; flashcards.el --- AUCTeX style for the flashcards class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-04-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the flashcards class. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "flashcards" + (lambda () + (TeX-add-symbols + '("cardfrontstyle" ["Format"] "Style") + '("cardfrontfoot" "Footer text") + '("cardbackstyle" ["Format"] "Style") + '("cardfrontheadstyle" ["Format"] "Style") + '("cardfrontfootstyle" ["Format"] "Style") + "cardmargin" + "cardpaper" + "cardpapermode" + "cardrows" + "cardcolumns" + "cardheight" + "cardwidth") + (LaTeX-add-environments '("flashcard" ["Header"] "Front side")) + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cardfrontstyle" "[{") + ("cardfrontfoot" "{") + ("cardbackstyle" "[{") + ("cardfrontheadstyle" "[{") + ("cardfrontfootstyle" "[{")) + 'variable))) + TeX-dialect) + +;;; flashcards.el ends here diff --git a/elpa/auctex-13.1.3/style/flashcards.elc b/elpa/auctex-13.1.3/style/flashcards.elc Binary files differnew file mode 100644 index 0000000..5fc96dd --- /dev/null +++ b/elpa/auctex-13.1.3/style/flashcards.elc diff --git a/elpa/auctex-13.1.3/style/floatpag.el b/elpa/auctex-13.1.3/style/floatpag.el new file mode 100644 index 0000000..0174174 --- /dev/null +++ b/elpa/auctex-13.1.3/style/floatpag.el @@ -0,0 +1,75 @@ +;;; floatpag.el --- AUCTeX style for `floatpag.sty' (v2.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `floatpag.sty' (v2.0) from 2021/10/04. +;; `floatpag.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "floatpag" + (lambda () + + ;; Macros always available: + (TeX-add-symbols + '("floatpagestyle" (TeX-arg-pagestyle "Float pagestyle")) + '("thisfloatpagestyle" (TeX-arg-pagestyle "Float pagestyle"))) + + ;; The next one makes only sense if 'rotating' package is loaded: + (when (member "rotating" (TeX-style-list)) + (TeX-add-symbols + '("rotfloatpagestyle" (TeX-arg-pagestyle "Float pagestyle")))) + + ;; Load 'array.el' when the package option is provided: + (when (LaTeX-provided-package-options-member "floatpag" "array") + (TeX-run-style-hooks "array")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("floatpagestyle" "{") + ("thisfloatpagestyle" "{")) + 'function) + (when (member "rotating" (TeX-style-list)) + (font-latex-add-keywords '(("rotfloatpagestyle" "{")) + 'function)))) + + TeX-dialect) + +(defvar LaTeX-floatpag-package-options '("array") + "Package options for the floatpag package.") + +;;; floatpag.el ends here diff --git a/elpa/auctex-13.1.3/style/floatpag.elc b/elpa/auctex-13.1.3/style/floatpag.elc Binary files differnew file mode 100644 index 0000000..d6dc42f --- /dev/null +++ b/elpa/auctex-13.1.3/style/floatpag.elc diff --git a/elpa/auctex-13.1.3/style/floatrow.el b/elpa/auctex-13.1.3/style/floatrow.el new file mode 100644 index 0000000..be8878f --- /dev/null +++ b/elpa/auctex-13.1.3/style/floatrow.el @@ -0,0 +1,753 @@ +;;; floatrow.el --- AUCTeX style for `floatrow.sty' (v0.3b) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-11-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `floatrow.sty' (v0.3b) from 2009/08/02. +;; `floatrow.sty' is part of TeXLive. +;; +;; `floatrow.sty' is a powerful package and the documentation long. +;; It is expected that this style is not feature complete. One +;; deliberate decision is that this style does not offer any package +;; options: Please use the command `\floatsetup' to set the options +;; you want. +;; +;; This style also alters the way AUCTeX inserts the environments +;; "table" and "figure" (cf. function `LaTeX-floatrow-env-init'). If +;; you want the original behavior, try `C-c C-e rawfigure' or `C-c C-e +;; rawtable' which include the environments incl. the macro \RawFloats +;; at the beginning of the environment (cf. function +;; `LaTeX-floatrow-env-figure-raw'). +;; +;; Another deliberate decision is the implementation of commands like +;; `\ffigbox' and `\ttabbox': When invoked with `C-c C-m ffigbox RET', +;; the final result will look like this with cursor being at *: +;; +;; \ffigbox{*}{% +;; \caption{query for a caption}% +;; \label{prefix:is-chosen-acc-to-current-environment}% +;; } +;; +;; This gives users the freedom to insert any command where point is. +;; The mandatory arguments are not part of the fontification as +;; commands like `\includegraphics' or `tabular' environments have their +;; own fontification. + +;;; Code: + +;; Needed for compiling `cl-pushnew': +(eval-when-compile + (require 'cl-lib)) + +;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'latex) + +;; Needed for auto-parsing: +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function reftex-compile-variables + "reftex" + ()) + +(defvar LaTeX-floatrow-key-val-options + '(;; 3.1.1 Float Style + ("style" ("plain" "plaintop" "Plaintop" + "ruled" "Ruled" + "boxed" "Boxed" "BOXED" + "shadowbox" "Shadowbox" "SHADOWBOX" + "doublebox" "Doublebox" "DOUBLEBOX" + "wshadowbox" "Wshadowbox" "WSHADOWBOX")) + ;; 3.1.2 Font Settings + ("font" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" + "rm" "sf" "tt")) + ("footfont" ("scriptsize" "footnotesize" "small" "normalsize" "large" + "Large" "normalfont" "up" "it" "sl" "sc" "md" "bf" + "rm" "sf" "tt")) + ;; 3.1.3 Position of Caption + ("capposition" ("top" "TOP" "bottom" "beside")) + ;; 3.1.4 Position of Beside Caption + ("capbesideposition" ("left" "right" "inside" "outside" + "top" "bottom" "center")) + ;; 3.1.5 Defining The Width of Beside Caption + ("capbesidewidth" ("none" "sidefil")) + ;; 3.1.6 Defining Width of Object + ("floatwidth" ("\\hsize" "\\textwidth" "\\columnwidth" "\\linewidth")) + ;; 3.1.7 Other Settings for Beside Captions + ("capbesideframe" ("yes" "no")) + ;; 3.1.8 Defining Float Foot Position (Legends and Footnotes) + ("footposition" ("default" "caption" "bottom")) + ;; 3.1.9 Vertical Alignment of Float Elements + ("heightadjust" ("all" "caption" "object" "none" "nocaption" "noobject")) + ("valign" ("t" "c" "b" "s")) + ;; 3.1.10 Facing Layout + ("facing" ("yes" "no")) + ;; 3.1.11 Object Settings + ("objectset" ("justified" "centering" "raggedright" "RaggedRight" "raggedleft")) + ;; 3.1.12 Defining Float Margins + ("margins" ("centering" "raggedright" "raggedleft" + "hangright" "hanginside" "hangoutside")) + ;; 3.1.13 Defining Float Separators + ("floatrowsep" ("columnsep" "quad" "qquad" "hfil" "hfill" "none")) + ("capbesidesep" ("columnsep" "quad" "qquad" "hfil" "hfill" "none")) + ;; 3.1.14 Defining Float Rules/Skips + ("precode" ("none" "thickrule" "rule" "lowrule" "captionskip")) + ("rowprecode" ("none" "thickrule" "rule" "lowrule" "captionskip")) + ("midcode" ("none" "thickrule" "rule" "lowrule" "captionskip")) + ("postcode" ("none" "thickrule" "rule" "lowrule" "captionskip")) + ("rowpostcode" ("none" "thickrule" "rule" "lowrule" "captionskip")) + ;; 3.1.15 Defining Float Frames + ("framestyle" ("fbox" "colorbox" "FRcolorbox" "corners" + "doublebox" "shadowbox" "wshadowbox")) + ("frameset") + ("framearound" ("none" "object" "all" "row" "none")) + ("framefit" ("yes" "no")) + ("rowfill" ("yes" "no")) + ;; 3.1.16 Settings for Colored Frames + ("colorframeset") + ("colorframecorners") + ;; 3.1.17 Defining Float Skips + ("captionskip") + ("footskip") + ;; 3.1.18 Defining Float Footnote Rule's Style + ("footnoterule" ("normal" "limited" "fullsize" "none")) + ;; 3.1.19 Managing Floats with [H] Placement Option + ("doublefloataswide" ("yes" "no")) + ("floatHaslist" ("yes" "no")) + ;; 7.2.1 Additions in The floatrow Package to longtable package + ("LTcapwidth" ("table" "contents"))) + "Key=value options for floatrow macros and environments.") + +(defun LaTeX-floatrow-key-val-options () + "Return an updated list of key=vals from floatrow package." + (append + (when (LaTeX-floatrow-DeclareNewOption-list) + (let ((vcode-keys '("precode" "rowprecode" "midcode" "postcode" "rowpostcode")) + (sep-keys '("floatrowsep" "capbesidesep")) + result) + (dolist (keyvals (LaTeX-floatrow-DeclareNewOption-list) result) + (let* ((key (cond ((string= (nth 1 keyvals) "FloatStyle") + "style") + ((string= (nth 1 keyvals) "FloatFont") + "font") + ((string= (nth 1 keyvals) "FloatVCode") + "precode") + ((string= (nth 1 keyvals) "ColorBox") + "colorframeset") + ((string= (nth 1 keyvals) "CBoxCorners") + "colorframecorners") + ((string= (nth 1 keyvals) "ObjectSet") + "objectset") + ((string= (nth 1 keyvals) "MarginSet") + "margins") + ((string= (nth 1 keyvals) "FloatSeparators") + "floatrowsep") + ((string= (nth 1 keyvals) "FloatFootnoterule") + "footnoterule") + (t nil))) + (val (nth 2 keyvals)) + (vals-predefined + (cadr (assoc key LaTeX-floatrow-key-val-options))) + (vals-parsed (cadr (assoc key result)))) + ;; Remove entry in `result' if there is one for the `key'. + ;; `precode' and `floatrowsep' are special here since they + ;; are placeholders for other keys (see above): + (cond ((string= key "precode") + (dolist (x vcode-keys) + (when (assoc x result) + (setq result (assq-delete-all (car (assoc x result)) result))))) + ((string= key "floatrowsep") + (dolist (x sep-keys) + (when (assoc x result) + (setq result (assq-delete-all (car (assoc x result)) result))))) + (t + (when (assoc key result) + (setq result (assq-delete-all (car (assoc key result)) result))))) + ;; Add the entrie to `result'. Again, watch for `precode' + ;; and `floatrowsep'. Also delete any dupes: + (cond ((string= key "precode") + (dolist (x vcode-keys) + (cl-pushnew (list x (TeX-delete-duplicate-strings + (append vals-parsed + vals-predefined + (list val)))) + result :test #'equal))) + ((string= key "floatrowsep") + (dolist (x sep-keys) + (cl-pushnew (list x (TeX-delete-duplicate-strings + (append vals-parsed + vals-predefined + (list val)))) + result :test #'equal))) + (t + (cl-pushnew (list key (TeX-delete-duplicate-strings + (append vals-parsed + vals-predefined + (list val)))) + result :test #'equal))))))) + LaTeX-floatrow-key-val-options)) + +(defvar LaTeX-floatrow-supported-float-types + '("figure" "table" ; Standard LaTeX + "widefigure" "widetable" "widefloat" ; Standard figure* & table* + "wrapfigure" "wraptable" "wrapfloat" ; wrapfig.sty + "rotfigure" "rottable" "rotfloat" ; rotating.sty + "widerotfigure" "widerottable" "widerotfloat" ; for 2-col & wide + "figurerow" "tablerow" "floatrow" ; inside floatrow env's + "capbesidefigure" "capbesidetable" ; floats with beside captions + "capbesidefloat" + "longtable" ; longtable.sty + "subfigure" "subtable" "sub") ; subcaption.sty + "List of float types supported by floatrow.sty.") + +;; Setup for \newfloatcommand +(TeX-auto-add-type "floatrow-newfloatcommand" "LaTeX") + +(defvar LaTeX-floatrow-newfloatcommand-regexp + '("\\\\newfloatcommand{\\([^}]+\\)}" 1 LaTeX-auto-floatrow-newfloatcommand) + "Matches the arguments of \"\\newfloatcommand\" from floatrow.sty.") + +;; Setup for various \Declare* macros: +(TeX-auto-add-type "floatrow-DeclareNewOption" "LaTeX") + +(defvar LaTeX-floatrow-DeclareNewOption-regexp + `(,(concat + "\\\\Declare" + "\\(" + (mapconcat #'identity + '("FloatStyle" ; 3.6.1 Float Style Option (style=) + "FloatFont" ; 3.6.2 Float Font Option (font=) + "FloatVCode" ; 3.6.3 Option for Float Rules/Skips (precode= etc.) + "ColorBox" ; 3.6.4 Settings for Colored Frame (colorframeset=) + "CBoxCorners" ; colorframecorners= + "ObjectSet" ; 3.6.5 Object Justification Option (objectset=) + "MarginSet" ; 3.6.6 Option for Float Box Alignment/Settings (margins=) + "FloatSeparators" ; 3.6.7 Float Separators Options (floatrowsep=, capbesidesep=) + "FloatFootnoterule") ; 3.6.8 Option for Footnote Rule's Style (footnoterule=) + "\\|") + "\\)" + "{\\([^}]+\\)}") + (0 1 2) LaTeX-auto-floatrow-DeclareNewOption) + "Matches the arguments of \"\\Declare*\" from floatrow.sty.") + +;; Setup for \newseparated(label|ref): +(TeX-auto-add-type "floatrow-newseparatedlabel-ref" "LaTeX") + +(defvar LaTeX-floatrow-newseparatedlabel-ref-regexp + `(,(concat + "\\\\newseparated" + "\\(label\\|ref\\)" + "{?" + "\\\\" + "\\([a-zA-Z]+\\)" + "}?") + (2 1) LaTeX-auto-floatrow-newseparatedlabel-ref) + "Matches the arguments \"\\newseparated(label|ref)\" command from floatrow.sty.") + +;; Setup for \DeclareNewFloatType: +(TeX-auto-add-type "floatrow-DeclareNewFloatType" "LaTeX") + +(defvar LaTeX-floatrow-DeclareNewFloatType-regexp + '("\\\\DeclareNewFloatType{\\([^}]+\\)}" + 1 LaTeX-auto-floatrow-DeclareNewFloatType) + "Matches the argument of \"\\DeclareNewFloatType\" command from floatrow.sty.") + +;; Plug them into the machinery. +(defun LaTeX-floatrow-auto-prepare () + "Clear various \"LaTeX-floatrow\" variables before parsing." + (setq LaTeX-auto-floatrow-newfloatcommand nil + LaTeX-auto-floatrow-DeclareNewOption nil + LaTeX-auto-floatrow-newseparatedlabel-ref nil + LaTeX-auto-floatrow-DeclareNewFloatType nil)) + +(defun LaTeX-floatrow-auto-cleanup () + "Process parsed results from floatrow package." + ;; Replace initially the way fig & tab env's are inserted: + (LaTeX-floatrow-env-init) + ;; + ;; Process new float commands like \ffigbox: + (when (LaTeX-floatrow-newfloatcommand-list) + (dolist (cmd (mapcar #'car (LaTeX-floatrow-newfloatcommand-list))) + (TeX-add-symbols `(,cmd LaTeX-floatrow-arg-floatbox)) + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,cmd "[[[")) + 'textual)))) + ;; + ;; Process new label/ref commands: + (when (LaTeX-floatrow-newseparatedlabel-ref-list) + (let (floatrow-run-reftex-compile-vars) + (dolist (elt (LaTeX-floatrow-newseparatedlabel-ref-list)) + (let ((cmd (car elt)) + (type (cadr elt))) + (if (string= type "ref") + ;; More fun w/ referencing macros: + (TeX-add-symbols `(,cmd TeX-arg-ref)) + ;; Less fun w/ label defining macros. Add cmd to + ;; TeX-symbol-list: + (TeX-add-symbols `(,cmd TeX-arg-define-label)) + ;; For AUCTeX, parse the argument of the new macro and add + ;; it to `LaTeX-auto-label': + (TeX-auto-add-regexp + `(,(concat "\\\\" cmd "{\\([^\n\r%\\{}]+\\)}") 1 LaTeX-auto-label)) + ;; For RefTeX, append cmd to `reftex-label-regexps and set + ;; floatrow-run-reftex-compile-vars to t: + (when (and (boundp 'reftex-label-regexps) + (fboundp 'reftex-compile-variables) + (not (string-match + cmd + (mapconcat #'identity reftex-label-regexps "|")))) + (add-to-list (make-local-variable 'reftex-label-regexps) + (concat "\\\\" cmd "{\\(?1:[^}]*\\)}") t) + (setq floatrow-run-reftex-compile-vars t))) + ;; Fontify macros as reference: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,cmd "{")) + 'reference)))) + ;; Run `reftex-compile-variables' if needed only once: + (when floatrow-run-reftex-compile-vars + (reftex-compile-variables)))) + ;; + ;; Process new floattypes: + (when (LaTeX-floatrow-DeclareNewFloatType-list) + (LaTeX-floatrow-arg-declare-new-floattype nil t)) + ;; + ;; Add elements from `LaTeX-floatrow-supported-float-types' to + ;; `LaTeX-caption-supported-float-types': + (when (boundp 'LaTeX-caption-supported-float-types) + (make-local-variable 'LaTeX-caption-supported-float-types) + (dolist (float LaTeX-floatrow-supported-float-types) + (add-to-list 'LaTeX-caption-supported-float-types float t))) ) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-floatrow-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-floatrow-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-floatrow-arg-floatbox (optional) + "Query and insert arguments of float box commands from floatrow.sty. +If OPTIONAL is non-nil, indicate optional argument during query." + ;; Query for the optional arguments; ask for "vertpos" only if + ;; "height" is given. let-bind `TeX-arg-*-brace' for + ;; `TeX-argument-insert': + (let* ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]") + (TeX-last-optional-rejected nil) + (width (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Width") + (mapcar (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list))))) + (TeX-last-optional-rejected (or (not width) + (and width (string= width "")))) + (height (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Height") + (mapcar (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list))))) + (TeX-last-optional-rejected (or (not height) + (and height (string= height "")))) + (vertpos (LaTeX-check-insert-macro-default-style + (if (string= height "") + "" + (completing-read + (TeX-argument-prompt t nil "Vertical alignment") + '("t" "c" "b" "s")))))) + (and width (TeX-argument-insert width t)) + ;; Insert an extra pair of brackets if only `height' is given, + ;; otherwise it will become `width' + (when (and width (string= width "") + height (not (string= height ""))) + (insert "[]")) + (and height (TeX-argument-insert height t)) + (and vertpos (TeX-argument-insert vertpos t))) + ;; Now query for the (short-)caption. Also check for the + ;; float-type; if we're inside (sub)?floatrow*?, then check for the + ;; next outer environment: + (let* ((currenv (if (string-match "floatrow\\*?\\_>" (LaTeX-current-environment)) + (LaTeX-current-environment 2) + (LaTeX-current-environment))) + (caption (TeX-read-string + (TeX-argument-prompt optional nil "Caption"))) + (short-caption + (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string + (TeX-argument-prompt t nil "Short caption"))))) + (indent-according-to-mode) + ;; The final result will look like this with * being point: + ;; \ffigbox{*}{% + ;; \caption{text}% + ;; \label{fig:foo}% + ;; } + (insert TeX-grop) + (save-excursion + ;; We are inside the 1. mandatory arg: Save the pos & insert `}{': + (insert TeX-grcl TeX-grop) + (if (and caption (not (string= caption ""))) + (progn + ;; If caption, move to EOL, delete any spaces and hide the line end + (end-of-line) + (delete-horizontal-space) + (insert "%") + ;; Add a newline and the caption + (newline-and-indent) + (insert (LaTeX-compose-caption-macro caption short-caption)) + ;; If we have a caption, then we probably also want a + ;; label. Hide EOL end and proceed to enter a label + (insert "%") + (newline-and-indent) + (when (LaTeX-label currenv 'environment) + ;; Move point to end of line and hide EOL + (end-of-line) + (delete-horizontal-space) + (insert "%") + (newline-and-indent)) + ;; Now close the group + (insert TeX-grcl) + (indent-according-to-mode) + (end-of-line)) + ;; Otherwise, only insert a } + (insert TeX-grcl))))) + +(defun LaTeX-floatrow-env-init () + "Replace AUCTeX entries in the variable `LaTeX-environment-list'. +After loading the style hook floatrow.el, delete the entries for +figure*? and table*? from variable `LaTeX-environment-list' and +replace them with the ones offered by the style. Original +entries are available under \"rawfigure*?\" and \"rawtable*?\"." + (LaTeX-environment-list) + (dolist (env '("figure" "figure*" "table" "table*")) + (setq LaTeX-environment-list + (assq-delete-all (car (assoc env LaTeX-environment-list)) + LaTeX-environment-list)) + (LaTeX-add-environments `(,env LaTeX-floatrow-env-figure) + `(,(concat "raw" env) LaTeX-floatrow-env-figure-raw)))) + +(defun LaTeX-floatrow-env-figure (environment) + "Create floating ENVIRONMENT suitable for floatrow macros." + (let ((float (and LaTeX-float + (TeX-read-string + (TeX-argument-prompt t nil "Float position") + LaTeX-float)))) + (LaTeX-insert-environment environment + (unless (zerop (length float)) + (concat LaTeX-optop float LaTeX-optcl))))) + +(defun LaTeX-floatrow-env-figure-raw (env) + "Create raw floating ENV with floatrow.sty. +Also insert the macro \"\\RawFloats\" when finished with user +queries." + (let ((environment (replace-regexp-in-string "raw" "" env))) + (LaTeX-env-figure environment) + (save-excursion + ;; `LaTeX-find-matching-begin' will not work for us as we don't + ;; know how user answers queries from AUCTeX, hence we search + ;; back for `environment': + (re-search-backward (concat "\\\\begin{" environment "}") nil t) + (end-of-line) + (LaTeX-newline) + (indent-according-to-mode) + (insert TeX-esc "RawFloats")))) + +(defun LaTeX-floatrow-arg-declare-new-options (optional prompt key) + "Query and insert user-defined values to keys provided by floatrow.sty. +If OPTIONAL is non-nil, ask for an optional argument and insert +it in square brackets. PROMPT replaces the standard one. KEY is +a string and corresponds to first parsed element in +`LaTeX-floatrow-DeclareNewOption-regexp'." + (let ((val (TeX-read-string + (TeX-argument-prompt optional prompt "New value option")))) + (LaTeX-add-floatrow-DeclareNewOptions + (list (concat TeX-esc "Declare" key TeX-grop val TeX-grcl) + key val)) + (TeX-argument-insert val optional) + (TeX-argument-insert + (TeX-read-key-val optional (LaTeX-floatrow-key-val-options)) optional))) + +(defun LaTeX-floatrow-arg-newseparatedlabel/ref (optional type) + "Query and insert user defined label and reference macros from floatrow.sty. +If OPTIONAL is non-nil, insert the argument in brackets. TYPE is +the string \"label\" or \"ref\"." + (let ((cmd (TeX-read-string + (if (string= type "label") + (TeX-argument-prompt optional nil "Label command: \\" t) + (TeX-argument-prompt optional nil "Reference command: \\" t))))) + (LaTeX-add-floatrow-newseparatedlabel-refs (list cmd type)) + (if (string= type "label") + (TeX-add-symbols `(,cmd TeX-arg-define-label)) + (TeX-add-symbols `(,cmd TeX-arg-ref))) + (TeX-argument-insert cmd optional TeX-esc))) + +(defun LaTeX-floatrow-arg-declare-new-floattype (optional &optional cleanup) + "Query and insert the first argument of \"DeclareNewFloatType\" macro. +If OPTIONAL is non-nil, insert the argument in brackets. If +CLEANUP in non-nil, skip the query and insert process as we are +inside the function `LaTeX-floatrow-auto-cleanup' and process +only the parsed items." + (let ((type (if cleanup + (mapcar #'car (LaTeX-floatrow-DeclareNewFloatType-list)) + (list (TeX-read-string + (TeX-argument-prompt optional nil "Environment type")))))) + ;; If not inside `LaTeX-floatrow-auto-cleanup', add user input to + ;; list of new floats and insert it + (unless cleanup + (LaTeX-add-floatrow-DeclareNewFloatTypes (car type)) + (TeX-argument-insert (car type) optional)) + ;; Make the next variables buffer local + (make-local-variable 'LaTeX-floatrow-supported-float-types) + (when (boundp 'LaTeX-caption-supported-float-types) + (make-local-variable 'LaTeX-caption-supported-float-types)) + ;; Process new float type(s): a) add type to list of known + ;; environments incl. "raw" version b) add different flavors of + ;; type to `LaTeX-floatrow-supported-float-types' c) check if + ;; `LaTeX-caption-supported-float-types' is bound and add + ;; different flavors of type to it as well + (dolist (elt type) + (LaTeX-add-environments `(,elt LaTeX-floatrow-env-figure) + `(,(concat "raw" elt) LaTeX-floatrow-env-figure-raw)) + (add-to-list 'LaTeX-floatrow-supported-float-types elt t) + (add-to-list 'LaTeX-floatrow-supported-float-types (concat "wide" elt) t) + (add-to-list 'LaTeX-floatrow-supported-float-types (concat elt "row") t) + (add-to-list 'LaTeX-floatrow-supported-float-types (concat "capbeside" elt) t) + (when (boundp 'LaTeX-caption-supported-float-types) + (add-to-list 'LaTeX-caption-supported-float-types elt t) + (add-to-list 'LaTeX-caption-supported-float-types (concat "wide" elt) t) + (add-to-list 'LaTeX-caption-supported-float-types (concat elt "row") t) + (add-to-list 'LaTeX-caption-supported-float-types (concat "capbeside" elt) t))))) + +(TeX-add-style-hook + "floatrow" + (lambda () + + ;; Add floatrow to the parser + (TeX-auto-add-regexp LaTeX-floatrow-DeclareNewOption-regexp) + (TeX-auto-add-regexp LaTeX-floatrow-newfloatcommand-regexp) + (TeX-auto-add-regexp LaTeX-floatrow-newseparatedlabel-ref-regexp) + (TeX-auto-add-regexp LaTeX-floatrow-DeclareNewFloatType-regexp) + + ;; Add pre-defined float commands: + (LaTeX-add-floatrow-newfloatcommands + "ffigbox" "fcapside" "ttabbox") + + ;; Macros + (TeX-add-symbols + ;; 2.1 The \floatbox Macro + ;; \floatbox[<preamble>]{<captype>}[<width>][<height>][<vert pos>]{<caption>}{<object>} + '("floatbox" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Preamble") + '("\\capbeside" "\\nocapbeside" "\\captop")] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Float type") + LaTeX-floatrow-supported-float-types) + LaTeX-floatrow-arg-floatbox) + + ;; 2.2 Creation of Personal Commands for Float Boxes + '("newfloatcommand" + (TeX-arg-eval + (lambda () + (let ((cmd (TeX-read-string + (TeX-argument-prompt nil nil "Command")))) + (LaTeX-add-floatrow-newfloatcommands cmd) + (TeX-add-symbols + `(,cmd LaTeX-floatrow-arg-floatbox)) + (format "%s" cmd)))) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Float type") + '("figure" "table")) + [ 2 ]) + + '("renewfloatcommand" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Command") + (LaTeX-floatrow-newfloatcommand-list)) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Float type") + '("figure" "table")) + [ 2 ]) + + + ;; 2.2.2 Predefined Float Box Commands + '("ffigbox" + LaTeX-floatrow-arg-floatbox) + + '("ttabbox" + LaTeX-floatrow-arg-floatbox) + + '("fcapside" + LaTeX-floatrow-arg-floatbox) + + ;; 2.3.1 Mixed Row + '("CenterFloatBoxes" 0) + '("TopFloatBoxes" 0) + '("BottomFloatBoxes" 0) + '("PlainFloatBoxes" 0) + '("buildFBBOX" 2) + + ;; 3 Float Layout Settings + '("floatsetup" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Float type") + LaTeX-floatrow-supported-float-types] + (TeX-arg-key-val (LaTeX-floatrow-key-val-options))) + + ;; 3.2 Settings for Current Float Environment + '("thisfloatsetup" + (TeX-arg-key-val (LaTeX-floatrow-key-val-options))) + + ;; 3.3 Clearing of Settings for Current Float Type + '("clearfloatsetup" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Float type") + LaTeX-floatrow-supported-float-types)) + + ;; 3.4 Temporary Clearing of All Float Settings + '("killfloatstyle" 0) + + ;; 3.6.1 Float Style Option (style=) + '("DeclareFloatStyle" + (LaTeX-floatrow-arg-declare-new-options "New style option" + "FloatStyle")) + + ;; 3.6.2 Float Font Option (font=) + '("DeclareFloatFont" + (LaTeX-floatrow-arg-declare-new-options "New font option" + "FloatFont")) + + ;; 3.6.3 Option for Float Rules/Skips (precode= etc.) + '("DeclareFloatVCode" + (LaTeX-floatrow-arg-declare-new-options "New rules/skip option" + "FloatVCode")) + + ;; 3.6.4 Settings for Colored Frame (colorframeset=) + '("DeclareColorBox" + (LaTeX-floatrow-arg-declare-new-options "New colored frame option" + "ColorBox")) + + ;; (colorframecorners=) + '("DeclareCBoxCorners" + (LaTeX-floatrow-arg-declare-new-options "New colored corner option" + "CBoxCorners")) + + ;; 3.6.5 Object Justification Option (objectset=) + '("DeclareObjectSet" + (LaTeX-floatrow-arg-declare-new-options "New object justification" + "ObjectSet")) + + ;; 3.6.6 Option for Float Box Alignment/Settings (margins=) + '("DeclareMarginSet" + (LaTeX-floatrow-arg-declare-new-options "New alignment option" + "MarginSet")) + + '("setfloatmargins" 2) + '("setfloatmargins*" 2) + '("floatfacing" 2) + '("floatfacing*" 2) + '("floatboxmargins" 2) + '("floatrowmargins" 2) + '("floatcapbesidemargins" 2) + + ;; 3.6.7 Float Separators Options (floatrowsep=, capbesidesep=) + '("DeclareFloatSeparators" + (LaTeX-floatrow-arg-declare-new-options "New separator option" + "FloatSeparators")) + + ;; 3.6.8 Option for Footnote Rule's Style (footnoterule=) + '("DeclareFloatFootnoterule" + (LaTeX-floatrow-arg-declare-new-options "New footnote rule option" + "FloatFootnoterule")) + + ;; 4 Creation of New Float Types + '("DeclareNewFloatType" + (LaTeX-floatrow-arg-declare-new-floattype) + (TeX-arg-key-val (("placement" ("tbp" "t" "b" "p")) + ("name") + ("fileext") + ("within" ("chapter" "section" "subsection")) + ("relatedcapstyle" ("yes" "no"))))) + + ;; 6.2 Support of The Label-Sublabel References + '("newseparatedlabel" + (LaTeX-floatrow-arg-newseparatedlabel/ref "label") 2) + + '("newseparatedref" + (LaTeX-floatrow-arg-newseparatedlabel/ref "ref") t) + + '("makelabelseparator" t) ) ;; terminate TeX-add-symbols + + ;; Environments + (LaTeX-add-environments + ;; 2.3 Building Float Row + '("floatrow" [ "Number of beside floats" ]) + + ;; 6.1 Managing of Float Parts With the subfloatrow Environment + '("subfloatrow" [ "Number of beside floats" ]) + '("subfloatrow*" [ "Number of beside floats" ])) + + ;; 2.1.1 Float Box Width Equals to The Width of Object Contents + (LaTeX-add-lengths "FBwidth" "FBheight" "Xhsize") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("floatbox" "[{[[[") + ("ffigbox" "[[[") + ("ttabbox" "[[[") + ("fcapside" "[[[")) + 'textual) + (font-latex-add-keywords '(("newfloatcommand" "{{[[") + ("renewfloatcommand" "{{[[") + ("buildFBBOX" "{{") + ("floatsetup" "[{") + ("thisfloatsetup" "{") + ("clearfloatsetup" "{") + ("killfloatstyle" "") + ("DeclareFloatStyle" "{{") + ("DeclareFloatFont" "{{") + ("DeclareFloatVCode" "{{") + ("DeclareColorBox" "{{") + ("DeclareCBoxCorners" "{{") + ("DeclareObjectSet" "{{") + ("DeclareMarginSet" "{{") + ("DeclareFloatSeparators" "{{") + ("DeclareFloatFootnoterule" "{{") + ("newseparatedlabel" "{{{") + ("newseparatedref" "{{") + ("makelabelseparator" "{") + ("DeclareNewFloatType" "{{") + ("RawFloats" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-floatrow-package-options nil + "Prompt for package options for the floatrow package.") + +;;; floatrow.el ends here diff --git a/elpa/auctex-13.1.3/style/floatrow.elc b/elpa/auctex-13.1.3/style/floatrow.elc Binary files differnew file mode 100644 index 0000000..8407073 --- /dev/null +++ b/elpa/auctex-13.1.3/style/floatrow.elc diff --git a/elpa/auctex-13.1.3/style/flushend.el b/elpa/auctex-13.1.3/style/flushend.el new file mode 100644 index 0000000..db00ffc --- /dev/null +++ b/elpa/auctex-13.1.3/style/flushend.el @@ -0,0 +1,77 @@ +;;; flushend.el --- AUCTeX style for `flushend.sty' (v2.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `flushend.sty' (v2.0) from 2021/10/04. +;; `flushend.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "flushend" + (lambda () + + ;; New symbols + (TeX-add-symbols + "flushend" + "raggedend" + "flushcolsend" + "raggedcolsend" + '("atColsBreak" t) + '("atColsEnd" t) + "showcolsendrule") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("flushend" "") + ("raggedend" "") + ("flushcolsend" "") + ("raggedcolsend" "") + ("atColsBreak" "{") + ("atColsEnd" "{") + ("showcolsendrule" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-flushend-package-options + '("spread" "nospread" "shrink" "noshrink" + "lspread" "nolspread" "lshrink" "nolshrink" + "rspread" "norspread" "rshrink" "norshrink" + "checkfootnote" "nocheckfootnote" + "checkfloat" "nocheckfloat" + "debug" "nodebug") + "Package options for the flushend package.") + +;;; flushend.el ends here diff --git a/elpa/auctex-13.1.3/style/flushend.elc b/elpa/auctex-13.1.3/style/flushend.elc Binary files differnew file mode 100644 index 0000000..20d8ca3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/flushend.elc diff --git a/elpa/auctex-13.1.3/style/foils.el b/elpa/auctex-13.1.3/style/foils.el new file mode 100644 index 0000000..b53b532 --- /dev/null +++ b/elpa/auctex-13.1.3/style/foils.el @@ -0,0 +1,68 @@ +;;; foils.el - Special code for FoilTeX. -*- lexical-binding: t; -*- + +;; Copyright (C) 1994-2021 Free Software Foundation, Inc. + +;; Author: Per Abrahamsen <abraham@dina.kvl.dk> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by the +;; Free Software Foundation; either version 3, or (at your option) any +;; later version. + +;; AUCTeX is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX. If not, see <https://www.gnu.org/licenses/>. + +;;; Code: + +(require 'tex) +(require 'latex) +(require 'timezone) + +(TeX-add-style-hook "foils" + (function + (lambda () + (add-hook 'LaTeX-document-style-hook #'LaTeX-style-foils) + (setq LaTeX-default-style "foils") + (setq LaTeX-default-options '("landscape")) + (TeX-add-symbols + '("foilhead" [ "Rubric-body separation" ] "Foil rubric")))) + TeX-dialect) + +(defun LaTeX-style-foils nil + "Prompt for and insert foiltex options." + (let* ((date (timezone-parse-date (current-time-string))) + (year (string-to-number (aref date 0))) + (month (string-to-number (aref date 1))) + (day (string-to-number (aref date 2))) + (title (TeX-read-string "Title: "))) + (save-excursion + (goto-char (point-max)) + (re-search-backward ".begin.document.") + (insert TeX-esc "title" + TeX-grop title TeX-grcl "\n") + (insert TeX-esc "author" + TeX-grop (user-full-name) TeX-grcl "\n") + (insert TeX-esc "date" TeX-grop + (format "%d-%02d-%02d" year month day) + TeX-grcl "\n") + (insert "" TeX-esc "MyLogo" TeX-grop TeX-grcl "\n") + (insert "%" TeX-esc "Restriction" TeX-grop TeX-grcl "\n") + (insert "%" TeX-esc "rightfooter" TeX-grop TeX-grcl "\n") + (insert "%" TeX-esc "leftheader" TeX-grop TeX-grcl "\n") + (insert "%" TeX-esc "rightheader" TeX-grop TeX-grcl "\n\n") + (re-search-forward ".begin.document.") + (end-of-line) + (newline-and-indent) + (insert "" TeX-esc "maketitle\n\n")) + (forward-line -1))) + +;;; foils.el ends here diff --git a/elpa/auctex-13.1.3/style/foils.elc b/elpa/auctex-13.1.3/style/foils.elc Binary files differnew file mode 100644 index 0000000..a8bb118 --- /dev/null +++ b/elpa/auctex-13.1.3/style/foils.elc diff --git a/elpa/auctex-13.1.3/style/fontaxes.el b/elpa/auctex-13.1.3/style/fontaxes.el new file mode 100644 index 0000000..62db15a --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontaxes.el @@ -0,0 +1,116 @@ +;;; fontaxes.el --- AUCTeX style for `fontaxes.sty' version v1.0d -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fontaxes.sty' version v1.0d from +;; 2014/03/23. `fontaxes.sty' is part of TeXLive. + +;; Thanks to Mos Giordano for his perceptive comments on +;; implementation of "figureversion". + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "fontaxes" + (lambda () + (TeX-add-symbols + ;; Various font shapes: + ;; These macros are now part of LaTeX kernel 2020-02-02 + ;; '("swshape" -1) ; swash shape + ;; '("sscshape" -1) ; spaced small caps + ;; '("swdefault" 0) + ;; '("sscdefault" 0) + ;; '("ulcdefault" 0) + '("fontprimaryshape" t) + '("fontsecondaryshape" t) + + ;; Figure versions + '("figureversion" + (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + "Style, alignment: " + '(("text") ("osf") + ("lining") ("lf") + ("tabular") ("tab") + ("proportional") ("prop"))) ",")) + '("txfigures" -1) ; style: text figures (osf) + '("lnfigures" -1) ; style: lining figures + '("tbfigures" -1) ; alignment: tabular figures + '("prfigures" -1) ; alignment: proportional figures + '("fontfigurestyle" + (TeX-arg-eval completing-read "Style: " + '(("text") ("lining")))) + '("fontfigurealignment" + (TeX-arg-eval completing-read "Alignment: " + '(("tabular") ("proportional")))) + '("fontbasefamily" t) + + ;; Math versions + '("boldmath" -1) ; math weight + '("unboldmath" -1) ; + '("tabularmath" -1) ; math figure alignment + '("proportionalmath" -1) ; + '("mathweight" + (TeX-arg-eval completing-read "Math weight: " + '(("bold") ("normal")))) + '("mathfigurealignment" + (TeX-arg-eval completing-read "Math figure alignment: " + '(("tabular") ("proportional")))) + + ;; Additional commands + ;; These macros are now part of LaTeX kernel 2020-02-02 + ;; '("textsw" t) + ;; '("textssc" t) + ;; '("textulc" t) + '("textfigures" t) + '("liningfigures" t) + '("tabularfigures" t) + '("proportionalfigures" t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textfigures" "{") + ("liningfigures" "{") + ("tabularfigures" "{") + ("proportionalfigures" "{")) + 'type-command) + (font-latex-add-keywords '(("figureversion" "{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-fontaxes-package-options nil + "Package options for the fontaxes package.") + +;;; fontaxes.el ends here diff --git a/elpa/auctex-13.1.3/style/fontaxes.elc b/elpa/auctex-13.1.3/style/fontaxes.elc Binary files differnew file mode 100644 index 0000000..c9c2ef4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontaxes.elc diff --git a/elpa/auctex-13.1.3/style/fontenc.el b/elpa/auctex-13.1.3/style/fontenc.el new file mode 100644 index 0000000..ba430db --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontenc.el @@ -0,0 +1,55 @@ +;;; fontenc.el --- AUCTeX style for `fontenc.sty' (v1.99g) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015-2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fontenc.sty' (v1.99g) from 2005/09/27. +;; `fontenc.sty' is a standard LaTeX package and part of TeXLive. + +;;; Code: + +(require 'tex) + +(defvar LaTeX-fontenc-package-options-list + '(;; 128+ glyph encodings (text) + "OT1" "OT2" "OT3" "OT4" "OT6" + ;; 256 glyph encodings (text) + "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5" + ;; 256 glyph encodings (text extended) + "X2" + ;; Other encodings + "LY1" "LV1" "LGR") + "Package options for the fontenc package.") + +(defun LaTeX-fontenc-package-options () + "Prompt for package options for the fontenc package." + (mapconcat #'identity + (TeX-completing-read-multiple + "Encoding(s): " + LaTeX-fontenc-package-options-list) + ",")) + +;;; fontenc.el ends here diff --git a/elpa/auctex-13.1.3/style/fontenc.elc b/elpa/auctex-13.1.3/style/fontenc.elc Binary files differnew file mode 100644 index 0000000..a1fcf64 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontenc.elc diff --git a/elpa/auctex-13.1.3/style/fontspec.el b/elpa/auctex-13.1.3/style/fontspec.el new file mode 100644 index 0000000..6970b75 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontspec.el @@ -0,0 +1,449 @@ +;;; fontspec.el --- AUCTeX style for `fontspec.sty' version 2.7i. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013--2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fontspec.sty' version 2.7i. Starting +;; with `fontspec.sty' v2.4, the order of mandatory font names and +;; optional font features in related macros has changed, i.e. optional +;; argument comes after the mandatory one. This change is now (April +;; 2017) implemented in this file. Fontification support retains +;; backward compatibility. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defvar LaTeX-fontspec-font-features + '(;; I General font selection + ("Extension" (".otf" ".ttf" ".ttc" ".dfont")) + ("Path") + ;; I 4.1 More control over font shape selection + ("UprightFont") + ("BoldFont") + ("ItalicFont") + ("BoldItalicFont") + ("SlantedFont") + ("BoldSlantedFont") + ("SmallCapsFont") + ;; I 4.2 Specifically choosing the NFSS family + ("NFSSFamily") + ;; I 4.3 Choosing additional NFSS font faces + ("FontFace") + ;; III 3. Different features for different font shapes + ("BoldFeatures") + ("ItalicFeatures") + ("BoldItalicFeatures") + ("SlantedFeatures") + ("BoldSlantedFeatures") + ("SmallCapsFeatures") + ("UprightFeatures") + ;; III 4. Different features for different font sizes + ("SizeFeatures") + ;; III 6. Font independent options + ("Color") + ("Scale" ("MatchLowercase" "MatchUppercase")) + ("WordSpace") + ("PunctuationSpace") + ("HyphenChar" ("None")) + ("OpticalSize") + ("AutoFakeBold") + ("AutoFakeSlant") + ("FakeSlant") + ("FakeStretch") + ("FakeBold") + ("LetterSpace") + ;; IV.3 OpenType options + ;; IV.3.1.1 Alternates. The next 2 are synonyms: + ("Alternate" ("Random")) + ("StylisticAlternate" ("Random")) + ;; IV.3.1.2 Character Variants + ("CharacterVariant") + ;; IV 3.1.3 Contextuals + ("Contextuals" ("Swash" "SwashOff" "SwashReset" + "Alternate" "AlternateOff" "AlternateReset" + "WordInitial" "WordInitialOff" "WordInitialReset" + "WordFinal" "WordFinalOff" "WordFinalReset" + "LineFinal" "LineFinalOff" "LineFinal" + "Inner" "InnerOff" "InnerReset" + "ResetAll")) + ;; IV 3.1.4 Diacritics + ("Diacritics" ("MarkToBase" "MarkToBaseOff" "MarkToBaseReset" + "MarkToMark" "MarkToMarkOff" "MarkToMarkReset" + "AboveBase" "AboveBaseOff" "AboveBaseReset" + "BelowBase" "BelowBaseOff" "BelowBaseReset" + "ResetAll")) + ;; IV 3.1.5 Fractions + ("Fractions" ("On" "Off" "Reset" "Alternate" + "AlternateOff" "AlternateReset" "ResetAll")) + ;; IV 3.1.6 Kerning + ("Kerning" ("On" "Off" "Reset" "ResetAll" + "Uppercase" "UppercaseOff" "UppercaseReset")) + ;; IV 3.1.7 Letters + ("Letters" ("SmallCaps" "SmallCapsOff" "SmallCapsReset" + "PetiteCaps" "PetiteCapsOff" "PetiteCapsReset" + "UppercaseSmallCaps" "UppercaseSmallCapsOff" "UppercaseSmallCapsReset" + "UppercasePetiteCaps" "UppercasePetiteCapsOff" "UppercasePetiteCapsReset" + "Unicase" "UnicaseOff" "UnicaseReset" + "ResetAll")) + ;; IV 3.1.8 Ligatures + ("Ligatures" ("Required" "RequiredOff" "RequiredReset" + "Common" "CommonOff" "CommonReset" + "Contextual" "ContextualOff" "ContextualReset" + "Rare" "RareOff" "RareReset" + "Discretionary" "DiscretionaryOff" "DiscretionaryReset" + "Historic" "HistoricOff" "HistoricReset" + "TeX" "TeXOff" "TeXReset" + "ResetAll")) + ;; IV 3.1.9 Localised Forms + ("LocalForms" ("On" "Off" "Reset")) + ;; IV 3.1.10 Numbers + ("Numbers" ("Uppercase" "UppercaseOff" "UppercaseReset" + "Lowercase" "LowercaseOff" "LowercaseReset" + "Lining" "LiningOff" "LiningReset" + "OldStyle" "OldStyleOff" "OldStyleReset" + "Proportional" "ProportionalOff" "ProportionalReset" + "Monospaced" "MonospacedOff" "MonospacedReset" + "SlashedZero" "SlashedZeroOff" "SlashedZeroReset" + "Arabic" "ArabicOff" "ArabicReset" + "ResetAll")) + ;; IV 3.1.11 Ornament + ("Ornament") + ;; IV 3.1.12 Style + ("Style" ("Alternate" "AlternateOff" "AlternateReset" + "Italic" "ItalicOff" "ItalicReset" + "Ruby" "RubyOff" "RubyReset" + "Swash" "SwashOff" "SwashReset" + "Cursive" "CursiveOff" "CursiveReset" + "Historic" "HistoricOff" "HistoricReset" + "Titling" "TitlingOff" "TitlingReset" + "HorizontalKana" "HorizontalKanaOff" "HorizontalKanaReset" + "VerticalKana" "VerticalKanaOff" "VerticalKanaReset" + "Uppercase" "UppercaseOff" "UppercaseReset" + "ResetAll")) + ;; IV 3.1.13 Stylistic Set variations. The next 2 are synonyms: + ("StylisticSet") + ("Variant") + ;; IV 3.1.14 Vertical Position + ("VerticalPosition" ("Superior" "SuperiorOff" "SuperiorReset" + "Inferior" "InferiorOff" "InferiorReset" + "Numerator" "NumeratorOff" "NumeratorReset" + "Denominator" "DenominatorOff" "DenominatorReset" + "ScientificInferior" "ScientificInferiorOff" "ScientificInferiorReset" + "Ordinal" "OrdinalOff" "OrdinalReset" + "ResetAll")) + ;; IV 3.2.1 Annotation + ("Annotation") + ;; IV 3.2.2 Character width + ("CharacterWidth" ("Proportional" "ProportionalOff" "ProportionalReset" + "Full" "FullOff" "FullReset" + "Half" "HalfOff" "HalfReset" + "Third" "ThirdOff" "ThirdReset" + "Quarter" "QuarterOff" "QuarterReset" + "AlternateProportional" "AlternateProportionalOff" "AlternateProportionalReset" + "AlternateHalf" "AlternateHalfOff" "AlternateHalfReset" + "ResetAll")) + ;; IV 3.2.3 CJK shape + ("CJKShape" ("Traditional" + "Simplified" + "JIS1978" + "JIS1983" + "JIS1990" + "Expert" + "NLC")) + ;; IV 3.2.4 Vertical typesetting + ("Vertical" ("RotatedGlyphs" "RotatedGlyphsOff" "RotatedGlyphsReset" + "AlternatesForRotation" "AlternatesForRotationOff" "AlternatesForRotationReset" + "Alternates" "AlternatesOff" "AlternatesReset" + "KanaAlternates" "KanaAlternatesOff" "KanaAlternatesReset" + "Kerning" "KerningOff" "KerningReset" + "AlternateMetrics" "AlternateMetricsOff" "AlternateMetricsReset" + "HalfMetrics" "HalfMetricsOff" "HalfMetricsReset" + "ProportionalMetrics" "ProportionalMetricsOff" "ProportionalMetricsReset" + "ResetAll")) + ;; VIII 3. Going behind fontspec's back: Offer only an excerpt of + ;; all possible tags: + ("RawFeature" ("frac" "lnum" "onum" "pnum" "smcp" "tnum" "zero"))) + "Font features options for macros of the fontspec package.") + +(defvar LaTeX-fontspec-font-list nil + "List of the fonts accessible to fontspec.") + +(defun LaTeX-fontspec-arg-font (optional &optional prompt) + "Prompt for a font name with completion. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. + +Customize `LaTeX-fontspec-arg-font-search' in order to decide how +to retrieve the list of fonts." + (unless LaTeX-fontspec-font-list + (when (if (eq LaTeX-fontspec-arg-font-search 'ask) + (not (y-or-n-p "Find font yourself? ")) + LaTeX-fontspec-arg-font-search) + (message "Searching for fonts...") + (with-temp-buffer + (shell-command "luaotfload-tool --list=basename" t) + ;; Search for the font base names and full names, and add them to + ;; `LaTeX-fontspec-font-list'. The list is in the form + ;; <base name><TAB><full name><TAB><version> + (while + (re-search-forward "^\\([^\n\r\t]*\\)\t\\([^\n\r\t]*\\)\t.*$" nil t) + (add-to-list 'LaTeX-fontspec-font-list (match-string-no-properties 1)) + (add-to-list 'LaTeX-fontspec-font-list + (match-string-no-properties 2)))) + (message "Searching for fonts...done"))) + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Font name") + (or LaTeX-fontspec-font-list LaTeX-fontspec-font-list-default)) + optional)) + +(defun LaTeX-fontspec-font-features () + "Return an updated list of font features. +This function retrieves values from various sources and adds them +to appropriate keys which are eventually prepended to +`LaTeX-fontspec-font-features' shadowing the predefined one." + (append + ;; Check for color packages, prefer xcolor over color. Note that + ;; we run the function `TeX-style-list' only once and after that we + ;; use the updated `TeX-active-styles'. + (when (or (member "xcolor" (TeX-style-list)) + (member "color" TeX-active-styles)) + (let ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list))) + `(("Color" ,(mapcar #'car (funcall colorcmd)))))) + ;; If `LaTeX-fontspec-font-list' is set, use it for other `*Font' + ;; related keys: + (when LaTeX-fontspec-font-list + `(("UprightFont" ,LaTeX-fontspec-font-list) + ("BoldFont" ,LaTeX-fontspec-font-list) + ("ItalicFont" ,LaTeX-fontspec-font-list) + ("BoldItalicFont" ,LaTeX-fontspec-font-list) + ("SlantedFont" ,LaTeX-fontspec-font-list) + ("BoldSlantedFont" ,LaTeX-fontspec-font-list) + ("SmallCapsFont" ,LaTeX-fontspec-font-list))) + ;; This is a LuaTeX only feature. VI. 1 Different font + ;; technologies and shapers + (when (eq TeX-engine 'luatex) + '(("Renderer" ("Harfbuzz" "OpenType" "AAT" "Graphite")))) + ;; This is a XeTeX only feature. VII. 1 Different font + ;; technologies + (when (eq TeX-engine 'xetex) + '(("Renderer" ("OpenType" "AAT" "Graphite")))) + ;; Predefined features: + LaTeX-fontspec-font-features)) + +;; Setup for \newfontfamily and \newfontface: +(TeX-auto-add-type "fontspec-newfontcmd" "LaTeX") + +(defvar LaTeX-fontspec-newfontcmd-regexp + '("\\\\newfontfa\\(?:ce\\|mily\\)[ \t\n\r%]*\\\\\\([a-zA-Z]+\\)" + 1 LaTeX-auto-fontspec-newfontcmd) + "Matches new macros defined with \\newfontface and \\newfontfamily.") + +(defun LaTeX-fontspec-auto-prepare () + "Clear `LaTeX-auto-fontspec-newfontcmd' before parsing." + (setq LaTeX-auto-fontspec-newfontcmd nil)) + +(defun LaTeX-fontspec-auto-cleanup () + "Process parsed elements for fontspec package." + (dolist (mac (mapcar #'car (LaTeX-fontspec-newfontcmd-list))) + ;; Add macro to list of known macros + (TeX-add-symbols mac) + ;; Cater for fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,mac "")) + 'type-declaration)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-fontspec-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-fontspec-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "fontspec" + (lambda () + + (TeX-check-engine-add-engines 'luatex 'xetex) + (TeX-run-style-hooks "expl3" "xparse") + + ;; Add fontspec to the parser. + (TeX-auto-add-regexp LaTeX-fontspec-newfontcmd-regexp) + + (TeX-add-symbols + ;; 4.3 Commands for old-style and lining numbers: \oldstylenums is + ;; already provided by LaTeX, so just add \liningnums here + '("liningnums" "Numbers") + + ;; 4.5 Emphasis and nested emphasis + ;; \emshape seems to be an internal macro + "emshape" + '("emfontdeclare" t) + "emreset" + + ;; 4.6 Strong emphasis + '("strong" t) + '("strongfontdeclare" t) + "strongreset" + + ;; 5 Font selection + '("fontspec" + LaTeX-fontspec-arg-font + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + ;; Default font families + '("setmainfont" + (LaTeX-fontspec-arg-font "Main font name") + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + '("setsansfont" + (LaTeX-fontspec-arg-font "Sans font name") + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + '("setmonofont" + (LaTeX-fontspec-arg-font "Mono font name") + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + ;; 5.3 Querying whether a font exists + '("IfFontExistsTF" LaTeX-fontspec-arg-font 2) + + ;; 6 commands to select font families + '("newfontfamily" TeX-arg-define-macro + LaTeX-fontspec-arg-font + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + '("newfontface" TeX-arg-define-macro + LaTeX-fontspec-arg-font + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + ;; 6.4 Math(s) fonts + '("setmathrm" "Font name" [ "Font features" ]) + '("setmathsf" "Font name" [ "Font features" ]) + '("setmathtt" "Font name" [ "Font features" ]) + '("setboldmathrm" "Font name" [ "Font features" ]) + + ;; 8 Default settings + '("defaultfontfeatures" [ LaTeX-fontspec-arg-font ] + (TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features")) + '("defaultfontfeatures+" [ LaTeX-fontspec-arg-font ] + (TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features")) + + ;; 10 Working with the currently selected features + '("IfFontFeatureActiveTF" + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font feature"] 2) + + ;; Changing the currently selected features + '("addfontfeatures" + (TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features")) + + ;; 23 Defining new features + '("newAATfeature" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Existing feature") + (LaTeX-fontspec-font-features)) + "New option" 2) + + '("newopentypefeature" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Existing feature") + (LaTeX-fontspec-font-features)) + "New option" t) + + '("newfontfeature" "New feature" t) + + ;; 24 Defining new scripts and languages + '("newfontscript" "Script name" "OpenType tag") + '("newfontlanguage" "Language name" "OpenType tag") + + ;; 26 Renaming existing features & options + '("aliasfontfeature" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Existing feature") + (LaTeX-fontspec-font-features)) + "New name") + + '("aliasfontfeatureoption" + (TeX-arg-eval + (lambda () + (let* ((key (completing-read + (TeX-argument-prompt nil nil "Feature") + (LaTeX-fontspec-font-features))) + (val (completing-read + (TeX-argument-prompt nil nil "Existing name") + (cadr (assoc key (LaTeX-fontspec-font-features)))))) + (TeX-argument-insert key nil) + (format "%s" val)))) + "New name") ) + + (LaTeX-add-environments + ;; 4.6 Strong emphasis + '("strong")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fontspec" "[{[") + ("setmainfont" "[{[") + ("setsansfont" "[{[") + ("setmonofont" "[{[") + ("newfontfamily" "\\[{[") + ("newfontface" "\\[{[") + ("setmathrm" "[{[") + ("setmathsf" "[{[") + ("setmathtt" "[{[") + ("setboldmathrm" "[{[") + ("defaultfontfeatures" "+[{") + ("addfontfeature" "{") + ("addfontfeatures" "{") + ("newfontscript" "{{") + ("newfontlanguage" "{{") + ("emfontdeclare" "{") + ("strongfontdeclare" "{") + ("newAATfeature" "{{{{") + ("newopentypefeature" "{{{") + ("newfontfeature" "{{") + ("aliasfontfeature" "{{") + ("aliasfontfeatureoption" "{{{")) + 'function) + (font-latex-add-keywords '(("liningnums" "{")) + 'type-command) + (font-latex-add-keywords '(("strong" "{")) + 'bold-command))) + TeX-dialect) + +(defvar LaTeX-fontspec-package-options + '("tuenc" "euenc" "math" "no-math" "config" "no-config" "quiet" "silent") + "Package options for the fontspec package.") + +;;; fontspec.el ends here diff --git a/elpa/auctex-13.1.3/style/fontspec.elc b/elpa/auctex-13.1.3/style/fontspec.elc Binary files differnew file mode 100644 index 0000000..e5ca2a1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fontspec.elc diff --git a/elpa/auctex-13.1.3/style/footmisc.el b/elpa/auctex-13.1.3/style/footmisc.el new file mode 100644 index 0000000..64fd89e --- /dev/null +++ b/elpa/auctex-13.1.3/style/footmisc.el @@ -0,0 +1,128 @@ +;;; footmisc.el --- AUCTeX style for `footmisc.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2018--2022 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Created: 2011-04-08 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `footmisc.sty' (v6.0b) from 2022/02/14. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "footmisc" + (lambda () + (TeX-add-symbols + + ;; 1.4 Option ragged and \footnotelayout + "footnotelayout" + + ;; 1.7 The \setfnsymbol and \DefineFNsymbols commands + '("DefineFNsymbols" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + '("bringhurst" "chicago" "wiley" + "lamport" "lamport*")) + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Style (text or math)") + '("text" "math")] + 1) + '("DefineFNsymbols*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + '("bringhurst" "chicago" "wiley" + "lamport" "lamport*")) + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Style (text or math)") + '("text" "math")] + 1) + + ;; These two commands define both text and math variants of the + ;; footnote symbols + '("DefineFNsymbolsTM" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + '("bringhurst" "chicago" "wiley" + "lamport" "lamport*")) + 1) + '("DefineFNsymbolsTM*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + '("bringhurst" "chicago" "wiley" + "lamport" "lamport*")) + 1) + '("setfnsymbol" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + '("bringhurst" "chicago" "wiley" + "lamport" "lamport*"))) + + ;; 1.11 Option hang + "hangfootparskip" + "hangfootparindent" + + ;; 1.15 The multiple option + "multiplefootnotemarker" + "multfootsep" + + ;; 1.16 User interface + ;; The following command references a label inside in a footnote + '("footref" TeX-arg-ref) + "mpfootnotemark") + + ;; 1.9 Option marginal + (LaTeX-add-lengths "footnotemargin") + + ;; 1.13 Option splitrule + (when (LaTeX-provided-package-options-member "footmisc" "splitrule") + (TeX-add-symbols "mpfootnoterule" + "pagefootnoterule" + "splitfootnoterule")) + + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("DefineFNsymbols" "*{[{") + ("DefineFNsymbolsTM" "*{{") + ("setfnsymbol" "{")) + 'function) + (font-latex-add-keywords '(("footref")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-footmisc-package-options '("perpage" "side" "ragged" + "para" "symbol" "symbol*" + "marginal" "flushmargin" "hang" + "norule" "splitrule" "stable" + "multiple" + "abovefloats" "belowfloats" + "bottom" "bottomfloats") + "Package options for the footmisc package.") + +;;; footmisc.el ends here diff --git a/elpa/auctex-13.1.3/style/footmisc.elc b/elpa/auctex-13.1.3/style/footmisc.elc Binary files differnew file mode 100644 index 0000000..1de0a0a --- /dev/null +++ b/elpa/auctex-13.1.3/style/footmisc.elc diff --git a/elpa/auctex-13.1.3/style/footnotehyper.el b/elpa/auctex-13.1.3/style/footnotehyper.el new file mode 100644 index 0000000..d97e5b2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/footnotehyper.el @@ -0,0 +1,86 @@ +;;; footnotehyper.el --- AUCTeX style for `footnotehyper.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-01-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `footnotehyper.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-arg-footnotehyper-savenotes (_optional) + "Insert the corresponding \\spewnotes macro after \\savenotes. +OPTIONAL is ignored." + (just-one-space) + (save-excursion + (insert TeX-esc "spewnotes"))) + +(TeX-add-style-hook + "footnotehyper" + (lambda () + + ;; Environment defined by the package. Query for optional footnote + ;; numbers depends on the value of `TeX-arg-footnote-number-p': + (LaTeX-add-environments + '("savenotes") + '("footnote" LaTeX-env-args + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)) + '("footnotetext" LaTeX-env-args + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil))) + + ;; New symbols + (TeX-add-symbols + '("savenotes" LaTeX-arg-footnotehyper-savenotes) + '("spewnotes" 0) + + ;; The syntax is \makesavenoteenv[bar]{foo} where `bar' is a new + ;; environment of patched environment `foo'. This command isn't + ;; recommended; hence we don't add parsing capabilities to this + ;; style in order to extract the newly defined environments + ;; automatically: + '("makesavenoteenv" + [TeX-arg-environment "New environment" t] + (TeX-arg-environment "Patched environment"))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("savenotes" "") + ("spewnotes" "") + ("makesavenoteenv" "[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-footnotehyper-package-options nil + "Package options for the footnotehyper package.") + +;;; footnotehyper.el ends here diff --git a/elpa/auctex-13.1.3/style/footnotehyper.elc b/elpa/auctex-13.1.3/style/footnotehyper.elc Binary files differnew file mode 100644 index 0000000..23bc389 --- /dev/null +++ b/elpa/auctex-13.1.3/style/footnotehyper.elc diff --git a/elpa/auctex-13.1.3/style/framed.el b/elpa/auctex-13.1.3/style/framed.el new file mode 100644 index 0000000..03160ba --- /dev/null +++ b/elpa/auctex-13.1.3/style/framed.el @@ -0,0 +1,55 @@ +;;; framed.el --- AUCTeX style for `framed.sty' (v0.96) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-06-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `framed.sty' (v0.96) from 2011/10/22. +;; `framed.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "framed" + (lambda () + ;; env's defined by framed.sty + (LaTeX-add-environments + '("framed") + '("oframed") + '("shaded") + '("shaded*") + '("snugshade") + '("snugshade*") + '("leftbar") + '("titled-frame" "Title"))) + TeX-dialect) + +(defvar LaTeX-framed-package-options nil + "Package options for the framed package.") + +;;; framed.el ends here diff --git a/elpa/auctex-13.1.3/style/framed.elc b/elpa/auctex-13.1.3/style/framed.elc Binary files differnew file mode 100644 index 0000000..b9d627f --- /dev/null +++ b/elpa/auctex-13.1.3/style/framed.elc diff --git a/elpa/auctex-13.1.3/style/francais.el b/elpa/auctex-13.1.3/style/francais.el new file mode 100644 index 0000000..53da6f3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/francais.el @@ -0,0 +1,44 @@ +;;; francais.el --- AUCTeX style for the `francais' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2005, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2005-10-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing French text. In particular for commands +;; provided by the `francais' option of the `babel' LaTeX package. As +;; this is equivalent to the `frenchb' option, this file only loads +;; `frenchb.el'. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "francais" + (lambda () + (TeX-run-style-hooks "frenchb")) + TeX-dialect) + +;;; francais.el ends here diff --git a/elpa/auctex-13.1.3/style/francais.elc b/elpa/auctex-13.1.3/style/francais.elc Binary files differnew file mode 100644 index 0000000..1dc207d --- /dev/null +++ b/elpa/auctex-13.1.3/style/francais.elc diff --git a/elpa/auctex-13.1.3/style/french.el b/elpa/auctex-13.1.3/style/french.el new file mode 100644 index 0000000..d3f4178 --- /dev/null +++ b/elpa/auctex-13.1.3/style/french.el @@ -0,0 +1,51 @@ +;;; french.el --- AUCTeX style for the `french' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2010, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2010-03-20 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing French text in connection with the +;; `french' babel option. The file basically loads the style file for +;; the `frenchb' babel option. +;; +;; Support for the FrenchPro package by Bernard Gaulle is _not_ +;; included. If the presence of FrenchPro is detected, the `frenchb' +;; support is not loaded. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "french" + (lambda () + (when (and (member "babel" TeX-active-styles) + (not (member "frenchpro" TeX-active-styles)) + (not (member "frenchle" TeX-active-styles)) + (not (member "mlp" TeX-active-styles))) + (TeX-run-style-hooks "frenchb"))) + TeX-dialect) + +;;; french.el ends here diff --git a/elpa/auctex-13.1.3/style/french.elc b/elpa/auctex-13.1.3/style/french.elc Binary files differnew file mode 100644 index 0000000..48b54b1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/french.elc diff --git a/elpa/auctex-13.1.3/style/frenchb.el b/elpa/auctex-13.1.3/style/frenchb.el new file mode 100644 index 0000000..31c30b8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/frenchb.el @@ -0,0 +1,81 @@ +;;; frenchb.el --- AUCTeX style for the `frenchb' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2005, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2005-10-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing French text. In particular for commands +;; provided by the `frenchb' option of the `babel' LaTeX package. The +;; `frenchb' option is equivalent to the `francais' option and since +;; babel version 3.7j with the `french' option. `french', however, is +;; ambiguous because another package by that name made by Bernard +;; Gaulle could be loaded. In order to avoid this, either `frenchb' +;; (or `francais') or `frenchle' (or `frenchPRO') should be used. See +;; the documentation of `frenchb' at +;; <URL:http://daniel.flipo.free.fr/frenchb/frenchb-doc.pdf>. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "frenchb" + (lambda () + (TeX-add-symbols + "og" + "fg" + "up" + "ier" + "iere" + "iers" + "ieres" + "ieme" + "iemes" + '("bsc" t) + "primo" + "secundo" + "tertio" + "quarto" + "No" + "no" + "degre" + "degres" + "DecimalMathComma" + "StandardMathComma" + '("nombre" "Nombre") + "ThinSpaceInFrenchNumbers" + "FrenchLayout" + "StandardLayout") + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("french" "\\og " + (lambda () + (concat "\\fg" + (unless (member "xspace" TeX-active-styles) "{}"))) + ,TeX-quote-after-quote))) + (run-hooks 'TeX-language-fr-hook)) + TeX-dialect) + +;;; frenchb.el ends here diff --git a/elpa/auctex-13.1.3/style/frenchb.elc b/elpa/auctex-13.1.3/style/frenchb.elc Binary files differnew file mode 100644 index 0000000..9cc8f62 --- /dev/null +++ b/elpa/auctex-13.1.3/style/frenchb.elc diff --git a/elpa/auctex-13.1.3/style/fvextra.el b/elpa/auctex-13.1.3/style/fvextra.el new file mode 100644 index 0000000..3109216 --- /dev/null +++ b/elpa/auctex-13.1.3/style/fvextra.el @@ -0,0 +1,159 @@ +;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-03-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `fvextra.sty' (v1.4) from 2019/02/04. +;; `fvextra.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Needed for compiling `cl-pushnew': +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) +(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ()) + +(defvar LaTeX-fvextra-key-val-options + '(;; 3 General options + ("beameroverlays" ("true" "false")) + ("curlyquotes" ("true" "false")) + ("extra" ("true" "false")) + ("fontencoding" (;; Reset to default document font encoding + "none" + ;; 128+ glyph encodings (text) + "OT1" "OT2" "OT3" "OT4" "OT6" + ;; 256 glyph encodings (text) + "T1" "T2A" "T2B" "T2C" "T3" "T4" "T5" + ;; 256 glyph encodings (text extended) + "X2" + ;; Other encodings + "LY1" "LV1" "LGR")) + ("highlightcolor") + ("highlightlines") + ("linenos" ("true" "false")) + ("mathescape" ("true" "false")) + ("numberfirstline" ("true" "false")) + ("numbers" ("none" "left" "right" "both")) + ("retokenize" ("true" "false")) + ("space" ("\\textvisiblespace")) + ("spacecolor" ("none")) + ("stepnumberfromfirst" ("true" "false")) + ("stepnumberoffsetvalues" ("true" "false")) + ("tab" ("\\FancyVerbTab")) + ("tabcolor" ("none")) + ;; 7.1 Line breaking options + ("breakafter" ("none")) + ("breakaftergroup" ("true" "false")) + ("breakaftersymbolpre") + ("breakaftersymbolpost") + ("breakanywhere" ("true" "false")) + ("breakanywheresymbolpre") + ("breakanywheresymbolpost") + ("breakautoindent" ("true" "false")) + ("breakbefore") + ("breakbeforegroup" ("true" "false")) + ("breakbeforesymbolpre") + ("breakbeforesymbolpost") + ("breakindent") + ("breakindentnchars") + ("breaklines" ("true" "false")) + ("breaksymbol") + ("breaksymbolleft") + ("breaksymbolright") + ("breaksymbolindent") + ("breaksymbolindentnchars") + ("breaksymbolindentleft") + ("breaksymbolindentleftnchars") + ("breaksymbolindentright") + ("breaksymbolindentrightnchars") + ("breaksymbolsep") + ("breaksymbolsepnchars") + ("breaksymbolsepleft") + ("breaksymbolsepleftnchars") + ("breaksymbolsepright") + ("breaksymbolseprightnchars")) + "Key=value options for fvextra macros and environments.") + +(TeX-add-style-hook + "fvextra" + (lambda () + + ;; Run the style hook for "fancyvrb" + (TeX-run-style-hooks "fancyvrb") + + (TeX-add-symbols + ;; 4.1 Inline formatting with \fvinlineset + '("fvinlineset" (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options))) + + ;; 4.2 Line and text formatting + "FancyVerbFormatText" + + ;; 6 New commands and environments + ;; 6.1 \EscVerb + '("EscVerb" + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] "Text") + '("EscVerb*" + [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] "Text") + + ;; 7.3.2 Breaks within macro arguments + "FancyVerbBreakStart" + "FancyVerbBreakStop" + + ;; 7.3.3 Customizing break behavior + "FancyVerbBreakAnywhereBreak" + "FancyVerbBreakBeforeBreak" + "FancyVerbBreakAfterBreak") + + ;; Add \EscVerb*? to `LaTeX-verbatim-macros-with-braces-local': + (add-to-list 'LaTeX-verbatim-macros-with-braces-local + "EscVerb" t) + (add-to-list 'LaTeX-verbatim-macros-with-braces-local + "EscVerb*" t) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fvinlineset" "{")) + 'function) + (font-latex-add-keywords '(("EscVerb" "*[")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-fvextra-package-options nil + "Package options for the fvextra package.") + +;;; fvextra.el ends here diff --git a/elpa/auctex-13.1.3/style/fvextra.elc b/elpa/auctex-13.1.3/style/fvextra.elc Binary files differnew file mode 100644 index 0000000..39cb48d --- /dev/null +++ b/elpa/auctex-13.1.3/style/fvextra.elc diff --git a/elpa/auctex-13.1.3/style/geometry.el b/elpa/auctex-13.1.3/style/geometry.el new file mode 100644 index 0000000..cc93d84 --- /dev/null +++ b/elpa/auctex-13.1.3/style/geometry.el @@ -0,0 +1,160 @@ +;;; geometry.el --- AUCTeX style for `geometry.sty' (v5.6) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-02-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `geometry.sty' (v5.6) from 2010/09/12. +;; `geometry.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-geometry-always-key-val-options + '(("layout") ("layoutwidth") ("layoutheight") ("layoutsize") + ("layouthoffset") ("layoutvoffset") ("layoutoffset") ("hscale") + ("vscale") ("scale") ("width") ("totalwidth") ("height") ("totalheight") + ("total") ("textwidth") ("textheight") ("text") ("body") ("lines") + ("includehead") ("includefoot") ("includeheadfoot") ("includemp") + ("includeall") ("ignorehead") ("ignorefoot") ("ignoreheadfoot") + ("ignoremp") ("ignoreall") ("heightrounded") ("hdivide") ("vdivide") + ("divide") ("left") ("lmargin") ("inner") ("right") ("rmargin") + ("outer") ("top") ("tmargin") ("bottom") ("bmargin") ("hmargin") + ("vmargin") ("margin") ("hmarginratio") ("vmarginratio") ("marginratio") + ("ratio") ("hcentering") ("vcentering") ("centering") ("twoside") + ("asymmetric") ("bindingoffset") ("hdivide") ("vdivide") ("divide") + ("headheight") ("head") ("headsep") ("footskip") ("foot") ("nohead") + ("nofoot") ("noheadfoot") ("footnotesep") ("marginparwidth") ("marginpar") + ("marginparsep") ("nomarginpar") ("columnsep") ("hoffset") ("voffset") + ("offset") ("twocolumn") ("onecolumn") ("twoside") ("textwidth") + ("textheight") ("reversemp") ("reversemarginpar")) + "Key=value options always available for geometry macros.") + +(defvar LaTeX-geometry-preamble-key-val-options + '(("paper" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper" + "a5paper" "a6paper" "b0paper" "b1paper" "b2paper" + "b3paper" "b4paper" "b5paper" "b6paper" "c0paper" + "c1paper" "c2paper" "c3paper" "c4paper" "c5paper" + "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j" + "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper" + "ansiepaper")) + ("papername" ("a0paper" "a1paper" "a2paper" "a3paper" "a4paper" + "a5paper" "a6paper" "b0paper" "b1paper" "b2paper" + "b3paper" "b4paper" "b5paper" "b6paper" "c0paper" + "c1paper" "c2paper" "c3paper" "c4paper" "c5paper" + "c6paper" "b0j" "b1j" "b2j" "b3j" "b4j" "b5j" "b6j" + "ansiapaper" "ansibpaper" "ansicpaper" "ansidpaper" + "ansiepaper")) + ("a0paper") ("a1paper") ("a2paper") ("a3paper") ("a4paper") ("a5paper") + ("a6paper") ("b0paper") ("b1paper") ("b2paper") ("b3paper") ("b4paper") + ("b5paper") ("b6paper") ("c0paper") ("c1paper") ("c2paper") ("c3paper") + ("c4paper") ("c5paper") ("c6paper") ("b0j") ("b1j") ("b2j") ("b3j") + ("b4j") ("b5j") ("b6j") ("ansiapaper") ("ansibpaper") ("ansicpaper") + ("ansidpaper") ("ansiepaper") ("screen") ("paperwidth") ("paperheight") + ("papersize") ("landscape") ("portrait") + ("driver" ("dvips" "dvipdfm" "dvipdfmx" "xdvipdfmx" + "pdftex" "luatex" "vtex" "xetex" "auto" "none")) + ("dvips") ("dvipdfm") ("dvipdfmx") ("xdvipdfmx") ("pdftex") ("luatex") + ("xetex") ("vtex") ("verbose") ("reset") + ("mag") ("truedimen") ("pass") ("showframe") ("showcrop")) + "Key=value options allowed only in the preamble for geometry macros.") + +;; Setup for \savegeometry: +(TeX-auto-add-type "geometry-savegeometry" "LaTeX" "geometry-savegeometries") + +(defvar LaTeX-geometry-savegeometry-regexp + '("\\\\savegeometry{\\([^}]+\\)}" + 1 LaTeX-auto-geometry-savegeometry) + "Matches the argument of `\\savegeometry' from `geometry' +package.") + +(defun LaTeX-geometry-auto-prepare () + "Clear `LaTeX-auto-geometry-savegeometry' before parsing." + (setq LaTeX-auto-geometry-savegeometry nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-geometry-auto-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "geometry" + (lambda () + + ;; Add geometry to the parser. + (TeX-auto-add-regexp LaTeX-geometry-savegeometry-regexp) + + ;; geometry commands: + (TeX-add-symbols + '("geometry" + (TeX-arg-eval TeX-read-key-val nil + (append LaTeX-geometry-preamble-key-val-options + LaTeX-geometry-always-key-val-options))) + '("newgeometry" + (TeX-arg-key-val LaTeX-geometry-always-key-val-options)) + + '("restoregeometry" 0) + + '("savegeometry" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string "Name: "))) + (LaTeX-add-geometry-savegeometries name) + (format "%s" name))))) + + '("loadgeometry" + (TeX-arg-eval + (lambda () + (completing-read "Name: " + (LaTeX-geometry-savegeometry-list)))))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("geometry" "{") + ("newgeometry" "{") + ("restoregeometry" "") + ("savegeometry" "{") + ("loadgeometry" "{")) + 'function)) + + ;; Option management + (if (and (LaTeX-provided-package-options-member "geometry" "dvipdfmx") + (not (eq TeX-engine 'xetex))) + (setq TeX-PDF-from-DVI "Dvipdfmx"))) + TeX-dialect) + +(defun LaTeX-geometry-package-options () + "Prompt for package options for the geometry package." + (TeX-read-key-val t + (append LaTeX-geometry-preamble-key-val-options + LaTeX-geometry-always-key-val-options))) + +;;; geometry.el ends here diff --git a/elpa/auctex-13.1.3/style/geometry.elc b/elpa/auctex-13.1.3/style/geometry.elc Binary files differnew file mode 100644 index 0000000..6cd5b84 --- /dev/null +++ b/elpa/auctex-13.1.3/style/geometry.elc diff --git a/elpa/auctex-13.1.3/style/german.el b/elpa/auctex-13.1.3/style/german.el new file mode 100644 index 0000000..5dd1c3e --- /dev/null +++ b/elpa/auctex-13.1.3/style/german.el @@ -0,0 +1,46 @@ +;;; german.el --- Setup AUCTeX for editing German text. -*- lexical-binding: t; -*- + +;;; Commentary: +;; +;; Cater for some specialities of `(n)german.sty', e.g. special quote +;; and hyphen strings or that `"' makes the following letter an +;; umlaut. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(defvar LaTeX-german-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `german.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-german-mode-syntax-table) + +(TeX-add-style-hook + "german" + (lambda () + (set-syntax-table LaTeX-german-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language '("german" "\"`" "\"'" t))) + (setq LaTeX-babel-hyphen-language "german") + ;; Fontification of quotation marks. + (when (and (eq TeX-install-font-lock 'font-latex-setup) + (featurep 'font-latex)) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\">" "\"<" german)) + ;; Prevent "| from leading to color bleed. + (font-latex-add-to-syntax-alist (list (cons ?\" "\\")))) + (run-hooks 'TeX-language-de-hook)) + TeX-dialect) + +;;; german.el ends here diff --git a/elpa/auctex-13.1.3/style/german.elc b/elpa/auctex-13.1.3/style/german.elc Binary files differnew file mode 100644 index 0000000..5dfd34e --- /dev/null +++ b/elpa/auctex-13.1.3/style/german.elc diff --git a/elpa/auctex-13.1.3/style/gloss-italian.el b/elpa/auctex-13.1.3/style/gloss-italian.el new file mode 100644 index 0000000..c13f9f2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/gloss-italian.el @@ -0,0 +1,71 @@ +;;; gloss-italian.el --- Italian support for polyglossia package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020, 2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This is based on italian.el style file, adapted to polyglossia package. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(declare-function LaTeX-polyglossia-lang-option-member + "polyglossia" (language option)) + +(defvar TeX-language-it-hook nil + "Hook run for Italian texts.") + +(TeX-add-style-hook + "gloss-italian" + (lambda () + (TeX-add-symbols + '("textitalian" [TeX-arg-key-val LaTeX-polyglossia-italian-options-list] t)) + (LaTeX-add-environments + '("italian" + LaTeX-env-args [TeX-arg-key-val LaTeX-polyglossia-italian-options-list])) + + (when (or (LaTeX-polyglossia-lang-option-member "italian" "babelshorthands=true") + (LaTeX-polyglossia-lang-option-member "italian" "babelshorthands")) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("italian" "\"<" "\">" ,TeX-quote-after-quote))) + + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"<" "\">" french)))) + (run-hooks 'TeX-language-it-hook)) + TeX-dialect) + +(defvar LaTeX-polyglossia-italian-options-list + '(("babelshorthands" ("true" "false"))) + "Italian language options for the polyglossia package.") + +;;; gloss-italian.el ends here diff --git a/elpa/auctex-13.1.3/style/gloss-italian.elc b/elpa/auctex-13.1.3/style/gloss-italian.elc Binary files differnew file mode 100644 index 0000000..01f8338 --- /dev/null +++ b/elpa/auctex-13.1.3/style/gloss-italian.elc diff --git a/elpa/auctex-13.1.3/style/graphics.el b/elpa/auctex-13.1.3/style/graphics.el new file mode 100644 index 0000000..4cdd31c --- /dev/null +++ b/elpa/auctex-13.1.3/style/graphics.el @@ -0,0 +1,20 @@ +;;; graphics.el --- Handle graphical commands in LaTeX 2e. -*- lexical-binding: t; -*- + +;;; Code: + +;; Load "graphicx" explicitly to access `LaTeX-graphicx-package-options' +;; before running style hook "graphics". This is necessary to have +;; support for completion of package options of "usepackage". + +(require 'tex) + +(TeX-load-style "graphicx") +(defvar LaTeX-graphics-package-options LaTeX-graphicx-package-options) + +(TeX-add-style-hook "graphics" + (function + (lambda () + (TeX-run-style-hooks "graphicx"))) + TeX-dialect) + +;;; graphics.el ends here. diff --git a/elpa/auctex-13.1.3/style/graphics.elc b/elpa/auctex-13.1.3/style/graphics.elc Binary files differnew file mode 100644 index 0000000..1b2412c --- /dev/null +++ b/elpa/auctex-13.1.3/style/graphics.elc diff --git a/elpa/auctex-13.1.3/style/graphicx.el b/elpa/auctex-13.1.3/style/graphicx.el new file mode 100644 index 0000000..0e1e220 --- /dev/null +++ b/elpa/auctex-13.1.3/style/graphicx.el @@ -0,0 +1,332 @@ +;;; graphicx.el --- AUCTeX style file for graphicx.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2000, 2004, 2005, 2014--2021 by Free Software Foundation, Inc. + +;; Author: Ryuichi Arafune <arafune@debian.org> +;; Created: 1999/3/20 +;; Keywords: tex + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This package supports the includegraphics macro in graphicx style. + +;; Acknowledgements +;; Dr. Thomas Baumann <thomas.baumann@ch.tum.de> +;; David Kastrup <David.Kastrup@t-online.de> +;; Masayuki Ataka <masayuki.ataka@gmail.com> + +;;; Code: + +(require 'crm) +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-graphicx-key-val-options + '(("bb") + ("bbllx") + ("bblly") + ("bburx") + ("bbury") + ("natheight") + ("natwidth") + ("viewport") + ("trim") + ("hiresbb" ("true" "false")) + ("angle") + ("origin") + ("width" ("\\textwidth" "\\columnwidth" "\\linewidth")) + ("height" ("\\textheight")) + ("totalheight" ("\\textheight")) + ("keepaspectratio" ("true" "false")) + ("scale") + ("clip" ("true" "false")) + ("draft" ("true" "false")) + ("quiet") + ("interpolate" ("true" "false")) + ("alt")) + "Key=value options for graphicx macros.") + +(defvar LaTeX-includegraphics-dvips-extensions + '("eps" "mps" "EPS") + "List of extensions for image files supported by \"dvips\".") + +(defvar LaTeX-includegraphics-pdftex-extensions + '("png" "pdf" "jpe?g" "jbig2" "jb2" "mps" + "PNG" "PDF" "JPE?G" "JBIG2" "JB2") + "List of extensions for image files supported by \"pdftex\" and \"luatex\".") + +(defvar LaTeX-includegraphics-xetex-extensions + '("pdf" "eps" "mps" "ps" "png" "jpe?g" "jp2" "jpf" + "PDF" "EPS" "MPS" "PS" "PNG" "JPE?G" "JP2" "JPF" + "bmp" "pict" "psd" "mac" "tga" "gif" "tif" "tiff" + "BMP" "PICT" "PSD" "MAC" "TGA" "GIF" "TIF" "TIFF") + "List of extensions for image files supported by \"xetex\".") + +(defun LaTeX-arg-graphicx-includegraphics-key-val (optional) + "Insert key-val for optional argument of \\includegraphics macro. +If OPTIONAL is non-nil, insert argument in square brackets. +Temporarily remove \"space\" from `crm-local-completion-map' and +`minibuffer-local-completion-map' in order to be able to insert +spaces conveniently. + +If `TeX-engine' is set to symbol 'default (while +`TeX-PDF-from-DVI' is set to nil) or 'luatex and `TeX-PDF-mode' +is non-nil, add the keys \"page\" and \"pagebox\" to list of +key-val's." + (let ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) + crm-local-completion-map)) + (minibuffer-local-completion-map + (remove (assoc 32 minibuffer-local-completion-map) + minibuffer-local-completion-map))) + (TeX-argument-insert + (TeX-read-key-val optional + (if (and (or (and (eq TeX-engine 'default) + (not (TeX-PDF-from-DVI))) + (eq TeX-engine 'luatex) + ;; dvipdfmx can handle page and + ;; pagebox options. + (string= (TeX-PDF-from-DVI) "Dvipdfmx")) + TeX-PDF-mode) + (append '(("page") + ("pagebox" ("mediabox" + "cropbox" + "bleedbox" + "trimbox" + "artbox"))) + LaTeX-graphicx-key-val-options) + LaTeX-graphicx-key-val-options)) + optional))) + +(defun LaTeX-includegraphics-extensions-list () + "Return appropriate extensions for input files to \\includegraphics. +Return value is a list of regexps." + (let ((temp (copy-sequence LaTeX-includegraphics-extensions))) + (cond (;; 'default TeX-engine: + (eq TeX-engine 'default) + (if ;; we want to produce a pdf + (if TeX-PDF-mode + ;; Return t if default compiler produces PDF, + ;; nil for "Dvips" or "Dvipdfmx" + (not (TeX-PDF-from-DVI)) + ;; t if pdftex is used in dvi-mode + TeX-DVI-via-PDFTeX) + ;; We're using pdflatex in pdf-mode + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-pdftex-extensions + temp)) + ;; We're generating a .dvi to process with dvips or dvipdfmx + (progn + ;; dvipdfmx can handle jpeg, pdf and png for image formats. + (unless (and TeX-PDF-mode + (string= (TeX-PDF-from-DVI) "Dvipdfmx")) + (dolist (x '("jpe?g" "pdf" "png")) + (setq temp (delete x temp)))) + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-dvips-extensions + temp))))) + ;; Running luatex in pdf or dvi-mode: + ((eq TeX-engine 'luatex) + (if TeX-PDF-mode + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-pdftex-extensions + temp)) + (progn + (dolist (x '("jpe?g" "pdf" "png")) + (setq temp (delete x temp))) + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-dvips-extensions + temp))))) + ;; Running xetex in any mode: + ((eq TeX-engine 'xetex) + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-xetex-extensions + temp))) + ;; For anything else + (t + (if (and TeX-PDF-mode + (string= (TeX-PDF-from-DVI) "Dvipdfmx")) + ;; dvipdfmx can handle the same image formats as dvips. + (TeX-delete-duplicate-strings + (append LaTeX-includegraphics-dvips-extensions + temp)) + temp))))) + +(defun LaTeX-includegraphics-extensions (&optional list) + "Return appropriate extensions for input files to \\includegraphics. +Return value is a single regexp. +Optional argument LIST if non-nil is used as list of regexps of +extensions to be matched." + (unless list + (setq list (LaTeX-includegraphics-extensions-list))) + (concat "\\." (mapconcat #'identity list "\\'\\|\\.") "\\'")) + +(defvar LaTeX-includegraphics-global-files nil + "List of the non-local graphic files to include in LaTeX documents. +Initialized once at the first time you prompt for an input file. +May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") + +;; Add the variable to `TeX-normal-mode-reset-list': +(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-includegraphics-global-files) + +(defun LaTeX-includegraphics-read-file-TeX () + "Read image file for \\includegraphics. +Offers all graphic files found in the TeX search path. See +`LaTeX-includegraphics-read-file' for more." + (let ((LaTeX-includegraphics-extensions + (LaTeX-includegraphics-extensions-list))) + (unless LaTeX-includegraphics-global-files + (message "Searching for graphic files...") + (setq LaTeX-includegraphics-global-files + (TeX-search-files-by-type + 'graphics 'global t + LaTeX-includegraphics-strip-extension-flag)) + (message "Searching for graphic files...done")) + (completing-read + "Image file: " + (append + (TeX-search-files-by-type 'graphics 'local t + LaTeX-includegraphics-strip-extension-flag) + LaTeX-includegraphics-global-files) + nil nil nil))) + +(defun LaTeX-includegraphics-read-file-relative () + "Read image file for \\includegraphics. + +Lists all graphic files in the master directory and its +subdirectories and inserts the relative file name. See +`LaTeX-includegraphics-read-file' for more." + (file-relative-name + (read-file-name + "Image file: " nil nil nil nil + (lambda (fname) + (or (file-directory-p fname) + (string-match (LaTeX-includegraphics-extensions) fname)))) + (TeX-master-directory))) + +(defun LaTeX-arg-includegraphics (optional) + "Ask for mandantory argument for the \\includegraphics command." + (let ((image-file (funcall LaTeX-includegraphics-read-file))) + (TeX-argument-insert + (if LaTeX-includegraphics-strip-extension-flag + (replace-regexp-in-string (LaTeX-includegraphics-extensions) + "" + image-file) + image-file) + optional))) + +(TeX-add-style-hook + "graphicx" + (lambda () + (TeX-add-symbols + '("reflectbox" "Argument") + + '("resizebox" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Width") + (append '("\\width" "!") + (mapcar + (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list)))) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Height") + (append '("\\height" "\\totalheight" "\\depth" "!") + (mapcar + (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list)))) + "Argument") + + '("resizebox*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Width") + (append '("\\width" "!") + (mapcar + (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list)))) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Height") + (append '("\\height" "\\totalheight" "\\depth" "!") + (mapcar + (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list)))) + "Argument") + + '("rotatebox" (TeX-arg-conditional (member "graphics" (TeX-style-list)) + () + ([ TeX-arg-key-val (("x") ("y") ("origin") ("units")) ])) + "Angle" "Argument") + + '("scalebox" "Horizontal scale" [ "Vertical scale" ] "Argument") + + '("includegraphics" (TeX-arg-conditional (member "graphics" (TeX-style-list)) + (["llx,lly"] ["urx,ury"]) + ([ LaTeX-arg-graphicx-includegraphics-key-val ])) + LaTeX-arg-includegraphics) + + '("includegraphics*" (TeX-arg-conditional (member "graphics" (TeX-style-list)) + (["llx,lly"] ["urx,ury"]) + ([ LaTeX-arg-graphicx-includegraphics-key-val ])) + LaTeX-arg-includegraphics) + + '("graphicspath" t) + + '("DeclareGraphicsExtensions" t) + + '("DeclareGraphicsRule" 4)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("reflectbox" "{") + ("resizebox" "*{{{") + ("rotatebox" "[{{") + ("scalebox" "{[{")) + 'textual) + (font-latex-add-keywords '(("includegraphics" "*[[{")) + 'reference) + (font-latex-add-keywords '(("graphicspath" "{") + ("DeclareGraphicsExtensions" "{") + ("DeclareGraphicsRule" "{{{{")) + 'function)) + + ;; Option management + (if (and (LaTeX-provided-package-options-member "graphicx" "dvipdfmx") + (not (eq TeX-engine 'xetex))) + (setq TeX-PDF-from-DVI "Dvipdfmx"))) + TeX-dialect) + +(defvar LaTeX-graphicx-package-options + '("draft" "final" "debugshow" + "hiderotate" "hidescale" "hiresbb" + "setpagesize" "nosetpagesize" "demo" + "dvips" "xdvi" + "dvipdf" "dvipdfm" "dvipdfmx" + "xetex" "pdftex" "luatex" + "dvisvgm" "dvipsone" "dviwindo" + "emtex" "dviwin" "oztex" + "textures" "pctexps" "pctexwin" + "pctexhp" "pctex32" "truetex" + "tcidvi" "vtex") + "Package options for the graphicx package.") + +;;; graphicx.el ends here diff --git a/elpa/auctex-13.1.3/style/graphicx.elc b/elpa/auctex-13.1.3/style/graphicx.elc Binary files differnew file mode 100644 index 0000000..90e0330 --- /dev/null +++ b/elpa/auctex-13.1.3/style/graphicx.elc diff --git a/elpa/auctex-13.1.3/style/harvard.el b/elpa/auctex-13.1.3/style/harvard.el new file mode 100644 index 0000000..6373af3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/harvard.el @@ -0,0 +1,133 @@ +;;; harvard.el --- Support for Harvard Citation style package for AUCTeX. -*- lexical-binding: t; -*- + +;; Copyright (C) 1994, 1997, 2005, 2012, 2014, 2020 Free Software Foundation, Inc. + +;; Author: Berwin Turlach <statba@nus.edu.sg> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "harvard" + (lambda () + + (LaTeX-add-environments + '("thebibliography" LaTeX-env-harvardbib ignore)) + + (TeX-add-symbols + "harvardand" + '("citeasnoun" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil) + TeX-arg-cite) + '("possessivecite" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil) + TeX-arg-cite) + '("citeaffixed" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil) + TeX-arg-cite "Affix") + '("citeyear" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil) + TeX-arg-cite) + '("citename" + (TeX-arg-conditional TeX-arg-cite-note-p ([ "Note" ]) nil) + TeX-arg-cite) + '("citationstyle" + (TeX-arg-eval completing-read "Citation style: " '(("agsm") ("dcu")))) + '("citationmode" + (TeX-arg-eval completing-read "Citation mode: " + '(("full") ("abbr") ("default")))) + '("harvardparenthesis" + (TeX-arg-eval completing-read "Harvardparenthesis: " + '(("round") ("curly") ("angle") ("square")))) + '("bibliographystyle" + (TeX-arg-eval + completing-read "Bibliography style: " + '(("agsm") ("apsr") ("dcu") ("jmr") ("jphysicsB") ("kluwer") ("nederlands") ("econometrica"))) + ignore) + '("harvarditem" [ "Short citation" ] + "Complete citation" "Year" TeX-arg-define-cite)) + + (setq TeX-complete-list + (append '(("\\\\citeasnoun\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\citeasnoun{\\([^{}\n\r\\%,]*\\)" 1 + LaTeX-bibitem-list "}") + ("\\\\possessivecite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\possessivecite{\\([^{}\n\r\\%,]*\\)" 1 + LaTeX-bibitem-list "}") + ("\\\\citename\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\citename{\\([^{}\n\r\\%,]*\\)" 1 + LaTeX-bibitem-list "}") + ("\\\\citeaffixed\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\citeaffixed{\\([^{}\n\r\\%,]*\\)" 1 + LaTeX-bibitem-list "}") + ("\\\\citeaffixed{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-bibitem-list) + ("\\\\citeyear\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)" + 1 LaTeX-bibitem-list "}") + ("\\\\citeyear{\\([^{}\n\r\\%,]*\\)" 1 + LaTeX-bibitem-list "}") + ("\\\\citeyear{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-bibitem-list)) + TeX-complete-list)) + + (setq LaTeX-auto-regexp-list + (append '(("\\\\harvarditem{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, %\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem) + ("\\\\harvarditem\\[[^][\n\r]+\\]{\\([a-zA-Z][^%#'()={}]*\\)}{\\([0-9][^, %\"#'()={}]*\\)}{\\([a-zA-Z][^, %\"#'()={}]*\\)}" 3 LaTeX-auto-bibitem) + ) + LaTeX-auto-regexp-list)) + + (setq LaTeX-item-list + (cons '("thebibliography" . LaTeX-item-harvardbib) + LaTeX-item-list)) + + ;; Tell RefTeX + (when (and LaTeX-reftex-cite-format-auto-activate + (fboundp 'reftex-set-cite-format)) + (reftex-set-cite-format 'harvard))) + TeX-dialect) + +(defun LaTeX-env-harvardbib (environment &optional _ignore) + "Insert ENVIRONMENT with label for harvarditem." + (LaTeX-insert-environment environment + (concat TeX-grop "xx" TeX-grcl)) + (end-of-line 0) + (delete-char 1) + (delete-horizontal-space) + (LaTeX-insert-item)) + +;; Analog to LaTeX-item-bib from latex.el +(defun LaTeX-item-harvardbib () + "Insert a new harvarditem." + (TeX-insert-macro "harvarditem")) + +(defvar LaTeX-harvard-package-options '("full" "abbr" "default" + "agsmcite" "dcucite" "round" + "curly" "angle" "square" "none") + "Package options for the harvard package.") + +;; harvard.el ends here diff --git a/elpa/auctex-13.1.3/style/harvard.elc b/elpa/auctex-13.1.3/style/harvard.elc Binary files differnew file mode 100644 index 0000000..40a7c62 --- /dev/null +++ b/elpa/auctex-13.1.3/style/harvard.elc diff --git a/elpa/auctex-13.1.3/style/hologo.el b/elpa/auctex-13.1.3/style/hologo.el new file mode 100644 index 0000000..25f8105 --- /dev/null +++ b/elpa/auctex-13.1.3/style/hologo.el @@ -0,0 +1,237 @@ +;;; hologo.el --- AUCTeX style for `hologo.sty' (v1.10) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-10-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `hologo.sty' (v1.10) from 2012/04/26. +;; `hologo.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-hologo-logo-names + '("(La)TeX" + "AmSLaTeX" + "AmSTeX" + "biber" + "BibTeX" + "BibTeX8" + "ConTeXt" + "emTeX" + "eTeX" + "ExTeX" + "HanTheThanh" + "iniTeX" + "KOMAScript" + "La" + "LaTeX" + "LaTeX2e" + "LaTeX3" + "LaTeXe" + "LaTeXML" + "LaTeXTeX" + "LuaLaTeX" + "LuaTeX" + "LyX" + "METAFONT" + "MetaFun" + "METAPOST" + "MetaPost" + "MiKTeX" + "NTS" + "OzMF" + "OzMP" + "OzTeX" + "OzTtH" + "PCTeX" + "pdfTeX" + "pdfLaTeX" + "PiC" + "PiCTeX" + "plainTeX" + "SageTeX" + "SLiTeX" + "SliTeX" + "teTeX" + "TeX" + "TeX4ht" + "TTH" + "virTeX" + "VTeX" + "Xe" + "XeLaTeX" + "XeTeX") + "List of logos provided by \"hologo.sty\".") + +(defvar LaTeX-hologo-key-val-options-global + '(("break" ("true" "false")) + ("hyphenbreak" ("true" "false")) + ("spacebreak" ("true" "false")) + ("discretionarybreak" ("true" "false"))) + "Global key=value options for hologo macros.") + +(defvar LaTeX-hologo-key-val-options-local + '(("variant" ("sf" "sc" ; BibTeX + "lift" ; SliTeX + "narrow" "simple" ; SliTeX, ConTeXt + "space" "hyphen" "runtogether"))) ; plainTeX + "Local key=value options for hologo macros.") + +(defun LaTeX-hologo--arg-use-region-or-query-logo-name (optional) + (if (and (use-region-p) + (member (buffer-substring (region-beginning) (region-end)) + LaTeX-hologo-logo-names)) + (progn + (insert TeX-grop) + (goto-char (region-end)) + (insert TeX-grcl)) + (TeX-argument-insert + (completing-read "Logo name: " LaTeX-hologo-logo-names) + optional))) + +(TeX-add-style-hook + "hologo" + (lambda () + (TeX-add-symbols + + ;; Insert logo macros + '("hologo" LaTeX-hologo--arg-use-region-or-query-logo-name) + '("Hologo" LaTeX-hologo--arg-use-region-or-query-logo-name) + + ;; Setup macros + '("hologoSetup" (TeX-arg-key-val LaTeX-hologo-key-val-options-global)) + + '("hologoLogoSetup" + (TeX-arg-eval + (lambda () + (let* ((logo (completing-read "Logo name: " LaTeX-hologo-logo-names)) + (keyval (TeX-read-key-val + nil + (cond ((string= logo "BibTeX") + (append '(("variant" ("sf" "sc"))) + LaTeX-hologo-key-val-options-global)) + ((string= logo "ConTeXt") + (append '(("variant" ("narrow" "simple"))) + LaTeX-hologo-key-val-options-global)) + ((string= logo "plainTeX") + (append '(("variant" ("space" "hyphen" "runtogether"))) + LaTeX-hologo-key-val-options-global)) + ((or (string= logo "SLiTeX") + (string= logo "SliTeX")) + (append '(("variant" ("lift" "narrow" "lift"))) + LaTeX-hologo-key-val-options-global)) + (t + LaTeX-hologo-key-val-options-global))))) + (TeX-argument-insert logo nil) + (format "%s" keyval))))) + + '("hologoDriverSetup" (TeX-arg-eval completing-read + "Driver: " + '("pdftex" "luatex" + "dvipdfm" "dvipdfmx" + "dvips" "dvipsone" "xdvi" + "xetex" "vtex" "driverfallback"))) + + '("hologoFontSetup" + (TeX-arg-key-val (("general") ("bibsf") + ("rm") ("sc") ("sf") ("sy") ("logo")))) + + '("hologoLogoFontSetup" + (TeX-arg-eval + (lambda () + (let* ((logo (completing-read "Logo name: " + '("BibTeX" + "ExTeX" + "SliTeX" + "AmS" + "NTS" + "KOMAScript" + "METAFONT" + "METAPOST"))) + (keyval (TeX-read-key-val + nil + (cond ((string= logo "BibTeX") + '(("bibsf") ("sc"))) + ((string= logo "ExTeX") + '(("rm") ("sy"))) + ((string= logo "SliTeX") + '(("rm") ("sc"))) + ((or (string= logo "AmS") + (string= logo "NTS")) + '(("sy"))) + ((string= logo "KOMAScript") + '(("sf"))) + ((or (string= logo "METAFONT") + (string= logo "METAPOST")) + '(("logo"))) + (t + nil))))) + (TeX-argument-insert logo nil) + (format "%s" keyval))))) + + ;; Additional user macros + `("hologoVariant" + LaTeX-hologo--arg-use-region-or-query-logo-name + (TeX-arg-key-val (append ,LaTeX-hologo-key-val-options-local + ,LaTeX-hologo-key-val-options-global))) + + `("HologoVariant" + LaTeX-hologo--arg-use-region-or-query-logo-name + (TeX-arg-key-val (append ,LaTeX-hologo-key-val-options-local + ,LaTeX-hologo-key-val-options-global))) + + '("hologoList" 0) + + '("hologoEntry" "Logo name" "Variant" "Since")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("hologo" "{") + ("Hologo" "{")) + 'textual) + (font-latex-add-keywords '(("hologoSetup" "{") + ("hologoLogoSetup" "{{") + ("hologoDriverSetup" "{") + ("hologoFontSetup" "{") + ("hologoLogoFontSetup" "{{") + ("hologoVariant" "{{") + ("HologoVariant" "{{") + ("hologoList" "") + ("hologoEntry" "{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-hologo-package-options nil + "Package options for the hologo package.") + +;;; hologo.el ends here diff --git a/elpa/auctex-13.1.3/style/hologo.elc b/elpa/auctex-13.1.3/style/hologo.elc Binary files differnew file mode 100644 index 0000000..ccd9ec4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/hologo.elc diff --git a/elpa/auctex-13.1.3/style/hyperref.el b/elpa/auctex-13.1.3/style/hyperref.el new file mode 100644 index 0000000..81a0533 --- /dev/null +++ b/elpa/auctex-13.1.3/style/hyperref.el @@ -0,0 +1,349 @@ +;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m -*- lexical-binding: t; -*- + +;; Copyright (C) 2008, 2013-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2008-06-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the hyperref package. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(defvar LaTeX-hyperref-package-options-list + '(;; See https://www.tug.org/applications/hyperref/manual.html#x1-40003 + ;; General options + ("draft" ("true" "false")) + ("final" ("true" "false")) + ("debug" ("true" "false")) + ("verbose" ("true" "false")) + ("implicit" ("true" "false")) + ("setpagesize" ("true" "false")) + ;; Options for destination names + ("destlabel" ("true" "false")) + ("hypertexnames" ("true" "false")) + ("naturalnames" ("true" "false")) + ("plainpages" ("true" "false")) + ;; Configuration options + ("raiselinks" ("true" "false")) + ("breaklinks" ("true" "false")) + ("pageanchor" ("true" "false")) + ("nesting" ("true" "false")) + ;; Backend drivers + ("driverfallback") + ("dvipdfm") + ("dvipdfmx") + ("dvips") + ("dvipsone") + ("dviwindo") + ("hypertex") + ("latex2html") + ("nativepdf") + ("pdfmark") + ("pdftex") + ("ps2pdf") + ("tex4ht") + ("textures") + ("vtex") + ("vtexpdfmark") + ("xetex") + ;; Extension options + ("extension") + ("hyperfigures" ("true" "false")) + ("backref" ("section" "slide" "page" "none" "false")) + ("pagebackref" ("true" "false")) + ("hyperindex" ("true" "false")) + ("hyperfootnotes" ("true" "false")) + ("encap") + ("linktocpage" ("true" "false")) + ("breaklinks" ("true" "false")) + ("colorlinks" ("true" "false")) + ("linkcolor") + ("anchorcolor") + ("citecolor") + ("filecolor") + ("menucolor") + ("runcolor") + ("urlcolor") + ("allcolors") + ("frenchlinks" ("true" "false")) + ("hidelinks") + ;; PDF-specific display options + ("bookmarks" ("true" "false")) + ("bookmarksopen" ("true" "false")) + ("bookmarksopenlevel") + ("bookmarksnumbered" ("true" "false")) + ("bookmarkstype") + ("CJKbookmarks" ("true" "false")) + ("pdfhighlight" ("/I" "/N" "/O" "/P")) + ("citebordercolor") + ("filebordercolor") + ("linkbordercolor") + ("menubordercolor") + ("runbordercolor") + ("urlbordercolor") + ("allbordercolors") + ("pdfborder") + ;; PDF display and information options + ("baseurl") + ("pdfpagemode" ("UseOutlines" "UseThumbs" "FullScreen" "UseOC" "UseAttachments")) + ("pdftitle") + ("pdfauthor") + ("pdfsubject") + ("pdfcreator") + ("pdfproducer") + ("pdfkeywords") + ("pdftrapped" ("True" "False" "Unknown")) + ("pdfinfo") + ("pdfview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV")) + ("pdfstartpage") + ("pdfstartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV")) + ("pdfremotestartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV")) + ("pdfpagescrop") + ("pdfcenterwindow" ("true" "false")) + ("pdfdirection" ("L2R" "R2L")) + ("pdfdisplaydoctitle" ("true" "false")) + ("pdfduplex" ("Simplex" "DuplexFlipShortEdge" "DuplexFlipLongEdge")) + ("pdffitwindow" ("true" "false")) + ("pdflang") + ("pdfmenubar" ("true" "false")) + ("pdfnewwindow" ("true" "false")) + ("pdfnonfullscreenpagemode" ("UseNone" "UseOutlines" "UseThumbs" "FullScreen" "UseOC" "UseAttachments")) + ("pdfnumcopies") + ("pdfpagelayout" ("SinglePage" "OneColumn" "TwoColumnLeft" "TwoColumnRight" "TwoPageLeft" "TwoPageRight")) + ("pdfpagelabels" ("true" "false")) + ("pdfpagetransition" ("Blinds" "Box" "Dissolve" "Glitter" "Split" "Wipe")) + ("pdfpicktraybypdfsize" ("true" "false")) + ("pdfprintarea" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox")) + ("pdfprintclip" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox")) + ("pdfprintpagerange") + ("pdfprintscaling" ("AppDefault" "None")) + ("pdftoolbar" ("true" "false")) + ("pdfviewarea" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox")) + ("pdfviewclip" ("MediaBox" "CropBox" "BleedBox" "TrimBox" "ArtBox")) + ("pdfwindowui" ("true" "false")) + ("unicode" ("true" "false"))) + "Package options for the hyperref package.") + +(defvar LaTeX-hyperref-href-options + '(("pdfremotestartview" ("XYZ" "Fit" "FitH" "FitV" "FitR" "FitB" "FitBH" "FitBV")) + ("pdfnewwindow" ("true" "false")) + ("page") + ("ismap" ("true" "false")) + ("nextactionraw")) + "Key=value options for href macro of the hyperref package.") + +;; See https://www.tug.org/applications/hyperref/ftp/doc/manual.html#x1-220006.2 + +(defvar LaTeX-hyperref-forms-options + '(("accesskey") + ("align" ("0" "1" "2")) + ("altname") + ("backgroundcolor") + ("bordercolor") + ("bordersep") + ("borderwidth") + ;; "borderstyle" is not mentioned in the original hyperref-doc, it + ;; can be seen in action in + ;; https://github.com/latex3/hyperref/blob/main/test/testform.tex + ;; S=Solid (default), D=Dashed, B=Beveled, I=Inset, U=Underline + ("borderstyle" ("S" "D" "B" "I" "U")) + ("calculate") + ("charsize") + ("checkboxsymbol" ("true" "false")) + ("checked") + ("color") + ("combo" ("true" "false")) + ("default") + ("disabled" ("true" "false")) + ("format") + ("height") + ("hidden" ("true" "false")) + ("keystroke") + ("mappingname") + ("maxlen") + ("menulength") + ("multiline" ("true" "false")) + ("name") + ("onblur") + ("onchange") + ("onclick") + ("ondblclick") + ("onfocus") + ("onkeydown") + ("onkeypress") + ("onkeyup") + ("onmousedown") + ("onmousemove") + ("onmouseout") + ("onmouseover") + ("onmouseup") + ("onselect") + ("password" ("true" "false")) + ("popdown" ("true" "false")) + ("radio" ("true" "false")) + ("radiosymbol") + ("readonly" ("true" "false")) + ("rotation") + ("tabkey") + ("validate") + ("value") + ("width")) + "Key=value options for Forms related macros of the hyperref package.") + +(TeX-add-style-hook + "hyperref" + (lambda () + ;; hyperref loads nameref and url (+ some other packages which do not have + ;; style hooks) + (TeX-run-style-hooks "url" "nameref") + + (TeX-add-symbols + '("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options-list)) + '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text") + ;; Completion for \url is provided via url.el. Hence the entry in + ;; this style is commented: + ;; '("url" "URL" ignore) + '("nolinkurl" t) + '("hyperbaseurl" t) + '("hyperimage" "Image URL" "Text") + '("hyperdef" "Category" "Name" "Text") + '("hyperref" "URL" "Category" "Name" "Text") + '("hyperlink" "Name" "Text") + '("hypertarget" "Name" "Text") + '("phantomsection" 0) + '("autoref" TeX-arg-ref) + '("autoref*" TeX-arg-ref) + '("ref*" TeX-arg-ref) + '("pageref*" TeX-arg-ref) + '("autopageref" TeX-arg-ref) + '("autopageref*" TeX-arg-ref) + '("pdfstringdef" "Macro name" "TeX string") + '("pdfbookmark" [ "Level" ] "Text" "name") + '("currentpdfbookmark" "Text" "Name") + '("subpdfbookmark" "Text" "Name") + '("belowpdfbookmark" "Text" "Name") + '("texorpdfstring" "TeX string" "PDF string") + '("hypercalcbp" t) + '("Acrobatmenu" "Menu option" "Text") + ;; The next 6 macros take Key-vals defined in + ;; "LaTeX-hyperref-forms-options". For an example, see + ;; https://github.com/latex3/hyperref/blob/main/test/testform.tex + '("TextField" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label") + '("CheckBox" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label") + '("ChoiceMenu" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label" "Choices") + '("PushButton" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label") + '("Submit" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label") + '("Reset" [ (TeX-arg-key-val LaTeX-hyperref-forms-options) ] "Label") + '("LayoutTextField" "Label" "Field") + '("LayoutChoiceField" "Label" "Field") + '("LayoutCheckField" "Label" "Field") + '("MakeRadioField" "Width" "Height") + '("MakeCheckField" "Width" "Height") + '("MakeTextField" "Width" "Height") + '("MakeChoiceField" "Width" "Height") + '("MakeButtonField" "Text")) + + ;; Form fields must be inside a "Form"-env, one per file is allowed, cf. + ;; https://www.tug.org/applications/hyperref/ftp/doc/manual.html#x1-200006 + ;; It is up to user to insert [<options>] after \begin{Form} + (LaTeX-add-environments + '("Form")) + + ;; Do not indent the content of the "Form"-env; it is odd if the + ;; whole document is indented. Append it to a local version of + ;; `LaTeX-document-regexp': + (unless (string-match-p "Form" LaTeX-document-regexp) + (set (make-local-variable 'LaTeX-document-regexp) + (concat LaTeX-document-regexp "\\|" "Form"))) + + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") + + ;; In hyperref package, \url macro is redefined and \url|...| can't be used, + ;; while it's possible when only url package (required by hyperref) is loaded + (setq LaTeX-verbatim-macros-with-delims-local + (remove "url" LaTeX-verbatim-macros-with-delims-local)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("href" "[{{") + ("nolinkurl" "{") + ("hyperbaseurl" "{") + ("hyperimage" "{{") + ("hyperdef" "{{{") + ("hyperref" "{{{{") + ("hyperlink" "{{") + ("hypertarget" "{{") + ("autoref" "*{") + ("ref" "*{") + ("pageref" "*{") + ("autopageref" "*{")) + 'reference) + (font-latex-add-keywords '(("hypersetup" "{")) + 'function) + ;; For syntactic fontification, e.g. verbatim constructs. + (font-latex-set-syntactic-keywords)) + + ;; Option management + (if (and (LaTeX-provided-package-options-member "hyperref" "dvipdfmx") + (not (eq TeX-engine 'xetex))) + (setq TeX-PDF-from-DVI "Dvipdfmx")) + + ;; Loop over the possible options and load backref.el: + (let ((opts '("backref" + "backref=section" + "backref=slide" + "backref=page" + "pagebackref" + "pagebackref=true"))) + (dolist (opt opts) + (when (LaTeX-provided-package-options-member "hyperref" opt) + (TeX-run-style-hooks "backref")))) + + ;; Activate RefTeX reference style. + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Hyperref"))) + TeX-dialect) + +(defun LaTeX-hyperref-package-options () + "Read the hyperref package options from the user." + (TeX-read-key-val t LaTeX-hyperref-package-options-list)) + +;;; hyperref.el ends here diff --git a/elpa/auctex-13.1.3/style/hyperref.elc b/elpa/auctex-13.1.3/style/hyperref.elc Binary files differnew file mode 100644 index 0000000..fef205a --- /dev/null +++ b/elpa/auctex-13.1.3/style/hyperref.elc diff --git a/elpa/auctex-13.1.3/style/icelandic.el b/elpa/auctex-13.1.3/style/icelandic.el new file mode 100644 index 0000000..b3cf1e4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/icelandic.el @@ -0,0 +1,62 @@ +;;; icelandic.el --- AUCTeX style for the `icelandic' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-03-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Icelandic text in connection with the +;; `icelandic' babel option. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(defvar LaTeX-icelandic-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `icelandic.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-icelandic-mode-syntax-table) + +(TeX-add-style-hook + "icelandic" + (lambda () + (set-syntax-table LaTeX-icelandic-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("icelandic" "\"`" "\"'" ,TeX-quote-after-quote))) + (setq LaTeX-babel-hyphen-language "icelandic") + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-is-hook)) + TeX-dialect) + +;;; icelandic.el ends here diff --git a/elpa/auctex-13.1.3/style/icelandic.elc b/elpa/auctex-13.1.3/style/icelandic.elc Binary files differnew file mode 100644 index 0000000..af1717c --- /dev/null +++ b/elpa/auctex-13.1.3/style/icelandic.elc diff --git a/elpa/auctex-13.1.3/style/ifluatex.el b/elpa/auctex-13.1.3/style/ifluatex.el new file mode 100644 index 0000000..86a7638 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ifluatex.el @@ -0,0 +1,72 @@ +;;; ifluatex.el --- AUCTeX style for `ifluatex.sty' version 1.3. -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Davide G. M. Salvetti <salve@debian.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-15 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by the +;; Free Software Foundation; either version 3, or (at your option) any +;; later version. + +;; AUCTeX is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, see +;; <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This file adds support for `ifluatex.sty' 1.3. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-ifluatex-set-TeX-exit-mark (_optional) + "Discard OPTIONAL and set `TeX-exit-mark' to current point." + (set-marker TeX-exit-mark (point))) + +(TeX-add-style-hook + "ifluatex" + (lambda () + (TeX-add-symbols + '("ifluatex" + (TeX-arg-literal "%\n") + LaTeX-ifluatex-set-TeX-exit-mark + (TeX-arg-literal "\n\\else%\n\\fi%")) + '("luatexversion" 0) + '("luatexrevision" 0)) + (TeX-declare-expert-macros + "ifluatex" + "ifluatex" "luatexversion" "luatexrevision") + + ;; This package is used to make it possible to compile a document with both + ;; LuaTeX and base TeX engines. By setting `TeX-check-engine-list' to nil + ;; we ignore engine restrictions posed by other packages. + (setq TeX-check-engine-list nil) + + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("luatexversion") + ("luatexrevision")) + 'function))) + TeX-dialect) + +(defvar LaTeX-ifluatex-package-options nil + "Package options for the ifluatex package.") + +;;; ifluatex.el ends here diff --git a/elpa/auctex-13.1.3/style/ifluatex.elc b/elpa/auctex-13.1.3/style/ifluatex.elc Binary files differnew file mode 100644 index 0000000..37f0152 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ifluatex.elc diff --git a/elpa/auctex-13.1.3/style/ifthen.el b/elpa/auctex-13.1.3/style/ifthen.el new file mode 100644 index 0000000..2f42602 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ifthen.el @@ -0,0 +1,82 @@ +;;; ifthen.el --- AUCTeX style for `ifthen.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2022-03-16 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ifthen.sty' v1.1c, dated 2020/11/24. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-arg-ifthen-test (optional &optional prompt) + "Query and insert skeleton for a test in ifthen macros." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Test") + '("<" "=" ">" + "\\isodd{}" + "\\isundefined{}" + "\\equal{}{}" + "\\lengthtest{<}" + "\\lengthtest{=}" + "\\lengthtest{>}" + "\\boolean{}")) + optional)) + +(TeX-add-style-hook + "ifthen" + (lambda () + (TeX-add-symbols + '("ifthenelse" LaTeX-arg-ifthen-test t nil) + '("whiledo" LaTeX-arg-ifthen-test t) + "AND" + "OR" + "NOT" + '("newboolean" "Name") + '("provideboolean" "Name") + '("setboolean" "Name" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Value") + '("true" "false")))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Only fontify macros which will be used top-level: + (font-latex-add-keywords '(("newboolean" "{") + ("provideboolean" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-ifthen-package-options nil + "Package options for the ifthen package.") + +;;; ifthen.el ends here diff --git a/elpa/auctex-13.1.3/style/ifthen.elc b/elpa/auctex-13.1.3/style/ifthen.elc Binary files differnew file mode 100644 index 0000000..cd588b6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ifthen.elc diff --git a/elpa/auctex-13.1.3/style/imakeidx.el b/elpa/auctex-13.1.3/style/imakeidx.el new file mode 100644 index 0000000..325631e --- /dev/null +++ b/elpa/auctex-13.1.3/style/imakeidx.el @@ -0,0 +1,103 @@ +;;; imakeidx.el --- AUCTeX style for `imakeidx.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2012-2013, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `imakeidx.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-imakeidx-makeindex-options + '(("name") + ("title") + ("program" ("makeindex" "xindy" "texindy" "truexindy")) + ("options") + ("noautomatic" ("true" "false")) + ("intoc" ("true" "false")) + ("columns") + ("columnsep") + ("columnseprule" ("true" "false"))) + "Key=value options for makeindex macro of the imakeidx package.") + +(defvar LaTeX-imakeidx-indexsetup-options + '(("level") + ("toclevel") + ("noclearpage" ("true" "false")) + ("othercode")) + "Key=value options for indexsetup macro of the imakeidx package.") +(make-variable-buffer-local 'LaTeX-imakeidx-indexsetup-options) + +(TeX-add-style-hook + "imakeidx" + (lambda () + ;; `firstpagestyle' and `headers' options for `indexsetup' macro are + ;; available only if `fancyhdr' is not loaded. The following code works only + ;; if `imakeidx' is loaded after `fancyhdr'. + (unless (member "fancyhdr" TeX-active-styles) + (setq LaTeX-imakeidx-indexsetup-options + (append LaTeX-imakeidx-indexsetup-options + `(("firstpagestyle" ,(LaTeX-pagestyle-list))) + '(("headers"))))) + + (TeX-add-symbols + '("makeindex" [ (TeX-arg-key-val LaTeX-imakeidx-makeindex-options) ]) + '("indexsetup" (TeX-arg-key-val LaTeX-imakeidx-indexsetup-options)) + '("splitindexoptions" "Command line option") + '("index" [ "Index name" ] TeX-arg-index) + '("indexprologue" [ "Spacing" ] "Text") + '("printindex" [ "Index name" ]) + '("seealso" 2) + '("see" 2) + "seename" + "alsoname" + "indexname") + + (TeX-run-style-hooks + "multicol" + "xpatch" + "pdftexcmds" + "ifluatex" + "ifxetex" + "xkeyval") + + ;; Completion for the |see macro and RefTeX support taken from + ;; `makeidx.el' + (setq TeX-complete-list + (append + '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)) + TeX-complete-list)) + (and (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros '(default)))) + TeX-dialect) + +(defvar LaTeX-imakeidx-package-options + '("makeindex" "xindy" "texindy" "truexindy" "noautomatic" "nonewpage" "quiet" + "original" "splitindex") + "Package options for the imakeidx package.") + +;; imakeidx.el ends here diff --git a/elpa/auctex-13.1.3/style/imakeidx.elc b/elpa/auctex-13.1.3/style/imakeidx.elc Binary files differnew file mode 100644 index 0000000..d935361 --- /dev/null +++ b/elpa/auctex-13.1.3/style/imakeidx.elc diff --git a/elpa/auctex-13.1.3/style/index.el b/elpa/auctex-13.1.3/style/index.el new file mode 100644 index 0000000..0d83566 --- /dev/null +++ b/elpa/auctex-13.1.3/style/index.el @@ -0,0 +1,87 @@ +;;; index.el --- AUCTeX support for indices with index.sty. -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "index" + (lambda () + + (TeX-add-symbols + ;; New indices + '("newindex" [ "Counter" ] "Tag" + "Extension of raw index" "Extension of processed index" "Index title") + '("renewindex" [ "Counter" ] "Tag" + "Extension of raw index" "Extension of processed index" "Index title") + "makeindex" + '("disableindex" "Tag[,tag...]") + + ;; Printing the index + '("printindex" [ "Indextag" ] [ "Prologue" ]) + "indexspace" + + ;; Index entries + '("index" [ TeX-arg-index-tag ] TeX-arg-index) + '("index*" [ TeX-arg-index-tag ] TeX-arg-index) + + ;; Showidx-like stuff + "proofmodetrue" "proofmodefalse" '("indexproofstyle" "Style") + + ;; Shortcuts (THESE ARE DEPRECATED AND SHOULD NOT BE USED + "shortindexingon" "shortindexinoff") + + ;; Parsing index macros + (setq LaTeX-auto-regexp-list + (append + + ;; The first regexp is faster, but less accurate + ;;'(("\\\\index\\*?\\[[^{}]*\\]{\\([^}]*\\)" + ;; 1 LaTeX-auto-index-entry)) + + ;; The second regexp is very good, but slower. + '(("\\\\index\\*?\\[[^{}]*\\]{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}" + 1 LaTeX-auto-index-entry)) + + LaTeX-auto-regexp-list)) + + ;; Completion for the index entries in \index and |see commands + (setq TeX-complete-list + (append + '(("\\\\index\\*?\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)" + 2 LaTeX-index-entry-list) + ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list)) + TeX-complete-list)) + + ;; RefTeX support + (and (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros '(index)))) + TeX-dialect) + +(defvar LaTeX-index-package-options nil + "Package options for the index package.") + +;;; index.el ends here diff --git a/elpa/auctex-13.1.3/style/index.elc b/elpa/auctex-13.1.3/style/index.elc Binary files differnew file mode 100644 index 0000000..14daa81 --- /dev/null +++ b/elpa/auctex-13.1.3/style/index.elc diff --git a/elpa/auctex-13.1.3/style/inputenc.el b/elpa/auctex-13.1.3/style/inputenc.el new file mode 100644 index 0000000..14ff61c --- /dev/null +++ b/elpa/auctex-13.1.3/style/inputenc.el @@ -0,0 +1,89 @@ +;;; inputenc.el --- AUCTeX style for `inputenc.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2021 Free Software Foundation, Inc. + +;; Author: Arne Jørgensen <arne@arnested.dk> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `inputenc.sty'. + +;;; Code: + +(require 'tex) + +(defun LaTeX-inputenc-package-options nil + "Prompt for package options for the inputenc package." + ;; separate the condition in three to silence the byte compiler + (if (boundp 'latex-inputenc-coding-alist) + (when (fboundp 'latexenc-coding-system-to-inputenc) + (when (fboundp 'latexenc-inputenc-to-coding-system) + (let ((default (latexenc-coding-system-to-inputenc + (or coding-system-for-write + buffer-file-coding-system))) + (selected 'undecided)) + (setq selected (completing-read + (if default + (format "Input encoding (default %s): " default) + "Input encoding: ") + (mapcar #'car latex-inputenc-coding-alist) + nil + nil + nil + nil + default)) + + ;; if necessary offer to set the coding system for saving + ;; this buffer based on the selected input encoding + (when (and (null + (coding-system-equal + (coding-system-base + (or coding-system-for-write + buffer-file-coding-system)) + (coding-system-base + (latexenc-inputenc-to-coding-system selected)))) + (y-or-n-p "Set coding system for saving this buffer? ") + (set-buffer-file-coding-system + (coding-system-base + (latexenc-inputenc-to-coding-system selected))) + (message nil))) + + ;; return selected input encoding + selected))) + (TeX-read-string "Input encoding: "))) + +(defun LaTeX-arg-inputenc-inputenc (_optional) + "Prompt for input encoding." + (TeX-argument-insert (LaTeX-inputenc-package-options) nil)) + +(TeX-add-style-hook + "inputenc" + (lambda () + ;; New symbols + (TeX-add-symbols + '("inputencoding" LaTeX-arg-inputenc-inputenc))) + TeX-dialect) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; inputenc.el ends here diff --git a/elpa/auctex-13.1.3/style/inputenc.elc b/elpa/auctex-13.1.3/style/inputenc.elc Binary files differnew file mode 100644 index 0000000..a16f237 --- /dev/null +++ b/elpa/auctex-13.1.3/style/inputenc.elc diff --git a/elpa/auctex-13.1.3/style/italian.el b/elpa/auctex-13.1.3/style/italian.el new file mode 100644 index 0000000..16db718 --- /dev/null +++ b/elpa/auctex-13.1.3/style/italian.el @@ -0,0 +1,56 @@ +;;; italian.el --- Setup AUCTeX for editing Italian text. -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2018, 2020, 2022 Free Software Foundation, Inc. + +;; Author: Davide G. M. Salvetti <salve@debian.org> +;; Maintainer: Davide G. M. Salvetti <salve@debian.org> +;; Created: 2004-05-12 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: +;; +;; I believe that the Italian correct quoting is achieved with `\"<' and +;; `\">'. However, I will be glad to see a normative reference. -- DGMS + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(defvar TeX-language-it-hook nil + "Hook run for Italian texts.") + +(TeX-add-style-hook + "italian" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("italian" "\"<" "\">" ,TeX-quote-after-quote))) + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-it-hook)) + TeX-dialect) + +;;; italian.el ends here diff --git a/elpa/auctex-13.1.3/style/italian.elc b/elpa/auctex-13.1.3/style/italian.elc Binary files differnew file mode 100644 index 0000000..e9b40cf --- /dev/null +++ b/elpa/auctex-13.1.3/style/italian.elc diff --git a/elpa/auctex-13.1.3/style/j-article.el b/elpa/auctex-13.1.3/style/j-article.el new file mode 100644 index 0000000..44571f3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-article.el @@ -0,0 +1,14 @@ +;;; j-article.el - Special code for j-article style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "j-article" + (lambda () + (LaTeX-largest-level-set "section")) + TeX-dialect) + +;;; j-article.el ends here diff --git a/elpa/auctex-13.1.3/style/j-article.elc b/elpa/auctex-13.1.3/style/j-article.elc Binary files differnew file mode 100644 index 0000000..f7c52f8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-article.elc diff --git a/elpa/auctex-13.1.3/style/j-book.el b/elpa/auctex-13.1.3/style/j-book.el new file mode 100644 index 0000000..1aeda40 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-book.el @@ -0,0 +1,14 @@ +;;; j-book.el - Special code for j-book style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "j-book" + (lambda () + (LaTeX-largest-level-set "part")) + TeX-dialect) + +;;; j-book.el ends here diff --git a/elpa/auctex-13.1.3/style/j-book.elc b/elpa/auctex-13.1.3/style/j-book.elc Binary files differnew file mode 100644 index 0000000..331bd65 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-book.elc diff --git a/elpa/auctex-13.1.3/style/j-report.el b/elpa/auctex-13.1.3/style/j-report.el new file mode 100644 index 0000000..969b4f7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-report.el @@ -0,0 +1,14 @@ +;;; j-report.el - Special code for j-report style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "j-report" + (lambda () + (LaTeX-largest-level-set "chapter")) + TeX-dialect) + +;;; j-report.el ends here diff --git a/elpa/auctex-13.1.3/style/j-report.elc b/elpa/auctex-13.1.3/style/j-report.elc Binary files differnew file mode 100644 index 0000000..4fc6c96 --- /dev/null +++ b/elpa/auctex-13.1.3/style/j-report.elc diff --git a/elpa/auctex-13.1.3/style/jarticle.el b/elpa/auctex-13.1.3/style/jarticle.el new file mode 100644 index 0000000..d293ff0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jarticle.el @@ -0,0 +1,26 @@ +;;; jarticle.el - Special code for jarticle class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jarticle-class-options + '("a4paper" "a5paper" "b4paper" "b5paper" "a4j" "a5j" "b4j" "b5j" + "a4p" "b4p" "b5p" "10pt" "11pt" "12pt" "landscape" "tombow" "tombo" + "mentuke" "oneside" "twoside" "onecolumn" "twocolumn" + "titlepage" "notitlepage" "leqno" "fleqn" + "openbib" "disablejfam" "mathrmmc" "draft" "final") + "Class options for the jarticle class.") + +(TeX-add-style-hook + "jarticle" + (lambda () + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "part" "section" "subsection" "subsubsection" "paragraph" + "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; jarticle.el ends here diff --git a/elpa/auctex-13.1.3/style/jarticle.elc b/elpa/auctex-13.1.3/style/jarticle.elc Binary files differnew file mode 100644 index 0000000..02a45c5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jarticle.elc diff --git a/elpa/auctex-13.1.3/style/jbook.el b/elpa/auctex-13.1.3/style/jbook.el new file mode 100644 index 0000000..b1e7daa --- /dev/null +++ b/elpa/auctex-13.1.3/style/jbook.el @@ -0,0 +1,25 @@ +;;; jbook.el - Special code for jbook class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jbook-class-options + '("a4paper" "a5paper" "b4paper" "b5paper" "a4j" "a5j" "b4j" "b5j" + "a4p" "b4p" "b5p" "10pt" "11pt" "12pt" "landscape" "tombow" "tombo" + "mentuke" "oneside" "twoside" "onecolumn" "twocolumn" + "titlepage" "notitlepage" "openright" "openany" "leqno" "fleqn" + "openbib" "disablejfam" "mathrmmc" "draft" "final") + "Class options for the jbook class.") + +(TeX-add-style-hook + "jbook" + (lambda () + (LaTeX-largest-level-set "part") + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings")) + TeX-dialect) + +;;; jbook.el ends here diff --git a/elpa/auctex-13.1.3/style/jbook.elc b/elpa/auctex-13.1.3/style/jbook.elc Binary files differnew file mode 100644 index 0000000..81a7927 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jbook.elc diff --git a/elpa/auctex-13.1.3/style/jreport.el b/elpa/auctex-13.1.3/style/jreport.el new file mode 100644 index 0000000..613f3ff --- /dev/null +++ b/elpa/auctex-13.1.3/style/jreport.el @@ -0,0 +1,26 @@ +;;; jreport.el - Special code for jreport class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jreport-class-options + '("a4paper" "a5paper" "b4paper" "b5paper" "a4j" "a5j" "b4j" "b5j" + "a4p" "b4p" "b5p" "10pt" "11pt" "12pt" "landscape" "tombow" "tombo" + "mentuke" "oneside" "twoside" "onecolumn" "twocolumn" + "titlepage" "notitlepage" "openright" "openany" "leqno" "fleqn" + "openbib" "disablejfam" "mathrmmc" "draft" "final") + "Class options for the jreport class.") + +(TeX-add-style-hook + "jreport" + (lambda () + (LaTeX-largest-level-set "chapter") + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; jreport.el ends here diff --git a/elpa/auctex-13.1.3/style/jreport.elc b/elpa/auctex-13.1.3/style/jreport.elc Binary files differnew file mode 100644 index 0000000..20ae161 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jreport.elc diff --git a/elpa/auctex-13.1.3/style/jsarticle.el b/elpa/auctex-13.1.3/style/jsarticle.el new file mode 100644 index 0000000..519aa7e --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsarticle.el @@ -0,0 +1,30 @@ +;;; jsarticle.el - Special code for jsarticle class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jsarticle-class-options + '("a3paper" "a4paper" "a5paper" "a6paper" "b4paper" "b5paper" "b6paper" + "a4j" "a5j" "b4j" "b5j" "a4var" "b5var" "letterpaper" "legalpaper" + "executivepaper" "landscape" "slide" + "8pt" "9pt" "10pt" "11pt" "12pt" "14pt" "17pt" "20pt" "21pt" "25pt" + "30pt" "36pt" "43pt" "12Q" "14Q" "usemag" "nomag" "nomag*" + "tombow" "tombo" "mentuke" "oneside" "twoside" "vartwoside" + "onecolumn" "twocolumn" "titlepage" "notitlepage" "leqno" "fleqn" + "disablejfam" "draft" "final" "mingoth" "wingoth" "jis" + "uplatex" "autodetect-engine" "papersize" "english" "jslogo" "nojslogo") + "Class options for the jsarticle class.") + +(TeX-add-style-hook + "jsarticle" + (lambda () + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "part" "section" "subsection" "subsubsection" "paragraph" + "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; jsarticle.el ends here diff --git a/elpa/auctex-13.1.3/style/jsarticle.elc b/elpa/auctex-13.1.3/style/jsarticle.elc Binary files differnew file mode 100644 index 0000000..8663f8c --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsarticle.elc diff --git a/elpa/auctex-13.1.3/style/jsbook.el b/elpa/auctex-13.1.3/style/jsbook.el new file mode 100644 index 0000000..161e81d --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsbook.el @@ -0,0 +1,34 @@ +;;; jsbook.el - Special code for jsbook class. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jsbook-class-options + '("a3paper" "a4paper" "a5paper" "a6paper" "b4paper" "b5paper" "b6paper" + "a4j" "a5j" "b4j" "b5j" "a4var" "b5var" "letterpaper" "legalpaper" + "executivepaper" "landscape" "report" + "8pt" "9pt" "10pt" "11pt" "12pt" "14pt" "17pt" "20pt" "21pt" "25pt" + "30pt" "36pt" "43pt" "12Q" "14Q" "usemag" "nomag" "nomag*" + "tombow" "tombo" "mentuke" "oneside" "twoside" "vartwoside" + "onecolumn" "twocolumn" "titlepage" "notitlepage" + "openright" "openleft" "openany" "leqno" "fleqn" + "disablejfam" "draft" "final" "mingoth" "wingoth" "jis" + "uplatex" "autodetect-engine" "papersize" "english" "jslogo" "nojslogo") + "Class options for the jsbook class.") + +(TeX-add-style-hook + "jsbook" + (lambda () + (if (LaTeX-provided-class-options-member "jsbook" "report") + (progn + (LaTeX-largest-level-set "chapter") + (LaTeX-add-environments "abstract")) + (LaTeX-largest-level-set "part")) + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings")) + TeX-dialect) + +;;; jsbook.el ends here diff --git a/elpa/auctex-13.1.3/style/jsbook.elc b/elpa/auctex-13.1.3/style/jsbook.elc Binary files differnew file mode 100644 index 0000000..b08ba01 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsbook.elc diff --git a/elpa/auctex-13.1.3/style/jsreport.el b/elpa/auctex-13.1.3/style/jsreport.el new file mode 100644 index 0000000..1a71f1b --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsreport.el @@ -0,0 +1,59 @@ +;;; jsreport.el - Special code for jsreport class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Ikumi Keita <ikumi@ikumi.que.jp> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-03-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Please write me. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-jsreport-class-options + '("a3paper" "a4paper" "a5paper" "a6paper" "b4paper" "b5paper" "b6paper" + "a4j" "a5j" "b4j" "b5j" "a4var" "b5var" "letterpaper" "legalpaper" + "executivepaper" "landscape" + "8pt" "9pt" "10pt" "11pt" "12pt" "14pt" "17pt" "20pt" "21pt" "25pt" + "30pt" "36pt" "43pt" "12Q" "14Q" "usemag" "nomag" "nomag*" + "tombow" "tombo" "mentuke" "oneside" "twoside" "vartwoside" + "onecolumn" "twocolumn" "titlepage" "notitlepage" + "openright" "openleft" "openany" "leqno" "fleqn" + "disablejfam" "draft" "final" "mingoth" "wingoth" "jis" + "uplatex" "autodetect-engine" "papersize" "english" "jslogo" "nojslogo") + "Class options for the jsreport class.") + +(TeX-add-style-hook + "jsreport" + (lambda () + (LaTeX-largest-level-set "chapter") + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; jsreport.el ends here diff --git a/elpa/auctex-13.1.3/style/jsreport.elc b/elpa/auctex-13.1.3/style/jsreport.elc Binary files differnew file mode 100644 index 0000000..30087bb --- /dev/null +++ b/elpa/auctex-13.1.3/style/jsreport.elc diff --git a/elpa/auctex-13.1.3/style/jura.el b/elpa/auctex-13.1.3/style/jura.el new file mode 100644 index 0000000..920db7f --- /dev/null +++ b/elpa/auctex-13.1.3/style/jura.el @@ -0,0 +1,42 @@ +;;; jura.el --- AUCTeX style for `jura.cls' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2020 Free Software Foundation, Inc. + +;; Author: Frank Küster <frank@kuesterei.ch> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `jura.cls'. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "jura" + (lambda () + (TeX-run-style-hooks "alphanum")) + TeX-dialect) + +;; Local Variables: +;; coding: utf-8 +;; End: diff --git a/elpa/auctex-13.1.3/style/jura.elc b/elpa/auctex-13.1.3/style/jura.elc Binary files differnew file mode 100644 index 0000000..25a50f0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/jura.elc diff --git a/elpa/auctex-13.1.3/style/jurabib.el b/elpa/auctex-13.1.3/style/jurabib.el new file mode 100644 index 0000000..68c02fc --- /dev/null +++ b/elpa/auctex-13.1.3/style/jurabib.el @@ -0,0 +1,644 @@ +;;; jurabib.el --- AUCTeX style for the `jurabib' package -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-10-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the `jurabib' package. + +;; Currently only the citation-related commands are supported. Feel +;; free to complete the support and send the result to the AUCTeX +;; mailing list. But be aware that the code can only be included if +;; you assign the copyright to the FSF. + +;;; Code: + +(require 'tex) +(require 'tex-style) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar reftex-cite-format-builtin) + +(TeX-add-style-hook + "jurabib" + (lambda () + ;; Taken from natbib.el and adapted. + (let ((citecmds + '(("cite" . 2) ("cite*" . 2) + ("citetitle" . 2) ("fullcite" . 2) + ("citet" . 1) ("citealt" . 1) + ("citep" . 2) ("citealp" . 2) + ("citeauthor" . 2) ("citeyear" . 2) + ("footcite" . 2) ("footcite*" . 2) + ("footcitetitle" . 2) ("footfullcite" . 2) + ("footcitet" . 1) ("footcitealt" . 1) + ("footcitep" . 2) ("footcitealp" . 2) + ("footciteauthor" . 2) ("footciteyear" . 2)))) + ;; Add these symbols + (apply + #'TeX-add-symbols + (mapcar + (lambda (cmd) + (cond + ((= (cdr cmd) 0) + ;; No optional arguments + (list (car cmd) #'TeX-arg-cite)) + ((= (cdr cmd) 1) + ;; Just one optional argument, the post note + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil) + #'TeX-arg-cite)) + ((= (cdr cmd) 2) + ;; Pre and post notes + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p (natbib-note-args) nil) + #'TeX-arg-cite)))) + citecmds)) + ;; Special cases + (TeX-add-symbols + ;; FIXME: Completing read for field. + '("citefield" ; \citefield[]{}{} + (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil) + "Field" TeX-arg-cite) + '("footcitefield" ; \footcitefield[]{}{} + (TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil) + "Field" TeX-arg-cite)) + + ;; Make an entry in TeX-complete-list + (add-to-list + 'TeX-complete-list + (list + (concat "\\\\\\(" + (mapconcat (lambda (x) (regexp-quote (car x))) + (append citecmds + '(("citefield") ("footcitefield"))) "\\|") + "\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*" + "\\([^{}\n\r\\%,]*\\)") + 4 'LaTeX-bibitem-list "}")) + + ;; Add further symbols + (TeX-add-symbols + '("citefullfirstfortype" 1) + '("citenotitlefortype" 1) + '("citeswithoutentry" 1) + '("citetitlefortype" 1) + '("citeworkwithtitle" 1) + '("nextcitefull" 1) + '("nextcitenotitle" 1) + '("nextcitereset" 1) + '("nextciteshort" 1) + '("jurabibsetup" 1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cite" "*[[{") + ("citetitle" "[[{") + ("fullcite" "[[{") + ("citet" "[{") + ("citealt" "[{") + ("citep" "[[{") + ("citealp" "[[{") + ("citeauthor" "[[{") + ("citeyear" "[[{") + ("footcite" "[[{") + ("footcite*" "[[{") + ("footcitetitle" "[[{") + ("footfullcite" "[[{") + ("footcitet" "[{") + ("footcitealt" "[{") + ("footcitep" "[[{") + ("footcitealp" "[[{") + ("footciteauthor" "[[{") + ("footciteyear" "[[{") + ("citefield" "[{{") + ("footcitefield" "[{{")) + 'reference) + (font-latex-add-keywords '(("citeswithoutentry" "{") + ("nextcitefull" "{") + ("nextcitenotitle" "{") + ("nextcitereset" "{") + ("nextciteshort" "{")) + 'function) + (font-latex-add-keywords '(("citenotitlefortype" "{") + ("citetitlefortype" "{") + ("jurabibsetup" "{")) + 'variable)) + + ;; Tell RefTeX (Thanks, Carsten) + (when (and LaTeX-reftex-cite-format-auto-activate + (fboundp 'reftex-set-cite-format)) + ;; Check if RefTeX supports jurabib. + (if (assoc 'jurabib reftex-cite-format-builtin) + ;; Yes, use the provided default. + (reftex-set-cite-format 'jurabib) + ;; No, set it by hand. + (reftex-set-cite-format + '((?\C-m . "\\cite{%l}") + (?c . "\\cite[?][]{%l}") + (?t . "\\citet{%l}") + (?p . "\\citep{%l}") + (?e . "\\citep[e.g.][?]{%l}") + (?s . "\\citep[see][?]{%l}") + (?u . "\\fullcite{%l}") + (?i . "\\citetitle{%l}") + (?a . "\\citeauthor{%l}") + (?e . "\\citefield{?}{%l}") + (?y . "\\citeyear{%l}") + (?f . "\\footcite{%l}") + (?F . "\\footcite[?][]{%l}") + (?l . "\\footfullcite{%l}")))))) + + ;; FIXME: The following list is the edited output of + ;; `TeX-auto-generate' which probably includes internal macros of + ;; jurabib. Unfortunately the macros which should be accessible to + ;; the user are not fully documented at the time of this writing. + ;; But instead of including only the limited part which is + ;; documented we rather give the user a bit too much. The list + ;; should be reduced when there is proper documentation, though. + (TeX-add-symbols + '("Wrapquotes" 1) + '("apyformat" 1) + '("artnumberformat" 1) + '("artvolnumformat" 2) + '("artvolumeformat" 1) + '("artyearformat" 1) + '("bibAnnote" 1) + '("bibAnnoteFile" 1) + '("bibAnnotePath" 1) + '("bibEIMfont" 1) + '("bibIMfont" 1) + '("bibYear" 1) + '("bibedformat" 1) + '("bibedinformat" 1) + '("bibenf" 5) + '("biblenf" 5) + '("bibnf" 5) + '("bibnumberformat" 1) + '("bibrenf" 5) + '("bibrlenf" 5) + '("bibrnf" 5) + '("biburlfont" 1) + '("edfont" 1) + '("formatarticlepages" ["argument"] 2) + '("fsted" 1) + '("fullnameoxfordcrossref" 1) + '("incolledformat" 5) + '("jbArchPages" 1) + '("jbPages" 1) + '("jbannoteformat" 1) + '("jbapifont" 1) + '("jbarchnameformat" 1) + '("jbarchsig" 2) + '("jbartPages" 1) + '("jbartcrossrefchecked" ["argument"] 1) + '("jbauthorindexfont" 1) + '("jbbibargs" 5) + '("jbbibyearformat" 1) + '("jbcitationoyearformat" 1) + '("jbcitationyearformat" 1) + '("jbcrossrefchecked" ["argument"] 1) + '("jbedafti" 1) + '("jbedbyincollcrossreflong" 1) + '("jbedbyincollcrossrefshort" 1) + '("jbedbyincollcrossrefshortnoapy" 1) + '("jbedbyincollcrossrefshortwithapy" 1) + '("jbedition" 1) + '("jbeditorindexfont" 1) + '("jbendnote" 1) + '("jbflanguage" 1) + '("jbincollcrossref" 2) + '("jbisbn" 1) + '("jbissn" 1) + '("jbnote" 2) + '("jborganizationindexfont" 1) + '("jbpagesformat" 1) + '("jbprformat" 1) + '("jbrealcitation" 2) + '("jbshortarchformat" 1) + '("jbshortsubarchformat" 1) + '("jbsy" 1) + '("jbtiafed" 1) + '("lookatfortype" 1) + '("nobibliography" 1) + '("nocitebuthowcited" 1) + '("numberandseries" 2) + '("pageadd" 1) + '("pernumberformat" 1) + '("pervolnumformat" 2) + '("pervolumeformat" 1) + '("peryearformat" 1) + '("revnumberformat" 1) + '("revvolnumformat" 2) + '("revvolumeformat" 1) + '("revyearformat" 1) + '("snded" 1) + '("textitswitch" 1) + '("translator" 3) + '("volumeformat" 1) + "Bibbfsasep" + "Bibbfsesep" + "Bibbstasep" + "Bibbstesep" + "Bibbtasep" + "Bibbtesep" + "Bibchaptername" + "Bibetal" + "Edbyname" + "IbidemMidName" + "IbidemName" + "NAT" + "OpCit" + "Reprint" + "SSS" + "Transfrom" + "Volumename" + "addtoalllanguages" + "afterfoundersep" + "aftervolsep" + "ajtsep" + "alsothesisname" + "aprname" + "augname" + "bibBTsep" + "bibJTsep" + "bibPageName" + "bibPagesName" + "bibaesep" + "bibaldelim" + "bibaltformatalign" + "bibandname" + "bibanfont" + "bibansep" + "bibapifont" + "bibapyldelim" + "bibapyrdelim" + "bibarchpagename" + "bibarchpagesname" + "bibardelim" + "bibartperiodhowcited" + "bibatsep" + "bibauthormultiple" + "bibbdsep" + "bibbfsasep" + "bibbfsesep" + "bibbstasep" + "bibbstesep" + "bibbtasep" + "bibbtesep" + "bibbtfont" + "bibbtsep" + "bibbudcsep" + "bibces" + "bibchapterlongname" + "bibchaptername" + "bibcite" + "bibcolumnsep" + "bibcommenthowcited" + "bibcontinuedname" + "bibcrossrefcite" + "bibcrossrefciteagain" + "bibeandname" + "bibedformat" + "bibefnfont" + "bibeimfont" + "bibelnfont" + "bibenf" + "bibfnfmt" + "bibfnfont" + "bibhowcited" + "bibibidfont" + "bibidemPfname" + "bibidemPmname" + "bibidemPnname" + "bibidemSfname" + "bibidemSmname" + "bibidemSnname" + "bibidempfname" + "bibidempmname" + "bibidempnname" + "bibidemsfname" + "bibidemsmname" + "bibidemsnname" + "bibimfont" + "bibincollcrossrefcite" + "bibincollcrossrefciteagain" + "bibjtfont" + "bibjtsep" + "bibleftcolumn" + "bibleftcolumnadjust" + "bibleftcolumnstretch" + "biblenf" + "biblnfmt" + "biblnfont" + "bibnf" + "bibnotcited" + "bibpagename" + "bibpagesname" + "bibpagesnamesep" + "bibpldelim" + "bibprdelim" + "bibrevtfont" + "bibrightcolumn" + "bibrightcolumnadjust" + "bibrightcolumnstretch" + "bibsall" + "bibsdanish" + "bibsdutch" + "bibsenglish" + "bibsfinnish" + "bibsfrench" + "bibsgerman" + "bibsitalian" + "bibsnfont" + "bibsnorsk" + "bibsportuguese" + "bibsspanish" + "bibtabularitemsep" + "bibtfont" + "bibtotalpagesname" + "biburlprefix" + "biburlsuffix" + "bibvolumecomment" + "bibvtfont" + "bothaesep" + "bpubaddr" + "byname" + "citetitleonly" + "citeyearpar" + "commaename" + "commaname" + "dateldelim" + "daterdelim" + "decname" + "diffpageibidemmidname" + "diffpageibidemname" + "edbyname" + "edbysep" + "editionname" + "editorname" + "editorsname" + "enoteformat" + "etalname" + "etalnamenodot" + "febname" + "fifthedname" + "firstedname" + "footcitetitleonly" + "formatpages" + "foundername" + "fourthedname" + "fromdutch" + "fromenglish" + "fromfinnish" + "fromfrench" + "fromgerman" + "fromitalian" + "fromnorsk" + "fromportuguese" + "fromspanish" + "herename" + "howcitedprefix" + "howcitedsuffix" + "ibidem" + "ibidemmidname" + "ibidemname" + "idemPfedbyname" + "idemPfname" + "idemPmedbyname" + "idemPmname" + "idemPnedbyname" + "idemPnname" + "idemSfedbyname" + "idemSfname" + "idemSmedbyname" + "idemSmname" + "idemSnedbyname" + "idemSnname" + "idemmidname" + "idemname" + "idempfedbyname" + "idempfname" + "idempmedbyname" + "idempmname" + "idempnedbyname" + "idempnname" + "idemsfedbyname" + "idemsfname" + "idemsmedbyname" + "idemsmname" + "idemsnedbyname" + "idemsnname" + "incollinname" + "inname" + "inseriesname" + "janname" + "jbCheckedFirst" + "jbFirst" + "jbFirstAbbrv" + "jbJunior" + "jbLast" + "jbNotRevedNoVonJr" + "jbNotRevedNoVonNoJr" + "jbNotRevedOnlyLast" + "jbNotRevedVonJr" + "jbNotRevedVonNoJr" + "jbPAGES" + "jbPageName" + "jbPages" + "jbPagesName" + "jbRevedFirstNoVonJr" + "jbRevedFirstNoVonNoJr" + "jbRevedFirstOnlyLast" + "jbRevedFirstVonJr" + "jbRevedFirstVonNoJr" + "jbRevedNotFirstNoVonJr" + "jbRevedNotFirstNoVonNoJr" + "jbRevedNotFirstOnlyLast" + "jbRevedNotFirstVonJr" + "jbRevedNotFirstVonNoJr" + "jbVon" + "jbactualauthorfnfont" + "jbactualauthorfont" + "jbaddtomakehowcited" + "jbaensep" + "jbafterstartpagesep" + "jbannotatorfont" + "jbapifont" + "jbarchnamesep" + "jbarchpagename" + "jbarchpagesname" + "jbartPages" + "jbatsep" + "jbauthorfnfont" + "jbauthorfont" + "jbauthorfontifannotator" + "jbauthorinfo" + "jbbeforestartpagesep" + "jbbfsasep" + "jbbfsesep" + "jbbookedaftertitle" + "jbbstasep" + "jbbstesep" + "jbbtasep" + "jbbtesep" + "jbbtfont" + "jbbtitlefont" + "jbcitationyearformat" + "jbcrossrefchecked" + "jbdisablecitationcrossref" + "jbdoitem" + "jbdonotindexauthors" + "jbdonotindexeditors" + "jbdonotindexorganizations" + "jbdotafterbibentry" + "jbdotafterendnote" + "jbdy" + "jbedbyincollcrossrefcite" + "jbedbyincollcrossrefciteagain" + "jbedition" + "jbedseplikecite" + "jbeimfont" + "jbfirstcitepageranges" + "jbfootnoteformat" + "jbfootnotenumalign" + "jbfulltitlefont" + "jbhowcitedcomparepart" + "jbhowcitednormalpart" + "jbhowsepannotatorfirst" + "jbhowsepannotatorlast" + "jbhowsepbeforetitle" + "jbhowsepbeforetitleae" + "jbhowsepbeforetitleibidemname" + "jbignorevarioref" + "jbimfont" + "jbindexbib" + "jbindexonlyfirstauthors" + "jbindexonlyfirsteditors" + "jbindexonlyfirstorganizations" + "jbindextype" + "jblookforgender" + "jbmakeinbib" + "jbmakeinbiblist" + "jbmakeindexactual" + "jbnotsamearch" + "jbonlyforbib" + "jbonlyforcitations" + "jbonlyforfirstcitefullbegin" + "jbonlyforfirstcitefullend" + "jborgauthorfont" + "jboyearincitation" + "jbpagename" + "jbpagenamenodot" + "jbpages" + "jbpagesep" + "jbpagesname" + "jbpagesnamesep" + "jbsamearch" + "jbsamesubarch" + "jbsamesubarchindent" + "jbshorttitlefont" + "jbshowbibextralabel" + "jbssedbd" + "jbsubarchsep" + "jbsuperscripteditionafterauthor" + "jbtitlefont" + "jbts" + "jburldef" + "jbuseidemhrule" + "jbyear" + "jbyearaftertitle" + "julname" + "junname" + "jurthesisname" + "marname" + "mastersthesisname" + "mayname" + "nofirstnameforcitation" + "noibidem" + "noidem" + "nopage" + "novname" + "numbername" + "octname" + "ofseriesname" + "opcit" + "organizationname" + "origPAGES" + "origartPages" + "origbibces" + "origcrossref" + "origpages" + "osep" + "phdthesisname" + "reprint" + "reprintname" + "reviewbyname" + "reviewname" + "reviewofname" + "samepageibidemmidname" + "samepageibidemname" + "secondedname" + "sepname" + "sndecmd" + "snded" + "sndeditorname" + "sndeditorsname" + "technicalreportname" + "testnosig" + "textandname" + "texteandname" + "theHlvla" + "theHlvlb" + "theHlvlc" + "theHlvld" + "theHlvle" + "theHlvlf" + "theHlvlg" + "theHlvlh" + "theHlvli" + "theHlvlj" + "theHlvlk" + "theHlvll" + "thedname" + "thirdedname" + "trans" + "transby" + "transfrom" + "updatename" + "updatesep" + "urldatecomment" + "volname" + "volumename" + "volumeofname")) + TeX-dialect) + +;;; jurabib.el ends here diff --git a/elpa/auctex-13.1.3/style/jurabib.elc b/elpa/auctex-13.1.3/style/jurabib.elc Binary files differnew file mode 100644 index 0000000..23f640e --- /dev/null +++ b/elpa/auctex-13.1.3/style/jurabib.elc diff --git a/elpa/auctex-13.1.3/style/kantlipsum.el b/elpa/auctex-13.1.3/style/kantlipsum.el new file mode 100644 index 0000000..ce33062 --- /dev/null +++ b/elpa/auctex-13.1.3/style/kantlipsum.el @@ -0,0 +1,48 @@ +;;; kantlipsum.el --- AUCTeX style for `kantlipsum.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `kantlipsum.sty'. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "kantlipsum" + (lambda () + (TeX-add-symbols + '("kant" [ "Range of paragraph (max: 164)" ]) + '("kant*" [ "Range of paragraph (max: 164)" ]) + '("kantdef" TeX-arg-define-macro "Paragraph number")) + (TeX-run-style-hooks "xparse")) + TeX-dialect) + +(defvar LaTeX-kantlipsum-package-options + '("par" "nopar" "numbers" "index") + "Package options for the kantlipsum package.") + +;; kantlipsum.el ends here diff --git a/elpa/auctex-13.1.3/style/kantlipsum.elc b/elpa/auctex-13.1.3/style/kantlipsum.elc Binary files differnew file mode 100644 index 0000000..38b182c --- /dev/null +++ b/elpa/auctex-13.1.3/style/kantlipsum.elc diff --git a/elpa/auctex-13.1.3/style/kpfonts.el b/elpa/auctex-13.1.3/style/kpfonts.el new file mode 100644 index 0000000..d55142f --- /dev/null +++ b/elpa/auctex-13.1.3/style/kpfonts.el @@ -0,0 +1,611 @@ +;;; kpfonts.el --- AUCTeX style for `kpfonts.sty' version 3.31. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `kpfonts.sty' version 3.31. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +;; These are generated by the minor mode or easy menu: +(defvar LaTeX-kpfonts-mode-map) +(defvar LaTeX-kpfonts-mode-menu) + +;;; Kpfonts Minor Mode (heavily based on LaTeX Math Minor Mode code) + +(defconst LaTeX-kpfonts-default + '(;; Other Greek Lowercase + ("o a" "otheralpha" "Other Greek Lowercase" 945) ;; #X03B1 + ("o b" "otherbeta" "Other Greek Lowercase" 946) ;; #X03B2 + ("o g" "othergamma" "Other Greek Lowercase" 947) ;; #X03B3 + ("o d" "otherdelta" "Other Greek Lowercase" 948) ;; #X03B4 + ("o e" "otherepsilon" "Other Greek Lowercase" 1013) ;; #X03F5 + ("o z" "otherzeta" "Other Greek Lowercase" 950) ;; #X03B6 + ("o h" "othereta" "Other Greek Lowercase" 951) ;; #X03B7 + ("o j" "othertheta" "Other Greek Lowercase" 952) ;; #X03B8 + (nil "otheriota" "Other Greek Lowercase" 953) ;; #X03B9 + ("o k" "otherkappa" "Other Greek Lowercase" 954) ;; #X03BA + ("o l" "otherlambda" "Other Greek Lowercase" 955) ;; #X03BB + ("o m" "othermu" "Other Greek Lowercase" 956) ;; #X03BC + ("o n" "othernu" "Other Greek Lowercase" 957) ;; #X03BD + ("o x" "otherxi" "Other Greek Lowercase" 958) ;; #X03BE + ("o p" "otherpi" "Other Greek Lowercase" 960) ;; #X03C0 + ("o r" "otherrho" "Other Greek Lowercase" 961) ;; #X03C1 + ("o s" "othersigma" "Other Greek Lowercase" 963) ;; #X03C3 + ("o t" "othertau" "Other Greek Lowercase" 964) ;; #X03C4 + ("o u" "otherupsilon" "Other Greek Lowercase" 965) ;; #X03C5 + ("o f" "otherphi" "Other Greek Lowercase" 981) ;; #X03D5 + ("o q" "otherchi" "Other Greek Lowercase" 967) ;; #X03C7 + ("o y" "otherpsi" "Other Greek Lowercase" 968) ;; #X03C8 + ("o w" "otheromega" "Other Greek Lowercase" 969) ;; #X03C9 + ("o v e" "othervarepsilon" "Other Greek Lowercase" 949) ;; #X03B5 + ("o v j" "othervartheta" "Other Greek Lowercase" 977) ;; #X03D1 + ("o v p" "othervarpi" "Other Greek Lowercase" 982) ;; #X03D6 + ("o v r" "othervarrho" "Other Greek Lowercase" 1009) ;; #X03F1 + ("o v s" "othervarsigma" "Other Greek Lowercase" 962) ;; #X03C2 + ("o v f" "othervarphi" "Other Greek Lowercase" 966) ;; #X03C6 + ;; Slanted Greek Lowercase + (nil "alphasl" "Slanted Greek Lowercase" 120572) ;; #X1D6FC + (nil "betasl" "Slanted Greek Lowercase" 120573) ;; #X1D6FD + (nil "gammasl" "Slanted Greek Lowercase" 120574) ;; #X1D6FE + (nil "deltasl" "Slanted Greek Lowercase" 120575) ;; #X1D6FF + (nil "epsilonsl" "Slanted Greek Lowercase" 120598) ;; #X1D716 + (nil "zetasl" "Slanted Greek Lowercase" 120577) ;; #X1D701 + (nil "etasl" "Slanted Greek Lowercase" 120578) ;; #X1D702 + (nil "thetasl" "Slanted Greek Lowercase" 120579) ;; #X1D703 + (nil "iotasl" "Slanted Greek Lowercase" 120580) ;; #X1D704 + (nil "kappasl" "Slanted Greek Lowercase" 120581) ;; #X1D705 + (nil "lambdasl" "Slanted Greek Lowercase" 120582) ;; #X1D706 + (nil "musl" "Slanted Greek Lowercase" 120583) ;; #X1D707 + (nil "nusl" "Slanted Greek Lowercase" 120584) ;; #X1D708 + (nil "xisl" "Slanted Greek Lowercase" 120585) ;; #X1D709 + (nil "pisl" "Slanted Greek Lowercase" 120587) ;; #X1D70B + (nil "rhosl" "Slanted Greek Lowercase" 120588) ;; #X1D70C + (nil "sigmasl" "Slanted Greek Lowercase" 120590) ;; #X1D70E + (nil "tausl" "Slanted Greek Lowercase" 120591) ;; #X1D70F + (nil "upsilonsl" "Slanted Greek Lowercase" 120592) ;; #X1D710 + (nil "phisl" "Slanted Greek Lowercase" 120601) ;; #X1D719 + (nil "chisl" "Slanted Greek Lowercase" 120594) ;; #X1D712 + (nil "psisl" "Slanted Greek Lowercase" 120595) ;; #X1D713 + (nil "omegasl" "Slanted Greek Lowercase" 120596) ;; #X1D714 + (nil "varepsilonsl" "Slanted Greek Lowercase" 120576) ;; #X1D700 + (nil "varthetasl" "Slanted Greek Lowercase" 120599) ;; #X1D717 + (nil "varpisl" "Slanted Greek Lowercase" 120603) ;; #X1D71B + (nil "varrhosl" "Slanted Greek Lowercase" 120602) ;; #X1D71A + (nil "varsigmasl" "Slanted Greek Lowercase" 120589) ;; #X1D70D + (nil "varphisl" "Slanted Greek Lowercase" 120593) ;; #X1D711 + ;; Upright Greek Lowercase + (nil "alphaup" "Upright Greek Lowercase" 945) ;; #X03B1 + (nil "betaup" "Upright Greek Lowercase" 946) ;; #X03B2 + (nil "gammaup" "Upright Greek Lowercase" 947) ;; #X03B3 + (nil "deltaup" "Upright Greek Lowercase" 948) ;; #X03B4 + (nil "epsilonup" "Upright Greek Lowercase" 1013) ;; #X03F5 + (nil "zetaup" "Upright Greek Lowercase" 950) ;; #X03B6 + (nil "etaup" "Upright Greek Lowercase" 951) ;; #X03B7 + (nil "thetaup" "Upright Greek Lowercase" 952) ;; #X03B8 + (nil "iotaup" "Upright Greek Lowercase" 953) ;; #X03B9 + (nil "kappaup" "Upright Greek Lowercase" 954) ;; #X03BA + (nil "lambdaup" "Upright Greek Lowercase" 955) ;; #X03BB + (nil "muup" "Upright Greek Lowercase" 956) ;; #X03BC + (nil "nuup" "Upright Greek Lowercase" 957) ;; #X03BD + (nil "xiup" "Upright Greek Lowercase" 958) ;; #X03BE + (nil "piup" "Upright Greek Lowercase" 960) ;; #X03C0 + (nil "rhoup" "Upright Greek Lowercase" 961) ;; #X03C1 + (nil "sigmaup" "Upright Greek Lowercase" 963) ;; #X03C3 + (nil "tauup" "Upright Greek Lowercase" 964) ;; #X03C4 + (nil "upsilonup" "Upright Greek Lowercase" 965) ;; #X03C5 + (nil "phiup" "Upright Greek Lowercase" 981) ;; #X03D5 + (nil "chiup" "Upright Greek Lowercase" 967) ;; #X03C7 + (nil "psiup" "Upright Greek Lowercase" 968) ;; #X03C8 + (nil "omegaup" "Upright Greek Lowercase" 969) ;; #X03C9 + (nil "varepsilonup" "Upright Greek Lowercase" 949) ;; #X03B5 + (nil "varthetaup" "Upright Greek Lowercase" 977) ;; #X03D1 + (nil "varpiup" "Upright Greek Lowercase" 982) ;; #X03D6 + (nil "varrhoup" "Upright Greek Lowercase" 1009) ;; #X03F1 + (nil "varsigmaup" "Upright Greek Lowercase" 962) ;; #X03C2 + (nil "varphiup" "Upright Greek Lowercase" 966) ;; #X03C6 + ;; Other Greek Uppercase + ("o G" "otherGamma" "Other Greek Uppercase" 120548) ;; #X1D6E4 + ("o D" "otherDelta" "Other Greek Uppercase" 120549) ;; #X1D6E5 + ("o J" "otherTheta" "Other Greek Uppercase" 120553) ;; #X1D6E9 + ("o L" "otherLambda" "Other Greek Uppercase" 120556) ;; #X1D6EC + ("o X" "otherXi" "Other Greek Uppercase" 120559) ;; #X1D6EF + ("o P" "otherPi" "Other Greek Uppercase" 120561) ;; #X1D6F1 + ("o S" "otherSigma" "Other Greek Uppercase" 120564) ;; #X1D6F4 + ("o U" "otherUpsilon" "Other Greek Uppercase" 120566) ;; #X1D6F6 + ("o F" "otherPhi" "Other Greek Uppercase" 120567) ;; #X1D6F7 + ("o Y" "otherPsi" "Other Greek Uppercase" 120569) ;; #X1D6F9 + ("o W" "otherOmega" "Other Greek Uppercase" 120570) ;; #X1D6FA + ;; Slanted Greek Uppercase + (nil "Gammasl" "Slanted Greek Uppercase" 120548) ;; #X1D6E4 + (nil "Deltasl" "Slanted Greek Uppercase" 120549) ;; #X1D6E5 + (nil "Thetasl" "Slanted Greek Uppercase" 120553) ;; #X1D6E9 + (nil "Lambdasl" "Slanted Greek Uppercase" 120556) ;; #X1D6EC + (nil "Xisl" "Slanted Greek Uppercase" 120559) ;; #X1D6EF + (nil "Pisl" "Slanted Greek Uppercase" 120561) ;; #X1D6F1 + (nil "Sigmasl" "Slanted Greek Uppercase" 120564) ;; #X1D6F4 + (nil "Upsilonsl" "Slanted Greek Uppercase" 120566) ;; #X1D6F6 + (nil "Phisl" "Slanted Greek Uppercase" 120567) ;; #X1D6F7 + (nil "Psisl" "Slanted Greek Uppercase" 120569) ;; #X1D6F9 + (nil "Omegasl" "Slanted Greek Uppercase" 120570) ;; #X1D6FA + ;; Upright Greek Uppercase + (nil "Gammaup" "Upright Greek Uppercase" 915) ;; #X0393 + (nil "Deltaup" "Upright Greek Uppercase" 916) ;; #X0394 + (nil "Thetaup" "Upright Greek Uppercase" 920) ;; #X0398 + (nil "Lambdaup" "Upright Greek Uppercase" 923) ;; #X039B + (nil "Xiup" "Upright Greek Uppercase" 926) ;; #X039E + (nil "Piup" "Upright Greek Uppercase" 928) ;; #X03A0 + (nil "Sigmaup" "Upright Greek Uppercase" 931) ;; #X03A3 + (nil "Upsilonup" "Upright Greek Uppercase" 978) ;; #X03D2 + (nil "Phiup" "Upright Greek Uppercase" 934) ;; #X03A6 + (nil "Psiup" "Upright Greek Uppercase" 936) ;; #X03A8 + (nil "Omegaup" "Upright Greek Uppercase" 937) ;; #X03A9 + ;; Integrals + (nil "varint" "Integrals" nil) + (nil "variint" "Integrals" nil) + (nil "variiint" "Integrals" nil) + (nil "variiiint" "Integrals" nil) + (nil "varidotsint" "Integrals" nil) + (nil "oiint" "Integrals" 8751) ;; #X222F + (nil "ointctrclockwise" "Integrals" 8755) ;; #X2233 + (nil "ointclockwise" "Integrals" nil) + (nil "sqint" "Integrals" 10774) ;; #X2A16 + (nil "idotsint" "Integrals" nil) + (nil "oiiint" "Integrals" 8752) ;; #X2230 + (nil "varointctrclockwise" "Integrals" nil) + (nil "varointclockwise" "Integrals" 8754) ;; #X2232 + (nil "fint" "Integrals" 10767) ;; #X2A0F + (nil "oiintctrclockwise" "Integrals" nil) + (nil "varoiintclockwise" "Integrals" nil) + (nil "oiiintctrclockwise" "Integrals" nil) + (nil "varoiiintclockwise" "Integrals" nil) + (nil "oiintclockwise" "Integrals" nil) + (nil "varoiintctrclockwise" "Integrals" nil) + (nil "oiiintclockwise" "Integrals" nil) + (nil "varoiiintctrclockwise" "Integrals" nil) + (nil "sqiint" "Integrals" nil) + (nil "sqiiint" "Integrals" nil) + ;; Mapping + (nil "mappedfrom" "Mapping" 8612) ;; #X21A4 + (nil "longmappedfrom" "Mapping" 10235) ;; #X27FB + (nil "Mapsto" "Mapping" 10503) ;; #X2907 + (nil "Longmapsto" "Mapping" 10238) ;; #X27FE + (nil "Mappedfrom" "Mapping" 10502) ;; #X2906 + (nil "Longmappedfrom" "Mapping" 10237) ;; #X27FD + (nil "mmapsto" "Mapping" nil) + (nil "longmmapsto" "Mapping" nil) + (nil "mmappedfrom" "Mapping" nil) + (nil "longmmappedfrom" "Mapping" nil) + (nil "Mmapsto" "Mapping" nil) + (nil "Longmmapsto" "Mapping" nil) + (nil "Mmappedfrom" "Mapping" nil) + (nil "Longmmappedfrom" "Mapping" nil) + ;; Arrows + (nil "dashleftarrow" "Arrows" 10510) ;; #X290E + (nil "dashrightarrow" "Arrows" 10511) ;; #X290F + (nil "dashleftrightarrow" "Arrows" nil) + (nil "leftsquigarrow" "Arrows" 8668) ;; #X21DC + (nil "Nearrow" "Arrows" 8663) ;; #X21D7 + (nil "Searrow" "Arrows" 8664) ;; #X21D8 + (nil "Nwarrow" "Arrows" 8662) ;; #X21D6 + (nil "Swarrow" "Arrows" 8665) ;; #X21D9 + (nil "leadstoext" "Arrows" 12316) ;; #X301C + (nil "leadsto" "Arrows" 10547) ;; #X2933 + (nil "boxright" "Arrows" nil) + (nil "Diamondright" "Arrows" nil) + (nil "circleright" "Arrows" nil) + (nil "boxleft" "Arrows" nil) + (nil "Diamondleft" "Arrows" nil) + (nil "circleleft" "Arrows" nil) + (nil "boxdotright" "Arrows" nil) + (nil "Diamonddotright" "Arrows" nil) + (nil "circledotright" "Arrows" nil) + (nil "boxdotleft" "Arrows" nil) + (nil "Diamonddotleft" "Arrows" nil) + (nil "circledotleft" "Arrows" nil) + (nil "boxRight" "Arrows" nil) + (nil "boxLeft" "Arrows" nil) + (nil "boxdotRight" "Arrows" nil) + (nil "boxdotLeft" "Arrows" nil) + (nil "DiamondRight" "Arrows" nil) + (nil "DiamondLeft" "Arrows" nil) + (nil "DiamonddotRight" "Arrows" nil) + (nil "DiamonddotLeft" "Arrows" nil) + ;; Neg Arrows + (nil "ntwoheadrightarrow" "Neg Arrows" 10496) ;; #X2900 + (nil "ntwoheadleftarrow" "Neg Arrows" 11060) ;; #X2B34 + ;; Binary Op + (nil "multimap" "Binary Op" 8888) ;; #X22B8 + (nil "multimapinv" "Binary Op" 10204) ;; #X27DC + (nil "multimapboth" "Binary Op" 10719) ;; #X29DF + (nil "multimapdot" "Binary Op" nil) + (nil "multimapdotinv" "Binary Op" nil) + (nil "multimapdotboth" "Binary Op" nil) + (nil "multimapdotbothA" "Binary Op" 8886) ;; #X22B6 + (nil "multimapdotbothB" "Binary Op" 8887) ;; #X22B7 + (nil "multimapbothvert" "Binary Op" nil) + (nil "multimapdotbothvert" "Binary Op" nil) + (nil "multimapdotbothAvert" "Binary Op" nil) + (nil "multimapdotbothBvert" "Binary Op" nil) + (nil "Wr" "Binary Op" nil) + (nil "sqcupplus" "Binary Op" nil) + (nil "sqcapplus" "Binary Op" nil) + (nil "medcirc" "Binary Op" 9898) ;; #X26AA + (nil "medbullet" "Binary Op" 9899) ;; #X26AB + (nil "invamp" "Binary Op" 8523) ;; #X214B + (nil "Diamonddot" "Binary Op" 10192) ;; #X27D0 + (nil "Diamond" "Binary Op" 9671) ;; #X25C7 + (nil "Diamondblack" "Binary Op" 9670) ;; #X25C6 + (nil "strictif" "Binary Op" 8880) ;; #X22B0 + (nil "strictfi" "Binary Op" 8881) ;; #X22B1 + (nil "strictiff" "Binary Op" nil) + (nil "circledless" "Binary Op" 10688) ;; #X29C0 + (nil "circledgtr" "Binary Op" 10689) ;; #X29C1 + (nil "circledwedge" "Binary Op" nil) + (nil "circledvee" "Binary Op" nil) + (nil "circledbar" "Binary Op" 10678) ;; #X29B6 + (nil "circledbslash" "Binary Op" 10680) ;; #X29B8 + (nil "bignplus" "Binary Op" nil) + (nil "bigsqcupplus" "Binary Op" nil) + (nil "bigsqcapplus" "Binary Op" nil) + (nil "bigsqcap" "Binary Op" 10757) ;; #X2A05 + (nil "varprod" "Binary Op" 10761) ;; #X2A09 + ;; Relational + (nil "doteq" "Relational" 8784) ;; #X2250 + (nil "VDash" "Relational" 8875) ;; #X22AB + (nil "VvDash" "Relational" nil) + (nil "cong" "Relational" 8773) ;; #X2245 + (nil "preceqq" "Relational" 10931) ;; #X2AB3 + (nil "succeqq" "Relational" 10932) ;; #X2AB4 + (nil "coloneqq" "Relational" nil) + (nil "varparallel" "Relational" 11005) ;; #X2AFD + (nil "nvarparallel" "Relational" nil) + (nil "varparallelinv" "Relational" nil) + (nil "nvarparallelinv" "Relational" nil) + (nil "colonapprox" "Relational" nil) + (nil "colonsim" "Relational" nil) + (nil "Colonapprox" "Relational" nil) + (nil "Colonsim" "Relational" nil) + (nil "eqqcolon" "Relational" 8789) ;; #X2255 + (nil "coloneq" "Relational" nil) + (nil "eqcolon" "Relational" 8761) ;; #X2239 + (nil "Coloneqq" "Relational" 10868) ;; #X2A74 + (nil "Eqqcolon" "Relational" nil) + ;; Neg Rel + (nil "nprecsim" "Neg Rel" nil) + (nil "nsuccsim" "Neg Rel" nil) + (nil "nlesssim" "Neg Rel" 8820) ;; #X2274 + (nil "ngtrsim" "Neg Rel" 8821) ;; #X2275 + (nil "nlessapprox" "Neg Rel" nil) + (nil "ngtrapprox" "Neg Rel" nil) + (nil "npreccurlyeq" "Neg Rel" 8928) ;; #X22E0 + (nil "nsucccurlyeq" "Neg Rel" 8929) ;; #X22E1 + (nil "ngtrless" "Neg Rel" 8825) ;; #X2279 + (nil "nlessgtr" "Neg Rel" 8824) ;; #X2278 + (nil "nbumpeq" "Neg Rel" nil) + (nil "nBumpeq" "Neg Rel" nil) + (nil "nbacksim" "Neg Rel" nil) + (nil "nbacksimeq" "Neg Rel" nil) + (nil "nasymp" "Neg Rel" 8813) ;; #X226D + (nil "nequiv" "Neg Rel" 8802) ;; #X2262 + (nil "nsim" "Neg Rel" 8769) ;; #X2241 + (nil "napprox" "Neg Rel" 8777) ;; #X2249 + (nil "nsubset" "Neg Rel" 8836) ;; #X2284 + (nil "nsupset" "Neg Rel" 8837) ;; #X2285 + (nil "nll" "Neg Rel" nil) + (nil "ngg" "Neg Rel" nil) + (nil "nthickapprox" "Neg Rel" 8777) ;; #X2249 + (nil "napproxeq" "Neg Rel" nil) + (nil "nprecapprox" "Neg Rel" nil) + (nil "nsuccapprox" "Neg Rel" nil) + (nil "npreceqq" "Neg Rel" nil) + (nil "nsucceqq" "Neg Rel" nil) + (nil "nsimeq" "Neg Rel" 8772) ;; #X2244 + (nil "notin" "Neg Rel" 8713) ;; #X2209 + (nil "notni" "Neg Rel" 8716) ;; #X220C + (nil "nSubset" "Neg Rel" nil) + (nil "nSupset" "Neg Rel" nil) + (nil "nsqsubseteq" "Neg Rel" 8930) ;; #X22E2 + (nil "nsqsupseteq" "Neg Rel" 8931) ;; #X22E3 + (nil "nsqsubset" "Neg Rel" nil) + (nil "nsqsupset" "Neg Rel" nil) + ;; Delimeters + (nil "Lbag" "Delimeters" 10181) ;; #X27C5 + (nil "Rbag" "Delimeters" 10182) ;; #X27C6 + (nil "llbracket" "Delimeters" 10214) ;; #X27E6 + (nil "rrbracket" "Delimeters" 10215) ;; #X27E7 + ;; Accents + (nil "widearc" "Accents" 8978) ;; #X2312 + (nil "widearcarrow" "Accents" 8405) ;; #X20D5 + (nil "wideOarc" "Accents" 8405) ;; #X20D5 + (nil "wideparen" "Accents" 9180) ;; #X23DC + (nil "widering" "Accents" nil) + ;; Misc + ("v 0" "varemptyset" "Misc" 8709) ;; #X2205 + (nil "lJoin" "Misc" 8905) ;; #X22C9 + (nil "rJoin" "Misc" 8906) ;; #X22CA + (nil "Join" "Misc" 8904) ;; #X22C8 + (nil "openJoin" "Misc" nil) + (nil "lrtimes" "Misc" nil) + (nil "opentimes" "Misc" nil) + (nil "nplus" "Misc" nil) + (nil "Top" "Misc" 10986) ;; #X2AEA + (nil "Bot" "Misc" 10987) ;; #X2AEB + (nil "Perp" "Misc" 10987) ;; #X2AEB + (nil "boxast" "Misc" nil) + (nil "boxbslash" "Misc" nil) + (nil "boxbar" "Misc" nil) + (nil "boxslash" "Misc" nil) + (nil "lambdaslash" "Misc" 411) ;; #X019B + (nil "lambdabar" "Misc" 411) ;; #X019B + (nil "varclubsuit" "Misc" 9831) ;; #X2667 + (nil "vardiamondsuit" "Misc" 9830) ;; #X2666 + (nil "varheartsuit" "Misc" 9829) ;; #X2665 + (nil "varspadesuit" "Misc" 9828)) ;; #X2664 + "Alist of kpfonts symbols. + +Each entry should be a list with upto four elements, KEY, VALUE, +MENU and CHARACTER. + +KEY is the key (after `LaTeX-kpfonts-abbrev-prefix') to be +redefined in kpfonts minor mode. KEY can be a character (for +example ?o) for a single stroke or a string (for example \"o a\") +for a multi-stroke binding. If KEY is nil, the symbol has no +associated keystroke (it is available in the menu, though). + +VALUE can be a string with the name of the macro to be inserted, +or a function to be called. The macro must be given without the +leading backslash. + +The third element MENU is the name of the submenu where the +command should be added. MENU can be either a string (for +example \"greek\"), a list (for example (\"AMS\" \"Delimiters\")) +or nil. If MENU is nil, no menu item will be created. + +The fourth element CHARACTER is a Unicode character position for +menu display. When nil, no character is shown. + +See also `LaTeX-kpfonts-menu'.") + +(defvar LaTeX-kpfonts-abbrev-prefix LaTeX-math-abbrev-prefix + "Prefix key for use in `LaTeX-kpfonts-mode'. +This has to be a string representing a key sequence in a format +understood by the `kbd' macro. This corresponds to the syntax +usually used in the Emacs and Elisp manuals.") + +(defun LaTeX-kpfonts-abbrev-prefix () + "Make a key definition from the variable `LaTeX-kpfonts-abbrev-prefix'." + (if (stringp LaTeX-kpfonts-abbrev-prefix) + (read-kbd-macro LaTeX-kpfonts-abbrev-prefix) + LaTeX-kpfonts-abbrev-prefix)) + +(defvar LaTeX-kpfonts-keymap (make-sparse-keymap) + "Keymap used for `LaTeX-kpfonts-mode' commands.") + +(defvar LaTeX-kpfonts-menu nil + "Menu containing commands provided by kpfonts LaTeX package. +The menu entries will be generated dynamically, but you can specify +the sequence by initializing this variable.") + +;; We set `LaTeX-kpfonts-menu' after its definition because otherwise, resetting +;; AUCTeX with `C-u C-c C-n' would create duplicate entries in menu. +(setq LaTeX-kpfonts-menu + '("Kpfonts" + ("Insert Font" + ["Math Upright" (TeX-font nil ?\C-h) :keys "C-c C-f C-h"] + ["Math Fraktur" (TeX-font nil ?\C-k) :keys "C-c C-f C-k"] + ["Math Script" (TeX-font nil ?\C-p) :keys "C-c C-f C-p"] + ["Slanted Small Caps" (TeX-font nil ?\C-l) :keys "C-c C-f C-l"] + ["Other Small Caps" (TeX-font nil ?\C-o) :keys "C-c C-f C-o"] + ["Other Slanted Small Caps" (TeX-font nil ?\C-q) :keys "C-c C-f C-q"]) + ("Replace Font" + ["Math Upright" (TeX-font t ?\C-h) :keys "C-u C-c C-f C-h"] + ["Math Fraktur" (TeX-font t ?\C-k) :keys "C-u C-c C-f C-k"] + ["Math Script" (TeX-font t ?\C-p) :keys "C-u C-c C-f C-p"] + ["Slanted Small Caps" (TeX-font t ?\C-l) :keys "C-u C-c C-f C-l"] + ["Other Small Caps" (TeX-font t ?\C-o) :keys "C-u C-c C-f C-o"] + ["Other Slanted Small Caps" (TeX-font t ?\C-q) :keys "C-u C-c C-f C-q"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ("Other Greek Lowercase") ("Slanted Greek Lowercase") + ("Upright Greek Lowercase") ("Other Greek Uppercase") + ("Slanted Greek Uppercase") ("Upright Greek Uppercase") ("Integrals") + ("Mapping") ("Arrows") ("Neg Arrows") ("Binary Op") ("Relational") + ("Neg Rel") ("Delimeters") ("Accents") ("Misc"))) + +(let ((math (reverse LaTeX-kpfonts-default)) + (map LaTeX-kpfonts-keymap) + (unicode LaTeX-math-menu-unicode)) + (while math + (let* ((entry (car math)) + (key (nth 0 entry)) + (prefix + (and unicode + (nth 3 entry))) + value menu name) + (setq math (cdr math)) + (setq prefix (if (and prefix + (setq prefix (nth 3 entry))) + (concat (string prefix) " \\") + "\\")) + (if (listp (cdr entry)) + (setq value (nth 1 entry) + menu (nth 2 entry)) + (setq value (cdr entry) + menu nil)) + (if (stringp value) + (progn + (setq name (intern (concat "LaTeX-kpfonts-" value))) + (fset name (lambda (arg) (interactive "*P") + (LaTeX-math-insert value arg)))) + (setq name value)) + (if key + (progn + (setq key (cond ((numberp key) (char-to-string key)) + ((stringp key) (read-kbd-macro key)) + (t (vector key)))) + (define-key map key name))) + (if menu + (let ((parent LaTeX-kpfonts-menu)) + (if (listp menu) + (progn + (while (cdr menu) + (let ((sub (assoc (car menu) LaTeX-kpfonts-menu))) + (if sub + (setq parent sub) + (setcdr parent (cons (list (car menu)) (cdr parent)))) + (setq menu (cdr menu)))) + (setq menu (car menu)))) + (let ((sub (assoc menu parent))) + (if sub + (if (stringp value) + (setcdr sub (cons (vector (concat prefix value) + name t) + (cdr sub))) + (error "Cannot have multiple special kpfonts menu items")) + (setcdr parent + (cons (if (stringp value) + (list menu (vector (concat prefix value) + name t)) + (vector menu name t)) + (cdr parent))))))))) + ;; Make the kpfonts prefix char available if it has not been used as a prefix. + (unless (lookup-key map (LaTeX-kpfonts-abbrev-prefix)) + (define-key map (LaTeX-kpfonts-abbrev-prefix) #'self-insert-command))) + +(define-minor-mode LaTeX-kpfonts-mode + "A minor mode with easy access to kpfonts macros. + +Easy insertion of kpfonts symbols. If you give a prefix +argument, the symbols will be surrounded by dollar signs. The +following commands are defined: + +\\{LaTeX-kpfonts-mode-map}" + :init-value nil + :lighter nil + :keymap (list (cons (LaTeX-kpfonts-abbrev-prefix) LaTeX-kpfonts-keymap)) + (TeX-set-mode-name)) + +(easy-menu-define LaTeX-kpfonts-mode-menu + LaTeX-kpfonts-mode-map + "Menu used in kpfonts minor mode." + LaTeX-kpfonts-menu) + +(defvar LaTeX-kpfonts-mode-enable LaTeX-math-mode + "If non-nil, enable kpfonts minor mode by default.") + +(if LaTeX-kpfonts-mode-enable + (LaTeX-kpfonts-mode)) +;;; Kpfonts Minor Mode ends here + +(TeX-add-style-hook + "kpfonts" + (lambda () + (unless (LaTeX-provided-package-options-member "kpfonts" "notextcomp") + (TeX-run-style-hooks "textcomp")) + (unless (LaTeX-provided-package-options-member "kpfonts" "noamsmath") + (TeX-run-style-hooks "amsmath")) + (TeX-add-symbols + ;; Text fonts options + '("classicstylenums" 1) + ;; New text commands + '("scslshape" 0) + '("otherscshape" 0) + '("otherscslshape" 0) + "othertailQ" + "othertailscq" + "othertailscslq" + ;; Variant integrate symbols + '("D" 1) + ;; New extensive symbols + '("widearc" 1) + '("widearcarrow" 1) + '("wideOarc" 1) + '("wideparen" 1) + '("widering" 1)) + + ;; New fonts by `kpfonts'. + (setq TeX-font-list + (append + TeX-font-list + '(;; Math fonts + (?\C-h "" "" "\\mathup{" "}") + (?\C-k "" "" "\\mathfrak{" "}") + (?\C-p "" "" "\\mathscr{" "}") + ;; Text fonts + (?\C-l "\\textscsl{" "}") + (?\C-o "\\textothersc{" "}") + (?\C-q "\\textotherscsl{" "}")))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textscsl" "{") + ("textothersc" "{") + ("textotherscsl" "{")) + 'bold-command) + (font-latex-add-keywords '(("textscsl" "{") + ("textotherscsl" "{")) + 'italic-command) + (font-latex-add-keywords '(("scslshape") + ("otherscshape") + ("otherscslshape")) + 'bold-declaration) + (font-latex-add-keywords '(("scslshape") + ("otherscslshape")) + 'italic-declaration))) + TeX-dialect) + +(defvar LaTeX-kpfonts-package-options + '(;; Main global options + "light" "fulloldstylenums" "fulloldstyle" "fullveryoldstyle" + ;; Other global options + "nomath" "notext" "nosf" "nott" "onlyrm" "noamsmath" "notextcomp" + ;; Text fonts options + "lighttext" "oldstylenums" "oldstyle" "veryoldstyle" "rmx" "largesmallcaps" + "easyscsl" "nofligatures" "lightmath" + ;; Math typesetting options + "sfmath" "sfmathbb" "rmmathbb" "nomathscript" "mathcalasscript" "classicReIm" + "uprightRoman" "frenchstyle" "upright" "oldstylenumsmath" "oldstylemath" + "veryoldstylemath" "narrowiints" "partialup" "widermath" "noDcommand" + ;; Position of subscripts and superscripts + "intlimits" "fullintlimits" "nointlimits" "sumlimits" "fullsumlimits" + "nosumlimits" + ;; Greek letters in math mode, options + "uprightgreeks" "slantedGreeks" + ;; Other `amsmath' options + "namelimits" "nonamelimits" "leqno" "reqno" "centertags" "tbtags" + ;; Misc + "nowarning") + "Package options for the kpfonts package.") + +;; kpfonts.el ends here diff --git a/elpa/auctex-13.1.3/style/kpfonts.elc b/elpa/auctex-13.1.3/style/kpfonts.elc Binary files differnew file mode 100644 index 0000000..96ecd1c --- /dev/null +++ b/elpa/auctex-13.1.3/style/kpfonts.elc diff --git a/elpa/auctex-13.1.3/style/l3doc.el b/elpa/auctex-13.1.3/style/l3doc.el new file mode 100644 index 0000000..e51e83a --- /dev/null +++ b/elpa/auctex-13.1.3/style/l3doc.el @@ -0,0 +1,270 @@ +;;; l3doc.el --- AUCTeX style for `l3doc.cls' -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2022-03-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `l3doc.cls' dated 2022/02/24. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-article-class-options) + +(defvar LaTeX-l3doc-cmd-key-val-options + '(("index") + ("noindex") + ("module" ("TeX")) + ("replace" ("true" "false"))) + "Key=value options for l3doc macros.") + +(defun LaTeX-env-l3doc-function (environment) + "Insert the ENVIRONMENT provided by l3doc.cls. +This function should be used for the environments 'function' and +'variable' provided by the l3doc class. Also ask the user if a +'syntax' environment should be added as well." + (let* ((time (format-time-string "%Y-%m-%d" (current-time))) + (exp-flag (TeX-read-key-val t `(("added" (,time)) + ("updated" (,time)) + ("deprecated") + ("tested") + ("EXP") + ("rEXP") + ("TF") + ("pTF") + ("noTF") + ("label") + ("verb")) + "Flags (k=v)")) + (mac (TeX-read-string + (TeX-argument-prompt nil nil "Macro(s)") + TeX-esc)) + (active-mark (and (TeX-active-mark) + (not (eq (mark) (point))))) + (elt-count 0) + (count 1) + (comment-func (lambda () + (if (TeX-in-line-comment) + (indent-according-to-mode) + (delete-horizontal-space) + (beginning-of-line) + (insert "%") + (indent-according-to-mode)))) + p) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length exp-flag)) + (format "[%s]" exp-flag)) + TeX-grop mac TeX-grcl)) + ;; Remember where we start: + (setq p (point-marker)) + ;; Now make sure we have '%' everywhere, start at the beginning: + (search-backward (concat TeX-esc "begin" TeX-grop environment TeX-grcl) + (if active-mark nil (line-beginning-position 0)) + t) + (funcall comment-func) + ;; Now at the end: + (goto-char p) + (search-forward (concat TeX-esc "end" TeX-grop environment TeX-grcl) + (if active-mark nil (line-end-position 2)) + t) + (goto-char (match-beginning 0)) + (funcall comment-func) + ;; Finally for where we started and clean up only when region was + ;; not active: + (goto-char p) + (unless active-mark (funcall comment-func)) + (set-marker p nil) + ;; Ask if we should insert a 'syntax' environment: + (when (and (not active-mark) + (y-or-n-p "Insert syntax environment? ")) + (LaTeX-environment-menu "syntax") + (funcall comment-func) + ;; Try to be smart: insert \cs{mac} into buffer. First, delete + ;; any whitespaces after the ',' if inserted: + (setq mac (split-string + (replace-regexp-in-string "[[:blank:]]" + "" + mac) + "," t)) + ;; Count the number of elements for the number of linebreaks: + (setq elt-count (length mac)) + ;; Now insert the functions wrapped in \cs: + (save-excursion + (dolist (elt mac) + (insert TeX-esc "cs" TeX-grop (substring elt 1) TeX-grcl) + (when (< count elt-count) + (LaTeX-newline) + (setq count (1+ count))))) + ;; Now move to end of the first line: + (end-of-line) + (just-one-space)))) + +(defun LaTeX-item-l3doc-syntax () + "Insert line break macro on the last line. +For syntax environment from l3doc class." + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + +(TeX-add-style-hook + "l3doc" + (lambda () + + ;; l3doc.cls loads shortvrb.sty and sets '|' and '"' as shorthands. + ;; We append them to a local version of `LaTeX-shortvrb-chars' + ;; before running the style hook for 'shortvrb' which is done + ;; inside 'doc.el': + (make-local-variable 'LaTeX-shortvrb-chars) + (dolist (elt '(?| ?\")) + (add-to-list 'LaTeX-shortvrb-chars elt t)) + + (TeX-run-style-hooks "expl3" "doc" "ltx-base" + "article" "array" "amsmath" "booktabs" + "color" "colortbl" "hologo" "enumitem" + "textcomp" "csquotes" "fancyvrb" "verbatim" + "underscore") + + (TeX-add-symbols + ;; 4.2 Partitioning documentation and implementation + '("EnableDocumentation" 0) + '("EnableImplementation" 0) + '("DisableDocumentation" 0) + '("DisableImplementation" 0) + '("DocInputAgain" 0) + + ;; 4.3 General text markup + '("cmd" + [TeX-arg-key-val LaTeX-l3doc-cmd-key-val-options] + TeX-arg-macro) + '("cs" + [TeX-arg-key-val LaTeX-l3doc-cmd-key-val-options] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Macro") + (TeX-symbol-list))) + '("tn" + [TeX-arg-key-val LaTeX-l3doc-key-val-options] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Macro") + (TeX-symbol-list))) + + ;; "meta" is provided by doc.el, so don't add here again + '("Arg" "Argument") + '("marg" "Mandatory argument") + '("oarg" "Optional argument") + '("parg" "Picture mode argument") + + '("file" "File name") + '("env" LaTeX-env-args + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Environment") + (LaTeX-environment-list))) + '("pkg" "Package name") + '("cls" "Class name") + + '("NB" "Tag" t) + + '("DocInput" + (TeX-arg-eval + (lambda () + (let ((file (TeX-read-string + (format "File(s) to include (default %s): " (current-buffer)) + nil nil (current-buffer)))) + (format "%s" file))))) + + ;; 4.5 Describing functions in the implementation + '("TestFiles" "File(s)") + '("UnitTested" 0) + '("TestMissing" t)) + + (LaTeX-add-environments + '("documentation") + '("implementation") + '("NOTE" "Tag") + '("function" LaTeX-env-l3doc-function) + '("variable" LaTeX-env-l3doc-function) + ;; Feature in 'syntax' environment: Hit 'M-RET' to insert '\\': + '("syntax") + '("texnote") + '("arguments" LaTeX-env-item)) + + ;; Do not indent the content of the 'documentation' and + ;; 'implementation' environments; it is odd when major parts of the + ;; document are indented. Append them to a local version of + ;; `LaTeX-document-regexp': + (unless (string-match-p "\\<implementation\\>" LaTeX-document-regexp) + (set (make-local-variable 'LaTeX-document-regexp) + (concat LaTeX-document-regexp + "\\|documentation\\|implementation"))) + + ;; Append syntax to `LaTeX-item-list' with `LaTeX-item-l3doc-syntax' + (add-to-list 'LaTeX-item-list '("syntax" . LaTeX-item-l3doc-syntax) t) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cmd" "[{") + ("cs" "[{") + ("Arg" "{") + ("marg" "{") + ("oarg" "{") + ("parg" "{") + ("file" "{") + ("env" "{") + ("pkg" "{") + ("cls" "{") + ("NB" "{{")) + 'textual) + (font-latex-add-keywords '(("EnableDocumentation" "") + ("EnableImplementation" "") + ("DisableDocumentation" "") + ("DisableImplementation" "") + ("DocInputAgain" "") + ("TestFiles" "{") + ("UnitTested" "") + ("TestMissing" "{")) + 'function) + (font-latex-add-keywords '("DocInput" "{") + 'reference))) + TeX-dialect) + +(defvar LaTeX-l3doc-class-options + (progn + (TeX-load-style "article") + (append (remove "a5paper" LaTeX-article-class-options) + '("full" "onlydoc" "check" "nocheck" "checktest" + "nochecktest" "kernel" "stdmodule" "cm-default" + "lm-default" "cs-break-off" "cs-break-nohyphen" + "show-notes" "hide-notes"))) + "Class options for the l3doc class.") + +;;; l3doc.el ends here diff --git a/elpa/auctex-13.1.3/style/l3doc.elc b/elpa/auctex-13.1.3/style/l3doc.elc Binary files differnew file mode 100644 index 0000000..3aeecc2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/l3doc.elc diff --git a/elpa/auctex-13.1.3/style/letter.el b/elpa/auctex-13.1.3/style/letter.el new file mode 100644 index 0000000..5c64c28 --- /dev/null +++ b/elpa/auctex-13.1.3/style/letter.el @@ -0,0 +1,199 @@ +;;; letter.el - Special code for letter style. -*- lexical-binding: t; -*- + +;; Copyright (C) 1993, 2012, 2013, 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Per Abrahamsen <abraham@dina.kvl.dk> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-letter-class-options + '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final" + "leqno" "fleqn") + "Package options for the letter class.") + +;; You may want to define this in tex-site.el to contain your +;; organizations address. +(defvar LaTeX-letter-sender-address "" + "Initial value when prompting for a sender address in the letter style.") + +(TeX-add-style-hook + "letter" + (lambda () + (LaTeX-add-environments + '("letter" LaTeX-env-recipient)) + (LaTeX-add-pagestyles "headings" "firstpage") + (setq LaTeX-default-document-environment "letter") + (TeX-add-symbols + '("name" "Sender") + '("address" "Sender address") + '("signature" "Signature") + '("opening" "Opening") + '("closing" "Closing") + "location" + "telephone" + "makelabels" + "stopbreaks" + "startbreaks" + "cc" + "encl" + "ps" + "stopletter" + "returnaddress" + "startlabels" + "mlabel" + "descriptionlabel" + "ccname" + "enclname" + "pagename" + "headtoname") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("name" "{") + ("address" "{") + ("signature" "{") + ("opening" "{") + ("closing" "{") + ("location" "{") + ("telephone" "{") + ("cc" "{") + ("encl" "{") + ("ps" "{")) + 'function))) + TeX-dialect) + +(defun LaTeX-env-recipient (environment) + "Insert ENVIRONMENT and prompt for recipient and address." + (let ((sender (TeX-read-string "Sender: " (user-full-name))) + (sender-address (TeX-read-string "Sender address: " + LaTeX-letter-sender-address)) + (recipient (TeX-read-string "Recipient: ")) + (address (TeX-read-string "Recipient address: ")) + (signature (TeX-read-string "Signature: ")) + (opening (TeX-read-string "Opening: ")) + (closing (TeX-read-string "Closing: ")) + (date (TeX-read-string "Date: " (LaTeX-today))) + ;; COMPATIBILITY for EMACS<26 + (func (if (fboundp 'indent-relative-first-indent-point) + #'indent-relative-first-indent-point + ;; Stay away from using #' to avoid compiler warning. + 'indent-relative-maybe))) + + (insert TeX-esc "name" TeX-grop sender TeX-grcl) + (newline-and-indent) + (if (not (zerop (length sender-address))) + (progn + (setq LaTeX-letter-sender-address sender-address) + (insert TeX-esc "address" TeX-grop sender-address TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length signature))) + (progn + (insert TeX-esc "signature" TeX-grop signature TeX-grcl) + (newline-and-indent))) + (if (not (zerop (length date))) + (progn + (insert TeX-esc "renewcommand" TeX-grop TeX-esc "today" TeX-grcl + TeX-grop date TeX-grcl) + (newline-and-indent))) + (newline-and-indent) + + (let ((indentation (current-column))) + (LaTeX-insert-environment + environment + (concat TeX-grop recipient + (if (not (zerop (length address))) + (concat + (if (not (zerop (length recipient))) + (concat " " TeX-esc TeX-esc " ")) + address)) + TeX-grcl)) + (save-excursion ; Fix indentation of address + (if (search-backward TeX-grcl nil 'move) + (let ((addr-end (point-marker))) + (if (search-backward TeX-grop nil 'move) + (let ((addr-column (current-column))) + (while (search-forward + (concat TeX-esc TeX-esc) + (marker-position addr-end) 'move) + (progn + (newline) + (indent-to addr-column))))) + (set-marker addr-end nil)))) + (insert "\n") + (indent-to indentation)) + (insert TeX-esc "opening" + TeX-grop + (if (zerop (length opening)) + (concat TeX-esc " ") + opening) + TeX-grcl "\n") + + (funcall func) + (save-excursion + (insert "\n" TeX-esc "closing" + TeX-grop + (if (zerop (length closing)) + (concat TeX-esc " ") + closing) + TeX-grcl "\n") + (funcall func)))) + +(defun LaTeX-today nil + "Return a string representing todays date according to flavor." + (interactive) + (let ((ctime-string (current-time-string)) + (month-alist '(("Jan". "01") + ("Feb" . "02") + ("Mar" . "03") + ("Apr" . "04") + ("May" . "05") + ("Jun" . "06") + ("Jul" . "07") + ("Aug" . "08") + ("Sep" . "09") + ("Oct" . "10") + ("Nov" . "11") + ("Dec" . "12")))) + (string-match + "^\\S-+\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-+\\S-+\\s-+\\(\\S-+\\)" + ctime-string) + (let ((year (substring ctime-string (match-beginning 3) (match-end 3))) + (month (substring ctime-string (match-beginning 1) (match-end 1))) + (day (substring ctime-string (match-beginning 2) (match-end 2)))) + (if (assoc month month-alist) + (progn + (setq month (cdr (assoc month month-alist))) + (if (> 2 (length day)) + (setq day (concat "0" day))))) + (format "%s-%s-%s" year month day)))) + +;;; letter.el ends here diff --git a/elpa/auctex-13.1.3/style/letter.elc b/elpa/auctex-13.1.3/style/letter.elc Binary files differnew file mode 100644 index 0000000..08327ca --- /dev/null +++ b/elpa/auctex-13.1.3/style/letter.elc diff --git a/elpa/auctex-13.1.3/style/lettrine.el b/elpa/auctex-13.1.3/style/lettrine.el new file mode 100644 index 0000000..074ec94 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lettrine.el @@ -0,0 +1,98 @@ +;;; lettrine.el --- AUCTeX style for `lettrine.sty' (v2.21) -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `lettrine.sty' (v2.21) from 2018/08/28. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-lettrine-key-val-options + '(("lines") + ("depth") + ("lhang") + ("loversize") + ("lraise") + ("findent") + ("nindent") + ("slope") + ("ante") + ("image" ("true")) + ("grid" ("true")) + ("novskip") + ("realheight" ("true")) + ("refstring")) + "Key=value options for \\lettrine marco.") + +(TeX-add-style-hook + "lettrine" + (lambda () + (TeX-add-symbols + '("lettrine" [ TeX-arg-key-val LaTeX-lettrine-key-val-options ] + "Letter" "Text") + '("DefaultLoversize" 0) + '("DefaultLraise" 0) + '("DefaultLhang" 0) + '("LettrineImageFalse" 0) + '("LettrineOnGridfalse" 0) + '("LettrineRealHeightfalse" 0) + '("LettrineSelfReffalse" 0) + '("LettrineFont" 0) + '("LettrineFontHook" 0) + '("LettrineTextFont" 0) + ;; above settings can also be input a file, and pointed to with + ;; \renewcommand + '("DefaultOptionsFile" TeX-arg-file-name)) + + ;; Counters: + (LaTeX-add-counters "DefaultLines" "DefaultDepth") + + ;; Lengths and dimensions: + (LaTeX-add-lengths "DefaultFindent" + "DefaultNindent" + "DefaultSlope" + "DiscardVskip" + "LettrineWidth" + "LettrineHeight" + "LettrineDepth") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("lettrine" "[{{")) 'textual))) + TeX-dialect) + +(defvar LaTeX-lettrine-package-options nil + "Package options for the lettrine package.") + +;;; lettrine.el ends here diff --git a/elpa/auctex-13.1.3/style/lettrine.elc b/elpa/auctex-13.1.3/style/lettrine.elc Binary files differnew file mode 100644 index 0000000..e093559 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lettrine.elc diff --git a/elpa/auctex-13.1.3/style/lipsum.el b/elpa/auctex-13.1.3/style/lipsum.el new file mode 100644 index 0000000..7378bc7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lipsum.el @@ -0,0 +1,48 @@ +;;; lipsum.el --- AUCTeX style for `lipsum.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `lipsum.sty'. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "lipsum" + (lambda () + (TeX-add-symbols + '("lipsum" [ "Range of paragraph (max: 150)" ]) + '("lipsum*" [ "Range of paragraph (max: 150)" ]) + '("setlipsumdefault" [ "Default range of paragraph (max: 150)" ]) + '("ChangeLipsumPar" 0))) + TeX-dialect) + +(defvar LaTeX-lipsum-package-options + '("nopar") + "Package options for the lipsum package.") + +;; lipsum.el ends here diff --git a/elpa/auctex-13.1.3/style/lipsum.elc b/elpa/auctex-13.1.3/style/lipsum.elc Binary files differnew file mode 100644 index 0000000..c549383 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lipsum.elc diff --git a/elpa/auctex-13.1.3/style/listings.el b/elpa/auctex-13.1.3/style/listings.el new file mode 100644 index 0000000..cfd4968 --- /dev/null +++ b/elpa/auctex-13.1.3/style/listings.el @@ -0,0 +1,475 @@ +;;; listings.el --- AUCTeX style for `listings.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2009, 2013-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-10-17 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `listings.sty'. +;; +;; May 2015: The style detects new environments defined with +;; `\lstnewenvironment'. Users need to invoke `C-c C-n' for this. +;; +;; October 2015: The style detects new "styles" defined with +;; `\lstdefinestyle' and offers them during key-value query. +;; +;; January 2017: Put label in opt. argument of environment. +;; +;; October 2018: Extract label context for RefTeX. +;; +;; FIXME: Please make me more sophisticated! + +;;; Code: + +;; Needed for compiling `cl-pushnew': +(eval-when-compile + (require 'cl-lib)) + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +;; The following are options taken from chapter 4 of the listings +;; manual (2007/02/22 Version 1.4). +(defvar LaTeX-listings-key-val-options + '(;; Space and placement + ("float" ("t" "b" "p" "h")) ; Support [*] as an optional prefix and that + ; tbph are not exclusive. + ("floatplacement" ("t" "b" "p" "h")) + ("aboveskip") + ("belowskip") + ("lineskip") + ("boxpos" ("b" "c" "t")) + ;; The printed range + ("print" ("true" "false")) + ("firstline") + ("lastline") + ("linerange") + ("consecutivenumbers" ("true" "false")) + ("showlines" ("true" "false")) + ("emptylines") + ("gobble") + ;; Languages and styles + ("style") + ("language") + ("alsolanguage") + ("defaultdialect") + ("printpod" ("true" "false")) + ("usekeywordsintag" ("true" "false")) + ("tagstyle") + ("markfirstintag") + ("makemacrouse" ("true" "false")) + ;; Figure out the appearance + ("basicstyle") + ("identifierstyle") + ("commentstyle") + ("stringstyle") + ("keywordstyle") + ("classoffset") + ("texcsstyle") + ("directivestyle") + ("emph") + ("moreemph") + ("deleteemph") + ("emphstyle") + ("delim") + ("moredelim") + ("deletedelim") + ;; Getting all characters right + ("extendedchars" ("true" "false")) + ("inputencoding") ; Could make use of `latex-inputenc-coding-alist'. + ("upquote" ("true" "false")) + ("tabsize") + ("showtabs" ("true" "false")) + ("tab") + ("showspaces" ("true" "false")) + ("showstringspaces" ("true" "false")) + ("formfeed") + ;; Line numbers + ("numbers" ("none" "left" "right")) + ("stepnumber") + ("numberfirstline" ("true" "false")) + ("numberstyle") + ("numbersep") + ("numberblanklines" ("true" "false")) + ("firstnumber" ("auto" "last")) ; Can also take a number. + ("name") + ;; Captions + ("title") + ("caption") ; Insert braces? + ;; Label is inserted as part of environment insertion; see below + ;; for "lstlisting" in style hook + ;; ("label") + ("nolol" ("true" "false")) + ("numberbychapter" ("true" "false")) + ("captionpos" ("t" "b")) ; Can be a subset of tb. + ("abovecaptionskip") + ("belowcaptionskip") + ;; Margins and line shape + ("linewidth") + ("xleftmargin") + ("xrightmargin") + ("resetmargins" ("true" "false")) + ("breaklines" ("true" "false")) + ("breakatwhitespace" ("true" "false")) + ("prebreak") + ("postbreak") + ("breakindent") + ("breakautoindent" ("true" "false")) + ;; Frames + ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single" + "shadowbox" + ;; Alternative to the above values. A subset of trblTRBL can be + ;; given. + "t" "r" "b" "l" "T" "R" "B" "L")) + ("frameround" ("t" "f")) ; The input actually has to be four times {t,f}. + ("framesep") + ("rulesep") + ("framerule") + ("framexleftmargin") + ("framexrightmargin") + ("framextopmargin") + ("framebottommargin") + ("backgroundcolor") + ("rulecolor") + ("fillcolor") + ("rulesepcolor") + ("frameshape") + ;; Indexing + ("index") + ("moreindex") + ("deleteindex") + ("indexstyle") + ;; Column alignment + ("columns" ("fixed" "flexible" "fullflexible" "spaceflexible")) ; + ; Also supports an optional + ; argument with {c,l,r}. + ("flexiblecolumns" ("true" "false")) + ("keepspaces" ("true" "false")) + ("basewidth") + ("fontadjust" ("true" "false")) + ;; Escaping to LaTeX + ("texcl" ("true" "false")) + ("mathescape" ("true" "false")) + ("escapechar") + ("escapeinside") + ("escapebegin") + ("escapeend") + ;; Interface to fancyvrb + ("fancyvrb" ("true" "false")) + ("fvcmdparams") + ("morefvcmdparams") + ;; Language definitions + ("keywordsprefix") + ("keywords") + ("morekeywords") + ("deletekeywords") + ("texcs") + ("moretexcs") + ("deletetexcs") + ("directives") + ("moredirectives") + ("deletedirectives") + ("sensitive" ("true" "false")) + ("alsoletter") + ("alsodigit") + ("alsoother") + ("otherkeywords") + ("tag") + ("string") + ("morestring") + ("deletestring") + ("comment") + ("morecomment") + ("deletecomment") + ("keywordcomment") + ("morekeywordcomment") + ("deletekeywordcomment") + ("keywordcommentsemicolon") + ("podcomment" ("true" "false")) + ;; The following are all options from chapter 5, which are + ;; experimental + ;; Export of identifiers + ("procnamekeys") + ("moreprocnamekeys") + ("deleteprocnamekeys") + ("procnamestyle") + ("indexprocnames" ("true" "false")) + ;; Hyperlink references + ("hyperref") + ("morehyperref") + ("deletehyperref") + ("hyperanchor") + ("hyperlink") + ;; Literate programming + ("literate") ;; three arguments: replace,replacement text,length + ;; LGrind definitions + ("lgrindef") + ;; Arbitrary linerange markers + ("rangebeginprefix") + ("rangebeginsuffix") + ("rangeendprefix") + ("rangeendsuffix") + ("rangeprefix") + ("rangesuffix") + ("includerangemarker" ("true" "false")) + ;; Multicolumn Listing + ("multicolumn")) + "Key=value options for listings macros and environments.") + +(defun LaTeX-listings-key-val-options () + "Return an updated list of key=vals from listings package." + (append + ;; Check for x?color package. Note that listings requires a \color + ;; command, e.g., 'rulecolor=\color{blue}': + (when (and (or (member "xcolor" (TeX-style-list)) + (member "color" TeX-active-styles))) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (colors (mapcar (lambda (x) + (concat TeX-esc "color" TeX-grop x TeX-grcl)) + (mapcar #'car (funcall colorcmd)))) + (keys '("backgroundcolor" + "fillcolor" + "rulecolor" + "rulesepcolor")) + result) + (dolist (key keys result) + (push (list key colors) result)))) + ;; Cater for user defined styles: + (when (LaTeX-listings-lstdefinestyle-list) + `(("style" ,(mapcar #'car (LaTeX-listings-lstdefinestyle-list))))) + ;; Standard key=vals: + LaTeX-listings-key-val-options)) + +;; Setup for \lstnewenvironment: +(defvar LaTeX-auto-listings-lstnewenvironment nil + "Temporary for parsing the arguments of '\\lstnewenvironment'.") + +(defvar LaTeX-listings-lstnewenvironment-regexp + `(,(concat "\\\\lstnewenvironment" + "[ \t\n\r]*{\\([A-Za-z0-9]+\\)}" + "%?" + "[ \t\n\r]*\\(?:\\[\\([0-9]\\)\\]\\)?" + "%?" + "[ \t\n\r]*\\(\\[\\)?") + (1 2 3) LaTeX-auto-listings-lstnewenvironment) + "Matches the argument of '\\lstnewenvironment'.") + +;; Setup for \lstdefinestyle: +(TeX-auto-add-type "listings-lstdefinestyle" "LaTeX") + +(defvar LaTeX-listings-lstdefinestyle-regexp + '("\\\\lstdefinestyle{\\([^}]+\\)}" + 1 LaTeX-auto-listings-lstdefinestyle) + "Matches the argument of '\\lstdefinestyle' from 'listings' package.") + +;; Setup for parsing the labels inside optional arguments: + +(defvar LaTeX-listings-key-val-label-regexp + `(,(concat + "\\\\begin{lstlisting}" (LaTeX-extract-key-value-label)) + 1 LaTeX-auto-label) + "Matches the label inside an optional argument after \\begin{lstlisting}.") + +(defun LaTeX-listings-auto-prepare () + "Clear temporary variable from 'listings' package before parsing." + (setq LaTeX-auto-listings-lstnewenvironment nil) + (setq LaTeX-auto-listings-lstdefinestyle nil)) + +(defun LaTeX-listings-auto-cleanup () + "Process the parsed results of 'listings' package." + (dolist (env-args LaTeX-auto-listings-lstnewenvironment) + (let ((env (car env-args)) + (args (cadr env-args)) + (opt (nth 2 env-args))) + (cond (;; opt. 1st argument and mandatory argument(s) + (and args (not (string-equal args "")) + opt (not (string-equal opt ""))) + (LaTeX-add-environments + `(,env + LaTeX-env-args + [TeX-arg-key-val (LaTeX-listings-key-val-options)] + (LaTeX-env-label-as-keyval "caption") + ,(1- (string-to-number args))))) + (;; mandatory argument(s) only + (and args (not (string-equal args "")) + (string-equal opt "")) + (LaTeX-add-environments + (list env (string-to-number args)))) + (t ; No args + (LaTeX-add-environments (list env)))) + (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local env t) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-listing-label) t) + ;; Add new env to parser for labels in opt. argument: + (TeX-auto-add-regexp `(,(concat "\\\\begin{" env "}" + (LaTeX-extract-key-value-label)) + 1 LaTeX-auto-label)) + ;; Tell RefTeX + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `((,env ?l "lst:" "~\\ref{%s}" + LaTeX-listings-reftex-label-context-function + (regexp "[Ll]isting"))))) + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords)) + ;; Add new env's to `ispell-tex-skip-alist': skip the entire env + (TeX-ispell-skip-setcdr `(,(cons env (concat "\\\\end{" env "}"))))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-listings-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-listings-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-listings-reftex-label-context-function (env) + "Extract and return a context string for RefTeX. +The context string is the value given to the caption key. If no +caption key is found, an error is issued." + (let* ((envstart (save-excursion + (re-search-backward (concat "\\\\begin{" env "}") + nil t))) + (capt-key (save-excursion + (re-search-backward "caption[ \t\n\r%]*=[ \t\n\r%]*" + envstart t))) + capt-start capt-end) + (if capt-key + (save-excursion + (goto-char capt-key) + (re-search-forward + "caption[ \t\n\r%]*=[ \t\n\r%]*" nil t) + (cond (;; Short caption inside [] is available, extract it only + (looking-at-p (regexp-quote (concat TeX-grop LaTeX-optop))) + (forward-char) + (setq capt-start (1+ (point))) + (setq capt-end (1- (progn (forward-sexp) (point))))) + ;; Extract the entire caption which is enclosed in braces + ((looking-at-p TeX-grop) + (setq capt-start (1+ (point))) + (setq capt-end (1- (progn (forward-sexp) (point))))) + ;; Extract everything to next comma , + (t + (setq capt-start (point)) + (setq capt-end (progn (skip-chars-forward "^,") (point))))) + ;; Return the extracted string + (buffer-substring-no-properties capt-start capt-end)) + (error "No caption found")))) + +(TeX-add-style-hook + "listings" + (lambda () + + ;; Add to parser: + (TeX-auto-add-regexp LaTeX-listings-lstnewenvironment-regexp) + (TeX-auto-add-regexp LaTeX-listings-lstdefinestyle-regexp) + (TeX-auto-add-regexp LaTeX-listings-key-val-label-regexp) + + ;; New symbols + (TeX-add-symbols + '("lstalias" ["Alias dialect"] "Alias" ["Dialect"] "Language") + '("lstdefinestyle" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string "Style name: "))) + (LaTeX-add-listings-lstdefinestyles name) + (format "%s" name)))) + (TeX-arg-key-val (LaTeX-listings-key-val-options))) + '("lstinline" [TeX-arg-key-val (LaTeX-listings-key-val-options)] + TeX-arg-verb-delim-or-brace) + '("lstinputlisting" [TeX-arg-key-val (LaTeX-listings-key-val-options)] + TeX-arg-file) + "lstlistoflistings" + '("lstnewenvironment" "Name" ["Number or arguments"] ["Default argument"] + "Starting code" "Ending code") + '("lstset" (TeX-arg-key-val (LaTeX-listings-key-val-options))) + '("lstloadlanguages" t) + ;; 4.17 Short Inline Listing Commands + '("lstMakeShortInline" [ "Options" ] "Character") + '("lstDeleteShortInline" "Character") + + "lstgrinddeffile" "lstaspectfiles" "lstlanguagefiles" + "lstlistingname" "lstlistingnamestyle" "thelstlisting" + "lstlistlistingname") + + ;; New environments + (LaTeX-add-environments + '("lstlisting" LaTeX-env-args + [TeX-arg-key-val (LaTeX-listings-key-val-options)] + (LaTeX-env-label-as-keyval "caption"))) + + ;; Append "lstlisting" to `LaTeX-label-alist': + (add-to-list 'LaTeX-label-alist '("lstlisting" . LaTeX-listing-label) t) + + ;; Filling + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("lstlisting" current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local "lstlisting") + (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline") + + ;; RefTeX support lstlistings environment via + ;; `reftex-label-alist-builtin'. We add the same thing here only + ;; with our function as 5th element: + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + '(("lstlisting" ?l "lst:" "~\\ref{%s}" + LaTeX-listings-reftex-label-context-function + (regexp "[Ll]isting"))))) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("lstnewenvironment" "{[[{{")) 'function) + (font-latex-add-keywords '(("lstinputlisting" "[{")) 'reference) + (font-latex-add-keywords '(("lstinline" "[") + ("lstlistoflistings" "")) + 'textual) + (font-latex-add-keywords '(("lstalias" "{{") + ("lstdefinestyle" "{{") + ("lstset" "{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-listings-package-options '("draft" "final" "savemem" + "noaspects" + ;; procnames is mentioned in + ;; Section 5.2 + "procnames") + "Package options for the listings package.") + +;;; listings.el ends here diff --git a/elpa/auctex-13.1.3/style/listings.elc b/elpa/auctex-13.1.3/style/listings.elc Binary files differnew file mode 100644 index 0000000..054187e --- /dev/null +++ b/elpa/auctex-13.1.3/style/listings.elc diff --git a/elpa/auctex-13.1.3/style/longtable.el b/elpa/auctex-13.1.3/style/longtable.el new file mode 100644 index 0000000..8db4083 --- /dev/null +++ b/elpa/auctex-13.1.3/style/longtable.el @@ -0,0 +1,154 @@ +;;; longtable.el --- AUCTeX style for `longtable.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013--2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `longtable.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-longtable-skipping-regexp + (regexp-opt '("[l]" "[r]" "[c]" "")) + "Regexp matching between \\begin{longtable} and column specification. +For longtable environments only.") + +(defun LaTeX-item-longtable (&optional suppress) + "Insert line break macro on the last line and suitable number of &'s. +For longtable environments. If SUPPRESS is non-nil, do not +insert line break macro." + (unless suppress + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + (LaTeX-insert-ampersands + LaTeX-longtable-skipping-regexp #'LaTeX-array-count-columns)) + +(defun LaTeX-env-longtable (environment) + "Insert a longtable-like ENVIRONMENT with caption and label." + (let* ((pos (and LaTeX-default-position ; `LaTeX-default-position' + ; can be nil, i.e. no prompt + (completing-read (TeX-argument-prompt t nil "Position") + '("l" "r" "c") + nil nil LaTeX-default-position))) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format))) + (caption (TeX-read-string "Caption: ")) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string "(Optional) Short caption: ")))) + (setq LaTeX-default-position pos + LaTeX-default-format fmt) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop fmt TeX-grcl))) + ;; top caption -- do nothing if user skips caption + (unless (zerop (length caption)) + ;; insert `\caption[short-caption]{caption': + (insert TeX-esc "caption") + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption) + ;; ask for a label and insert it + (LaTeX-label environment 'environment) + ;; the longtable `\caption' is equivalent to a + ;; `\multicolumn', so it needs a `\\' at the + ;; end of the line. Prior to that, add } to + ;; close `\caption{' + (insert TeX-grcl "\\\\") + ;; fill the caption + (when auto-fill-function (LaTeX-fill-paragraph)) + ;; Insert a new line and indent + (LaTeX-newline) + (indent-according-to-mode)) + ;; Insert suitable number of &'s, suppress line break + (LaTeX-item-longtable t))) + +(TeX-add-style-hook + "longtable" + (lambda () + (LaTeX-add-environments + '("longtable" LaTeX-env-longtable)) + + (TeX-add-symbols + ;; Commands to end table rows + '("endhead" 0) + '("endfirsthead" 0) + '("endfoot" 0) + '("endlastfoot" 0) + ;; Caption commands + '("caption*" 1)) + + ;; These parameters are set with \setlength + (LaTeX-add-lengths + "LTleft" "LTright" "LTpre" "LTpost" "LTcapwidth") + + ;; This parameter is set with \setcounter + (LaTeX-add-counters "LTchunksize") + + ;; Use the enhanced table formatting. Append to + ;; `LaTeX-indent-environment-list' in order not to override custom settings. + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("longtable" LaTeX-indent-tabular) t) + + ;; Append longtable to `LaTeX-label-alist', in order not to override possible + ;; custome values. + (add-to-list 'LaTeX-label-alist '("longtable" . LaTeX-table-label) t) + + ;; Append longtable to `LaTeX-item-list' with `LaTeX-item-longtable' + (add-to-list 'LaTeX-item-list '("longtable" . LaTeX-item-longtable) t) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Actually, `\caption*{}' macro takes only one mandatory + ;; argument, not an optional one, the following is a workaround + ;; to fontify correctly also the standard `\caption[]{}' macro. + (font-latex-add-keywords '(("caption" "*[{")) + 'textual))) + TeX-dialect) + +;; `longtable.sty' has two options "errorshow" and "pausing", both for +;; debugging purposes. We ignore them both in order to make package +;; loading faster in a buffer. +(defvar LaTeX-longtable-package-options nil + "Package options for the longtable package.") + +;; longtable.el ends here diff --git a/elpa/auctex-13.1.3/style/longtable.elc b/elpa/auctex-13.1.3/style/longtable.elc Binary files differnew file mode 100644 index 0000000..9dbc7af --- /dev/null +++ b/elpa/auctex-13.1.3/style/longtable.elc diff --git a/elpa/auctex-13.1.3/style/lscape.el b/elpa/auctex-13.1.3/style/lscape.el new file mode 100644 index 0000000..e60cc17 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lscape.el @@ -0,0 +1,48 @@ +;;; lscape.el --- AUCTeX style for `lscape.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2011-05-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `lscape.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "lscape" + (lambda () + (LaTeX-add-environments + "landscape") + ;; lscape uses graphics internally to handle the work + (TeX-run-style-hooks "graphics")) + TeX-dialect) + +(defvar LaTeX-lscape-package-options '("pdftex") + "Package options for the lscape package.") + +;;; lscape.el ends here diff --git a/elpa/auctex-13.1.3/style/lscape.elc b/elpa/auctex-13.1.3/style/lscape.elc Binary files differnew file mode 100644 index 0000000..83d80a0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/lscape.elc diff --git a/elpa/auctex-13.1.3/style/ltablex.el b/elpa/auctex-13.1.3/style/ltablex.el new file mode 100644 index 0000000..1a6c014 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltablex.el @@ -0,0 +1,51 @@ +;;; ltablex.el --- AUCTeX style for `ltablex.sty' (v1.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-03-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ltablex.sty' (v1.1) from 2014/08/13. +;; `ltablex.sty' is part of TeXLive. `ltablex.sty' modifies the +;; tabularx environment to combine the features of the tabularx +;; package with those of the longtable package. All we need is to +;; call those styles and add two macros. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "ltablex" + (lambda () + (TeX-run-style-hooks "tabularx" "longtable") + (TeX-add-symbols + '("keepXColumns" 0) + '("convertXColumns" 0))) + TeX-dialect) + +(defvar LaTeX-ltablex-package-options nil + "Package options for the ltablex package.") + +;;; ltablex.el ends here diff --git a/elpa/auctex-13.1.3/style/ltablex.elc b/elpa/auctex-13.1.3/style/ltablex.elc Binary files differnew file mode 100644 index 0000000..c3486e7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltablex.elc diff --git a/elpa/auctex-13.1.3/style/ltugboat.el b/elpa/auctex-13.1.3/style/ltugboat.el new file mode 100644 index 0000000..7511e52 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltugboat.el @@ -0,0 +1,295 @@ +;;; ltugboat.el --- AUCTeX style for `ltugboat.cls' (v2.22) -*- lexical-binding: t; -*- + +;; Copyright (C) 2019--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-05-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ltugboat.cls' (v2.22) from 2019/11/09. +;; `ltugboat.cls' is part of TeXLive. + +;;; Code: + +(require 'crm) +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-env-ltugboat-verbatim (environment) + "Insert verbatim environment with an optional argument." + (let* ((crm-separator (regexp-quote TeX-esc)) + (opts (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "command(s)") + '("\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" + "\\Huge" "\\makevmeta" "\\ruled") + nil nil TeX-esc) + TeX-esc))) + (LaTeX-insert-environment environment + (when (and opts + (not (string= opts ""))) + (concat LaTeX-optop opts LaTeX-optcl))))) + +(TeX-add-style-hook + "ltugboat" + (lambda () + + ;; Run the style hook for mflogo in order to define the macros \MF + ;; and \MP: + (TeX-run-style-hooks "mflogo") + + ;; Preliminaries: ltugboat.cls suppresses \part & \subparagraph + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "section" "subsection" "subsubsection" "paragraph" + "figure" "table") + + ;; 6 Divisions of the paper + (TeX-add-symbols + '("nameref" TeX-arg-ref)) + + (setq TeX-complete-list + (append + '(("\\\\nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")) + TeX-complete-list)) + + ;; 6.1 Abstracts + (LaTeX-add-environments '("abstract") + '("longabstract")) + + ;; 6.2 Appendices: Cater for appendix environment and don't indent + ;; the content + (LaTeX-add-environments '("appendix")) + + (unless (string-match-p "appendix" LaTeX-document-regexp) + (set (make-local-variable 'LaTeX-document-regexp) + (concat LaTeX-document-regexp "\\|" "appendix"))) + + (TeX-add-symbols + ;; 7 Titles, addresses and so on + '("shortTitle" "Short title") + '("shortAuthor" LaTeX-arg-author) + '("address" "Address") + '("netaddress" "Email address") + '("personalURL" "Web page") + '("ORCID" "Digital identifier") + + ;; 7.1 Compilation articles + '("contributor" "Contributor") + '("makesignature" 0)) + + ;; 8 Verbatim text + (LaTeX-add-environments + '("verbatim" LaTeX-env-ltugboat-verbatim)) + + ;; 10.1 Acronyms and logos + (TeX-add-symbols + '("acro" "Acronym") + "AMS" + "AmS" + "AmSLaTeX" + "AmSTeX" + "ANSI" + "API" + "ASCII" + "aw" + "AW" + "BibLaTeX" + "BibTeX" + "BSD" + "CandT" + "ConTeXt" + "CMkIV" + "Cplusplus" + "CPU" + "CSczabbr" + "CSS" + "CSTUG" + "CSV" + "CTAN" + "DTD" + "DTK" + "DVD" + "DVI" + "DVIPDFMx" + "DVItoVDU" + "ECMS" + "EPS" + "eTeX" + "ExTeX" + "FAQ" + "FTP" + "Ghostscript" + "GNU" + "GUI" + "Hawaii" + "HTML" + "HTTP" + "iOS" + "IDE" + "IEEE" + "ISBN" + "ISO" + "ISSN" + "JPEG" + "JTeX" + "JoT" + "KOMAScript" + "LAMSTeX" + "LuaHBTeX" + "LuaHBLaTeX" + "LuaLaTeX" + "LuaTeX" + "LyX" + "macOS" + "MacOSX" + "MathML" + "mf" + "MFB" + "MkIV" + "mp" + "NTG" + "NTS" + "OMEGA" + "OCP" + "OOXML" + "OTF" + "OTP" + "mtex" + "Pas" + "pcMF" + "PCteX" + "pcTeX" + "pdflatex" + "pdftex" + "PDF" + "PGF" + "PHP" + "PiCTeX" + "plain" + "PNG" + "POBox" + "PS" + "PSTricks" + "RTF" + "SC" + "SGML" + "SliTeX" + "SQL" + "stTeX" + "STIX" + "SVG" + "TANGLE" + "TB" + "TIFF" + "TP" + "TeXhax" + "TeXMaG" + "TeXtures" + "Textures" + "TeXworks" + "TeXXeT" + "TFM" + "Thanh" + "TikZ" + "ttn" + "TTN" + "TUB" + "TUG" + "tug" + "UG" + "UNIX" + "VAX" + "VnTeX" + "VorTeX" + "XML" + "WEB" + "WEAVE" + "WYSIWYG" + "XeTeX" + "XeLaTeX" + "XHTML" + "XSL" + "XSLFO" + "XSLT" + + ;; 10.2 Other special typesetting + "Dash" + '("cs" (TeX-arg-eval let ((macro (completing-read + (TeX-argument-prompt nil nil + "Command") + (TeX-symbol-list)))) + (format "%s" macro))) + '("env" (TeX-arg-eval let ((env (completing-read + (TeX-argument-prompt nil nil + "Environment") + (LaTeX-environment-list)))) + (format "%s" env))) + '("meta" "Text") + '("tubbraced" "Text") + '("nth" "Number") + + ;; 12 Bibliography + '("SetBibJustification" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Justification") + '("\\raggedright" "\\sloppy")))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("shortTitle" "{") + ("shortAuthor" "{") + ("netaddress" "{") + ("personalURL" "{") + ("ORCID" "{") + ("contributor" "{") + ("acro" "{") + ("cs" "{") + ("env" "{") + ("meta" "{") + ("tubbraced" "{") + ("nth" "{")) + 'textual) + (font-latex-add-keywords '(("makesignature" "") + ("SetBibJustification" "{")) + 'function) + (font-latex-add-keywords '(("nameref" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-ltugboat-class-options + '("draft" "final" "preprint" + "extralabel" "harvardcite" "noextralabel" "nonumber" "numbersec" + "onecolumn" "rawcite" "runningfull" "runningminimal" "runningoff" + "a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "titlepage" "notitlepage" "twocolumn" "leqno" "fleqn" "openbib") + "Package options for the ltugboat class.") + +;;; ltugboat.el ends here diff --git a/elpa/auctex-13.1.3/style/ltugboat.elc b/elpa/auctex-13.1.3/style/ltugboat.elc Binary files differnew file mode 100644 index 0000000..66083f4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltugboat.elc diff --git a/elpa/auctex-13.1.3/style/ltx-base.el b/elpa/auctex-13.1.3/style/ltx-base.el new file mode 100644 index 0000000..d10a137 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltx-base.el @@ -0,0 +1,160 @@ +;;; ltx-base.el --- AUCTeX style for basic LaTeX commands. -*- lexical-binding: t; -*- + +;; Copyright (C) 2004--2022 Free Software Foundation, Inc. + +;; Author: Frank Küster <frank@kuesterei.ch> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds general support for basic LaTeX commands used for +;; writing LaTeX class files (.cls), style files (.sty) and package +;; files (.dtx). Most of the macros are taken from clsguide.pdf. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "ltx-base" + (lambda () + (TeX-add-symbols + + ;; 4.1 Identification. Other '\Provide*' macros are available in + ;; latex.el + '("NeedsTeXFormat" "Format" [ "Release date" ]) + + ;; 4.2 Loading files + ;; \RequirePackage is provided in latex.el + '("RequirePackageWithOptions" "Package" [ "Release information" ]) + + '("LoadClass" [ "Options" ] "Class" [ "Release information" ]) + '("LoadClassWithOptions" "Class" [ "Release information" ]) + + ;; 4.3 Option declaration + '("DeclareOption" "Option" t) + '("DeclareOption*" t) + + ;; 4.4 Commands within option code + '("CurrentOption" 0) + '("OptionNotUsed" 0) + + ;; 4.5 Moving options around + '("PassOptionsToPackage" "Option(s) list" "Package") + '("PassOptionsToClass" "Option(s) list" "Class") + + ;; 4.6 Delaying code + '("AtEndOfPackage" t) + '("AtEndOfClass" t) + '("AtBeginDocument" t) + '("AtEndDocument" t) + '("AtBeginDvi" t) + + ;; 4.7 Option processing + '("ProcessOptions" (TeX-arg-literal "\\relax")) + "ProcessOptions*" + '("ExecuteOptions" "Option list") + + ;; 4.8 Safe file commands + '("IfFileExists" "File" 2) + '("InputIfFileExists" "File" 2) + + ;; 4.9 Reporting errors, etc + '("ClassError" "Class name" "Error text" t) + '("PackageError" "Package name" "Error text" t) + + '("ClassWarning" "Class name" t) + '("PackageWarning" "Package name" t) + '("ClassWarningNoLine" "Class name" t) + '("PackageWarningNoLine" "Package name" t) + + '("ClassInfo" "Class name" t) + '("PackageInfo" "Package name" t) + + '("MessageBreak" 0) + '("message" "Log Message") + + ;; 4.10 Defining commands + '("DeclareRobustCommand" + TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + '("DeclareRobustCommand*" + TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t) + + '("CheckCommand" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + '("CheckCommand*" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t) + + ;; 5.1 Layout parameters + ;; \paperheight & \paperwidth are provided in latex.el + + ;; 5.2 Case changing + ;; \MakeUppercase & \MakeLppercase are provided in latex.el + + ;; 5.4 Better user-defined math display environments + "ignorespacesafterend" + + ;; 5.5 Normalising spacing + "normalsfcodes" + + ;; Some general macros not mentioned in clsguide.pdf + '("@addtoreset" TeX-arg-counter (TeX-arg-counter "Within counter")) + '("addpenalty" "Penalty") + '("@ifundefined" TeX-arg-macro 2) + '("@ifnextchar" (TeX-arg-literal " ") (TeX-arg-free "Character") 2) + '("expandafter" 0)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("NeedsTeXFormat" "{[") + ("RequirePackageWithOptions" "{[") + ("LoadClass" "[{[") + ("LoadClassWithOptions" "{[") + ;; Don't fontify the second argument + ;; which will contain code: + ("DeclareOption" "*{") + ("CurrentOption" "") + ("OptionNotUsed" "") + ("PassOptionsToPackage" "{{") + ("PassOptionsToClass" "{{") + + ("AtEndOfPackage" "") + ("AtEndOfClass" "") + ("AtBeginDocument" "") + ("AtEndDocument" "") + ("AtBeginDvi" "") + + ("ProcessOptions" "*") + ("ExecuteOptions" "{") + ("DeclareRobustCommand" "*|{\\[[{") + ("CheckCommand" "*|{\\[[{")) + 'function))) + TeX-dialect) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; ltx-base.el ends here diff --git a/elpa/auctex-13.1.3/style/ltx-base.elc b/elpa/auctex-13.1.3/style/ltx-base.elc Binary files differnew file mode 100644 index 0000000..e180167 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltx-base.elc diff --git a/elpa/auctex-13.1.3/style/ltxdoc.el b/elpa/auctex-13.1.3/style/ltxdoc.el new file mode 100644 index 0000000..16c26e1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxdoc.el @@ -0,0 +1,99 @@ +;;; ltxdoc.el --- AUCTeX style for `ltxdoc.cls' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004--2022 Free Software Foundation, Inc. + +;; Author: Frank Küster <frank@kuesterei.ch> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ltxdoc.cls' v2.1d, dated 2021/12/07. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-article-class-options) + +(TeX-add-style-hook + "ltxdoc" + (lambda () + + ;; ltxdoc.cls loads shortvrb.sty and sets '|' as a shorthand. We + ;; append it to a local version of `LaTeX-shortvrb-chars' before + ;; running the style hook for 'shortvrb' which is done inside + ;; 'doc.el': + (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?| t) + + (TeX-run-style-hooks "doc" "ltx-base" "article") + + (TeX-add-symbols + '("cmd" TeX-arg-macro) + '("cs" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Macro") + (TeX-symbol-list))) + '("marg" "Mandatory argument") + '("oarg" "Optional argument") + '("parg" "Picture mode argument") + + '("DocInclude" + (TeX-arg-eval + (lambda () + (let ((file (file-relative-name + (read-file-name + "File to include: " nil nil nil nil + (lambda (x) + (or (file-directory-p x) + (string-match "\\.\\(fdd\\|dtx\\)\\'" x)))) + (TeX-master-directory)))) + (format "%s" file)))))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cmd" "{") + ("cs" "{") + ("marg" "{") + ("oarg" "{") + ("parg" "{")) + 'textual) + (font-latex-add-keywords '("DocInclude" "{") + 'reference))) + TeX-dialect) + +(defvar LaTeX-ltxdoc-class-options + (progn + (TeX-load-style "article") + (append (remove "a5paper" LaTeX-article-class-options) + '("nocfg"))) + "Class options for the ltxdoc class. +All options are passed to article class, \"a5paper\" is disabled +by ltxdoc. Therefore it is also removed here.") + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; ltxdoc.el ends here diff --git a/elpa/auctex-13.1.3/style/ltxdoc.elc b/elpa/auctex-13.1.3/style/ltxdoc.elc Binary files differnew file mode 100644 index 0000000..516771b --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxdoc.elc diff --git a/elpa/auctex-13.1.3/style/ltxguide.el b/elpa/auctex-13.1.3/style/ltxguide.el new file mode 100644 index 0000000..a30a2a7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxguide.el @@ -0,0 +1,128 @@ +;;; ltxguide.el --- AUCTeX style for `ltxguide.cls' (2001/05/28) -*- lexical-binding: t; -*- + +;; Copyright (C) 2020, 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2020-01-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ltxguide.cls' from 2001/05/28. +;; `ltxguide.cls' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(defvar LaTeX-article-class-options) + +(defun LaTeX-item-ltxguide-decl () + "Insert line break macro on the previous line. +For decl environment provided by ltxguide.cls." + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + +(TeX-add-style-hook + "ltxguide" + (lambda () + + ;; ltxguide.cls loads shortvrb.sty and sets | as a shorthand. + ;; Append it to a local version of `LaTeX-shortvrb-chars' before + ;; running the style hook for `shortvrb': + (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?| t) + + ;; Run style hooks for packages loaded by default: + (TeX-run-style-hooks "shortvrb" "article") + + (TeX-add-symbols + "clsguide" + "usrguide" + "fntguide" + "cfgguide" + "cyrguide" + "modguide" + "sourcecode" + "LaTeXbook" + "LaTeXcomp" + "LaTeXGcomp" + "LaTeXWcomp" + "babel" + "ctan" + "eg" + "ie" + "SLiTeX" + '("m" "Argument") + '("arg" "Argument") + '("oarg" "Argument") + "NFSS" + "AmSLaTeX" + '("URL" "URL") + '("NEWdescription" TeX-arg-date) + '("NEWfeature" TeX-arg-date)) + + (LaTeX-add-environments + '("decl" LaTeX-env-args [ "Date" ])) + + ;; Enable `LaTeX-insert-item' in decl-environments: + (add-to-list 'LaTeX-item-list + '("decl" . LaTeX-item-ltxguide-decl) + t) + + ;; Make the next 2 macros stay in their own line: + (LaTeX-paragraph-commands-add-locally '("NEWdescription" + "NEWfeature")) + + ;; Verbatim-like macros with braces as delimiters: + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "URL") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("m" "{") + ("arg" "{") + ("oarg" "{") + ("NEWfeature" "{") + ("NEWdescription" "{")) + 'textual) + (font-latex-add-keywords '(("URL" "")) + 'reference) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-ltxguide-class-options + (progn + (TeX-load-style "article") + LaTeX-article-class-options) + "Options for the ltxguide document class.") + +;;; ltxguide.el ends here diff --git a/elpa/auctex-13.1.3/style/ltxguide.elc b/elpa/auctex-13.1.3/style/ltxguide.elc Binary files differnew file mode 100644 index 0000000..e2c0a0f --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxguide.elc diff --git a/elpa/auctex-13.1.3/style/ltxtable.el b/elpa/auctex-13.1.3/style/ltxtable.el new file mode 100644 index 0000000..51b9b02 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxtable.el @@ -0,0 +1,101 @@ +;;; ltxtable.el --- AUCTeX style for `ltxtable.sty' (v0.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-03-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ltxtable.sty' (v0.4) from 2021/06/13. +;; `ltxtable.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function reftex-compile-variables + "reftex" + ()) + +(defvar LaTeX-ltxtable-file-regexp + `(,(concat "\\\\LTXtable" + "{\\(?:[^}]+\\)}" + "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}") + 1 TeX-auto-file) + "Matches the file argument of \\LTXtable marco from ltxtable package. +The regexp for the 2. argument is the same as for \"input\" and +\"include\" entries in `LaTeX-auto-regexp-list'.") + +(TeX-add-style-hook + "ltxtable" + (lambda () + (TeX-run-style-hooks "tabularx" "longtable") + + (TeX-add-symbols + '("LTXtable" + (TeX-arg-length "Width" "1.0\\linewidth") + (TeX-arg-eval + (lambda () + (let ((longtable (file-relative-name + (read-file-name + "File with longtable: " + nil nil nil nil + (lambda (x) + (or (file-directory-p x) + (string-match "\\.\\(tex\\|ltx\\)\\'" x)))) + (TeX-master-directory)))) + (format "%s" longtable)))))) + + ;; Make sure that \LTXtable stays in its own line: + (LaTeX-paragraph-commands-add-locally "LTXtable") + + ;; Tell AUCTeX about a new file-include command: + (TeX-auto-add-regexp LaTeX-ltxtable-file-regexp) + + ;; Tell RefTeX about a new file-include command: Add + ;; LTXtable{<width>} as a regexp (without \) to + ;; `reftex-include-file-commands' and run + ;; `reftex-compile-variables'. Do this all only once. + (when (and (boundp 'reftex-include-file-commands) + (not (string-match "LTXtable" + (mapconcat #'identity reftex-include-file-commands "|")))) + (add-to-list 'reftex-include-file-commands "LTXtable{\\(?:[^}]+\\)}" t) + (reftex-compile-variables)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("LTXtable" "{{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-ltxtable-package-options nil + "Package options for the ltxtable package.") + +;;; ltxtable.el ends here diff --git a/elpa/auctex-13.1.3/style/ltxtable.elc b/elpa/auctex-13.1.3/style/ltxtable.elc Binary files differnew file mode 100644 index 0000000..08a9b75 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ltxtable.elc diff --git a/elpa/auctex-13.1.3/style/luacode.el b/elpa/auctex-13.1.3/style/luacode.el new file mode 100644 index 0000000..b5eb8c5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/luacode.el @@ -0,0 +1,71 @@ +;;; luacode.el --- AUCTeX style for `luacode.sty' version 1.2a. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `luacode.sty' 1.2a. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "luacode" + (lambda () + (TeX-add-symbols + '("luadirect" 1) + '("luaexec" 1) + '("luastring" 1) + '("luastringN" 1) + '("luastringO" 1) + '("LuaCodeDebugOn" 0) + '("LuaCodeDebugOff" 0)) + (LaTeX-add-environments + '("luacode") + '("luacode*")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("luadirect" "{") + ("luaexec" "{") + ("luastring" "{") + ("luastringN" "{") + ("luastringO" "{") + ("LuaCodeDebugOn") + ("LuaCodeDebugOff")) + 'function))) + TeX-dialect) + +(defvar LaTeX-luacode-package-options nil + "Package options for the luacode package.") + +;;; luacode.el ends here diff --git a/elpa/auctex-13.1.3/style/luacode.elc b/elpa/auctex-13.1.3/style/luacode.elc Binary files differnew file mode 100644 index 0000000..8dbf9e6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/luacode.elc diff --git a/elpa/auctex-13.1.3/style/luatextra.el b/elpa/auctex-13.1.3/style/luatextra.el new file mode 100644 index 0000000..1fe804d --- /dev/null +++ b/elpa/auctex-13.1.3/style/luatextra.el @@ -0,0 +1,46 @@ +;;; luatextra.el --- AUCTeX style for `luatextra.sty' version 1.0. -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020 Free Software Foundation, Inc. + +;; Author: Davide G. M. Salvetti <salve@debian.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-15 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by the +;; Free Software Foundation; either version 3, or (at your option) any +;; later version. + +;; AUCTeX is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +;; for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, see +;; <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This file adds support for `luatextra.sty' 1.0. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "luatextra" + (lambda () + (TeX-run-style-hooks "ifluatex" "fontspec" + ;; FIXME: yet to be written: + ;; "luatexbase" + "metalogo" "luacode")) + TeX-dialect) + +(defvar LaTeX-luatextra-package-options nil + "Package options for the ifluatex package.") + +;;; luatextra.el ends here diff --git a/elpa/auctex-13.1.3/style/luatextra.elc b/elpa/auctex-13.1.3/style/luatextra.elc Binary files differnew file mode 100644 index 0000000..8bb666c --- /dev/null +++ b/elpa/auctex-13.1.3/style/luatextra.elc diff --git a/elpa/auctex-13.1.3/style/makeidx.el b/elpa/auctex-13.1.3/style/makeidx.el new file mode 100644 index 0000000..4fe7ce4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/makeidx.el @@ -0,0 +1,52 @@ +;;; makeidx.el --- AUCTeX support for makeidx.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "makeidx" + (lambda () + (TeX-add-symbols + "printindex" "indexspace") + + ;; Parsing the default index macro is defined in latex.el + ;; The same is true form completion in the index macro + + ;; Completion for the |see macro + (setq TeX-complete-list + (append + '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)) + TeX-complete-list)) + + ;; RefTeX support + (and (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros '(default)))) + TeX-dialect) + +(defvar LaTeX-makeidx-package-options nil + "Package options for the makeidx package.") + +;;; makeidx.el ends here diff --git a/elpa/auctex-13.1.3/style/makeidx.elc b/elpa/auctex-13.1.3/style/makeidx.elc Binary files differnew file mode 100644 index 0000000..a193737 --- /dev/null +++ b/elpa/auctex-13.1.3/style/makeidx.elc diff --git a/elpa/auctex-13.1.3/style/marginnote.el b/elpa/auctex-13.1.3/style/marginnote.el new file mode 100644 index 0000000..0a977da --- /dev/null +++ b/elpa/auctex-13.1.3/style/marginnote.el @@ -0,0 +1,67 @@ +;;; marginnote.el --- AUCTeX style for `marginnote.sty' (v1.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-07-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `marginnote.sty' (v1.4) from 2018/07/01. +;; `marginnote.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "marginnote" + (lambda () + + (TeX-add-symbols + '("marginnote" [ "Left margin text" ] "Text" + [ TeX-arg-length "Vertical offset" ] ) + + "marginnotetextwidth" + "marginnotevadjust" + "raggedleftmarginnote" + "raggedrightmarginnote" + "marginfont") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("marginnote" "[{[")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-marginnote-package-options + '("fulladjust" "heightadjust" "depthadjust" "noadjust" + "parboxrestore" "noparboxrestore") + "Package options for the marginnote package.") + +;;; marginnote.el ends here diff --git a/elpa/auctex-13.1.3/style/marginnote.elc b/elpa/auctex-13.1.3/style/marginnote.elc Binary files differnew file mode 100644 index 0000000..483a780 --- /dev/null +++ b/elpa/auctex-13.1.3/style/marginnote.elc diff --git a/elpa/auctex-13.1.3/style/mathtools.el b/elpa/auctex-13.1.3/style/mathtools.el new file mode 100644 index 0000000..d0e1f26 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mathtools.el @@ -0,0 +1,504 @@ +;;; mathtools.el --- Style hook for the LaTeX package `mathtools'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2011-2020, 2022 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Created: 2011-02-13 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mathtools.sty' + +;;; Comments: + +;;; This package serves as a wrapper for amsmath, adding more features +;;; and fixing a few bugs in amsmath. The mathstyle argument for many +;;; of the macros is discussed at +;;; <https://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf> + +;;; Code: + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-amsmath-package-options) + +;; amsmath options which can be passed directly to mathtools are +;; appended in the style hook below +(defvar LaTeX-mathtools-package-options + '("fixamsmath" "donotfixamsmathbugs" "allowspaces" "disallowspaces" + ;; Update 2013: We now make \(\) and \[\] robust (can be disabled + ;; via nonrobust package option) + "nonrobust") + "Package options for the mathtools package.") +(TeX-load-style "amsmath") +(dolist (elt LaTeX-amsmath-package-options) + (add-to-list 'LaTeX-mathtools-package-options elt)) + +(defvar LaTeX-mathtools-key-val-options + '(("showonlyrefs") + ("mathic" ("true" "false")) + ("showmanualtags" ("true" "false")) + ;; 3.4.1 Matrices + ("smallmatrix-align" ("c" "l" "r")) + ("smallmatrix-inner-space") + ;; 3.4.2 The multlined environment + ("firstline-afterskip") + ("lastline-preskip") + ("multlined-pos" ("c" "b" "t")) + ("multlined-width") + ;; 3.4.7 Centered \vdots + ("shortvdotsadjustabove") + ("shortvdotsadjustbelow") + ;; 3.5 Intertext and short intertext + ("original-intertext" ("true" "false")) + ("original-shortintertext" ("true" "false")) + ("above-intertext-sep") + ("below-intertext-sep") + ("above-shortintertext-sep") + ("below-shortintertext-sep") + ;; 3.7.2 Vertically centered colon + ("centercolon" ("true" "false")) + ;; 4.2 Left sub/superscripts + ("prescript-sub-format") + ("prescript-sup-format") + ("prescript-arg-format")) + "Options for the \\mathtoolsset command.") + +;; Setup for \newtagform +(TeX-auto-add-type "mathtools-newtagform" "LaTeX") + +(defvar LaTeX-mathtools-newtagform-regexp + '("\\\\newtagform{\\([^}]+\\)}" + 1 LaTeX-auto-mathtools-newtagform) + "Matches the first argument of \\newtagform from mathtools package.") + +;; Setup for \DeclarePairedDelimiter(X)?: +(TeX-auto-add-type "mathtools-DeclarePairedDelimiter" "LaTeX") + +(defvar LaTeX-mathtools-DeclarePairedDelimiter-regexp + `(,(concat "\\\\DeclarePairedDelimiter\\(?:X\\|XPP\\)?" + "{?" + "\\\\\\([a-zA-Z]+\\)" + "}?" + "\\(?:\\[\\([0-9]+\\)\\]\\)?") + (1 2) LaTeX-auto-mathtools-DeclarePairedDelimiter) + "Match the arguments of \\DeclarePairedDelimiterX? from mathtools package.") + +;; Setup for \newgathered +(TeX-auto-add-type "mathtools-newgathered" "LaTeX") + +(defvar LaTeX-mathtools-newgathered-regexp + '("\\\\newgathered{\\([^}]+\\)}" + 1 LaTeX-auto-mathtools-newgathered) + "Matches the first argument of \\newgathered from mathtools package.") + +(defun LaTeX-mathtools-auto-prepare () + "Clear various variables for mathtools package before parsing." + (setq LaTeX-auto-mathtools-newtagform nil + LaTeX-auto-mathtools-DeclarePairedDelimiter nil + LaTeX-auto-mathtools-newgathered nil)) + +(defun LaTeX-mathtools-auto-cleanup () + "Process the parsed elements for mathtools package." + (when (LaTeX-mathtools-DeclarePairedDelimiter-list) + (dolist (delim (LaTeX-mathtools-DeclarePairedDelimiter-list)) + (let ((cmd (car delim)) + (arg (cadr delim))) + (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ] + ,(if (string= arg "") + 1 + (string-to-number arg))) + `(,(concat cmd "*") + ,(if (string= arg "") + 1 + (string-to-number arg))))))) + (when (LaTeX-mathtools-newgathered-list) + (dolist (env (mapcar #'car (LaTeX-mathtools-newgathered-list))) + (LaTeX-add-environments env) + (add-to-list 'LaTeX-item-list + `(,env . LaTeX-item-equation) t) + (add-to-list 'LaTeX-label-alist + `(,env . LaTeX-amsmath-label) t) + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments `((,env ?e nil nil t))))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-mathtools-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-mathtools-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-mathtools-arg-mathstyle-completion (optional) + "Query and insert mathstyle argument to various commands. +If OPTIONAL, insert it as optional argument in brackets." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional nil + (concat "Math style: " TeX-esc) t) + '("displaystyle" "textstyle" + "scriptstyle" "scriptscriptstyle")) + optional TeX-esc)) + +(defun LaTeX-mathtools-arg-mathsize-completion (optional) + "Query and insert math size argument to various commands. +If OPTIONAL, insert it as optional argument in brackets." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional nil + (concat "Size command: " TeX-esc) t) + '("big" "Big" "bigg" "Bigg")) + optional TeX-esc)) + +(defun LaTeX-mathtools-arg-declarepaireddelimiter (optional &optional X) + "Query and insert various \\DeclarePairedDelimiter macros from mathtools package." + (let ((cmd (TeX-read-string (concat "Command: " TeX-esc))) + (arg (when X (TeX-read-string + (TeX-argument-prompt t nil "Number of arguments"))))) + (TeX-add-symbols `(,cmd [ LaTeX-mathtools-arg-mathsize-completion ] + ,(if X + ;; This is no precaution, arg has to be > 0 + (string-to-number arg) + 1)) + `(,(concat cmd "*") + ,(if X + (string-to-number arg) + 1))) + (LaTeX-add-mathtools-DeclarePairedDelimiters + `(,cmd ,(if X arg ""))) + (TeX-argument-insert cmd optional TeX-esc) + (when arg + (insert (concat LaTeX-optop arg LaTeX-optcl))))) + +(defun LaTeX-mathtools-env-multlined (env) + "Query and insert two optional arguments for ENV multlined. +If both arguments are given, insert them in brackets. If only a +width is given, insert it prefixed with a pair of empty +brackets." + (let ((pos (TeX-read-string + (TeX-argument-prompt t nil "Position (t, b or c (default))"))) + (width (completing-read + (TeX-argument-prompt t nil "Width") + (mapcar + (lambda (x) (concat TeX-esc (car x))) + (LaTeX-length-list))))) + (LaTeX-insert-environment + env + (cond (;; both arguments + (and pos (not (string= pos "")) + width (not (string= width ""))) + (format "[%s][%s]" pos width)) + (;; pos not empty, width empty + (and pos (not (string= pos "")) + (string= width "")) + (format "[%s]" pos)) + (;; pos empty, width not + (and (string= pos "") + width (not (string= width ""))) + (format "[][%s]" width)) + (t nil))))) + +(defun LaTeX-mathtools-env-cases (env) + "Insert various cases ENVs incl. an ampersand from mathtools package." + (LaTeX-insert-environment env) + (save-excursion + (insert ?&))) + +(defun LaTeX-mathtools-item-cases () + "Insert contents to terminate a line in multi-line cases environment. +Put line break macro on the last line. Next, insert an ampersand." + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\") + (forward-line 1) + (save-excursion + (insert ?&))) + +(TeX-add-style-hook + "mathtools" + (lambda () + + ;; Add mathtools to parser + (TeX-auto-add-regexp LaTeX-mathtools-newtagform-regexp) + (TeX-auto-add-regexp LaTeX-mathtools-DeclarePairedDelimiter-regexp) + (TeX-auto-add-regexp LaTeX-mathtools-newgathered-regexp) + + ;; "default" is pre-defined + (LaTeX-add-mathtools-newtagforms "default") + + ;; mathtools requires amsmath, as some bugs in amsmath are fixed + (TeX-run-style-hooks "amsmath") + + (LaTeX-add-environments + ;; 3.4.1 Matrices + '("matrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("pmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("bmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("Bmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("vmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("Vmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("smallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("psmallmatrix") + '("psmallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("bsmallmatrix") + '("bsmallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("Bsmallmatrix") + '("Bsmallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("vsmallmatrix") + '("vsmallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + '("Vsmallmatrix") + '("Vsmallmatrix*" [ "Vertical alignment (l, r or c (default))" ]) + ;; 3.4.2 The multlined environment + '("multlined" LaTeX-mathtools-env-multlined) + ;; 3.4.3 More cases -like environments + '("dcases" LaTeX-mathtools-env-cases) + '("dcases*" LaTeX-mathtools-env-cases) + '("rcases" LaTeX-mathtools-env-cases) + '("rcases*" LaTeX-mathtools-env-cases) + '("drcases" LaTeX-mathtools-env-cases) + '("drcases*" LaTeX-mathtools-env-cases) + '("cases*" LaTeX-mathtools-env-cases) + ;; 4.4 Spreading equations + '("spreadlines" "Spacing between lines") + ;; 4.5 Gathered environments + '("lgathered" ["Vertical position (t or b)"]) + '("rgathered" ["Vertical position (t or b)"])) + + (TeX-add-symbols + '("mathtoolsset" (TeX-arg-key-val LaTeX-mathtools-key-val-options)) + ;; 3.1.1 A complement to \smash, \llap, and \rlap + '("mathllap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + '("mathrlap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + '("mathclap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + '("mathmakebox" [ (TeX-arg-length "Width") ] [ "Position" ] 1) + '("clap" 1) + '("mathmbox" 1) + ;; 3.1.2 Forcing a cramped style + '("cramped" [ LaTeX-mathtools-arg-mathstyle-completion ] 1) + '("crampedllap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + '("crampedrlap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + '("crampedclap" [ LaTeX-mathtools-arg-mathstyle-completion ] t) + ;; 3.1.3 Smashing an operator + '("smashoperator" [ "Position (l, r or lr (default)" ] 1) + ;; 3.1.4 Adjusting the limits of operators + '("adjustlimits" t (TeX-arg-literal "_") nil nil (TeX-arg-literal "_") nil) + ;; 3.1.5 Swapping space above AMS display math environments + '("SwapAboveDisplaySkip" 0) + ;; 3.2.1 The appearance of tags + '("newtagform" + (TeX-arg-eval + (lambda () + (let ((newtag (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-mathtools-newtagforms newtag) + (format "%s" newtag)))) + [ "Inner format" ] "Left" "Right") + '("renewtagform" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-mathtools-newtagform-list)) + [ "Inner format" ] "Left" "Right") + '("usetagform" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-mathtools-newtagform-list))) + ;; 3.2.2 Showing only referenced tags + '("refeq" TeX-arg-ref) + '("noeqref" TeX-arg-ref) + ;; 3.3.1 Arrow-like symbols + '("xleftrightarrow" ["Below"] "Above") + '("xLeftarrow" ["Below"] "Above") + '("xRightarrow" ["Below"] "Above") + '("xLeftrightarrow" ["Below"] "Above") + '("xhookleftarrow" ["Below"] "Above") + '("xhookrightarrow" ["Below"] "Above") + '("xmapsto" ["Below"] "Above") + '("xrightharpoondown" ["Below"] "Above") + '("xrightharpoonup" ["Below"] "Above") + '("xleftharpoondown" ["Below"] "Above") + '("xleftharpoonup" ["Below"] "Above") + '("xrightleftharpoons" ["Below"] "Above") + '("xleftrightharpoons" ["Below"] "Above") + ;; 3.3.2 Braces and brackets + '("underbracket" [ (TeX-arg-length "Rule thickness") ] + [ (TeX-arg-length "Bracket height") ] t) + '("overbracket" [ (TeX-arg-length "Rule thickness") ] + [ (TeX-arg-length "Bracket height") ] t) + '("underbrace" 1) + '("overbrace" 1) + '("LaTeXunderbrace" 1) + '("LaTeXoverbrace" 1) + ;; 3.4.2 + '("shoveleft" [ (TeX-arg-length "Dimension") ] 1) + '("shoveright" [ (TeX-arg-length "Dimension") ] 1) + ;; 3.4.4 + '("MoveEqLeft" [ "Number" ]) + ;; 3.4.5 Boxing a single line in an alignment + '("Aboxed" 1) + ;; 3.4.6 Adding arrows between lines in an alignment + '("ArrowBetweenLines" [ TeX-arg-macro ] ) + '("ArrowBetweenLines*" [ TeX-arg-macro ] ) + ;; 3.4.7 Centered \vdots + '("vdotswithin" "Symbol") + '("shortvdotswithin" "Symbol") + '("shortvdotswithin*" "Symbol") + '("MTFlushSpaceAbove") + '("MTFlushSpaceBelow") + ;; 3.5 Intertext and short intertext + ;; don't understand t, but intertext in amsmath.el uses it + '("shortintertext" t) + ;; 3.6 Paired delimiters + '("DeclarePairedDelimiter" + LaTeX-mathtools-arg-declarepaireddelimiter + "Left delimiter" "Right delimiter") + '("DeclarePairedDelimiterX" + (LaTeX-mathtools-arg-declarepaireddelimiter t) + "Left delimiter" "Right delimiter" t) + '("DeclarePairedDelimiterXPP" + (LaTeX-mathtools-arg-declarepaireddelimiter t) + "Pre-code" "Left delimiter" "Right delimiter" 2) + '("delimsize" 0) + ;; 3.6.1 Expert use + '("reDeclarePairedDelimiterInnerWrapper" + (TeX-arg-eval + (lambda () + (let ((cmd (completing-read + (concat "Command: " TeX-esc) + (mapcar #'car (LaTeX-mathtools-DeclarePairedDelimiter-list))))) + (concat TeX-esc cmd)))) + (TeX-arg-eval completing-read + "star or nostar: " + '("star" "nostar")) + t) + ;; 3.7.1 Left and right parentheses + '("lparen" TeX-arg-insert-right-brace-maybe) + '("rparen") + ;; 3.7.2 Vertically centered colon + "vcentcolon" "ordinarycolon" "coloneqq" "Coloneqq" + "coloneq" "Coloneq" "eqqcolon" "Eqqcolon" "eqcolon" + "Eqcolon" "colonapprox" "Colonapprox" "colonsim" "Colonsim" + "dblcolon" + ;; 3.7.3 A few missing symbols + "nuparrow" "ndownarrow" "bigtimes" + ;; 4.2 Left sub/superscripts + '("prescript" "Below" "Above" t) + ;; 4.3 Declaring math sizes + '("DeclareMathSizes" 4) + ;; 4.5 Gathered environments + '("newgathered" + (TeX-arg-eval + (lambda () + (let ((env (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-environments env) + (LaTeX-add-mathtools-newgathereds env) + (add-to-list 'LaTeX-item-list + `(,env . LaTeX-item-equation) t) + (add-to-list 'LaTeX-label-alist + `(,env . LaTeX-amsmath-label) t) + (format "%s" env)))) + 3) + '("renewgathered" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-mathtools-newgathered-list)) + 3) + ;; 4.6 Split fractions + '("splitfrac" 2) + '("splitdfrac" 2)) + + ;; Append delimiters to `TeX-braces-association' + ;; 3.7.1 Left and right parentheses + (make-local-variable 'TeX-braces-association) + (add-to-list 'TeX-braces-association '("\\lparen" . "\\rparen") t) + + (setq LaTeX-item-list + (append '(("multlined" . LaTeX-item-equation) + ("lgathered" . LaTeX-item-equation) + ("rgathered" . LaTeX-item-equation) + ;; FIXME: The entry for spreadlines seems dubious. + ("spreadlines" . LaTeX-item-equation) + ("matrix*" . LaTeX-item-equation) + ("pmatrix*" . LaTeX-item-equation) + ("bmatrix*" . LaTeX-item-equation) + ("Bmatrix*" . LaTeX-item-equation) + ("vmatrix*" . LaTeX-item-equation) + ("Vmatrix*" . LaTeX-item-equation) + ("smallmatrix*" . LaTeX-item-equation) + ("psmallmatrix" . LaTeX-item-equation) + ("psmallmatrix*" . LaTeX-item-equation) + ("bsmallmatrix" . LaTeX-item-equation) + ("bsmallmatrix*" . LaTeX-item-equation) + ("Bsmallmatrix" . LaTeX-item-equation) + ("Bsmallmatrix*" . LaTeX-item-equation) + ("vsmallmatrix" . LaTeX-item-equation) + ("vsmallmatrix*" . LaTeX-item-equation) + ("Vsmallmatrix" . LaTeX-item-equation) + ("Vsmallmatrix*" . LaTeX-item-equation) + ("dcases" . LaTeX-mathtools-item-cases) + ("dcases*" . LaTeX-mathtools-item-cases) + ("rcases" . LaTeX-mathtools-item-cases) + ("rcases*" . LaTeX-mathtools-item-cases) + ("drcases" . LaTeX-mathtools-item-cases) + ("drcases*" . LaTeX-mathtools-item-cases) + ("cases*" . LaTeX-mathtools-item-cases)) + LaTeX-item-list)) + + (setq LaTeX-label-alist + (append '(("lgathered" . LaTeX-amsmath-label) + ("rgathered" . LaTeX-amsmath-label) + ("multlined" . LaTeX-amsmath-label)) + LaTeX-label-alist)) + + ;; RefTeX support: Add env's with `reftex-add-label-environments' + (when (fboundp 'reftex-add-label-environments) + (let ((envs '(("lgathered" ?e nil nil t) + ("rgathered" ?e nil nil t) + ("multlined" ?e nil nil t)))) + (dolist (env envs) + (reftex-add-label-environments `(,env))))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("mathtoolsset" "{") + ("newtagform" "{[{{") + ("renewtagform" "{[{{") + ("DeclarePairedDelimiter" "|{\\{{") + ("DeclarePairedDelimiterX" "|{\\[{{{") + ("DeclarePairedDelimiterXPP" "|{\\[{{{{{") + ("reDeclarePairedDelimiterInnerWrapper" "|{\\{{") + ("DeclareMathSizes" "{{{{") + ("newgathered" "{{{{") + ("renewgathered" "{{{{")) + 'function) + (font-latex-add-keywords '(("usetagform" "{")) + 'variable) + (font-latex-add-keywords '(("refeq" "{") + ("noeqref" "{")) + 'reference))) + TeX-dialect) + +;;; mathtools.el ends here diff --git a/elpa/auctex-13.1.3/style/mathtools.elc b/elpa/auctex-13.1.3/style/mathtools.elc Binary files differnew file mode 100644 index 0000000..7cf3db9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mathtools.elc diff --git a/elpa/auctex-13.1.3/style/mdframed.el b/elpa/auctex-13.1.3/style/mdframed.el new file mode 100644 index 0000000..0e3dd9b --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdframed.el @@ -0,0 +1,410 @@ +;;; mdframed.el --- AUCTeX style for `mdframed.sty' (v1.9b) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-06-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mdframed.sty' (v1.9b) from 2013/07/01. +;; `mdframed.sty' is part of TeXLive. + +;; This style offers only a set of mandatory options for completion +;; while loading the package +;; (cf. `LaTeX-mdframed-package-options-list'). All other options are +;; offered for completion as part of `\mdfsetup'. Please use this +;; command to set options of the package. + +;;; Code: + +(require 'tex) +(require 'latex) +;; Needed for compiling `cl-pushnew': +(eval-when-compile + (require 'cl-lib)) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defvar LaTeX-mdframed-key-val-options + '(;; 6.2. Restoring the settings + ("style" ("defaultoptions")) + ("default") + ;; 6.3. Options with lengths + ("defaultunit" ("pt" "pc" "in" "bp" "cm" "mm" "dd" "cc" "sp" "ex" "em")) + ("skipabove") + ("skipbelow") + ("leftmargin") + ("rightmargin") + ("innerleftmargin") + ("innerrightmargin") + ("innertopmargin") + ("innerbottommargin") + ("linewidth") + ("innerlinewidth") + ("middlelinewidth") + ("outerlinewidth") + ("roundcorner") + ;; 6.4. Colored Options + ("linecolor") + ("innerlinecolor") + ("middlelinecolor") + ("outerlinecolor") + ("backgroundcolor") + ("fontcolor") + ("font") + ;; 6.5. Shadows + ("shadowsize") + ("shadowcolor") + ;; 6.6. Hidden Lines + ("topline" ("true" "false")) + ("rightline" ("true" "false")) + ("leftline" ("true" "false")) + ("bottomline" ("true" "false")) + ("hidealllines" ("true" "false")) + ;; 6.7. Working in twoside-mode + ("outermargin") + ("innermargin") + ("usetwoside" ("true" "false")) + ;; 6.8. Footnotes + ("footnotedistance") + ("footnoteinside" ("true" "false")) + ;; 6.9. Page breaks + ("nobreak" ("true" "false")) + ("everyline" ("true" "false")) + ("splittopskip") + ("splitbottomskip") + ;; 6.10. Frametitle + ("frametitle") + ("frametitlefont") + ("frametitlealignment" ("\\raggedleft" "\\raggedright" "\\centering")) + ("frametitlerule" ("true" "false")) + ("frametitlerulewidth") + ("frametitleaboveskip") + ("frametitlebelowskip") + ("frametitlebackgroundcolor") + ("repeatframetitle" ("true" "false")) + ;; 6.11. Title commands inside the environment + ("subtitleaboveline" ("true" "false")) + ("subtitlebelowline" ("true" "false")) + ("subtitlefont") + ("subtitlebackgroundcolor") + ("subtitleabovelinecolor") + ("subtitlebelowlinecolor") + ("subtitleabovelinewidth") + ("subtitlebelowlinewidth") + ("subtitleaboveskip") + ("subtitlebelowskip") + ("subtitleinneraboveskip") + ("subtitleinnerbelowskip") + ;; 6.12. General options + ("ntheorem" ("true" "false")) + ("needspace") + ("ignorelastdescenders" ("true" "false")) + ("userdefinedwidth" ("\\linewidth" "\\columnwidth")) + ("align" ("left" "right" "center")) + ;; 6.13. TikZ options + ("tikzsetting") + ("apptotikzsetting") + ;; 6.14. PSTricks options + ("pstrickssetting") + ("pstricksappsetting") + ;; 7. Hooks and Bools + ("settings") + ("extra") + ("singleextra") + ("firstextra") + ("middleextra") + ("secondextra") + ("mdfsingleframe" ("true" "false")) + ("mdffirstframe" ("true" "false")) + ("mdfmiddleframe" ("true" "false")) + ("mdflastframe" ("true" "false")) + ("beforesingleframe") + ("aftersingleframe") + ("beforebreak") + ("afterbreak") + ("beforelastframe") + ("afterlastframe") + ("startcode") + ("startinnercode") + ("endinnercode") + ("endcode") + ;; 8. Theorems + ("theoremseparator") + ("theoremtitlefont") + ("theoremspace")) + "Key=value options for mdframed macros and environments.") + +;; Setup for \newmdenv + +(TeX-auto-add-type "mdframed-newmdenv" "LaTeX") + +(defvar LaTeX-mdframed-newmdenv-regexp + `(,(concat + "\\\\newmdenv" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-mdframed-newmdenv) + "Matches the argument of \\newmdenv from mdframed package.") + +;; Setup for \mdfdefinestyle + +(TeX-auto-add-type "mdframed-mdfdefinestyle" "LaTeX") + +(defvar LaTeX-mdframed-mdfdefinestyle-regexp + '("\\\\mdfdefinestyle[ \t\n\r%]*{\\([^}]+\\)}" + 1 LaTeX-auto-mdframed-mdfdefinestyle) + "Matches the argument of \\mdfdefinestyle from mdframed package.") + +;; Setup for \newmdtheoremenv & \mdtheorem + +(TeX-auto-add-type "mdframed-mdtheorem" "LaTeX") + +(defvar LaTeX-mdframed-mdtheorem-regexp + `(,(concat + "\\\\\\(new\\)?mdtheorem\\(?:env\\)?" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + (2 1) LaTeX-auto-mdframed-mdtheorem) + "Matches the argument of \\newmdtheoremenv and \\mdtheorem from mdframed package.") + +(defun LaTeX-mdframed-key-val-options () + "Return an updated list of key=vals from mdframed package. +This function retrieves values of user defined styles and colors +and prepends them to variable `LaTeX-mdframed-key-val-options'." + (append + (when (LaTeX-mdframed-mdfdefinestyle-list) + (let ((val (copy-sequence + (cadr (assoc "style" LaTeX-mdframed-key-val-options))))) + `(("style" ,(append + (mapcar #'car (LaTeX-mdframed-mdfdefinestyle-list)) + val))))) + ;; Check if any color defininig package is loaded and update the + ;; key=values for coloring. Prefer xcolor.sty if both packages are + ;; loaded. Run `TeX-style-list' only once and use + ;; `TeX-active-styles' afterwards: + (when (or (member "xcolor" (TeX-style-list)) + (member "color" TeX-active-styles)) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (colors (mapcar #'car (funcall colorcmd))) + (keys '("linecolor" + "innerlinecolor" + "middlelinecolor" + "outerlinecolor" + "backgroundcolor" + "fontcolor" + "shadowcolor" + "frametitlebackgroundcolor" + "subtitlebackgroundcolor" + "subtitleabovelinecolor" + "subtitlebelowlinecolor")) + result) + (dolist (key keys result) + (cl-pushnew (list key colors) result :test #'equal)))) + LaTeX-mdframed-key-val-options)) + +(defun LaTeX-mdframed-auto-prepare () + "Clear variables before parsing for mdframed package." + (setq LaTeX-auto-mdframed-newmdenv nil + LaTeX-auto-mdframed-mdfdefinestyle nil + LaTeX-auto-mdframed-mdtheorem nil)) + +(defun LaTeX-mdframed-auto-cleanup () + "Process parsed elements for mdframed package." + (dolist (env (mapcar #'car (LaTeX-mdframed-newmdenv-list))) + (LaTeX-add-environments + `(,env LaTeX-env-args [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] )) + (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0)))) + (dolist (newenv (LaTeX-mdframed-mdtheorem-list)) + (let ((env (car newenv)) + (new (cadr newenv))) + (LaTeX-add-environments (list env (vector "Heading"))) + (unless (and new (not (string= new ""))) + (LaTeX-add-environments (list (concat env "*") (vector "Heading"))))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-mdframed-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-mdframed-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "mdframed" + (lambda () + + ;; Add mdframed to the parser + (TeX-auto-add-regexp LaTeX-mdframed-newmdenv-regexp) + (TeX-auto-add-regexp LaTeX-mdframed-mdfdefinestyle-regexp) + (TeX-auto-add-regexp LaTeX-mdframed-mdtheorem-regexp) + + ;; 4. Commands + (TeX-add-symbols + '("mdfsetup" + (TeX-arg-key-val (LaTeX-mdframed-key-val-options))) + + '("newmdenv" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((env (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-environments + `(,env LaTeX-env-args [TeX-arg-key-val (LaTeX-mdframed-key-val-options)])) + ;; Add new env's to `ispell-tex-skip-alist': skip the optional argument + (TeX-ispell-skip-setcdr `((,env ispell-tex-arg-end 0))) + (format "%s" env))))) + + '("renewmdenv" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Environment") + (LaTeX-mdframed-newmdenv-list))) + + '("surroundwithmdframed" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + TeX-arg-environment) + + '("mdflength" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Length") + '(("skipabove") + ("skipbelow") + ("leftmargin") + ("rightmargin") + ("innerleftmargin") + ("innerrightmargin") + ("innertopmargin") + ("innerbottommargin") + ("linewidth") + ("innerlinewidth") + ("middlelinewidth") + ("outerlinewidth")))) + + ;; 5. Defining your own style + '("mdfdefinestyle" + (TeX-arg-eval + (lambda () + (let ((style (TeX-read-string + (TeX-argument-prompt nil nil "Style name")))) + (LaTeX-add-mdframed-mdfdefinestyles style) + (format "%s" style)))) + (TeX-arg-key-val (LaTeX-mdframed-key-val-options))) + + '("mdfapptodefinestyle" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Style name") + (LaTeX-mdframed-mdfdefinestyle-list)) + (TeX-arg-key-val (LaTeX-mdframed-key-val-options))) + + ;; 6.11. Title commands inside the environment + '("mdfsubtitle" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + "Subtitle") + + ;; 8. Theorems + '("newmdtheoremenv" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-environments (list nthm (vector "Heading"))) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) + ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + '("mdtheorem" + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-environments (list nthm (vector "Heading")) + (list (concat nthm "*") (vector "Heading"))) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) + ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ])) + + ;; Main environment defined by mdframed.sty + (LaTeX-add-environments + '("mdframed" LaTeX-env-args + [TeX-arg-key-val (LaTeX-mdframed-key-val-options)] )) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newmdenv" "[{") + ("renewmdenv" "[{") + ("surroundwithmdframed" "[{") + ("mdfsetup" "[{") + ("mdfdefinestyle" "{{") + ("mdfapptodefinestyle" "{{") + ("newmdtheoremenv" "[{[{[") + ("mdtheorem" "[{[{[")) + 'function) + (font-latex-add-keywords '(("mdfsubtitle" "[{")) + 'sectioning-5) + (font-latex-add-keywords '(("mdflength" "{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-mdframed-package-options-list + '(("xcolor") + ("framemethod" ("default" "tex" "latex" "none" "0" + "tikz" "pgf" "1" + "pstricks" "ps" "postscript" "2")) + ("tikz") ("TikZ") + ("ps") ("pstricks") ("PSTricks")) + "Package options for the framed package.") + +(defun LaTeX-mdframed-package-options () + "Prompt for package options for the mdframed package." + (TeX-read-key-val t LaTeX-mdframed-package-options-list)) + +;;; mdframed.el ends here diff --git a/elpa/auctex-13.1.3/style/mdframed.elc b/elpa/auctex-13.1.3/style/mdframed.elc Binary files differnew file mode 100644 index 0000000..2ca6fe3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdframed.elc diff --git a/elpa/auctex-13.1.3/style/mdsymbol.el b/elpa/auctex-13.1.3/style/mdsymbol.el new file mode 100644 index 0000000..d82f87e --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdsymbol.el @@ -0,0 +1,102 @@ +;;; mdsymbol.el --- AUCTeX style for `mdsymbol.sty' (v0.5) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-25 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mdsymbol.sty' (v0.5) from 2012/11/18. +;; The latest version of is available from <https://www.github.com/sebschub>. +;; `mdsymbol.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "mdsymbol" + (lambda () + + ;; Run style hook for various packages loaded by mdsymbol + (TeX-run-style-hooks "textcomp" "amsmath") + + ;; New symbols + (TeX-add-symbols + + ;; These macros take one argument; we follow latex.el and use the + ;; t specifier for the argument; over- and underbrace and sqrt are + ;; already available + '("overgroup" t) + '("undergroup" t) + '("overlinesegment" t) + '("overleftharpoon" t) + '("overrightharpoon" t) + '("underlinesegment" t) + ;; + '("widehat" t) + '("widetilde" t) + '("wideparen" t) + '("vec" t) + '("middlebar" t) + '("middleslash" t) + '("strokethrough" t) + ;; + '("overlining" t)) + + ;; The following macros are usually defined, since retainmissing + ;; defaults to false + (unless (or (LaTeX-provided-package-options-member "mdsymbol" "retainmissing=true") + (LaTeX-provided-package-options-member "mdsymbol" "retainmissing")) + (TeX-add-symbols + '("dagger") + '("ddagger") + '("mathparagraph") + '("mathsection") + '("mathdollar") + '("mathsterling") + '("yen") + '("hbar") + '("hslash") + '("circledR") + '("circledS") + '("lambdabar") + '("lambdaslash")))) + TeX-dialect) + +(defvar LaTeX-mdsymbol-package-options + '(;; + ("normalweight" ("Light" "Regular" "autolight" "autoregular")) + ("boldweight" ("Semibold" "Bold" "autosemibold")) + ("onlysansmath" ("true" "false")) + ("retainmissing" ("true" "false")) + ("scale") + ("largedelims" ("true" "false"))) + "Package options for the mdsymbol package.") + +(defun LaTeX-mdsymbol-package-options nil + "Prompt for package options for the mdsymbol package." + (TeX-read-key-val t LaTeX-mdsymbol-package-options)) + +;;; mdsymbol.el ends here diff --git a/elpa/auctex-13.1.3/style/mdsymbol.elc b/elpa/auctex-13.1.3/style/mdsymbol.elc Binary files differnew file mode 100644 index 0000000..3da1914 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdsymbol.elc diff --git a/elpa/auctex-13.1.3/style/mdwlist.el b/elpa/auctex-13.1.3/style/mdwlist.el new file mode 100644 index 0000000..8335c02 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdwlist.el @@ -0,0 +1,72 @@ +;;; mdwlist.el --- AUCTeX style for `mdwlist.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mdwlist.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "mdwlist" + (lambda () + (TeX-add-symbols + '("makecompactlist" "New environment" "Existing environment") + '("suspend" "Environment") ; this could be done nicer by automatically + '("resume" "Environment")) ; determining the environment + (LaTeX-add-environments + '("enumerate*" LaTeX-env-item) + '("itemize*" LaTeX-env-item) + '("description*" LaTeX-env-item)) + ;; Indentation and filling + (make-local-variable 'LaTeX-begin-regexp) + (setq LaTeX-begin-regexp (concat LaTeX-begin-regexp "\\|resume\\b")) + (make-local-variable 'LaTeX-end-regexp) + (setq LaTeX-end-regexp (concat LaTeX-end-regexp "\\|suspend\\b")) + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat paragraph-start + "\\|[ \t]*" TeX-comment-start-regexp "*[ \t]*" + (regexp-quote TeX-esc) + "\\(resume\\b\\|suspend\\b\\)")) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("makecompactlist" "{{") + ("suspend" "[{") + ("resume" "[{[")) + 'function))) + TeX-dialect) + +(defvar LaTeX-mdwlist-package-options nil + "Package options for the mdwlist package.") + +;;; mdwlist.el ends here diff --git a/elpa/auctex-13.1.3/style/mdwlist.elc b/elpa/auctex-13.1.3/style/mdwlist.elc Binary files differnew file mode 100644 index 0000000..2ad3e51 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mdwlist.elc diff --git a/elpa/auctex-13.1.3/style/memoir.el b/elpa/auctex-13.1.3/style/memoir.el new file mode 100644 index 0000000..7945bc0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/memoir.el @@ -0,0 +1,88 @@ +;;; memoir.el --- AUCTeX style for `memoir.cls' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2012-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `memoir.cls'. Memoir is a very extensive +;; document class that lets you configure things very easily; `memoir' +;; loads (emulates) a lot of classes. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "memoir" + (lambda () + (TeX-add-symbols + ;; 6.4 Book and part headings + "beforebookskip" "afterbookskip" + "beforepartskip" "afterpartskip" + + "printbookname" "booknamefont" + "booknamenum" + "printbooknum" "booknumfont" + "printpartname" "partnamefont" + "partnamenum" + "printpartnum" "partnumfont" + + '("printbooktitle" "Title") + "booktitlefont" + '("printparttitle" "Title") + "parttitlefont" + + '("bookpagemark" "Title") + '("partmark" "Title") + + "bookpageend" "bookblankpage" "nobookblankpage" + "partpageend" "partblankpage" "nopartblankpage" + + '("newleadpage" [ TeX-arg-pagestyle ] 1 "Title") + '("newleadpage*" [ TeX-arg-pagestyle ] 1 "Title") + '("renewleadpage*" [ TeX-arg-pagestyle ] 1 "Title") + '("renewleadpage*" [ TeX-arg-pagestyle ] 1 "Title") + + "leadpagetoclevel") + + (LaTeX-add-environments "abstract") + + ;; Emulated packages. The `memoir' class contains a list of files + ;; emulated at the end of the class-file + (TeX-run-style-hooks + "abstract" "appendix" "array" "booktabs" "ccaption" + "changepage" "chngcntr" "chngpage" "crop" "dcolumn" + "delarray" "enumerate" "epigraph" "ifmtarg" "ifetex" + "ifluatex" "ifpdf" "ifxetex" "index" "makeidx" "moreverb" + "mparhack" "needspace" "newfile" "nextpage" "pagenote" + "parskip" "patchcmd" "setspace" "shortvrb" "showidx" + "tabularx" "titleref" "titling" "tocbibind" "tocloft" + "verbatim" "verse") + + (LaTeX-largest-level-set "chapter")) + TeX-dialect) + +;;; memoir.el ends here diff --git a/elpa/auctex-13.1.3/style/memoir.elc b/elpa/auctex-13.1.3/style/memoir.elc Binary files differnew file mode 100644 index 0000000..9e17287 --- /dev/null +++ b/elpa/auctex-13.1.3/style/memoir.elc diff --git a/elpa/auctex-13.1.3/style/menukeys.el b/elpa/auctex-13.1.3/style/menukeys.el new file mode 100644 index 0000000..ac375ea --- /dev/null +++ b/elpa/auctex-13.1.3/style/menukeys.el @@ -0,0 +1,547 @@ +;;; menukeys.el --- AUCTeX style for `menukeys.sty' (v1.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-02-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `menukeys.sty' (v1.4) from 2016/04/18. +;; `menukeys.sty' is part of TeXLive. + +;;; Code: + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defvar LaTeX-menukeys-input-separators-list + '("/" "=" "*" "+" "," ";" ":" "-" ">" "<" "bslash") + "List of input separators for macros of menukeys package.") + +(defvar LaTeX-menukeys-predefined-styles-list + '("menus" "roundedmenus" "angularmenus" "roundedkeys" + "shadowedroundedkeys" "angularkeys" "shadowedangularkeys" + "typewriterkeys" "paths" "pathswithfolder" + "pathswithblackfolder" "hyphenatepaths" + "hyphenatepathswithfolder" + "hyphenatepathswithblackfolder") + "List of predefined styles for macros from menukeys package.") + +;; Setup for \newmenustyle(simple): +(TeX-auto-add-type "menukeys-newmenustyle" "LaTeX") + +(defvar LaTeX-menukeys-newmenustyle-regexp + '("\\\\\\(?:new\\|copy\\)menustyle\\(?:simple\\)?*?{\\([^}]+\\)}" + 1 LaTeX-auto-menukeys-newmenustyle) + "Matches the argument of \\newmenustyle and +\\newmenustylesimple from menukeys package.") + +;; Setup for \newmenucolortheme: +(TeX-auto-add-type "menukeys-newmenucolortheme" "LaTeX") + +(defvar LaTeX-menukeys-newmenucolortheme-regexp + '("\\\\\\(?:new\\|copy\\)menucolortheme{\\([^}]+\\)}" + 1 LaTeX-auto-menukeys-newmenucolortheme) + "Matches the argument of \\newmenucolortheme from menukeys package.") + +;; Setup for \newmenumacro: +(TeX-auto-add-type "menukeys-newmenumacro" "LaTeX") + +(defvar LaTeX-menukeys-newmenumacro-regexp + `(,(concat + "\\\\\\(new\\|renew\\|provide\\)menumacro" + "{?" + (regexp-quote TeX-esc) + "\\([a-zA-Z]+\\)" + "}?" + "\\(?:\\[\\([^]]*\\)\\]\\)?") + (2 3 1) LaTeX-auto-menukeys-newmenumacro) + "Matches the arguments of \\newmenumacro from menukeys package.") + +(defun LaTeX-menukeys-auto-prepare () + "Clear various `LaTeX-auto-menukeys-*' variables before parsing." + (setq LaTeX-auto-menukeys-newmenustyle nil + LaTeX-auto-menukeys-newmenucolortheme nil + LaTeX-auto-menukeys-newmenumacro nil)) + +(defun LaTeX-menukeys-auto-cleanup () + "Process the parsed elements for menukeys package. +This function adds parsed elements from the variable +`LaTeX-menukeys-newmenumacro-list' to AUCTeX via the function +`TeX-add-symbols'. The variable +`LaTeX-menukeys-newmenumacro-list' and not the function with the +same name is used since this function looks for the order of +commands which are set by \\renewmenumacro in order to pick the +current separator. These renew-commands are also removed first +from the variable `TeX-symbol-list' before being re-added." + (dolist (x (apply #'append LaTeX-menukeys-newmenumacro-list)) + (let ((macro (nth 0 x)) + (sep (nth 1 x)) + (renew (when (string= (nth 2 x) "renew") + (nth 2 x)))) + ;; When we are renewmenumacro'ing, delete the entry first from the + ;; variable `TeX-symbol-list' and then add the new spec: + (when renew + (setq TeX-symbol-list + (assq-delete-all (car (assoc macro (TeX-symbol-list))) TeX-symbol-list))) + (TeX-add-symbols + `(,macro [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil + ,(concat "Input separator " + "(default " + (if (and sep (not (string= sep ""))) + sep + ",") + ")")) + LaTeX-menukeys-input-separators-list ] t )) + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,macro "[{")) + 'textual))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-menukeys-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-menukeys-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-menukeys-newmenumacro (optional &optional renew) + "Query and insert the arguments of \\newmenumacro from menukeys package. +After inserting, add the name of macro and the optional separator +to the name of known macros via `TeX-add-symbols'. If +font-latex.el is loaded, also use `font-latex-add-keywords' on +macro. If RENEW is non-nil, query for an already defined macro." + (let ((macro (if renew + (completing-read + (concat "Macro: " TeX-esc) + (TeX-delete-duplicate-strings (mapcar #'car (LaTeX-menukeys-newmenumacro-list)))) + (TeX-read-string (concat "Macro: " TeX-esc)))) + (sep (completing-read + (TeX-argument-prompt optional nil "Input separator (default ,)") + LaTeX-menukeys-input-separators-list)) + (style (completing-read + (TeX-argument-prompt optional nil "Style") + (LaTeX-menukeys-newmenustyle-list)))) + (TeX-argument-insert (concat TeX-esc macro) optional) + (when (and sep (not (string= sep ""))) + (insert (format "[%s]" sep))) + (TeX-argument-insert style optional) + ;; When we are renewmenumacro'ing, delete the entry first from the + ;; variable `TeX-symbol-list' and then add the new spec: + (when renew + (setq TeX-symbol-list + (assq-delete-all (car (assoc macro (TeX-symbol-list))) TeX-symbol-list))) + (TeX-add-symbols + `(,macro [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil + ,(concat "Input separator " + "(default " + (if (and sep (not (string= sep ""))) + sep + ",") + ")")) + LaTeX-menukeys-input-separators-list ] t )) + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,macro "[{")) + 'textual)))) + +(TeX-add-style-hook + "menukeys" + (lambda () + + ;; Add menukeys to the parser + (TeX-auto-add-regexp LaTeX-menukeys-newmenustyle-regexp) + (TeX-auto-add-regexp LaTeX-menukeys-newmenucolortheme-regexp) + (TeX-auto-add-regexp LaTeX-menukeys-newmenumacro-regexp) + + ;; Activate predefined stuff + (apply #'LaTeX-add-menukeys-newmenustyles LaTeX-menukeys-predefined-styles-list) + (LaTeX-add-menukeys-newmenucolorthemes "gray" "blacknwhite") + + ;; Run style hooks for xcolor, tikz and relsize + (TeX-run-style-hooks "xcolor" "tikz" "relsize") + + ;; 4.1 Basic macros: These are not defined if the package option + ;; definemenumacros ist set to false (default is true). We check + ;; for the package option here and add them. + (unless (LaTeX-provided-package-options-member "menukeys" "definemenumacros=false") + (TeX-add-symbols + ;; \menu [<separator>]{<sequence>} + ;; \directory [<separator>]{path} + ;; \keys [<separator>]{keystrokes} + '("menu" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Input separator") + LaTeX-menukeys-input-separators-list ] + t) + + '("directory" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Input separator") + LaTeX-menukeys-input-separators-list ] + t) + + '("keys" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Input separator") + LaTeX-menukeys-input-separators-list ] + t))) + + (TeX-add-symbols + ;; 4.2.1 Predefined styles + ;; \drawtikzfolder[<front fill>][<draw>] + '("drawtikzfolder" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Front color") + (LaTeX-xcolor-definecolor-list) ] + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Line color") + (LaTeX-xcolor-definecolor-list) ] ) + + ;; 4.2.2 Declaring styles + ;; \newmenustylesimple*{<name>}[<pre>]{<style>}[<sep>][<post>]{<theme>} + '("newmenustylesimple" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + '("newmenustylesimple*" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + ;; \newmenustyle*{<name>}[<pre>]{<first>}[<sep>]{<mid>}{<last>}{<single>}[<post>]{<theme>} + '("newmenustyle" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] nil nil nil [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + '("newmenustyle*" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] nil nil nil [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + '("CurrentMenuElement" 0) + + ;; 4.2.3 Copying styles + '("copymenustyle" + (TeX-arg-eval + (lambda () + (let ((copy (TeX-read-string + (TeX-argument-prompt nil nil "Copy"))) + (orig (completing-read + (TeX-argument-prompt nil nil "Original") + (LaTeX-menukeys-newmenustyle-list)))) + (LaTeX-add-menukeys-newmenustyles copy) + (TeX-argument-insert copy nil) + (format "%s" orig))))) + + ;; 4.2.4 Changing styles + ;; \changemenuelement*{name}{element}{definition} + '("changemenuelement" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-menukeys-newmenustyle-list)) + 2) + + '("changemenuelement*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-menukeys-newmenustyle-list)) + 2) + + ;; Same arguments as \newmenustylesimple + '("renewmenustylesimple" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-menukeys-newmenustyle-list)) + [ t ] nil [ nil ] [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + '("providemenustylesimple" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + ;; Same arguments as \newmenustyle + '("providemenustyle" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-menukeys-newmenustyle-list)) + [ t ] nil [ nil ] nil nil nil [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + '("renewmenustyle" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenustyles name) + (format "%s" name)))) + [ t ] nil [ nil ] nil nil nil [ nil ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color theme") + (LaTeX-menukeys-newmenucolortheme-list))) + + ;; 4.3 Color themes + ;; 4.3.2 Create a theme + ;; \newmenucolortheme{<name>}{<model>}{<bg>}{<br>}{<txt>}[<a>][<b>][<c>] + '("newmenucolortheme" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenucolorthemes name) + (format "%s" name)))) + (TeX-arg-eval + (lambda () + (let ((model (completing-read + (TeX-argument-prompt nil nil "Model") + (LaTeX-xcolor-color-models)))) + (TeX-argument-insert model nil) + (if (string= model "named") + (let ((bg (completing-read + (TeX-argument-prompt nil nil "Node background color") + (LaTeX-xcolor-definecolor-list))) + (br (completing-read + (TeX-argument-prompt nil nil "Node border color") + (LaTeX-xcolor-definecolor-list))) + (txt (completing-read + (TeX-argument-prompt nil nil "Node text color") + (LaTeX-xcolor-definecolor-list)))) + (TeX-argument-insert bg nil) + (TeX-argument-insert br nil) + (format "%s" txt)) + (let ((bg (TeX-read-string + (TeX-argument-prompt nil nil "Node background color spec"))) + (br (TeX-read-string + (TeX-argument-prompt nil nil "Node border color spec"))) + (txt (TeX-read-string + (TeX-argument-prompt nil nil "Node text color spec")))) + (TeX-argument-insert bg nil) + (TeX-argument-insert br nil) + (format "%s" txt)))))) + (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ") + ( [ 3 ] ) + (ignore))) + + ;; 4.3.3 Copy a theme + '("copymenucolortheme" + (TeX-arg-eval + (lambda () + (let ((copy (TeX-read-string + (TeX-argument-prompt nil nil "Copy"))) + (orig (completing-read + (TeX-argument-prompt nil nil "Original") + (LaTeX-menukeys-newmenucolortheme-list)))) + (LaTeX-add-menukeys-newmenucolorthemes copy) + (TeX-argument-insert copy nil) + (format "%s" orig))))) + + ;; 4.3.4 Change a theme + '("changemenucolor" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-menukeys-newmenucolortheme-list)) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Element") + '("bg" "br" "txt")) + (TeX-arg-eval + (lambda () + (let ((model (completing-read + (TeX-argument-prompt nil nil "Model") + (LaTeX-xcolor-color-models)))) + (TeX-argument-insert model nil) + (if (string= model "named") + (let ((color (completing-read + (TeX-argument-prompt nil nil "Color") + (LaTeX-xcolor-definecolor-list)))) + (format "%s" color)) + (let ((color (TeX-read-string + (TeX-argument-prompt nil nil "Color spec")))) + (format "%s" color))))))) + + ;; Same arguments as \newmenucolortheme + '("renewmenucolortheme" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-menukeys-newmenucolorthemes name) + (format "%s" name)))) + (TeX-arg-eval + (lambda () + (let ((model (completing-read + (TeX-argument-prompt nil nil "Model") + (LaTeX-xcolor-color-models)))) + (TeX-argument-insert model nil) + (if (string= model "named") + (let ((bg (completing-read + (TeX-argument-prompt nil nil "Node background color") + (LaTeX-xcolor-definecolor-list))) + (br (completing-read + (TeX-argument-prompt nil nil "Node border color") + (LaTeX-xcolor-definecolor-list))) + (txt (completing-read + (TeX-argument-prompt nil nil "Node text color") + (LaTeX-xcolor-definecolor-list)))) + (TeX-argument-insert bg nil) + (TeX-argument-insert br nil) + (format "%s" txt)) + (let ((bg (TeX-read-string + (TeX-argument-prompt nil nil "Node background color spec"))) + (br (TeX-read-string + (TeX-argument-prompt nil nil "Node border color spec"))) + (txt (TeX-read-string + (TeX-argument-prompt nil nil "Node text color spec")))) + (TeX-argument-insert bg nil) + (TeX-argument-insert br nil) + (format "%s" txt)))))) + (TeX-arg-conditional (y-or-n-p "With additional optional arguments? ") + ( [ 3 ] ) + (ignore))) + + ;; 4.4 Menu macros + ;; 4.4.2 Defining or changing menu macros + ;; \newmenumacro{<macro>} [<input sep>]{<style>} + '("newmenumacro" TeX-arg-menukeys-newmenumacro) + '("providemenumacro" TeX-arg-menukeys-newmenumacro) + '("renewmenumacro" (TeX-arg-menukeys-newmenumacro t))) + + ;; 4.5 Keys: These macros are defined when definekeys option is not + ;; false. + ;; 0 : No argment, one macro + ;; 1 : One argument, with completion + ;; 2 : No argment, three macros: \<key>, \<key>win, \<key>mac + (unless (LaTeX-provided-package-options-member "menukeys" "definekeys=false") + (let ((keycmds '(("shift" . 0) ("capslock" . 2) ("tab" . 2) + ("esc" . 2) ("ctrl" . 2) ("alt" . 2) + ("AltGr" . 0) ("cmd" . 0) ("Space" . 0) + ("SPACE" . 0) ("return" . 2) ("enter" . 2) + ("winmenu" . 0) ("backspace" . 0) ("del" . 0) + ("arrowkeyup" . 0) ("arrowkeydown" . 0) + ("arrowkeyleft" . 0) ("arrowkeyright" . 0) + ("arrowkey" . 1) + ;; Text inside some keys: + ("ctrlname" . 0) ("delname" . 0) ("spacename" . 0))) + (os '("mac" "win")) + collector) + (dolist (cmd keycmds) + (cond + ((= (cdr cmd) 0) + (push (car cmd) collector)) + ((= (cdr cmd) 1) + (push (list (car cmd) '(TeX-arg-eval completing-read + "Direction: " + '("^" "v" ">" "<"))) + collector)) + ((= (cdr cmd) 2) + (push (car cmd) collector) + (dolist (x os) + (push (concat (car cmd) x) collector))))) + (apply #'TeX-add-symbols collector))) + + ;; Fontification: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("menu" "[{") + ("directory" "[{") + ("keys" "[{") + ("drawtikzfolder" "[[")) + 'textual) + (font-latex-add-keywords '(("newmenustylesimple" "*{[{[[{") + ("newmenustyle" "*{[{[{{{[{") + ("copymenustyle" "{{") + ("changemenuelement" "*{{{") + ("renewmenustylesimple" "{[{[[{") + ("providemenustylesimple" "{[{[[{") + ("providemenustyle" "{[{[{{{[{") + ("renewmenustyle" "{[{[{{{[{") + ("newmenucolortheme" "{{{{{[[[") + ("copymenucolortheme" "{{") + ("changemenucolor" "{{{{") + ("renewmenucolortheme" "{{{{{[[[") + ("newmenumacro" "|{\\[{") + ("providemenumacro" "|{\\[{") + ("renewmenumacro" "|{\\[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-menukeys-package-options-list + '(("definemenumacros" ("true" "false")) + ("definekeys" ("true" "false")) + ("mackeys" ("text" "symbols")) + ("os" ("mac" "win"))) + "Package options for menukeys package.") + +(defun LaTeX-menukeys-package-options () + "Prompt for package options for the menukeys package." + (TeX-read-key-val t LaTeX-menukeys-package-options-list)) + +;;; menukeys.el ends here diff --git a/elpa/auctex-13.1.3/style/menukeys.elc b/elpa/auctex-13.1.3/style/menukeys.elc Binary files differnew file mode 100644 index 0000000..0ab6f3c --- /dev/null +++ b/elpa/auctex-13.1.3/style/menukeys.elc diff --git a/elpa/auctex-13.1.3/style/metalogo.el b/elpa/auctex-13.1.3/style/metalogo.el new file mode 100644 index 0000000..fc6233c --- /dev/null +++ b/elpa/auctex-13.1.3/style/metalogo.el @@ -0,0 +1,92 @@ +;;; metalogo.el --- AUCTeX style for `metalogo.sty' version 0.12. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the `metalogo.sty' version 0.12. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "metalogo" + (lambda () + (TeX-add-symbols + ;; Logos + '("LaTeXe") + '("XeTeX") + '("XeLaTeX") + '("LuaTeX") + '("LuaLaTeX") + ;; Commands + '("setlogokern" + (TeX-arg-eval completing-read "Kern parameters: " + '(("Te") ("eX") ("La") ("aT") ("Xe") ("eT") ("eL") ("X2"))) + (TeX-arg-length "Dimension")) + '("setlogodrop" + [TeX-arg-eval completing-read "Drop parameters: " + '(("TeX") ("Xe") ("XeTeX"))] + (TeX-arg-length "Dimension")) + '("setLaTeXa" 1) + '("setLaTeXee" 1) + '("seteverylogo" 1) + '("everylogo" 1)) + + ;; The main macros of this package are the logos, while fine-tuning commands + ;; probably will be used only by expert users. + (TeX-declare-expert-macros + "metalogo" + "setlogokern" "setlogodrop" "setLaTeXa" "setLaTeXee" + "seteverylogo" "everylogo") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '( ;; Logos + ("LaTeXe") + ("XeTeX") + ("XeLaTeX") + ("LuaTeX") + ("LuaLaTeX") + ;; Commands + ("setlogokern" "{{") + ("setlogodrop" "[{") + ("setLaTeXa" "{") + ("setLaTeXee" "{") + ("seteverylogo" "{") + ("everylogo" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-metalogo-package-options nil + "Package options for the metalogo package.") + +;;; metalogo.el ends here diff --git a/elpa/auctex-13.1.3/style/metalogo.elc b/elpa/auctex-13.1.3/style/metalogo.elc Binary files differnew file mode 100644 index 0000000..50fc2e6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/metalogo.elc diff --git a/elpa/auctex-13.1.3/style/mflogo.el b/elpa/auctex-13.1.3/style/mflogo.el new file mode 100644 index 0000000..c8d25d2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mflogo.el @@ -0,0 +1,61 @@ +;;; mflogo.el --- AUCTeX style for `mflogo.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012, 2019, 2020, 2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2011-02-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mflogo.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "mflogo" + (lambda () + (TeX-add-symbols + '("textlogo" "Text") + '("logofamily" -1) + "MF" + "MP") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlogo" "{")) + 'type-command) + (font-latex-add-keywords '(("logofamily" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-mflogo-package-options nil + "Package options for the mflogo package.") + +;;; mflogo.el ends here diff --git a/elpa/auctex-13.1.3/style/mflogo.elc b/elpa/auctex-13.1.3/style/mflogo.elc Binary files differnew file mode 100644 index 0000000..6437c68 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mflogo.elc diff --git a/elpa/auctex-13.1.3/style/midfloat.el b/elpa/auctex-13.1.3/style/midfloat.el new file mode 100644 index 0000000..66d794c --- /dev/null +++ b/elpa/auctex-13.1.3/style/midfloat.el @@ -0,0 +1,51 @@ +;;; midfloat.el --- AUCTeX style for `midfloat.sty' (v1.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `midfloat.sty' (v1.1) from 2012/05/29. +;; `midfloat.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "midfloat" + (lambda () + + ;; Add the only environment provided by the package: + (LaTeX-add-environments + '("strip" ["Top/Bottom skip"])) + + ;; This is a glue, in LaTeX set with \setlength: + (LaTeX-add-lengths "stripsep")) + TeX-dialect) + +(defvar LaTeX-midfloat-package-options nil + "Package options for the midfloat package.") + +;;; midfloat.el ends here diff --git a/elpa/auctex-13.1.3/style/midfloat.elc b/elpa/auctex-13.1.3/style/midfloat.elc Binary files differnew file mode 100644 index 0000000..0e03d38 --- /dev/null +++ b/elpa/auctex-13.1.3/style/midfloat.elc diff --git a/elpa/auctex-13.1.3/style/minted.el b/elpa/auctex-13.1.3/style/minted.el new file mode 100644 index 0000000..354213b --- /dev/null +++ b/elpa/auctex-13.1.3/style/minted.el @@ -0,0 +1,475 @@ +;;; minted.el --- AUCTeX style for `minted.sty' (v2.5) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014-2021 Free Software Foundation, Inc. + +;; Author: Tassilo Horn <tsdh@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-12-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `minted.sty' (v2.5) from 2017/07/19. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) +(declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments + "newfloat" (&rest newfloat-declarefloatingenvironments)) + +(defvar font-latex-syntactic-keywords-extra) + +(defvar LaTeX-minted-key-val-options + '(("autogobble" ("true" "false")) + ("baselinestretch" ("auto")) + ("beameroverlays" ("true" "false")) + ("breakafter") + ("breakaftergroup" ("true" "false")) + ("breakaftersymbolpre") + ("breakaftersymbolpost") + ("breakanywhere" ("true" "false")) + ("breakanywheresymbolpre") + ("breakanywheresymbolpost") + ("breakautoindent" ("true" "false")) + ("breakbefore") + ("breakbeforegroup" ("true" "false")) + ("breakbeforesymbolpre") + ("breakbeforesymbolpost") + ("breakbytoken" ("true" "false")) + ("breakbytokenanywhere" ("true" "false")) + ("breakindent") + ("breakindentnchars") + ("breaklines" ("true" "false")) + ("breaksymbol") + ("breaksymbolleft") + ("breaksymbolright") + ("breaksymbolindent") + ("breaksymbolindentnchars") + ("breaksymbolindentleft") + ("breaksymbolindentleftnchars") + ("breaksymbolindentright") + ("breaksymbolseprightnchars") + ("breaksymbolsep") + ("breaksymbolsepnchars") + ("breaksymbolsepleft") + ("breaksymbolsepleftnchars") + ("breaksymbolsepright") + ("breaksymbolseprightnchars") + ("bgcolor") + ("codetagify") + ("curlyquotes" ("true" "false")) + ("encoding") + ("escapeinside") + ("firstline") + ("firstnumber" ("auto" "last" "integer")) + ("fontfamily" ("tt" "courier" "helvetica")) + ("fontseries" ("auto")) + ("fontsize" ("auto" "\\tiny" "\\large" "\\scriptsize" "\\Large" + "\\footnotesize" "\\LARGE" "\\small" "\\huge" + "\\normalsize" "\\Huge")) + ("fontshape" ("auto")) + ("formatcom") + ("frame" ("none" "leftline" "topline" "bottomline" "lines" "single")) + ("framerule") + ("framesep") + ("funcnamehighlighting" ("true" "false")) + ("gobble") + ("highlightcolor") + ("highlightlines") + ("keywordcase" ("lower" "upper" "capitalize")) + ("label") + ("labelposition" ("none" "topline" "bottomline" "all")) + ("lastline") + ("linenos" ("true" "false")) + ("numberfirstline" ("true" "false")) + ("numbers" ("left" "right" "both" "none")) + ("mathescape" ("true" "false")) + ("numberblanklines" ("true" "false")) + ("numbersep") + ("obeytabs" ("true" "false")) + ("outencoding") + ("python3" ("true" "false")) + ("resetmargins" ("true" "false")) + ("rulecolor") + ("samepage" ("true" "false")) + ("showspaces" ("true" "false")) + ("showtabs" ("true" "false")) + ("space") + ("spacecolor") + ("startinline" ("true" "false")) + ;; FIXME: It would be nice to use the function + ;; `LaTeX-minted-style-list' here, but with a file local var like: + ;; %%% TeX-command-extra-options: "-shell-escape" + ;; in a .tex file, Emacs asks to apply a variable which is not + ;; safe and does not restore the window; the splitted frame + ;; remains. I couldn't figure out why, so for now, I add the + ;; styles from Pygments version 2.11 here. + ("style" ("abap" "algol" "algol_nu" "arduino" "autumn" + "borland" "bw" "colorful" "default" "dracula" + "emacs" "friendly" "friendly_grayscale" "fruity" + "gruvbox-dark" "gruvbox-light" "igor" "inkpot" + "lilypond" "lovelace" "manni" "material" + "monokai" "murphy" "native" "one-dark" + "paraiso-dark" "paraiso-light" "pastie" "perldoc" + "rainbow_dash" "rrt" "sas" "solarized-dark" + "solarized-light" "stata-dark" "stata-light" + "stata" "tango" "trac" "vim" "vs" "xcode" + "zenburn")) + ("stepnumber") + ("stepnumberfromfirst") + ("stepnumberoffsetvalues" ("true" "false")) + ("stripall" ("true" "false")) + ("stripnl" ("true" "false")) + ("tab") + ("tabcolor") + ("tabsize") + ("texcl" ("true" "false")) + ("texcomments" ("true" "false")) + ("xleftmargin") + ("xrightmargin")) + "Key=value options for minted macros and environments.") + +(defun LaTeX-minted-key-val-options () + "Return an updated list of key=vals from minted package. +This function retrieves values of (user) defined colors and +prepends them to variable `LaTeX-minted-key-val-options'." + (append + (when (or (member "xcolor" (TeX-style-list)) + (member "color" TeX-active-styles)) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (colors (mapcar #'car (funcall colorcmd))) + (keys '("bgcolor" "highlightcolor" + "rulecolor" "spacecolor" "tabcolor")) + result) + (dolist (key keys result) + (push (list key colors) result)))) + LaTeX-minted-key-val-options)) + +(defvar LaTeX-minted-pygmentize-program (executable-find "pygmentize")) + +(defvar LaTeX-minted-language-list nil + "List containing languages provided by pymentize program.") + +(defun LaTeX-minted-language-list (&rest _ignored) + "Return a list of languages provided by pymentize program. +Update the variable `LaTeX-minted-language-list' if still nil." + (or LaTeX-minted-language-list + (when LaTeX-minted-pygmentize-program + (with-temp-buffer + (shell-command (concat LaTeX-minted-pygmentize-program " -L lexers") + (current-buffer)) + (goto-char (point-min)) + (let (languages) + (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t) + (dolist (lang (split-string (match-string 1) "[[:space:],]" t)) + (push lang languages))) + (setq LaTeX-minted-language-list languages)) + LaTeX-minted-language-list)))) + +(defun LaTeX-arg-minted-language (optional &optional prompt) + "Insert a selected pygmentize language as argument for macros from minted.sty. +If OPTIONAL is non-nil, insert it as optional argument in +brackets. PROMPT replaces the standard one." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Language") + (LaTeX-minted-language-list)) + optional)) + +(defvar LaTeX-minted-style-list nil + "List containing styles provided by pymentize program.") + +(defun LaTeX-minted-style-list (&rest _ignored) + "Return a list of styles provided by pymentize program. +Update the variable `LaTeX-minted-style-list' if still nil." + (or LaTeX-minted-style-list + (when LaTeX-minted-pygmentize-program + (with-temp-buffer + (shell-command (concat LaTeX-minted-pygmentize-program " -L styles") + (current-buffer)) + (goto-char (point-min)) + (let (styles) + (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t) + (dolist (style (split-string (match-string 1) "[[:space:],]" t)) + (push style styles))) + (setq LaTeX-minted-style-list styles)) + LaTeX-minted-style-list)))) + +(defun LaTeX-arg-minted-style (optional &optional prompt) + "Insert a selected pygmentize style as argument for macros from minted.sty. +If OPTIONAL is non-nil, insert it as optional argument in +brackets. PROMPT replaces the standard one." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Style") + (LaTeX-minted-style-list)) + optional)) + +(defvar LaTeX-minted-auto-newminted nil) +(defvar LaTeX-minted-newminted-regexp + '("\\\\newminted\\(?:\\[\\([^]]+\\)\\]\\)?{\\([^}]+\\)}{[^}]*}" + (1 2) LaTeX-minted-auto-newminted)) + +(defvar LaTeX-minted-auto-newmint nil) +(defvar LaTeX-minted-newmint-regexp + '("\\\\newmint\\(?:\\[\\([^]]+\\)\\]\\)?{\\([^}]+\\)}{[^}]*}" + (1 2) LaTeX-minted-auto-newmint)) + +(defvar LaTeX-minted-auto-newmintinline nil) +(defvar LaTeX-minted-newmintinline-regexp + '("\\\\newmintinline\\(?:\\[\\([^]]+\\)\\]\\)?{\\([^}]+\\)}{[^}]*}" + (1 2) LaTeX-minted-auto-newmintinline)) + +(defvar LaTeX-minted-auto-newmintedfile nil) +(defvar LaTeX-minted-newmintedfile-regexp + '("\\\\newmintedfile\\(?:\\[\\([^]]+\\)\\]\\)?{\\([^}]+\\)}{[^}]*}" + (1 2) LaTeX-minted-auto-newmintedfile)) + +(defun LaTeX-minted-auto-prepare () + (setq LaTeX-minted-auto-newminted nil + LaTeX-minted-auto-newmint nil + LaTeX-minted-auto-newmintinline nil + LaTeX-minted-auto-newmintedfile nil + LaTeX-minted-language-list nil + LaTeX-minted-style-list nil)) + +(defun LaTeX-minted-auto-cleanup () + ;; \newminted{lang}{opts} => new langcode and langcode* envs. + ;; \newminted[envname]{lang}{opts} => new envname/envname* envs. + (dolist (name-lang LaTeX-minted-auto-newminted) + (let* ((env (if (> (length (car name-lang)) 0) + (car name-lang) + (concat (cadr name-lang) "code"))) + (env* (concat env "*"))) + (add-to-list 'LaTeX-auto-environment (list env)) + (add-to-list 'LaTeX-auto-environment + (list env* #'LaTeX-env-args + '(TeX-arg-key-val (LaTeX-minted-key-val-options)))) + (add-to-list 'LaTeX-indent-environment-list `(,env current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list `(,env* current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local env) + (add-to-list 'LaTeX-verbatim-environments-local env*))) + ;; \newmint{foo}{opts} => \foo[key=vals]|code| + ;; \newmint[macname]{foo}{opts} => \macname[key=vals]|code| + (dolist (name-lang LaTeX-minted-auto-newmint) + (let ((lang (if (> (length (car name-lang)) 0) + (car name-lang) + (cadr name-lang)))) + (add-to-list 'TeX-auto-symbol + `(,lang [TeX-arg-key-val (LaTeX-minted-key-val-options)] + TeX-arg-verb)) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,lang "[")) 'textual)))) + ;; \newmintinline{foo}{opts} => \fooinline[key=vals]|code| or + ;; \fooinline[key=vals]{code} + ;; \newmintinline[macname]{foo}{opts} => \macname[key=vals]|code| or + ;; \macname[key=vals]{code} + (dolist (name-lang LaTeX-minted-auto-newmintinline) + (let ((lang (if (> (length (car name-lang)) 0) + (car name-lang) + (concat (cadr name-lang) "inline")))) + (add-to-list 'TeX-auto-symbol + `(,lang [TeX-arg-key-val (LaTeX-minted-key-val-options)] + TeX-arg-verb-delim-or-brace)) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local lang) + (add-to-list 'LaTeX-verbatim-macros-with-braces-local lang) + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,lang "[")) 'textual)))) + ;; \newmintedfile{foo}{opts} => \foofile[key=vals]{file-name} + ;; \newmintedfile[macname]{foo}{opts} => \macname[key=vals]{file-name} + (dolist (name-lang LaTeX-minted-auto-newmintedfile) + (let ((lang (if (> (length (car name-lang)) 0) + (car name-lang) + (concat (cadr name-lang) "file")))) + (add-to-list 'TeX-auto-symbol + `(,lang [TeX-arg-key-val (LaTeX-minted-key-val-options)] + TeX-arg-file)))) + (when (and (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Refresh font-locking so that the verbatim envs take effect. + (font-latex-set-syntactic-keywords))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-minted-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-minted-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-minted-add-syntactic-keywords-extra (type macro) + "Add MACRO from minted.sty to `font-latex-syntactic-keywords-extra'. +TYPE is one of the symbols `brace' or `delim' indicating how +verbatim text is enclosed after the macro. MACRO is a string or +a list of strings." + (let ((syntax (if (eq type 'brace) + '((1 "|") (2 "|")) + '((1 "\"") (2 ".") (3 "\"")))) + regexp) + (when (listp macro) + (setq macro (regexp-opt macro "\\(?:"))) + (setq regexp `(,(concat + ;; The backslash + (regexp-quote TeX-esc) + ;; Name of the macro(s) + macro + ;; The optional argument + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" + ;; The first mandatory argument + "\\(?:{[^}]+}\\)" + ;; With 'brace, allow braced sub-groups otherwise + ;; we stop matching too early. With 'delim, copy + ;; font-latex.el: + (if (eq type 'brace) + (concat "\\({\\)" + "\\(?:[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^}{]*\\)*" + "\\)" + "\\(}\\)") + (concat + ;; Opening delimiter + "\\([^a-z@*\n\f{]\\).*?" + ;; Closing delimiter + "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)"))))) + (add-to-list 'font-latex-syntactic-keywords-extra (append regexp syntax)))) + +(TeX-add-style-hook + "minted" + (lambda () + + ;; New symbols + (TeX-add-symbols + '("mint" + [TeX-arg-key-val (LaTeX-minted-key-val-options)] + LaTeX-arg-minted-language TeX-arg-verb) + '("mintinline" + [TeX-arg-key-val (LaTeX-minted-key-val-options)] + LaTeX-arg-minted-language TeX-arg-verb-delim-or-brace) + '("newminted" ["Environment Name"] LaTeX-arg-minted-language + (TeX-arg-key-val (LaTeX-minted-key-val-options))) + '("newmint" ["Macro Name"] LaTeX-arg-minted-language + (TeX-arg-key-val (LaTeX-minted-key-val-options))) + '("newmintinline" ["Macro Name"] LaTeX-arg-minted-language + (TeX-arg-key-val (LaTeX-minted-key-val-options))) + '("newmintedfile" ["Macro Name"] LaTeX-arg-minted-language + (TeX-arg-key-val (LaTeX-minted-key-val-options))) + ;; 3.3 Formatting source code + '("inputminted" + [TeX-arg-key-val (LaTeX-minted-key-val-options)] + (LaTeX-arg-minted-language) + TeX-arg-file) + ;; 3.4 Using different styles + '("usemintedstyle" + [ LaTeX-arg-minted-language ] LaTeX-arg-minted-style) + ;; 5.2 Macro option usage + '("setminted" + [ LaTeX-arg-minted-language ] + (TeX-arg-key-val (LaTeX-minted-key-val-options))) + '("setmintedinline" + [ LaTeX-arg-minted-language ] + (TeX-arg-key-val (LaTeX-minted-key-val-options)))) + + ;; New environments + (LaTeX-add-environments + '("minted" LaTeX-env-args [TeX-arg-key-val (LaTeX-minted-key-val-options)] + LaTeX-arg-minted-language)) + + ;; 4 Floating listings: If option "newfloat" is given, run the + ;; style hook and use the interface provided by the style, + ;; otherwise add "listing" manually + (if (or (LaTeX-provided-package-options-member "minted" "newfloat") + (LaTeX-provided-package-options-member "minted" "newfloat=true")) + (progn + (TeX-run-style-hooks "newfloat") + (LaTeX-add-newfloat-DeclareFloatingEnvironments + '("listing" "verbatim"))) + (LaTeX-add-environments '("listing" ["Float Position"])) + (TeX-add-symbols '("listoflistings") + '("listingscaption") + '("listoflistingscaption")) + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("listing" current-indentation) t) + (add-to-list 'LaTeX-label-alist '("listing" . LaTeX-listing-label) t) + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + '(("listing" ?l "lst:" "~\\ref{%s}" caption nil nil))))) + + ;; Add to the auto parser + (TeX-auto-add-regexp LaTeX-minted-newminted-regexp) + (TeX-auto-add-regexp LaTeX-minted-newmint-regexp) + (TeX-auto-add-regexp LaTeX-minted-newmintinline-regexp) + (TeX-auto-add-regexp LaTeX-minted-newmintedfile-regexp) + + ;; Filling + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("minted" current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local "minted") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("usemintedstyle" "[{") + ("setminted" "[{") + ("setmintedinline" "[{") + ("newminted" "[{{") + ("newmint" "[{{") + ("newmintinline" "[{{") + ("newmintedfile" "[{{")) + 'function) + (font-latex-add-keywords '(("inputminted" "[{{") + ("mint" "[{") + ("mintinline" "[{")) + 'textual) + ;; Add \mint & \mintinline to + ;; `font-latex-syntactic-keywords-extra' and cater for their + ;; special syntax: \mint[optional]{lang}{verbatim} or + ;; \mint[optional]{lang}|verbatim| + (LaTeX-minted-add-syntactic-keywords-extra 'brace + '("mint" "mintinline")) + (LaTeX-minted-add-syntactic-keywords-extra 'delim + '("mint" "mintinline")) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-minted-package-options '("chapter" "cache" + "cachedir" "finalizecache" + "frozencache" "draft" + "final" "kpsewhich" + "langlinenos" "newfloat" + "outputdir" "section") + "Package options for the minted package.") + +;;; minted.el ends here diff --git a/elpa/auctex-13.1.3/style/minted.elc b/elpa/auctex-13.1.3/style/minted.elc Binary files differnew file mode 100644 index 0000000..f89c28d --- /dev/null +++ b/elpa/auctex-13.1.3/style/minted.elc diff --git a/elpa/auctex-13.1.3/style/mn2e.el b/elpa/auctex-13.1.3/style/mn2e.el new file mode 100644 index 0000000..c923687 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mn2e.el @@ -0,0 +1,183 @@ +;;; mn2e.el --- AUCTeX style for `mn2e.cls' version 2.2. -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mn2e.cls' version 2.2. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "mn2e" + (lambda () + (if (LaTeX-provided-class-options-member "mn2e" "usegraphicx") + (TeX-run-style-hooks "graphicx")) + (if (LaTeX-provided-class-options-member "mn2e" "usenatbib") + (TeX-run-style-hooks "natbib")) + (if (LaTeX-provided-class-options-member "mn2e" "usedcolumn") + (TeX-run-style-hooks "dcolumn")) + (TeX-add-symbols + ;; 4.5.3 Bold Greek + "balpha" + "bbeta" + "bgamma" + "bdelta" + "bepsilon" + "bzeta" + "boldeta" + "btheta" + "biota" + "bkappa" + "blambda" + "bmu" + "bnu" + "bxi" + "bpi" + "brho" + "bsigma" + "btau" + "bupsilon" + "bphi" + "bchi" + "bpsi" + "bomega" + "bvarepsilon" + "bvartheta" + "bvarpi" + "bvarrho" + "bvarsigma" + "bvarphi" + ;; 4.5.5 Special symbols + "getsto" + "cor" + "lid" + "gid" + "sol" + "sog" + "lse" + "gse" + "grole" + "leogr" + "loa" + "goa" + "sun" + "earth" + "degr" + "diameter" + "sq" + "squareforqed" + "fd" + "fh" + "fm" + "fs" + "fdg" + "farcm" + "farcs" + "fp" + "arcmin" + "arcsec" + "micron" + ;; Authors' notes + '("title" ["Short title"] "Long title") + '("author" ["Short author(s)"] (LaTeX-arg-author "Long author(s)")) + "newauthor" + "nokeywords" + "plate" + "contcaption" + '("bmath" "Math text") + '("mathbfss" "Text") + '("textbfss" "Text") + '("mathbfit" "Text") + '("textbfit" "Text") + ;; Editors' notes + "pagerange" + "volume" + "pubyear" + "journal" + "bsp") + (if (LaTeX-provided-class-options-member "mn2e" "useAMS") + (TeX-add-symbols + ;; 4.5.4 Upright Greek characters + "upi" + "umu" + "upartial" + "leqslant" + "geqslant" + "la" + "ga")) + (LaTeX-add-environments + "keywords" + "abstract" + "proof") + (LaTeX-add-pagestyles + "headings" + "myheadings" + "titlepage" + "plate") + (LaTeX-add-counters + "part" + "section" + "subsection" + "subsubsection" + "paragraph" + "subparagraph" + "dummy" + "table" + "figure") + (LaTeX-add-lengths + "realparindent" + "bibhang") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("author" "[{") + ("title" "[{") + ("newauthor") + ("nokeywords" "{") + ("plate" "{") + ("contcaption" "{") + ("pagerange" "{") + ("volume" "{") + ("pubyear" "{") + ("journal") + ("bsp")) + 'function))) + TeX-dialect) + +(defvar LaTeX-mn2e-class-options + '("useAMS" "usegraphicx" "usenatbib" "usedcolumn" + "doublespacing" "galley" "landscape" "letters" "onecolumn" "referee") + "Package options for the mn2e package.") + +;; mn2e.el ends here diff --git a/elpa/auctex-13.1.3/style/mn2e.elc b/elpa/auctex-13.1.3/style/mn2e.elc Binary files differnew file mode 100644 index 0000000..ed5f3fb --- /dev/null +++ b/elpa/auctex-13.1.3/style/mn2e.elc diff --git a/elpa/auctex-13.1.3/style/mnras.el b/elpa/auctex-13.1.3/style/mnras.el new file mode 100644 index 0000000..7307f03 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mnras.el @@ -0,0 +1,184 @@ +;;; mnras.el --- AUCTeX style for `mnras.cls' version 3.0. -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `mnras.cls' version 3.0. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "mnras" + (lambda () + (if (LaTeX-provided-class-options-member "mnras" "usegraphicx") + (TeX-run-style-hooks "graphicx")) + (if (LaTeX-provided-class-options-member "mnras" "usenatbib") + (TeX-run-style-hooks "natbib")) + (if (LaTeX-provided-class-options-member "mnras" "usedcolumn") + (TeX-run-style-hooks "dcolumn")) + (TeX-run-style-hooks + "geometry" + "fixltx2e" + "hyperref") + (TeX-add-symbols + ;; 5 Title page + '("title" ["Short title"] "Long title") + '("author" ["Short author(s)"] (LaTeX-arg-author "Long author(s)")) + "newauthor" + ;; 7.2 Special symbols + '("bmath" 1) + '("mathbfit" 1) + '("mathbfss" 1) + ;; 7.2 Special symbols -- Table 1 + "sun" + "earth" + "degr" + "diameter" + "sq" + "fd" + "fh" + "fm" + "fs" + "fdg" + "farcm" + "farcs" + "fp" + "arcmin" + "arcsec" + "micron" + ;; 7.2 Special symbols -- Table 2 + "upi" + "umu" + "upartial" + "leqslant" + "geqslant" + "la" + "ga" + "getsto" + "cor" + "lid" + "gid" + "sol" + "sog" + "lse" + "gse" + "grole" + "leogr" + "loa" + "goa" + ;; 7.3 Ions + '("ion" 2) + ;; A Journal abbreviations -- Table A1 + "aap" + "astap" + "aapr" + "aaps" + "actaa" + "afz" + "aj" + "ao" + "applopt" + "aplett" + "apj" + "apjl" + "apjlett" + "apjs" + "apjsupp" + "apss" + "araa" + "arep" + "aspc" + "azh" + "baas" + "bac" + "bain" + "caa" + "cjaa" + "fcp" + "gca" + "grl" + "iaucirc" + "icarus" + "japa" + "jcap" + "jcp" + "jgr" + "jqsrt" + "jrasc" + "memras" + "memsai" + "mnassa" + "na" + "nar" + "nat" + "nphysa" + "pra" + "prb" + "prc" + "prd" + "pre" + "prl" + "pasa" + "pasp" + "pasj" + "physrep" + "physscr" + "planss" + "procspie" + "rmxaa" + "qjras" + "sci" + "skytel" + "solphys" + "sovast" + "ssr" + "zap") + + (LaTeX-add-environments + "keywords" + "proof") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("author" "[{") + ("title" "[{") + ("newauthor")) + 'function)))) + +(defvar LaTeX-mnras-class-options + '("letters" "onecolumn" "doublespacing" "referee" "galley" "landscape" + "usenatbib" "usegraphicx" "useAMS" "usedcolumn") + "Package options for the mnras package.") + +;; mnras.el ends here diff --git a/elpa/auctex-13.1.3/style/mnras.elc b/elpa/auctex-13.1.3/style/mnras.elc Binary files differnew file mode 100644 index 0000000..1d77bb3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/mnras.elc diff --git a/elpa/auctex-13.1.3/style/moodle.el b/elpa/auctex-13.1.3/style/moodle.el new file mode 100644 index 0000000..ac5f286 --- /dev/null +++ b/elpa/auctex-13.1.3/style/moodle.el @@ -0,0 +1,222 @@ +;;; moodle.el --- AUCTeX style for `moodle.sty' (v0.5) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-06-10 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `moodle.sty' (v0.5) from 2016/01/11. + +;; In multi environments, the correct answer is marked with `\item*'. +;; This style adds asterisk to the list of key=values queried after +;; \item in this environment in order to make the input procedure +;; easier. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-moodle-key-val-options + '(("points") + ("default grade") + ("penalty") + ("fraction") + ("feedback")) + "Key=value options for moodle macros and environments.") + +(defun LaTeX-moodle-question-env-with-args (env) + "Insert ENV provided by moodle.sty incl. arguments and first \\item." + (LaTeX-insert-environment + env + (let ((opts (TeX-read-key-val + t + (cond (;; 3.3.1 Multiple Choice + (string= env "multi") + (append '(("shuffle" ("true" "false")) + ("numbering" ("alph" "Alph" "arabic" + "roman" "Roman" "none")) + ("single" ("true" "false")) + ("multiple" ("true" "false"))) + (when (string= "cloze" (LaTeX-current-environment)) + '(("vertical" ("true" "false")) + ("horizonal" ("true" "false")))) + LaTeX-moodle-key-val-options)) + ;; 3.3.3 Short Answer + ((string= env "shortanswer") + (append '(("case sensitive" ("true" "false")) + ("usecase" ("true" "false"))) + (when (string= "cloze" (LaTeX-current-environment)) + '(("vertical" ("true" "false")) + ("horizonal" ("true" "false")))) + LaTeX-moodle-key-val-options)) + ;; 3.3.4 Essay Questions + ((string= env "essay") + (append '(("response required" ("true" "false")) + ("response format" ("html" "file" + "html+file" + "text" "monospaced")) + ("response field lines") + ("attachments allowed" ("0" "1" "2" "3" + "unlimited")) + ("attachments required" ("0" "1" "2" "3")) + ("response template")) + (when (string= "cloze" (LaTeX-current-environment)) + '(("vertical" ("true" "false")) + ("horizonal" ("true" "false")))) + LaTeX-moodle-key-val-options)) + ;; 3.4 Matching Questions + ((string= env "matching") + (append '(("shuffle" ("true" "false")) + ("drag and drop" ("true" "false")) + ("dd" ("true" "false"))) + LaTeX-moodle-key-val-options)) + (t (append + (when (string= "cloze" (LaTeX-current-environment)) + '(("vertical" ("true" "false")) + ("horizonal" ("true" "false")))) + LaTeX-moodle-key-val-options))))) + (qname (unless (string= "cloze" (LaTeX-current-environment)) + (TeX-read-string (TeX-argument-prompt nil nil "Question name"))))) + (concat + (when (and opts (not (string= opts ""))) + (format "[%s]" opts)) + (when (and qname (not (string= qname ""))) + (format "{%s}" qname))))) + (if (TeX-active-mark) + (progn + (LaTeX-find-matching-begin) + (end-of-line 1)) + (end-of-line 0)) + (delete-char 1) + (when (looking-at (concat "^[ \t]+$\\|" + "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) + (delete-region (point) (line-end-position))) + (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (deactivate-mark) + ;; Query and insert the question text. + (let ((qtext (TeX-read-string (TeX-argument-prompt nil nil "Question Text")))) + (when (and qtext (not (string= qtext ""))) + (newline) + (indent-according-to-mode) + (insert qtext) + (when auto-fill-function (LaTeX-fill-paragraph)))) + (LaTeX-insert-item) + ;; The inserted \item may have outdented the first line to the + ;; right. Fill it, if appropriate. + (when (and auto-fill-function + (not (looking-at "$")) + (not (assoc env LaTeX-indent-environment-list)) + (> (- (line-end-position) (line-beginning-position)) + (current-fill-column))) + (LaTeX-fill-paragraph nil))) + +(defun LaTeX-moodle-item-argument () + "Insert an \\item with optional argument in environments of moodle package." + ;; Do not query for an optional argument here, this happens below: + (let ((TeX-insert-macro-default-style 'mandatory-args-only)) + (TeX-insert-macro "item")) + ;; Add * to `LaTeX-moodle-key-val-options' in multi environment and + ;; query for the key=values: + (let ((opts + (TeX-read-key-val t (if (string= "multi" (LaTeX-current-environment)) + (append '(("*")) LaTeX-moodle-key-val-options) + LaTeX-moodle-key-val-options)))) + ;; Insert key=values; if * is chosen, drop []: + (when (and opts (not (string= opts ""))) + (delete-horizontal-space) + (if (string= opts "*") + (insert opts) + (insert LaTeX-optop opts LaTeX-optcl)))) + (just-one-space) + ;; Bonus point: Insert the macro \answer in matching environment: + (when (string= "matching" (LaTeX-current-environment)) + (save-excursion + (insert TeX-esc "answer") + (just-one-space)))) + +(TeX-add-style-hook + "moodle" + (lambda () + + (LaTeX-add-environments + ;; 3.2 Quiz and Question Environments + '("quiz" + (lambda (environment) + (LaTeX-insert-environment + environment + (let ((opts (TeX-read-key-val t LaTeX-moodle-key-val-options)) + (bank (TeX-read-string (TeX-argument-prompt nil nil "Question bank name")))) + (concat + (when (and opts (not (string= opts ""))) + (format "[%s]" opts)) + (format "{%s}" bank)))))) + ;; 3.5 Cloze Questions + '("cloze" "Question bank name")) + + ;; Make other environments available to AUCTeX: + (dolist (env '("multi" "numerical" "shortanswer" "essay" "matching")) + (LaTeX-add-environments `(,env LaTeX-moodle-question-env-with-args)) + (add-to-list 'LaTeX-item-list `(,env . LaTeX-moodle-item-argument) t)) + + (TeX-add-symbols + '("moodleset" + (TeX-arg-eval + (lambda () + (let ((opts (TeX-read-key-val nil + (append '(("ppi")) LaTeX-moodle-key-val-options)))) + (format "%s" opts))))) + + ;; 5 Graphics + '("ghostscriptcommand" "File name") + '("imagemagickcommand" "File name") + '("opensslcommand" "File name")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("moodleset" "{") + ("ghostscriptcommand" "{") + ("imagemagickcommand" "{") + ("opensslcommand" "{")) + 'function) + (font-latex-add-keywords '(("answer" "") + ;; Cater for a fontified starred \item + ("item" "*[")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-moodle-package-options + '("draft") + "Package options for the moodle package.") + +;;; moodle.el ends here diff --git a/elpa/auctex-13.1.3/style/moodle.elc b/elpa/auctex-13.1.3/style/moodle.elc Binary files differnew file mode 100644 index 0000000..01eea51 --- /dev/null +++ b/elpa/auctex-13.1.3/style/moodle.elc diff --git a/elpa/auctex-13.1.3/style/multicol.el b/elpa/auctex-13.1.3/style/multicol.el new file mode 100644 index 0000000..6fc65b9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multicol.el @@ -0,0 +1,92 @@ +;;; multicol.el --- AUCTeX style for `multicol.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2020, 2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2011-01-24 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `multicol.sty' v1.9b from 2021/10/28. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "multicol" + (lambda () + (LaTeX-add-environments + '("multicols" "Number of columns" [ "Text across columns" ] + [ "Local value for \\premulticols" ]) + '("multicols*" "Number of columns" [ "Text across columns" ] + [ "Local value for \\premulticols" ])) + + (TeX-add-symbols + '("multicoltolerance" (TeX-arg-literal " = ")) + '("multicolpretolerance" (TeX-arg-literal " = ")) + "columnseprulecolor" + '("raggedcolumns" 0) + '("flushcolumns" 0) + ;; 2.3 Manually breaking columns + '("newcolumn" 0) + '("columnbreak" [ "How much [0 - 4]" ]) + + ;; Preface to version 1.7 + "RLmulticolcolumns" + "LRmulticolcolumns") + + ;; Preface to version 1.8 + (when (LaTeX-provided-package-options-member "multicol" "colaction") + (TeX-add-symbols '("docolaction" 3))) + + (LaTeX-add-lengths "premulticols" + "postmulticols" + "multicolsep" + "multicolbaselineskip" + "multicolovershoot" + "multicolundershoot") + + (LaTeX-add-counters "collectmore") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("columnbreak" "") + ("newcolumn" "") + ("LRmulticolcolumns" "") + ("RLmulticolcolumns" "")) + 'warning))) + TeX-dialect) + +(defvar LaTeX-multicol-package-options + '("errorshow" "infoshow" "balancingshow" "markshow" "debugshow" + "grid" "colaction") + "Package options for the multicol package.") + +;;; multicol.el ends here diff --git a/elpa/auctex-13.1.3/style/multicol.elc b/elpa/auctex-13.1.3/style/multicol.elc Binary files differnew file mode 100644 index 0000000..9266b9a --- /dev/null +++ b/elpa/auctex-13.1.3/style/multicol.elc diff --git a/elpa/auctex-13.1.3/style/multido.el b/elpa/auctex-13.1.3/style/multido.el new file mode 100644 index 0000000..ec92edc --- /dev/null +++ b/elpa/auctex-13.1.3/style/multido.el @@ -0,0 +1,54 @@ +;;; multido.el --- AUCTeX style for `multido.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2020 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's multido.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `multido.sty'. + +;;; TODO: +;; +;; -- better argument support for multido +;; -- parsing for fpAdd resp. fpSub + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "multido" + (lambda () + (TeX-add-symbols + '("multido" "\var=<start value>+-<inc>" "Repititions" t) + '("Multido" "\var=<start value>+-<inc>" "Repititions" t) + '("mmultido" "\var=<start value>+-<inc>" "Repititions" t) + '("MMultido" "\var=<start value>+-<inc>" "Repititions" t) + "multidostop" + "multidocount" + '("fpAdd" "Summand 1" "Summand 2" "Register") + '("fpSub" "Minuend" "Subtrahend" "Register"))) + TeX-dialect) + +;;; multido.el ends here diff --git a/elpa/auctex-13.1.3/style/multido.elc b/elpa/auctex-13.1.3/style/multido.elc Binary files differnew file mode 100644 index 0000000..0b762ad --- /dev/null +++ b/elpa/auctex-13.1.3/style/multido.elc diff --git a/elpa/auctex-13.1.3/style/multind.el b/elpa/auctex-13.1.3/style/multind.el new file mode 100644 index 0000000..68a4ab6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multind.el @@ -0,0 +1,66 @@ +;;; multind.el --- AUCTeX support for multiple indices with multind.sty. -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "multind" + (lambda () + + ;; Commands + (TeX-add-symbols + '("makeindex" "Indextag") + '("index" TeX-arg-index-tag TeX-arg-index) + '("printindex" TeX-arg-index-tag "Title") + "printindex" "indexspace") + + ;; Parsing index macros + (setq LaTeX-auto-regexp-list + (append + ;; The first regexp is faster, but less accurate + ;; '(("\\\\index\\*?{[^{}]*}{\\([^}]*\\)" 1 LaTeX-auto-index-entry)) + ;; The second regexp is very good, but slower + '(("\\\\index\\*?{[^{}]*}{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}" + 1 LaTeX-auto-index-entry)) + LaTeX-auto-regexp-list)) + + ;; Completion for index entries in the |see and \index commands + (setq TeX-complete-list + (append + '(("\\\\index{[^{}]*}{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list) + ("|see{\\([^}]*\\)" 1 LaTeX-index-entry-list)) + TeX-complete-list)) + + ;; RefTeX support + (and (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros '(multind)))) + TeX-dialect) + +(defvar LaTeX-multind-package-options nil + "Package options for the multind package.") + +;;; multind.el ends here diff --git a/elpa/auctex-13.1.3/style/multind.elc b/elpa/auctex-13.1.3/style/multind.elc Binary files differnew file mode 100644 index 0000000..bf1b783 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multind.elc diff --git a/elpa/auctex-13.1.3/style/multirow.el b/elpa/auctex-13.1.3/style/multirow.el new file mode 100644 index 0000000..25d9f96 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multirow.el @@ -0,0 +1,86 @@ +;;; multirow.el --- AUCTeX style for `multirow.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2018--2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `multirow.sty', v2.6 from 2021/01/02. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "multirow" + (lambda () + (TeX-add-symbols + ;; \multirow[<vpos>]{<nrows>}[<bigstruts>]{<width>}[<vmove>]{<text>} + '("multirow" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Vertical position") + '("c" "b" "t")] + "Number of rows" + [ "Big struts" ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Width") + (append + '("*" "=") + (mapcar (lambda (x) + (concat TeX-esc (car x))) + (LaTeX-length-list)))) + [TeX-arg-length "Vertical fix-up"] + t) + "multirowsetup" + "multirowdebugtrue" + "multirowdebugfalse") + + ;; \bigstrutjot is a length defined both in multirow.sty and + ;; bigstrut.sty. It doesn't make a difference within AUCTeX since + ;; dupes are removed by the function `LaTeX-length-list'. + (LaTeX-add-lengths "bigstrutjot") + + ;; \STneed is only defined with package option `supertabular': + (when (LaTeX-provided-package-options-member "multirow" + "supertabular") + (TeX-add-symbols + '("STneed" TeX-arg-length))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("multirow" "[{[{[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-multirow-package-options '("debug" + "longtable" + "supertabular") + "Package options for the multirow package.") + +;;; multirow.el ends here diff --git a/elpa/auctex-13.1.3/style/multirow.elc b/elpa/auctex-13.1.3/style/multirow.elc Binary files differnew file mode 100644 index 0000000..8157580 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multirow.elc diff --git a/elpa/auctex-13.1.3/style/multitoc.el b/elpa/auctex-13.1.3/style/multitoc.el new file mode 100644 index 0000000..fb06c83 --- /dev/null +++ b/elpa/auctex-13.1.3/style/multitoc.el @@ -0,0 +1,50 @@ +;;; multitoc.el --- AUCTeX style for `multitoc.sty' (v2.01) -*- lexical-binding: t; -*- + +;; Copyright (C) 2019, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-09-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `multitoc.sty' (v2.01) from 1999/06/08. +;; `multitoc.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "multitoc" + (lambda () + (TeX-run-style-hooks "multicol" "ifthen") + (TeX-add-symbols + "multicolumntoc" + "multicolumnlot" + "multicolumnlof")) + TeX-dialect) + +(defvar LaTeX-multitoc-package-options + '("toc" "lof" "lot") + "Package options for the multitoc package.") + +;;; multitoc.el ends here diff --git a/elpa/auctex-13.1.3/style/multitoc.elc b/elpa/auctex-13.1.3/style/multitoc.elc Binary files differnew file mode 100644 index 0000000..6d9143b --- /dev/null +++ b/elpa/auctex-13.1.3/style/multitoc.elc diff --git a/elpa/auctex-13.1.3/style/nameref.el b/elpa/auctex-13.1.3/style/nameref.el new file mode 100644 index 0000000..ffbb928 --- /dev/null +++ b/elpa/auctex-13.1.3/style/nameref.el @@ -0,0 +1,64 @@ +;;; nameref.el --- AUCTeX style for `nameref.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `nameref.sty' + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "nameref" + (lambda () + (TeX-add-symbols + '("nameref" TeX-arg-ref) + '("nameref*" TeX-arg-ref) + '("Nameref" TeX-arg-ref)) + + (setq TeX-complete-list + (append + '(("\\\\\\(?:N\\|n\\)ameref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")) + TeX-complete-list)) + + ;, Fontification + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("nameref" "*{") + ("Nameref" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-nameref-package-options nil + "Package options for nameref.") + +;; nameref.el ends here diff --git a/elpa/auctex-13.1.3/style/nameref.elc b/elpa/auctex-13.1.3/style/nameref.elc Binary files differnew file mode 100644 index 0000000..40b42f0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/nameref.elc diff --git a/elpa/auctex-13.1.3/style/natbib.el b/elpa/auctex-13.1.3/style/natbib.el new file mode 100644 index 0000000..ba6622a --- /dev/null +++ b/elpa/auctex-13.1.3/style/natbib.el @@ -0,0 +1,199 @@ +;;; natbib.el --- AUCTeX style for `natbib.sty' version 8.31b -*- lexical-binding: t; -*- + +;; Copyright (C) 1997, 1998, 2004, 2007, 2014--2020 Free Software Foundation, Inc. + +;; Authors: Berwin Turlach <statba@nus.edu.sg> +;; Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "natbib" + (lambda () + ;; The number in the cdr of the following list indicates how many + ;; optional note arguments we consider useful. Prompting for those + ;; arguments will still depend upon `TeX-arg-cite-note-p'. + (let ((citecmds + '(("cite" . 0) + ("citet" . 1) ("citet*" . 1) ("citealt" . 1) ("citealt*" . 1) + ("citep" . 2) ("citep*" . 2) ("citealp" . 2) ("citealp*" . 2) + ("citeauthor" . 0) ("citeauthor*" . 0) ("citefullauthor" . 0) + ("citeyear" . 0) ("citeyearpar" . 0) + ("shortcites" . 0) + ;; 2.4 Extended Citation Commands + ("citenum" . 0) + ;; 2.5 Forcing Upper Cased Name + ("Citet" . 1) ("Citet*" . 1) ("Citealt" . 1) ("Citealt*" . 1) + ("Citep" . 2) ("Citep*" . 2) ("Citealp" . 2) ("Citealp*" . 2) + ;; 2.6 Citation Aliasing + ("citetalias" . 1) ("citepalias" . 2)))) + + ;; Add these symbols + (apply + #'TeX-add-symbols + (mapcar + (lambda (cmd) + (cond + ((= (cdr cmd) 0) + ;; No optional arguments + (list (car cmd) #'TeX-arg-cite)) + ((= (cdr cmd) 1) + ;; Just one optional argument, the post note + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p (["Post-note"]) nil) + #'TeX-arg-cite)) + ((= (cdr cmd) 2) + ;; Pre and post notes + (list + (car cmd) + '(TeX-arg-conditional TeX-arg-cite-note-p ([LaTeX-arg-natbib-notes]) nil) + #'TeX-arg-cite)))) + citecmds)) + + ;; Make an entry in TeX-complete-list + (add-to-list + 'TeX-complete-list + (list + (concat "\\\\\\(" + (mapconcat (lambda (x) (regexp-quote (car x))) + citecmds "\\|") + "\\)\\(\\[[^]\n\r\\%]*\\]\\)*{\\([^{}\n\r\\%,]*,\\)*\\([^{}\n\r\\%,]*\\)") + 4 'LaTeX-bibitem-list "}"))) + + ;; Add the other symbols + (TeX-add-symbols + ;; 2.4 Extended Citation Commands + '("citetext" "Text") + + ;; 2.6 Citation Aliasing + '("defcitealias" TeX-arg-cite "Alias") + + ;; 2.9 Selecting Citation Punctuation + '("setcitestyle" (TeX-arg-key-val + (;; Citation mode (fourth argument of \bibpunct): + ("authoryear") ("numbers") ("super") + ;; Braces (first and second arguments of \bibpunct): + ("round") ("square") ("open") ("close") + ;; Between citations (third argument of \bibpunct): + ("semicolon") ("comma") ("citesep") + ;; Between author and year (fifth argument of \bibpunct): + ("aysep") + ;; Between years with common author (sixth argument of \bibpunct): + ("yysep") + ;; Text before post-note (optional argument of \bibpunct): + ("notesep")))) + '("bibpunct" ["Post note separator"] + "Opening bracket" + "Closing bracket" + "Punctuation between multiple citations" + "style [n]umeric [s]uperscript [a]uthor-year" + "Punctuation between author and year" + "Punctuation between years for common authors") + + '("citestyle" (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Style") + '("plain" "plainnat" "agu" "egu" + "agms" "dcu" "kluwer" "cospar" "nature"))) + + ;; 2.12 Other Formatting Options + "bibsection" + "bibpreamble" + "bibfont" + "citenumfont" + "bibnumfmt" + + ;; 2.13 Automatic Indexing of Citations + '("citeindextrue") + '("citeindexfalse") + '("citeindextype")) + + ;; 2.12 Other Formatting Options + (LaTeX-add-lengths "bibhang" "bibsep") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("cite" "*[[{") + ("citet" "*[[{") + ("citealt" "*[[{") + ("citep" "*[[{") + ("citealp" "*[[{") + ("citeauthor" "*[[{") + ("citefullauthor" "[[{") + ("citeyear" "[[{") + ("citeyearpar" "[[{") + ("shortcites" "{") + ("citenum" "{") + ("Citet" "*[[{") + ("Citealt" "*[[{") + ("Citep" "*[[{") + ("Citealp" "*[[{") + ("Citeauthor" "*[[{") + ("citetalias" "*[[{") + ("citepalias" "*[[{")) + 'reference) + (font-latex-add-keywords '(("defcitealias" "{{") + ("bibpunct" "[{{{{{{") + ("setcitestyle" "{") + ("citestyle" "{")) + 'function)) + + ;; Tell RefTeX + (when (and LaTeX-reftex-cite-format-auto-activate + (fboundp 'reftex-set-cite-format)) + (reftex-set-cite-format 'natbib))) + TeX-dialect) + +(defun LaTeX-arg-natbib-notes (optional) + "Prompt for two note arguments a natbib citation command. +If OPTIONAL is non-nil, insert them in brackets, otherwise in +braces." + (let ((pre (TeX-read-string + (TeX-argument-prompt optional nil "Pre-note"))) + (post (TeX-read-string + (TeX-argument-prompt optional nil "Post-note")))) + (TeX-argument-insert pre optional) + (TeX-argument-insert post optional) + ;; pre is given, post is empty: Make sure that we insert an + ;; extra pair of `[]', otherwise pre becomes post + (when (and pre (not (string= pre "")) + (string= post "")) + (insert LaTeX-optop LaTeX-optcl)))) + +(defvar LaTeX-natbib-package-options '("numbers" "super" "authoryear" + "round" "square" "angle" "curly" + "comma" "colon" "nobibstyle" + "bibstyle" "openbib" "sectionbib" + "sort" "sort&compress" + "longnamesfirst" "nonamebreak") + "Package options for the natbib package.") + +;; natbib.el ends here diff --git a/elpa/auctex-13.1.3/style/natbib.elc b/elpa/auctex-13.1.3/style/natbib.elc Binary files differnew file mode 100644 index 0000000..2af4c3e --- /dev/null +++ b/elpa/auctex-13.1.3/style/natbib.elc diff --git a/elpa/auctex-13.1.3/style/naustrian.el b/elpa/auctex-13.1.3/style/naustrian.el new file mode 100644 index 0000000..63ca440 --- /dev/null +++ b/elpa/auctex-13.1.3/style/naustrian.el @@ -0,0 +1,42 @@ +;;; naustrian.el --- AUCTeX style for the `naustrian' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Austrian text in connection with the +;; `naustrian' babel option. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "naustrian" + (lambda () + (TeX-run-style-hooks "ngerman")) + TeX-dialect) + +;;; naustrian.el ends here diff --git a/elpa/auctex-13.1.3/style/naustrian.elc b/elpa/auctex-13.1.3/style/naustrian.elc Binary files differnew file mode 100644 index 0000000..2d1d0d9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/naustrian.elc diff --git a/elpa/auctex-13.1.3/style/newfloat.el b/elpa/auctex-13.1.3/style/newfloat.el new file mode 100644 index 0000000..5cde1d4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newfloat.el @@ -0,0 +1,215 @@ +;;; newfloat.el --- AUCTeX style for `newfloat.sty' (v1.1-109) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newfloat.sty' (v1.1-109) from 2015/09/17. +;; `newfloat.sty' is part of TeXLive. + +;; This style has some facilities to process the newly defined +;; floating environments within AUCTeX, e.g. indentation, label +;; addition etc. Currently it makes provision for `figure', `table' +;; and `verbatim' floating types. To make things work, the style +;; needs some help from the user. When a new floating environment is +;; defined, the user should pass the floating type as a comment to +;; AUCTeX, e.g. +;; +;; \DeclareFloatingEnvironment[ +;; name=Code, +;; listname={List of Codes}, +;; fileext=lol]{code} % {verbatim} +;; +;; Note the `{verbatim}' as a comment after the name of the float env. +;; Due to parsing reasons, this key-word must be in the same line as +;; the name of the float and enclosed in braces `{}'. +;; +;; Before the opening brace, only spaces and comment chars `%' are +;; allowed. Anything following the closing brace `}' is ignored. + +;; If things do not work or when in doubt, press `C-c C-n'. Comments +;; for improvement are welcome. + +;;; Code: + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-newfloat-key-val-options + '(("fileext") + ("listname") + ("name") + ("placement" ("t" "b" "p" "tbp" "htbp")) + ("chapterlistsgaps" ("on" "off"))) + "Key=value options for newfloat macros.") + +(defun LaTeX-newfloat-key-val-options () + "Return newfloat key=vals based on variable `LaTeX-largest-level'." + (append + (if (< (LaTeX-largest-level) 2) + '(("within" ("chapter" "section" "none"))) + '(("within" ("section" "none")))) + LaTeX-newfloat-key-val-options)) + +;; Setup parsing for \DeclareFloatingEnvironment: +(TeX-auto-add-type "newfloat-DeclareFloatingEnvironment" "LaTeX") + +(defvar LaTeX-newfloat-DeclareFloatingEnvironment-regexp + `(,(concat "\\\\DeclareFloatingEnvironment" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}" + "\\(?:[ %]*{\\(figure\\|table\\|verbatim\\)}\\)?") + (1 2) LaTeX-auto-newfloat-DeclareFloatingEnvironment) + "Matches the argument of `\\DeclareFloatingEnvironment' from `newfloat.sty'.") + +(defun LaTeX-newfloat-auto-prepare () + "Clear `LaTeX-auto-newfloat-DeclareFloatingEnvironment' before parsing." + (setq LaTeX-auto-newfloat-DeclareFloatingEnvironment nil)) + +(defun LaTeX-newfloat-auto-cleanup () + "Process definded floats with \\DeclareFloatingEnvironment. +Depending on floating type passed as a comment to +AUCTeX (\"figure\", \"table\" or \"verbatim\"), update +`LaTeX-figure-label' and `LaTeX-table-label'. If RefTeX is +loaded, add the new floating environment via +`reftex-add-label-environments'. For \"verbatim\" environments, +update `LaTeX-indent-environment-list' to suppress indentation. +If `caption.el' is loaded, add the new floating environment to +`LaTeX-caption-supported-float-types'. Also define the macros +\"listofENVs\" and \"listofENVes\"." + (dolist (flt-type (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (let ((flt (car flt-type)) + (type (cadr flt-type))) + (cond ((string-equal type "figure") + (LaTeX-add-environments `(,flt LaTeX-env-figure)) + (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-figure-label) t) + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `((,flt ?f ,LaTeX-figure-label "~\\ref{%s}" caption nil nil))))) + ((string-equal type "table") + (LaTeX-add-environments `(,flt LaTeX-env-figure)) + (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-table-label) t) + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `((,flt ?t ,LaTeX-table-label "~\\ref{%s}" caption nil nil))))) + ((string-equal type "verbatim") + (LaTeX-add-environments `(,flt ["Float Position"])) + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + `(,flt current-indentation) t) + (add-to-list 'LaTeX-label-alist `(,flt . LaTeX-listing-label) t) + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `((,flt ?l "lst:" "~\\ref{%s}" caption nil nil))))) + (t + (LaTeX-add-environments `(,flt ["Float Position"])))) + (when (boundp 'LaTeX-caption-supported-float-types) + (add-to-list (make-local-variable 'LaTeX-caption-supported-float-types) + flt)) + (if (string-equal "e" (substring flt -1)) + (TeX-add-symbols (concat "listof" flt "s")) + (TeX-add-symbols + (concat "listof" flt "s") + (concat "listof" flt "es")))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-newfloat-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-newfloat-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "newfloat" + (lambda () + + ;; Add newfloat to the parser. + (TeX-auto-add-regexp LaTeX-newfloat-DeclareFloatingEnvironment-regexp) + + ;; Commands: + (TeX-add-symbols + '("DeclareFloatingEnvironment" + [TeX-arg-key-val (LaTeX-newfloat-key-val-options)] + (TeX-arg-eval + (lambda () + (let ((newfloat (TeX-read-string + (TeX-argument-prompt nil nil "Floating environment")))) + (LaTeX-add-newfloat-DeclareFloatingEnvironments newfloat) + (format "%s" newfloat))))) + + '("SetupFloatingEnvironment" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Floating environment") + (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + (TeX-arg-key-val (LaTeX-newfloat-key-val-options-local))) + + '("ForEachFloatingEnvironment" t) + '("ForEachFloatingEnvironment*" t) + + '("PrepareListOf" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Floating environment") + (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + t) + + '("newfloatsetup" + (TeX-arg-eval + (lambda () + (let ((keyvals (TeX-read-key-val + nil + (append '(("chapterlistsgap")) + (if (< (LaTeX-largest-level) 2) + '(("within" ("chapter" "section" "none"))) + '(("within" ("section" "none")))))))) + (format "%s" keyvals)))))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("DeclareFloatingEnvironment" "[{") + ("SetupFloatingEnvironment" "{{") + ("ForEachFloatingEnvironment" "*{") + ("PrepareListOf" "{{") + ("newfloatsetup" "{")) + 'function))) + TeX-dialect) + +(defun LaTeX-newfloat-package-options () + "Prompt for package options for the newfloat package." + (TeX-read-key-val + t + (append + '(("chapterlistsgap")) + (if (< (LaTeX-largest-level) 2) + '(("within" ("chapter" "section" "none"))) + '(("within" ("section" "none"))))))) + +;;; newfloat.el ends here diff --git a/elpa/auctex-13.1.3/style/newfloat.elc b/elpa/auctex-13.1.3/style/newfloat.elc Binary files differnew file mode 100644 index 0000000..8b69382 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newfloat.elc diff --git a/elpa/auctex-13.1.3/style/newpxmath.el b/elpa/auctex-13.1.3/style/newpxmath.el new file mode 100644 index 0000000..8e8c0ac --- /dev/null +++ b/elpa/auctex-13.1.3/style/newpxmath.el @@ -0,0 +1,76 @@ +;;; newpxmath.el --- AUCTeX style for `newpxmath.sty' (v1.232) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newpxmath.sty' (v1.232) from 2015/04/07. +;; `newpxmath.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "newpxmath" + (lambda () + + ;; Run style hook for amsmath + (TeX-run-style-hooks "amsmath") + + ;; New symbols + (TeX-add-symbols + '("overgroup" t) + '("undergroup" t) + '("overgroupra" t) + '("overgroupla" t) + '("undergroupra" t) + '("undergroupla" t) + '("widering" t) + '("widearc" t) + '("wideOarc" t) + '("uppartial" 0) + '("upvarkappa" 0) + '("varmathbb" "Character") + '("vmathbb" "Character") + '("vvmathbb" "Character"))) + TeX-dialect) + +(defvar LaTeX-newpxmath-package-options + '("varg" + "cmintegrals" + "uprightGreek" + "slantedGreek" + "cmbraces" + "bigdelims" + "varbb" + "vvarbb" + "nosymbolsc" + "amssymbols" + "noamssymbols" + "frenchmath") + "Package options for the newpxmath package.") + +;;; newpxmath.el ends here diff --git a/elpa/auctex-13.1.3/style/newpxmath.elc b/elpa/auctex-13.1.3/style/newpxmath.elc Binary files differnew file mode 100644 index 0000000..e60668f --- /dev/null +++ b/elpa/auctex-13.1.3/style/newpxmath.elc diff --git a/elpa/auctex-13.1.3/style/newpxtext.el b/elpa/auctex-13.1.3/style/newpxtext.el new file mode 100644 index 0000000..3613e2c --- /dev/null +++ b/elpa/auctex-13.1.3/style/newpxtext.el @@ -0,0 +1,88 @@ +;;; newpxtext.el --- AUCTeX style for `newpxtext.sty' (v1.232) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newpxtext.sty' (v1.232) from 2015/04/15. +;; `newpxtext.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "newpxtext" + (lambda () + + ;; Run style hook for various packages loaded by newpxtext + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + '("useosf" 0) ; Only preamble command + '("useproportional" 0) ; Only preamble command + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sustyle" -1) ; sup style declaration + '("textlf" t) ; lf command + '("texttlf" t) ; tlf command + '("textosf" t) ; osf command + '("texttosf" t) ; tosf command + '("textsu" t)) ; sup style command + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sustyle" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-newpxtext-package-options + '("defaultsups" "scosf" "largesc" + "scaled" "helvratio" + "tighter" "looser" "spacing" "stretch" "shrink" + "lining" "lf" "oldstyle" "osf" "tabular" + "p" "proportional" "theoremfont") + "Package options for the newpxtext package.") + +;;; newpxtext.el ends here diff --git a/elpa/auctex-13.1.3/style/newpxtext.elc b/elpa/auctex-13.1.3/style/newpxtext.elc Binary files differnew file mode 100644 index 0000000..0459bee --- /dev/null +++ b/elpa/auctex-13.1.3/style/newpxtext.elc diff --git a/elpa/auctex-13.1.3/style/newtxmath.el b/elpa/auctex-13.1.3/style/newtxmath.el new file mode 100644 index 0000000..cf09156 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxmath.el @@ -0,0 +1,86 @@ +;;; newtxmath.el --- AUCTeX style for `newtxmath.sty' (v1.321) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newtxmath.sty' (v1.321) from 2014/11/16. +;; `newtxmath.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "newtxmath" + (lambda () + + ;; Run style hook for amsmath + (TeX-run-style-hooks "amsmath") + + ;; New symbols + (TeX-add-symbols + '("overgroup" t) + '("undergroup" t) + '("overgroupra" t) + '("overgroupla" t) + '("undergroupra" t) + '("undergroupla" t) + '("widering" t) + '("widearc" t) + '("wideOarc" t) + '("varnothing" 0) + '("emtysetAlt" 0) + '("forallAlt" 0) + '("existsAlt" 0) + '("nexistsAlt" 0) + '("vvmathbb" "Character"))) + TeX-dialect) + +(defvar LaTeX-newtxmath-package-options + '("varg" + "cmintegrals" + "uprightGreek" + "slantedGreek" + "cmbraces" + "bigdelims" + "varbb" + "vvarbb" + "nosymbolsc" + "amssymbols" + "noamssymbols" + "libaltvw" + "liby" + "timesmathacc" + "libertine" + "minion" + "garamondx" + "baskervaldx" + "utopia" "heuristica" + "erewhon" + "xcharter") + "Package options for the newtxmath package.") + +;;; newtxmath.el ends here diff --git a/elpa/auctex-13.1.3/style/newtxmath.elc b/elpa/auctex-13.1.3/style/newtxmath.elc Binary files differnew file mode 100644 index 0000000..5689c07 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxmath.elc diff --git a/elpa/auctex-13.1.3/style/newtxsf.el b/elpa/auctex-13.1.3/style/newtxsf.el new file mode 100644 index 0000000..901c83b --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxsf.el @@ -0,0 +1,59 @@ +;;; newtxsf.el --- AUCTeX style for `newtxsf.sty' (v1.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newtxsf.sty' (v1.0) from 2014/11/14. +;; `newtxsf.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "newtxsf" + (lambda () + ;; Run style hook for amsmath + (TeX-run-style-hooks "amsmath") + + ;; New symbols + (TeX-add-symbols + '("upimath" 0) + '("upjmath" 0))) + TeX-dialect) + +(defvar LaTeX-newtxsf-package-options + '("scaled" + "nosymbolsc" + "cmintegrals" + "amssymbols" + "noamssymbols" + "uprightGreek" + "slantedGreek" + "frenchmath") + "Package options for the newtxsf package.") + +;;; newtxsf.el ends here diff --git a/elpa/auctex-13.1.3/style/newtxsf.elc b/elpa/auctex-13.1.3/style/newtxsf.elc Binary files differnew file mode 100644 index 0000000..9f32dc0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxsf.elc diff --git a/elpa/auctex-13.1.3/style/newtxtext.el b/elpa/auctex-13.1.3/style/newtxtext.el new file mode 100644 index 0000000..f80c872 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxtext.el @@ -0,0 +1,87 @@ +;;; newtxtext.el --- AUCTeX style for `newtxtext.sty' (v1.434) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newtxtext.sty' (v1.434) from 2015/04/07. +;; `newtxtext.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "newtxtext" + (lambda () + + ;; Run style hook for various packages loaded by newtxtext + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + '("useosf" 0) ; Only preamble command + '("useproportional" 0) ; Only preamble command + '("lfstyle" -1) ; lf declaration + '("tlfstyle" -1) ; tlf declaration + '("osfstyle" -1) ; osf declaration + '("tosfstyle" -1) ; tosf declaration + '("sustyle" -1) ; sup style declaration + '("textlf" t) ; lf command + '("texttlf" t) ; tlf command + '("textosf" t) ; osf command + '("texttosf" t) ; tosf command + '("textsu" t)) ; sup style command + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textsu" "{")) + 'type-command) + (font-latex-add-keywords '(("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "") + ("sustyle" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-newtxtext-package-options + '("defaultsups" "helvratio" "osf" "scaled" "scosf" + ;; New options since 1.4 + "largesc" "adobesc" "theoremfont" + "lining" "lf" "oldstyle" "tabular" "p" "proportional") + "Package options for the newtxtext package.") + +;;; newtxtext.el ends here diff --git a/elpa/auctex-13.1.3/style/newtxtext.elc b/elpa/auctex-13.1.3/style/newtxtext.elc Binary files differnew file mode 100644 index 0000000..e2eec9c --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxtext.elc diff --git a/elpa/auctex-13.1.3/style/newtxttt.el b/elpa/auctex-13.1.3/style/newtxttt.el new file mode 100644 index 0000000..1b63172 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxttt.el @@ -0,0 +1,69 @@ +;;; newtxtt.el --- AUCTeX style for `newtxtt.sty' (v1.05) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-11-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `newtxtt.sty' (v1.05) from 2014/11/18. +;; `newtxtt.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "newtxtt" + (lambda () + + ;; Run style hook for newtxtt + (TeX-run-style-hooks "textcomp") + + ;; New symbols + (TeX-add-symbols + '("textttz" t) + '("ttz" -1) + '("ttzdefault" -1)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textttz" "{")) + 'type-command) + (font-latex-add-keywords '(("ttzfamily" "") + ("ttz" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-newtxtt-package-options + '("scaled" "zerostyle" "nomono" "straightquotes" + "ttdefault" "ttzdefault") + "Package options for the newtxtt package.") + +;;; newtxtt.el ends here diff --git a/elpa/auctex-13.1.3/style/newtxttt.elc b/elpa/auctex-13.1.3/style/newtxttt.elc Binary files differnew file mode 100644 index 0000000..5b3fd0d --- /dev/null +++ b/elpa/auctex-13.1.3/style/newtxttt.elc diff --git a/elpa/auctex-13.1.3/style/newzealand.el b/elpa/auctex-13.1.3/style/newzealand.el new file mode 100644 index 0000000..9acead5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/newzealand.el @@ -0,0 +1,42 @@ +;;; newzealand.el --- AUCTeX style for the `newzealand' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-07-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Newzealand text in connection with the +;; `newzealand' babel option. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "newzealand" + (lambda () + (TeX-run-style-hooks "english")) + TeX-dialect) + +;;; newzealand.el ends here diff --git a/elpa/auctex-13.1.3/style/newzealand.elc b/elpa/auctex-13.1.3/style/newzealand.elc Binary files differnew file mode 100644 index 0000000..3c0552f --- /dev/null +++ b/elpa/auctex-13.1.3/style/newzealand.elc diff --git a/elpa/auctex-13.1.3/style/ngerman.el b/elpa/auctex-13.1.3/style/ngerman.el new file mode 100644 index 0000000..6081615 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ngerman.el @@ -0,0 +1,46 @@ +;;; ngerman.el --- Setup AUCTeX for editing German text. -*- lexical-binding: t; -*- + +;;; Commentary: +;; +;; Cater for some specialities of `(n)german.sty', e.g. special quote +;; and hyphen strings or that `"' makes the following letter an +;; umlaut. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(defvar LaTeX-german-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `german.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-german-mode-syntax-table) + +(TeX-add-style-hook + "ngerman" + (lambda () + (set-syntax-table LaTeX-german-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language '("ngerman" "\"`" "\"'" t))) + (setq LaTeX-babel-hyphen-language "ngerman") + ;; Fontification + (when (and (eq TeX-install-font-lock 'font-latex-setup) + (featurep 'font-latex)) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\">" "\"<" german)) + ;; Prevent "| from leading to color bleed. + (font-latex-add-to-syntax-alist (list (cons ?\" "\\")))) + (run-hooks 'TeX-language-de-hook)) + TeX-dialect) + +;;; ngerman.el ends here diff --git a/elpa/auctex-13.1.3/style/ngerman.elc b/elpa/auctex-13.1.3/style/ngerman.elc Binary files differnew file mode 100644 index 0000000..3612a76 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ngerman.elc diff --git a/elpa/auctex-13.1.3/style/nicefrac.el b/elpa/auctex-13.1.3/style/nicefrac.el new file mode 100644 index 0000000..ba2dadc --- /dev/null +++ b/elpa/auctex-13.1.3/style/nicefrac.el @@ -0,0 +1,54 @@ +;;; nicefrac.el --- AUCTeX style for the LaTeX package `nicefrac.sty' (v0.9b) -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Christian Schlauer <cschl@arcor.de> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `nicefrac.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "nicefrac" + (lambda () + (TeX-add-symbols + '("nicefrac" [ "Font changing command" ] "Numerator" "Denominator")) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("nicefrac" "[{{")) 'textual))) + TeX-dialect) + +(defvar LaTeX-nicefrac-package-options '("nice" "ugly") + "Package options for the nicefrac package.") + +;;; nicefrac.el ends here diff --git a/elpa/auctex-13.1.3/style/nicefrac.elc b/elpa/auctex-13.1.3/style/nicefrac.elc Binary files differnew file mode 100644 index 0000000..2b2513a --- /dev/null +++ b/elpa/auctex-13.1.3/style/nicefrac.elc diff --git a/elpa/auctex-13.1.3/style/nomencl.el b/elpa/auctex-13.1.3/style/nomencl.el new file mode 100644 index 0000000..5a57cda --- /dev/null +++ b/elpa/auctex-13.1.3/style/nomencl.el @@ -0,0 +1,78 @@ +;;; nomencl.el --- AUCTeX style for the nomencl class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2018; 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-10-09 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the nomencl package. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-nomencl-package-options + '("refeq" "norefeq" "refpage" "norefpage" "prefix" "noprefix" "cfg" "nocfg" + "intoc" "notintoq" "compatible" "noncompatible" "croatian" "danish" + "english" "french" "german" "italian" "polish" "portuguese" "russian" + "spanish" "ukrainian") + "Package options for the nomencl package.") + +(TeX-add-style-hook + "nomencl" + (lambda () + (TeX-add-symbols + '("makenomenclature" 0) + '("printnomenclature" ["Label width"]) + '("nomenclature" ["Prefix"] "Symbol" "Description") + "nomrefeq" + "nomrefpage" + "nomrefeqpage" + "nomnorefeq" + "nomnorefpage" + "nomnorefeqpage" + '("nomlabelwidth" 0) + '("nomname" 0) + '("nomgroup" 0) + '("nompreamble" 0) + '("nompostamble" 0) + '("nomitemsep" 0) + '("nomprefix" 0) + '("nomlabel" 0) + '("nomentryend" 0) + '("eqdeclaration" 0) + '("pagedeclaration" 0)) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("nomenclature" "[{{")) + 'reference))) + TeX-dialect) + +;;; nomencl.el ends here diff --git a/elpa/auctex-13.1.3/style/nomencl.elc b/elpa/auctex-13.1.3/style/nomencl.elc Binary files differnew file mode 100644 index 0000000..4376b61 --- /dev/null +++ b/elpa/auctex-13.1.3/style/nomencl.elc diff --git a/elpa/auctex-13.1.3/style/ntheorem.el b/elpa/auctex-13.1.3/style/ntheorem.el new file mode 100644 index 0000000..cd8eff4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ntheorem.el @@ -0,0 +1,443 @@ +;;; ntheorem.el --- AUCTeX style for `ntheorem.sty' (v1.33) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015-2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-10-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ntheorem.sty' (v1.33) from 2011/08/15. +;; `ntheorem.sty' is and part of TeXLive. + +;; The style provides the function `LaTeX-ntheorem-env-label' which +;; enables new defined environments with "\newtheoreom" to interact +;; with AUCTeX and RefTeX mechanisms for inserting labels. Check +;; docstring of `LaTeX-ntheorem-env-label' for instructions. + +;;; Code + +(require 'crm) +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-color-definecolor-list + "color" + ()) + +(declare-function LaTeX-xcolor-definecolor-list + "xcolor" + ()) + +(defvar LaTeX-ntheorem-theoremstyle-list + '(("plain") ("break") ("change") ("changebreak") ("margin") + ("marginbreak") ("nonumberplain") ("nonumberbreak") ("empty")) + "List of theorem styles provided by `ntheorem.el' and new ones +defined with \"\\newtheoremstyle\".") + +(defvar LaTeX-ntheorem-listtype-list + '(("all") ("allname") ("opt") ("optname")) + "List of predefined formatting options available for +\"\\theoremlisttype\" provided by `ntheorem.el' and new ones +defined with \"\\newtheoremlisttype\".") + +(defvar LaTeX-ntheorem-fontdecl + '(;; family + "rmfamily" "sffamily" "ttfamily" + ;; series + "mdseries" "bfseries" + ;; shape + "upshape" "itshape" "slshape" "scshape" + ;; size + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" + ;; reset macro + "normalfont") + "List of font declaration commands for \"\\newtheoremstyle\".") + +(defun LaTeX-arg-ntheorem-fontdecl (optional &optional prompt) + "Prompt for font declaration commands in \"\\theorem(body|header)font\". +If OPTIONAL is non-nil, insert the resulting value as an optional +argument. Use PROMPT as the prompt string." + (let* ((crm-separator (regexp-quote TeX-esc)) + (fontdecl (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Font declaration: \\" t) + LaTeX-ntheorem-fontdecl) + TeX-esc))) + (TeX-argument-insert fontdecl + optional + (when (and fontdecl (not (string= fontdecl ""))) + TeX-esc)))) + +(defun LaTeX-ntheorem-env-label (environment) + "Insert ENVIRONMENT, query for an optional argument and prompt +for label. AUCTeX users should add ENVIRONMENT to +`LaTeX-label-alist' via customize or in init-file with: + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + +RefTeX users should customize or add ENVIRONMENT to +`LaTeX-label-alist' and `reftex-label-alist', for example + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + (add-to-list \\='reftex-label-alist + \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\" + nil (\"Lemma\" \"lemma\") nil))" + (let ((opthead (TeX-read-string + (TeX-argument-prompt t nil "Heading")))) + (LaTeX-insert-environment environment + (when (and opthead + (not (string= opthead ""))) + (format "[%s]" opthead)))) + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))) + +;; Setup parsing for \newtheorem +(TeX-auto-add-type "ntheorem-newtheorem" "LaTeX") + +;; Setup parsing for \newtheoremstyle +(TeX-auto-add-type "ntheorem-newtheoremstyle" "LaTeX") + +;; Setup parsing for \newtheoremlisttype +(TeX-auto-add-type "ntheorem-newtheoremlisttype" "LaTeX") + +(defun LaTeX-ntheorem-auto-prepare () + "Clear `LaTeX-auto-ntheorem-newtheorem' and +`LaTeX-auto-ntheorem-newtheoremstyle' before parsing." + (setq LaTeX-auto-ntheorem-newtheorem nil) + (setq LaTeX-auto-ntheorem-newtheoremstyle nil) + (setq LaTeX-auto-ntheorem-newtheoremlisttype nil)) + +(defun LaTeX-ntheorem-auto-cleanup () + "Move parsed results from `LaTeX-auto-ntheorem-newtheorem' and +make them available as new environments. Update +`LaTeX-ntheorem-theoremstyle-list' with styles defined with +\"\\newtheoremstyle\"." + (dolist (newthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + (LaTeX-add-environments (list newthm #'LaTeX-ntheorem-env-label)) + (LaTeX-add-environments (list (concat newthm "*") + #'LaTeX-ntheorem-env-label))) + (dolist (newthmstyle (LaTeX-ntheorem-newtheoremstyle-list)) + (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list) + newthmstyle)) + (dolist (newthmlist (LaTeX-ntheorem-newtheoremlisttype-list)) + (add-to-list (make-local-variable 'LaTeX-ntheorem-listtype-list) + newthmlist)) + (when (LaTeX-provided-package-options-member "ntheorem" "thmmarks") + (dolist (nthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + (TeX-add-symbols (concat nthm "Symbol")))) + (dolist (nthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + (TeX-add-symbols (concat nthm "name")))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-ntheorem-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-ntheorem-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "ntheorem" + (lambda () + + (TeX-auto-add-regexp + `(,(concat "\\\\newtheorem{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-ntheorem-newtheorem)) + (TeX-auto-add-regexp + `(,(concat "\\\\newframedtheorem{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-ntheorem-newtheorem)) + (TeX-auto-add-regexp + `(,(concat "\\\\newshadedtheorem{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-ntheorem-newtheorem)) + (TeX-auto-add-regexp + `(,(concat "\\\\newtheoremstyle{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-ntheorem-newtheoremstyle)) + (TeX-auto-add-regexp + `(,(concat "\\\\newtheoremlisttype{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-ntheorem-newtheoremlisttype)) + + (TeX-add-symbols + ;; 2.2 Defining New Theorem Sets + ;; Overrule the defintion in `latex.el': + '("newtheorem" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-ntheorem-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label)) + (LaTeX-add-environments (list (concat nthm "*") + #'LaTeX-ntheorem-env-label)) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + '("renewtheorem" + (TeX-arg-eval completing-read "Environment: " + (LaTeX-ntheorem-newtheorem-list)) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + ;; 2.3 Defining the Layout of Theorem Sets + '("theoremstyle" + (TeX-arg-eval completing-read "Style: " + LaTeX-ntheorem-theoremstyle-list)) + + '("theorembodyfont" + (LaTeX-arg-ntheorem-fontdecl "Body font")) + + '("theoremheaderfont" + (LaTeX-arg-ntheorem-fontdecl "Header font")) + + '("theoremnumbering" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Numbering scheme") + '("arabic" "roman" "Roman" "alph" "Alph" + "greek" "Greek" "fnsymbol"))) + + '("theoremseparator" "Separator") + + '("theorempreskip" + (TeX-arg-length "Skip before theorem")) + + '("theorempostskip" + (TeX-arg-length "Skip after theorem")) + + '("theoremindent" + (TeX-arg-free "Theorem indent")) + + (when (LaTeX-provided-package-options-member "ntheorem" "thmmarks") + '("theoremsymbol" t)) + + '("theoremprework" t) + '("theorempostwork" t) + + '("theoremclass" + (TeX-arg-eval completing-read "Theorem type: " + (append '(("LaTeX")) + (LaTeX-ntheorem-newtheorem-list)))) + + ;; 2.3.6 A Standard Set of Theorems + (when (LaTeX-provided-package-options-member "ntheorem" "standard") + (let ((env '("Theorem" "Lemma" "Proposition" + "Corollary" "Satz" "Korollar" + "Definition" "Example" "Beispiel" + "Anmerkung" "Bemerkung" "Remark" + "Proof" "Beweis"))) + (dolist (elt env) + (LaTeX-add-ntheorem-newtheorems elt) + (LaTeX-add-environments (list elt #'LaTeX-ntheorem-env-label)) + (LaTeX-add-environments (list (concat elt "*") + #'LaTeX-ntheorem-env-label))))) + + ;; 2.3.7 Framed and Boxed Theorems + '("newframedtheorem" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-ntheorem-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label)) + (LaTeX-add-environments (list (concat nthm "*") + #'LaTeX-ntheorem-env-label)) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + '("newshadedtheorem" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-ntheorem-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-ntheorem-env-label)) + (LaTeX-add-environments (list (concat nthm "*") + #'LaTeX-ntheorem-env-label)) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + '("shadecolor" + (TeX-arg-eval + (lambda () + (let ((color (cond ((member "xcolor" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-xcolor-definecolor-list))) + ((member "color" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-color-definecolor-list))) + (t + (TeX-read-string "Color name: "))))) + (format "%s" color))))) + + '("theoremframepreskip" + (TeX-arg-length "Skip before framed theorem")) + + '("theoremframepostskip" + (TeX-arg-length "Skip after framed theorem")) + + '("theoreminframepreskip" + (TeX-arg-length "Skip inside framed theorem")) + + '("theoreminframepostskip" + (TeX-arg-length "Skip inside framed theorem")) + + ;; 2.4 Generating Theoremlists + '("listtheorems" + (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + "Lists: " + (LaTeX-ntheorem-newtheorem-list)) ",")) + + ;; 2.4.2 Writing Extra Stuff to the Theorem File + '("addtheoremline" + (TeX-arg-eval completing-read "Environment: " + (LaTeX-ntheorem-newtheorem-list)) + t) + + '("addtheoremline*" + (TeX-arg-eval completing-read "Environment: " + (LaTeX-ntheorem-newtheorem-list)) + t) + + '("addtotheoremfile" + [ TeX-arg-eval completing-read "Environment: " + (LaTeX-ntheorem-newtheorem-list) ] + t) + + ;; 2.5.1 Defining New Theorem Layouts + '("newtheoremstyle" + (TeX-arg-eval + (lambda () + (let ((style (TeX-read-string + (TeX-argument-prompt nil nil "Style name")))) + (LaTeX-add-ntheorem-newtheoremstyles style) + (add-to-list (make-local-variable 'LaTeX-ntheorem-theoremstyle-list) + (list style)) + (format "%s" style)))) + 2) + + '("renewtheoremstyle" + (TeX-arg-eval completing-read "Style name: " + LaTeX-ntheorem-theoremstyle-list) + 2) + + ;; 2.5.2 Defining New Theorem List Layouts + '("newtheoremlisttype" + (TeX-arg-eval + (lambda () + (let ((layout (TeX-read-string + (TeX-argument-prompt nil nil "List layout name")))) + (LaTeX-add-ntheorem-newtheoremlisttypes layout) + (add-to-list (make-local-variable 'LaTeX-ntheorem-listtype-list) + (list layout)) + (format "%s" layout)))) + 3) + + '("renewtheoremlisttype" + (TeX-arg-eval completing-read "Style name: " + LaTeX-ntheorem-listtype-list) + 3) + + ;; 2.6 Setting End Marks + '("qedsymbol" t) + '("NoEndMark" 0) + + ;; 2.7 Extended Referencing Features + (when (LaTeX-provided-package-options-member "ntheorem" "thref") + '("thref" TeX-arg-ref)) ) + + ;; 2.6 Setting End Marks + ;; ... the endmark can manually be set by just saying \<name>Symbol. + (when (LaTeX-provided-package-options-member "ntheorem" "thmmarks") + (dolist (nthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + (TeX-add-symbols (concat nthm "Symbol")))) + + ;; 2.8 Miscellaneous + ;; Inside a theorem-like environment <env>, the name given as + ;; optional argument is accessible by \<env>name + (dolist (nthm (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + (TeX-add-symbols (concat nthm "name"))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newtheorem" "{[{[") + ("renewtheorem" "{[{[") + ("theoremstyle" "{") + ("theorembodyfont" "{") + ("theoremheaderfont" "{") + ("theoremnumbering" "{") + ("theoremseparator" "{") + ("theorempreskip" "{") + ("theorempostskip" "{") + ("theoremsymbol" "{") + ("theoremindent" "") + ("theoremprework" "{") + ("theorempostwork" "{") + ("theoremclass" "{") + ("newframedtheorem" "{[{[") + ("newshadedtheorem" "*{[{[") + ("shadecolor" "{") + ("theoremframepreskip" "{") + ("theoremframepostskip" "{") + ("theoreminframepreskip" "{") + ("theoreminframepostskip" "{") + ("listtheorems" "{") + ("addtheoremline" "*{{") + ("addtotheoremfile" "[{") + ("newtheoremstyle" "{{{") + ("renewtheoremstyle" "{{{") + ("newtheoremlisttype" "{{{{") + ("renewtheoremlisttype" "{{{{")) + 'function) + (font-latex-add-keywords '(("thref" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-ntheorem-package-options + '("standard" "noconfig" "framed" "thmmarks" "thref" "amsmath" "hyperref") + "Package options for the ntheorem package.") + +;;; ntheorem.el ends here diff --git a/elpa/auctex-13.1.3/style/ntheorem.elc b/elpa/auctex-13.1.3/style/ntheorem.elc Binary files differnew file mode 100644 index 0000000..47d93b3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ntheorem.elc diff --git a/elpa/auctex-13.1.3/style/ocg-p.el b/elpa/auctex-13.1.3/style/ocg-p.el new file mode 100644 index 0000000..d3ab40d --- /dev/null +++ b/elpa/auctex-13.1.3/style/ocg-p.el @@ -0,0 +1,203 @@ +;;; ocg-p.el --- AUCTeX style for `ocg-p.sty' (v0.4) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-08-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ocg-p.sty' v0.4 from 2013/01/10. +;; `ocg-p.sty' is part of TeXLive. + +;;; Code: + +;; Needed for auto-parsing. +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +;; Setup for layer id's defined with +;; \begin{ocg}[<opt-arg>]{<layer name>}{<layer id>}{<initial visibility>}: + +(TeX-auto-add-type "ocgp-ocg-layer-id" "LaTeX") + +(defvar LaTeX-ocgp-ocg-layer-id-regexp + `(,(concat "\\\\begin{ocg}" + "[ \t\n\r%]*" + "\\(?:\\[[^]]*\\]\\)?" + "[ \t\n\r%]*" + "\\(?:{[^}]+}\\)" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-ocgp-ocg-layer-id)) + +(defun LaTeX-ocgp-auto-prepare () + "Clear `LaTeX-auto-ocgp-ocg-layer-id' before parsing." + (setq LaTeX-auto-ocgp-ocg-layer-id nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-ocgp-auto-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defvar LaTeX-ocgp-env-key-val-options + '(("printocg" ("always" "never" "ifvisible")) + ("exportocg" ("always" "never" "ifvisible")) + ("listintoolbar" ("always" "never" "iffirstuse"))) + "Key=value options for ocg environment from ocg-p package.") + +(defun LaTeX-env-ocgp-ocg (optional) + "Insert arguments for ocg environment from ocg-p package." + ;; The optional key-val argument: + (let ((TeX-arg-opening-brace LaTeX-optop) + (TeX-arg-closing-brace LaTeX-optcl)) + (TeX-argument-insert + (TeX-read-key-val t LaTeX-ocgp-env-key-val-options) + t)) + ;; Layer Name: + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional nil "Layer name")) + optional) + ;; + ;; Layer id: Use completing read to show which id's are available. + ;; Then add the new id to list of know id's and insert it + (TeX-argument-insert + (let ((id (completing-read + (TeX-argument-prompt optional nil "Layer id") + (LaTeX-ocgp-ocg-layer-id-list)))) + (LaTeX-add-ocgp-ocg-layer-ids id) + id) + optional) + ;; + ;; Initial visibility: Insert 0 or 1 + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt optional nil "Initial visibility (0 or 1)")) + optional)) + +(defvar LaTeX-ocgp-mac-key-val-options + '(("triggerocg" ("onareaenter" "onareaexit" "onmousedown" + "onmouseup" "allactions"))) + "Key=value options for macros provided by ocg-p package.") + +(defun LaTeX-arg-ocgp-layer-id (optional &optional prompt) + "Insert (multiple) defined layer id's for various macros from ocg-p package. +<SPC> key binding in minibuffer is removed temporarily. +Completion is still available with <TAB> key." + (let* ((crm-separator "[ \t]+") + (crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) crm-local-completion-map)) + (ids (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Layer id ('s space separated)") + (LaTeX-ocgp-ocg-layer-id-list)) + " "))) + (TeX-argument-insert ids optional))) + +(defun LaTeX-env-ocgp-ocgtabular (environment) + "Insert ocgtabular ENVIRONMENT with position, column spec's and 2 more arguments. +Just like array and tabular." + (let ((pos (and LaTeX-default-position ; LaTeX-default-position can + ; be nil, i.e. do not prompt + (TeX-read-string "(Optional) Position: " LaTeX-default-position))) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format))) + (dbase (TeX-read-string "Database name: ")) + (opts (TeX-read-string "Additional options: "))) + (setq LaTeX-default-position pos) + (setq LaTeX-default-format fmt) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop fmt TeX-grcl) + (concat TeX-grop dbase TeX-grcl) + (concat TeX-grop opts TeX-grcl))) + (LaTeX-item-array t))) + +(TeX-add-style-hook + "ocg-p" + (lambda () + + ;; Add ocg-p to the parser + (TeX-auto-add-regexp LaTeX-ocgp-ocg-layer-id-regexp) + + ;; 2.3 The ocg environment + (LaTeX-add-environments + '("ocg" LaTeX-env-args LaTeX-env-ocgp-ocg)) + + ;; 2.4 The commands of the package + (TeX-add-symbols + '("toggleocgs" + [ TeX-arg-key-val LaTeX-ocgp-mac-key-val-options ] + LaTeX-arg-ocgp-layer-id + "Action button") + + '("showocgs" + [ TeX-arg-key-val LaTeX-ocgp-mac-key-val-options ] + LaTeX-arg-ocgp-layer-id + "Action button") + + '("hideocgs" + [ TeX-arg-key-val LaTeX-ocgp-mac-key-val-options ] + LaTeX-arg-ocgp-layer-id + "Action button") + + '("setocgs" + [ TeX-arg-key-val LaTeX-ocgp-mac-key-val-options ] + (LaTeX-arg-ocgp-layer-id "Toggle layer id ('s space separated)") + (LaTeX-arg-ocgp-layer-id "Show layer id ('s space separated)") + (LaTeX-arg-ocgp-layer-id "Hide layer id ('s space separated)") + "Action button")) + + ;; 2.5 The ocgtabular environment + (when (LaTeX-provided-package-options-member "ocg-p" "ocgtabular") + (LaTeX-add-environments + '("ocgtabular" LaTeX-env-ocgp-ocgtabular)) + + (TeX-add-symbols + '("setocgtabularheader" "Column name" "Displayed header"))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("toggleocgs" "[{{") + ("showocgs" "[{{") + ("hideocgs" "[{{") + ("setocgs" "[{{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-ocg-p-package-options '("ocgtabular") + "Package options for the ocg-p package.") + +;;; ocg-p.el ends here diff --git a/elpa/auctex-13.1.3/style/ocg-p.elc b/elpa/auctex-13.1.3/style/ocg-p.elc Binary files differnew file mode 100644 index 0000000..e08c35e --- /dev/null +++ b/elpa/auctex-13.1.3/style/ocg-p.elc diff --git a/elpa/auctex-13.1.3/style/ocgx.el b/elpa/auctex-13.1.3/style/ocgx.el new file mode 100644 index 0000000..340da52 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ocgx.el @@ -0,0 +1,75 @@ +;;; ocgx.el --- AUCTeX style for `ocgx.sty' (v0.5) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-08-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ocgx.sty' v0.5 from 2012/11/14. +;; `ocgx.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "ocgx" + (lambda () + + ;; Run style hook for ocg-p package: + (TeX-run-style-hooks "ocg-p") + + ;; 1.2 Manage the visibility of OCGs + (TeX-add-symbols + '("switchocg" LaTeX-arg-ocgp-layer-id "Action button") + + '("showocg" LaTeX-arg-ocgp-layer-id "Action button") + + '("hideocg" LaTeX-arg-ocgp-layer-id "Action button") + + '("actionsocg" + (LaTeX-arg-ocgp-layer-id "Toggle layer id ('s space separated)") + (LaTeX-arg-ocgp-layer-id "Show layer id ('s space separated)") + (LaTeX-arg-ocgp-layer-id "Hide layer id ('s space separated)") + "Action button")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("switchocg" "{{") + ("showocg" "{{") + ("hideocg" "{{") + ("actionsocg" "{{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-ocgx-package-options nil + "Package options for the ocgx package.") + +;;; ocgx.el ends here diff --git a/elpa/auctex-13.1.3/style/ocgx.elc b/elpa/auctex-13.1.3/style/ocgx.elc Binary files differnew file mode 100644 index 0000000..8034185 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ocgx.elc diff --git a/elpa/auctex-13.1.3/style/overpic.el b/elpa/auctex-13.1.3/style/overpic.el new file mode 100644 index 0000000..52d51d0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/overpic.el @@ -0,0 +1,124 @@ +;;; overpic.el --- AUCTeX style for `overpic.sty' (v1.3) -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2020-02-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `overpic.sty' (v1.3) from 2020/02/22. +;; `overpic.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-graphicx-key-val-options) +(defvar LaTeX-graphicx-package-options) + +(defvar LaTeX-overpic-key-val-options + '(("abs" ("true" "false")) + ("percent" ("true" "false")) + ("permil" ("true" "false")) + ("rel") + ("grid" ("true" "false")) + ("tics") + ("unit")) + "Key=value options for overpic macro and environments.") + +(defun LaTeX-arg-overpic-key-val (optional) + "Insert key-val for optional argument of overpic environments. +If OPTIONAL is non-nil, insert argument in square brackets. + +This function is an variation of +`LaTeX-arg-graphicx-includegraphics-key-val' where the key-val's +in `LaTeX-overpic-key-val-options' are offered in addition to the +ones provided by `LaTeX-graphicx-key-val-options'." + (let ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) + crm-local-completion-map)) + (minibuffer-local-completion-map + (remove (assoc 32 minibuffer-local-completion-map) + minibuffer-local-completion-map))) + (TeX-argument-insert + (TeX-read-key-val optional + (if (and (or (and (eq TeX-engine 'default) + (not (TeX-PDF-from-DVI))) + (eq TeX-engine 'luatex)) + TeX-PDF-mode) + (append '(("page") + ("pagebox" ("mediabox" + "cropbox" + "bleedbox" + "trimbox" + "artbox"))) + LaTeX-overpic-key-val-options + LaTeX-graphicx-key-val-options) + (append + LaTeX-overpic-key-val-options + LaTeX-graphicx-key-val-options))) + optional))) + + +(TeX-add-style-hook + "overpic" + (lambda () + + ;; overpic.sty loads graphicx.sty + (TeX-run-style-hooks "graphicx") + + (TeX-add-symbols + '("setOverpic" (TeX-arg-key-val LaTeX-overpic-key-val-options))) + + (LaTeX-add-environments + '("overpic" LaTeX-env-args + [ LaTeX-arg-overpic-key-val ] + LaTeX-arg-includegraphics) + + '("Overpic" LaTeX-env-args + [ LaTeX-arg-overpic-key-val ] + (TeX-arg-literal "{" "}"))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("setOverpic" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-overpic-package-options + (progn + (TeX-load-style "graphicx") + (append + LaTeX-graphicx-package-options + '("abs" + "percent" + "permil"))) + "Package options for the overpic package.") + +;;; overpic.el ends here diff --git a/elpa/auctex-13.1.3/style/overpic.elc b/elpa/auctex-13.1.3/style/overpic.elc Binary files differnew file mode 100644 index 0000000..150f914 --- /dev/null +++ b/elpa/auctex-13.1.3/style/overpic.elc diff --git a/elpa/auctex-13.1.3/style/paracol.el b/elpa/auctex-13.1.3/style/paracol.el new file mode 100644 index 0000000..3ed74b7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/paracol.el @@ -0,0 +1,294 @@ +;;; paracol.el --- AUCTeX style for `paracol.sty' (v1.35) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-05-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `paracol.sty' (v1.35) from 2018/12/31. +;; `paracol.sty' is part of TeXLive. + +;; `paracol.sty' provides an environment (paracol) and a command +;; (\switchcolumn) which take a star as the second (!) optional +;; argument. In order to make the input process easier for the users, +;; this style provides the environment `paracol*' and the command +;; `switchcolumn*' in the list of completion after entering C-c C-e or +;; C-c C-m (or C-c RET). + +;; Further, `\switchcolumn' takes a third optional argument containing +;; text which will be inserted spanned over the columns. This style +;; does not ask for this argument. If you need it, just enter it by +;; hand after the completion. This is a deliberate decision since I +;; think that over the time, the annoyance factor of hitting `RET' +;; will be larger than the number of times where this argument is +;; actually used. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun TeX-arg-paracol-switchcolumn* (optional) + "Query and insert the column argument of \\switchcolum macro. +If OPTIONAL is non-nil, insert the result in square brackets." + (let ((col (TeX-read-string + (TeX-argument-prompt optional nil "Column")))) + (when (and col (not (string= col ""))) + (save-excursion + (backward-char 1) + (TeX-argument-insert col optional))))) + +(TeX-add-style-hook + "paracol" + (lambda () + + (LaTeX-add-environments + ;; 7.1 Environment paracol + ;; \begin{paracol}[numleft]{num}[text] body \end{paracol} + ;; \begin{paracol}[numleft]*{num}[text] body \end{paracol} + '("paracol" [ "Number left" ] "Number of columns" [ "Text across columns" ] ) + '("paracol*" + (lambda (_env) + (let ((numleft (TeX-read-string + (TeX-argument-prompt t nil "Number left"))) + (numcol (TeX-read-string + (TeX-argument-prompt nil nil "Number of columns"))) + (txt (TeX-read-string + (TeX-argument-prompt t nil "Text across columns")))) + (LaTeX-insert-environment + ;; Simply feed the function with "paracol", other option is + ;; something like: + ;; (replace-regexp-in-string (regexp-quote "*") "" env) + "paracol" + (concat + (when (and numleft (not (string= numleft ""))) + (format "[%s]" numleft)) + "*" + (format "{%s}" numcol) + (when (and txt (not (string= txt ""))) + (format "[%s]" txt))))))) + + ;; 7.2 Column-Switching Command and Environments + ;; \begin{column} body \end{column} + ;; \begin{column*}[text] body \end{column*} + '("column") + '("column*" [ "Text across columns" ] ) + + ;; \begin{nthcolumn}{col} body \end{nthcolumn} + ;; \begin{nthcolumn*}{col}[text] body \end{nthcolumn*} + '("nthcolumn" "Column") + '("nthcolumn*" "Column" [ "Text across columns" ] ) + + ;; \begin{leftcolumn} body \end{leftcolumn} + ;; \begin{leftcolumn*}[text] body \end{leftcolumn*} + ;; \begin{rightcolumn} body \end{rightcolumn} + ;; \begin{rightcolumn*}[text] body \end{rightcolumn*} + '("leftcolumn") + '("leftcolumn*" [ "Text across columns" ] ) + '("rightcolumn") + '("rightcolumn*" [ "Text across columns" ] )) + + (TeX-add-symbols + ;; 7.2 Column-Switching Command and Environments + ;; \switchcolumn[col] + ;; \switchcolumn[col]*[text] + '("switchcolumn" [ "Column" ] ) + '("switchcolumn*" [ TeX-arg-paracol-switchcolumn* ] ) + '("thecolumn") + '("definecolumnpreamble" "Column" t) + '("ensurevspace" TeX-arg-length) + + ;; 7.3 Commands for Column and Gap Width + ;; \columnratio{r0, r1, ... , rk}[r0', r1', ... , rk'] + '("columnratio" "Fraction(s)" [ "Fraction(s)" ] ) + + ;; \setcolumnwidth{s0, s1, ... , sk}[s0', s1', ... , sk'] + ;; with s as width/gap + '("setcolumnwidth" "Width/Gap" [ "Width/Gap" ] ) + + ;; 7.4 Commands for Two-Sided Typesetting and Marginal Note Placement + ;; \twosided[t1t2 ... tk] + '("twosided" [ "Features (combination of p, c, m, b)" ]) + + ;; \marginparthreshold{k}[k'] + '("marginparthreshold" "Number of columns" [ "Number of columns" ] ) + + ;; 7.5 Commands for Counters + ;; \globalcounter{ctr} + ;; \globalcounter* + '("globalcounter" TeX-arg-counter) + '("globalcounter*") + + ;; \localcounter{ctr} + '("localcounter" TeX-arg-counter) + + ;; \definethecounter{ctr}{col}{rep} + '("definethecounter" TeX-arg-counter "Column" t) + + ;; \synccounter{ctr} + '("synccounter" TeX-arg-counter) + '("syncallcounters") + + ;; 7.6 Page-Wise Footnotes + '("footnotelayout" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Layout") + '("c" "m" "p"))) + + ;; \footnote*[num]{text} + ;; \footnotemark*[num] + ;; \footnotetext*[num]{text} + ;; Copied from `latex.el' + '("footnote*" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("footnotetext*" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil) + t) + '("footnotemark*" + (TeX-arg-conditional TeX-arg-footnote-number-p ([ "Number" ]) nil)) + + '("fncounteradjustment" 0) + '("nofncounteradjustment" 0) + + ;; 7.7 Commands for Coloring Texts and Column-Separating Rules + ;; \columncolor[mode]{color}[col] + ;; + ;; This clashes if colortbl.el is loaded since it provides a + ;; command with the same name but different arguments. We add + ;; the command only here but not for fontification + '("columncolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)) + [ "Column" ] ) + + ;; \normalcolumncolor[col] + '("normalcolumncolor" [ "Column" ] ) + '("coloredwordhyphenated" 0) + '("nocoloredwordhyphenated" 0) + + ;; \colseprulecolor[mode]{color}[col] + ;; \normalcolseprulecolor[col] + '("colseprulecolor" (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color)) + [ "Column" ] ) + '("normalcolseprulecolor" [ "Column" ] ) + + ;; 7.8 Commands for Background Painting + ;; \backgroundcolor{region}[mode]{color} + ;; \backgroundcolor{region(x0,y0)}[mode]{color} + ;; \backgroundcolor{region(x0,y0)(x1,y1)}[mode]{color} + '("backgroundcolor" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Region") + '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r" + "C" "G" "S" "F" "N" "P" "T" "B" "L" "R")) + (TeX-arg-conditional (member "xcolor" (TeX-style-list)) + (TeX-arg-xcolor) + (TeX-arg-color))) + + ;; \nobackgroundcolor{region} + '("nobackgroundcolor" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Region") + '("c" "g" "s" "f" "n" "p" "t" "b" "l" "r" + "C" "G" "S" "F" "N" "P" "T" "B" "L" "R"))) + + ;; \resetbackgroundcolor + '("resetbackgroundcolor" 0) + + ;; 7.9 Control of Contents Output + ;; \addcontentsonly{file}{col} + '("addcontentsonly" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Content file") + '("toc" "lof" "lot")) + "Column") + + ;; 7.10 Page Flushing Commands + '("flushpage" 0)) + + ;; \belowfootnoteskip is a length: + (LaTeX-add-lengths "belowfootnoteskip") + + ;; \switchcolumn should get its own line: + (LaTeX-paragraph-commands-add-locally "switchcolumn") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("switchcolumn" "*[")) + ;; FIXME: Syntax is + ;; \switchcolumn[num]*[text]. + ;; font-latex.el doesn't handle the case + ;; where `*' comes after the first `['. + ;; Therefore, we use this compromise to + ;; get something fontified at least. + 'textual) + (font-latex-add-keywords '(("flushpage" "*[")) + 'warning) + (font-latex-add-keywords '(("footnote" "*[{") + ("footnotemark" "*[") + ("footnotetext" "*[{")) + 'reference) + (font-latex-add-keywords '(("definecolumnpreamble" "{{") + ("ensurevspace" "{") + ("columnratio" "{[") + ("setcolumnwidth" "{[") + ("twosided" "[") + ("marginparthreshold" "{[") + ;; FIXME: Syntax is + ;; \globalcounter{ctr} or + ;; \globalcounter* We ignore `{' since + ;; font-latex.el doesn't handle a + ;; missing bracket nicely. + ("globalcounter" "*") + ("definethecounter" "{{{") + ("synccounter" "{") + ("syncallcounters" "") + ("footnotelayout" "{") + ("fncounteradjustment" "") + ("nofncounteradjustment" "") + ("normalcolumncolor" "[") + ("coloredwordhyphenated" "") + ("nocoloredwordhyphenated" "") + ("colseprulecolor" "[{[") + ("normalcolseprulecolor" "[") + ("backgroundcolor" "{[{") + ("nobackgroundcolor" "{") + ("resetbackgroundcolor" "") + ("addcontentsonly" "{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-paracol-package-options nil + "Package options for the paracol package.") + +;;; paracol.el ends here diff --git a/elpa/auctex-13.1.3/style/paracol.elc b/elpa/auctex-13.1.3/style/paracol.elc Binary files differnew file mode 100644 index 0000000..9df5f3f --- /dev/null +++ b/elpa/auctex-13.1.3/style/paracol.elc diff --git a/elpa/auctex-13.1.3/style/paralist.el b/elpa/auctex-13.1.3/style/paralist.el new file mode 100644 index 0000000..ee5cef8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/paralist.el @@ -0,0 +1,115 @@ +;;; paralist.el -- AUCTeX style for paralist.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2003-2005, 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2003-10-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `paralist.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +;; Insert an itemize-ish environment and ask for an optional label +(defun LaTeX-paralist-env-item-opt-label (environment) + "Insert ENVIRONMENT, an optional label and the first item." + (LaTeX-insert-environment + environment + (let ((label (TeX-read-string "(Optional) Label: "))) + (concat (unless (zerop (length label)) + (format "[%s]" label))))) + (LaTeX-find-matching-begin) + (end-of-line 1) + (delete-char 1) + (delete-horizontal-space) + (LaTeX-insert-item)) + +(TeX-add-style-hook + "paralist" + (lambda () + + ;; Add compactdesc to the list of environments which have an optional + ;; argument for each item. + (add-to-list 'LaTeX-item-list '("compactdesc" . LaTeX-item-argument)) + + ;; New symbols + (TeX-add-symbols + '("pointedenum") + '("pointlessenum") + '("paradescriptionlabel") + '("setdefaultitem" "First level" "Second level" "Third level" + "Fourth level") + '("setdefaultenum" "First level" "Second level" "Third level" + "Fourth level") + '("setdefaultleftmargin" "First level" "Second level" "Third level" + "Fourth level" "Fifth level" "Sixth level")) + + ;; New environments + (LaTeX-add-environments + '("asparaenum" LaTeX-paralist-env-item-opt-label) + '("inparaenum" LaTeX-paralist-env-item-opt-label) + '("compactenum" LaTeX-paralist-env-item-opt-label) + '("asparaitem" LaTeX-paralist-env-item-opt-label) + '("inparaitem" LaTeX-paralist-env-item-opt-label) + '("compactitem" LaTeX-paralist-env-item-opt-label) + '("compactdesc" LaTeX-env-item)) + ;; Environments (re)defined only when the package is loaded with particular + ;; options. + (unless (LaTeX-provided-package-options-member "paralist" "olditem") + (LaTeX-add-environments + '("itemize" LaTeX-paralist-env-item-opt-label))) + (unless (LaTeX-provided-package-options-member "paralist" "oldenum") + (LaTeX-add-environments + '("enumerate" LaTeX-paralist-env-item-opt-label))) + (when (LaTeX-provided-package-options-member "paralist" "defblank") + (LaTeX-add-environments + '("asparablank" LaTeX-env-item) + '("inparablank" LaTeX-env-item))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("setdefaultitem" "{{{{") + ("setdefaultenum" "{{{{") + ("setdefaultleftmargin" "{{{{{{")) + 'variable))) + TeX-dialect) + +(defvar LaTeX-paralist-package-options '("newitem" "olditem" "newenum" + "oldenum" "alwaysadjust" + "neveradjust" "neverdecrease" + "increaseonly" "defblank" + "pointedenum" "pointlessenum" + "cfg" "nocfg" "flushright" + "flushleft") + "Package options for the paralist package.") + +;;; paralist.el ends here diff --git a/elpa/auctex-13.1.3/style/paralist.elc b/elpa/auctex-13.1.3/style/paralist.elc Binary files differnew file mode 100644 index 0000000..a3977e2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/paralist.elc diff --git a/elpa/auctex-13.1.3/style/pdflscape.el b/elpa/auctex-13.1.3/style/pdflscape.el new file mode 100644 index 0000000..8511663 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdflscape.el @@ -0,0 +1,46 @@ +;;; pdflscape.el --- AUCTeX style for `pdflscape.sty' (v0.11) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-07-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pdflscape.sty' (v0.11) from 2016/05/14. +;; `pdflscape.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "pdflscape" + (lambda () + ;; Load lscape.el and we are done + (TeX-run-style-hooks "lscape")) + TeX-dialect) + +(defvar LaTeX-pdflscape-package-options nil + "Package options for the pdflscape package.") + +;;; pdflscape.el ends here diff --git a/elpa/auctex-13.1.3/style/pdflscape.elc b/elpa/auctex-13.1.3/style/pdflscape.elc Binary files differnew file mode 100644 index 0000000..baf093d --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdflscape.elc diff --git a/elpa/auctex-13.1.3/style/pdfpages.el b/elpa/auctex-13.1.3/style/pdfpages.el new file mode 100644 index 0000000..2fd44a7 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdfpages.el @@ -0,0 +1,144 @@ +;;; pdfpages.el --- AUCTeX style for `pdfpages.sty' (v0.4v) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-05-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pdfpages.sty' (v0.4v) from 2013/08/25. +;; `pdfpages.sty' is part of TeXLive. + +;; Thanks to Andreas Matthias for testing this style and writing +;; `pdfpages.sty' in the first place. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-pdfpages-key-val-options + '(;; Main options: + ("pages" ("-")) + ("nup") + ("landscape" ("true" "false")) + ;; Layout options: + ("delta") + ("offset") + ("frame" ("true" "false")) + ("column" ("true" "false")) + ("columnstrict" ("true" "false")) + ("openright" ("true" "false")) + ("pagecommand") + ("turn" ("true" "false")) + ("noautoscale" ("true" "false")) + ("fitpaper" ("true" "false")) + ("reflect" ("true" "false")) + ("signature") + ("signature*") + ("booklet" ("true" "false")) + ("picturecommand") + ("picturecommand*") + ("pagetemplate") + ("templatesize") + ("rotateoversize" ("true" "false")) + ("doublepages" ("true" "false")) + ("doublepagestwist" ("true" "false")) + ("doublepagestwistodd" ("true" "false")) + ("doublepagestwist*" ("true" "false")) + ("doublepagestwistodd*" ("true" "false")) + ("duplicatepages") + ;; Miscellaneous options: + ("lastpage") + ;; Hypertext options: + ("link" ("true" "false")) + ("linkname") + ("thread" ("true" "false")) + ("threadname") + ("linktodoc" ("true" "false")) + ;; Additional hypertext options: + ("linkfit" ("Fit" "FitH " "FitV " "FitB" "FitBH " "FitBV " "Region")) + ("linktodocfit" ("/Fit" "/FitH " "/FitV " "/FitB" "/FitBH " "/FitBV " "/Region")) + ("newwindow" ("true" "false")) + ("linkfilename") + ;; Experimental options: (Syntax may change in future versions!) + ("addtotoc") + ("addtolist") + ("survey" ("true" "false")) + ("survey-nolink" ("true" "false")) + ("xr-prefix")) + "Key=value options for pdfpages macros.") + +(TeX-add-style-hook + "pdfpages" + (lambda () + ;; Run style hook for packages loaded by pdfpages; all packages + ;; are required for running LaTeX, but not necessary within AUCTeX + (TeX-run-style-hooks "graphicx" "eso-pic" "everyshi" "ifthen" "calc") + + (TeX-add-symbols + ;; \includepdf[<options>]{<filename>} + '("includepdf" + [TeX-arg-key-val LaTeX-pdfpages-key-val-options] + (TeX-arg-eval + (lambda () + (let ((pdffile (file-relative-name + (read-file-name + "File to include: " nil nil nil nil + (lambda (pdfs) + (or (file-directory-p pdfs) + (string-match "\\.pdf\\'" pdfs)))) + (TeX-master-directory)))) + (format "%s" pdffile))))) + + ;; \includepdfmerge[<options>]{<file-page-list>} + ;; The mandatory argument is complex, we just insert a pair of + ;; braces and leave the rest to the user + '("includepdfmerge" + [TeX-arg-key-val LaTeX-pdfpages-key-val-options] t) + + ;; \includepdfset{<options>} + '("includepdfset" + (TeX-arg-key-val LaTeX-pdfpages-key-val-options)) + + '("threadinfodict" 0)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("includepdfset" "{")) + 'function) + (font-latex-add-keywords '(("includepdf" "[{") + ("includepdfmerge" "[{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-pdfpages-package-options + '("final" "draft" "enable-survey") + "Prompt for package options for the pdfpages package.") + +;;; pdfpages.el ends here diff --git a/elpa/auctex-13.1.3/style/pdfpages.elc b/elpa/auctex-13.1.3/style/pdfpages.elc Binary files differnew file mode 100644 index 0000000..0ae6dc0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdfpages.elc diff --git a/elpa/auctex-13.1.3/style/pdfsync.el b/elpa/auctex-13.1.3/style/pdfsync.el new file mode 100644 index 0000000..122f0eb --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdfsync.el @@ -0,0 +1,92 @@ +;;; pdfsync.el --- AUCTeX style for `pdfsync.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2005-12-28 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pdfsync.sty'. + +;;; Code: + +(require 'tex) + +(defun LaTeX-pdfsync-output-page () + "Return page number in output file corresponding to buffer position." + (let* ((line (line-number-at-pos)) + (master (TeX-active-master)) + (file (file-name-sans-extension + (file-relative-name (buffer-file-name) + (file-name-directory master)))) + (pdfsync-file (concat master ".pdfsync")) + (buf-live-p (get-file-buffer pdfsync-file)) + (sync-record "0") + (sync-page "1") + last-match) + (when (file-exists-p pdfsync-file) + (with-current-buffer (find-file-noselect pdfsync-file) + (save-restriction + (goto-char (point-min)) + ;; Narrow region to file in question. + (when (not (string= file master)) + (re-search-forward (concat "^(" file "\\(.tex\\)?$") nil t) + (let ((beg (match-beginning 0))) + (goto-char beg) + (narrow-to-region (line-beginning-position 2) + (progn (forward-sexp) (point)))) + (goto-char (point-min))) + ;; Look for the record number. + (catch 'break + (while (re-search-forward "^(\\|^l \\([0-9]+\\) \\([0-9]+\\)" nil t) + (cond ((string= (match-string 0) "(") + (goto-char (match-beginning 0)) + (forward-sexp)) + ((> (string-to-number (match-string 2)) line) + (throw 'break nil)) + (t + (setq sync-record (match-string 1) + last-match (match-beginning 0)))))) + ;; Look for the page number. + (goto-char (or last-match (point-min))) + ;; There might not be any p or s lines for the current file, + ;; so make it possible to search further. + (widen) + (catch 'break + (while (re-search-forward "^p \\([0-9]+\\)" nil t) + (when (>= (string-to-number (match-string 1)) + (string-to-number sync-record)) + (re-search-backward "^s \\([0-9]+\\)" nil t) + (setq sync-page (match-string 1)) + (throw 'break nil))))) + ;; Kill the buffer if it was loaded by us. + (unless buf-live-p (kill-buffer (current-buffer))))) + sync-page)) + +(TeX-add-style-hook + "pdfsync" + (lambda () + (setq TeX-source-correlate-output-page-function #'LaTeX-pdfsync-output-page)) + TeX-dialect) + +;;; pdfsync.el ends here diff --git a/elpa/auctex-13.1.3/style/pdfsync.elc b/elpa/auctex-13.1.3/style/pdfsync.elc Binary files differnew file mode 100644 index 0000000..e6b87b6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pdfsync.elc diff --git a/elpa/auctex-13.1.3/style/placeins.el b/elpa/auctex-13.1.3/style/placeins.el new file mode 100644 index 0000000..1eee1b8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/placeins.el @@ -0,0 +1,45 @@ +;;; placeins.el --- AUCTeX style for `placeins.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `placeins.sty' + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "placeins" + (lambda () + (TeX-add-symbols + '("FloatBarrier" 0))) + TeX-dialect) + +(defvar LaTeX-placeins-package-options + '("section" "above" "below" "verbose") + "Package options for placeins.") + +;; placeins.el ends here diff --git a/elpa/auctex-13.1.3/style/placeins.elc b/elpa/auctex-13.1.3/style/placeins.elc Binary files differnew file mode 100644 index 0000000..873b884 --- /dev/null +++ b/elpa/auctex-13.1.3/style/placeins.elc diff --git a/elpa/auctex-13.1.3/style/plext.el b/elpa/auctex-13.1.3/style/plext.el new file mode 100644 index 0000000..26e564e --- /dev/null +++ b/elpa/auctex-13.1.3/style/plext.el @@ -0,0 +1,90 @@ +;;; plext.el --- AUCTeX style for the plext package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2020, 2022 Free Software Foundation, Inc. + +;; Author: Ikumi Keita <ikumi@ikumi.que.jp> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-07-05 +;; Keywords: tex, japanese + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the plext package. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "plext" + (lambda () + ;; plext.sty extends some environments to accept option, e.g. <t>, + ;; for vertical typesetting. + (LaTeX-add-environments + ;; TODO: Add support for minipage and picture + ;; environments extension. + '("array" LaTeX-plext-env-array) + '("tabular" LaTeX-plext-env-array) + '("tabular*" LaTeX-plext-env-array)) + + (set (make-local-variable 'LaTeX-array-skipping-regexp) + (concat "\\(?:<[tyz]>\\)?[ \t]*" (regexp-opt '("[t]" "[b]" "")))) + (set (make-local-variable 'LaTeX-tabular*-skipping-regexp) + (concat "\\(?:<[tyz]>\\)?[ \t]*{[^}]*}[ \t]*" + (regexp-opt '("[t]" "[b]" ""))))) + TeX-dialect) + +(defun LaTeX-plext-env-array (env) + (let ((dir (TeX-read-string "(Optional) Direction (t or y or z): ")) + (width (if (string= env "tabular*") + (TeX-read-string + (format "Width (default %s): " LaTeX-default-width) + nil nil LaTeX-default-width))) + (pos (and LaTeX-default-position ; LaTeX-default-position can + ; be nil, i.e. do not prompt + (TeX-read-string "(Optional) Position: " LaTeX-default-position))) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format)))) + (unless (zerop (length dir)) + (setq dir (concat "<" dir ">"))) + (if (string= env "tabular*") + (setq LaTeX-default-width width)) + (setq LaTeX-default-position pos) + (setq LaTeX-default-format fmt) + (LaTeX-insert-environment env + (concat + dir + (if (string= env "tabular*") + (concat TeX-grop width TeX-grcl)) + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop fmt TeX-grcl))) + (if (string= env "tabular*") + (LaTeX-item-tabular* t) + (LaTeX-item-array t)))) + +;;; plext.el ends here. diff --git a/elpa/auctex-13.1.3/style/plext.elc b/elpa/auctex-13.1.3/style/plext.elc Binary files differnew file mode 100644 index 0000000..0315874 --- /dev/null +++ b/elpa/auctex-13.1.3/style/plext.elc diff --git a/elpa/auctex-13.1.3/style/plfonts.el b/elpa/auctex-13.1.3/style/plfonts.el new file mode 100644 index 0000000..51c0a81 --- /dev/null +++ b/elpa/auctex-13.1.3/style/plfonts.el @@ -0,0 +1,34 @@ +;;; plfonts.el - Setup AUC TeX for editing Polish text with plfonts.sty -*- lexical-binding: t; -*- + +;;; Commentary: +;; +;; `plfonts.sty' use `"' to make next character Polish. +;; `plfonts.sty' <C> L. Holenderski, IIUW, lhol@mimuw.edu.pl + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-plfonts-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `plfonts.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-plfonts-mode-syntax-table) + +(TeX-add-style-hook + "plfonts" + (lambda () + (set-syntax-table LaTeX-plfonts-mode-syntax-table) + (make-local-variable 'TeX-open-quote) + (make-local-variable 'TeX-close-quote) + (make-local-variable 'TeX-quote-after-quote) + (make-local-variable 'TeX-command-default) + (setq TeX-open-quote "\"<") + (setq TeX-close-quote "\">") + (setq TeX-quote-after-quote t) + (setq TeX-command-default "plLaTeX") + (run-hooks 'TeX-language-pl-hook)) + TeX-dialect) + +;;; plfonts.el ends here diff --git a/elpa/auctex-13.1.3/style/plfonts.elc b/elpa/auctex-13.1.3/style/plfonts.elc Binary files differnew file mode 100644 index 0000000..efb66c8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/plfonts.elc diff --git a/elpa/auctex-13.1.3/style/plhb.el b/elpa/auctex-13.1.3/style/plhb.el new file mode 100644 index 0000000..14d86ab --- /dev/null +++ b/elpa/auctex-13.1.3/style/plhb.el @@ -0,0 +1,34 @@ +;;; plhb.el - Setup AUC TeX for editing Polish text with plhb.sty -*- lexical-binding: t; -*- + +;;; Commentary: +;; +;; `plhb.sty' use `"' to make next character Polish. +;; `plhb.sty' <C> J. S. Bie\'n, IIUW, jsbien@mimuw.edu.pl + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-plhb-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `plhb.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-plhb-mode-syntax-table) + +(TeX-add-style-hook + "plhb" + (lambda () + (set-syntax-table LaTeX-plhb-mode-syntax-table) + (make-local-variable 'TeX-open-quote) + (make-local-variable 'TeX-close-quote) + (make-local-variable 'TeX-command-default) + (make-local-variable 'TeX-quote-after-quote) + (setq TeX-open-quote "\"<") + (setq TeX-close-quote "\">") + (setq TeX-quote-after-quote t) + (setq TeX-command-default "plLaTeX") + (run-hooks 'TeX-language-pl-hook)) + TeX-dialect) + +;;; plhb.el ends here diff --git a/elpa/auctex-13.1.3/style/plhb.elc b/elpa/auctex-13.1.3/style/plhb.elc Binary files differnew file mode 100644 index 0000000..44d3203 --- /dev/null +++ b/elpa/auctex-13.1.3/style/plhb.elc diff --git a/elpa/auctex-13.1.3/style/polish.el b/elpa/auctex-13.1.3/style/polish.el new file mode 100644 index 0000000..ab7936c --- /dev/null +++ b/elpa/auctex-13.1.3/style/polish.el @@ -0,0 +1,56 @@ +;;; polish.el --- AUCTeX style for the `polish' babel option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-01-08 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Polish text in connection with the +;; `polish' babel option. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-polish-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `polish.sty'.") + +(modify-syntax-entry ?\" "w" LaTeX-polish-mode-syntax-table) + +(TeX-add-style-hook + "polish" + (lambda () + (set-syntax-table LaTeX-polish-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("polish" "\"`" "\"'" ,TeX-quote-after-quote))) + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-pl-hook)) + TeX-dialect) + +;;; polish.el ends here diff --git a/elpa/auctex-13.1.3/style/polish.elc b/elpa/auctex-13.1.3/style/polish.elc Binary files differnew file mode 100644 index 0000000..db583c4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/polish.elc diff --git a/elpa/auctex-13.1.3/style/polski.el b/elpa/auctex-13.1.3/style/polski.el new file mode 100644 index 0000000..e7b10ae --- /dev/null +++ b/elpa/auctex-13.1.3/style/polski.el @@ -0,0 +1,63 @@ +;;; polski.el --- AUCTeX style for `polski.sty'. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-01-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Set up AUCTeX for editing Polish text in connection with +;; `polski.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(defvar LaTeX-polski-package-options + '("plmath" "nomathsymbols" "MeX" "T1" "QX" "OT1" "OT4" "prefixinginverb" + "noprefixinginverb" "roku" "r." "noroku") + "Package options for polski.sty.") + +(TeX-add-style-hook + "polski" + (lambda () + (TeX-add-symbols + ;; Dashes + "dywiz" + "pauza" + "ppauza") + ;; Quotation marks + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("polski" ",," "''" ,TeX-quote-after-quote))) + ;; Fontification of quotation marks. + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '(",," "''"))) + (run-hooks 'TeX-language-pl-hook)) + TeX-dialect) + +;;; polski.el ends here diff --git a/elpa/auctex-13.1.3/style/polski.elc b/elpa/auctex-13.1.3/style/polski.elc Binary files differnew file mode 100644 index 0000000..afaa2c5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/polski.elc diff --git a/elpa/auctex-13.1.3/style/polyglossia.el b/elpa/auctex-13.1.3/style/polyglossia.el new file mode 100644 index 0000000..cdfb03e --- /dev/null +++ b/elpa/auctex-13.1.3/style/polyglossia.el @@ -0,0 +1,366 @@ +;;; polyglossia.el --- AUCTeX style for `polyglossia.sty' version 1.42.0. -*- lexical-binding: t; -*- + +;; Copyright (C) 2015-2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `polyglossia.sty' version 1.42.0. + +;;; TODO: + +;; -- Create language specific styles with names `gloss-<lang>.el'. They +;; should add `text<lang>' macros, `<lang>' environments (`Arabic' for +;; `arabic' language), and the others language-specific commands. + +;;; Code: + +(require 'tex) ;Indispensable when compiling the call to `TeX-auto-add-type'. +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-auto-add-type "polyglossia-lang" "LaTeX") + +;; Self Parsing -- see (info "(auctex)Hacking the Parser"). +(defvar LaTeX-polyglossia-lang-regexp + (concat "\\\\set\\(defaultlanguage\\|mainlanguage\\|otherlanguages?\\)" + "[ \t\n\r]*\\(?:\\[\\(.*\\)\\]\\)?[ \t\n\r]*{\\([A-Za-z, ]+\\)}") + "Matches languages set with polyglossia macros.") + +(defvar LaTeX-polyglossia-setkeys-regexp + (concat "\\\\setkeys" + "[ \t\n\r]*{\\([A-Za-z]+\\)}[ \t\n\r]*{\\([^}]*\\)}") + "Matches polyglossia languages options set using \"\setkeys\".") + +(defvar LaTeX-auto-polyglossia-lang nil + "Temporary for parsing polyglossia languages.") + +(defvar LaTeX-auto-polyglossia-setkeys nil + "Temporary for parsing polyglossia language options.") + +(defun LaTeX-polyglossia-prepare () + "Clear some polyglossia variables before use." + (setq LaTeX-auto-polyglossia-lang nil + LaTeX-auto-polyglossia-setkeys nil + LaTeX-polyglossia-lang-list nil)) + +(defun LaTeX-polyglossia-cleanup () + "Move languages and their options from +`LaTeX-auto-polyglossia-lang' to `LaTeX-polyglossia-lang-list'." + ;; Example: now the value of `LaTeX-auto-polyglossia-lang' is something like + ;; '(("danish" "defaultlanguage" "") + ;; ("arabic" "otherlanguage" "locale=tunisia,numerals=maghrib") + ;; ("german" "otherlanguage" "spelling=new,script=latin") + ;; ("icelandic,brazil,sanskrit" "otherlanguages" "")) + ;; We want to end up with a list like + ;; '(("danish" "defaultlanguage") + ;; ("arabic" "otherlanguage" "locale=tunisia" "numerals=maghrib") + ;; ("german" "otherlanguage" "spelling=new" "script=latin") + ;; ("icelandic" "otherlanguages") + ;; ("brazil" "otherlanguages") + ;; ("sanskrit" "otherlanguages" "script=Devanagari")) + ;; with "script=Devanagari" option to "sanskrit" language set using + ;; "\setkeys". + ;; In each element of the alist, the key is the language, the second value is + ;; the polyglossia command which set the language, the rest of values is the + ;; list of options given to the language. + (let (opts otheropts) + (mapc + (lambda (elt) + (mapc + (lambda (language) + ;; `opts' is the string of options for `language', set using + ;; "\setdefaultlanguage" or "\setotherlanguage". + (setq opts (cdr (cdr elt))) + ;; `otheropts' is the string of options for `language' set using + ;; "\setkeys". + (setq otheropts + (car (cdr (assoc language LaTeX-auto-polyglossia-setkeys)))) + (add-to-list + 'LaTeX-polyglossia-lang-list + (append + (list language) (list (nth 1 elt)) + (unless (equal opts '("")) + (LaTeX-listify-package-options (car opts))) + (if otheropts (LaTeX-listify-package-options otheropts))) t)) + (LaTeX-listify-package-options (car elt)))) + LaTeX-auto-polyglossia-lang))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-polyglossia-prepare) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-polyglossia-cleanup) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) +;; Run style hooks for every active language. This *has* to be done after +;; `TeX-auto-parse'. +(add-hook 'TeX-update-style-hook #'LaTeX-polyglossia-load-languages t) + +(defvar LaTeX-polyglossia-language-list + '("albanian" "amharic" "arabic" "armenian" "asturian" "bahasai" "bahasam" + "basque" "bengali" "brazil" "breton" "bulgarian" "catalan" "coptic" + "croatian" "czech" "danish" "divehi" "dutch" "english" "esperanto" + "estonian" "farsi" "finnish" "french" "friulan" "galician" "german" "greek" + "hebrew" "hindi" "icelandic" "interlingua" "irish" "italian" "kannada" + "khmer" "korean" "lao" "latin" "latvian" "lithuanian" "lsorbian" "magyar" + "malayalam" "marathi" "nko" "norsk" "nynorsk" "occitan" "piedmontese" + "polish" "portuges" "romanian" "romansh" "russian" "samin" "sanskrit" + "scottish" "serbian" "slovak" "slovenian" "spanish" "swedish" "syriac" + "tamil" "telugu" "thai" "tibetan" "turkish" "turkmen" "ukrainian" "urdu" + "usorbian" "vietnamese" "welsh") + "List of languages supported by the polyglossia LaTeX package.") + +(defun LaTeX-polyglossia-active-languages () + "Return a list of polyglossia languages used in the document. +The last language is the default one." + (let (active-languages default) + (mapc + (lambda (elt) + (setq default (or (string-equal "defaultlanguage" (nth 1 elt)) + (string-equal "mainlanguage" (nth 1 elt)))) + ;; Append the language to the list if it's the default one. + (if default + (setq active-languages (append active-languages + (list (car elt)))) + (push active-languages (car elt)))) + LaTeX-polyglossia-lang-list) + active-languages)) + +(defun LaTeX-polyglossia-lang-option-member (language option) + "Return non-nil if OPTION has been given to polyglossia LANGUAGE. +The value is actually the tail of the list of options given to LANGUAGE." + (member option (cdr (cdr (assoc language LaTeX-polyglossia-lang-list))))) + +(defun LaTeX-arg-polyglossia-lang (_optional _default multiple setkeys) + "Prompt for language and its options with completion and insert them +as arguments. + +This function is triggered by \"\setdefaultlanguage\", +\"\setotherlanguage\", \"\setotherlanguages\", and \"\setkeys\" +macros by polyglossia package. + +OPTIONAL and DEFAULT are ignored, if MULTIPLE is non-nil prompt +for multiple languages, if SETKEYS is non-nil insert options as +second mandatory argument." + ;; DEFAULT = t , MULTIPLE = nil, SETKEYS = nil: "\setdefaultlanguage". + ;; DEFAULT = nil, MULTIPLE = nil, SETKEYS = nil: "\setotherlanguage". + ;; DEFAULT = nil, MULTIPLE = t , SETKEYS = nil: "\setotherlanguages". + ;; DEFAULT = nil, MULTIPLE = nil, SETKEYS = t : "\setkeys". + + ;; Note: `DEFAULT' is currently ignored because we don't really have a + ;; mechanism to identify the default polyglossia language. + (let ((language (funcall + (if multiple + #'TeX-completing-read-multiple + #'completing-read) + (if multiple "Languages: " "Language: ") + (if setkeys + (LaTeX-polyglossia-active-languages) + LaTeX-polyglossia-language-list))) + var options) + (if multiple + (mapc (lambda (elt) (TeX-run-style-hooks (concat "gloss-" elt))) + language) + (TeX-run-style-hooks (concat "gloss-" language))) + ;; "\setotherlanguages" doesn't take options, don't prompt for them. + (setq options + (if multiple "" + (setq var (intern (format "LaTeX-polyglossia-%s-options-list" language))) + (if (and (boundp var) (symbol-value var)) + ;; "\setdefaultlanguage" and "\setotherlanguage" use `options' + ;; as first optional argument; "\setkeys" uses `options' as + ;; second mandatory argument. + (TeX-read-key-val (not setkeys) (symbol-value var)) + ;; When `LaTeX-polyglossia-<lang>-options-list' is nil or not + ;; defined, don't prompt for options. + ""))) + (unless setkeys + (let ((TeX-arg-opening-brace LaTeX-optop) + (TeX-arg-closing-brace LaTeX-optcl)) + (TeX-argument-insert options t))) + (if multiple + (setq language (mapconcat #'identity language ","))) + (TeX-argument-insert language nil) + (if setkeys + (TeX-argument-insert options nil)))) + +(defun LaTeX-arg-polyglossiasetup-options (optional) + "Prompt for setup options of polyglossia package. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one." + (TeX-arg-key-val optional + '(("language") ;; TODO: add completion in `fontspec.el', see + ;; "\newfontlanguage"s in `fontspec-xetex.sty'. + ("hyphennames") + ("script") ;; TODO: add completion in `fontspec.el', see + ;; "\newfontscript"s in `fontspec-xetex.sty'. + ("direction" ("RL" "LR")) + ("scripttag") + ("langtag") + ("hyphenmins") + ("frenchspacing" ("true" "false")) + ("indentfirst" ("true" "false")) + ("fontsetup" ("true" "false")) + ;; The following options aren't already implemented but are + ;; present in `polyglossia.sty' comments. + ;; ("nouppercase" ("true" "false")) + ;; ("localalph") + ;; ("localnumber") + ))) + +(defun LaTeX-polyglossia-load-languages () + "Load style files of babel active languages." + (mapc (lambda (elt) (TeX-run-style-hooks (concat "gloss-" elt))) + (LaTeX-polyglossia-active-languages))) + +(TeX-add-style-hook + "polyglossia" + (lambda () + (TeX-check-engine-add-engines 'luatex 'xetex) + (TeX-auto-add-regexp + `(,LaTeX-polyglossia-lang-regexp (3 1 2) LaTeX-auto-polyglossia-lang)) + (TeX-auto-add-regexp + `(,LaTeX-polyglossia-setkeys-regexp (1 2) LaTeX-auto-polyglossia-setkeys)) + (TeX-run-style-hooks "makecmds" "xkeyval" "fontspec") + (TeX-add-symbols + '("setdefaultlanguage" (LaTeX-arg-polyglossia-lang t nil nil)) + '("setmainlanguage" (LaTeX-arg-polyglossia-lang t nil nil)) + '("setotherlanguage" (LaTeX-arg-polyglossia-lang nil nil nil)) + '("setotherlanguages" (LaTeX-arg-polyglossia-lang nil t nil)) + '("setkeys" (LaTeX-arg-polyglossia-lang nil nil t )) + '("PolyglossiaSetup" (TeX-arg-eval completing-read "Language: " + (LaTeX-polyglossia-active-languages)) + LaTeX-arg-polyglossiasetup-options) + "selectbackgroundlanguage" + '("resetdefaultlanguage" ["argument"] 1) + "normalfontlatin" + "rmfamilylatin" + "sffamilylatin" + "ttfamilylatin" + "selectlanguage" + "foreignlanguage") + + (TeX-declare-expert-macros + "polyglossia" + "PolyglossiaSetup" "selectbackgroundlanguage" "resetdefaultlanguage" + "normalfontlatin" "rmfamilylatin" "sffamilylatin" "ttfamilylatin" + "selectlanguage" "foreignlanguage") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("setdefaultlanguage" "[{") + ("setmainlanguage" "[{") + ("setotherlanguage" "[{") + ("setotherlanguages" "{") + ("setkeys" "{{")) + 'function))) + TeX-dialect) + +;; TODO: move each option variable in its specific `gloss-<lang>.el' file. +(defvar LaTeX-polyglossia-arabic-options-list + '(("calendar" ("gregorian" "islamic")) + ("locale" ("default" "mashriq" "libya" "algeria" "tunisia" "morocco" "mauritania")) + ("numerals" ("mashriq" "maghrib")) + ("abjadjimnotail" ("false" "true"))) + "Arabic language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-bengali-options-list + '(("numerals" ("Western" "Devanagari")) + ("changecounternumbering" ("true" "false"))) + "Bengali language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-catalan-options-list + '(("babelshorthands" ("true" "false"))) + "Catalan language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-dutch-options-list + '(("babelshorthands" ("true" "false"))) + "Dutch language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-english-options-list + '(("variant" ("american" "usmax" "british" "australian" "newzealand")) + ("ordinalmonthday" ("true" "false"))) + "English language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-farsi-options-list + '(("numerals" ("western" "eastern")) + ;; ("locale") ;; not yet implemented + ;; ("calendar") ;; not yet implemented + ) + "Farsi language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-german-options-list + '(("variant" ("german" "austrian" "swiss")) + ("spelling" ("new" "old")) + ("latesthyphen" ("true" "false")) + ("babelshorthands" ("true" "false")) + ("script" ("latin" "fraktur"))) + "German language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-greek-options-list + '(("variant" ("monotonic" "polytonic" "ancient")) + ("numerals" ("greek" "arabic")) + ("attic" ("true" "false"))) + "Greek language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-hebrew-options-list + '(("numerals" ("hebrew" "arabic")) + ("calendar" ("hebrew" "gregorian"))) + "Hebrew language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-hindi-options-list + '(("numerals" ("Western" "Devanagari"))) + "Hindi language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-lao-options-list + '(("numerals" ("lao" "arabic"))) + "Lao language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-russian-options-list + '(("spelling" ("modern" "old")) + ("babelshorthands" ("true" "false"))) + "Russian language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-sanskrit-options-list + '(("Script" ("Devanagari"))) + "Sanskrit language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-serbian-options-list + '(("script" ("cyrillic" "latin"))) + "Serbian language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-syriac-options-list + '(("numerals" ("western" "eastern" "abjad"))) + "Syriac language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-thai-options-list + '(("numerals" ("thai" "arabic"))) + "Thai language options for the polyglossia package.") + +(defvar LaTeX-polyglossia-package-options + '("babelshorthands" "localmarks" "nolocalmarks" "quiet") + "Package options for the polyglossia package.") + +;;; polyglossia.el ends here diff --git a/elpa/auctex-13.1.3/style/polyglossia.elc b/elpa/auctex-13.1.3/style/polyglossia.elc Binary files differnew file mode 100644 index 0000000..330014d --- /dev/null +++ b/elpa/auctex-13.1.3/style/polyglossia.elc diff --git a/elpa/auctex-13.1.3/style/portuges.el b/elpa/auctex-13.1.3/style/portuges.el new file mode 100644 index 0000000..7c0cdb1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/portuges.el @@ -0,0 +1,37 @@ +;;; portuges.el --- Setup AUCTeX for editing Portuges text. -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "portuges" + (lambda () + (TeX-run-style-hooks "portuguese")) + TeX-dialect) + +;;; portuges.el ends here diff --git a/elpa/auctex-13.1.3/style/portuges.elc b/elpa/auctex-13.1.3/style/portuges.elc Binary files differnew file mode 100644 index 0000000..ae31fa1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/portuges.elc diff --git a/elpa/auctex-13.1.3/style/portuguese.el b/elpa/auctex-13.1.3/style/portuguese.el new file mode 100644 index 0000000..6c93b5c --- /dev/null +++ b/elpa/auctex-13.1.3/style/portuguese.el @@ -0,0 +1,78 @@ +;;; portuguese.el --- Setup AUCTeX for editing Portuguese text. -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-05-02 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Cater for some specialities of Portuguese language provided by +;; babel package, e.g. special quote and hyphen strings or `"' which +;; is an active character. + +;; Thanks to Gustavo Barros <gusbrs.2016@gmail.com> for requesting +;; this feature and reviewing the code. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(defvar LaTeX-portuguese-mode-syntax-table + (copy-syntax-table LaTeX-mode-syntax-table) + "Syntax table used in LaTeX mode when using `portuguese' language.") + +(modify-syntax-entry ?\" "w" LaTeX-portuguese-mode-syntax-table) + +(TeX-add-style-hook + "portuguese" + (lambda () + (set-syntax-table LaTeX-portuguese-mode-syntax-table) + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("portuguese" "\"<" "\">" ,TeX-quote-after-quote))) + (setq LaTeX-babel-hyphen-language "portuguese") + (TeX-add-symbols + "ord" + "ro" + "orda" + "ra") + ;; Fontification + (when (and (eq TeX-install-font-lock 'font-latex-setup) + (featurep 'font-latex)) + (font-latex-add-quotes '("\"<" "\">" french)) + ;; Prevent "| from leading to color bleed. + (font-latex-add-to-syntax-alist (list (cons ?\" "\\")))) + (run-hooks 'TeX-language-pt-hook)) + TeX-dialect) + +;;; portuguese.el ends here diff --git a/elpa/auctex-13.1.3/style/portuguese.elc b/elpa/auctex-13.1.3/style/portuguese.elc Binary files differnew file mode 100644 index 0000000..72be1d6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/portuguese.elc diff --git a/elpa/auctex-13.1.3/style/preview.el b/elpa/auctex-13.1.3/style/preview.el new file mode 100644 index 0000000..5431c09 --- /dev/null +++ b/elpa/auctex-13.1.3/style/preview.el @@ -0,0 +1,112 @@ +;;; preview.el --- AUCTeX style for `preview.sty' (v2010/02/14) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-02-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `preview.sty' v2010/02/14. +;; `preview.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-preview-arg-ifpreview (_optional) + "Insert \\else and \\fi part of \\ifPreview command from preview.sty. +OPTIONAL is ignored." + (indent-according-to-mode) + (LaTeX-newline) + (indent-according-to-mode) + (save-excursion + (LaTeX-newline) + (indent-according-to-mode) + (insert TeX-esc "else") + (LaTeX-newline) + (LaTeX-newline) + (indent-according-to-mode) + (insert TeX-esc "fi"))) + +(TeX-add-style-hook + "preview" + (lambda () + + (LaTeX-add-environments + '("preview") + '("nopreview")) + + (TeX-add-symbols + '("PreviewMacro" (TeX-arg-conditional (y-or-n-p "With optional arguments? ") + ( [ t ] [ nil ] ) + ()) + TeX-arg-macro) + + '("PreviewMacro*" (TeX-arg-conditional (y-or-n-p "With optional arguments? ") + ( [ t ] [ nil ] ) + ()) + TeX-arg-macro) + + '("PreviewEnvironment" (TeX-arg-conditional (y-or-n-p "With optional arguments? ") + ( [ t ] [ nil ] ) + ()) + TeX-arg-environment) + + '("PreviewEnvironment*" (TeX-arg-conditional (y-or-n-p "With optional arguments? ") + ( [ t ] [ nil ] ) + ()) + TeX-arg-environment) + + '("PreviewSnarfEnvironment" TeX-arg-environment) + + '("PreviewOpen") + '("PreviewClose") + + '("ifPreview" LaTeX-preview-arg-ifpreview)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("PreviewMacro" "*[[{") + ("PreviewEnvironment" "*[[{") + ("PreviewSnarfEnvironment" "[{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-preview-package-options + '("active" "noconfig" "psfixbb" + "dvips" "pdftex" "xetex" + "displaymath" "floats" "textmath" + "graphics" "sections" "delayed" + "auctex" "showlabels" "tightpage" + "lyx" "counters" "footnotes" + "tracingall" "showbox") + "Package options for the preview package.") + +;;; preview.el ends here diff --git a/elpa/auctex-13.1.3/style/preview.elc b/elpa/auctex-13.1.3/style/preview.elc Binary files differnew file mode 100644 index 0000000..30d1b9d --- /dev/null +++ b/elpa/auctex-13.1.3/style/preview.elc diff --git a/elpa/auctex-13.1.3/style/prosper.el b/elpa/auctex-13.1.3/style/prosper.el new file mode 100644 index 0000000..f1b7adc --- /dev/null +++ b/elpa/auctex-13.1.3/style/prosper.el @@ -0,0 +1,190 @@ +;;; prosper.el --- Prosper style file for AUCTeX -*- lexical-binding: t; -*- + +;; Copyright (C) 2001-2021 Free Software Foundation, Inc. + +;; Authors: Phillip Lord<p.lord@russet.org.uk> +;; Nevin Kapur <nevin@jhu.edu> +;; Keywords: tex, wp, prosper +;; Version: 0.6 +;; URL: http://www.mts.jhu.edu/~kapur/emacs/prosper.el + +;; This is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;;; Commentary: + +;; This is a propser (http://prosper.sourceforge.net/) style file for +;; AUCTeX. + +;;; Installation: +;; +;; For this file to work you need to have a working installation of +;; AucTeX. After that installtion is simple. Put this file into one of +;; the directories specified in `TeX-style-path', with the name +;; "style" rather than "auto" as it might get over written in the +;; latter. +;; +;; Then stick the current for into your .emacs +;; (eval-after-load "latex" +;; '(add-to-list 'LaTeX-style-list '("prosper"))) +;; +;; +;; And that should be it. You check whether it's worked or not by +;; opening a prosper document, and trying `LaTeX-environment'. "slide" +;; should be available by tab completion and it should ask you about +;; overlays. +;; +;; The environment "prosper" should be inserted immediately after the +;; document environment. It will prompt you for options available +;; under prosper and create a skeleton document. + +;;; Bugs: +;; +;; Currently the documentclass expansion doesn't work, unless you +;; enter a documentclass line to let auctex know which style files to +;; load. Then delete this and do it again. Not good. I know no way +;; around this. + +;;; Code: + +;; Constants: + + +;; This is partly working now, and it a little neater than it +;; was. The main problem is that the redefinition of "documentclass" +;; does not happen until its all too late, so that stuff never +;; happens correctly. This is easy enough to fix by fiddling with +;; auctex. I shall have to download the latest version, and see if +;; its already been fixed. + +(require 'tex) +(require 'latex) + +(defconst LaTeX-prosper-version "2008-05-25" + "prosper.el version.") + +(defconst LaTeX-prosper-transition-styles '("Split" + "Blinds" + "Box" + "Wipe" + "Dissolve" + "Glitter" + "Replace") + "List of transition styles provided by prosper.") + +(defconst LaTeX-prosper-slide-styles + '("alienglow" "autumn" "azure" + "contemporain" "darkblue" "default" "frames" + "lignesbleues" "nuancegris" "troispoints" + "alcatel" "gyom" "pascal" "rico" + )) + +(defun LaTeX-prosper-insert-title (_optional) + (newline) + (mapc (lambda(f) + (TeX-insert-macro f) + (newline)) + '("title" "subtitle" "author" "email" "institution" "slideCaption" + "Logo" "DefaultTransition")) + (LaTeX-insert-environment "document") + (TeX-insert-macro "maketitle")) + + +;; Utility functions +(defun LaTeX-prosper-arg-pdftransition (_environment) + (let ((default + (if (boundp 'LaTeX-prosper-transition-history) + (car LaTeX-prosper-transition-history) + "Replace"))) + (TeX-argument-insert + (completing-read + (TeX-argument-prompt nil + (format "Transition (Default %s) " default) + t) + (mapcar #'list LaTeX-prosper-transition-styles) + nil + t + nil + 'LaTeX-prosper-transition-history + default) + nil))) + +(defun LaTeX-prosper-slide-style-prompt() + (completing-read + "Slide Style?" + LaTeX-prosper-slide-styles + nil nil nil nil "default" )) + + +(defun LaTeX-prosper-insert-options(_environment) + (insert "[" ) + (insert (LaTeX-prosper-slide-style-prompt) " ") + (mapc (lambda(f) + (if (y-or-n-p (car f)) + (insert (car (cdr f)) " "))) + '(("Draft?" "draft") + ("Color Slides?" "slideColor") + ("Disable running total on each slide?" "nototal") + ("Is the final version going to be PDF?" "pdf") + ("Are you going to use Adobe Distiller" "distiller"))) + (delete-char -1) + (insert "]")) + +(defun LaTeX-prosper-insert-slide (_environment) + (if (y-or-n-p "Surround with overlay? ") + (progn (TeX-insert-macro "overlays") + (if (search-backward "{" 0 t) + (progn + (goto-char (+ 1 (point))) + (insert "%\n"))))) + (let ((title (TeX-read-string "Title: "))) + (LaTeX-insert-environment "slide" (concat TeX-grop title TeX-grcl)))) + +;; AUCTeX configuration +(TeX-add-style-hook + "prosper" + (lambda () + (LaTeX-add-environments + '("slide" LaTeX-prosper-insert-slide) + '("itemstep" LaTeX-env-item) + '("Itemize" LaTeX-env-item)) + (TeX-add-symbols + '("documentclass" + LaTeX-prosper-insert-options + LaTeX-prosper-insert-title) + '("title" "Title of the presentation") + '("subtitle" "Subtitle of the presentation") + '("author" "Author name") + '("email" "Author email") + '("institution" "Author institution") + '("slideCaption" "Caption for slide") + '("Logo" "Logo") + '("displayVersion" TeX-arg-free) + '("DefaultTransition" + LaTeX-prosper-arg-pdftransition) + '("NoFrenchBabelItemize" TeX-arg-free) + '("part" LaTeX-prosper-arg-part) + '("overlays" "Number of overlays" t) + '("FontTitle" "Color slides" "Black & White Slides") + '("FontText" "Color slides" "Black & White Slides") + '("fontTitle" "Text") + '("fontText" "Text") + '("ColorFoot" "Color") + '("PDFtransition" LaTeX-prosper-arg-pdftransition) + '("myitem" "Level" "Definition") + '("fromSlide" "Number" t) + '("fromSlide*" "Number" t) + '("onlySlide" "Number" t) + '("onlySlide*" "Number" t) + '("OnlySlide" "Number") + '("UntilSlide" "Number") + '("untilSlide*" "Number") + '("PDForPS" TeX-arg-conditional) + '("onlyInPS" t) + '("onlyInPDF" t) + '("FromSlide" "Number"))) + TeX-dialect) + +;;; prosper.el ends here diff --git a/elpa/auctex-13.1.3/style/prosper.elc b/elpa/auctex-13.1.3/style/prosper.elc Binary files differnew file mode 100644 index 0000000..53ec9af --- /dev/null +++ b/elpa/auctex-13.1.3/style/prosper.elc diff --git a/elpa/auctex-13.1.3/style/psfig.el b/elpa/auctex-13.1.3/style/psfig.el new file mode 100644 index 0000000..09b2ad2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/psfig.el @@ -0,0 +1,83 @@ +;;; psfig.el - Support for the psfig style option. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2014, 2020 Free Software Foundation, Inc. + +;; Contributed by Marc Gemis <makke@wins.uia.ac.be> +;; Please direct comments to him. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "psfig" + (lambda () + ;; probable some of the following symbols may be removed + (TeX-add-symbols "protect" "figurepath" "fbox" + "other" "letter" "other" "then" "Sine" "Cosine" + "psdraft" "psfull" "psscalefirst" "psrotatefirst" + "psnodraftbox" "psdraftbox" "pssilent" "psnoisy" + "minmaxtest" + '("psfig" TeX-arg-psfig) + '("psfigurepath" t) + ) + (LaTeX-add-environments + '("psfigure" LaTeX-env-psfigure))) + TeX-dialect) + +(defun TeX-arg-psfig (_optional) + "Ask for file, width and length. Insert psfig macro" + (let ((psfile (read-file-name "PS-file: " "" "" nil)) + (figwidth (TeX-read-string "Figure width: ")) + (figheight (TeX-read-string "Figure height: ")) + ) + + (insert TeX-grop "figure=" psfile) + (if (not (zerop (length figwidth))) + (insert ",width=" figwidth)) + (if (not (zerop (length figheight))) + (insert ",height=" figheight)) + (insert TeX-grcl))) + + +(defun LaTeX-env-psfigure (_environment) + "Create with \\label and \\caption and \\psfig commands." + (let* ((float (TeX-read-string "Float to: " LaTeX-float)) + (caption (TeX-read-string "Caption: ")) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string "(Optional) Short caption: "))) + (label (TeX-read-string "Label: " LaTeX-figure-label)) + ; gf: ask if this should be centered + (psfile (read-file-name "PS-file: " "" "" nil)) + (figwidth (TeX-read-string "Figure width: ")) + (figheight (TeX-read-string "Figure height: ")) + ) + + (setq LaTeX-float (if (zerop (length float)) + LaTeX-float + float)) + + (LaTeX-insert-environment "figure" + (concat LaTeX-optop LaTeX-float LaTeX-optcl)) + + (insert TeX-esc "centerline" TeX-grop TeX-esc "psfig" TeX-grop + "figure=" psfile) + (if (not (zerop (length figwidth))) + (insert ",width=" figwidth)) + (if (not (zerop (length figheight))) + (insert ",height=" figheight)) + (insert TeX-grcl TeX-grcl) + (if (zerop (length caption)) + () + (newline-and-indent) + (insert (LaTeX-compose-caption-macro caption short-caption))) + (if (or (zerop (length label)) + (equal LaTeX-figure-label label)) + () + (newline-and-indent) + (insert TeX-esc "label" TeX-grop label TeX-grcl)) + + (forward-line 2))) + +;;; psfig.el ends here diff --git a/elpa/auctex-13.1.3/style/psfig.elc b/elpa/auctex-13.1.3/style/psfig.elc Binary files differnew file mode 100644 index 0000000..13e2053 --- /dev/null +++ b/elpa/auctex-13.1.3/style/psfig.elc diff --git a/elpa/auctex-13.1.3/style/pst-grad.el b/elpa/auctex-13.1.3/style/pst-grad.el new file mode 100644 index 0000000..0426a73 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-grad.el @@ -0,0 +1,73 @@ +;;; pst-grad.el --- AUCTeX style for `pst-grad.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2020 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Created: 21 Jun 2007 +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-grad.sty'. + +;;; TODO: +;; +;; -- + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(defvar LaTeX-pst-fillstyle-list) +(defvar LaTeX-pst-parameters-completion-regexp) +(defvar LaTeX-pst-parameters-name-list) + +;;; Parameters +(defvar LaTeX-pstgrad-parameters-name-list + '("gradangle" "gradbegin" "gradend" "gradlines" "gradmidpoint" + "gradientHSB" "GradientCircle" "GradientPos" "GradientScale") + "A list of parameter names in pst-grad.") + +;;; Aliases +(defvaralias 'LaTeX-pst-gradbegin-list 'LaTeX-pst-color-list) +(defvaralias 'LaTeX-pst-gradend-list 'LaTeX-pst-color-list) + +;;; Hook +(TeX-add-style-hook + "pst-grad" + (function + (lambda () + (TeX-run-style-hooks + "pstricks") + (unless (member "gradient" LaTeX-pst-fillstyle-list) + (setq LaTeX-pst-fillstyle-list (append LaTeX-pst-fillstyle-list + '("gradient"))) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|gradbegin\\|gradend\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstgrad-parameters-name-list + LaTeX-pst-parameters-name-list)))) + TeX-dialect) + +;;; pst-grad.el ends here diff --git a/elpa/auctex-13.1.3/style/pst-grad.elc b/elpa/auctex-13.1.3/style/pst-grad.elc Binary files differnew file mode 100644 index 0000000..e34b48d --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-grad.elc diff --git a/elpa/auctex-13.1.3/style/pst-node.el b/elpa/auctex-13.1.3/style/pst-node.el new file mode 100644 index 0000000..86a87e4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-node.el @@ -0,0 +1,207 @@ +;;; pst-node.el --- AUCTeX style for `pst-node.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007-2021 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's pst-plot.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-node.sty'. + +;;; TODO: +;; +;; -- self parsing of possible node names +;; -- adding more macro support + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function LaTeX-package-parameter-value + "pstricks" (param pname)) +(declare-function LaTeX-package-parameters-pref-and-chosen + "pstricks" (param pname noskip)) +(declare-function LaTeX-package-parameters + "pstricks" (optional pname preparam param)) +(declare-function LaTeX-pst-angle "pstricks" ()) +(declare-function LaTeX-pst-point "pstricks" ()) +(declare-function LaTeX-pst-arrows "pstricks" ()) + +(defalias 'LaTeX-pst-node #'LaTeX-pst-point) + +(defvar LaTeX-pstnode-parameters-completion-regexp + "\\(npos\\|nrot\\)" + "Regexp for `string-match'ing a parameter.") + +(defvar LaTeX-pstnode-parameters-boolean-regexp "show\\([a-zA-Z]+\\)" + "Regexp for `string-match'ing a parameter.") + +(defvar LaTeX-pstnode-npos-list '(".25" ".5" ".75" "1" "1.5" "2") + "A list of values for npos in nput.") + +(defvar LaTeX-pstnode-nrot-list '(":U" ":D" ":R" ":L") + "A list of values for nrot in nput.") + +(defvar LaTeX-pstnode-psmatrix-list + '("mnode" "emnode" "name" "nodealign" "mocl" "rowsep" "colsep" + "mnodesize") + "A list of values for trimode in pstribox.") + +;;; Parameters +(defvar LaTeX-pstnode-parameters-history nil + "History of values for parameters in pst-node.") + +(defvar LaTeX-pstnode-parameters-value-history nil + "History of parameter values in pst-node.") + +(defvar LaTeX-pstnode-parameters-name-list + '("angle" "angleA" "angleB" "arcangle" "arcangleA" "arcangleB" "arm" + "armA" "armB" "boxsize" "colsep" "framesize" "href" "loopsize" + "ncurv" "ncurvA" "ncurvB" "nodesepA" "nodesepB" "npos" "nrot" + "offset" "offsetA" "offsetB" "radius" "vref" "Xnodesep" "XnodesepA" + "XnodesepB" "Ynodesep" "YnodesepA" "YnodesepB") + "A list of parameters' name in pst-node.") + +(defvar LaTeX-pstnode-parameters-name-history nil + "History of parameter names in pst-node.") + +;;; Derived Functions from pstricks.el defuns +(defun LaTeX-pstnode-parameter-value (param) + "See documentation of `LaTeX-package-parameter-value'." + (LaTeX-package-parameter-value param "pstnode")) + +(defun LaTeX-pstnode-parameters-pref-and-chosen (param &optional noskip) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters-pref-and-chosen param "pstnode" noskip)) + +(defun LaTeX-pstnode-parameters (optional &optional preparam param) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters optional "pstnode" preparam param)) + +;;; Macros +(defun LaTeX-pstnode-macro-nput (_optional &optional _arg) + "Return \\nput arguments after querying." + (insert "[rot=" (LaTeX-pst-angle) "]{" (LaTeX-pst-angle) "}{" + (LaTeX-pst-node) "}")) + +(defun LaTeX-pstnode-macro-cnodeput (_optional &optional _arg) + "Return \\cnodeput arguments after querying." + (let ((rotation (if current-prefix-arg (LaTeX-pst-angle) nil)) + (pnt (if current-prefix-arg (LaTeX-pst-point) nil))) + (insert (if rotation (format "{%s}" rotation) "") + (if pnt (format "(%s)" pnt) "") "{" (LaTeX-pst-node) "}"))) + +(defun LaTeX-pstnode-macro-nc (_optional &optional _arg) + "Return \\nc* arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") "{" (LaTeX-pst-node) + "}{" (LaTeX-pst-node) "}"))) + +(defun LaTeX-pstnode-macro-pc (_optional &optional _arg) + "Return \\pc* arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") "(" (LaTeX-pst-point) + ")(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pstnode-macro-tnabcput (optional &optional _arg) + "Return \\t?put or \\n?put arguments after querying." + (TeX-argument-insert (LaTeX-pstnode-parameters-pref-and-chosen + '("nrot" "npos")) + optional)) + +;;; Environments +(defun LaTeX-pstnode-env-psmatrix (env) + "Return psmatrix environment with arguments." + (let ((opt (TeX-completing-read-multiple "Options: " + LaTeX-pstnode-psmatrix-list))) + (LaTeX-insert-environment env opt))) + +(TeX-add-style-hook + "pst-node" + (function + (lambda () + (LaTeX-add-environments + '("psmatrix" LaTeX-pstnode-env-psmatrix)) + (TeX-add-symbols + '("MakeShortNab" 2) '("MakeShortTablr" 4) '("PSTnodesLoaded" 0) + '("nput" LaTeX-pstnode-macro-nput TeX-arg-macro) + '("cnodeput" [LaTeX-pst-parameters] LaTeX-pstnode-macro-cnodeput t) + '("Cnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("cnode" [LaTeX-pstnode-parameters] "Radius" t) + '("fnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("fnode*" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("dotnode" [LaTeX-pstnode-parameters] LaTeX-pst-point-in-parens t) + '("pnode" LaTeX-pst-point-in-parens t) + '("Rnode" [LaTeX-pstnode-parameters ("href" "vref")] + (TeX-arg-eval LaTeX-pst-point) t) + '("rnode" [LaTeX-pstnode-parameters ("ref")] + (TeX-arg-eval LaTeX-pst-point) t) + '("circlenode" [LaTeX-pst-parameters] + (TeX-arg-eval LaTeX-pst-point) t) + '("dianode" [LaTeX-pst-parameters] "Node Name" t) + '("ovalnode" [LaTeX-pst-parameters] "Node Name" t) + '("trinode" [LaTeX-pst-parameters] "Node Name" t) + '("dotnode" [LaTeX-pst-parameters] LaTeX-pst-point-in-parens + "Node Name") + '("naput" [LaTeX-pstnode-macro-tnabcput] t) + '("nbput" [LaTeX-pstnode-macro-tnabcput] t) + '("ncput" [LaTeX-pstnode-macro-tnabcput] t) + '("taput" [LaTeX-pstnode-macro-tnabcput] t) + '("tbput" [LaTeX-pstnode-macro-tnabcput] t) + '("thput" [LaTeX-pstnode-macro-tnabcput] t) + '("tlput" [LaTeX-pstnode-macro-tnabcput] t) + '("trput" [LaTeX-pstnode-macro-tnabcput] t) + '("tvput" [LaTeX-pstnode-macro-tnabcput] t) + '("ncline" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncarc" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncdiag" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncdiagg" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncbar" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncangle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncangles" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncloop" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("nccurve" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("nccircle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("ncarcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-nc) + '("pcline" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pccurve" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcarc" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcbar" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcdiag" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcdiagg" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcangle" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcangles" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcloop" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("pcarcbox" [LaTeX-pst-parameters] LaTeX-pstnode-macro-pc) + '("psspan" (TeX-arg-eval LaTeX-pst-input-int)) + '("psrowhook" t) + '("pscolhook" t)) + (TeX-run-style-hooks + "pstricks"))) + TeX-dialect) + +;;; pst-node.el ends here diff --git a/elpa/auctex-13.1.3/style/pst-node.elc b/elpa/auctex-13.1.3/style/pst-node.elc Binary files differnew file mode 100644 index 0000000..322f805 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-node.elc diff --git a/elpa/auctex-13.1.3/style/pst-plot.el b/elpa/auctex-13.1.3/style/pst-plot.el new file mode 100644 index 0000000..cfad30b --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-plot.el @@ -0,0 +1,150 @@ +;;; pst-plot.el --- AUCTeX style for `pst-plot.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2014, 2015, 2019, 2020 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Created: 21 Jun 2007 +;; Based on: Jean-Philippe Georget's pst-plot.el +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-plot.sty'. + +;;; TODO: +;; +;; -- improve symbol support (especially the pstScalePoints macros) +;; -- check for multido.el necessity + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function LaTeX-pst-arrows "pstricks" ()) +(declare-function LaTeX-pst-point "pstricks" ()) +(declare-function TeX-arg-compl-list + "pstricks" (list &optional prompt hist)) + +(defvar LaTeX-pst-parameters-completion-regexp) +(defvar LaTeX-pst-parameters-name-list) + +;;; Parameters +(defvar LaTeX-pstplot-datasets nil + "List of parsed data sets defined with \\savedata or \\readdata.") + +(defvar LaTeX-pstplot-parameters-name-list + '("axesstyle" "labels" "plotpoints" "plotstyle" "showorigin" "ticks" + "ticksize" "tickstyle") + "A list of parameters' name in pst-plot.") + +(defvaralias 'LaTeX-pst-labels-list 'LaTeX-pst-ticks-list) + +(defvar LaTeX-pst-ticks-list '(t "none" "all" "x" "y") + "A list of values for ticks in pst-plot.") + +(defvar LaTeX-pst-plotstyle-list + '(t "dots" "line" "polygon" "curve" "ecurve" "ccurve") + "A list of values for tickstyles in pst-plot.") + +(defvar LaTeX-pst-tickstyle-list '(t "full" "top" "bottom") + "A list of values for tickstyles in pst-plot.") + +(defvar LaTeX-pst-axesstyle-list '(t "axes" "frame" "none") + "A list of values for axesstyles in pst-plot.") + +;; Self Parsing -- see (info "(auctex)Hacking the Parser") +(defvar LaTeX-auto-pstplot-regexp-list + '(("\\\\\\(save\\|read\\)data{?\\(\\\\[a-zA-Z]+\\)}?" + 2 LaTeX-auto-pstplot)) + "List of regular expressions to extract arguments of \\*data + macros.") + +(defvar LaTeX-auto-pstplot nil + "Temporary for parsing \\*data definitions.") + +(defun LaTeX-pstplot-cleanup () + "Move symbols from `LaTeX-auto-pstplot' to `TeX-auto-symbol'." + (mapcar (lambda (symbol) + ;; (setq TeX-symbol-list (cons (list symbol 0) TeX-symbol-list)) + ;; (setq TeX-auto-symbol (cons (list symbol 0) TeX-auto-symbol))) + (add-to-list 'LaTeX-pstplot-datasets symbol)) + LaTeX-auto-pstplot)) + +(defun LaTeX-pstplot-prepare () + "Clear `LaTeX-auto-pstplot' before use." + (setq LaTeX-auto-pstplot nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-pstplot-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-pstplot-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +;;; Macros +(defun LaTeX-pst-macro-psaxes (_optional &optional _arg) + "Return \\psaxes arguments after querying." + (let* ((cpref (if current-prefix-arg (car current-prefix-arg) 0)) + (arrows (LaTeX-pst-arrows)) + (pnt1 (if (> cpref 4) (LaTeX-pst-point) nil)) + (pnt2 (if (> cpref 0) (LaTeX-pst-point) nil)) + (pnt3 (LaTeX-pst-point))) + ;; Insert \psaxes arguments. + (insert (if arrows (format "{%s}" arrows) "") + (if pnt1 (format "(%s)" pnt1) "") + (if pnt2 (format "(%s)" pnt2) "") "(" pnt3 ")"))) + +;;; Derived defuns +(defun LaTeX-pstplot-datasets-read () + (TeX-arg-compl-list "Datasets" LaTeX-pstplot-datasets)) + +;;; Hook +(TeX-add-style-hook + "pst-plot" + (function + (lambda () + (mapc #'TeX-auto-add-regexp LaTeX-auto-pstplot-regexp-list) + (TeX-add-symbols + '("readdata" "Macro Name" TeX-arg-file) + '("savedata" "Macro Name" ["Values"]) + '("dataplot" ["Options"] + (TeX-arg-eval LaTeX-pstplot-datasets-read)) + '("fileplot" ["Options"] TeX-arg-file) + '("listplot" ["Options"] "Values") + '("pstScalePoints" "X-Mod" "Y-Mod") + '("psplot" [LaTeX-pst-parameter] "xmin" "xmax" t) + '("parametricplot" [LaTeX-pst-parameter] "xmin" "xmax" t) + '("psaxes" [LaTeX-pst-parameters] LaTeX-pst-macro-psaxes) + "pshlabel" + "psvlabel") + (TeX-run-style-hooks + "pstricks" + "multido") + (unless (string-match "plotstyle" + LaTeX-pst-parameters-completion-regexp) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|plotstyle\\|ticks\\|tickstyle\\|axesstyle\\|labels\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstplot-parameters-name-list + LaTeX-pst-parameters-name-list)))) + TeX-dialect) + +;;; pst-plot.el ends here diff --git a/elpa/auctex-13.1.3/style/pst-plot.elc b/elpa/auctex-13.1.3/style/pst-plot.elc Binary files differnew file mode 100644 index 0000000..b8de071 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-plot.elc diff --git a/elpa/auctex-13.1.3/style/pst-slpe.el b/elpa/auctex-13.1.3/style/pst-slpe.el new file mode 100644 index 0000000..e9f78e6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-slpe.el @@ -0,0 +1,74 @@ +;;; pst-slpe.el --- AUCTeX style for `pst-slpe.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2007, 2020 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Created: 21 Jun 2007 +;; Keywords: latex, pstricks, auctex, emacs + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pst-slpe.sty'. + +;;; TODO: +;; +;; -- + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(defvar LaTeX-pst-fillstyle-list) +(defvar LaTeX-pst-parameters-completion-regexp) +(defvar LaTeX-pst-parameters-name-list) + +;;; Parameters +(defvar LaTeX-pstslpe-parameters-name-list + '("slopeangle" "slopecenter" "slopecolors" "slopebegin" "slopeend" + "sloperadius" "slopesteps") + "A list of parameter names in pst-slpe.") + +;;; Aliases +(defvaralias 'LaTeX-pst-slopebegin-list 'LaTeX-pst-color-list) +(defvaralias 'LaTeX-pst-slopeend-list 'LaTeX-pst-color-list) + +;;; Define hook +(TeX-add-style-hook + "pst-slpe" + (lambda () + (TeX-run-style-hooks + "pstricks") + (unless (member "slope" LaTeX-pst-fillstyle-list) + (setq LaTeX-pst-fillstyle-list + (append LaTeX-pst-fillstyle-list + '("slope" "slopes" "ccslope" "ccslopes" "radslope" + "radslopes"))) + (setq LaTeX-pst-parameters-completion-regexp + (concat + (substring LaTeX-pst-parameters-completion-regexp 0 -2) + "\\|slopebegin\\|slopeend\\)"))) + (make-local-variable 'LaTeX-pst-parameters-name-list) + (setq LaTeX-pst-parameters-name-list + (append LaTeX-pstslpe-parameters-name-list + LaTeX-pst-parameters-name-list))) + TeX-dialect) + +;;; pst-slpe.el ends here diff --git a/elpa/auctex-13.1.3/style/pst-slpe.elc b/elpa/auctex-13.1.3/style/pst-slpe.elc Binary files differnew file mode 100644 index 0000000..13dd057 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pst-slpe.elc diff --git a/elpa/auctex-13.1.3/style/pstricks.el b/elpa/auctex-13.1.3/style/pstricks.el new file mode 100644 index 0000000..6a6707f --- /dev/null +++ b/elpa/auctex-13.1.3/style/pstricks.el @@ -0,0 +1,880 @@ +;;; pstricks.el --- AUCTeX style for the `pstricks' package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2007-2022 Free Software Foundation, Inc. + +;; Author: Holger Sparr <holger.sparr@gmx.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2007-06-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: +;; +;; AUCTeX style file for PSTricks +;; +;; Support for basic PSTricks macros and their arguments. Separate +;; history variables for point, angle, ... arguments. +;; +;; Parameter input completion together with input completion for certain +;; parameters (e.g. linestyle, linecolor and the like). +;; +;; There is a PSTricks-specific support for adding new parameters to +;; existing parameter lists or changing existing ones in optional +;; macro arguments. You might want to make those available through +;; key bindings by using something like +;; (define-key LaTeX-mode-map (kbd "C-c p a") +;; 'LaTeX-pst-parameter-add) +;; (define-key LaTeX-mode-map (kbd "C-c p c") +;; 'LaTeX-pst-parameter-change-value) +;; in a personal style file for PSTricks. + +;;; History: +;; +;; 14/06/2007 rewrite of pstricks.el based on Jean-Philippe Georget's +;; pstricks.el version found on <URI: +;; https://www.emacswiki.org/emacs/pstricks.el> + +;;; TODO: +;; +;; -- Use alist or hash-table for parameter input +;; -- Add more regularly used PSTricks macros +;; -- Prevent errors in AUCTeX modes other than LaTeX mode. +;; -- Check if the functionality for adding and changing parameters +;; can be generalized. + +;;; Code: + +(require 'tex) +(require 'latex) +(eval-when-compile + (require 'cl-lib)) + +;;; General Functions + +(defun TeX-arg-compl-list (list &optional prompt hist) + "Input a value after PROMPT with completion from LIST and HISTORY." + (let ((first (car list))) + (if (and first (listp first)) + (let ((func (nth 0 first)) + (prompt (concat (or (nth 1 first) prompt) ": ")) + (compl (nth 2 first)) + (hist (or (nth 3 first) hist)) + (crm-separator (nth 4 first)) + res) + (setq list (cdr list)) + (cond ((eq func #'completing-read-multiple) + (setq res (funcall func prompt list nil compl nil hist)) + (mapconcat #'identity res crm-separator)) + ((eq func #'completing-read) + (setq res + (funcall func prompt list nil compl nil hist))))) + (completing-read (concat prompt ": ") list nil nil nil hist)))) + +;; XXX: Show default value in prompt. Perhaps extend +;; `TeX-argument-prompt' to do that. +(defun LaTeX-pst-what (what prompt default &optional arg) + "Ask for WHAT with PROMPT with DEFAULT. +The corresponding lists LaTeX-pst-<what>-\\(list\\|history\\) +have to exist. + +\(Used to define functions named LaTeX-pst-<what>.\))" + (let ((list (intern (concat "LaTeX-pst-" what "-list"))) + (hist (intern (concat "LaTeX-pst-" what "-history")))) + (if (not arg) + (setq arg (TeX-arg-compl-list (symbol-value list) prompt hist))) + (if (string= arg "") + default + (add-to-list list arg) + arg))) + +(defun LaTeX-pst-input-int (prompt arg) + "Return number as string asked for with PROMPT if no number +passed with ARG." + (unless (numberp arg) + (setq arg (read-number (concat prompt ": ") 2))) + (number-to-string arg)) + +(defun LaTeX-pst-enclose-obj (symbol op cl) + "Enclose string returned by the `funcall' SYMBOL in OP and CL +character." + (let ((str (funcall symbol))) + (if str (insert (char-to-string op) str (char-to-string cl))))) + +(defun LaTeX-package-parameter-value (param pname) + "Ask for possible value of parameter PARAM given as string +available through package name PNAME and return \"param=value\"." + (add-to-list (intern (concat "LaTeX-" pname "-parameters-name-list")) + param) + ;; select predefined set + (let* ((cregexp + (symbol-value + (intern (concat "LaTeX-" pname + "-parameters-completion-regexp")))) + (bregexp + (symbol-value (intern (concat "LaTeX-" pname + "-parameters-boolean-regexp")))) + (parlist (cond + ((string-match cregexp param) + (intern (concat "LaTeX-" pname "-" + (match-string 0 param) "-list"))) + ((string-match bregexp param) + 'LaTeX-pst-boolean-list))) + val compl) + ;; ask for value + (setq val (TeX-arg-compl-list + (symbol-value parlist) + (concat "(Press TAB for completions) " param) + (intern (concat "LaTeX-" pname + "-parameters-value-history")))) + ;; FIXME: This looks broken. `compl' is never set and unless "" + ;; is added to parlist (at least in the Boolean case), the prompt + ;; shown by `TeX-arg-compl-list' will be incorrect. + (if (and (not compl) parlist) (add-to-list parlist val)) + (if (string= val "") "" (concat param "=" val)))) + +(defun LaTeX-package-parameters-pref-and-chosen (param pname noskip) + "Set values for elements of PARAM from package PNAME and +further explicitly typed in parameters and return a comma +separated list as string." + (let ((allpars "") + (fask (intern (concat "LaTeX-" pname "-parameter-value"))) + tpara parval) + (when param + (while param + (setq tpara (pop param)) + (setq parval (funcall fask tpara)) + (setq allpars + (concat allpars + (if (or (string= "" allpars) (string= "" parval)) + "" ",") parval)))) + ;; ask for parameter names as long as none is given + (when noskip + (while + (not + (string= + "" + (setq tpara + (completing-read + "Parameter name (RET to stop): " + (symbol-value (intern + (concat "LaTeX-" pname + "-parameters-name-list"))) + nil nil nil (intern + (concat "LaTeX-" pname + "-parameters-name-history")))))) + (setq parval (funcall fask tpara)) + ;; concat param=value with other ones + (setq allpars + (concat allpars + (if (or (string= "" allpars) (string= "" parval)) + "" + ",") + parval)))) + (add-to-list + (intern (concat "LaTeX-" pname "-parameters-history")) allpars) + allpars)) + +(defun LaTeX-package-parameters (optional pname preparam param) + "Ask for parameters and manage several parameter lists for +package PNAME" + (let ((fask (intern + (concat "LaTeX-" pname "-parameters-pref-and-chosen"))) + (hlist (intern (concat "LaTeX-" pname "-parameters-history"))) + (nlist + (symbol-value + (intern (concat "LaTeX-" pname "-parameters-name-list"))))) + ;; + (when (and preparam (listp preparam)) + (setq preparam (funcall fask preparam))) + ;; + (setq param + (TeX-completing-read-multiple + (concat + "Params (use <Up,Down> for history or RET for choices): ") + nlist nil nil nil hlist)) + ;; + (if (not param) + (setq param (funcall fask nil t)) + (setq param (car (symbol-value hlist)))) + (TeX-argument-insert + (if (or (string= "" preparam) (eq preparam nil)) + param + (concat preparam (if (string= "" param) "" (concat "," param)))) + optional))) + +;;; Points +(defvar LaTeX-pst-point-list (list "0,0") + "A list of values for point in pstricks.") + +(defvar LaTeX-pst-point-history LaTeX-pst-point-list + "History of values for point in pstricks.") + +(defun LaTeX-pst-point () + "Ask for a point and manage point list." + (LaTeX-pst-what "point" + (concat "Point (default " (car LaTeX-pst-point-history) ")") + (car LaTeX-pst-point-history))) + +(defun LaTeX-pst-point-in-parens (_optional) + "Enclose point in parentheses." + (LaTeX-pst-enclose-obj 'LaTeX-pst-point ?\( ?\))) + +;;; Angles +(defvar LaTeX-pst-angle-list (list "0") + "A list of values for angle in pstricks.") + +(defvar LaTeX-pst-angle-history nil + "History of values for angle in pstricks.") + +(defun LaTeX-pst-angle () + "Ask for a angle and manage angle list" + (LaTeX-pst-what "angle" + (concat "Angle (default " (car LaTeX-pst-angle-list) ")") + (car LaTeX-pst-angle-list))) + +;;; Extension in one Direction +(defvar LaTeX-pst-extdir-list (list "1") + "A list of values for extdir in pstricks.") + +(defvar LaTeX-pst-extdir-history nil + "History of values for extdir in pstricks.") + +(defun LaTeX-pst-extdir (descr) + "Ask for a extdir and manage extdir list" + (LaTeX-pst-what "extdir" + (concat descr " (default " (car LaTeX-pst-extdir-list) ")") + (car LaTeX-pst-extdir-list))) + +;;; Relative Points +(defvar LaTeX-pst-delpoint-list nil + "A list of values for delpoint in pstricks.") + +(defvar LaTeX-pst-delpoint-history nil + "History of values for delpoint in pstricks.") + +;;; Arrows +(defvar LaTeX-pst-arrows-list + '("->" "<-" "<->" ">-<" ">-" "-<" "<<->>" "<<-" "->>" "|-|" "|-" "-|" + "|*-|*" "[-]" "[-" "-]" "(-)" "(-" "-)" "*-*" "*-" "-*" "0-0" "0-" + "-0" "c-c" "c-" "-c" "C-C" "C-" "-C" "cc-cc" "cc-" "-cc" "|<->|" "|<-" + "->|" "|<*->|*" "|<*-" "->|*" "-") + "A list of values for arrows in pstricks.") + +(defvar LaTeX-pst-arrows-history nil + "History of values for arrows in pstricks.") + +;; XXX: Better ask for arrow start and end separately? +;; `LaTeX-pst-arrows-list' is not exhaustive. +(defun LaTeX-pst-arrows () + "Ask for a arrow type and manage arrow type list" + (or (LaTeX-pst-what "arrows" "Arrow type" nil) "")) + +;;; Dots +(defvar LaTeX-pst-dotstyle-list + '((completing-read "Dot style" nil LaTeX-pst-dotstyle-history) + "*" "o" "+" "|" "triangle" "triangle*" "square" "square*" "pentagon" + "pentagon*") + "A list of values for dotstyle in pstricks.") + +(defvar LaTeX-pst-dotstyle-history nil + "History of values for dotstyle in pstricks.") + +;;; Reference Point +(defvar LaTeX-pst-refpoint-list + '((completing-read "Reference point" t LaTeX-pst-refpoint-history) + "l" "r" "t" "tl" "lt" "tr" "rt" "b" "bl" "br" "lb" "rb" "B" "Bl" + "Br" "lB" "rB") + "A list of values for refpoint in pstricks.") + +(defvar LaTeX-pst-refpoint-history nil + "History of values for refpoint in pstricks.") + +(defun LaTeX-pst-refpoint () + "Ask for a refpoint and manage refpoint list" + (LaTeX-pst-what "refpoint" "Reference point" nil)) + +;;; Color + +;; FIXME: Still used? +(defvar LaTeX-pst-color-history nil + "History of values for color in pstricks.") + +;;; Others without History in Completion + +(defvar LaTeX-pst-style-list + '((completing-read "Defined Style" t)) + "A list of values for user defined styles in pstricks.") + +;;; Parameters + +(defvar LaTeX-pst-parameters-history nil + "History of values for parameters in pstricks.") + +(defvar LaTeX-pst-parameters-value-history nil + "History of parameter values in pstricks.") + +(defvar LaTeX-pst-basic-parameters-name-list + '("arcsep" "arcsepA" "arcsepB" "arrowinset" "arrowlength" "arrows" + "arrowscale" "arrowsize" "border" "bordercolor" "boxsep" + "bracketlength" "cornersize" "curvature" "dash" "dimen" "dotangle" + "dotscale" "dotsep" "dotsize" "dotstyle" "doublecolor" "doubleline" + "doublesep" "doubleset" "fillcolor" "fillstyle" "framearc" + "framesep" "gangle" "gridcolor" "griddots" "gridlabelcolor" + "gridlabels" "gridwidth" "hatchangle" "hatchcolor" "hatchsep" + "hatchsepinc" "hatchwidth" "hatchwidthinc" "header" "labelsep" + "liftpen" "linearc" "linecolor" "linestyle" "linetype" "linewidth" + "rbracketlength" "ref" "runit" "shadow" "shadowangle" "shadowcolor" + "shadowsize" "showgrid" "showpoints" "style" "subgridcolor" + "subgriddiv" "subgriddots" "subgridwidth" "swapaxes" "tbarsize" + "trimode" "unit" "xunit" "yunit") + "A list of parameter names in pstricks.") + + +(defvar LaTeX-pst-boolean-list '("true" "false") + "List of binary values for key=value completion.") + +;; XXX: Colors can actually be given as [-]<color>[!<num>]. +(defvar LaTeX-pst-color-list + '("black" "darkgray" "gray" "lightgray" "white" + "red" "green" "blue" "cyan" "magenta" "yellow") + "List of colors predefined in PSTricks.") + +(defvar LaTeX-pst-fillstyle-list + '("none" "solid" "vlines" "vlines*" "hlines" "hlines*" "crosshatch" + "crosshatch*" "boxfill") + "List of fill styles defined in PSTricks.") + +;; From PSTricks: PostScript macros for Generic TeX, User's Guide, +;; Timothy Van Zandt, 25 July 2003, Version 97. +;; FIXME: Provide separate variables tailored to the different macros. +(defvar LaTeX-pst-basic-parameters-list + '(;; Dimensions, coordinates and angles + ("unit") + ("xunit") + ("yunit") + ("runit") + ;; Basic graphics parameters + ("linewidth") + ("linecolor" LaTeX-pst-color-list) + ("fillstyle" LaTeX-pst-fillstyle-list) + ("fillcolor" LaTeX-pst-color-list) + ("arrows" LaTeX-pst-arrows-list) + ("showpoints" LaTeX-pst-boolean-list) + ;; Lines and polygons + ("linearc") + ("framearc") + ("cornersize" ("relative" "absolute")) + ("gangle") + ;; Arcs, circles and ellipses + ("arcsepA") + ("arcsepB") + ("arcsep") + ;; Curves + ("curvature") + ;; Dots + ("dotstyle" ("*" "o" "Bo" "x" "+" "B+" "asterisk" "Basterisk" "oplus" + "otimes" "|" "B|" "square" "Bsquare" "square*" "diamond" + "Bdiamond" "diamond*" "triangle" "Btriangle" "triangle*" + "pentagon" "Bpentagon" "pentagon*")) + ("dotsize") + ("dotscale") + ("dotangle") + ;; Grids + ("gridwidth") + ("gridcolor" LaTeX-pst-color-list) + ("griddots") + ("gridlabels") + ("gridlabelcolor" LaTeX-pst-color-list) + ("subgriddiv") + ("subgridwidth") + ("subgridcolor" LaTeX-pst-color-list) + ("subgriddots") + ;; Plots + ("plotstyle" ("dots" "line" "polygon" "curve" "ecurve" "ccurve")) + ("plotpoints") + ;; Coordinate systems + ("origin") + ("swapaxes" LaTeX-pst-boolean-list) + ;; Line styles + ("linestyle" ("none" "solid" "dashed" "dotted")) + ("dash") + ("dotsep") + ("border") + ("bordercolor" LaTeX-pst-color-list) + ("doubleline" LaTeX-pst-boolean-list) + ("doublesep") + ("doublecolor" LaTeX-pst-color-list) + ("shadow" LaTeX-pst-boolean-list) + ("shadowsize") + ("shadowangle") + ("shadowcolor" LaTeX-pst-color-list) + ("dimen" ("outer" "inner" "middle")) + ;; Fill styles + ("hatchwidth") + ("hatchsep") + ("hatchcolor" LaTeX-pst-color-list) + ("hatchangle") + ("addfillstyle" LaTeX-pst-fillstyle-list) + ;; Arrowheads and such + ("arrowsize") + ("arrowlength") + ("arrowwinset") + ("tbarsize") + ("bracketlength") + ("rbracketlength") + ("arrowscale") + ;; Parameters + ("linetype") + ;; Graphics objects + ("liftpen") + ;; Placing and rotating whatever + ("labelsep") + ;; Axes + ("labels" ("all" "x" "y" "none")) + ("showorigin" LaTeX-pst-boolean-list) + ("ticks" ("all" "x" "y" "none")) + ("tickstyle" ("full" "top" "bottom")) + ("ticksize") + ("axesstyle" ("axes" "frame" "none")) + ;; Framed boxes + ("framesep") + ("boxsep") + ("trimode" ("*" "U" "D" "R" "L")) + ;; Nodes + ("href") + ("vref") + ("radius") + ;; Node connections + ("nodesep") + ("arcangle") + ("angle") + ("arm") + ("loopsize") + ("ncurv") + ("boxsize") + ("offset") + ;; Node connections labels: I + ("ref") + ("nrot") + ("npos") + ("shortput" ("none" "nab" "tablr" "tab")) + ;; Node connection labels: II + ("tpos") + ;; Attaching labels to nodes + ("rot") + ;; Mathematical diagrams and graphs + ("mnode" ("R" "r" "C" "f" "p" "circle" "oval" "dia" "tri" "dot" "none")) + ("emnode" ("R" "r" "C" "f" "p" "circle" "oval" "dia" "tri" "dot" "none")) + ("name") + ("nodealign" LaTeX-pst-boolean-list) + ("mcol" ("l" "r" "c")) + ("rowsep") + ("colsep") + ("mnodesize") + ;; ... + ) + "List of keys and values for PSTricks macro arguments.") + +(defvar LaTeX-pst-parameters-name-list + LaTeX-pst-basic-parameters-name-list + "A list of all parameters with completion.") + +(defvar LaTeX-pst-parameters-name-history nil + "History of parameter names in pstricks.") + +(defvar LaTeX-pst-parameters-completion-regexp + "\\(arrows\\|linestyle\\|fillstyle\\|color\\|trimode\\|dotstyle\\|\\<style\\)" + "Regexp for `string-match'ing a parameter.") + +(defvar LaTeX-pst-parameters-boolean-regexp + "\\(doubleline\\|shadow\\>\\|show[a-zA-Z]+\\)" + "Regexp for `string-match'ing a parameter.") + +(defun LaTeX-pst-parameter-value (param) + "See documentation of `LaTeX-package-parameter-value'." + (LaTeX-package-parameter-value param "pst")) + +(defun LaTeX-pst-parameters-pref-and-chosen (param &optional noskip) + "See documentation of `LaTeX-package-parameters-pref-and-chosen'." + (LaTeX-package-parameters-pref-and-chosen param "pst" noskip)) + +;; FIXME: This is likely only a transitional function used until all +;; macros got their calls to `TeX-arg-key-val' with tailored parameter +;; lists. +(defun LaTeX-pst-parameters (optional) + "Prompt for general parameters of a PSTricks argument." + (TeX-arg-key-val optional LaTeX-pst-basic-parameters-list)) + +;;; Macros +(defun LaTeX-pst-macro-psarc (_optional &optional _arg) + "Return \\psarc arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt (if current-prefix-arg nil (LaTeX-pst-point)))) + (insert (if arrows (format "{%s}" arrows) "") + (if pnt (format "(%s)" pnt) "") + "{" (LaTeX-pst-extdir "Radius") "}{" (LaTeX-pst-angle) "}{" + (LaTeX-pst-angle) "}"))) + +(defun LaTeX-pst-macro-pscircle (_optional &optional _arg) + "Return \\pscircle arguments after querying." + (insert "(" (LaTeX-pst-point) "){" (LaTeX-pst-extdir "Radius") "}")) + +(defun LaTeX-pst-macro-rput (_optional &optional _arg) + "Return \\rput arguments after querying." + (let ((refpoint (LaTeX-pst-refpoint)) + (rotation (if current-prefix-arg (LaTeX-pst-angle) nil))) + (insert (if refpoint (concat "[" refpoint "]") "") + (if rotation + (concat "{" rotation "}") + "") "(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-uput (_optional &optional _arg) + "Return \\uput arguments after querying." + (let ((dist (LaTeX-pst-extdir "Distance")) + (refpoint (LaTeX-pst-refpoint))) + (insert (if dist (concat "{" dist "}") "") + (if refpoint + (concat "[" (LaTeX-pst-refpoint) "]") + "[]") + "{" (LaTeX-pst-angle) "}(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-multirputps (_optional &optional _arg) + "Return \\multirput or \\multips arguments after querying." + (let ((refpoint (LaTeX-pst-refpoint)) + (rotation (if current-prefix-arg (LaTeX-pst-angle) nil)) + (pnt (LaTeX-pst-point)) + (dpnt (LaTeX-pst-what "delpoint" "Increment (default 1,1)" "1,1")) + (repi (LaTeX-pst-input-int "Repetitions" nil))) + (insert (if refpoint (format "[%s]" refpoint) "") + (if rotation (format "{%s}" rotation) "") + "(" pnt ")(" dpnt "){" repi "}"))) + +(defun LaTeX-pst-macro-psline (_optional &optional _arg) + "Return \\psline or \\ps[ce]?curve[*] arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point))) + (insert (if arrows (format "{%s}" arrows) "") "(" pnt1 ")" ) + (while (and (not (string= pnt2 "")) (not (string= pnt1 pnt2))) + (insert "(" pnt2 ")") + (setq pnt1 pnt2) + (setq pnt2 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-psdots (_optional single) + "Return \\psdot[s]? arguments after querying." + (let* ((pnt1 (LaTeX-pst-point)) + (pnt2 (if single pnt1 (LaTeX-pst-point)))) + (insert "(" pnt1 ")") + (while (and (not (string= pnt2 "")) (not (string= pnt1 pnt2))) + (setq pnt1 pnt2) + (insert "(" pnt1 ")") + (setq pnt2 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-parabola (_optional &optional _arg) + "Return \\parabola arguments after querying." + (let ((arrows (LaTeX-pst-arrows))) + (insert (if arrows (format "{%s}" arrows) "") + "(" (LaTeX-pst-point) ")(" (LaTeX-pst-point) ")"))) + +(defun LaTeX-pst-macro-pnt-twolen (_optional prompt1 prompt2) + "Return point and 2 paired lengths in separate parens as arguments." + ;; insert \psellipse[*]?, \psdiamond or \pstriangle arguments + (let ((pnt (if current-prefix-arg nil (LaTeX-pst-point)))) + (insert (if pnt (format "(%s)" pnt) "") + "(" (LaTeX-pst-extdir prompt1) "," + (LaTeX-pst-extdir prompt2) ")"))) + +(defun LaTeX-pst-macro-psbezier (_optional &optional _arg) + "Return \\psbezier arguments after querying." + (let ((arrows (LaTeX-pst-arrows)) + (pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point)) + (pnt3 (LaTeX-pst-point))) + (insert (if arrows (format "{%s}" arrows) "") + "(" pnt1 ")(" pnt2 ")") + (while (not (string= pnt2 pnt3)) + (insert "(" pnt3 ")") + (setq pnt2 pnt3) + (setq pnt3 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-pspolygon (_optional &optional _arg) + "Return \\pspolygon arguments after querying." + (let ((pnt1 (LaTeX-pst-point)) + (pnt2 (LaTeX-pst-point)) + (pnt3 (LaTeX-pst-point))) + (insert "(" pnt1 ")(" pnt2 ")") + (while (not (string= pnt2 pnt3)) + (insert "(" pnt3 ")") + (setq pnt2 pnt3) + (setq pnt3 (LaTeX-pst-point))))) + +(defun LaTeX-pst-macro-psframe (_optional &optional _arg) + "Return \\psframe arguments after querying." + (let ((pnt1 (if current-prefix-arg nil (LaTeX-pst-point))) + (pnt2 (LaTeX-pst-point))) + (insert (if pnt1 (format "(%s)" pnt1) "") "(" pnt2 ")"))) + +(defun LaTeX-pst-macro-psgrid (_optional &optional _arg) + "Return \\psgrid arguments after querying." + (let* ((cpref (if current-prefix-arg (car current-prefix-arg) 0)) + (pnt1 (if (> cpref 4) (LaTeX-pst-point) nil)) + (pnt2 (if (> cpref 0) (LaTeX-pst-point) nil)) + (pnt3 (if (> cpref 0) (LaTeX-pst-point) nil))) + (insert (if pnt1 (format "(%s)" pnt1) "") + (if pnt2 (format "(%s)(%s)" pnt2 pnt3) "")))) + +(defun LaTeX-pst-macro-newpsobject (&optional _arg) + "Return \\newpsobject arguments after querying." + (insert "{" (TeX-read-string "New PSObject Name: ") "}" + ;; FIXME: It would be better to use something more confined + ;; than `TeX-symbol-list'. + "{" (completing-read "Parent Object: " (TeX-symbol-list)) + "}")) + +;;; Environments +(defun LaTeX-pst-env-pspicture (env) + "Create new pspicure environment." + (let ((opt (multi-prompt-key-value + (TeX-argument-prompt t "Options" nil) + '(("showgrid") ("shift")))) + (p0 (LaTeX-pst-what "point" "Lower left (default 0,0)" "0,0")) + (p1 (LaTeX-pst-what "point" "Upper right (default 1,1)" "1,1")) + corn) + (setq corn (concat (unless (string= "" opt) (format "[%s]" opt)) + (if (string= "0,0" p0) "" (format "(%s)" p0)) + "(" p1 ")")) + (LaTeX-insert-environment env corn))) + +;;; Self Parsing -- see (info "(auctex)Hacking the Parser") +(defvar LaTeX-auto-pstricks-regexp-list + '(("\\\\newps\\(object\\){\\([a-zA-Z]+\\)}{\\([a-zA-Z]+\\)}" (1 2 3) + LaTeX-auto-pstricks) + ("\\\\newps\\(fontdot\\){\\([a-zA-Z]+\\)}" (1 2) + LaTeX-auto-pstricks) + ("\\\\newps\\(style\\){\\([a-zA-Z]+\\)}" (1 2) + LaTeX-auto-pstricks) + ("\\\\define\\(color\\){\\([a-zA-Z]+\\)}{\\(rgb\\|cmyk\\)}" (1 2 3) + LaTeX-auto-pstricks) + ("\\\\new\\(rgb\\|hsb\\|cmyk\\)\\(color\\){\\([a-zA-Z]+\\)}" (2 3 1) + LaTeX-auto-pstricks)) + "List of regular expressions to extract arguments of \\newps* macros.") + +(defvar LaTeX-auto-pstricks nil + "Temporary for parsing \\newps* definitions.") + +(defun LaTeX-pst-cleanup () + "Move symbols from `LaTeX-auto-pstricks' to `TeX-auto-symbol'." + (mapcar + (lambda (list) + (let ((type (car list))) + (cond ((string= type "object") + (setq TeX-auto-symbol + (cons (list (nth 1 list) + (cl-caddr (assoc (nth 2 list) + (TeX-symbol-list)))) + TeX-auto-symbol))) + ((string= type "fontdot") + (add-to-list 'LaTeX-pst-dotstyle-list (nth 1 list) t)) + ((string= type "style") + (add-to-list 'LaTeX-pst-style-list (nth 1 list) t)) + ((string= type "color") + (add-to-list 'LaTeX-pst-color-list (nth 1 list) t) + ;; FIXME: Why is an entry with "-" in front added? + (add-to-list 'LaTeX-pst-color-list + (concat "-" (nth 1 list)) t))))) + LaTeX-auto-pstricks)) + +(defun LaTeX-pst-prepare () + "Clear `LaTeX-auto-pstricks' before use." + (setq LaTeX-auto-pstricks nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-pst-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-pst-cleanup ) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +;;; Additional Functionality +(defun LaTeX-pst-parameters-add (&optional arg) + "With ARG as prefix-argument insert new parameter\(s\) behind +nearest backward LaTeX macro in brackets. Without ARG add +parameter\(s\) to the already existing ones at the end of the +comma separated list. Point has to be within the sexp to modify." + (interactive "P") + (let ((newpara (LaTeX-pst-parameters-pref-and-chosen nil t)) + (regexp "\\(") end check) + (if arg + (progn + (re-search-backward "\\\\\\([a-zA-Z]\\)") + (forward-word 1) + (insert-pair nil ?\[ ?\])) + (up-list 1) + (backward-char 1) + (save-excursion + (setq end (point)) + (up-list -1) + (while (re-search-forward "\\([a-zA-Z]+\\)=" end 'limit) + (setq regexp (concat regexp + (match-string-no-properties 1) "\\|"))) + (setq regexp (concat (substring regexp 0 -1) ")")) + (setq check (string-match regexp newpara)))) + (when newpara + (insert (if arg "" ",") newpara) + (when check + (message + "At least one Parameters appears twice. PLEASE CHECK!"))))) +;; FIXME: Only define a key for this once it is a general-purpose +;; facility, i.e. not just for pstricks but all types of macros. +;; (define-key LaTeX-mode-map "\C-c\C-x\C-a" 'LaTeX-pst-parameters-add) + +(defvar LaTeX-pst-value-regexp + "\\([-!.a-zA-Z0-9]*\\s\\?[-!.a-zA-Z0-9]+\\)" + "Expression matching a parameter value.") + +(defun LaTeX-pst-parameter-remove-value () + "Remove value of current parameter and return parameter name." + (re-search-backward + (concat "\\(\\s(\\|,\\)[a-zA-Z]+\\([a-zA-Z]\\|=\\|=" + LaTeX-pst-value-regexp "\\)")) + (re-search-forward "\\([a-zA-Z]+\\)=") + (let ((para (match-string-no-properties 1))) + (re-search-forward LaTeX-pst-value-regexp) + (delete-region (match-beginning 1) (match-end 1)) + para)) + +(defun LaTeX-pst-parameter-change-value () + "Replace parameter value with a new one." + (interactive) + (let* ((para (LaTeX-pst-parameter-remove-value)) + (symb + (when (and + (string-match + LaTeX-pst-parameters-completion-regexp para) + (boundp + (intern + (concat "LaTeX-pst-" (match-string 0 para) "-list")))) + (intern (concat "LaTeX-pst-" (match-string 0 para) + "-list"))))) + (insert (TeX-arg-compl-list (symbol-value symb) "New Value" + 'LaTeX-pst-parameters-value-history)))) +;; FIXME: Only define a key for this once it is a general-purpose +;; facility, i.e. not just for pstricks but all types of macros. (See +;; also `LaTeX-pst-parameters-add'. Note that a parameter change +;; should better be made available through a `C-u' prefix of the +;; binding for the function doing the parameter addition.) +;; (define-key LaTeX-mode-map "\C-c\C-x\C-v" 'LaTeX-pst-parameter-change-value) + +(TeX-add-style-hook + "pstricks" + (lambda () + (unless (or (member "pst-pdf" TeX-active-styles) + (eq TeX-engine 'xetex)) + ;; Leave at user's choice whether to disable `TeX-PDF-mode' or + ;; not. Instead set up `TeX-PDF-from-DVI' option so that AUCTeX + ;; takes dvips+ps2pdf route when `TeX-PDF-mode' is enabled. + ;; (TeX-PDF-mode-off) + (setq TeX-PDF-from-DVI "Dvips")) + (mapc #'TeX-auto-add-regexp LaTeX-auto-pstricks-regexp-list) + (LaTeX-add-environments + '("pspicture" LaTeX-pst-env-pspicture) + "overlaybox" "psclip") + (TeX-add-symbols + '("AltClipMode" 0) '("DontKillGlue" 0) '("KillGlue" 0) + '("NormalCoor" 0) '("SpecialCoor" 0) '("PSTricksLoaded" 0) + '("PSTricksOff" 0) '("altcolormode" 0) '("pslinecolor" 0) + '("pslinestyle" 0) '("pslinetype" 0) '("pslinewidth" 0) + '("pslabelsep" 0) '("radian" 0) '("psunit" 0) '("psrunit" 0) + '("psxunit" 0) '("psyunit" 0) + '("arrows" (TeX-arg-eval LaTeX-pst-arrows)) + '("clipbox" ["Border"] t) + '("closedshadow" [LaTeX-pst-parameters]) + '("openshadow" [LaTeX-pst-parameters]) + "closepath" "code" "coor" "curveto" "degrees" "dim" "endpsclip" + "file" "fill" "grestore" "gsave" "lineto" "movepath" "moveto" + "mrestore" "msave" "newpath" "rcoor" "rcurveto" "rlineto" "rotate" + "scale" "stroke" "swapaxes" "translate" + '("newcmykcolor" "Name" "Quadruple") + '("newrgbcolor" "Name" "Triple") '("newhsbcolor" "Name" "Triple") + '("newgray" "Name" "Value") + '("newpsobject" LaTeX-pst-macro-newpsobject LaTeX-pst-parameters) + '("newpsstyle" "New PSStyle Name" LaTeX-pst-parameters) + '("newpsfontdot" "New PSDot Name" ["Factors"] + "Fontname" "Character Number (Hex)") + '("parabola" [LaTeX-pst-parameters] LaTeX-pst-macro-parabola) + '("parabola*" [LaTeX-pst-parameters] LaTeX-pst-macro-parabola) + '("psarc" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psarc*" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psarcn" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("pswedge" [LaTeX-pst-parameters] LaTeX-pst-macro-psarc) + '("psbezier" [LaTeX-pst-parameters] LaTeX-pst-macro-psbezier) + '("psbezier*" [LaTeX-pst-parameters] LaTeX-pst-macro-psbezier) + '("pscbezier" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("pscircle" [LaTeX-pst-parameters] LaTeX-pst-macro-pscircle) + '("psccurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psccurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("pscustom" [LaTeX-pst-parameters]) + '("psdiamond" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Width" "Height")) + '("pstriangle" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Width" "Height")) + '("psdot" [LaTeX-pst-parameters] (LaTeX-pst-macro-psdots t)) + '("psdots" [LaTeX-pst-parameters] (LaTeX-pst-macro-psdots nil)) + '("psecurve" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psecurve*" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psellipse" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Radius x" "Radius y")) + '("psellipse*" [LaTeX-pst-parameters] + (LaTeX-pst-macro-pnt-twolen "Radius x" "Radius y")) + '("psframe" [LaTeX-pst-parameters] LaTeX-pst-macro-psframe) + '("psframe*" [LaTeX-pst-parameters] LaTeX-pst-macro-psframe) + '("psframebox" [LaTeX-pst-parameters] t) + '("pscirclebox" [LaTeX-pst-parameters] t) + '("psdblframebox" [LaTeX-pst-parameters] t) + '("psdiabox" [LaTeX-pst-parameters] t) + '("psovalbox" [LaTeX-pst-parameters] t) + '("psshadowbox" [LaTeX-pst-parameters] t) + '("pstribox" [LaTeX-pst-parameters] t) + '("psscalebox" "Scaling Factor(s)" t) + '("psscaleboxto" LaTeX-pst-point-in-parens t) + '("psgrid" [LaTeX-pst-parameters] LaTeX-pst-macro-psgrid 0) + '("psline" [LaTeX-pst-parameters] LaTeX-pst-macro-psline) + '("psoverlay" t) + '("pspolygon" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("pspolygon*" [LaTeX-pst-parameters] LaTeX-pst-macro-pspolygon) + '("psset" LaTeX-pst-parameters) + '("pssetlength" TeX-arg-macro "Length") + '("psaddtolength" TeX-arg-macro "Length") + '("degrees" ["Full Circle"]) + '("qdisk" LaTeX-pst-point-in-parens "Radius") + '("qline" LaTeX-pst-point-in-parens LaTeX-pst-point-in-parens) + "pslongbox" "psrotatedown" "psrotateleft" "psrotateright" + '("rput" LaTeX-pst-macro-rput t) + '("rput*" LaTeX-pst-macro-rput t) + '("cput" [LaTeX-pst-parameters] + (TeX-arg-eval LaTeX-pst-angle) LaTeX-pst-point-in-parens t) + '("uput" LaTeX-pst-macro-uput t) + '("multirput" (LaTeX-pst-macro-multirputps t) t) + '("multips" (LaTeX-pst-macro-multirputps nil) t))) + TeX-dialect) + +(defvar LaTeX-pstricks-package-options + '("97" "plain" "DIA" "vtex" "distiller" "noxcolor") + "Package options for pstricks.") + +;;; pstricks.el ends here diff --git a/elpa/auctex-13.1.3/style/pstricks.elc b/elpa/auctex-13.1.3/style/pstricks.elc Binary files differnew file mode 100644 index 0000000..2ba6337 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pstricks.elc diff --git a/elpa/auctex-13.1.3/style/pythontex.el b/elpa/auctex-13.1.3/style/pythontex.el new file mode 100644 index 0000000..01c6ed9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/pythontex.el @@ -0,0 +1,569 @@ +;;; pythontex.el --- AUCTeX style for `pythontex.sty' (v0.16) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-12-01 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `pythontex.sty' v0.16 from +;; 2017/07/20. `pythontex.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: + +;; The function `LaTeX-fancyvrb-key-val-options' will be defined after +;; loading `fvextra.el' which loads `fancyvrb.el' in return: +(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ()) + +;; These are provided by `font-latex.el': +(defvar font-latex-syntactic-keywords-extra) +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +;; The next two are provided by `newfloat.el': +(declare-function LaTeX-add-newfloat-DeclareFloatingEnvironments + "newfloat" + (&rest newfloat-declarefloatingenvironments)) +(declare-function LaTeX-newfloat-auto-cleanup + "newfloat" ()) + +(defvar LaTeX-pythontex-pygmentize-program (executable-find "pygmentize") + "Path to pygmentize executable.") + +(defvar LaTeX-pythontex-language-list nil + "List containing languages provided by pymentize program.") + +(defun LaTeX-pythontex-language-list (&rest _ignored) + "Return a list of languages provided by pymentize program. +Update the variable `LaTeX-pythontex-language-list' if still nil." + (or LaTeX-pythontex-language-list + (when LaTeX-pythontex-pygmentize-program + (with-temp-buffer + (shell-command (concat LaTeX-pythontex-pygmentize-program " -L lexers") + (current-buffer)) + (goto-char (point-min)) + (let (languages) + (while (re-search-forward "^\\*[[:space:]]\\([^:]+\\):" nil t) + (dolist (lang (split-string (match-string 1) "[[:space:],]" t)) + (push lang languages))) + (setq LaTeX-pythontex-language-list languages)))))) + +(defvar LaTeX-pythontex-package-options-list + `(("usefamily" ("py" "sympy" "pylab" "rb" "ruby" "jl" "julia" "octave")) + ("gobble" ("none" "auto")) + ("beta" ("true" "false")) + ("runall" ("true" "false")) + ("rerun" ("never" "modified" "errors" "warnings" "always")) + ("hashdependencies" ("true" "false")) + ("autoprint" ("true" "false")) + ("autostdout" ("true" "false")) + ("debug") + ("makestderr" ("true" "false")) + ("stderrfilename" ("full" "session" "genericfile" "genericscript")) + ("pyfuture" ("none" "all" "default")) + ("pyconfuture" ("none" "all" "default")) + ("upquote" ("true" "false")) + ("fixlr" ("true" "false")) + ("keeptemps" ("all" "code" "none")) + ("prettyprinter" ("pygments" "fancyvrb")) + ("prettyprintinline" ("true" "false")) + ("pygments" ("true" "false")) + ("pyginline" ("true" "false")) + ("pyglexer" ,(LaTeX-pythontex-language-list)) + ("pygopt" ("style" "texcomments" "mathescape")) + ("fvextfile") + ("pyconbanner" ("none" "standard" "default" "pyversion")) + ("pyconfilename" ("stdin" "console")) + ("depythontex" ("true" "false"))) + "Package options for the pythontex package.") + +(defun LaTeX-pythontex-package-options () + "Prompt for package options for the pythontex package." + (TeX-read-key-val t LaTeX-pythontex-package-options-list)) + +(defvar LaTeX-pythontex-family-list + '("py" "sympy" "pylab" "rb" "ruby" "jl" "julia" "octave") + "List of language families provided by pythontex package.") + +(defun LaTeX-env-pythontex (environment) + "Insert ENVIRONMENT provided by pythontex package." + (let ((session (TeX-read-string + (TeX-argument-prompt t nil "Session"))) + (fvkeyval (TeX-read-key-val t (LaTeX-fancyvrb-key-val-options)))) + (LaTeX-insert-environment environment + (concat + (when (and session (not (string= session ""))) + (concat LaTeX-optop session LaTeX-optcl)) + ;; We need an extra pair of brackets + ;; when no session is given but + ;; key=vals are available + (when (and session (string= session "") + fvkeyval (not (string= fvkeyval ""))) + (concat LaTeX-optop LaTeX-optcl)) + (when (and fvkeyval (not (string= fvkeyval ""))) + (concat LaTeX-optop fvkeyval LaTeX-optcl)))))) + +;; Setup for \saveprintpythontex & \savestdoutpythontex & +;; \savestderrpythontex +(TeX-auto-add-type "pythontex-savecontent" "LaTeX") + +(defvar LaTeX-pythontex-savecontent-regexp + `(,(concat "\\\\" + (regexp-opt '("saveprintpythontex" + "savestdoutpythontex" + "savestderrpythontex") + "\\(?:") + "{\\([^}]+\\)}") + 1 LaTeX-auto-pythontex-savecontent) + "Matches the argument of \\save(print|stdout|stderr)pythontex macros.") + +;; Setup for \setpythontexlistingenv: +(TeX-auto-add-type "pythontex-setpythontexlistingenv" "LaTeX") + +(defvar LaTeX-pythontex-setpythontexlistingenv-regexp + '("\\\\setpythontexlistingenv{\\([^}]+\\)}" + 1 LaTeX-auto-pythontex-setpythontexlistingenv) + "Matches the argument of \\setpythontexlistingenv macro.") + +(defun LaTeX-pythontex-auto-prepare () + "Clear various `LaTeX-auto-pythontex-*' before parsing." + (setq LaTeX-auto-pythontex-savecontent nil + LaTeX-auto-pythontex-setpythontexlistingenv nil)) + +(defun LaTeX-pythontex-auto-cleanup () + "Process the parsing results for \\setpythontexlistingenv macro." + ;; Use `LaTeX-add-newfloat-DeclareFloatingEnvironments' on parsed + ;; elements and then run `LaTeX-newfloat-auto-cleanup'. + (dolist (env (mapcar #'car (LaTeX-pythontex-setpythontexlistingenv-list))) + (LaTeX-add-newfloat-DeclareFloatingEnvironments `(,env "verbatim"))) + (LaTeX-newfloat-auto-cleanup)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-pythontex-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-pythontex-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-pythontex-add-syntactic-keywords-extra (type macro) + "Add MACRO from pythontex.sty to `font-latex-syntactic-keywords-extra'. +TYPE is one of the symbols `brace' or `delim' indicating how +verbatim text is enclosed after the macro. MACRO is a string or +a list of strings." + (let ((syntax (if (eq type 'brace) + '((1 "|") (2 "|")) + '((1 "\"") (2 ".") (3 "\"")))) + regexp) + (when (listp macro) + (setq macro (regexp-opt macro "\\(?:"))) + (setq regexp `(,(concat + ;; The backslash + (regexp-quote TeX-esc) + ;; Name of the macro(s) + macro + ;; The first mandatory argument is the lexer + "\\(?:{[^}]+}\\)" + ;; With 'brace, allow braced sub-groups otherwise + ;; we stop matching too early. With 'delim, copy + ;; font-latex.el: + (if (eq type 'brace) + (concat "\\({\\)" + "\\(?:[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^}{]*\\)*" + "\\)" + "\\(}\\)") + (concat + ;; Opening delimiter + "\\([^a-z@*\n\f{]\\).*?" + ;; Closing delimiter + "\\(" (regexp-quote TeX-esc) "*\\)\\(\\1\\)"))))) + (add-to-list 'font-latex-syntactic-keywords-extra (append regexp syntax)))) + +(TeX-add-style-hook + "pythontex" + (lambda () + + ;; Load only the relevant style hooks within AUCTeX + (TeX-run-style-hooks "fvextra" "newfloat") + + ;; Add pythontex to the parser: + (TeX-auto-add-regexp LaTeX-pythontex-savecontent-regexp) + (TeX-auto-add-regexp LaTeX-pythontex-setpythontexlistingenv-regexp) + + ;; We need this for Filling: + (make-local-variable 'LaTeX-indent-environment-list) + + ;; 4.2.4 Default families + (let* ((verb-macs '(;; python + "py" "pyc" "pys" "pyv" "pyb" + "pycon" "pyconc" "pyconv" + ;; Python + pylab (matplotlib module) + "pylab" "pylabc" "pylabs" "pylabv" "pylabb" + "pylabcon" "pylabconc" "pylabconv" + ;; Python + SymPy + "sympy" "sympyc" "sympys" "sympyv" "sympyb" + "sympycon" "sympyconc" "sympyconv")) + (verb-envs '(;;python + "pycode" "pysub" "pyverbatim" "pyblock" + "pyconsole" "pyconcode" "pyconverbatim" + ;; Python + pylab (matplotlib module) + "pylabcode" "pylabsub" "pylabverbatim" "pylabblock" + "pylabconsole" "pylabconcode" "pylabconverbatim" + ;; Python + SymPy + "sympycode" "sympysub" "sympyverbatim" "sympyblock" + "sympyconsole" "sympyconcode" "sympyconverbatim")) + (verb-envs-regexp (regexp-opt verb-envs "\\(?:"))) + (apply #'TeX-add-symbols + (mapcar (lambda (mac) + (list mac [ "Session" ] #'TeX-arg-verb-delim-or-brace)) + verb-macs)) + (apply #'LaTeX-add-environments + (mapcar (lambda (env) + (list env #'LaTeX-env-pythontex)) + verb-envs)) + ;; Filling: + (dolist (mac verb-macs) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local mac) + (add-to-list 'LaTeX-verbatim-macros-with-braces-local mac)) + (dolist (env verb-envs) + (add-to-list 'LaTeX-indent-environment-list + `(,env current-indentation) t)) + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) + (boundp 'font-latex-syntactic-keywords-extra) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords (mapcar (lambda (mac) + (list mac "[")) + verb-macs) + 'textual) + ;; We can't use the fontification provided when verbatim + ;; environments are added to + ;; `LaTeX-verbatim-environments-local' -- pythontex + ;; environments have 2 optional arguments and `font-latex.el' + ;; recognizes only 1 optional which breaks the fontification. + ;; We add the envs to `font-latex-syntactic-keywords-extra' and + ;; define a customized regexp to match 2 optional arguments. + (add-to-list 'font-latex-syntactic-keywords-extra + `(,(concat + "^[ \t]*\\\\begin *{\\(?:" + verb-envs-regexp + "\\)}" + "[ \t]*\\(?:%.*\n[ \t]*\\)?" + "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)\\{0,2\\}" + "\\(\n\\|.\\)") + (1 "|" t))) + (add-to-list 'font-latex-syntactic-keywords-extra + `(,(concat "\\(\\\\\\)end *{\\(?:" + verb-envs-regexp + "\\)}") + (1 "|" t)))) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords)) + + (TeX-add-symbols + ;; 4.2.5 Custom code + ;; pythontexcustomc[<position>]{<family>}{<code>} + '("pythontexcustomc" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Position") + '("begin" "end") ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Family") + LaTeX-pythontex-family-list) + t) + + ;; 4.2.7 Formatting of typeset code + ;; \setpythontexfv[<family>]{<fancyvrb settings>} + '("setpythontexfv" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Family") + LaTeX-pythontex-family-list ] + (TeX-arg-key-val (LaTeX-fancyvrb-key-val-options))) + + ;; \setpythontexprettyprinter[<family>]{<printer>} + '("setpythontexprettyprinter" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Family") + (cons "auto" LaTeX-pythontex-family-list) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Printer") + '("text" "bw" "fancyvrb" "pygments"))) + + ;; \setpythontexpyglexer[<family>]{<pygments lexer>} + '("setpythontexpyglexer" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Family") + LaTeX-pythontex-family-list ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Pygments lexer") + (LaTeX-pythontex-language-list))) + + ;; \setpythontexpygopt[<family>]{<pygments options>} + '("setpythontexpygopt" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Family") + LaTeX-pythontex-family-list ] + (TeX-arg-key-val + (("style") ("texcomments") ("mathescape")))) + + ;; 4.2.8 Access to printed content (stdout) + ;; \printpythontex[<mode>][<options>] + '("printpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] ) + + ;; \stdoutpythontex[<mode>][<options>] + '("stdoutpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] ) + + ;;\saveprintpythontex{<name>} + '("saveprintpythontex" + (TeX-arg-eval (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-pythontex-savecontents name) + (format "%s" name))))) + + ;;\savestdoutpythontex{<name>} + '("savestdoutpythontex" + (TeX-arg-eval (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-pythontex-savecontents name) + (format "%s" name))))) + + ;; \useprintpythontex[<verbatim options>][<fancyvrb options>]{<name>} + ;; I assume <verbatim options> is meant to be <mode> + '("useprintpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-pythontex-savecontent-list))) + + ;; \usestdoutpythontex[<verbatim options>][<fancyvrb options>]{<name>} + ;; I assume <verbatim options> is meant to be <mode> + '("usestdoutpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-pythontex-savecontent-list))) + + ;; \stderrpythontex[<mode>][<fancyvrb options>] + '("stderrpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] ) + + + ;;\savestderrpythontex{<name>} + '("savestderrpythontex" + (TeX-arg-eval (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Name")))) + (LaTeX-add-pythontex-savecontents name) + (format "%s" name))))) + + ;; \usestderrpythontex[<mode>][<fancyvrb options>]{<name>} + '("usestderrpythontex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Mode") + '("raw" "verb" "verbatim") ] + [ TeX-arg-key-val (LaTeX-fancyvrb-key-val-options) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Name") + (LaTeX-pythontex-savecontent-list))) + + ;;\setpythontexautoprint{<boolean>} + '("setpythontexautoprint" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Boolean value") + '("true" "false"))) + + ;; \setpythontexautostdout{<boolean>} + '("setpythontexautostdout" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Boolean value") + '("true" "false"))) + + ;; 4.3 Pygments commands and environments + ;; \pygment{<lexer>}<opening delim><code><closing delim> + '("pygment" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Lexer") + (LaTeX-pythontex-language-list)) + TeX-arg-verb-delim-or-brace) + + ;; \inputpygments[<fancyvrb settings>]{<lexer>}{<external file>} + '("inputpygments" + [ TeX-arg-eval (LaTeX-fancyvrb-key-val-options) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Lexer") + (LaTeX-pythontex-language-list)) + TeX-arg-file-name) + + ;; \setpygmentsfv[<lexer>]{<fancyvrb settings>} + '("setpygmentsfv" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Lexer") + (LaTeX-pythontex-language-list) ] + (TeX-arg-eval (LaTeX-fancyvrb-key-val-options))) + + ;; \setpygmentspygopt[<lexer>]{<pygments options>} + '("setpygmentspygopt" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Lexer") + (LaTeX-pythontex-language-list) ] + (TeX-arg-key-val + (("style") ("texcomments") ("mathescape")))) + + ;; \setpygmentsprettyprinter{<printer>} + '("setpygmentsprettyprinter" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Printer") + '("text" "bw" "fancyvrb" "pygments"))) + + ;; 4.5 Advanced PythonTeX usage + ;; \setpythontexcontext{<key-value pairs>} + '("setpythontexcontext" t) + + ;; \restartpythontexsession{<counter value(s)>} + '("restartpythontexsession" t) + + ;; \setpythontexoutputdir{<output directory>} + '("setpythontexoutputdir" t) + + ;; \setpythontexworkingdir{<working directory>} + '("setpythontexworkingdir" t) + + ;; 4.5 Advanced PythonTeX usage + '("setpythontexcontext" t) + '("restartpythontexsession" TeX-arg-counter) + '("setpythontexoutputdir" t) + '("setpythontexworkingdir" t) ) + + ;; 4.4.1 Listings float + ;; Only add it if not already defined somewhere else. + (unless (assoc-string "listing" (LaTeX-environment-list)) + (LaTeX-add-newfloat-DeclareFloatingEnvironments + '("listing" "verbatim"))) + + ;; Cater for \setpythontexlistingenv: + (TeX-add-symbols + '("setpythontexlistingenv" + (TeX-arg-eval + (lambda () + (let ((name (TeX-read-string + (TeX-argument-prompt nil nil "Listing environment name")))) + (LaTeX-add-newfloat-DeclareFloatingEnvironments `(,name "verbatim")) + (LaTeX-newfloat-auto-cleanup) + (format "%s" name)))))) + + (LaTeX-add-environments + ;; 4.2.5 Custom code + '("pythontexcustomcode" LaTeX-env-args + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Position") + '("begin" "end") ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Family") + LaTeX-pythontex-family-list)) + + ;; \begin{pygments}[<fancyvrb settings>]{<lexer>} + '("pygments" LaTeX-env-args + [TeX-arg-eval (LaTeX-fancyvrb-key-val-options)] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Lexer") + (LaTeX-pythontex-language-list))) ) + + ;; Filling + (add-to-list 'LaTeX-indent-environment-list + '("pythontexcustomcode" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list + '("pygments" current-indentation) t) + (add-to-list 'LaTeX-verbatim-environments-local "pythontexcustomcode") + (add-to-list 'LaTeX-verbatim-environments-local "pygments") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("pythontexcustomc" "[{{") + ("setpythontexfv" "[{") + ("setpythontexprettyprinter" "[{") + ("setpythontexpyglexer" "[{") + ("setpythontexpygopt" "[{") + ("printpythontex" "[[") + ("stdoutpythontex" "[[") + ("saveprintpythontex" "{") + ("savestdoutpythontex" "{") + ("useprintpythontex" "[[{") + ("usestdoutpythontex" "[[{") + ("stderrpythontex" "[[") + ("savestderrpythontex" "{") + ("usestderrpythontex" "[[{") + ("setpythontexautoprint" "{") + ("setpythontexautostdout" "{") + ("inputpygments" "[{{") + ("setpygmentsfv" "[{") + ("setpygmentspygopt" "[{") + ("setpygmentsprettyprinter" "{") + ("setpythontexcontext" "{") + ("restartpythontexsession" "{") + ("setpythontexoutputdir" "{") + ("setpythontexworkingdir" "{") + ("setpythontexlistingenv" "{") + ("setpythontexcontext" "{") + ("restartpythontexsession" "{") + ("setpythontexoutputdir" "{") + ("setpythontexworkingdir" "{")) + 'function) + (font-latex-add-keywords '(("pygment" "{")) + 'textual) + (LaTeX-pythontex-add-syntactic-keywords-extra 'brace "pygment") + (LaTeX-pythontex-add-syntactic-keywords-extra 'delim "pygment") + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +;;; pythontex.el ends here diff --git a/elpa/auctex-13.1.3/style/pythontex.elc b/elpa/auctex-13.1.3/style/pythontex.elc Binary files differnew file mode 100644 index 0000000..fd13b1d --- /dev/null +++ b/elpa/auctex-13.1.3/style/pythontex.elc diff --git a/elpa/auctex-13.1.3/style/ragged2e.el b/elpa/auctex-13.1.3/style/ragged2e.el new file mode 100644 index 0000000..f5cf7eb --- /dev/null +++ b/elpa/auctex-13.1.3/style/ragged2e.el @@ -0,0 +1,82 @@ +;;; ragged2e.el --- AUCTeX style for `ragged2e.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2015, 2019, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Created: 2011-04-16 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ragged2e.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "ragged2e" + (lambda () + (TeX-add-symbols + "Centering" + "justifying" + "RaggedRight" + "RaggedLeft") + + (LaTeX-add-environments + "FlushLeft" "FlushRight" "Center" "justify") + + (LaTeX-add-lengths + ;; \Centering + "CenteringLeftskip" "CenteringRightskip" + "CenteringParfillskip" "CenteringParindent" + ;; \RaggedLeft + "RaggedLeftLeftskip" "RaggedLeftRightskip" + "RaggedLeftParfillskip" "RaggedLeftParindent" + ;; \RaggedRight + "RaggedRightLeftskip" "RaggedRightRightskip" + "RaggedRightParindent" "RaggedRightParfillskip" + ;; \justifying + "JustifyingParfillskip" "JustifyingParindent") + + (TeX-run-style-hooks "footmisc" "everysel") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("Centering" "") + ("justifying" "") + ("RaggedRight" "") + ("RaggedLeft" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-ragged2e-package-options + '("originalcommands" "newcommands" "originalparameters" "document" + "newparameters" "footnotes" "raggedrightboxes") + "Package options for the ragged2e package.") + +;;; ragged2e.el ends here diff --git a/elpa/auctex-13.1.3/style/ragged2e.elc b/elpa/auctex-13.1.3/style/ragged2e.elc Binary files differnew file mode 100644 index 0000000..9f29f3f --- /dev/null +++ b/elpa/auctex-13.1.3/style/ragged2e.elc diff --git a/elpa/auctex-13.1.3/style/relsize.el b/elpa/auctex-13.1.3/style/relsize.el new file mode 100644 index 0000000..985c514 --- /dev/null +++ b/elpa/auctex-13.1.3/style/relsize.el @@ -0,0 +1,76 @@ +;;; relsize.el --- AUCTeX style for `relsize.sty' version v4.1 -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-12-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `relsize.sty' version v4.1 from +;; 2013/03/29. `relsize.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "relsize" + (lambda () + (TeX-add-symbols + ;; Declarations and commands + '("relsize" "Steps" ) + '("relscale" "Scale factor" ) + '("larger" [ "Steps (default 1)" ] -1) + '("smaller" [ "Steps (default 1)" ] -1) + '("textlarger" [ "Steps" ] t) + '("textsmaller" [ "Steps" ] t) + '("textscale" "Scale factor" t) + '("mathlarger" t) + '("mathsmaller" t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; This is not easy, are the first 2 'variable oder rather + ;; 'type-declaration? I start with 'type-declaration, let the + ;; users decide + (font-latex-add-keywords '(("relsize" "") + ("relscale" "") + ("larger" "") + ("smaller" "")) + 'type-declaration) + (font-latex-add-keywords '(("textlarger" "[{") + ("textsmaller" "[{") + ("textscale" "{{")) + 'type-command))) + TeX-dialect) + +(defvar LaTeX-relsize-package-options nil + "Package options for the relsize package.") + +;;; relsize.el ends here diff --git a/elpa/auctex-13.1.3/style/relsize.elc b/elpa/auctex-13.1.3/style/relsize.elc Binary files differnew file mode 100644 index 0000000..55d8d94 --- /dev/null +++ b/elpa/auctex-13.1.3/style/relsize.elc diff --git a/elpa/auctex-13.1.3/style/report.el b/elpa/auctex-13.1.3/style/report.el new file mode 100644 index 0000000..0248374 --- /dev/null +++ b/elpa/auctex-13.1.3/style/report.el @@ -0,0 +1,25 @@ +;;; report.el - Special code for report style. -*- lexical-binding: t; -*- + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-report-class-options + '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "landscape" "10pt" "11pt" "12pt" "oneside" "twoside" "draft" "final" + "titlepage" "notitlepage" "openright" "openany" "onecolumn" "twocolumn" + "leqno" "fleqn" "openbib") + "Package options for the report class.") + +(TeX-add-style-hook + "report" + (lambda () + (LaTeX-largest-level-set "chapter") + (LaTeX-add-counters "part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-pagestyles "headings" "myheadings") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; report.el ends here diff --git a/elpa/auctex-13.1.3/style/report.elc b/elpa/auctex-13.1.3/style/report.elc Binary files differnew file mode 100644 index 0000000..64717f0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/report.elc diff --git a/elpa/auctex-13.1.3/style/revtex4-2.el b/elpa/auctex-13.1.3/style/revtex4-2.el new file mode 100644 index 0000000..26a5eff --- /dev/null +++ b/elpa/auctex-13.1.3/style/revtex4-2.el @@ -0,0 +1,263 @@ +;;; revtex4-2.el --- AUCTeX style for `revtex4-2.cls' (v4.2c) -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-12-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `revtex4-2.cls' (v4.2c) from 2019/01/18. +;; `revtex4-2.cls' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-natbib-package-options) +(defvar LaTeX-url-package-options) + +(defun LaTeX-env-revtex4-2-video (environment) + "Create ENVIRONMENT with \\caption and \\label commands. +This function is meant to be used for \"video\" environment +provided by REVTeX class." + (let* ((float (and LaTeX-float ; LaTeX-float can be nil, i.e. do not prompt + (TeX-read-string + (TeX-argument-prompt t nil "Float position") + LaTeX-float))) + (caption (TeX-read-string + (TeX-argument-prompt nil nil "Caption"))) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string + (TeX-argument-prompt t nil "Short caption"))))) + (setq LaTeX-float float) + (LaTeX-insert-environment environment + (unless (zerop (length float)) + (concat LaTeX-optop float LaTeX-optcl))) + ;; Save the place where we've started: + (save-excursion + ;; Add a new line and add the \setfloatlink macro: + (LaTeX-newline) + (indent-according-to-mode) + (TeX-insert-macro "setfloatlink") + ;; Insert caption and ask for a label, do nothing if user skips + ;; caption: + (when (and caption (not (string= caption ""))) + (LaTeX-newline) + (indent-according-to-mode) + (insert (LaTeX-compose-caption-macro caption short-caption)) + ;; If `auto-fill-mode' is active, fill the caption. + (when auto-fill-function (LaTeX-fill-paragraph)) + (LaTeX-newline) + (indent-according-to-mode) + ;; Ask for a label and indent only if it is inserted: + (when (LaTeX-label environment 'environment) + (indent-according-to-mode)))))) + +(TeX-add-style-hook + "revtex4-2" + (lambda () + + ;; Add standard stuff taken from `article.el': + (LaTeX-largest-level-set "section") + (LaTeX-add-counters "part" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "figure" "table") + (LaTeX-add-environments "abstract") + + ;; Run style hooks for packages loaded by default: + (TeX-run-style-hooks "url" "natbib") + + ;; Check for other class options and load AUCTeX style + ;; respectively. car of the cons is the REVTeX class option, cdr + ;; the name of AUCTeX style: + (let ((opt-style '(("amsfonts" . "amsfonts") + ("amsmath" . "amsmath") + ("linenumbers" . "lineno"))) + (opt-cls (cdar LaTeX-provided-class-options))) + (dolist (opt opt-style) + (when (member (car opt) opt-cls) + (TeX-run-style-hooks (cdr opt))))) + + (TeX-add-symbols + ;; IV.3. Specifying authors and affiliations + '("affiliation" "Affliation") + '("noaffiliation") + ;; Because collaborations don't normally have affiiations, one + ;; needs to follow the \collaboration with \noaffiliation: + '("collaboration" "Collaboration" + (TeX-arg-literal "\n") + (TeX-arg-literal "\\noaffiliation")) + '("email" ["Text"] "E-Mail Address") + '("homepage" ["Text"] "URL") + '("altaffiliation" ["Text"] "Affliation") + ;; Specifying first names and surnames + '("surname" "Surname") + + ;; IV.6. Keywords + '("keywords" t) + + ;; IV.7. Institutional report numbers + '("preprint" 0) + + ;; V.3. One-column vs. two-column layouts + '("onecolumngrid" 0) + '("twocolumngrid" 0) + + ;; V.6. Appendices + '("appendix*" 0) + + ;; VIII.1. Citing a reference + '("onlinecite" + (TeX-arg-conditional TeX-arg-cite-note-p ([LaTeX-arg-natbib-notes]) nil) + TeX-arg-cite) + '("textcite" + (TeX-arg-conditional TeX-arg-cite-note-p ([LaTeX-arg-natbib-notes]) nil) + TeX-arg-cite) + + ;; IX.2 video environment + '("setfloatlink" "URL") + + ;; X.3. Dealing with Long Tables + '("squeezetable" 0) + + ;; XI. Placement of Figures, Tables, and other floats + '("printtables" 0) + '("printtables*" 0) + '("printfigures" 0) + '("printfigures*" 0)) + + ;; V.3. One-column vs. two-column layouts + (LaTeX-add-environments + '("widetext") + '("acknowledgments") + + ;; IX.2. video environment + '("video" LaTeX-env-revtex4-2-video) + + ;; X. Tables + '("ruledtabular") + + ;; XII. Rotating Floats + '("turnpage")) + + ;; Append entry for `video' to `LaTeX-label-alist': + (add-to-list 'LaTeX-label-alist + (cons "video" 'LaTeX-revtex4-2-video-label) + t) + + ;; Tell RefTeX about `video' environment: + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `(("video" + ,LaTeX-revtex4-2-video-reftex-quick-id-key + ,LaTeX-revtex4-2-video-label + "~\\ref{%s}" caption)))) + + ;; X.3. Dealing with Long Tables + (when (member "longtable" (TeX-style-list)) + (LaTeX-add-environments + '("longtable*" LaTeX-env-longtable))) + + ;; Verbatim-like macros with braces as delimiters: + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "email") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "homepage") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "setfloatlink") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fbox" "*[{") + ("keywords" "{") + ("preprint" "") + ("onecolumngrid" "") + ("twocolumngrid" "") + ("squeezetable" "") + ("printtables" "*") + ("printfigures" "*")) + 'function) + (font-latex-add-keywords '(("affiliation" "{") + ("noaffiliation" "") + ("collaboration" "{") + ("altaffiliation" "[{")) + 'textual) + (font-latex-add-keywords '(("email" "[") + ("homepage" "[") + ("onlinecite" "[[{") + ("textcite" "[[{") + ("setfloatlink" "")) + 'reference) + (font-latex-add-keywords '(("appendix*" "")) + 'warning))) + TeX-dialect) + +(defvar LaTeX-revtex4-2-class-options + (progn + (TeX-load-style "natbib") + (TeX-load-style "url") + (append + LaTeX-natbib-package-options + LaTeX-url-package-options + '("aps" "aip" "aapm" "sor" + "prl" "pra" "prb" "prc" "prd" "pre" + "prab" "prper" "prx" "prapplied" "prfluids" + "prmaterials" "physrev" "rmp" + "apl" "bmf" "cha" "jap" "jcp" "jmp" "rse" + "pof" "pop" "rsi" "apm" "adv" "sd" + "mph" "jor" + "10pt" "11pt" "12pt" + "groupedaddress" "superscriptaddress" + "draft" "linenumbers" "longbibliography" + "amsfonts" "noamsfonts" + "amssymb" "noamssymb" + "amsmath" "noamsmath" + "preprintnumbers" "nopreprintnumbers" + "floatfix" + "bibnotes" "nobibnotes" + "footinbib" "nofootinbib" + "eprint" "noeprint" + "altaffilletter" "altaffillsymbol" + "unsortedaddress" + "runinaddress" + "showkeys" "noshowkeyws" + "tightenlines" + "floats" + "endfloats" + "endfloats*" + "titlepage" "notitlepage" + "final" + "letterpaper" "a4paper" "a5paper" + "oneside" "twoside" + "fleqn" + "eqsecnum" + "balancelastpage" "nobalancelastpage" + "raggedbottom" "flushbottom" + "raggedfooter" "noraggedfooter" + "byrevtex" + "citeautoscript" "galley" "nomerge"))) + "Options for the revtex4-2 document class.") + +;;; revtex4-2.el ends here diff --git a/elpa/auctex-13.1.3/style/revtex4-2.elc b/elpa/auctex-13.1.3/style/revtex4-2.elc Binary files differnew file mode 100644 index 0000000..0212561 --- /dev/null +++ b/elpa/auctex-13.1.3/style/revtex4-2.elc diff --git a/elpa/auctex-13.1.3/style/rotating.el b/elpa/auctex-13.1.3/style/rotating.el new file mode 100644 index 0000000..fddda47 --- /dev/null +++ b/elpa/auctex-13.1.3/style/rotating.el @@ -0,0 +1,87 @@ +;;; rotating.el --- AUCTeX style for `rotating.sty' (v2.16d) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `rotating.sty' (v2.16d) from 2016/08/11. +;; `rotating.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-graphicx-package-options) + +(TeX-add-style-hook + "rotating" + (lambda () + + ;; Environments provided by the package: + (LaTeX-add-environments + '("sidewaysfigure" LaTeX-env-figure) + '("sidewaysfigure*" LaTeX-env-figure) + '("sidewaystable" LaTeX-env-figure) + '("sidewaystable*" LaTeX-env-figure) + "sideways" + '("turn" "Angle") + '("rotate" "Angle")) + + ;; Add the float environments to `LaTeX-label-alist': + (dolist (env '("sidewaysfigure" "sidewaysfigure*")) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-figure-label) t)) + + (dolist (env '("sidewaystable" "sidewaystable*")) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-table-label) t)) + + ;; The skips: + (LaTeX-add-lengths "rotFPtop" "rotFPbot") + + ;; New symbols + (TeX-add-symbols + '("turnbox" ["Angle"] "Argument")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("turnbox" "[{")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-rotating-package-options + (progn + (TeX-load-style "graphicx") + (append LaTeX-graphicx-package-options + '("clockwise" "counterclockwise" "anticlockwise" + "figuresleft" "figuresright" + "quiet" "log" "chatter"))) + "Package options for the rotating package.") + +;;; rotating.el ends here diff --git a/elpa/auctex-13.1.3/style/rotating.elc b/elpa/auctex-13.1.3/style/rotating.elc Binary files differnew file mode 100644 index 0000000..b636fb2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/rotating.elc diff --git a/elpa/auctex-13.1.3/style/ruby.el b/elpa/auctex-13.1.3/style/ruby.el new file mode 100644 index 0000000..9c18fa3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ruby.el @@ -0,0 +1,52 @@ +;;; ruby.el --- AUCTeX style for the ruby package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the ruby package. + +;;; Code: + +(require 'tex) + +(defvar LaTeX-ruby-package-options + '("overlap" "nooverlap" "CJK" "latin") + "Package options for the ruby package.") + +(TeX-add-style-hook + "ruby" + (lambda () + (TeX-add-symbols + '("rubyoverlap" 0) + '("rubynooverlap" 0) + '("rubyCJK" 0) + '("rubylatin" 0) + '("rubysize" 0) + '("rubysep" 0) + '("ruby" t nil))) + TeX-dialect) + +;;; ruby.el ends here diff --git a/elpa/auctex-13.1.3/style/ruby.elc b/elpa/auctex-13.1.3/style/ruby.elc Binary files differnew file mode 100644 index 0000000..caf660a --- /dev/null +++ b/elpa/auctex-13.1.3/style/ruby.elc diff --git a/elpa/auctex-13.1.3/style/scholax.el b/elpa/auctex-13.1.3/style/scholax.el new file mode 100644 index 0000000..4a6e22a --- /dev/null +++ b/elpa/auctex-13.1.3/style/scholax.el @@ -0,0 +1,106 @@ +;;; scholax.el --- AUCTeX style for `scholax.sty' (v1.027) -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2020-11-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `scholax.sty' (v1.027) from 2020/11/30. +;; `scholax.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "scholax" + (lambda () + + ;; Run style hook for various packages loaded by scholax + (TeX-run-style-hooks "textcomp" "fontaxes") + + ;; New symbols + (TeX-add-symbols + + ;; Only preamble commands + '("useosf" 0) + '("useproportional" 0) + '("thfamily" 0) + + ;; Text commands + '("textsu" t) ; superior figures + '("sustyle" -1) + '("textin" t) ; inferior figures + '("instyle" -1) + + '("textlf" t) ; lining figures + '("lfstyle" -1) + + '("texttlf" t) ; tabular lining figures + '("tlfstyle" -1) + + '("textosf" t) ; oldstyle figures + '("osfstyle" -1) + + '("texttosf" t) ; tabular oldstyle figures + '("tosfstyle" -1) + + '("textfrac" "Numerator" "Denominator")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("textsu" "{") + ("textin" "{") + ("textlf" "{") + ("texttlf" "{") + ("textosf" "{") + ("texttosf" "{") + ("textfrac" "{{")) + 'type-command) + (font-latex-add-keywords '(("sustyle" "") + ("instyle" "") + ("lfstyle" "") + ("tlfstyle" "") + ("osfstyle" "") + ("tosfstyle" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-scholax-package-options + '("scale" "scaled" + "spacing" "stretch" "shrink" + "foresolidus" "aftsolidus" "raisefrac" + "theoremfont" + "scosf" "sups" "lining" "lf" + "oldstyle" "osf" "tabular" "p" "proportional" + "looser" "loosest") + "Package options for the scholax package.") + +;;; scholax.el ends here diff --git a/elpa/auctex-13.1.3/style/scholax.elc b/elpa/auctex-13.1.3/style/scholax.elc Binary files differnew file mode 100644 index 0000000..c427446 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scholax.elc diff --git a/elpa/auctex-13.1.3/style/scrartcl.el b/elpa/auctex-13.1.3/style/scrartcl.el new file mode 100644 index 0000000..49509fb --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrartcl.el @@ -0,0 +1,30 @@ +;;; scrartcl.el -- AUCTeX style for scrartcl.cls -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2005, 2020 Free Software Foundation +;; License: GPL, see the file COPYING in the base directory of AUCTeX + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Created: 2002-09-26 +;; Keywords: tex + +;;; Commentary: + +;; This file adds support for `scrartcl.cls'. This file needs +;; `scrbase.el'. + +;; This file is part of AUCTeX. + +(require 'tex) +(require 'latex) + +;;; Code: +(TeX-add-style-hook + "scrartcl" + (lambda () + (LaTeX-largest-level-set "section") + ;; load basic definitons + (TeX-run-style-hooks "scrbase") + (LaTeX-add-environments "abstract")) + TeX-dialect) + +;;; scrartcl.el ends here diff --git a/elpa/auctex-13.1.3/style/scrartcl.elc b/elpa/auctex-13.1.3/style/scrartcl.elc Binary files differnew file mode 100644 index 0000000..b88c241 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrartcl.elc diff --git a/elpa/auctex-13.1.3/style/scrbase.el b/elpa/auctex-13.1.3/style/scrbase.el new file mode 100644 index 0000000..e5cc853 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrbase.el @@ -0,0 +1,228 @@ +;;; scrbase.el --- AUCTeX style for the KOMA-Script bundle. -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2004, 2005, 2007, 2014, 2018-2021 Free Software Foundation, Inc. + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Created: 2002-09-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the KOMA-Script bundle. This file +;; contains the base definitions that work with all KOMA-Script +;; classes (scrarctl.cls, scrreprt.cls, scrbook.cls and scrlttr2.cls). +;; You need this file since it's loaded from the class-styles. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook "scrbase" + (lambda () + (TeX-add-symbols + "appendixmore" + "autodot" + '("addtokomafont" TeX-arg-KOMA-fontelements t) + '("areaset" [ "BCOR" ] "Width" "Height") + '("captionabove" [ "Lof entry" ] "Caption") + '("captionbelow" [ "Lof entry" ] "Caption") + '("cleardoubleemptypage") + '("cleardoubleplainpage") + '("cleardoublestandardpage") + '("dedication" t) + '("deffootnote" [ "Mark width" ] "Indent" "Parindent" "Definition") + '("deffootnotemark" "Definition") + '("extratitle" t) + '("ifpdfoutput" t nil) + '("ifthispageodd" t nil) + '("lowertitleback" t) + '("maketitle" [ "Pagenumber" ]) + '("marginline" t) + '("publishers" "Publishers") + '("setbibpreamble" "Preamble") + '("setcaphanging") + '("setcapindent" "Indent") + '("setcapindent*" "X-Indent") + '("setcapmargin" [ "Margin left" ] "Margin") + '("setcapmargin*" [ "Margin inside" ] "Margin") + '("setcapwidth" [ TeX-arg-KOMA-capjust ] "Width") + '("setindexpreamble" "Preamble") + '("setkomafont" TeX-arg-KOMA-fontelements t) + '("subject" "Subject") + '("thanks" "Footnote") + '("thefootnotemark") + '("titlehead" t) + '("uppertitleback" t) + '("usekomafont" TeX-arg-KOMA-fontelements)) + (LaTeX-add-environments + '("labeling" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((delim (TeX-read-string "(Optional) Delimiter: ")) + (width (TeX-read-string "Longest item: "))) + (concat + (if (not (zerop (length delim))) + (format "[%s]" delim)) + (format "{%s}" width)))) + (LaTeX-find-matching-begin) + (end-of-line 1) + (LaTeX-insert-item))) + '("addmargin" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((leftin (TeX-read-string "(Optional) Left Indentation: ")) + (indent (TeX-read-string "Indentation: "))) + (concat + (if (not (zerop (length leftin))) + (format "[%s]" leftin)) + (format "{%s}" indent)))))) + '("addmargin*" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((innin (TeX-read-string "(Optional) Inner Indentation: ")) + (indent (TeX-read-string "Indentation: "))) + (concat + (if (not (zerop (length innin))) + (format "[%s]" innin)) + (format "{%s}" indent)))))) + '("captionbeside" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((lofent (TeX-read-string "(Optional) Lof Entry: ")) + (title (TeX-read-string "Caption: ")) + (place (TeX-read-string "(Optional) Placement (l,r,o,i): ")) + (width (TeX-read-string "(Optional) Width: ")) + (offset (TeX-read-string "(Optional) Offset: "))) + (concat + (if (not (zerop (length lofent))) + (format "[%s]" lofent)) + (format "{%s}" title) + (if (not (zerop (length place))) + (format "[%s]" place)) + (if (not (zerop (length width))) + (format "[%s]" width)) + (and + (not (zerop (length place))) + (not (zerop (length offset))) + (format "[%s]%s" offset + (if (y-or-n-p "Starred? ") + "*" ""))))))))) + (LaTeX-section-list-add-locally '(("addpart" 0) + ("addsec" 2) + ("minisec" 7))) + ;; This doesn't work. Maybe it's RefTeX's label insertion? + (make-local-variable 'LaTeX-section-label) + (setq LaTeX-section-label (append + LaTeX-section-label + '(("addpart" . nil) + ("addsec" . nil) + ("minisec" . nil)))) + ;; Fill \minisec{...} like normal sectioning commands + (LaTeX-paragraph-commands-add-locally "minisec") + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Textual keywords + (font-latex-add-keywords '(("captionabove" "[{") + ("captionbelow" "[{") + ("dedication" "{") + ("extratitle" "{") + ("lowertitleback" "{") + ("maketitle" "[") + ("marginline" "{") + ("publishers" "{") + ("subject" "{") + ("setbibpreamble" "{") + ("setindexpreamble" "{") + ("titlehead" "{") + ("uppertitleback" "{")) + 'textual) + ;; Function keywords + (font-latex-add-keywords '(("deffootnote" "[{{{") + ("deffootnotemark" "{") + ("ifpdfoutput" "{{") + ("ifthispageodd" "{{")) + 'function) + ;; Variable keywords + (font-latex-add-keywords '(("addtokomafont" "{{") + ("areaset" "[{{") + ("setcaphanging" "") + ("setcapindent" "{") + ("setcapmargin" "*[{") + ("setcapwidth" "[{") + ("setkomafont" "{{") + ("typearea" "[{") + ("usekomafont" "{")) + 'variable) + ;; Warning keywords + (font-latex-add-keywords '("cleardoublestandardpage" + "cleardoubleplainpage" + "cleardoubleemptypage") + 'warning) + ;; Sectioning keywords + (font-latex-add-keywords '(("addpart" "[{")) 'sectioning-1) + (font-latex-add-keywords '(("addsec" "[{")) 'sectioning-2) + (font-latex-add-keywords '(("minisec" "[{")) 'sectioning-4))) + TeX-dialect) + +(defun TeX-arg-KOMA-setpreamble (optional &optional prompt) + "Prompt for KOMA-Script's \\set*preamble position with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Position") + '(("") ("l") ("r") ("c") ("o") ("u") + ("lo") ("lu") ("ro") ("ru") ("co") ("cu")) + nil t) + optional)) + +(defun TeX-arg-KOMA-capjust (optional &optional prompt) + "Prompt for KOMA-Script's \\setcapwidth justification with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Justification") + '(("") ("l") ("r") ("c") ("i") ("o")) + nil t) + optional)) + +(defun TeX-arg-KOMA-fontelements (optional &optional prompt) + "Prompt for KOMA-Script's fontelements with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Element") + '(("") + ("caption") ("captionlabel") + ("descriptionlabel") ("dictum") ("dictumauthor") ("dictumtext") + ("footnote") ("footnotelabel") ("footnotereference") + ("pagefoot") ("pagehead") ("pagenumber") ("pagination") + ("sectioning") ("part") ("partnumber") ("chapter") ("section") + ("subsection") ("subsubsection") ("paragraph") ("subparagraph") + ("title") ("disposition") ("minisec")) + nil t) + optional)) + +(add-to-list 'LaTeX-item-list '("labeling" . LaTeX-item-argument)) + +;;; scrbase.el ends here diff --git a/elpa/auctex-13.1.3/style/scrbase.elc b/elpa/auctex-13.1.3/style/scrbase.elc Binary files differnew file mode 100644 index 0000000..8833ac4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrbase.elc diff --git a/elpa/auctex-13.1.3/style/scrbook.el b/elpa/auctex-13.1.3/style/scrbook.el new file mode 100644 index 0000000..c3a7be5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrbook.el @@ -0,0 +1,71 @@ +;;; scrbook.el --- AUCTeX style for scrbook.cls -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2005, 2018, 2020 Free Software Foundation + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Created: 2002-09-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `scrbook.cls'. This file needs +;; `scrbase.el'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook "scrbook" + (lambda () + (LaTeX-largest-level-set "chapter") + ;; load basic definitons + (TeX-run-style-hooks "scrbase") + (TeX-add-symbols + "chapapp" + "raggeddictum" + '("chapappifchapterprefix" "Additional text") + '("setpartpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t) + '("setchapterpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t) + '("dictum" [ "Author" ] t)) + (LaTeX-section-list-add-locally '("addchap" 1)) + (make-local-variable 'LaTeX-section-label) + (setq LaTeX-section-label (append + LaTeX-section-label + '(("addchap" . nil)))) + ;; Definitions for font-latex + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Textual keywords + (font-latex-add-keywords '(("addchap" "[{") + ("setpartpreamble" "[[{") + ("setchapterpreamble" "[[{") + ("dictum" "[{")) + 'textual) + ;; Sectioning keywords + (font-latex-add-keywords '(("addchap" "[{")) 'sectioning-1))) + TeX-dialect) + +;;; scrbook.el ends here diff --git a/elpa/auctex-13.1.3/style/scrbook.elc b/elpa/auctex-13.1.3/style/scrbook.elc Binary files differnew file mode 100644 index 0000000..ef068f5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrbook.elc diff --git a/elpa/auctex-13.1.3/style/scrlttr2.el b/elpa/auctex-13.1.3/style/scrlttr2.el new file mode 100644 index 0000000..5a0f667 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrlttr2.el @@ -0,0 +1,249 @@ +;;; scrlttr2.el --- AUCTeX style for scrlttr2.cls. -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2007, 2014, 2018, 2020 Free Software Foundation + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Created: 2002-10-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `scrlttr2.cls'. + +;; Since I just recently switched from `g-brief.cls' to the +;; KOMA-Script letter class *and* I don't really write many +;; snailmails, there are probably some superflous macros included and +;; important ones left out. Comments appreciated. + +;; I left out any length and positioning macros since those should be +;; set in a personal `*.lco'-File. IMHO. + +;;; Code + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "scrlttr2" + (lambda () + (TeX-add-symbols + '("AtBeginLetter" t) + '("KOMAoptions" t) + '("LetterOptionNeedsPapersize" "Name of lco file" "Paper size") + '("LoadLetterOption" "Name of lco file") + '("addrchar" "Initial letter") + '("addrentry" "Lastname" "Firstname" "Address" "Telephone" "F1" + "F2" "F3" "F4" "Key") + '("addtokomafont" TeX-arg-KOMA-scrlttr-fontelements t) + '("addtolengthplength" [ "Factor" ] "Name of length" + "Name of pseudo length") + '("addtoreffields" TeX-arg-KOMA-scrlttr-vars) + '("adrchar" "Initial letter") + '("adrentry" "Lastname" "Firstname" "Address" "Telephone" "F1" + "F2" "Comment" "Key") + '("bankname" t) + '("captionsUKenglish" nil) + '("captionsUSenglish" nil) + '("captionsamerican" nil) + '("captionsaustrian" nil) + '("captionsbritish" nil) + '("captionscroatian" nil) + '("captionsdutch" nil) + '("captionsenglish" nil) + '("captionsfrench" nil) + '("captionsgerman" nil) + '("captionsitalian" nil) + '("captionsngerman" nil) + '("captionsspanish" nil) + '("cc" t) + '("ccname" t) + '("cleardoubleemptypage") + '("cleardoubleplainpage") + '("cleardoublestandardpage") + '("closing" "Closing Phrase") + '("customername" t) + '("dateUKenglish" nil) + '("dateUSenglish" nil) + '("dateamerican" nil) + '("dateaustrian" nil) + '("datebritish" nil) + '("datecroatian" nil) + '("datedutch" nil) + '("dateenglish" nil) + '("datefrench" nil) + '("dategerman" nil) + '("dateitalian" nil) + '("datename" t) + '("datengerman" nil) + '("datespanish" nil) + '("emailname" t) + '("encl" t) + '("enclname" t) + '("faxname" t) + '("firstfoot" t) + '("firsthead" t) + '("headfromname" t) + '("headtoname" t) + '("ifkomavarempty" TeX-arg-KOMA-scrlttr-vars 2) + '("ifkomavarempty*" TeX-arg-KOMA-scrlttr-vars 2) + '("invoicename" t) + '("myrefname" t) + '("newcaptionname" "Language" "Term" "Definition") + '("newkomavar" [ "Description" ] "Name") + '("newkomavar*" [ "Description" ] "Name") + '("nextfoot" t) + '("nexthead" t) + '("opening" "Opening") + '("pagename" t) + '("phonename" t) + '("providecaptionname" "Language" "Term" "Definition") + '("ps") + '("raggedsignature" nil) + '("renewcaptionname" "Language" "Term" "Definition") + '("setkomafont" TeX-arg-KOMA-scrlttr-fontelements t) + '("setkomavar" TeX-arg-KOMA-scrlttr-vars [ "Description" ] t) + '("setkomavar*" TeX-arg-KOMA-scrlttr-vars "Description") + '("setlengthtoplength" [ "Factor" ] "Name of length" + "Name of pseudo length") + '("subjectname" t) + '("usekomafont" TeX-arg-KOMA-scrlttr-fontelements) + '("usekomavar" [ "Command" ] TeX-arg-KOMA-scrlttr-vars) + '("usekomavar*" [ "Command" ] TeX-arg-KOMA-scrlttr-vars) + '("useplength" "Name") + '("wwwname" t) + '("yourmailname" t) + '("yourrefname" t)) + (LaTeX-add-environments + '("letter" (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((options (TeX-read-string "Optional options: ")) + (recip (TeX-read-string "Recipient: "))) + (concat + (if (not (zerop (length options))) + (format "[%s]" options)) + (format "{%s}" recip))))))) + ;; Definitions for font-latex + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Textual keywords + (font-latex-add-keywords '(("addrentry" "{{{{{{{{{") + ("adrentry" "{{{{{{{{") + ("bankname" "{") + ("cc" "{") + ("ccname" "{") + ("closing" "{") + ("customername" "{") + ("datename" "{") + ("emailname" "{") + ("encl" "{") + ("enclname" "{") + ("faxname" "{") + ("firstfoot" "{") + ("firsthead" "{") + ("headfromname" "{") + ("headtoname" "{") + ("invoicename" "{") + ("myrefname" "{") + ("nextfoot" "{") + ("nexthead" "{") + ("opening" "{") + ("pagename" "{") + ("phonename" "{") + ("ps" "") + ("subjectname" "{") + ("wwwname" "{") + ("yourmailname" "{") + ("yourrefname" "{")) + 'textual) + ;; Function keywords + (font-latex-add-keywords '(("AtBeginLetter" "{") + ("LetterOptionNeedsPapersize" "{{") + ("LoadLetterOption" "{") + ("addrchar" "{") + ("adrchar" "{") + ("ifkomavarempty" "*{{{")) + 'function) + ;; Variable keywords + (font-latex-add-keywords '(("KOMAoptions" "{") + ("addtokomafont" "{{") + ("addtolengthplength" "[{{") + ("addtoreffields" "{") + ("newcaptionname" "{{{") + ("newkomavar" "*[{") + ("providecaptionname" "{{{") + ("renewcaptionname" "{{{") + ("setkomafont" "{{") + ("setkomavar" "*{[{") + ("setlengthtoplength" "[{{") + ("usekomafont" "{") + ("usekomavar" "*[{") + ("useplength" "{")) + 'variable) + ;; Warning keywords + (font-latex-add-keywords '("cleardoublestandardpage" + "cleardoubleplainpage" + "cleardoubleemptypage") + 'warning))) + TeX-dialect) + +(defun TeX-arg-KOMA-scrlttr-vars (optional &optional prompt) + "Prompt for KOMA-Script's scrlttr2 predefined variables with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Variable") + '(("") + ("backaddress") ("backaddressseparator") + ("ccseparator") ("customer") + ("date") + ("emailseparator") ("enclseparator") + ("faxseparator") ("frombank") ("fromaddress") ("fromemail") + ("fromfax") ("fromlogo") ("fromname") ("fromphone") ("fromurl") + ("invoice") + ("location") + ("myref") + ("place") ("placeseparator") ("phoneseparator") + ("signature") ("specialmail") ("subject") ("subjectseparator") + ("title") ("toname") ("toaddress") + ("yourmail") ("yourref")) + nil nil) + optional)) + +(defun TeX-arg-KOMA-scrlttr-fontelements (optional &optional prompt) + "Prompt for KOMA-Script's scrlttr2 fontelements with completion." + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional prompt "Element") + '(("") + ("backaddress") + ("descriptionlabel") + ("fromaddress") ("fromname") + ("pagefoot") ("pagehead") ("pagenumber") + ("subject") + ("title")) + nil t) + optional)) + +;;; scrlttr2.el ends here diff --git a/elpa/auctex-13.1.3/style/scrlttr2.elc b/elpa/auctex-13.1.3/style/scrlttr2.elc Binary files differnew file mode 100644 index 0000000..6ecda54 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrlttr2.elc diff --git a/elpa/auctex-13.1.3/style/scrpage2.el b/elpa/auctex-13.1.3/style/scrpage2.el new file mode 100644 index 0000000..dca5590 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrpage2.el @@ -0,0 +1,139 @@ +;;; scrpage2.el --- AUCTeX style for scrpage2.sty. -*- lexical-binding: t; -*- + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Created: 2003-11-01 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `scrpage2.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "scrpage2" + (lambda () + + ;; New symbols + (TeX-add-symbols + '("lehead" [ "scrplain-left-even" ] "scrheadings-left-even") + '("cehead" [ "scrplain-center-even" ] "scrheadings-center-even") + '("rehead" [ "scrplain-right-even" ] "scrheadings-right-even") + '("lefoot" [ "scrplain-left-even" ] "scrheadings-left-even") + '("cefoot" [ "scrplain-center-even" ] "scrheadings-center-even") + '("refoot" [ "scrplain-right-even" ] "scrheadings-right-even") + '("lohead" [ "scrplain-left-odd" ] "scrheadings-left-odd") + '("cohead" [ "scrplain-center-odd" ] "scrheadings-center-odd") + '("rohead" [ "scrplain-right-odd" ] "scrheadings-right-odd") + '("lofoot" [ "scrplain-left-odd" ] "scrheadings-left-odd") + '("cofoot" [ "scrplain-center-odd" ] "scrheadings-center-odd") + '("rofoot" [ "scrplain-right-odd" ] "scrheadings-right-odd") + '("ihead" [ "scrplain-inside" ] "scrheadings-inside") + '("chead" [ "scrplain-center" ] "scrheadings-center") + '("ohead" [ "scrplain-outside" ] "scrheadings-outside") + '("ifoot" [ "scrplain-inside" ] "scrheadings-inside") + '("cfoot" [ "scrplain-center" ] "scrheadings-center") + '("ofoot" [ "scrplain-outside" ] "scrheadings-outside") + '("clearscrheadfoot") + '("clearscrheadings") + '("clearscrplain") + '("automark" [ "Right page" ] "Left page") + '("headmark") + '("manualmark") + '("pagemark") + '("setfootwidth" [ "Offset" ] "Width") + '("setheadwidth" [ "Offset" ] "Width") + '("setfootbotline" [ "Length" ] "Thickness") + '("setfootsepline" [ "Length" ] "Thickness") + '("setheadtopline" [ "Length" ] "Thickness") + '("setheadsepline" [ "Length" ] "Thickness") + '("deftripstyle" "Name" [ "Thickness of outer line" ] + [ "Thickness of inner line" ] "Inner box of page head" + "Center box of page head" "Outer box of page head" + "Inner box of page foot" "Center box of page foot" + "Outer box of page foot") + '("defpagestyle" "Name" "Head definition" "Foot definition") + '("newpagestyle" "Name" "Head definition" "Foot definition") + '("renewpagestyle" "Name" "Head definition" "Foot definition") + '("providepagestyle" "Name" "Head definition" "Foot definition")) + + ;; Don't increase indent at \ifoot: + (add-to-list 'LaTeX-indent-begin-exceptions-list "ifoot" t) + (LaTeX-indent-commands-regexp-make) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("lehead" "[{") + ("cehead" "[{") + ("rehead" "[{") + ("lefoot" "[{") + ("cefoot" "[{") + ("refoot" "[{") + ("lohead" "[{") + ("cohead" "[{") + ("rohead" "[{") + ("lofoot" "[{") + ("cofoot" "[{") + ("rofoot" "[{") + ("ihead" "[{") + ("chead" "[{") + ("ohead" "[{") + ("ifoot" "[{") + ("cfoot" "[{") + ("ofoot" "[{") + ("automark" "[{") + ("setfootwidth" "[{") + ("setheadwidth" "[{") + ("setfootbotline" "[{") + ("setfootsepline" "[{") + ("setheadtopline" "[{") + ("setheadsepline" "[{")) + 'variable) + (font-latex-add-keywords '(("deftripstyle" "{[[{{{{{{") + ("defpagestyle" "{{{") + ("newpagestyle" "{{{") + ("renewpagestyle" "{{{") + ("providepagestyle" "{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-scrpage2-package-options '("headinclude" "headexclude" + "footinclude" "footexclude" + "mpinclude" "mpexclude" + "headtopline" "headsepline" + "footsepline" "footbotline" + "plainheadtopline" "plainheadsepline" + "plainfootsepline" "plainfootbotline" + "ilines" "clines" "olines" + "automark" "manualmark" + "autooneside" "markuppercase" + "markusedcase" "nouppercase" + "komastyle" "standardstyle") + "Package options for the scrpage2 package.") + +;;; scrpage2.el ends here diff --git a/elpa/auctex-13.1.3/style/scrpage2.elc b/elpa/auctex-13.1.3/style/scrpage2.elc Binary files differnew file mode 100644 index 0000000..70f7ece --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrpage2.elc diff --git a/elpa/auctex-13.1.3/style/scrreprt.el b/elpa/auctex-13.1.3/style/scrreprt.el new file mode 100644 index 0000000..a2f5273 --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrreprt.el @@ -0,0 +1,73 @@ +;;; scrreprt.el --- AUCTeX style for scrreprt.cls. -*- lexical-binding: t; -*- + +;; Copyright (C) 2002, 2005, 2018, 2020 Free Software Foundation + +;; Author: Mark Trettin <Mark.Trettin@gmx.de> +;; Created: 2002-09-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `scrreprt.cls'. This file needs +;; `scrbase.el'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "scrreprt" + (lambda () + (LaTeX-largest-level-set "chapter") + ;; load basic definitons + (TeX-run-style-hooks "scrbase") + (TeX-add-symbols + "chapapp" + "raggeddictum" + '("chapappifchapterprefix" "Additional text") + '("setpartpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t) + '("setchapterpreamble" [ TeX-arg-KOMA-setpreamble ] [ "Width" ] t) + '("dictum" [ "Author" ] t)) + (LaTeX-add-environments "abstract") + (LaTeX-section-list-add-locally '("addchap" 1)) + (make-local-variable 'LaTeX-section-label) + (setq LaTeX-section-label (append + LaTeX-section-label + '(("addchap" . nil)))) + ;; Definitions for font-latex + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Textual keywords + (font-latex-add-keywords '(("addchap" "[{") + ("setpartpreamble" "[[{") + ("setchapterpreamble" "[[{") + ("dictum" "[{")) + 'textual) + ;; Sectioning keywords + (font-latex-add-keywords '(("addchap" "[{")) 'sectioning-1))) + TeX-dialect) + +;;; scrreprt.el ends here diff --git a/elpa/auctex-13.1.3/style/scrreprt.elc b/elpa/auctex-13.1.3/style/scrreprt.elc Binary files differnew file mode 100644 index 0000000..48bea2c --- /dev/null +++ b/elpa/auctex-13.1.3/style/scrreprt.elc diff --git a/elpa/auctex-13.1.3/style/setspace.el b/elpa/auctex-13.1.3/style/setspace.el new file mode 100644 index 0000000..be0867d --- /dev/null +++ b/elpa/auctex-13.1.3/style/setspace.el @@ -0,0 +1,70 @@ +;;; setspace.el --- AUCTeX style for `setspace.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Created: 2011-04-16 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `setspace.sty'. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "setspace" + (lambda () + (TeX-add-symbols + '("setstretch" "Stretch") + '("setdisplayskipstretch" "Stretch") + '("SetSinglespace" "Stretch") + '("onehalfspacing" 0) + '("doublespacing" 0) + '("singlespacing" 0)) + + (LaTeX-add-environments + '("spacing" "Stretch") + "singlespace" + "singlespace*" + "onehalfspace" + "doublespace") + + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("singlespacing" "") + ("doublespacing" "") + ("onehalfspacing" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-setspace-package-options + '("doublespacing" "onehalfspacing" "singlespacing" "nodisplayskipstretch") + "Package options for the setspace package.") + +;;; setspace.el ends here diff --git a/elpa/auctex-13.1.3/style/setspace.elc b/elpa/auctex-13.1.3/style/setspace.elc Binary files differnew file mode 100644 index 0000000..bcd1f63 --- /dev/null +++ b/elpa/auctex-13.1.3/style/setspace.elc diff --git a/elpa/auctex-13.1.3/style/shortvrb.el b/elpa/auctex-13.1.3/style/shortvrb.el new file mode 100644 index 0000000..5f8df92 --- /dev/null +++ b/elpa/auctex-13.1.3/style/shortvrb.el @@ -0,0 +1,73 @@ +;;; shortvrb.el --- AUCTeX style for `shortvrb.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-12-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `shortvrb.sty'. + +;; XXX: We might want provide users with the possibility to activate +;; something like this for any file (incl. Plain TeX). That would +;; bring us one step closer to the goal of displaying texbook.tex +;; without font locking going haywire. + +;; FIXME: The code does not work for preview.dtx because in that file +;; the style list is empty. In its master file, preview.drv, it +;; works, however. However, even if the style file is loaded by hand, +;; it fails to fontify verbatim text in the documentation parts of the +;; file. + +;;; Code: + +(require 'tex) +(require 'tex-style) + +;; Silence the compiler: +(declare-function font-latex-add-to-syntax-alist + "font-latex" + (list)) + +(TeX-add-style-hook + "shortvrb" + (lambda () + + ;; Ispell: Add entries to `ispell-tex-skip-alist': + (when LaTeX-shortvrb-chars + (TeX-ispell-skip-setcar + (mapcar (lambda (char) + (let ((str (char-to-string char))) + (cons str str))) + LaTeX-shortvrb-chars))) + + ;; Fontification + (when (and LaTeX-shortvrb-chars + (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-to-syntax-alist + (mapcar (lambda (char) (cons char "|")) + LaTeX-shortvrb-chars)))) + TeX-dialect) + +;;; shortvrb.el ends here diff --git a/elpa/auctex-13.1.3/style/shortvrb.elc b/elpa/auctex-13.1.3/style/shortvrb.elc Binary files differnew file mode 100644 index 0000000..e9599fa --- /dev/null +++ b/elpa/auctex-13.1.3/style/shortvrb.elc diff --git a/elpa/auctex-13.1.3/style/sidecap.el b/elpa/auctex-13.1.3/style/sidecap.el new file mode 100644 index 0000000..ff17517 --- /dev/null +++ b/elpa/auctex-13.1.3/style/sidecap.el @@ -0,0 +1,131 @@ +;;; sidecap.el --- AUCTeX style for `sidecap.sty' (v1.6f) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021, 2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `sidecap.sty' (v1.6f) from 2003/06/06. +;; `sidecap.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defun LaTeX-env-sidecap-float (environment) + "Create ENVIRONMENT with \\caption and \\label commands. +This function runs `LaTeX-env-figure' and inserts the first +optional argument 'relwidth' provided by environments of the +package sidecap." + (let ((relwidth (TeX-read-string + (TeX-argument-prompt t nil "Relative caption width"))) + (sc-active-mark (and (TeX-active-mark) + (not (eq (mark) (point))))) + (p (point-marker)) + s) + ;; Run `LaTeX-env-figure' which does the major part of the job: + (LaTeX-env-figure environment) + ;; Now save the position: + (setq s (point-marker)) + ;; Search backwards to see if an optional float-placement arg is + ;; inserted; this would be the 2nd arg for sidecap environments: + (save-excursion + (re-search-backward (concat (regexp-quote TeX-esc) + "begin" + "[ \t]*" + TeX-grop + (regexp-quote environment) + "\\(" TeX-grcl "\\)" + "[ \t]*" + "\\(" + (regexp-quote LaTeX-optop) + ;; Float placement: + "\\([a-zA-Z!]*\\)" + (regexp-quote LaTeX-optcl) + "\\)?") + p t)) + (cond (;; Insert the first optional arg at any rate if non-empty: + (and relwidth (not (string= relwidth ""))) + (goto-char (match-end 1)) + (insert LaTeX-optop relwidth LaTeX-optcl)) + ;; Insert a pair of empty brackets if relwidth is empty and + ;; float-placement is given: + ((and (or (null relwidth) + (string= relwidth "")) + (match-string 3)) + (goto-char (match-beginning 2)) + (insert LaTeX-optop LaTeX-optcl)) + (t nil)) + ;; Go back to where we started if we have moved at all: + (unless (= s (point)) + (goto-char s)) + ;; Insert a tabular stored in `LaTeX-default-tabular-environment': + (when (and (member environment '("SCtable" "SCtable*")) + (not sc-active-mark)) + (LaTeX-environment-menu LaTeX-default-tabular-environment)) + ;; Clean up the markers: + (set-marker s nil) + (set-marker p nil))) + +(TeX-add-style-hook + "sidecap" + (lambda () + + ;; Add the environments provided by the package: + (LaTeX-add-environments + '("SCtable" LaTeX-env-sidecap-float) + '("SCtable*" LaTeX-env-sidecap-float) + '("SCfigure" LaTeX-env-sidecap-float) + '("SCfigure*" LaTeX-env-sidecap-float) + '("wide")) + + ;; Add the float environments to `LaTeX-label-alist': + (dolist (env '("SCfigure" "SCfigure*")) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-figure-label) t)) + + (dolist (env '("SCtable" "SCtable*")) + (add-to-list 'LaTeX-label-alist `(,env . LaTeX-table-label) t)) + + ;; The next 2 can be set with '\renewcommand': + (TeX-add-symbols + "sidecaptionsep" + "sidecaptionrelwidth") + + ;; Run the style hook for 'ragged2e' if necessary: + (when (or (LaTeX-provided-package-options-member "sidecap" "raggedright") + (LaTeX-provided-package-options-member "sidecap" "raggedleft") + (LaTeX-provided-package-options-member "sidecap" "ragged")) + (TeX-run-style-hooks "ragged2e"))) + + TeX-dialect) + +(defvar LaTeX-sidecap-package-options + '("outercaption" "innercaption" + "leftcaption" "rightcaption" + "wide" + "raggedright" "raggedleft" "ragged") + "Package options for the sidecap package.") + +;;; sidecap.el ends here diff --git a/elpa/auctex-13.1.3/style/sidecap.elc b/elpa/auctex-13.1.3/style/sidecap.elc Binary files differnew file mode 100644 index 0000000..d7e42bc --- /dev/null +++ b/elpa/auctex-13.1.3/style/sidecap.elc diff --git a/elpa/auctex-13.1.3/style/siunitx.el b/elpa/auctex-13.1.3/style/siunitx.el new file mode 100644 index 0000000..b1164a1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/siunitx.el @@ -0,0 +1,522 @@ +;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 3.3.36. -*- lexical-binding: t; -*- + +;; Copyright (C) 2012-2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `siunitx.sty' version 3.0.36 from +;; 2021/22/18. + +;;; Code: + +(require 'tex) ;Indispensable when compiling the call to `TeX-auto-add-type'. +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(TeX-auto-add-type "siunitx-unit" "LaTeX") + +;; Self Parsing -- see (info "(auctex)Hacking the Parser"). +;; `\\(?:\\[[^]]*\\]\\)?' matches possible options (actually used only +;; by `DeclareSIUnit' macro), wrapped in `[...]'. +(defvar LaTeX-siunitx-regexp + `(,(concat "\\\\DeclareSI\\(Unit\\|Prefix\\|Power\\|Qualifier\\)" + "[ \t\n\r]*" + ;; The optional argument + "\\(?:\\[[^]]*\\]\\)?" + "[ \t\n\r]*" + ;; First mandatory argument + "{?\\\\\\([A-Za-z]+\\)}?" + "[ \t\n\r]*" + ;; Second mandatory argument needed for '\DeclareSIPower': + "{?\\\\\\([A-Za-z]+\\)}?") + (2 3 1) LaTeX-auto-siunitx-unit) + "Matches new siunitx unit, prefix, power, and qualifier definitions.") + +(defun LaTeX-siunitx-prepare () + "Clear `LaTex-auto-siunitx-unit' before use." + (setq LaTeX-auto-siunitx-unit nil)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-siunitx-prepare t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defvar LaTeX-siunitx-unit-history nil + "History of units in siunitx.") + +(defun LaTeX-siunitx-unit-list-parsed () + "Return a list of units incl. the user defined ones. +This function should be preferred over the function +`LaTeX-siunitx-unit-list' since it knows about the 2 macros +defined with '\\DeclareSIPower'." + (let (result) + (dolist (unit (LaTeX-siunitx-unit-list) result) + (push (car unit) result) + (when (and (> (safe-length unit) 1) + (string-equal (nth 2 unit) "Power")) + (push (cadr unit) result))))) + +(defun LaTeX-arg-siunitx-unit (optional &optional prompt initial-input + definition prefix) + "Prompt for siunitx units, prefixes, powers, and qualifiers. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string. If INITIAL-INPUT is non-nil, insert it in the minibuffer +initially, with point positioned at the end. If DEFINITION is +non-nil, add the chosen unit to the list of defined units. If +PREFIX is non-nil, insert it before the given input." + ;; Remove <SPC> key binding from map used in `TeX-completing-read-multiple' + ;; with `require-match' set to `nil' (it's `crm-local-completion-map' if + ;; `completing-read-multiple' is bound, `minibuffer-local-completion-map' + ;; otherwise) and set completion separator to the TeX escape character. + (let* ((crm-local-completion-map + (remove (assoc 32 crm-local-completion-map) crm-local-completion-map)) + (minibuffer-local-completion-map + (remove (assoc 32 minibuffer-local-completion-map) + minibuffer-local-completion-map)) + (crm-separator (regexp-quote TeX-esc)) + (unit (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Unit: " t) + (LaTeX-siunitx-unit-list-parsed) + nil nil initial-input + 'LaTeX-siunitx-unit-history) + TeX-esc))) + (if (and definition (not (string-equal "" unit))) + (LaTeX-add-siunitx-units unit)) + (TeX-argument-insert unit optional prefix))) + +(defun LaTeX-arg-define-siunitx-unit (optional &optional prompt) + "Prompt for a LaTeX siunitx unit, prefix, power, and qualifier. +If OPTIONAL is non-nil, insert the resulting value as an optional +argument, otherwise as a mandatory one. Use PROMPT as the prompt +string." + (LaTeX-arg-siunitx-unit optional + (unless prompt (concat "Unit: " TeX-esc)) + nil t TeX-esc)) + +(defvar LaTeX-siunitx-package-options + '(;; Table 10: Print options + ("color") + ("mode" ("match" "math" "text")) + ("number-color") + ("number-mode" ("match" "math" "text")) + ("propagate-math-font" ("true" "false")) + ("reset-math-version" ("true" "false")) + ("reset-text-family" ("true" "false")) + ("reset-text-series" ("true" "false")) + ("reset-text-shape" ("true" "false")) + ("text-family-to-math" ("true" "false")) + ("text-font-command") + ("text-series-to-math" ("true" "false")) + ("unit-color") + ("unit-mode" ("match" "math" "text")) + ;; Table 11: Options for number parsing + ("evaluate-expression" ("true" "false")) + ("expression") + ("input-close-uncertainty") + ("input-comparators") + ("input-decimal-markers") + ("input-digits") + ("input-exponent-markers") + ("input-ignore") + ("input-open-uncertainty") + ("input-signs") + ("input-uncertainty-signs") + ("parse-numbers" ("true" "false")) + ("retain-explicit-plus" ("true" "false")) + ("retain-zero-uncertainty" ("true" "false")) + ;; Table 12: Number post-processing options + ("drop-exponent" ("true" "false")) + ("drop-uncertainty" ("true" "false")) + ("drop-zero-decimal" ("true" "false")) + ("exponent-mode" ("input" "fixed" "engineering" "scientific")) + ("fixed-exponent") + ("minimum-integer-digits") + ("minimum-decimal-digits") + ("round-half" ("up" "even")) + ("round-minimum") + ("round-mode" ("off" "figures" "places" "uncertainty")) + ("round-pad" ("true" "false")) + ("round-precision") + ;; Table 13: Output options for numbers + ("bracket-negative-numbers" ("true" "false")) + ("exponent-base") + ("exponent-product") + ("group-digits" ("all" "none" "decimal" "integer")) + ("group-minimum-digits") + ("group-separator") + ("negative-color") + ("output-close-uncertainty") + ("output-decimal-marker") + ("output-exponent-marker") + ("output-open-uncertainty") + ("print-implicit-plus" ("true" "false")) + ("print-unity-mantissa" ("true" "false")) + ("print-zero-exponent" ("true" "false")) + ("tight-spacing" ("true" "false")) + ("uncertainty-mode" ("compact" "full" "compact-marker")) + ("uncertainty-separator") + ;; Table 14: Output options for lists, products and ranges of + ;; numbers and quantities + ("list-exponents" ("individual" "combine-bracket" "combine")) + ("list-final-separator") + ("list-pair-separator") + ("list-separator") + ("list-units" ("repeat" "bracket" "single")) + ("product-exponents" ("individual" "combine-bracket" "combine")) + ("product-mode" ("symbol" "phrase")) + ("product-phrase") + ("product-symbol") + ("product-units" ("repeat" "bracket" "single")) + ("range-exponents" ("individual" "combine-bracket" "combine")) + ("range-phrase") + ("range-units" ("repeat" "bracket" "single")) + ;; Table 15: Options for complex numbers + ("complex-root-position" ("after-number" "before-number")) + ("output-complex-root") + ("input-complex-root") + ;; Table 16: Angle options + ("angle-mode" ("input" "arc" "decimal")) + ("angle-symbol-degree") + ("angle-symbol-minute") + ("angle-symbol-over-decimal" ("true" "false")) + ("angle-symbol-second") + ("angle-separator") + ("fill-angle-degrees" ("true" "false")) + ("fill-angle-minutes" ("true" "false")) + ("fill-angle-seconds" ("true" "false")) + ("number-angle-product") + ;; Table 17: Unit creation options + ("free-standing-units" ("true" "false")) + ("overwrite-command" ("true" "false")) + ("space-before-unit" ("true" "false")) + ("unit-optional-argument" ("true" "false")) + ("use-xspace" ("true" "false")) + ;; Table 18: Unit output options + ("bracket-unit-denominator" ("true" "false")) + ("forbid-literal-units" ("true" "false")) + ("fraction-command") + ("inter-unit-product") + ("parse-units" ("true" "false")) + ("per-mode" ("power" "fraction" "symbol" + "repeated-symbol" "symbol-or-fraction")) + ("per-symbol") + ("qualifier-mode" ("subscript" "brackets" + "combine" "phrase")) + ("qualifier-phrase") + ("sticky-per" ("true" "false")) + ("unit-font-command") + ;; Table 19: Options for quantities + ("allow-number-unit-breaks" ("true" "false")) + ("extract-mass-in-kilograms" ("true" "false")) + ("prefix-mode" ("input" "combine-exponent" + "extract-exponent")) + ("quantity-product") + ("separate-uncertainty-units") + ;; Table 20: Options for tabular material + ("table-align-comparator" ("true" "false")) + ("table-align-exponent" ("true" "false")) + ("table-align-text-after" ("true" "false")) + ("table-align-text-before" ("true" "false")) + ("table-align-uncertainty" ("true" "false")) + ("table-alignment" ("center" "left" "right" "none")) + ("table-alignment-mode" ("format" "marker" "none")) + ("table-auto-round" ("true" "false")) + ("table-column-width") + ("table-fixed-width" ("true" "false")) + ("table-format") + ("table-number-alignment" ("center" "left" "right")) + ("table-text-alignment" ("center" "left" "right")) + ;; 4.13 Locale options + ("locale" ("FR" "DE" "UK" "US" "ZA"))) + "Package options for the siunitx package.") + +(defun LaTeX-siunitx-key-val-options () + "Return an updated list of key=vals from siunitx package." + (append + (when (and (or (member "xcolor" (TeX-style-list)) + (member "color" TeX-active-styles))) + (let* ((colorcmd (if (member "xcolor" TeX-active-styles) + #'LaTeX-xcolor-definecolor-list + #'LaTeX-color-definecolor-list)) + (colors (mapcar #'car (funcall colorcmd))) + (keys '("color" + "number-color" + "unit-color" + "negative-color")) + result) + (dolist (key keys result) + (push (list key colors) result)))) + LaTeX-siunitx-package-options)) + +(TeX-add-style-hook + "siunitx" + (lambda () + + (TeX-auto-add-regexp LaTeX-siunitx-regexp) + + (TeX-add-symbols + '("sisetup" (TeX-arg-key-val (LaTeX-siunitx-key-val-options))) + + ;; 3.1 Numbers + '("num" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] "Number") + '("numlist" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] "Numbers") + '("numproduct" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] "Numbers") + '("numrange" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Number 1" "Number 2") + + ;; 3.2 Angles + '("ang" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] "Angle") + + ;; 3.3 Units + ;; For 'qty' and 'units', see 8 Compatibility with other packages + '("qtylist" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Numbers" LaTeX-arg-siunitx-unit) + '("qtyproduct" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Numbers" LaTeX-arg-siunitx-unit) + '("qtyrange" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Number 1" "Number 2" LaTeX-arg-siunitx-unit) + + ;; 3.4 Complex numbers and quantities + '("complexnum" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Number") + '("complexqty" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Number" LaTeX-arg-siunitx-unit) + + ;; 3.7 Creating new macros + '("DeclareSIUnit" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + (LaTeX-arg-define-siunitx-unit) "Symbol") + + '("DeclareSIPrefix" (LaTeX-arg-define-siunitx-unit "Prefix") + "Symbol" "Powers of 10") + + '("DeclareSIPower" + (LaTeX-arg-define-siunitx-unit "Symbol before") + (LaTeX-arg-define-siunitx-unit "Symbol after") + "Power") + + '("DeclareSIQualifier" (LaTeX-arg-define-siunitx-unit "Qualifier") "Symbol") + + ;; 3.8 Tabular material + '("tablenum" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] "Number") + + ;; 5 Upgrading from version 2 + ;; The next set of macros are still available in siunitx.sty v3 + ;; but are not recommended for use in new documents. We provide + ;; them in this file anyway since they are also needed when other + ;; packages like physics or units are loaded: + '("si" [TeX-arg-key-val (LaTeX-siunitx-package-options)] LaTeX-arg-siunitx-unit) + '("SI" [TeX-arg-key-val (LaTeX-siunitx-package-options)] + "Value" ["Pre-unit"] LaTeX-arg-siunitx-unit) + '("SIlist" [TeX-arg-key-val (LaTeX-siunitx-package-options)] + "Values" LaTeX-arg-siunitx-unit) + '("SIrange" [TeX-arg-key-val (LaTeX-siunitx-package-options)] + "Value 1" "Value 2" LaTeX-arg-siunitx-unit)) + + ;; 8 Compatibility with other packages + ;; Avoid clash with other packages which define macros with the + ;; same name: + (let ((styles (TeX-style-list))) + (unless (member "physics" styles) + (TeX-add-symbols + '("qty" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + "Number" LaTeX-arg-siunitx-unit))) + (unless (member "units" styles) + (TeX-add-symbols + '("unit" [TeX-arg-key-val (LaTeX-siunitx-key-val-options)] + LaTeX-arg-siunitx-unit)))) + + ;; The unit macros + (LaTeX-add-siunitx-units + ;; Table 1: SI base units. + "ampere" + "candela" + "kelvin" + "kilogram" + "meter" + "metre" + "second" + ;; Table 2: Coherent derived units in the SI with special names + ;; and symbols + "becquerel" + ;; "celsius" + "degreeCelsius" + "coulomb" + "farad" + "gray" + "hertz" + "henry" + "joule" + "lumen" + "katal" + "lux" + "newton" + "ohm" + "pascal" + "radian" + "siemens" + "sievert" + "steradian" + "tesla" + "volt" + "watt" + "weber" + ;; Table 3: Non-SI units accepted for use with the International + ;; System of Units + "astronomicalunit" + "bel" + "dalton" + "day" + "decibel" + "degree" + "electronvolt" + "hectare" + "hour" + "liter" + "litre" + "arcminute" + "minute" + "arcsecond" + "neper" + "tonne" + ;; 3.5 The unit macros + "percent" + "square" + "squared" + "cubic" + "cubed" + "tothe" + "raiseto" + "per" + "of" + "highlight" ; Defined by siunitx.sty + ;; Table 4: SI prefixes + "yocto" + "zepto" + "atto" + "femto" + "pico" + "nano" + "micro" + "milli" + "centi" + "deci" + "deca" + "deka" + "hecto" + "kilo" + "mega" + "giga" + "tera" + "peta" + "exa" + "zetta" + "yotta") + + ;; 3.6 Unit abbreviations are always defined: + (LaTeX-add-siunitx-units + "fg" "pg" "ng" "ug" "mg" "g" "kg" + "pm" "nm" "um" "mm" "cm" "dm" "m" "km" + "as" "fs" "ps" "ns" "us" "ms" "s" + "fmol" "pmol" "nmol" "umol" "mmol" "mol" "kmol" + "pA" "nA" "uA" "mA" "A" "kA" + "ul" "ml" "l" "hl" "uL" "mL" "L" "hL" + "mHz" "Hz" "kHz" "MHz" "GHz" "THz" + "mN" "N" "kN" "MN" + "Pa" "kPa" "MPa" "GPa" + "mohm" "kohm" "Mohm" + "pV" "nV" "uV" "mV" "V" "kV" + "uW" "mW" "W" "kW" "MW" "GW" + "J" "uJ" "mJ" "kJ" + "eV" "meV" "keV" "MeV" "GeV" "TeV" "kWh" + "F" "fF" "pF" "nF" "uF" + "H" "mH" "uH" + "K" "dB" + "kibi" "mebi" "gibi" "tebi" "pebi" + "exbi" "zebi" "yobi" "bit" "byte") + + ;; \cancel is only available when cancel.sty is loaded: + (when (member "cancel" (TeX-style-list)) + (LaTeX-add-siunitx-units "cancel")) + + ;; FIXME: 'siunitx.sty' adds only one new column specification + ;; letter 'S' in v3 and 's' is removed. We keep 's' for older + ;; documents and remove it sometimes later. + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "S" "s")) + + (TeX-run-style-hooks "l3keys2e" + "array" + "amstext" + "xparse" + "expl3") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("num" "[{") + ("numlist" "[{") + ("numproduct" "[{") + ("numrange" "[{{") + ("ang" "[{") + ("qtylist" "[{{") + ("qtyrange" "[{{{") + ("complexnum" "[{") + ("complexqty" "[{") + ("DeclareSIUnit" "[|{\\{") + ("DeclareSIPrefix" "|{\\{{") + ("DeclareSIPower" "|{\\|{\\{") + ("DeclareSIQualifier" "|{\\{") + ("tablenum" "[{") + ("highlight" "{") + ("sisetup" "{") + ;; These macros are deprecated in v3 but + ;; still available: + ("si" "[{") + ("SI" "[{[{") + ("SIlist" "[{{") + ("SIrange" "[{{{")) + 'function) + (let ((styles (TeX-style-list))) + (unless (member "physics" styles) + (font-latex-add-keywords '(("qty" "[{{")) + 'function)) + (unless (member "units" styles) + (font-latex-add-keywords '(("unit" "[{")) + 'function))))) + TeX-dialect) + +(defun LaTeX-siunitx-package-options nil + "Prompt for package options for the siunitx package." + (TeX-read-key-val t (append + ;; 'table-column-type' is a preamble only: + '(("table-column-type")) + LaTeX-siunitx-package-options))) + +;; siunitx.el ends here diff --git a/elpa/auctex-13.1.3/style/siunitx.elc b/elpa/auctex-13.1.3/style/siunitx.elc Binary files differnew file mode 100644 index 0000000..0d73570 --- /dev/null +++ b/elpa/auctex-13.1.3/style/siunitx.elc diff --git a/elpa/auctex-13.1.3/style/slides.el b/elpa/auctex-13.1.3/style/slides.el new file mode 100644 index 0000000..4abd53f --- /dev/null +++ b/elpa/auctex-13.1.3/style/slides.el @@ -0,0 +1,54 @@ +;;; slides.el --- AUCTeX style for the `slides' document class -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2013, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-04-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the `slides' document class. Currently +;; the support is very limited. You are welcome to improve it. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-slides-class-options + '("a4paper" "a5paper" "b5paper" "letterpaper" "legalpaper" "executivepaper" + "landscape" "clock" "draft" "final" "titlepage" "notitlepage" "onecolumn" + "twocolumn" "leqno" "fleqn") + "Package options for the slides class.") + +(TeX-add-style-hook + "slides" + (lambda () + (LaTeX-add-environments "slide" + "overlay" + "note") + (LaTeX-add-counters "minutes" "seconds") + (LaTeX-add-pagestyles "headings" "slide" "overlay" "note") + (setq LaTeX-default-document-environment "slide")) + TeX-dialect) + +;;; slides.el ends here diff --git a/elpa/auctex-13.1.3/style/slides.elc b/elpa/auctex-13.1.3/style/slides.elc Binary files differnew file mode 100644 index 0000000..4f59be0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/slides.elc diff --git a/elpa/auctex-13.1.3/style/slovak.el b/elpa/auctex-13.1.3/style/slovak.el new file mode 100644 index 0000000..4909613 --- /dev/null +++ b/elpa/auctex-13.1.3/style/slovak.el @@ -0,0 +1,19 @@ +;;; slovak.el --- Setup AUCTeX for editing Slovak text. -*- lexical-binding: t; -*- + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-quotes + "font-latex" + (quotes)) + +(TeX-add-style-hook + "slovak" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language `("slovak" "\\uv{" "}" ,TeX-quote-after-quote))) + (when (fboundp 'font-latex-add-quotes) + (font-latex-add-quotes '("\"`" "\"'")) + (font-latex-add-quotes '("\"<" "\">" french))) + (run-hooks 'TeX-language-sk-hook)) + TeX-dialect) diff --git a/elpa/auctex-13.1.3/style/slovak.elc b/elpa/auctex-13.1.3/style/slovak.elc Binary files differnew file mode 100644 index 0000000..a506c6f --- /dev/null +++ b/elpa/auctex-13.1.3/style/slovak.elc diff --git a/elpa/auctex-13.1.3/style/sourcecodepro.el b/elpa/auctex-13.1.3/style/sourcecodepro.el new file mode 100644 index 0000000..ab1dcbb --- /dev/null +++ b/elpa/auctex-13.1.3/style/sourcecodepro.el @@ -0,0 +1,88 @@ +;;; sourcecodepro.el --- AUCTeX style for `sourcecodepro.sty' (v2.6) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-02-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `sourcecodepro.sty' (v2.6) from 2016/04/18. +;; `sourcecodepro.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "sourcecodepro" + (lambda () + + ;; Load "fontspec" with package options "opentype" or "otf": + (when (or (LaTeX-provided-package-options-member "sourcecodepro" "opentype") + (LaTeX-provided-package-options-member "sourcecodepro" "opentype=true") + (LaTeX-provided-package-options-member "sourcecodepro" "otf") + (LaTeX-provided-package-options-member "sourcecodepro" "otf=true")) + (TeX-run-style-hooks "fontspec")) + + ;; The next set of macros is only available when package "fontspec" + ;; is loaded, by this style or by user. We just check against + ;; "fontspec" and do not go through a check of `TeX-engine': + (when (member "fontspec" (TeX-style-list)) + (TeX-add-symbols + '("sourcecodepro" -1) + '("sourcecodepromedium" -1) + '("sourcecodeprolight" -1) + '("sourcecodeproextreme" -1) + '("sourcecodeprolf" -1))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup) + (member "fontspec" (TeX-style-list))) + (font-latex-add-keywords '(("sourcecodepro" "") + ("sourcecodepromedium" "") + ("sourcecodeprolight" "") + ("sourcecodeproextreme" "") + ("sourcecodeprolf" "")) + 'type-declaration))) + TeX-dialect) + +(defvar LaTeX-sourcecodepro-package-options + '("lining" "nf" "lf" + "oldstyle" "osf" + "black" "semibold" "bold" + "light" "extralight" + "regular" "medium" + "scale" "scaled" + "default" "ttdefault" "nottdefault" + "type1" "t1" + "opentype" "otf") + "Prompt for package options for the sourcecodepro package.") + +;;; sourcecodepro.el ends here diff --git a/elpa/auctex-13.1.3/style/sourcecodepro.elc b/elpa/auctex-13.1.3/style/sourcecodepro.elc Binary files differnew file mode 100644 index 0000000..94935af --- /dev/null +++ b/elpa/auctex-13.1.3/style/sourcecodepro.elc diff --git a/elpa/auctex-13.1.3/style/splitidx.el b/elpa/auctex-13.1.3/style/splitidx.el new file mode 100644 index 0000000..edf52c2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/splitidx.el @@ -0,0 +1,315 @@ +;;; splitidx.el --- AUCTeX style for `splitidx.sty' (v1.2a) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `splitidx.sty' (v1.2a) from 2013/04/09. +;; `splitidx.sty' is part of TeXLive. + +;; The main index macro provided by `splitidx.sty' is +;; +;; \sindex[<shortcut>]{<index-entry>} +;; +;; where <shortcut> identifies the target where <index-entry> is going +;; into. This style checks if RefTeX is loaded and adds "\sindex" to +;; index macros known by RefTeX; this is described in RefTeX manual +;; section 5.5 Defining Index Macros: +;; +;; (setq reftex-index-macros '(("\\sindex[]{*}" 1 ?s "" nil t))) +;; +;; To make things more user friendly, this style does not hard-code +;; the key `?s' and offers a customizable variable called +;; `LaTeX-splitidx-sindex-reftex-quick-id-key'. Customize this +;; variable to another unique key if you have other preference. Also +;; note the integer 1 after "\\sindex[]{*}". This tells RefTeX to +;; look in first optional argument to find out which index the entry +;; belongs to. If omitted, RefTeX puts the index entry into "idx". + +;; `splitidx.sty' provides also the option `idxcommands' where a +;; command with the name of the <shortcut> is defined for each +;; declared index. An example from splitidx.pdf: +;; +;; \documentclass{article} +;; \usepackage[idxcommands]{splitidx} +;; +;; \newindex[General Index]{idx} % Name and shortcut of the 1st index +;; \newindex[Index of Animals]{ani} % ... 2nd index +;; \newindex[Index of Fruits]{fru} % ... 3rd index +;; \newindex[Index of Vegetables]{veg} % ... 4th index +;; ... +;; +;; Now four index commands \idx, \ani, \fru and \veg are available. +;; This style adds these commands to AUCTeX and RefTeX (check function +;; `LaTeX-splitidx-auto-cleanup'). The only thing missing is adding +;; these commands to `reftex-index-macros' since the unique keys must +;; be set by user. To get full advantage from RefTeX, remember that +;; ?i, ?I, and ?g are reserved and set something like this in your +;; init-file: +;; +;; (add-to-list 'reftex-index-macros '("\\idx" "idx" ?x "" nil t)) +;; (add-to-list 'reftex-index-macros '("\\ani" "ani" ?a "" nil t)) +;; (add-to-list 'reftex-index-macros '("\\fru" "fru" ?f "" nil t)) +;; (add-to-list 'reftex-index-macros '("\\veg" "veg" ?v "" nil t)) +;; +;; Or you can do this in your tex file: +;; +;; %%% Local Variables: +;; %%% mode: latex +;; %%% TeX-master: t +;; %%% eval: (add-to-list 'reftex-index-macros '("\\idx" "idx" ?x "" nil t)) +;; %%% eval: (add-to-list 'reftex-index-macros '("\\ani" "ani" ?a "" nil t)) +;; %%% eval: (add-to-list 'reftex-index-macros '("\\fru" "fru" ?f "" nil t)) +;; %%% eval: (add-to-list 'reftex-index-macros '("\\veg" "veg" ?v "" nil t)) +;; %%% End: +;; + +;;; Code: + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +;; Setup parsing for \newindex: +(TeX-auto-add-type "splitidx-newindex" "LaTeX" "splitidx-newindices") + +(defvar LaTeX-splitidx-newindex-regex + `(,(concat "\\\\new\\(?:protected\\)?index" + "\\(?:\\[[^]]*\\]\\)?" + "{\\([^}]+\\)}") + 1 LaTeX-auto-splitidx-newindex) + "Matches the argument of `\\newindex' from `splitidx.sty'.") + +(defun LaTeX-splitidx-auto-prepare () + "Clear `LaTeX-auto-splitidx-newindex' before parsing." + (setq LaTeX-auto-splitidx-newindex nil)) + +(defun LaTeX-splitidx-auto-cleanup () + "Process parsed results for \"splitidx.sty\"." + (when (LaTeX-provided-package-options-member "splitidx" "idxcommands") + (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list))) + ;; Make every element available as a command + (TeX-add-symbols `(,elt TeX-arg-index)) + ;; Add new macros's to `ispell-tex-skip-alist': skip one argument + (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end))) + ;; font-locking + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,elt "{")) + 'reference)) + ;; Prepare for parsing + (add-to-list 'LaTeX-auto-regexp-list + `(,(concat + "\\\\" + elt + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*}[^}{]*\\)*\\)}") + 1 LaTeX-auto-index-entry)) + ;; Cater for completion + (add-to-list 'TeX-complete-list + `(,(concat "\\\\" elt "{\\([^{}\n\r]*\\)") + 1 LaTeX-index-entry-list "}")) ))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-splitidx-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-splitidx-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "splitidx" + (lambda () + + (TeX-add-symbols + + ;; 3.1 Setup + '("newindex" + [ "Index name" ] + (TeX-arg-eval + (lambda () + (let ((shortcut (TeX-read-string + (TeX-argument-prompt nil nil "Short cut")))) + (LaTeX-add-splitidx-newindices shortcut) + (format "%s" shortcut))))) + + ;; 3.2 Marking up index entries + '("sindex" + ;; I don't use `[ TeX-arg-index-tag ]' here + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Short cut") + (LaTeX-splitidx-newindex-list) ] + TeX-arg-index) + + ;; 3.4 Customizing index entries + '("AtWriteToIndex" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Short cut") + (LaTeX-splitidx-newindex-list)) + t) + + '("AtNextWriteToIndex" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Short cut") + (LaTeX-splitidx-newindex-list)) + t) + + ;; 3.6 Preventing premature expansion of index entries + '("newprotectedindex" + [ "Index name" ] + (TeX-arg-eval + (lambda () + (let ((shortcut (TeX-read-string + (TeX-argument-prompt nil nil "Short cut")))) + (LaTeX-add-splitidx-newindices shortcut) + (format "%s" shortcut))))) + + ;; 3.7 Including the generated indices in your document + '("printindex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Short cut") + (LaTeX-splitidx-newindex-list) ] + [ "Index name" ]) + + '("printindex*" 0) + + '("printsubindex" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Short cut") + (LaTeX-splitidx-newindex-list) ] + [ "Index name" ]) + + '("printsubindex*" 0) + + '("setindexpreamble" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Short cut") + (LaTeX-splitidx-newindex-list) ] + t) + + '("useindexpreamble" [ TeX-arg-macro ]) + + '("indexshortcut" 0) + + '("extendtheindex" 4) ) + + ;; Add splitidx to the parser. + (TeX-auto-add-regexp LaTeX-splitidx-newindex-regex) + + ;; Borrowed from index.el + (add-to-list 'LaTeX-auto-regexp-list + `(,(concat "\\\\sindex\\(?:\\[[^{}]*\\]\\)?" + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*}[^}{]*\\)*\\)}") + 1 LaTeX-auto-index-entry)) + + ;; Completion for \sindex entries + (add-to-list 'TeX-complete-list + '("\\\\sindex\\(\\[[^][{}]*\\]\\)?{\\([^{}\n\r]*\\)" + 2 LaTeX-index-entry-list "}")) + + ;; Completion for the |see macro + (add-to-list 'TeX-complete-list + '("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list)) + + ;; Tell RefTeX with `reftex-add-index-macros' + (when (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros + `(("\\sindex[]{*}" 1 ,LaTeX-splitidx-sindex-reftex-quick-id-key "" nil t)))) + + ;; 3.2 Marking up index entries + ;; \index should be an alias for \sindex + (when (LaTeX-provided-package-options-member "splitidx" "useindex") + (TeX-add-symbols + '("index" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Short cut") + (LaTeX-splitidx-newindex-list) ] + (TeX-arg-index))) + ;; Tell RefTeX to look in the optional arg. for the index short cut + (when (fboundp 'reftex-add-index-macros) + (reftex-add-index-macros '(("\\index[]{*}" 1 ?i "" nil t)))) + (add-to-list 'LaTeX-auto-regexp-list + `(,(concat + "\\\\index\\(?:\\[[^{}]*\\]\\)?" + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*}[^}{]*\\)*\\)}") + 1 LaTeX-auto-index-entry)) + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("index" "[{")) + 'reference))) + + ;; 3.5 Automatic custom index commands + ;; With package option `idxcommands', one can write \foo{<entry>} + ;; instead of \sindex[foo]{<entry>} + (when (and (LaTeX-provided-package-options-member "splitidx" "idxcommands") + (LaTeX-splitidx-newindex-list)) + (dolist (elt (mapcar #'car (LaTeX-splitidx-newindex-list))) + ;; Make every `foo' available as a command + (TeX-add-symbols `(,elt TeX-arg-index)) + ;; Add new macros's to `ispell-tex-skip-alist': skip one argument + (TeX-ispell-skip-setcar `((,elt ispell-tex-arg-end))) + ;; Cater for font-locking + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords `((,elt "{")) + 'reference)) + ;; Add defined <entry> to `LaTeX-index-entry-list' + (add-to-list 'LaTeX-auto-regexp-list + `(,(concat + "\\\\" + elt + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*}[^}{]*\\)*\\)}") + 1 LaTeX-auto-index-entry)) )) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newindex" "[{") + ("AtWriteToIndex" "{{") + ("AtNextWriteToIndex" "{{") + ("newprotectedindex" "[{") + ("setindexpreamble" "[{") + ("useindexpreamble" "[") + ("extendtheindex" "{{{{")) + 'function) + (font-latex-add-keywords '(("sindex" "[{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-splitidx-package-options + '("makeindex" + "useindex" + "allintoone" + "split" + "protected" + "idxcommands") + "Prompt for package options for the splitidx package.") + +;;; splitidx.el ends here diff --git a/elpa/auctex-13.1.3/style/splitidx.elc b/elpa/auctex-13.1.3/style/splitidx.elc Binary files differnew file mode 100644 index 0000000..ea1de12 --- /dev/null +++ b/elpa/auctex-13.1.3/style/splitidx.elc diff --git a/elpa/auctex-13.1.3/style/stabular.el b/elpa/auctex-13.1.3/style/stabular.el new file mode 100644 index 0000000..4b4eb96 --- /dev/null +++ b/elpa/auctex-13.1.3/style/stabular.el @@ -0,0 +1,74 @@ +;;; stabular.el --- AUCTeX style for `stabular.sty' (v2.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `stabular.sty' (v2.1) from 2021/10/04. +;; `stabular.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "stabular" + (lambda () + + ;; Load array.el if the package option is given: + (when (LaTeX-provided-package-options-member "stabular" "array") + (TeX-run-style-hooks "array")) + + ;; Add the environments provided by the package: + (LaTeX-add-environments + '("stabular" LaTeX-env-array) + '("stabular*" LaTeX-env-tabular*)) + + ;; Use the enhanced tabular indentation. Append to + ;; `LaTeX-indent-environment-list' in order not to override custom + ;; settings. + (make-local-variable 'LaTeX-indent-environment-list) + (add-to-list 'LaTeX-indent-environment-list + '("stabular" LaTeX-indent-tabular) + t) + (add-to-list 'LaTeX-indent-environment-list + '("stabular*" LaTeX-indent-tabular) + t) + + ;; Append the environments to `LaTeX-item-list': + (add-to-list 'LaTeX-item-list + '("stabular" . LaTeX-item-array) + t) + (add-to-list 'LaTeX-item-list + '("stabular*" . LaTeX-item-tabular*) + t)) + + TeX-dialect) + +(defvar LaTeX-stabular-package-options '("array") + "Package options for the stabular package.") + +;;; stabular.el ends here diff --git a/elpa/auctex-13.1.3/style/stabular.elc b/elpa/auctex-13.1.3/style/stabular.elc Binary files differnew file mode 100644 index 0000000..a9bc24d --- /dev/null +++ b/elpa/auctex-13.1.3/style/stabular.elc diff --git a/elpa/auctex-13.1.3/style/stfloats.el b/elpa/auctex-13.1.3/style/stfloats.el new file mode 100644 index 0000000..9e80bbf --- /dev/null +++ b/elpa/auctex-13.1.3/style/stfloats.el @@ -0,0 +1,65 @@ +;;; stfloats.el --- AUCTeX style for `stfloats.sty' (v3.3d) -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-12-11 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `stfloats.sty' (v3.3d) from 2017/03/27. +;; `stfloats.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "stfloats" + (lambda () + + ;; New symbols + (TeX-add-symbols + "fnbelowfloat" + "fnunderfloat" + "setbaselinefloat" + "setbaselinefixed") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("fnbelowfloat" "") + ("fnunderfloat" "") + ("setbaselinefloat" "") + ("setbaselinefixed" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-stfloats-package-options nil + "Package options for the stfloats package.") + +;;; stfloats.el ends here diff --git a/elpa/auctex-13.1.3/style/stfloats.elc b/elpa/auctex-13.1.3/style/stfloats.elc Binary files differnew file mode 100644 index 0000000..36af473 --- /dev/null +++ b/elpa/auctex-13.1.3/style/stfloats.elc diff --git a/elpa/auctex-13.1.3/style/subcaption.el b/elpa/auctex-13.1.3/style/subcaption.el new file mode 100644 index 0000000..cd3312d --- /dev/null +++ b/elpa/auctex-13.1.3/style/subcaption.el @@ -0,0 +1,205 @@ +;;; subcaption.el --- AUCTeX style for `subcaption.sty' (v1.3) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `subcaption.sty' (v1.3) from 2019-08-31. +;; `subcaption.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(defvar LaTeX-caption-key-val-options) + +(defvar LaTeX-subcaption-key-val-options + '(("subrefformat" ("default" "empty" "simple" "brace" "parens"))) + "Key=value options for subcaption package. +This key takes the same values as \"labelformat\" from caption +package.") + +(defun LaTeX-arg-subcaption-subcaption (optional &optional star) + "Query for the arguments of \"\\subcaption\" incl. a label and insert them. +If OPTIONAL is non-nil, indicate it while reading the caption. +If STAR is non-nil, then do not query for a \\label and a short +caption, insert only a caption." + (let* (;; \subcaption needs an environment, "minipage" will be + ;; popular. If so, check next higher environment to find out + ;; where we are + (currenv (if (string= (LaTeX-current-environment) "minipage") + (LaTeX-current-environment 2) + (LaTeX-current-environment))) + (caption (TeX-read-string + (TeX-argument-prompt optional nil "Sub-caption"))) + (short-caption + (when (and (not star) + (>= (length caption) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t nil "Short caption"))))) + (indent-according-to-mode) + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption TeX-grcl) + ;; Fill the \subcaption paragraph before inserting the \label: + (when auto-fill-function (LaTeX-fill-paragraph)) + (when (and (not star) + (save-excursion (LaTeX-label currenv 'environment))) + ;; Move \label into next line if we have one: + (LaTeX-newline) + (indent-according-to-mode) + (end-of-line)))) + +(defun LaTeX-arg-subcaption-subcaptionbox (optional &optional star) + "Query for the arguments of \"\\subcaptionbox\" incl. a label and insert them. +If OPTIONAL is non-nil, indicate it while reading the caption. +If STAR is non-nil, then do not query for a \\label and a short +caption, insert only a caption." + (let* ((currenv (LaTeX-current-environment)) + (caption (TeX-read-string + (TeX-argument-prompt optional nil "Sub-caption"))) + (short-caption + (when (and (not star) + (>= (length caption) LaTeX-short-caption-prompt-length)) + (TeX-read-string + (TeX-argument-prompt t nil "Short Sub-caption"))))) + (indent-according-to-mode) + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption) + (unless star (LaTeX-label currenv 'environment)) + (insert TeX-grcl)) + (let* ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]") + (width (completing-read (TeX-argument-prompt t nil "Width") + (mapcar (lambda (elt) (concat TeX-esc (car elt))) + (LaTeX-length-list)))) + (inpos (if (and width (not (string-equal width ""))) + (completing-read (TeX-argument-prompt t nil "Inner position") + '("c" "l" "r" "s")) + ""))) + (TeX-argument-insert width t) + (TeX-argument-insert inpos t)) + ;; Fill the paragraph before inserting {}. We use this function + ;; since we add \subcaption to `paragraph-start' in the style hook + ;; below. + (when auto-fill-function (LaTeX-fill-paragraph))) + +(TeX-add-style-hook + "subcaption" + (lambda () + ;; Run style hook for caption.el + (TeX-run-style-hooks "caption") + + + (TeX-add-symbols + ;; Basic commands + '("subcaption" (LaTeX-arg-subcaption-subcaption)) + '("subcaption*" (LaTeX-arg-subcaption-subcaption t) ) + '("subcaptionbox" (LaTeX-arg-subcaption-subcaptionbox) t) + '("subcaptionbox*" (LaTeX-arg-subcaption-subcaptionbox t) t) + '("subref" TeX-arg-ref) + ;; \subref* is only available with hyperref.sty loaded, we don't + ;; check if hyperref.el is loaded and make it available directly. + '("subref*" TeX-arg-ref) + '("phantomcaption" 0) + '("phantomsubcaption" 0) + '("subfloat" [ "List entry" ] [ "Sub-caption" ] t)) + + ;; The next 2 macros are part of the kernel of caption.sty, but we + ;; load them within subcaption.el. + (TeX-add-symbols + '("DeclareCaptionSubType" + [TeX-arg-eval + completing-read (TeX-argument-prompt t nil "Numbering scheme") + '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")] + (TeX-arg-eval + completing-read + (TeX-argument-prompt nil nil "Type") + (append + (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list) + (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + '("figure" "table")))) + + '("DeclareCaptionSubType*" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Numbering scheme") + '("arabic" "roman" "Roman" "alph" "Alph" "fnsymbol")] + (TeX-arg-eval + completing-read + (TeX-argument-prompt nil nil "Type") + (append + (when (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list) + (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + '("figure" "table"))))) + + ;; \subcaption(box)? and \subfloat macros should get their own lines + (LaTeX-paragraph-commands-add-locally + '("subcaption" "subcaptionbox" "subfloat")) + + ;; The subfigure & subtable environments + (LaTeX-add-environments + '("subfigure" LaTeX-env-minipage) + '("subtable" LaTeX-env-minipage)) + + ;; Append them to `LaTeX-label-alist': + (add-to-list 'LaTeX-label-alist '("subfigure" . LaTeX-figure-label) t) + (add-to-list 'LaTeX-label-alist '("subtable" . LaTeX-table-label) t) + + ;; Introduce env's to RefTeX if loaded + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + `(("subfigure" ?f ,LaTeX-figure-label "~\\ref{%s}" caption) + ("subtable" ?t ,LaTeX-table-label "~\\ref{%s}" caption)))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subcaption" "*[{") + ("subcaptionbox" "*[{[[") + ("phantomcaption" "") + ("phantomsubcaption" "") + ("subfloat" "[[")) + 'textual) + (font-latex-add-keywords '(("subref" "*{")) + 'reference) + (font-latex-add-keywords '(("DeclareCaptionSubType" "*[{")) + 'function)) ) + TeX-dialect) + +(defun LaTeX-subcaption-package-options () + "Prompt for package options for the subcaption package." + (TeX-load-style "caption") + (TeX-read-key-val t (append LaTeX-subcaption-key-val-options + LaTeX-caption-key-val-options))) + +;;; subcaption.el ends here diff --git a/elpa/auctex-13.1.3/style/subcaption.elc b/elpa/auctex-13.1.3/style/subcaption.elc Binary files differnew file mode 100644 index 0000000..18e28d3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/subcaption.elc diff --git a/elpa/auctex-13.1.3/style/subfigure.el b/elpa/auctex-13.1.3/style/subfigure.el new file mode 100644 index 0000000..181b17c --- /dev/null +++ b/elpa/auctex-13.1.3/style/subfigure.el @@ -0,0 +1,87 @@ +;;; subfigure.el --- AUCTeX style file for subfigure.sty -*- lexical-binding: t; -*- + +;; Copyright (C) 2003, 2005, 2013, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Reiner Steib <Reiner.Steib@gmx.de> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; AUCTeX style file for `subfigure.sty' + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "subfigure" + (lambda () + (TeX-add-symbols + '("subfigure" [ "List entry" ] [ "Sub caption" ] "Figure") + '("subtable" [ "List entry" ] [ "Sub caption" ] "Figure") + '("Subref" TeX-arg-ref) + '("subref" TeX-arg-ref) + '("subcapsize" 0) + '("subcapfont" 0) + '("subcaplabelfont" 0)) + + (LaTeX-add-lengths "subfigtopskip" "subfigcapskip" "subfigcaptopadj" + "subfigbottomskip" "subfigcapmargin" "subfiglabelskip") + + ;; Install completion for labels: + (setq TeX-complete-list + (append + '(("\\\\[Ss]ubref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")) + TeX-complete-list)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subfigure" "[[{") + ("subtable" "[[{")) + 'textual) + (font-latex-add-keywords '(("Subref" "{") + ("subref" "{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-subfigure-package-options '("normal" "hang" "center" + "centerlast" "nooneline" + "raggedright" "isu" "anne" + "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "rm" "sf" "tt" "md" + "bf" "up" "it" "sl" "sc" "RM" + "SF" "TT" "MD" "BF" "IT" "SL" + "SC" "UP" "figbotcap" + "figtopcap" "tabbotcap" + "tabtopcap" "FIGBOTCAP" + "FIGTOPCAP" "TABBOTCAP" + "TABTOPCAP" "loose" "tight") + "Package options for the subfigure package.") + +;;; subfigure.el ends here diff --git a/elpa/auctex-13.1.3/style/subfigure.elc b/elpa/auctex-13.1.3/style/subfigure.elc Binary files differnew file mode 100644 index 0000000..621661a --- /dev/null +++ b/elpa/auctex-13.1.3/style/subfigure.elc diff --git a/elpa/auctex-13.1.3/style/subfiles.el b/elpa/auctex-13.1.3/style/subfiles.el new file mode 100644 index 0000000..49df08c --- /dev/null +++ b/elpa/auctex-13.1.3/style/subfiles.el @@ -0,0 +1,107 @@ +;;; subfiles.el --- AUCTeX style for the subfiles package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Uwe Brauer <oub@mat.ucm.es> +;; Created: 07 Nov 2016 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;; Acknowledgements +;; Mosè Giordano <mose@gnu.org> +;; Arash Esbati <arash@gnu.org> + +;;; Commentary: + +;; This file adds support for the subfiles package. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function reftex-compile-variables + "reftex" + ()) + +(defvar LaTeX-subfiles-package-options nil + "Package options for the subfiles package.") + +(defun LaTeX-subfiles-class-options () + "Return name of the main file relative to current subfile." + (file-relative-name + (read-file-name + "Main file: " nil nil nil nil + (lambda (texfiles) + (string-match "\\.tex\\'" texfiles))) + (TeX-master-directory))) + +(TeX-add-style-hook + "subfiles" + (lambda () + + ;; The following code will run `TeX-run-style-hooks' on the subfile + ;; master file. Thanks to Mosè Giordano <mose@gnu.org> for + ;; presenting a better solution using `assoc'. + (let ((master-file (cadr (assoc "subfiles" LaTeX-provided-class-options)))) + (when (stringp master-file) + (TeX-run-style-hooks + (file-name-sans-extension master-file)))) + + (TeX-add-symbols + '("subfile" TeX-arg-file) + '("subfileinclude" TeX-arg-file)) + + ;; Ensure that \subfile and \subfileinclude stay in one line + (LaTeX-paragraph-commands-add-locally '("subfile" "subfileinclude")) + + ;; Tell AUCTeX that \subfile loads a file. regexp is the same as + ;; for \input or \include. This will run `TeX-run-style-hooks' on + ;; subfile(s) when master file is loaded. + (TeX-auto-add-regexp + `(,(concat + "\\\\subfile\\(?:include\\)?" + "{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}") + 1 TeX-auto-file)) + + ;; Tell RefTeX the same thing. + (when (and (boundp 'reftex-include-file-commands) + (not (string-match "subfile" + (mapconcat #'identity + reftex-include-file-commands + "|")))) + (make-local-variable 'reftex-include-file-commands) + (add-to-list 'reftex-include-file-commands "subfile\\(?:include\\)?" t) + (reftex-compile-variables)) + + ;; The following code will fontify \subfile{} and + ;; \subfileinclude{} like \input. + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subfile" "{") + ("subfileinclude" "{")) + 'reference))) + TeX-dialect) + +;;; subfiles.el ends here diff --git a/elpa/auctex-13.1.3/style/subfiles.elc b/elpa/auctex-13.1.3/style/subfiles.elc Binary files differnew file mode 100644 index 0000000..fada17f --- /dev/null +++ b/elpa/auctex-13.1.3/style/subfiles.elc diff --git a/elpa/auctex-13.1.3/style/swedish.el b/elpa/auctex-13.1.3/style/swedish.el new file mode 100644 index 0000000..120e67a --- /dev/null +++ b/elpa/auctex-13.1.3/style/swedish.el @@ -0,0 +1,18 @@ +;;; swedish.el --- Setup AUCTeX for editing Swedish text. -*- lexical-binding: t; -*- + +;;; Commentary: +;; +;; Apparently the Swedes use ''this style'' quotations. + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "swedish" + (lambda () + (unless (eq (car TeX-quote-language) 'override) + (setq TeX-quote-language + `("swedish" "''" ,TeX-close-quote ,TeX-quote-after-quote))) + (setq LaTeX-babel-hyphen-language "swedish") + (run-hooks 'TeX-language-sv-hook)) + TeX-dialect) diff --git a/elpa/auctex-13.1.3/style/swedish.elc b/elpa/auctex-13.1.3/style/swedish.elc Binary files differnew file mode 100644 index 0000000..b901103 --- /dev/null +++ b/elpa/auctex-13.1.3/style/swedish.elc diff --git a/elpa/auctex-13.1.3/style/tabularx.el b/elpa/auctex-13.1.3/style/tabularx.el new file mode 100644 index 0000000..970f698 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tabularx.el @@ -0,0 +1,73 @@ +;;; tabularx.el --- AUCTeX style for the tabularx package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2009, 2013-2016, 2020 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2009-02-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the tabularx package. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-tabularx-package-options + '("infoshow" "debugshow") + "Package options for the tabularx package.") + +(TeX-add-style-hook + "tabularx" + (lambda () + ;; Make tabularx the default tabular environment + (setq LaTeX-default-tabular-environment "tabularx") + ;; Use the enhanced tabular indentation. Append to + ;; `LaTeX-indent-environment-list' in order not to override custom settings. + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("tabularx" LaTeX-indent-tabular) t) + + ;; Append tabularx to `LaTeX-item-list' with `LaTeX-item-tabular*' + (add-to-list 'LaTeX-item-list '("tabularx" . LaTeX-item-tabular*) t) + + ;; New symbols + (TeX-add-symbols + "tracingtabularx" + '("tabularxcolumn" 0)) + ;; New environments + (LaTeX-add-environments + ;; XXX: The tabularx environment takes the same arguments as the + ;; tabular* environment. However, the supported tokens in the + ;; format can differ, so at some point in time we might want to + ;; separate tabular* and tabularx. + '("tabularx" LaTeX-env-tabular*)) + + ;; `tabularx' requires array to define the column types + (TeX-run-style-hooks "array") + + ;; `tabularx.sty' adds one new column specification letter. + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "X"))) + TeX-dialect) + +;;; tabularx.el ends here diff --git a/elpa/auctex-13.1.3/style/tabularx.elc b/elpa/auctex-13.1.3/style/tabularx.elc Binary files differnew file mode 100644 index 0000000..1a68144 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tabularx.elc diff --git a/elpa/auctex-13.1.3/style/tabulary.el b/elpa/auctex-13.1.3/style/tabulary.el new file mode 100644 index 0000000..6b309e0 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tabulary.el @@ -0,0 +1,73 @@ +;;; tabulary.el --- AUCTeX style for the tabulary package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013-2016, 2020, 2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2013-07-14 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for the tabulary package. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-tabulary-package-options + '("debugshow") + "Package options for the tabulary package.") + +(TeX-add-style-hook + "tabulary" + (lambda () + ;; Make tabulary the default tabular environment + (setq LaTeX-default-tabular-environment "tabulary") + + ;; Use the enhanced tabular indentation. Append to + ;; `LaTeX-indent-environment-list' in order not to override custom + ;; settings. + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("tabulary" LaTeX-indent-tabular) + t) + + ;; Append tabulary to `LaTeX-item-list' with `LaTeX-item-tabular*' + (add-to-list 'LaTeX-item-list '("tabulary" . LaTeX-item-tabular*) t) + + ;; New symbols + (TeX-add-symbols + "tymax" "tymin" "tyformat") + ;; New environments + (LaTeX-add-environments + ;; TODO: tabulary defines some new column types, but there is no completion + ;; so far in `LaTeX-env-tabular*' + '("tabulary" LaTeX-env-tabular*)) + + ;; `tabulary' requires the array package + (TeX-run-style-hooks "array") + + ;; `tabulary.sty' adds some new column specification letters. + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "L" "C" "R" "J"))) + TeX-dialect) + +;;; tabulary.el ends here diff --git a/elpa/auctex-13.1.3/style/tabulary.elc b/elpa/auctex-13.1.3/style/tabulary.elc Binary files differnew file mode 100644 index 0000000..45ef5b5 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tabulary.elc diff --git a/elpa/auctex-13.1.3/style/tarticle.el b/elpa/auctex-13.1.3/style/tarticle.el new file mode 100644 index 0000000..c4381d3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tarticle.el @@ -0,0 +1,45 @@ +;;; tarticle.el - Special code for tarticle class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Ikumi Keita <ikumi@ikumi.que.jp> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-03-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Please write me. + +;;; Code: + +(require 'tex) + +(TeX-load-style "jarticle") +(defvar LaTeX-tarticle-class-options LaTeX-jarticle-class-options + "Class options for the tarticle class.") + +(TeX-add-style-hook + "tarticle" + (lambda () + (TeX-run-style-hooks "jarticle" "plext")) + TeX-dialect) + +;;; tarticle.el ends here diff --git a/elpa/auctex-13.1.3/style/tarticle.elc b/elpa/auctex-13.1.3/style/tarticle.elc Binary files differnew file mode 100644 index 0000000..362b4cd --- /dev/null +++ b/elpa/auctex-13.1.3/style/tarticle.elc diff --git a/elpa/auctex-13.1.3/style/tbook.el b/elpa/auctex-13.1.3/style/tbook.el new file mode 100644 index 0000000..6b36056 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tbook.el @@ -0,0 +1,45 @@ +;;; tbook.el - Special code for tbook class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Ikumi Keita <ikumi@ikumi.que.jp> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-03-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Please write me. + +;;; Code: + +(require 'tex) + +(TeX-load-style "jbook") +(defvar LaTeX-tbook-class-options LaTeX-jbook-class-options + "Class options for the tbook class.") + +(TeX-add-style-hook + "tbook" + (lambda () + (TeX-run-style-hooks "jbook" "plext")) + TeX-dialect) + +;;; tbook.el ends here diff --git a/elpa/auctex-13.1.3/style/tbook.elc b/elpa/auctex-13.1.3/style/tbook.elc Binary files differnew file mode 100644 index 0000000..4419afe --- /dev/null +++ b/elpa/auctex-13.1.3/style/tbook.elc diff --git a/elpa/auctex-13.1.3/style/tcolorbox.el b/elpa/auctex-13.1.3/style/tcolorbox.el new file mode 100644 index 0000000..5ba44bb --- /dev/null +++ b/elpa/auctex-13.1.3/style/tcolorbox.el @@ -0,0 +1,714 @@ +;;; tcolorbox.el --- AUCTeX style for `tcolorbox.sty' (v4.00) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015--2021 Free Software Foundation, Inc. + +;; Author: Tassilo Horn <tsdh@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-01-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `tcolorbox.sty' (v4.00) from 2017/02/16. + +;; This style file adds support for core macros and environments and +;; their options provided by `tcolorbox.sty'. Macros and environments +;; provided by libraries should go in their own style files where the +;; file is prefixed with `tcolorboxlib-', +;; e.g. `tcolorboxlib-raster.el'. + +;; Libraries should also prepend a symbol containing their key=val +;; options to the variable `LaTeX-tcolorbox-keyval-options-full'. +;; This variable is used by the function of the same name called when +;; inserting `\tcbset' macro. + +;;; Code: + +;; Needed for compiling `cl-pushnew': +(eval-when-compile + (require 'cl-lib)) + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +;; FIXME: Anything missing? +(defvar LaTeX-tcolorbox-keyval-options + '(;; 4.1 Title + ("title") + ("notitle") + ("adjusted title") + ("adjust text") + ("squeezed title") + ("squeezed title*") + ("detach title") + ("attach title") + ("attach title to upper") + ;; 4.2 Subtitle + ("subtitle style") + ;; 4.3 Upper Part + ("upperbox" ("visible" "invisible")) + ("visible") + ("invisible") + ("saveto") + ;; 4.4 Lower Part + ("lowerbox" ("visible" "invisible" "ignored")) + ("savelowerto") + ("lower separated" ("true" "false")) + ("savedelimiter") + ;; 4.5 Colors and Fonts + ("colframe") + ("colback") + ("title filled" ("true" "false")) + ("colbacktitle") + ("colupper") + ("collower") + ("coltext") + ("coltitle") + ("fontupper" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" "\\bfseries" + "\\upshape" "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont")) + ("fontlower" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" "\\bfseries" + "\\upshape" "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont")) + ("fonttitle" ("\\rmfamily" "\\sffamily" "\\ttfamily" "\\mdseries" "\\bfseries" + "\\upshape" "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" "\\normalfont")) + ;; 4.6 Text Alignment + ("halign" ("justify" "left" "flush left" "right" + "flush right" "center" "flush center")) + ("halign lower" ("justify" "left" "flush left" "right" + "flush right" "center" "flush center")) + ("halign title" ("justify" "left" "flush left" "right" + "flush right" "center" "flush center")) + ("flushleft upper") + ("center upper") + ("flushright upper") + ("flushleft lower") + ("center lower") + ("flushright lower") + ("flushleft title") + ("center title") + ("flushright title") + ("valign" ("top" "center" "bottom" "scale" "scale*")) + ("valign upper" ("top" "center" "bottom" "scale" "scale*")) + ("valign lower" ("top" "center" "bottom" "scale" "scale*")) + ("valign scale limit") + ;; 4.7 Geometry: + ;; 4.7.1 Width + ("width") + ("text width") + ("add to width") + ;; 4.7.2 Rules + ("toprule") + ("bottomrule") + ("leftrule") + ("rightrule") + ("titlerule") + ("boxrule") + ;; 4.7.3 Arcs + ("arc") + ("circular arc") + ("bean arc") + ("octogon arc") + ("arc is angular") + ("arc is curved") + ("outer arc") + ("auto outer arc") + ;; 4.7.4 Spacing + ("boxsep") + ("left") + ("left*") + ("lefttitle") + ("leftupper") + ("leftlower") + ("right") + ("right*") + ("righttitle") + ("rightupper") + ("rightlower") + ("top") + ("toptitle") + ("bottom") + ("bottomtitle") + ("middle") + ;; 4.7.5 Size Shortcuts + ("size" ("normal" "title" "small" "fbox" "tight" "minimal")) + ("oversize") + ("toggle left and right" ("none" "forced" "evenpage")) + ;; 4.8 Corners + ("sharp corners" ("northwest" "northeast" "southwest" "southeast" + "north" "south" "east" "west" "downhill" "uphill" "all")) + ("rounded corners" ("northwest" "northeast" "southwest" "southeast" + "north" "south" "east" "west" "downhill" "uphill" "all")) + ("sharpish corners") + ;; 4.9 Transparency + ("opacityframe") + ("opacityback") + ("opacitybacktitle") + ("opacityfill") + ("opacityupper") + ("opacitylower") + ("opacitytext") + ("opacitytitle") + ;; 4.10 Height Control + ("natural height") + ("height") + ("height plus") + ("height from") + ("text height") + ("add to height") + ("add to natural height") + ("height fill" ("true" "false" "maximum")) + ("square") + ("space") + ("space to upper") + ("space to lower") + ("space to both") + ("space to") + ("split") + ("equal height group") + ("minimum for equal height group") + ("minimum for current equal height group") + ("use height from group") + ;; 4.11 Box Content Additions + ("before title") + ("after title") + ("before upper") + ("after upper") + ("after upper*") + ("before lower") + ("after lower") + ("after lower*") + ("text fill") + ("tabularx") + ("tabularx*") + ("tikz upper") + ("tikz lower") + ("tikznode upper") + ("tikznode lower") + ("tikznode") + ("varwidth upper") + ;; 4.12 Overlays + ("overlay") + ("no overlay") + ("overlay broken") + ("overlay unbroken") + ("overlay first") + ("overlay middle") + ("overlay last") + ("overlay unbroken and first") + ("overlay middle and last") + ("overlay unbroken and last") + ("overlay first and middle") + ;; 4.13 Floating Objects + ("floatplacement" ("htbp" "t" "b" "h" "p")) + ("float" ("htbp" "t" "b" "h" "p")) + ("float*" ("htbp" "t" "b" "h" "p")) + ("nofloat") + ("every float" ("\\centering" "\\raggedleft" "\\raggedright")) + ;; 4.14 Embedding into the Surroundings + ("before") + ("after") + ("parskip") + ("noparskip") + ("autoparskip") + ("nobeforeafter") + ("forces nobeforeafter") + ("baseline") + ("box align" ("bottom" "top" "center" "base" )) + ("before skip") + ("after skip") + ("beforeafter skip") + ("left skip") + ("right skip") + ("leftright skip") + ("ignore nobreak" ("true" "false")) + ("before nobreak") + ;; 4.15 Bounding Box + ("enlarge top initially by") + ("enlarge bottom finally by") + ("enlarge top at break by") + ("enlarge bottom at break by") + ("enlarge top by") + ("enlarge bottom by") + ("enlarge left by") + ("enlarge right by") + ("enlarge by") + ("flush left") + ("flush right") + ("center") + ("grow to left by") + ("grow to right by") + ("toggle enlargement" ("none" "forced" "evenpage")) + ("spread inwards") + ("spread outwards") + ("move upwards") + ("move upwards*") + ;; FIXME: This one should be added w/ `breakable' lib: + ;; ("fill downwards") + ("spread upwards") + ("spread upwards*") + ("spread sidewards") + ("spread") + ("spread downwards") + ("shrink tight") + ("extrude left by") + ("extrude right by") + ("extrude top by") + ("extrude bottom by") + ("extrude by") + ;; 4.16 Layered Boxes and Every Box Settings + ("every box") + ("every box on layer 1") + ("every box on layer 2") + ("every box on layer 3") + ("every box on layer 4") + ("every box on higher layers") + ;; 4.17 Capture Mode + ("capture" ("minipage" "hbox" "fitbox")) + ("hbox") + ("minipage") + ;; 4.18 Text Characteristics + ("parbox" ("true" "false")) + ("hyphenationfix" ("true" "false")) + ;; 4.19 Files + ("tempfile") + ;; 4.21 Counters, Labels, and References + ("phantom") + ("nophantom") + ("label") + ("phantomlabel") + ;; FIXME: Are these types documented somewhere in cleveref.pdf? + ("label type") + ("no label type") + ("step") + ("step and label") + ("list entry") + ("list text") + ("add to list") + ("nameref") + ;; 4.22 Even and Odd Pages + ("check odd page" ("true" "false")) + ("if odd page") + ("if odd page or oneside") + ;; FIXME: These two should be added w/ `breakable' lib: + ;; ("if odd page*") + ;; ("if odd page or oneside*") + ;; 4.24 Miscellaneous + ("reset") + ("only") + ("code") + ("void") + ;; 6 Side by Side + ("sidebyside" ("true" "false")) + ("sidebyside align" ("center" "top" "bottom" "center seam" + "top seam" "bottom seam")) + ("sidebyside gap") + ("lefthand width") + ("righthand width") + ("lefthand ratio") + ("righthand ratio") + ;; 8 Recording options + ("record") + ("no recording")) + "Key=value options for tcolorbox macros and environments.") + +(defun LaTeX-tcolorbox-keyval-options () + "Return an updated list of key=vals from tcolorbox package." + (append + ;; This style runs `xcolor.el', so we use + ;; `LaTeX-xcolor-definecolor-list' right away: + (let ((colors (mapcar #'car (LaTeX-xcolor-definecolor-list))) + (keys '("colframe" + "colback" + "colbacktitle" + "colupper" + "collower" + "coltext" + "coltitle")) + result) + (dolist (key keys result) + (cl-pushnew (list key colors) result :test #'equal))) + LaTeX-tcolorbox-keyval-options)) + +(defvar LaTeX-tcolorbox-keyval-options-full + '(LaTeX-tcolorbox-keyval-options) + "Buffer-local list of symbols containing key=val options. +tcolorbox libraries should add their key=val options to this +list. Key=val options might be a variable or a function. This +variable is initialized with the function +`LaTeX-tcolorbox-keyval-options'. Please add entries on top of +this list so that this item always comes last.") +(make-variable-buffer-local 'LaTeX-tcolorbox-keyval-options-full) + +(defun LaTeX-tcolorbox-keyval-options-full () + "Return an updated list of full key=vals for tcolorbox and libraries. +Each symbol is a variable or a function. If a symbol name +contains a function and a variable value, the function is +preferred. This function processes symbols in the variable +`LaTeX-tcolorbox-keyval-options-full'." + (let (result) + (dolist (elt (reverse LaTeX-tcolorbox-keyval-options-full) result) + (if (functionp elt) + (setq result (append (funcall elt) result)) + (setq result (append (symbol-value elt) result)))))) + +(defvar LaTeX-tcolorbox-tcbox-options + '(;; 4.20 \tcbox Specials + ("tcbox raise") + ("tcbox raise base") + ("on line") + ("tcbox width" ("auto" "auto limited" "forced center" + "forced left" "forced right" "minimum center" + "minimum left" "minimum right"))) + "Key=value options only for \\tcbox and \\tcboxmath from tcolorbox.sty.") + +(defvar LaTeX-tcolorbox-init-options + '(;; 5 Initialization Option Keys + ;; 5.1 Numbered Boxes + ("auto counter") + ("use counter from") + ("use counter") + ("use counter*") + ("no counter") + ("number within" ("part" "chapter" "section" "subsection")) + ("number format" ("\\arabic" "\\roman" "\\Roman" "\\Alph" "\\alph")) + ("number freestyle") + ("crefname") + ("Crefname") + ("blend into" ("figures" "tables" "listings")) + ("blend before title" ("colon" "dash" "colon hang" "dash hang")) + ("blend before title code") + ;; 5.2 Lists of tcolorboxes + ("list inside") + ("list type")) + "Initialization key=value options for tcolorbox macros.") + +(defvar LaTeX-tcolorbox-library-list + '("skins" + "vignette" + "raster" + "listings" + "listingsutf8" + "minted" + "theorems" + "breakable" + "magazine" + "fitting" + "hooks" + "xparse" + "external" + "documentation" + "many" "most" "all") + "List with libraries provided by tcolorbox package.") + +;; Setup for \newtcolorbox: +(TeX-auto-add-type "tcolorbox-newtcolorbox" "LaTeX" "tcolorbox-newtcolorboxes") + +(defvar LaTeX-tcolorbox-newtcolorbox-regexp + `(,(concat "\\\\\\(re\\)?newtcolorbox" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([a-zA-Z0-9]+\\)}" + "[ \t\n\r%]*" + "\\(?:\\[\\([0-9]*\\)\\]\\)?" + "[ \t\n\r%]*" + "\\(\\[\\)?") + (2 3 4 1) LaTeX-auto-tcolorbox-newtcolorbox) + "Matches the arguments of \\newtcolorbox from tcolorbox package.") + +;; Setup for \newtcbox: +(TeX-auto-add-type "tcolorbox-newtcbox" "LaTeX" "tcolorbox-newtcboxes") + +(defvar LaTeX-tcolorbox-newtcbox-regexp + `(,(concat "\\\\\\(re\\)?newtcbox" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\\\\\([a-zA-Z]+\\)}" + "[ \t\n\r%]*" + "\\(?:\\[\\([0-9]*\\)\\]\\)?" + "[ \t\n\r%]*" + "\\(\\[\\)?") + (2 3 4 1) LaTeX-auto-tcolorbox-newtcbox) + "Matches the arguments of \\newtcbox from tcolorbox package.") + +;; Setup for \tcbuselibrary: +(TeX-auto-add-type "tcolorbox-tcbuselibrary" + "LaTeX" "tcolorbox-tcbuselibraries") + +(defvar LaTeX-tcolorbox-tcbuselibrary-regexp + '("\\\\tcbuselibrary{\\([^}]+\\)}" + 1 LaTeX-auto-tcolorbox-tcbuselibrary) + "Matches the arguments of \\tcbuselibrary from tcolorbox package.") + +(defun LaTeX-tcolorbox-load-used-libraries () + "Check which tcolorbox libraries are loaded and run respective style hooks. +This functions checks the arguments of \\tcbuselibrary and the +name of libraries given in the optional argument of \\usepackage +call for tcolorbox and runs the style hook for them. The file +for style must have the prefix \"tcolorboxlib-\" in the name, +for example \"tcolorboxlib-raster.el\"." + (when (LaTeX-tcolorbox-tcbuselibrary-list) + (let (libs) + (dolist (x (LaTeX-tcolorbox-tcbuselibrary-list)) + (push (replace-regexp-in-string "[ %\n\r\t]" "" (car x)) libs)) + (setq libs (mapconcat #'identity libs ",")) + (dolist (x (split-string libs "," t)) + (TeX-run-style-hooks (concat "tcolorboxlib-" x))))) + (when (assoc "tcolorbox" LaTeX-provided-package-options) + (let ((opts (cdr (assoc "tcolorbox" LaTeX-provided-package-options)))) + (dolist (x opts) + (when (member x LaTeX-tcolorbox-library-list) + (TeX-run-style-hooks (concat "tcolorboxlib-" x))))))) + +(defun LaTeX-tcolorbox-auto-prepare () + "Clear various LaTeX-tcolorbox-* variables before parsing." + (setq LaTeX-auto-tcolorbox-newtcolorbox nil + LaTeX-auto-tcolorbox-newtcbox nil + LaTeX-auto-tcolorbox-tcbuselibrary nil)) + +(defun LaTeX-tcolorbox-auto-cleanup () + "Process parsed results." + ;; Process new env's from \newtcolorbox + (dolist (newtcbox (apply #'append LaTeX-tcolorbox-newtcolorbox-list)) + (let ((box (nth 0 newtcbox)) + (arg (nth 1 newtcbox)) + (opt (nth 2 newtcbox)) + (renew (when (string= (nth 3 newtcbox) "re") + (nth 3 newtcbox)))) + ;; When renew'ing, delete any entry from + ;; `LaTeX-environment-list' first: + (when renew + (setq LaTeX-environment-list + (assq-delete-all + (car (assoc box (LaTeX-environment-list))) + LaTeX-environment-list))) + (cond (;; opt. 1st argument and mandatory argument(s) + (and arg (not (string= arg "")) + opt (not (string= opt ""))) + (LaTeX-add-environments + (list box + #'LaTeX-env-args + [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)] + (1- (string-to-number arg))))) + (;; mandatory argument(s) only + (and arg (not (string= arg "")) + (string-equal opt "")) + (LaTeX-add-environments + (list box (string-to-number arg)))) + (t ; No args + (LaTeX-add-environments (list box)))))) + ;; + ;; Process new macros from \newtcbox + (dolist (newtcbox (apply #'append LaTeX-tcolorbox-newtcbox-list)) + (let ((box (nth 0 newtcbox)) + (arg (nth 1 newtcbox)) + (opt (nth 2 newtcbox)) + (renew (when (string= (nth 3 newtcbox) "re") + (nth 3 newtcbox)))) + ;; When renew'ing, delete any entry from `TeX-symbol-list' + ;; first: + (when renew + (setq TeX-symbol-list + (assq-delete-all + (car (assoc box (TeX-symbol-list))) + TeX-symbol-list))) + (cond (;; opt. 1st argument and mandatory argument(s) + (and arg (not (string= arg "")) + opt (not (string= opt ""))) + (TeX-add-symbols (list box + [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options)] + (1- (string-to-number arg))))) + (;; mandatory argument(s) only + (and arg (not (string= arg "")) + (string-equal opt "")) + (TeX-add-symbols (list box (string-to-number arg)))) + (t ; No args -- in pratice, this will probably never happen + (TeX-add-symbols (list box)))))) + ;; + ;; Load style hooks for libraries, if any. + (LaTeX-tcolorbox-load-used-libraries)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-tcolorbox-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-tcolorbox-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "tcolorbox" + (lambda () + + ;; Add tcolorbox to the parser. + (TeX-auto-add-regexp LaTeX-tcolorbox-newtcolorbox-regexp) + (TeX-auto-add-regexp LaTeX-tcolorbox-newtcbox-regexp) + (TeX-auto-add-regexp LaTeX-tcolorbox-tcbuselibrary-regexp) + + ;; We just run the style hook for `xcolor' which is loaded by pgf.sty + (TeX-run-style-hooks "xcolor") + + ;; FIXME: Anything missing? + (TeX-add-symbols + + ;; 1.3 Libraries + '("tcbuselibrary" + (TeX-arg-eval + (lambda () + (let ((libs (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Libraries") + LaTeX-tcolorbox-library-list) + ","))) + (LaTeX-add-tcolorbox-tcbuselibraries libs) + (LaTeX-tcolorbox-load-used-libraries) + (format "%s" libs))))) + + ;; 3 Macros for Box Creation + '("tcblower" 0) + + '("tcbset" + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options-full))) + + '("tcbsetforeverylayer" + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + '("tcbox" + [TeX-arg-eval TeX-read-key-val t + (append + LaTeX-tcolorbox-tcbox-options + (LaTeX-tcolorbox-keyval-options))] + t) + + '("newtcolorbox" + [ TeX-arg-key-val LaTeX-tcolorbox-init-options ] + "Name" + [ TeX-arg-define-macro-arguments ] + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + '("renewtcolorbox" + [ TeX-arg-key-val LaTeX-tcolorbox-init-options ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color box") + (LaTeX-tcolorbox-newtcolorbox-list)) + [ TeX-arg-define-macro-arguments ] + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + '("newtcbox" + [ TeX-arg-key-val LaTeX-tcolorbox-init-options ] + TeX-arg-macro + [ TeX-arg-define-macro-arguments ] + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + '("renewtcbox" + [ TeX-arg-key-val LaTeX-tcolorbox-init-options ] + (TeX-arg-eval + (lambda () + (let ((macro (completing-read + (TeX-argument-prompt nil nil "Macro: \\" t) + (LaTeX-tcolorbox-newtcbox-list)))) + (concat TeX-esc macro)))) + [ TeX-arg-define-macro-arguments ] + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + '("tcolorboxenvironment" + TeX-arg-environment + (TeX-arg-key-val (LaTeX-tcolorbox-keyval-options))) + + ;; 4.16 Layered Boxes and Every Box Settings + '("tcbsetmanagedlayer" "Number") + + ;; 4.22 Even and Odd Pages + '("tcbifoddpage" 2) + '("tcbifoddpageoroneside" 2) + '("thetcolorboxnumber" 0) + '("thetcolorboxpage" 0) + + ;; 5.2 Lists of tcolorboxes + '("tcblistof" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Macro") + (if (< (LaTeX-largest-level) 2) + '("\\chapter" "\\section" "\\subsection" "\\subsubsection") + '("\\section" "\\subsection" "\\subsubsection")) ] + 2) + + ;; 7 Saving and Loading of Verbatim Texts + '("tcbusetemp") + + ;; 8 Recording + '("tcbstartrecording" [ "File name" ]) + '("tcbstoprecording") + '("tcbrecord" t) + '("tcbinputrecords" [ TeX-arg-file ]) ) ; Terminate TeX-add-symbols + + (LaTeX-add-environments + ;; 3 Macros for Box Creation: Main env + '("tcolorbox" LaTeX-env-args + [ TeX-arg-key-val (LaTeX-tcolorbox-keyval-options) ]) + + ;; 7 Saving and Loading of Verbatim Texts + '("tcbverbatimwrite" "File name") + '("tcbwritetemp")) + + ;; Do not indent text in verbatim environments: + (make-local-variable 'LaTeX-indent-environment-list) + (add-to-list 'LaTeX-indent-environment-list + '("tcbverbatimwrite" current-indentation) t) + (add-to-list 'LaTeX-indent-environment-list + '("tcbwritetemp" current-indentation) t) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("tcbuselibrary" "{") + ("tcbset" "{") + ("tcbsetforeverylayer" "{") + ("tcbox" "[{") + ("newtcolorbox" "[{[[{") + ("renewtcolorbox" "[{[[{") + ("newtcbox" "[{[[{") + ("renewtcbox" "[{[[{") + ("tcolorboxenvironment" "{{") + ("tcbsetmanagedlayer" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-tcolorbox-package-options LaTeX-tcolorbox-library-list + "Package options for the tcolorbox package.") + +;;; tcolorbox.el ends here diff --git a/elpa/auctex-13.1.3/style/tcolorbox.elc b/elpa/auctex-13.1.3/style/tcolorbox.elc Binary files differnew file mode 100644 index 0000000..f6c7577 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tcolorbox.elc diff --git a/elpa/auctex-13.1.3/style/tcolorboxlib-raster.el b/elpa/auctex-13.1.3/style/tcolorboxlib-raster.el new file mode 100644 index 0000000..db61a03 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tcolorboxlib-raster.el @@ -0,0 +1,202 @@ +;;; tcolorboxlib-raster.el --- AUCTeX style for `raster' library from tcolorbox -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `raster' library from tcolorbox.sty. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function LaTeX-tcolorbox-keyval-options "tcolorbox" ()) +(defvar LaTeX-tcolorbox-keyval-options-full) + +(defvar LaTeX-tcolorbox-lib-raster-keyval-options + '(;; 14.3 Option Keys of the Library + ("raster columns") + ("raster rows") + ("raster width") + ("raster height") + ("raster before skip") + ("raster after skip") + ("raster equal skip") + ("raster left skip") + ("raster right skip") + ("raster column skip") + ("raster row skip") + ("raster halign" ("left" "center" "right")) + ("raster valign" ("top" "center" "bottom")) + ("raster equal height" ("noe" "rows" "all")) + ("raster equal height group") + ("raster force size" ("true" "false")) + ("raster reset") + ;; 14.4 Adding Styles for Specific Boxes + ("raster every box") + ("raster odd column") + ("raster even column") + ("raster column 1") + ("raster column 2") + ("raster column 3") + ("raster column 4") + ("raster odd row") + ("raster even row") + ("raster row 1") + ("raster row 2") + ("raster row 3") + ("raster row 4") + ("raster odd number") + ("raster even number") + ;; raster row m column n is left to user + ("raster number 1") + ("raster number 2") + ("raster number 3") + ("raster number 4") + ;; 14.5 Combining Columns or Rows + ("raster multicolumn") + ("raster multirow")) + "Key=value options for raster library from tcolorbox.") + +(defun LaTeX-tcolorbox-lib-raster-env-item (environment) + "Insert ENVIRONMENT, ask for arguments and the first item." + (LaTeX-insert-environment + environment + (let ((opts (TeX-read-key-val t (append + LaTeX-tcolorbox-lib-raster-keyval-options + (LaTeX-tcolorbox-keyval-options)) + (when (string= environment "tcboxeditemize") + "Raster options (k=v)"))) + (box-opts (when (string= environment "tcboxeditemize") + (TeX-read-key-val nil (LaTeX-tcolorbox-keyval-options) + "Box options (k=v)")))) + (concat + (when (and opts (not (string= opts ""))) + (format "[%s]" opts)) + (when (string= environment "tcboxeditemize") + (format "{%s}" box-opts))))) + (if (TeX-active-mark) + (progn + (LaTeX-find-matching-begin) + (end-of-line 1)) + (end-of-line 0)) + (delete-char 1) + (when (looking-at (concat "^[ \t]+$\\|" + "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$")) + (delete-region (point) (line-end-position))) + (delete-horizontal-space) + ;; Deactivate the mark here in order to prevent `TeX-parse-macro' + ;; from swapping point and mark and the \item ending up right after + ;; \begin{...}. + (deactivate-mark) + (LaTeX-insert-item) + ;; The inserted \item may have outdented the first line to the + ;; right. Fill it, if appropriate. + (when (and auto-fill-function + (not (looking-at "$")) + (not (assoc environment LaTeX-indent-environment-list)) + (> (- (line-end-position) (line-beginning-position)) + (current-fill-column))) + (LaTeX-fill-paragraph nil))) + +(defun LaTeX-tcolorbox-lib-raster-insert-item () + "Insert \"tcbitem\" and query for optional argument." + (TeX-insert-macro "tcbitem")) + +(TeX-add-style-hook + "tcolorboxlib-raster" + (lambda () + + ;; Register key-vals from library to `LaTeX-tcolorbox-keyval-options-full': + (add-to-list 'LaTeX-tcolorbox-keyval-options-full + 'LaTeX-tcolorbox-lib-raster-keyval-options) + + (TeX-add-symbols + ;; 14.2 Macros of the Library + '("tcbitem" + [TeX-arg-key-val (LaTeX-tcolorbox-keyval-options) "Item options (k=v)" ] + (TeX-arg-literal " "))) + + (LaTeX-add-environments + ;; 14.2 Macros of the Library + '("tcbraster" + (lambda (env) + (LaTeX-insert-environment + env + (let ((raster-opts + (TeX-read-key-val t (append + LaTeX-tcolorbox-lib-raster-keyval-options + (LaTeX-tcolorbox-keyval-options))))) + (when (and raster-opts (not (string= raster-opts ""))) + (concat LaTeX-optop raster-opts LaTeX-optcl)))))) + + '("tcbitemize" LaTeX-tcolorbox-lib-raster-env-item) + + '("tcboxedraster" + (lambda (env) + (LaTeX-insert-environment + env + (let ((raster-opts + (TeX-read-key-val t (append + LaTeX-tcolorbox-lib-raster-keyval-options + (LaTeX-tcolorbox-keyval-options)) + "Raster options (k=v)")) + (box-opts + (TeX-read-key-val nil (LaTeX-tcolorbox-keyval-options) + "Box options (k=v)"))) + (concat + (when (and raster-opts (not (string= raster-opts ""))) + (concat LaTeX-optop raster-opts LaTeX-optcl)) + TeX-grop box-opts TeX-grcl))))) + + '("tcboxeditemize" LaTeX-tcolorbox-lib-raster-env-item)) + + ;; Append tcb(oxed)?itemize to `LaTeX-item-list': + (add-to-list 'LaTeX-item-list + '("tcbitemize" . LaTeX-tcolorbox-lib-raster-insert-item) t) + (add-to-list 'LaTeX-item-list + '("tcboxeditemize" . LaTeX-tcolorbox-lib-raster-insert-item) t) + + ;; Append tcbitem to `LaTeX-item-regexp': + (unless (string-match "tcbitem" LaTeX-item-regexp) + (set (make-local-variable 'LaTeX-item-regexp) + (concat + LaTeX-item-regexp + "\\|" + "tcbitem\\b")) + (LaTeX-set-paragraph-start)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("tcbitem" "[")) + 'textual))) + TeX-dialect) + +;;; tcolorboxlib-raster.el ends here diff --git a/elpa/auctex-13.1.3/style/tcolorboxlib-raster.elc b/elpa/auctex-13.1.3/style/tcolorboxlib-raster.elc Binary files differnew file mode 100644 index 0000000..ac8f0ac --- /dev/null +++ b/elpa/auctex-13.1.3/style/tcolorboxlib-raster.elc diff --git a/elpa/auctex-13.1.3/style/tex-live.el b/elpa/auctex-13.1.3/style/tex-live.el new file mode 100644 index 0000000..b74890d --- /dev/null +++ b/elpa/auctex-13.1.3/style/tex-live.el @@ -0,0 +1,177 @@ +;;; tex-live.el --- AUCTeX style for `tex-live.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2020--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2020-03-29 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `tex-live.sty' from 2019/08/14. +;; `tex-live.sty' is part of TeXLive. + +;; Chances are high that this style is not feature complete, and +;; fontification is not ideal. But this might be a starting point for +;; TeXLive documentation editors who use AUCTeX. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function LaTeX-add-fancyvrb-environments + "fancyvrb" + (&rest fancyvrb-environments)) +(declare-function LaTeX-fancyvrb-key-val-options "fancyvrb" ()) + +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "tex-live" + (lambda () + + ;; Run hooks for required packages: + (TeX-run-style-hooks "geometry" + "alltt" + "array" + "colortbl" + "comment" + "float" + "graphicx" + "longtable" + "ulem" + "url" + "xspace" + "relsize" + "fancyvrb") + + ;; Add | to a local version of `LaTeX-shortvrb-chars' before + ;; running the style hook `shortvrb.el': + (add-to-list (make-local-variable 'LaTeX-shortvrb-chars) ?|) + (TeX-run-style-hooks "shortvrb") + + ;; Add support for custom environments defined with `fancyvrb.sty': + (LaTeX-add-fancyvrb-environments + '("verbatim" "Verbatim") + '("sverbatim" "Verbatim") + '("fverbatim" "Verbatim") + '("boxedverbatim" "Verbatim")) + + (TeX-add-symbols + '("verbatiminput" LaTeX-fancyvrb-arg-file-relative) + '("boxedverbatiminput" LaTeX-fancyvrb-arg-file-relative) + '("listinginput" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Value of firstnumber key") + (cadr (assoc "firstnumber" (LaTeX-fancyvrb-key-val-options)))) + LaTeX-fancyvrb-arg-file-relative) + + ;; Various sorts of names: + '("pkgname" "Package") + '("optname" "Option") + '("cmdname" "Command") + '("colname" "Collection") + '("dirname" "Directory") + '("filename" "Directory") + '("envname" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Environment") + '("TEXMFCACHE" + "TEXMFCNF" + "TEXMFCONFIG" + "TEXMFDIST" + "TEXMFHOME" + "TEXMFLOCAL" + "TEXMFMAIN" + "TEXMFOUTPUT" + "TEXMFSYSCONFIG" + "TEXMFSYSVAR" + "TEXMFVAR" + "TEXINPUTS" + "TEXFONTMAPS" + "ENCFONTS" + "PATH" "MANPATH" "INFOPATH" "DISPLAY"))) + '("code" "Code") + '("file" "File") + '("prog" "Program") + '("samp" "Sample") + '("var" "Variable") + '("ttbar" "Variable (typewriter)") + + '("Ucom" "Command (bold)") + + ;; Special names: + '("dpi" 0) + '("bs" 0) + '("cs" TeX-arg-macro)) + + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "dirname") + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "filename") + + (LaTeX-add-environments + '("ttdescription" LaTeX-env-item) + '("cmddescription" LaTeX-env-item) + '("itemize*" LaTeX-env-item) + '("enumerate*" LaTeX-env-item) + '("warningbox") + '("lrBox")) + + ;; `tex-live.sty' adds one new column specification letter P: + (set (make-local-variable 'LaTeX-array-column-letters) + (concat LaTeX-array-column-letters "P")) + + ;; Custom env's where \item takes an opt. argument: + (let ((envs '("ttdescription" "cmddescription"))) + (dolist (env envs) + (add-to-list 'LaTeX-item-list `(,env . LaTeX-item-argument) t))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("verbatiminput" "{") + ("boxedverbatiminput" "{") + ("listinginput" "{{") + ("pkgname" "{") + ("optname" "{") + ("cmdname" "{") + ("colname" "{") + ("dirname" "") + ("filename" "") + ("envname" "{") + ("cs" "{")) + 'reference) + (font-latex-add-keywords '(("code" "{") + ("file" "{") + ("prog" "{") + ("samp" "{") + ("ttvar" "{")) + 'type-command) + (font-latex-add-keywords '(("var" "{") ) + 'italic-command) + (font-latex-add-keywords '(("Ucom" "{")) + 'bold-command))) + TeX-dialect) + +;;; tex-live.el ends here diff --git a/elpa/auctex-13.1.3/style/tex-live.elc b/elpa/auctex-13.1.3/style/tex-live.elc Binary files differnew file mode 100644 index 0000000..05ef3b2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tex-live.elc diff --git a/elpa/auctex-13.1.3/style/textcomp.el b/elpa/auctex-13.1.3/style/textcomp.el new file mode 100644 index 0000000..c48316c --- /dev/null +++ b/elpa/auctex-13.1.3/style/textcomp.el @@ -0,0 +1,41 @@ +;;; textcomp.el --- AUCTeX style for `textcomp.sty' (v2.0n) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2017, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-25 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `textcomp.sty' (v2.0n) from 2020/02/02. +;; With this version, the package mainly no-op as the macros are moved +;; into LaTeX kernel. `textcomp.sty' is a standard LaTeX package and +;; part of TeXLive. + +;;; Code: + +(defvar LaTeX-textcomp-package-options + '("full" "almostfull" "euro" "safe" "error" + "warn" "info" "quiet" "force") + "Package options for the textcomp package.") + +;;; textcomp.el ends here diff --git a/elpa/auctex-13.1.3/style/textcomp.elc b/elpa/auctex-13.1.3/style/textcomp.elc Binary files differnew file mode 100644 index 0000000..c5c66bc --- /dev/null +++ b/elpa/auctex-13.1.3/style/textcomp.elc diff --git a/elpa/auctex-13.1.3/style/textpos.el b/elpa/auctex-13.1.3/style/textpos.el new file mode 100644 index 0000000..0f02efb --- /dev/null +++ b/elpa/auctex-13.1.3/style/textpos.el @@ -0,0 +1,126 @@ +;;; textpos.el --- AUCTeX style for `textpos.sty' version v1.7j -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2016, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-07-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `textpos.sty' version v1.7j from +;; 2014/01/03. `textpos.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function LaTeX-color-definecolor-list "color" ()) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defun LaTeX-env-arg-textpos-textblock (env) + "Query for the arguments of `textblock' environment and insert +them." + (let* ((hsize (TeX-read-string "Width: ")) + (ho (TeX-read-string "(Optional) X reference point: ")) + (vo (when (not (string-equal ho "")) + (TeX-read-string "Y reference point: "))) + (hpos (TeX-read-string "X placement point: ")) + (vpos (TeX-read-string "Y placement point: "))) + (LaTeX-insert-environment + env + (concat + (when (and hsize (not (string-equal hsize ""))) + (format "{%s}" hsize)) + (when (and ho (not (string-equal ho "")) + vo (not (string-equal vo ""))) + (format "[%s,%s]" ho vo)) + (when (and hpos (not (string-equal hpos "")) + vpos (not (string-equal vpos ""))) + (format "(%s,%s)" hpos vpos)))))) + +(defun LaTeX-arg-textpos-tpgrid (optional) + "Query and insert the optional argument of `\\TPGrid'." + (let* ((x (TeX-read-string "(Optional) X start coordinate: ")) + (y (when (not (string-equal x "")) + (TeX-read-string "Y start coordinate: ")))) + (when (and (not (string-equal x "")) + (not (string-equal y ""))) + (TeX-argument-insert (format "%s,%s" x y) optional)))) + +(TeX-add-style-hook + "textpos" + (lambda () + + (TeX-run-style-hooks "everyshi") + + (LaTeX-add-environments + ;; \begin{textblock}{<hsize>}[<ho>,<vo>](<hpos>,<vpos>) ... \end{textblock} + '("textblock" LaTeX-env-arg-textpos-textblock) + '("textblock*" LaTeX-env-arg-textpos-textblock)) + + (TeX-add-symbols + '("TPGrid" [ LaTeX-arg-textpos-tpgrid ] + "Horizontal fraction" "Vertical fraction") + + '("TPMargin" (TeX-arg-length "Margin around textblock")) + '("TPMargin*" (TeX-arg-length "Margin around textblock")) + + ;; We ignore the `\textblock...color' (i.e. without `u') versions + '("textblockcolour" + (TeX-arg-eval + (lambda () + (let ((color (cond ((member "xcolor" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-xcolor-definecolor-list))) + ((member "color" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-color-definecolor-list))) + (t + (TeX-read-string "Color name: "))))) + (format "%s" color))))) + + '("textblockrulecolour" + (TeX-arg-eval + (lambda () + (let ((color (cond ((member "xcolor" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-xcolor-definecolor-list))) + ((member "color" (TeX-style-list)) + (completing-read "Color name: " (LaTeX-color-definecolor-list))) + (t + (TeX-read-string "Color name: "))))) + (format "%s" color))))) + + '("TPshowboxestrue") + '("TPshowboxesfalse") + + '("textblocklabel" t) + '("textblockorigin" "Horizontal position" "Vertical position")) + + ;; Add the lengths defined by textpos.sty + (LaTeX-add-lengths "TPHorizModule" "TPVertModule" "TPboxrulesize")) + TeX-dialect) + +(defvar LaTeX-textpos-package-options + '("showboxes" "noshowtext" "absolute" "overlay" "verbose" "quiet") + "Package options for the textpos package.") + +;;; textpos.el ends here diff --git a/elpa/auctex-13.1.3/style/textpos.elc b/elpa/auctex-13.1.3/style/textpos.elc Binary files differnew file mode 100644 index 0000000..aa132ff --- /dev/null +++ b/elpa/auctex-13.1.3/style/textpos.elc diff --git a/elpa/auctex-13.1.3/style/theorem.el b/elpa/auctex-13.1.3/style/theorem.el new file mode 100644 index 0000000..219e864 --- /dev/null +++ b/elpa/auctex-13.1.3/style/theorem.el @@ -0,0 +1,180 @@ +;;; theorem.el --- AUCTeX style for `theorem.sty' (v2.2c) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015-2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-10-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `theorem.sty' (v2.2c) from 2014/10/28. +;; `theorem.sty' is a standard LaTeX package and part of TeXLive. + +;; The style provides the function `LaTeX-theorem-env-label' which +;; enables new defined environments with "\newtheoreom" to interact +;; with AUCTeX and RefTeX mechanisms for inserting labels. Check +;; docstring of `LaTeX-theorem-env-label' for instructions. + +;;; Code: + +(require 'crm) +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-theorem-theoremstyle-list + '(("plain") ("break") ("margin") ("change") + ("marginbreak") ("changebreak")) + "List of theorem styles provided by `theorem.sty'.") + +(defvar LaTeX-theorem-fontdecl + '(;; family + "rmfamily" "sffamily" "ttfamily" + ;; series + "mdseries" "bfseries" + ;; shape + "upshape" "itshape" "slshape" "scshape" + ;; size + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" + ;; reset macro + "normalfont") + "List of font declaration commands for \"\\theorem(body|header)font\".") + +(defun LaTeX-arg-theorem-fontdecl (optional &optional prompt) + "Prompt for font declaration commands in \"\\theorem(body|header)font\". +If OPTIONAL is non-nil, insert the resulting value as an optional +argument. Use PROMPT as the prompt string." + ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple') + ;; is hard-coded to `TeX-esc'. + (let* ((crm-separator (regexp-quote TeX-esc)) + (fontdecl (mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt optional prompt "Font") + LaTeX-theorem-fontdecl nil nil TeX-esc) + TeX-esc))) + (TeX-argument-insert fontdecl optional))) + +(defun LaTeX-theorem-env-label (environment) + "Insert ENVIRONMENT, query for an optional argument and prompt +for label. AUCTeX users should add ENVIRONMENT to +`LaTeX-label-alist' via customize or in init-file with: + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + +RefTeX users should customize or add ENVIRONMENT to +`LaTeX-label-alist' and `reftex-label-alist', for example + + (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\")) + (add-to-list \\='reftex-label-alist + \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\" + nil (\"Lemma\" \"lemma\") nil))" + (let ((opthead (TeX-read-string + (TeX-argument-prompt t nil "Heading")))) + (LaTeX-insert-environment environment + (when (and opthead + (not (string= opthead ""))) + (format "[%s]" opthead)))) + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))) + +;; Setup parsing for \newtheorem +(TeX-auto-add-type "theorem-newtheorem" "LaTeX") + +(defun LaTeX-theorem-auto-prepare () + "Clear `LaTeX-auto-theorem-newtheorem' before parsing." + (setq LaTeX-auto-theorem-newtheorem nil)) + +(defun LaTeX-theorem-auto-cleanup () + "Move parsed results from `LaTeX-auto-theorem-newtheorem' and +make them available as new environments." + (dolist (newthm (mapcar #'car (LaTeX-theorem-newtheorem-list))) + (LaTeX-add-environments (list newthm #'LaTeX-theorem-env-label)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-theorem-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "theorem" + (lambda () + + (TeX-auto-add-regexp + `(,(concat "\\\\newtheorem{\\(" TeX-token-char "+\\)}") + 1 LaTeX-auto-theorem-newtheorem)) + + (TeX-add-symbols + ;; Overrule the defintion in `latex.el': + '("newtheorem" + (TeX-arg-eval + (lambda () + (let ((nthm (TeX-read-string + (TeX-argument-prompt nil nil "Environment")))) + (LaTeX-add-theorem-newtheorems nthm) + (LaTeX-add-environments (list nthm #'LaTeX-theorem-env-label)) + (format "%s" nthm)))) + [ TeX-arg-environment "Numbered like" ] + t [ (TeX-arg-eval progn (if (eq (save-excursion + (backward-char 2) + (preceding-char)) ?\]) + () + (TeX-arg-counter t "Within counter")) + "") ]) + + '("theoremstyle" + (TeX-arg-eval completing-read + "Style: " + LaTeX-theorem-theoremstyle-list)) + + '("theorembodyfont" + (LaTeX-arg-theorem-fontdecl "Body font")) + + '("theoremheaderfont" + (LaTeX-arg-theorem-fontdecl "Header font")) + + '("theorempreskipamount" + (TeX-arg-length "Skip before theorem")) + + '("theorempostskipamount" + (TeX-arg-length "Skip after theorem"))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("theoremstyle" "{") + ("theorembodyfont" "{") + ("theoremheaderfont" "{") + ("theorempreskipamount" "{") + ("theorempostskipamount" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-theorem-package-options nil + "Package options for the theorem package.") + +;;; theorem.el ends here diff --git a/elpa/auctex-13.1.3/style/theorem.elc b/elpa/auctex-13.1.3/style/theorem.elc Binary files differnew file mode 100644 index 0000000..ec52032 --- /dev/null +++ b/elpa/auctex-13.1.3/style/theorem.elc diff --git a/elpa/auctex-13.1.3/style/thm-restate.el b/elpa/auctex-13.1.3/style/thm-restate.el new file mode 100644 index 0000000..15d33a9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/thm-restate.el @@ -0,0 +1,120 @@ +;;; thm-restate.el --- AUCTeX style for `thm-restate.sty' (v66) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-07-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `thm-restate.sty'. `thm-restate.sty' is +;; part of `thmtools' package (v66) from 2014/04/21. `thmtools.sty' +;; is part of TeXLive. + +;;; Code: + +;; Needed for auto-parsing. +(require 'tex) +(require 'latex) + +;; Silence the parser: +(declare-function LaTeX-thmtools-declaretheorem-list + "thmtools" ()) + +;; Setup for macro names defined with +;; \begin{restatable}[<Heading>]{<env-name>}{<macro name>}: + +(TeX-auto-add-type "thmrestate-restatable-macro" "LaTeX") + +(defvar LaTeX-thmrestate-restatable-marco-regexp + `(,(concat "\\\\begin{restatable}" + "[ \t\n\r%]*" + "\\(?:\\[[^]]*\\]\\)?" + "[ \t\n\r%]*" + "\\(?:{[^}]+}\\)" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-thmrestate-restatable-macro)) + +(defun LaTeX-thmrestate-auto-prepare () + "Clear `LaTeX-auto-thmrestate-restatable-macro' before parsing." + (setq LaTeX-auto-thmrestate-restatable-macro nil)) + +(defun LaTeX-thmrestate-auto-cleanup () + "Process parsed elements from thm-restate package." + (dolist (newmac (mapcar #'car (LaTeX-thmrestate-restatable-macro-list))) + (TeX-add-symbols `(,newmac 0) + `(,(concat newmac "*") 0)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-thmrestate-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmrestate-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-env-thmrestate-restatable (optional) + "Insert arguments for restatable environment from thm-restate package." + ;; The optional heading argument: + (let ((TeX-arg-opening-brace LaTeX-optop) + (TeX-arg-closing-brace LaTeX-optcl)) + (TeX-argument-insert + (TeX-read-string + (TeX-argument-prompt t nil "Heading")) + t)) + ;; Name of the environment we are referring to; this can be defined + ;; via amsthm.sty, ntheorem.sty or thmtools.sty: + (TeX-argument-insert + (completing-read + (TeX-argument-prompt optional nil "Environment") + (append + ;; Cater for environments defined with amsthm's \newtheorem + (when (and (fboundp 'LaTeX-amsthm-newtheorem-list) + (LaTeX-amsthm-newtheorem-list)) + (LaTeX-amsthm-newtheorem-list)) + ;; Cater for environments defined with ntheorem's \newtheorem + (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list) + (LaTeX-ntheorem-newtheorem-list)) + (LaTeX-ntheorem-newtheorem-list)) + ;; Environments defined with \declaretheorem + (LaTeX-thmtools-declaretheorem-list))) + optional) + (let ((mac (TeX-read-string + (TeX-argument-prompt optional nil "Macro")))) + (TeX-add-symbols `(,mac 0) + `(,(concat mac "*") 0)) + (TeX-argument-insert mac optional))) + +(TeX-add-style-hook + "thm-restate" + (lambda () + + ;; Run the style hook `thmtools.el': + (TeX-run-style-hooks "thmtools") + + ;; Add thm-restate to the parser + (TeX-auto-add-regexp LaTeX-thmrestate-restatable-marco-regexp) + + ;; Provide restatable\\*? environment + (LaTeX-add-environments + '("restatable" LaTeX-env-args LaTeX-env-thmrestate-restatable) + '("restatable*" LaTeX-env-args LaTeX-env-thmrestate-restatable))) + TeX-dialect) + +;;; thm-restate.el ends here diff --git a/elpa/auctex-13.1.3/style/thm-restate.elc b/elpa/auctex-13.1.3/style/thm-restate.elc Binary files differnew file mode 100644 index 0000000..912bbc6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/thm-restate.elc diff --git a/elpa/auctex-13.1.3/style/thmtools.el b/elpa/auctex-13.1.3/style/thmtools.el new file mode 100644 index 0000000..d17b30e --- /dev/null +++ b/elpa/auctex-13.1.3/style/thmtools.el @@ -0,0 +1,313 @@ +;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v0.72) -*- lexical-binding: t; -*- + +;; Copyright (C) 2018--2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2018-07-07 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `thmtools.sty' (v0.72) from 2020/08/01. +;; `thmtools.sty' is part of TeXLive. + +;;; Code: + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +;; Needed for auto-parsing: +(require 'tex) +(require 'latex) + +;; Setup for \declaretheoremstyle: +(TeX-auto-add-type "thmtools-declaretheoremstyle" "LaTeX") + +(defvar LaTeX-thmtools-declaretheoremstyle-regexp + `(,(concat "\\\\declaretheoremstyle" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-thmtools-declaretheoremstyle) + "Matches the argument of \\declaretheoremstyle from thmtools package.") + +;; Setup for \declaretheorem: +(TeX-auto-add-type "thmtools-declaretheorem" "LaTeX") + +(defvar LaTeX-thmtools-declaretheorem-regexp + `(,(concat "\\\\declaretheorem" + "[ \t\n\r%]*" + "\\(?:" + (LaTeX-extract-key-value-label 'none) + "\\)?" + "[ \t\n\r%]*" + "{\\([^}]+\\)}") + 1 LaTeX-auto-thmtools-declaretheorem) + "Matches the argument of \\declaretheorem from thmtools package.") + +(defun LaTeX-thmtools-auto-prepare () + "Clear `LaTeX-auto-thmtools-*' before parsing." + (setq LaTeX-auto-thmtools-declaretheoremstyle nil + LaTeX-auto-thmtools-declaretheorem nil)) + +(defun LaTeX-thmtools-auto-cleanup () + "Process parsed elements from thmtools package." + (dolist (newthm (mapcar #'car (LaTeX-thmtools-declaretheorem-list))) + (LaTeX-add-environments `(,newthm LaTeX-thmtools-env-label)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-thmtools-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmtools-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun LaTeX-thmtools-declaretheoremstyle-key-val (optional &optional prompt) + "Query and return a key=val string for \\declaretheoremstyle macro. +If OPTIONAL is non-nil, indicate an optional argument in +minibuffer. PROMPT replaces the standard one." + (let ((lengths (mapcar (lambda (x) + (concat TeX-esc x)) + (mapcar #'car (LaTeX-length-list)))) + (fonts (mapcar (lambda (x) + (concat TeX-esc x)) + '("rmfamily" "sffamily" "ttfamily" "mdseries" "bfseries" + "upshape" "itshape" "slshape" "scshape" + "tiny" "scriptsize" "footnotesize" + "small" "normalsize" "large" + "Large" "LARGE" "huge" "Huge" "normalfont")))) + (TeX-read-key-val + optional + `(("spaceabove" ,lengths) + ("spacebelow" ,lengths) + ("headfont" ,fonts) + ("notefont" ,fonts) + ("bodyfont" ,fonts) + ("headpunct") + ("notebraces") + ("postheadspace" ,lengths) + ("headformat" ("margin" "swapnumber" "\\NUMBER" "\\NAME" "\\NOTE")) + ("headindent" ,lengths)) + prompt))) + +(defun LaTeX-arg-thmtools-declaretheoremstyle (optional &optional prompt) + "Insert the key=val and style name defined by \\declaretheoremstyle. +If OPTIONAL is non-nil, also insert the second argument in square +brackets. PROMPT replaces the standard one for the second +argument." + (let ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]")) + (TeX-argument-insert + (LaTeX-thmtools-declaretheoremstyle-key-val t) + t)) + (let ((style (TeX-read-string + (TeX-argument-prompt optional prompt "Style")))) + (LaTeX-add-thmtools-declaretheoremstyles style) + (TeX-argument-insert style optional))) + +(defun LaTeX-thmtools-declaretheorem-key-val (optional &optional prompt) + "Query and return a key=val string for \\declaretheorem macro. +If OPTIONAL is non-nil, indicate an optional argument in +minibuffer. PROMPT replaces the standard one." + (let ((counters (mapcar #'car (LaTeX-counter-list)))) + (TeX-read-key-val + optional + `(("parent" ,counters) + ("numberwithin" ,counters) + ("within" ,counters) + ("sibling" ,counters) + ("numberlike" ,counters) + ("sharenumber" ,counters) + ("title") + ("name") + ("heading") + ("numbered" ("yes" "no" "unless unique")) + ("style" + ,(append + ;; check for \newtheoremstyle from amsthm.sty: + (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list) + (LaTeX-amsthm-newtheoremstyle-list)) + (mapcar #'car (LaTeX-amsthm-newtheoremstyle-list))) + ;; check for \newtheoremstyle from ntheorem.sty: + (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list) + (LaTeX-ntheorem-newtheoremstyle-list)) + (mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list))) + ;; thmtools version is called \declaretheoremstyle: + (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list)))) + ("preheadhook") + ("postheadhook") + ("prefoothook") + ("postfoothook") + ("refname") + ("Refname") + ("shaded" ("textwidth" "bgcolor" "rulecolor" "rulewidth" "margin")) + ("thmbox" ("L" "M" "S"))) + prompt))) + +(defun LaTeX-arg-thmtools-declaretheorem (optional &optional prompt) + "Insert the key=val and environment name defined by \\declaretheorem. +If OPTIONAL is non-nil, also insert the second argument in square +brackets. PROMPT replaces the standard one for the second +argument." + (let ((env (TeX-read-string + (TeX-argument-prompt optional prompt "Environment")))) + (LaTeX-add-environments `(,env LaTeX-thmtools-env-label)) + (TeX-argument-insert env optional)) + (let ((TeX-arg-opening-brace "[") + (TeX-arg-closing-brace "]")) + (TeX-argument-insert + (LaTeX-thmtools-declaretheorem-key-val t) + t))) + +(defun LaTeX-thmtools-listoftheorems-key-val (optional &optional prompt) + "Query and return a key=val string for \\listoftheorems macro. +If OPTIONAL is non-nil, indicate an optional argument in +minibuffer. PROMPT replaces the standard one." + (let ((lengths (mapcar (lambda (x) + (concat TeX-esc x)) + (mapcar #'car (LaTeX-length-list)))) + (thms (append + ;; check for \newtheorem from amsthm.sty: + (when (and (fboundp 'LaTeX-amsthm-newtheorem-list) + (LaTeX-amsthm-newtheorem-list)) + (mapcar #'car (LaTeX-amsthm-newtheorem-list))) + ;; check for \newtheorem from ntheorem.sty: + (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list) + (LaTeX-ntheorem-newtheorem-list)) + (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + ;; thmtools version is called \declaretheorem: + (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))) + (TeX-read-key-val + optional + `(("title") + ("ignore" ,thms) + ("ignoreall" ("true" "false")) + ("show" ,thms) + ("showall" ("true" "false")) + ("onlynamed" ,thms) + ("swapnumber" ("true" "false")) + ("numwidth" ,lengths)) + prompt))) + +(defun LaTeX-arg-thmtools-listoftheorems (optional &optional prompt) + "Insert the key=val to \\listoftheorems macro. +If OPTIONAL is non-nil, insert the result square brackets. +OPTIONAL and PROMPT are passed to `LaTeX-thmtools-listoftheorems-key-val'." + (TeX-argument-insert + (LaTeX-thmtools-listoftheorems-key-val optional prompt) + optional)) + +(defun LaTeX-thmtools-env-label (environment) + "Insert thmtools ENVIRONMENT, query for an optional argument and label. +AUCTeX users should add ENVIRONMENT to `LaTeX-label-alist' via +customize or in init-file with: + + (add-to-list \\='LaTeX-label-alist \\='(\"theorem\" . \"thm:\")) + +RefTeX users should customize or add ENVIRONMENT to +`LaTeX-label-alist' and `reftex-label-alist', for example + + (add-to-list \\='LaTeX-label-alist \\='(\"theorem\" . \"thm:\")) + (add-to-list \\='reftex-label-alist + \\='(\"theorem\" ?m \"thm:\" \"~\\ref{%s}\" + nil (\"Theorem\" \"theorem\") nil))" + (let* ((help-form "\ +Select the content of the optional argument with a key: +'h' in order to insert a plain heading, +'k' in order to insert key=value pairs with completion, +RET in order to leave it empty.") + (choice (read-char-choice + (TeX-argument-prompt + nil nil "Heading (h), Key=val (k), Empty (RET)") + '(?h ?k))) + (opthead (cond ((= choice ?h) + (TeX-read-string + (TeX-argument-prompt t nil "Heading"))) + ((= choice ?k) + (TeX-read-key-val + t + `(("name") + ("continues" ,(mapcar #'car (LaTeX-label-list))) + ("restate" ,(mapcar #'car (LaTeX-label-list))) + ;; We don't offer a label key here: It is + ;; marked "experimental" in the manual and + ;; inserting and parsing \label{foo} is + ;; much easier for AUCTeX and RefTeX + ;; ("label") + ("listhack" ("true" "false"))))) + (t "")))) + (LaTeX-insert-environment environment + (when (and opthead + (not (string= opthead ""))) + (format "[%s]" opthead)))) + (when (LaTeX-label environment 'environment) + (LaTeX-newline) + (indent-according-to-mode))) + +(TeX-add-style-hook + "thmtools" + (lambda () + + ;; Add thmtools to the parser. + (TeX-auto-add-regexp LaTeX-thmtools-declaretheoremstyle-regexp) + (TeX-auto-add-regexp LaTeX-thmtools-declaretheorem-regexp) + + (TeX-add-symbols + '("declaretheoremstyle" LaTeX-arg-thmtools-declaretheoremstyle) + '("declaretheorem" LaTeX-arg-thmtools-declaretheorem) + + '("listoftheorems" [ LaTeX-arg-thmtools-listoftheorems ]) + '("ignoretheorems" + (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Environment(s)") + (append + ;; check for \newtheorem from amsthm.sty: + (when (and (fboundp 'LaTeX-amsthm-newtheorem-list) + (LaTeX-amsthm-newtheorem-list)) + (mapcar #'car (LaTeX-amsthm-newtheorem-list))) + ;; check for \newtheorem from ntheorem.sty: + (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list) + (LaTeX-ntheorem-newtheorem-list)) + (mapcar #'car (LaTeX-ntheorem-newtheorem-list))) + ;; thmtools version is called \declaretheorem: + (mapcar #'car (LaTeX-thmtools-declaretheorem-list)))) + ",")) + '("listtheoremname" 0)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("declaretheoremstyle" "[{") + ("declaretheorem" "[{[") + ("listoftheorems" "[") + ("ignoretheorems" "{")) + 'function))) + TeX-dialect) + +;; The package has only one option `debug'. We ignore that in order +;; to make loading faster: +(defvar LaTeX-thmtools-package-options nil + "Package options for the thmtools package.") + +;;; thmtools.el ends here diff --git a/elpa/auctex-13.1.3/style/thmtools.elc b/elpa/auctex-13.1.3/style/thmtools.elc Binary files differnew file mode 100644 index 0000000..bea94a9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/thmtools.elc diff --git a/elpa/auctex-13.1.3/style/tikz.el b/elpa/auctex-13.1.3/style/tikz.el new file mode 100644 index 0000000..f3a50bc --- /dev/null +++ b/elpa/auctex-13.1.3/style/tikz.el @@ -0,0 +1,286 @@ +;;; tikz.el --- AUCTeX style for `tikz.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2016-2021 Free Software Foundation, Inc. + +;; Author: Matthew Leach <matthew@mattleach.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-22-03 +;; Keywords: tex tikz + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds some support for `tikz.sty' + +;;; Code: + +(require 'tex) +(require 'latex) + +(defcustom TeX-TikZ-point-name-regexp + "(\\([A-Za-z0-9]+\\))" + "A regexp that matches TikZ names." + :type 'regexp + :group 'auctex-tikz) + +(defconst TeX-TikZ-point-function-map + '(("Rect Point" TeX-TikZ-arg-rect-point) + ("Polar Point" TeX-TikZ-arg-polar-point) + ("Named Point" TeX-TikZ-arg-named-point)) + "An alist of point specification types and their functions.") + +(defconst TeX-TikZ-relative-point-function-map + (apply #'append (mapcar + (lambda (point-map) + (let ((key (car point-map)) + (value (cadr point-map))) + `((,(concat "+" key) ,value "+") + (,(concat "++" key) ,value "++")))) + TeX-TikZ-point-function-map)) + "`TeX-TikZ-point-function-map' with \"+\" and \"++\" as a +prefix.") + +(defconst TeX-TikZ-path-connector-function-map + '(("--" identity) + ("|-" identity) + ( "-|" identity) + ("sin" identity) + ("cos" identity)) + "An alist of path connectors.") + +(defconst TeX-TikZ-draw-arg-function-map + `(,@TeX-TikZ-point-function-map + ,@TeX-TikZ-relative-point-function-map + ,@TeX-TikZ-path-connector-function-map + ("Node" TeX-TikZ-arg-node) + ("Circle" TeX-TikZ-arg-circle) + ("Arc" TeX-TikZ-arg-arc) + ("Parabola" TeX-TikZ-arg-parabola) + ("Grid" TeX-TikZ-arg-grid)) + "An alist of argument names and functoins for TikZ's \draw.") + +(defun TeX-TikZ-get-opt-arg-string (arg &optional open close) + "Return a string for optional arguments. +If ARG is nil or \"\", return \"\". Otherwise return \"OPEN ARG +CLOSE\". If OPEN or CLOSE are nil, set them to `LaTeX-optop' and +`LaTeX-optcl' respectively." + (unless (or open close) + (setq open LaTeX-optop) + (setq close LaTeX-optcl)) + (if (and arg (> (length arg) 0)) + (concat open arg close) + "")) + +(defun TeX-TikZ-arg-rect-point (_ignored &optional prefix) + "Prompt the user for a point on the Cartesian plane. +Ask the user for an X and Y coordinate, and return the string +\"(X,Y)\"." + (let ((x (TeX-read-string (TeX-argument-prompt nil nil "X-coordinate"))) + (y (TeX-read-string (TeX-argument-prompt nil nil "Y-coordinate")))) + (concat " " prefix "(" x ", " y") "))) + +(defun TeX-TikZ-arg-polar-point (_ignored &optional prefix) + "Prompt the user for a point on the polar plane. +Ask the user for r and theta values, and return the string +\"(THETA:R)\"." + (let ((r (TeX-read-string (TeX-argument-prompt nil nil "R"))) + (theta (TeX-read-string (TeX-argument-prompt nil nil "Theta")))) + (concat " " prefix "(" theta ":" r ") "))) + +(defun TeX-TikZ-arg-options (optional) + "Prompt the user for options to a TikZ macro. +If OPTIONAL is non-nil, always return `LaTeX-optop' and +`LaTeX-optcl', even if the user doesn't provide any input." + (let ((options (TeX-read-string (TeX-argument-prompt optional nil "Options" )))) + (if optional + (TeX-TikZ-get-opt-arg-string options) + (concat LaTeX-optop options LaTeX-optcl)))) + +(defun TeX-TikZ-arg-name (optional) + "Prompt the user for a TikZ name. +If OPTIONAL is non-nil, always return \"()\", even if the user +doesn't provide any input." + (let ((name (TeX-read-string (TeX-argument-prompt optional nil "Name" )))) + (if optional + (TeX-TikZ-get-opt-arg-string name "(" ")") + (concat "(" name ")")))) + +(defun TeX-TikZ-arg-label (optional) + "Prompt the user for TikZ label. +If OPTIONAL is non-nil always return `TeX-grop' and `TeX-grcl', +even if the user doesn't provide any input." + (let ((label (TeX-read-string (TeX-argument-prompt optional nil "Label" )))) + (if optional + (TeX-TikZ-get-opt-arg-string label TeX-grop TeX-grcl) + (concat TeX-grop label TeX-grcl)))) + +(defun TeX-TikZ-arg-node (_ignored) + "Prompt the user for the deatils of a node. +Ask the user for the name and text for a node and return the +string \"node[OPTIONS](NAME){TEXT}\"." + (let ((options (TeX-TikZ-arg-options t)) + (name (TeX-TikZ-arg-name t)) + (label (TeX-TikZ-arg-label nil))) + (concat "node" options name label " "))) + +(defun TeX-TikZ-get-arg-type (types prompt) + "Prompt the user for an argument type. +TYPES is a list of possible types that the user can specify. Use +PROMPT as the prompt for input." + (let ((completion-ignore-case t)) + (completing-read prompt types nil t))) + +(defun TeX-TikZ-single-macro-arg (function-alist prompt &optional optional) + "Prompt the user for a single argument to compose a TikZ macro. +FUNCTION-ALIST is a mapping of argument-types to functions. The +user is prompted for the argument type, the chosen function is +then called and the value returned. PROMPT is used as the prompt +for the argument type. When OPTIONAL is non-nil, add \"\" to +FUNCTION-ALIST with a mapping to `identity', permitting an +optional input." + (let* ((selected-argument-type (TeX-TikZ-get-arg-type function-alist prompt)) + (fn-alist-with-optional-elm (if optional + `(,@function-alist ("" identity)) + function-alist)) + (selected-mapping (assoc selected-argument-type + fn-alist-with-optional-elm))) + + ;; Build the funcall we wish to evaluate. This will be the function + ;; to be called (the second element in the assoc element), + ;; followed by the type name (the first element), followed by any + ;; other elements in the list as extra arguments. + (apply + (cadr selected-mapping) + (car selected-mapping) + (cddr selected-mapping)))) + + +(defun TeX-TikZ-macro-arg (function-alist) + "Prompt the user for arguments to compose a TikZ macro. +FUNCTION-ALIST is a mapping of argument-types to functions. The +user is repeatedly prompted for the next argument-type; they can +choose form the cars in FUNCTION-ALIST and the appropriate +function is then called. If the user enters \"\", then the macro +is finished." + (let* ((options (TeX-TikZ-arg-options t)) + (prompt "Next argument type (RET to finish): ") + (string-to-insert (TeX-TikZ-single-macro-arg function-alist prompt t))) + + ;; Insert the macro options. + (insert options " ") + + ;; Iteratively prompt the user for TikZ's arguments until "" is + ;; returned. + (while (not (string= string-to-insert "")) + (insert string-to-insert) + (setq string-to-insert + (TeX-TikZ-single-macro-arg function-alist prompt t))) + + ;; Finish the macro. + (insert ";"))) + +(defun TeX-TikZ-find-named-points () + "Find TiKZ named points in current enviroment. +Begin by finding the span of the current TikZ enviroment and then +searching within that span to find all named-points and return +them as a list of strings, dropping the '()'." + (let* ((env-end (save-excursion + (LaTeX-find-matching-end) + (point))) + (matches)) + ;; TODO: Handle cases where we are in a nested environment, \scope + ;; for example. + (save-excursion + (LaTeX-find-matching-begin) + (save-match-data + (while (re-search-forward TeX-TikZ-point-name-regexp env-end t) + (push (match-string 1) matches)))) + matches)) + +(defun TeX-TikZ-arg-named-point (_ignored &optional prefix) + "Prompt the user for the name of a previous named-point." + (let ((point-name (completing-read "Point name: " + (TeX-TikZ-find-named-points)))) + (concat " " prefix "(" point-name ") "))) + +(defun TeX-TikZ-arg-circle (_ignored) + "Prompt the user for the arguments to the circle command." + (let ((options (TeX-TikZ-arg-options t))) + (concat "circle" options))) + +(defun TeX-TikZ-arg-arc (_ignored) + "Prompt the user for the arguments to the arc command." + (let ((options (TeX-TikZ-arg-options t))) + (concat "arc" options))) + +(defun TeX-TikZ-arg-bend (optional) + "Prompt the user for a bend argument. +If OPTIONAL is non-nil and the user doesn't provide a point, + return \"\"." + (let ((point + (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map + (TeX-argument-prompt optional nil "Bend point") + optional))) + (if (string= point "") + point + (concat " bend" point)))) + +(defun TeX-TikZ-arg-parabola (_ignored) + "Prompt the user for the arguments to the parabola command." + (let ((options (TeX-TikZ-arg-options t)) + (bend (TeX-TikZ-arg-bend t))) + (concat "parabola" options bend))) + +(defun TeX-TikZ-arg-grid (_ignored) + "Prompt the user for the arguments to the grid command." + (let ((options (TeX-TikZ-arg-options t))) + (concat "grid" options))) + +(defun TeX-TikZ-draw-arg (_ignored) + "Prompt the user for the arguments to a TikZ draw macro." + (TeX-TikZ-macro-arg TeX-TikZ-draw-arg-function-map)) + +(defun TeX-TikZ-coordinate-arg (_ignored) + "Prompt the user for the arguments to a TikZ coordinate macro." + (let ((options (TeX-TikZ-arg-options t)) + (name (TeX-TikZ-arg-name nil)) + (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map + "Coordinate point type: "))) + (insert options " " name " at" point ";"))) + +(defun TeX-TikZ-node-arg (_ignored) + "Prompt the user for the arguments to a TikZ node macro." + (let ((options (TeX-TikZ-arg-options t)) + (name (TeX-TikZ-arg-name nil)) + (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map + "Node point type: ")) + (label (TeX-TikZ-arg-label nil))) + (insert options " " name " at" point label ";"))) + +(TeX-add-style-hook + "tikz" + (lambda () + (TeX-add-symbols + '("draw" (TeX-TikZ-draw-arg)) + '("coordinate" (TeX-TikZ-coordinate-arg)) + '("node" (TeX-TikZ-node-arg))) + (LaTeX-add-environments + '("tikzpicture")))) + +;;; tikz.el ends here diff --git a/elpa/auctex-13.1.3/style/tikz.elc b/elpa/auctex-13.1.3/style/tikz.elc Binary files differnew file mode 100644 index 0000000..859e725 --- /dev/null +++ b/elpa/auctex-13.1.3/style/tikz.elc diff --git a/elpa/auctex-13.1.3/style/titleps.el b/elpa/auctex-13.1.3/style/titleps.el new file mode 100644 index 0000000..8de8b1d --- /dev/null +++ b/elpa/auctex-13.1.3/style/titleps.el @@ -0,0 +1,245 @@ +;;; titleps.el --- AUCTeX style for `titleps.sty' (v1.1.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2016-06-22 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `titleps.sty' (v1.1.1) from 2016/03/15. +;; `titleps.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-titleps-section-command-list + '("part" + "chapter" + "section" + "subsection" + "subsubsection" + "paragraph" + "subparagraph") + "List of sectioning commands available in \"titleps.sty\".") + +(defun LaTeX-titleps-section-command-list () + "Remove \"chapter\" from variable +`LaTeX-titleps-section-command-list' and return the remainder. +Removal is based on the return value of function +`LaTeX-largest-level'." + (if (< (LaTeX-largest-level) 2) + (symbol-value 'LaTeX-titleps-section-command-list) + (remove "chapter" LaTeX-titleps-section-command-list))) + +(defvar LaTeX-titleps-newpagestyle-regexp + '("\\\\newpagestyle[ \t\n\r%]*{\\([^}]+\\)}" 1 LaTeX-auto-pagestyle) + "Match the argument of \"\\newpagestyle\" from titleps.sty.") + +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "titleps" + (lambda () + + ;; Add titleps to the parser. + (TeX-auto-add-regexp LaTeX-titleps-newpagestyle-regexp) + + ;; Add \<section>title's + (dolist (sec (LaTeX-titleps-section-command-list)) + (TeX-add-symbols `(,(concat sec "title") 0))) + + (TeX-add-symbols + ;; 2. Defining Page Styles + '("newpagestyle" + (TeX-arg-eval + (lambda () + (let ((ps (TeX-read-string + (TeX-argument-prompt nil nil "Page style")))) + (LaTeX-add-pagestyles ps) + (format "%s" ps)))) + (TeX-arg-conditional (y-or-n-p "With optional global style? ") + ( [ t ] nil) + ( t ))) + + '("renewpagestyle" TeX-arg-pagestyle + (TeX-arg-conditional (y-or-n-p "With optional global style? ") + ( [ t ] nil) + ( t ))) + + '("sethead" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil) + ( 3 ))) + + '("setfoot" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil) + ( 3 ))) + + '("sethead*" 3) + '("setfoot*" 3) + + '("settitlemarks" + (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Level names") + (LaTeX-titleps-section-command-list)) + ",")) + + '("settitlemarks" + (TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt nil nil "Level names") + (LaTeX-titleps-section-command-list)) + ",")) + + '("headrule" 0) + '("setheadrule" "Thickness") + + '("footrule" 0) + '("setfootrule" "Thickness") + + '("makeheadrule" 0) + '("makefootrule" 0) + + ;; 3. On \markboth and \markleft + '("setmarkboth" t) + '("resetmarkboth" 0) + + ;; 4. Headline/footline width + '("widenhead" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 2 ] nil nil) + ( 2 ))) + + '("widenhead*" 2) + + '("TitlepsPatchSection" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titleps-section-command-list))) + + '("TitlepsPatchSection*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titleps-section-command-list))) + + ;; 5. Marks + '("bottitlemarks" 0) + '("toptitlemarks" 0) + '("firsttitlemarks" 0) + '("nexttoptitlemarks" 0) + '("outertitlemarks" 0) + '("innertitlemarks" 0) + + '("newtitlemark" (TeX-arg-macro "Command name")) + '("newtitlemark*" (TeX-arg-counter "Variable name")) + + '("pretitlemark" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titleps-section-command-list)) + "Text") + + '("pretitlemark*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titleps-section-command-list)) + "Text") + + '("ifsamemark" + (TeX-arg-macro "Marks group: \\") + (TeX-arg-macro "Command: \\") + 2) + + ;; 6. Running heads with floats + '("setfloathead" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil nil [ nil ] ) + ( 4 [ nil ] ))) + + '("setfloatfoot" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil nil [ nil ] ) + ( 4 [ nil ] ))) + + '("setfloathead*" 4 [ nil ] ) + '("setfloatfoot*" 4 [ nil ] ) + + '("nextfloathead" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil nil [ nil ] ) + ( 4 [ nil ] ))) + + '("nextfloatfoot" + (TeX-arg-conditional (y-or-n-p "With optional even pages? ") + ( [ 3 ] nil nil nil nil [ nil ] ) + ( 4 [ nil ] ))) + + '("nextfloathead*" 4 [ nil ] ) + '("nextfloatfoot*" 4 [ nil ] ) + + ;; 7. Extra marks: I'm not clear how the marks commands work; + ;; until then, I ignore them + ) + + ;; Don't increase indent at \ifsamemark: + (add-to-list 'LaTeX-indent-begin-exceptions-list "ifsamemark" t) + (LaTeX-indent-commands-regexp-make) + + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("newpagestyle" "{[{") + ("renewpagestyle" "{[{") + ("settitlemarks" "*{") + ("widenhead" "*[[{{") + ("TitlepsPatchSection" "*{") + ("newtitlemark" "*{") + ("pretitlemark" "*{{") + ("nextfloathead" "*[[[{{{{[") + ("nextfloatfoot" "*[[[{{{{[")) + 'function))) + TeX-dialect) + +(defvar LaTeX-titleps-package-options + '(;; 4. Headline/footline width + "nopatches" + + ;; 5. Marks + "outermarks" "innermarks" "topmarks" "botmarks" + + ;; 6. Running heads with floats + "psfloats" + + ;; 7. Extra marks + "extramarks") + "Package options for the titleps package.") + +;;; titleps.el ends here diff --git a/elpa/auctex-13.1.3/style/titleps.elc b/elpa/auctex-13.1.3/style/titleps.elc Binary files differnew file mode 100644 index 0000000..f3649d4 --- /dev/null +++ b/elpa/auctex-13.1.3/style/titleps.elc diff --git a/elpa/auctex-13.1.3/style/titlesec.el b/elpa/auctex-13.1.3/style/titlesec.el new file mode 100644 index 0000000..c3af038 --- /dev/null +++ b/elpa/auctex-13.1.3/style/titlesec.el @@ -0,0 +1,269 @@ +;;; titlesec.el --- AUCTeX style for `titlesec.sty' (v2.11) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `titlesec.sty' (v2.11) from +;; 2019/07/16. `titlesec.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-titlesec-key-val-options + '(("page" ("even" "odd")) + ("numberless")) + "Key=value options for \"\\titleformat\" and \"\\titlespacing\" +macros provided by \"titlesec.sty\".") + +(defvar LaTeX-titlesec-section-command-list + '("part" + "chapter" + "section" + "subsection" + "subsubsection" + "paragraph" + "subparagraph") + "List of sectioning commands available in \"titlesec.sty\".") + +(defvar LaTeX-titlesec-section-shape-list + '("hang" + "block" + "display" + "runin" + "leftmargin" + "rightmargin" + "drop" + "wrap" + "frame") + "List of sectioning shapes available for \"\\titleformat\" command.") + +(defun LaTeX-titlesec-section-command-list () + "Remove \"chapter\" from variable +`LaTeX-titlesec-section-command-list' and return the remainder. +Removal is based on the return value of function +`LaTeX-largest-level'. Items returned are prefixed with +`TeX-esc'." + (mapcar (lambda (elt) (concat TeX-esc elt)) + (if (< (LaTeX-largest-level) 2) + (symbol-value 'LaTeX-titlesec-section-command-list) + (remove "chapter" LaTeX-titlesec-section-command-list)))) + +(defun LaTeX-arg-titlesec-titlespec (optional) + "Insert the first argument of \"\\titleformat\" and \"\\titlespacing\". +Depending on returned value of function `LaTeX-largest-level', +append a \"name\" key with corresponding values to +`LaTeX-titlesec-key-val-options'. The values are retrieved from +`LaTeX-titlesec-section-command-list'. The values of this list +are also added stand-alone as keys. If OPTIONAL is non-nil, +insert the argument in brackets." + (let ((keyvals + (TeX-read-key-val + optional + (append + `(("name" + ,(mapcar (lambda (elt) (concat TeX-esc elt)) + (if (< (LaTeX-largest-level) 2) + (symbol-value 'LaTeX-titlesec-section-command-list) + (remove "chapter" LaTeX-titlesec-section-command-list))))) + (mapcar #'list + (mapcar (lambda (elt) (concat TeX-esc elt)) + (if (< (LaTeX-largest-level) 2) + (symbol-value 'LaTeX-titlesec-section-command-list) + (remove "chapter" LaTeX-titlesec-section-command-list)))) + LaTeX-titlesec-key-val-options) + "Sectioning command"))) + (TeX-argument-insert keyvals optional))) + +(TeX-add-style-hook + "titlesec" + (lambda () + + ;; Load "titleps.el" when "pagestyles" package option is given + (when (LaTeX-provided-package-options-member "titlesec" "pagestyles") + (TeX-run-style-hooks "titleps")) + + (TeX-add-symbols + ;; 2.4. Tools + '("titlelabel" t) + + ;; \titleformat*{<command>}{<format>} + '("titleformat*" (LaTeX-arg-titlesec-titlespec) t) + + ;; 3. Advanced Interface + ;; \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>] + '("titleformat" + (LaTeX-arg-titlesec-titlespec) + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Shape") + LaTeX-titlesec-section-shape-list] + (TeX-arg-conditional (y-or-n-p "With optional after-code? ") + (4 [nil]) + (4))) + + '("chaptertitlename" 0) + + ;; 3.2. Spacing + ;; \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}[<right-sep>] + '("titlespacing" + (LaTeX-arg-titlesec-titlespec) + (TeX-arg-length "Left margin") + (TeX-arg-length "Before vertical space") + (TeX-arg-length "Space between title and text") + [TeX-arg-length "Right margin"]) + + '("titlespacing*" + (LaTeX-arg-titlesec-titlespec) + (TeX-arg-length "Left margin") + (TeX-arg-length "Before vertical space") + (TeX-arg-length "Space between title and text") + [TeX-arg-length "Right margin"]) + + ;; 3.3. Spacing related tools + '("filright" 0) + '("filcenter" 0) + '("filleft" 0) + '("fillast" 0) + '("filinner" 0) + '("filouter" 0) + '("wordsep" 0) + '("nostruts" 0) + + ;; 3.4. Rules + '("titleline" + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Alignment") + '("l" "r" "c")] + t) + + '("titlerule" [TeX-arg-length "Rule height"]) + + '("titlerule*" [TeX-arg-length "Box width"] "Text") + + '("iftitlemeasuring" 2) + + ;; 3.5. Page styles + '("assignpagestyle" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titlesec-section-command-list)) + (TeX-arg-pagestyle)) + + ;; 3.9. Creating new levels and changing the class + '("titleclass" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titlesec-section-command-list)) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Class") + '("page" "top" "straight")) + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Super level command") + (LaTeX-titlesec-section-command-list)]) ) + + ;; Don't increase indent at \iftitlemeasuring: + (add-to-list 'LaTeX-indent-begin-exceptions-list "iftitlemeasuring" t) + (LaTeX-indent-commands-regexp-make) + + ;; 3.4. Rules: A variant of \titleline to be used only with calcwidth + (when (LaTeX-provided-package-options-member "titlesec" "calcwidth") + (TeX-add-symbols + '("titleline*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Alignment") + '("l" "r" "c")) + t))) + + ;; The length of the longest line is returned in \titlewidth + (LaTeX-add-lengths "titlewidth" + "titlewidthlast" + "titlewidthfirst") + + ;; Fontification: We only add macros which are used at top level; + ;; most of macros definded above are intended to be used in + ;; arguments of \titleformat + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("titlelabel" "{") + ;; + ;; \titleformat comes in 2 flavors: + ;; with *, it takes only 2 mandatory + ;; argument; w/o *, a lot more. It is + ;; not (yet) possible to realize this + ;; behaviour within font-latex. Hence + ;; we reduce the fontification to the + ;; first 2 mandatory arguments and + ;; ignore the rest. *[ are optional anyway. + ("titleformat" "*{[{") + ("titlespacing" "*{{{{[") + ("iftitlemeasuring" "{{") + ("assignpagestyle" "{{") + ("titleclass" "{[{[")) + 'function))) + TeX-dialect) + +(defvar LaTeX-titlesec-package-options + '(;; 2.1. Format + "rm" "sf" "tt" "md" "bf" "up" "it" "sl" "sc" + "big" "medium" "small" "tiny" + "raggedleft" "center" "raggedright" + + ;; 2.2. Spacing + "compact" + + ;; 2.3. Uppercase + "uppercase" + + ;; 3.3. Spacing related tools + "indentafter" "noindentafter" + "rigidchapters" "rubberchapters" + "bottomtitles" "nobottomtitles" "nobottomtitles*" + "aftersep" "largestsep" "pageatnewline" + "nostruts" + + ;; 3.4. Rules + "calcwidth" + + ;; 3.7. Other Package Options + "explicit" + "newparttoc" + "oldparttoc" + "clearempty" + "toctitles" + "newlinetospace" + "loadonly" + + ;; 5. titleps and Page Styles + "pagestyles") + "Package options for the titlesec package.") + +;;; titlesec.el ends here diff --git a/elpa/auctex-13.1.3/style/titlesec.elc b/elpa/auctex-13.1.3/style/titlesec.elc Binary files differnew file mode 100644 index 0000000..66c91cf --- /dev/null +++ b/elpa/auctex-13.1.3/style/titlesec.elc diff --git a/elpa/auctex-13.1.3/style/titletoc.el b/elpa/auctex-13.1.3/style/titletoc.el new file mode 100644 index 0000000..c0ac512 --- /dev/null +++ b/elpa/auctex-13.1.3/style/titletoc.el @@ -0,0 +1,198 @@ +;;; titletoc.el --- AUCTeX style for `titletoc.sty' (v1.6) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-09-19 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `titletoc.sty' (v1.6) from +;; 2011/12/15. `titletoc.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-titletoc-section-command-list + '("part" + "chapter" + "section" + "subsection" + "subsubsection" + "paragraph" + "subparagraph" + "figure" + "table") + "List of sectioning commands available in \"titletoc.sty\". +Other environments producing a \"Table of ENVIRONMENT\" (figure, +table) are also available in this variable.") + +(defun LaTeX-titletoc-section-command-list () + "Remove \"chapter\" from variable +`LaTeX-titletoc-section-command-list' and return the remainder. +Removal is based on the return value of function +`LaTeX-largest-level'." + (if (< (LaTeX-largest-level) 2) + (symbol-value 'LaTeX-titletoc-section-command-list) + (remove "chapter" LaTeX-titletoc-section-command-list))) + +;; Setup for \contentsuse: +(TeX-auto-add-type "titletoc-contentsuse" "LaTeX") + +(defvar LaTeX-titletoc-contentsuse-regexp + '("\\\\contentsuse{\\([^}]+\\)}" + 1 LaTeX-auto-titletoc-contentsuse) + "Matches the argument of \\contentsuse from titletoc package.") + +(defun LaTeX-titletoc-auto-prepare () + "Clear `LaTeX-auto-titletoc-contentsuse' before parsing." + (setq LaTeX-auto-titletoc-contentsuse nil)) + +(defun LaTeX-titletoc-auto-cleanup () + "Move parsed arguments of \"\\contentsuse\" to the variable +`LaTeX-titletoc-section-command-list'." + (when (LaTeX-titletoc-contentsuse-list) + (make-local-variable 'LaTeX-titletoc-section-command-list) + (dolist (content (mapcar #'car (LaTeX-titletoc-contentsuse-list))) + (add-to-list 'LaTeX-titletoc-section-command-list content)))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-titletoc-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-titletoc-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "titletoc" + (lambda () + + ;; Add titletoc to the parser + (TeX-auto-add-regexp LaTeX-titletoc-contentsuse-regexp) + + (TeX-add-symbols + ;; Basic macros + ;; \dottedcontents{<section>}[<left>]{<above-code>} + ;; {<label width>}{<leader width>} + '("dottedcontents" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titletoc-section-command-list)) + [ TeX-arg-length "Left margin" ] 3) + + ;; \titlecontents{<section>}[<left>]{<above-code>} + ;; {<numbered-entry-format>}{<numberless-entry-format>} + ;; {<filler-page-format>}[<below-code>] + '("titlecontents" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titletoc-section-command-list)) + [ TeX-arg-length "Left margin" ] + (TeX-arg-conditional (y-or-n-p "With optional below code argument? ") + (4 [nil]) + (4))) + + ;; \titlecontents*{<section>}[<left>]{<above-code>} + ;; {<numbered-entry-format>}{<numberless-entry-format>} + ;; {<filler-page-format>}[<separator>] + '("titlecontents*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Sectioning command") + (LaTeX-titletoc-section-command-list)) + [ TeX-arg-length "Left margin" ] + (TeX-arg-conditional (y-or-n-p "With optional separator argument? ") + (4 [nil]) + (4))) + + ;; \contentsmargin[<correction>]{<right>} + '("contentsmargin" [ "Correction" ] "Right margin") + + '("thecontentslabel" 0) + + '("thecontentspage" 0) + + '("contentslabel" [ "Format" ] (TeX-arg-length "Space")) + + '("contentspage" [ "Format" ]) + + '("contentspush" t) + + ;; Check if newfloat.el is loaded and any new environment is + ;; defined with it. titletoc.sty can also be used to customize + ;; new environments defined with newfloat.sty. As a prerequisite, + ;; the environments must be introduced to titletoc.sty with + ;; \contentuse{ENV} and then can be used as argument to \titlecontents. + '("contentsuse" + (TeX-arg-eval + (lambda () + (let ((name (if (and (member "newfloat" (TeX-active-styles)) + (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (completing-read + (TeX-argument-prompt nil nil "Name of contents") + (mapcar #'car + (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + (TeX-read-string + (TeX-argument-prompt nil nil "Name of contents"))))) + (make-local-variable 'LaTeX-titletoc-section-command-list) + (add-to-list 'LaTeX-titletoc-section-command-list name) + (format "%s" name)))) + "File extension") + + ;; 6.3. Partial TOC's + '("startcontents" [ "Name" ]) + + '("stopcontents" [ "Name" ]) + + '("resumecontents" [ "Name" ]) + + '("printcontents" [ "Name" ] "Prefix" "Start level" t) + + ;; 6.4. Partial lists + '("startlist" [ "Name" ] "List") + + '("stoplist" [ "Name" ] "List") + + '("resumelist" [ "Name" ] "List") + + '("printlist" [ "Name" ] "Prefix" t) ) + + ;; Fontification: We only add macros which are used at top level; + ;; most of macros definded above are intended to be used in + ;; arguments of \dottedcontents or \titlecontents + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("dottedcontents" "{[{{{") + ("titlecontents" "*{[{{{[[[") + ("contentsmargin" "[{") + ("contentsuse" "{{")) + 'function)) ) + TeX-dialect) + +(defvar LaTeX-titletoc-package-options + '("leftlabels" "rightlabels" "dotinlabels") + "Package options for the titletoc package.") + +;;; titletoc.el ends here diff --git a/elpa/auctex-13.1.3/style/titletoc.elc b/elpa/auctex-13.1.3/style/titletoc.elc Binary files differnew file mode 100644 index 0000000..3e38ce9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/titletoc.elc diff --git a/elpa/auctex-13.1.3/style/transparent.el b/elpa/auctex-13.1.3/style/transparent.el new file mode 100644 index 0000000..4cdd5ca --- /dev/null +++ b/elpa/auctex-13.1.3/style/transparent.el @@ -0,0 +1,60 @@ +;;; transparent.el --- AUCTeX style for `transparent.sty' (v1.0) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-08-15 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `transparent.sty' (v1.0) from 2007/01/08. +;; `transparent.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "transparent" + (lambda () + (TeX-add-symbols + '("transparent" "Transparency value (between 0,1)") + '("texttransparent" "Transparency value (between 0,1)" t)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("transparent" "{")) + 'type-declaration) + (font-latex-add-keywords '(("texttransparent" "{{")) + 'type-command))) + TeX-dialect) + +(defvar LaTeX-transparent-package-options nil + "Package options for the transparent package.") + +;;; transparent.el ends here diff --git a/elpa/auctex-13.1.3/style/transparent.elc b/elpa/auctex-13.1.3/style/transparent.elc Binary files differnew file mode 100644 index 0000000..bcd4ffe --- /dev/null +++ b/elpa/auctex-13.1.3/style/transparent.elc diff --git a/elpa/auctex-13.1.3/style/treport.el b/elpa/auctex-13.1.3/style/treport.el new file mode 100644 index 0000000..f6aaf13 --- /dev/null +++ b/elpa/auctex-13.1.3/style/treport.el @@ -0,0 +1,45 @@ +;;; treport.el - Special code for treport class. -*- lexical-binding: t; -*- + +;; Copyright (C) 2017, 2020 Free Software Foundation, Inc. + +;; Author: Ikumi Keita <ikumi@ikumi.que.jp> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-03-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; Please write me. + +;;; Code: + +(require 'tex) + +(TeX-load-style "jreport") +(defvar LaTeX-treport-class-options LaTeX-jreport-class-options + "Class options for the treport class.") + +(TeX-add-style-hook + "treport" + (lambda () + (TeX-run-style-hooks "jreport" "plext")) + TeX-dialect) + +;;; treport.el ends here diff --git a/elpa/auctex-13.1.3/style/treport.elc b/elpa/auctex-13.1.3/style/treport.elc Binary files differnew file mode 100644 index 0000000..7d44512 --- /dev/null +++ b/elpa/auctex-13.1.3/style/treport.elc diff --git a/elpa/auctex-13.1.3/style/truncate.el b/elpa/auctex-13.1.3/style/truncate.el new file mode 100644 index 0000000..264d935 --- /dev/null +++ b/elpa/auctex-13.1.3/style/truncate.el @@ -0,0 +1,59 @@ +;;; truncate.el --- AUCTeX style for `truncate.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-01-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `truncate.sty' v3.6 form 2001-08-20. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "truncate" + (lambda () + + (TeX-add-symbols + '("truncate" [ "Marker" ] (TeX-arg-length "Width") "Text") + '("TruncateMarker" 0)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("truncate" "[{{")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-truncate-package-options + '("breakwords" "breakall" "hyphenate" "fit") + "Package options for the truncate package.") + +;;; truncate.el ends here diff --git a/elpa/auctex-13.1.3/style/truncate.elc b/elpa/auctex-13.1.3/style/truncate.elc Binary files differnew file mode 100644 index 0000000..a8c899c --- /dev/null +++ b/elpa/auctex-13.1.3/style/truncate.elc diff --git a/elpa/auctex-13.1.3/style/ulem.el b/elpa/auctex-13.1.3/style/ulem.el new file mode 100644 index 0000000..f84fcc6 --- /dev/null +++ b/elpa/auctex-13.1.3/style/ulem.el @@ -0,0 +1,127 @@ +;;; ulem.el --- AUCTeX style for `ulem.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2012-2021 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `ulem.sty' dated 2019-11-18. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "ulem" + (lambda () + (TeX-add-symbols + '("uline" 1) + '("uuline" 1) + '("uwave" 1) + '("sout" 1) + '("xout" 1) + '("dashuline" 1) + '("dotuline" 1) + ;; can be used with \renewcommand + "ULthickness" + ;; custom commands can be defined with these commands; see the + ;; documentation for an example + "ULon" + ;; \markoverwith takes on argument + '("markoverwith" 1) + ;; \useunder {underline_command}{font_declaration}{font_command} + ;; replaces occurences of font_declaration and font_command with the + ;; underline_command + '("useunder" TeX-arg-ulem-useunder + TeX-arg-ulem-fontdecl TeX-arg-ulem-fontcmd)) + + ;; \ULdepth can be changed with \setlength + (LaTeX-add-lengths "ULdepth") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; Tell font-lock about the update. + (font-latex-add-keywords '(("useunder" "{{{")) + 'function) + (font-latex-add-keywords '(("uline" "{") + ("uuline" "{") + ("uwave" "{") + ("sout" "{") + ("xout" "{") + ("dashuline" "{") + ("dotuline" "{")) + 'textual))) + TeX-dialect) + +(defvar LaTeX-ulem-fontdecl + (mapcar (lambda (str) (concat "\\" str)) + '("itshape" "bfseries" "scshape" + "ttfamily" "upshape" "mdseries" + "rmfamily" "sffamily" "slshape")) + "List of font declaration commands in LaTeX.") + +(defvar LaTeX-ulem-fontcmd + (mapcar (lambda (str) (concat "\\" str)) + '("textit" "textbf" "textsc" + "texttt" "textup" "textmd" + "textrm" "textsf" "textsl")) + "List of font commands in LaTeX") + +(defun TeX-arg-ulem-fontdecl (optional &optional prompt) + "Prompt for the font-declaration un \\useunder." + (TeX-argument-insert + (completing-read (TeX-argument-prompt + optional prompt "Font declaration") + LaTeX-ulem-fontdecl nil t) + optional)) + +(defun TeX-arg-ulem-fontcmd (optional &optional prompt) + "Prompt for the font-declaration un \\useunder." + (TeX-argument-insert + (completing-read (TeX-argument-prompt + optional prompt "Font command") + LaTeX-ulem-fontcmd nil t) + optional)) + +;; adapted from url.el: TeX-arg-urlstyle +(defun TeX-arg-ulem-useunder (optional &optional prompt) + "Prompt for underline command used in \\useunder." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Underline command") + (mapcar (lambda (str) (concat "\\" str)) + '("uline" "uuline" + "uwave" "sout" "xout" + "dashuline" "dotuline")) + nil t) + optional)) + +(defvar LaTeX-ulem-package-options + '("UWforbf" "ULforem" "normalbf" "normalem") + "Package options for the ulem package.") + +;;; ulem.el ends here diff --git a/elpa/auctex-13.1.3/style/ulem.elc b/elpa/auctex-13.1.3/style/ulem.elc Binary files differnew file mode 100644 index 0000000..fb885af --- /dev/null +++ b/elpa/auctex-13.1.3/style/ulem.elc diff --git a/elpa/auctex-13.1.3/style/unicode-math.el b/elpa/auctex-13.1.3/style/unicode-math.el new file mode 100644 index 0000000..11217a3 --- /dev/null +++ b/elpa/auctex-13.1.3/style/unicode-math.el @@ -0,0 +1,82 @@ +;;; unicode-math.el --- AUCTeX style for `unicode-math.sty' version 0.7e. -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2018, 2020 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <giordano.mose@libero.it> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `unicode-math.sty' version 0.7e. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-unicode-math-package-options-list + '(("math-style" ("ISO" "TeX" "french" "upright" "literal")) + ("bold-style" ("ISO" "TeX" "upright" "literal")) + ("sans-style" ("italic" "upright" "literal")) + ("nabla" ("italic" "upright" "literal")) + ("partial" ("upright" "italic" "literal")) + ("vargreek-shape" ("unicode" "TeX")) + ("colon" ("literal" "TeX")) + ("slash-delimiter" ("ascii" "frac" "div"))) + "Package options for the unicode-math package.") + +(defvar LaTeX-unicode-math-setmathfont-options + (append LaTeX-unicode-math-package-options-list + '(("range") + ("script-font") + ("script-features") + ("sscript-font") + ("sscript-features"))) + "Options for the setmathfont macro of the unicode-math package.") + +(TeX-add-style-hook + "unicode-math" + (lambda () + (TeX-run-style-hooks "ifxetex" "ifluatex" "expl3" "xparse" "l3keys2e" + "fontspec" "catchfile" "fix-cm" "filehook") + (TeX-add-symbols + '("setmathfont" [TeX-arg-key-val LaTeX-unicode-math-setmathfont-options] + "Math font name") + '("unimathsetup" (TeX-arg-key-val LaTeX-unicode-math-package-options-list))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("setmathfont" "[{") + ("unimathsetup" "{")) + 'function))) + TeX-dialect) + +(defun LaTeX-unicode-math-package-options () + "Prompt for package options for the unicode-math package." + (TeX-read-key-val t LaTeX-unicode-math-package-options-list)) + +;;; unicode-math.el ends here diff --git a/elpa/auctex-13.1.3/style/unicode-math.elc b/elpa/auctex-13.1.3/style/unicode-math.elc Binary files differnew file mode 100644 index 0000000..c38427f --- /dev/null +++ b/elpa/auctex-13.1.3/style/unicode-math.elc diff --git a/elpa/auctex-13.1.3/style/unicodefonttable.el b/elpa/auctex-13.1.3/style/unicodefonttable.el new file mode 100644 index 0000000..3253df1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/unicodefonttable.el @@ -0,0 +1,134 @@ +;;; unicodefonttable.el --- AUCTeX style for `unicodefonttable.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-10-23 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `unicodefonttable.sty' v1.0f form +;; 2021-10-29. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) +(declare-function LaTeX-xcolor-definecolor-list "xcolor" ()) + +(defvar LaTeX-unicodefonttable-key-val-options + '(("header" ("true" "false")) + ("noheader" ("true" "false")) + ("title-format") + ("title-format-cont") + ("display-block" ("titles" "rules" "none")) + ("hex-digits" ("block" "foot" "head" "head+foot" "none")) + ("hex-digits-font" ("\\rmfamily" "\\sffamily" "\\ttfamily" + "\\mdseries" "\\bfseries" "\\upshape" + "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" + "\\normalfont")) + ("color") + ("statistics" ("true" "false")) + ("nostatistics" ("true" "false")) + ("statistics-font" ("\\rmfamily" "\\sffamily" "\\ttfamily" + "\\mdseries" "\\bfseries" "\\upshape" + "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" + "\\normalfont")) + ("statistics-format") + ("glyph-width") + ("missing-glyph") + ("missing-glyph-font" ("\\rmfamily" "\\sffamily" "\\ttfamily" + "\\mdseries" "\\bfseries" "\\upshape" + "\\itshape" "\\slshape" "\\scshape" + "\\tiny" "\\scriptsize" "\\footnotesize" + "\\small" "\\normalsize" "\\large" + "\\Large" "\\LARGE" "\\huge" "\\Huge" + "\\normalfont")) + ("missing-glyph-color") + ("compare-with") + ("compare-color") + ("compare-bgcolor") + ("statistics-compare-format") + ("range-start") + ("range-end")) + "Key=value options for unicodefonttable macros.") + +(defun LaTeX-unicodefonttable-key-val-options () + "Return an updated list of key=vals from unicodefonttable package." + (append + (let ((colors (mapcar #'car (LaTeX-xcolor-definecolor-list))) + (keys '("color" + "missing-glyph-color" + "compare-color" + "compare-bgcolor")) + result) + (dolist (key keys result) + (push (list key colors) result))) + LaTeX-unicodefonttable-key-val-options)) + +(TeX-add-style-hook + "unicodefonttable" + (lambda () + + (TeX-run-style-hooks "fontspec" "xcolor" "caption" + "longtable" "booktabs") + + (TeX-add-symbols + '("displayfonttable" + [TeX-arg-key-val (LaTeX-unicodefonttable-key-val-options)] + LaTeX-fontspec-arg-font + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + '("displayfonttable*" + [TeX-arg-key-val (LaTeX-unicodefonttable-key-val-options)] + LaTeX-fontspec-arg-font + [TeX-arg-key-val (LaTeX-fontspec-font-features) "Font features"]) + + '("fonttablesetup" + (TeX-arg-key-val (LaTeX-unicodefonttable-key-val-options))) + + "fonttableglyphcount") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("displayfonttable" "[{[") + ("displayfonttable*" "[{[") + ("fonttableglyphcount" "")) + 'function))) + TeX-dialect) + +(defvar LaTeX-unicodefonttable-package-options nil + "Package options for the unicodefonttable package.") + +;;; unicodefonttable.el ends here diff --git a/elpa/auctex-13.1.3/style/unicodefonttable.elc b/elpa/auctex-13.1.3/style/unicodefonttable.elc Binary files differnew file mode 100644 index 0000000..a07eba8 --- /dev/null +++ b/elpa/auctex-13.1.3/style/unicodefonttable.elc diff --git a/elpa/auctex-13.1.3/style/units.el b/elpa/auctex-13.1.3/style/units.el new file mode 100644 index 0000000..c7b4a7d --- /dev/null +++ b/elpa/auctex-13.1.3/style/units.el @@ -0,0 +1,57 @@ +;;; units.el --- AUCTeX style for the LaTeX package `units.sty' (v0.9b) -*- lexical-binding: t; -*- + +;; Copyright (C) 2004, 2005, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Christian Schlauer <cschl@arcor.de> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `units.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "units" + (lambda () + (TeX-add-symbols + '("unit" [ "Value" ] "Unit") + '("unitfrac" [ "Value" ] "Unit in numerator" "Unit in denominator")) + ;; units.sty requires the package nicefrac.sty, thus we enable the + ;; macros of nicefrac.sty, too + (TeX-run-style-hooks "nicefrac") + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("unit" "[{") ("unitfrac" "[{{")) 'textual))) + TeX-dialect) + +(defvar LaTeX-units-package-options '("tight" "loose") + "Package options for the units package.") + +;;; units.el ends here diff --git a/elpa/auctex-13.1.3/style/units.elc b/elpa/auctex-13.1.3/style/units.elc Binary files differnew file mode 100644 index 0000000..eecd62b --- /dev/null +++ b/elpa/auctex-13.1.3/style/units.elc diff --git a/elpa/auctex-13.1.3/style/url.el b/elpa/auctex-13.1.3/style/url.el new file mode 100644 index 0000000..af524bf --- /dev/null +++ b/elpa/auctex-13.1.3/style/url.el @@ -0,0 +1,225 @@ +;;; url.el --- AUCTeX style for `url.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2021 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@iwi.uni-sb.de> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-10-13 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `url.sty' v3.4 dated 2013-09-16. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +;; Setup for \DeclareUrlCommand: +(TeX-auto-add-type "url-DeclareUrlCommand" "LaTeX") + +(defvar LaTeX-url-DeclareUrlCommand-regexp + `(,(concat + "\\\\DeclareUrlCommand" + "[ \n\r\t]*" + "{?" + "\\\\\\([a-zA-Z]+\\)" + "}?") + 1 LaTeX-auto-url-DeclareUrlCommand) + "Matches the argument of `\\DeclareUrlCommand' from `url' package.") + +(defun LaTeX-url-DeclareUrlCommand-prepare () + "Process macros parsed from `\\DeclareUrlCommand'." + ;; \DeclareUrlCommand\abc{settings}: makes \abc{ } like \url{ } with + ;; settings. + (when (LaTeX-url-DeclareUrlCommand-list) + (dolist (cmd (mapcar #'car (LaTeX-url-DeclareUrlCommand-list))) + (TeX-add-symbols `(,cmd TeX-arg-verb-delim-or-brace)) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local cmd) + (add-to-list 'LaTeX-verbatim-macros-with-braces-local cmd)) + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (fboundp 'font-latex-set-syntactic-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords + (mapcar (lambda (cmd) + (list cmd "")) + (mapcar #'car (LaTeX-url-DeclareUrlCommand-list))) + 'reference) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords)))) + +;; Setup for \urldef: +(TeX-auto-add-type "url-urldef" "LaTeX") + +(defvar LaTeX-url-urldef-regexp + `(,(concat + "\\\\urldef" + "[ \n\r\t]*" + "{?" + "\\\\\\([a-zA-Z]+\\)" + "}?") + 1 LaTeX-auto-url-urldef) + "Matches the argument of `\\urldef' from `url' package.") + +(defun LaTeX-url-urldef-prepare () + "Process macros parsed from `\\urldef'." + (when (LaTeX-url-urldef-list) + (mapc #'TeX-add-symbols (mapcar #'car (LaTeX-url-urldef-list))) + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords + (mapcar (lambda (cmd) + (list cmd "")) + (mapcar #'car (LaTeX-url-urldef-list))) + 'reference)))) + +(defun LaTeX-url-auto-prepare () + "Clear `LaTeX-auto-url-*' before parsing." + (setq LaTeX-auto-url-DeclareUrlCommand nil + LaTeX-auto-url-urldef nil)) + +(defun LaTeX-url-auto-cleanup () + "Process parsed elements from url.sty." + (LaTeX-url-DeclareUrlCommand-prepare) + (LaTeX-url-urldef-prepare)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-url-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-url-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-url-urlstyle (optional &optional prompt) + "Prompt for style used in \\urlstyle with completion. +If OPTIONAL is non-nil, indicate it in the minibuffer during the +query and insert the result in brackets. PROMPT replaces the +standard one." + (TeX-argument-insert + (completing-read (TeX-argument-prompt optional prompt "Style") + '("rm" "same" "sf" "tt")) + optional)) + +(defun TeX-arg-url-DeclareUrlCommand (optional &optional prompt) + "Prompt for arguments of \\DeclareUrlCommand with completion. +If OPTIONAL is non-nil, indicate it in the minibuffer during the +query and insert the result in brackets. PROMPT replaces the +standard one." + (let ((cmd (TeX-read-string + (TeX-argument-prompt optional prompt "Command: \\" t))) + (style (completing-read + (TeX-argument-prompt optional prompt "Style") + '("rm" "same" "sf" "tt")))) + (insert TeX-esc cmd TeX-grop) + (when (and style (not (string= style ""))) + (insert TeX-esc "urlstyle" TeX-grop style TeX-grcl)) + (insert TeX-grcl) + (LaTeX-add-url-DeclareUrlCommands cmd) + (LaTeX-url-DeclareUrlCommand-prepare))) + +(defun TeX-arg-url-urldef (optional &optional prompt) + "Prompt for arguments of \\urldef with completion." + (let ((cmd (TeX-read-string + (TeX-argument-prompt optional prompt "Command: \\" t)))) + (TeX-argument-insert cmd optional TeX-esc) + (LaTeX-add-url-urldefs cmd) + (LaTeX-url-urldef-prepare)) + (TeX-insert-macro + (completing-read + (TeX-argument-prompt optional prompt "Macro: \\" t) + (append (mapcar #'car (LaTeX-url-DeclareUrlCommand-list)) + '("url"))))) + +(TeX-add-style-hook + "url" + (lambda () + + ;; Add url to the parser + (TeX-auto-add-regexp LaTeX-url-DeclareUrlCommand-regexp) + (TeX-auto-add-regexp LaTeX-url-urldef-regexp) + + ;; New symbols + (TeX-add-symbols + ;; Macros for defining new styles, changing font, linebreaks etc. + "Url" + "UrlBigBreakPenalty" + "UrlBigBreaks" + "UrlBreakPenalty" + "UrlBreaks" + "UrlFont" + "UrlLeft" + "UrlNoBreaks" + "UrlOrds" + "UrlRight" + "UrlSpecials" + + ;; "hyperref" redefines \url so that the argument is only in + ;; braces. We check here if hyperref is loaded: + '("url" (TeX-arg-conditional (member "hyperref" (TeX-style-list)) + ("Url") + ((TeX-arg-verb-delim-or-brace "Url")))) + + '("urldef" TeX-arg-url-urldef) + + '("urlstyle" TeX-arg-url-urlstyle)) + + ;; For '\path', use the facilities provided by this style. Also + ;; don't add "path" for fontification below since + ;; `LaTeX-url-DeclareUrlCommand-prepare' takes care of it. + (LaTeX-add-url-DeclareUrlCommands "path") + (LaTeX-url-DeclareUrlCommand-prepare) + + ;; Don't do the same for '\url' because hyperref.el has some code + ;; to remove "url" from `LaTeX-verbatim-macros-with-delims-local', + ;; but we check here as well if "hyperref" is already loaded: + (unless (member "hyperref" (TeX-style-list)) + (add-to-list 'LaTeX-verbatim-macros-with-delims-local "url")) + (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url") + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("url" "")) + 'reference) + ;; Don't fontify the second argument of 'DeclareUrlCommand' since + ;; it gets the `font-latex-verbatim-face' from the first + ;; argument. Same applies also to '\urldef' where we don't + ;; fontify any arguments: + (font-latex-add-keywords '(("DeclareUrlCommand" "\\") + ("urldef" "") + ("urlstyle" "{")) + 'function) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-url-package-options '("hyphens" "obeyspaces" "spaces" + "allowmove" "lowtilde") + "Package options for the url package.") + +;;; url.el ends here diff --git a/elpa/auctex-13.1.3/style/url.elc b/elpa/auctex-13.1.3/style/url.elc Binary files differnew file mode 100644 index 0000000..7310883 --- /dev/null +++ b/elpa/auctex-13.1.3/style/url.elc diff --git a/elpa/auctex-13.1.3/style/varioref.el b/elpa/auctex-13.1.3/style/varioref.el new file mode 100644 index 0000000..32134c1 --- /dev/null +++ b/elpa/auctex-13.1.3/style/varioref.el @@ -0,0 +1,112 @@ +;;; varioref.el --- AUCTeX style for `varioref.sty' (v1.6b) -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2013, 2015, 2018--2020 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.leidenuniv.nl> +;; Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `varioref.sty' (v1.6b) from 2019/09/08. +;; `varioref.sty' is a standard LaTeX package and part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'tex-style) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "varioref" + (lambda () + + (TeX-add-symbols + ;; 3 The user interface + '("vref" TeX-arg-ref) + '("vpageref" [ "Same page text" ] [ "Different page text" ] TeX-arg-ref) + '("vrefrange" [ "Same page text" ] TeX-arg-ref TeX-arg-ref) + '("vpagerefrange" [ "Same page text" ] TeX-arg-ref TeX-arg-ref) + "vpagerefnum" + '("vpagerefcompare" 4) + '("vpagerefnearby" 3) + '("vref*" TeX-arg-ref) + '("vpageref*" [ "Same page text" ] [ "Different page text" ] TeX-arg-ref) + '("vrefrange*" [ "Same page text" ] TeX-arg-ref TeX-arg-ref) + '("vpagerefrange*" [ "Same page text" ] TeX-arg-ref TeX-arg-ref) + + '("Vref" TeX-arg-ref) + '("Vref*" TeX-arg-ref) + + ;; 5 Customization + "reftextbefore" "reftextfacebefore" + "reftextafter" "reftextfaceafter" + "reftextfaraway" "vreftextvario" + "reftextpagerange" "reftexlabelrange" + "vrefwarning" "vrefshowerrors" + '("fullref" TeX-arg-ref)) + + ;; Install completion for labels. Only offer completion for + ;; commands that take only one reference as an argument + ;; FIXME: The first 3 entries can be reduced to + ;; ("\\\\[Vv]ref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") ??? + (setq TeX-complete-list + (append + '(("\\\\[Vv]ref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\vref\\*?{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\vref\\*{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\fullref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}") + ("\\\\vpageref\\*?\\(\\[[^]]*\\]\\)*{\\([^{}\n\r\\%,]*\\)" + 2 LaTeX-label-list "}")) + TeX-complete-list)) + + ;; Fontification + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(;; vref is already in font-latex.el, + ;; so don't add it here again + ("vpageref" "*[[{") + ("vrefrange" "*[{{") + ("vpagerefrange" "*[{{") + ("Vref" "*{") + ("fullref" "{")) + 'reference)) + + ;; Activate RefTeX reference style. + (and LaTeX-reftex-ref-style-auto-activate + (fboundp 'reftex-ref-style-activate) + (reftex-ref-style-activate "Varioref"))) + TeX-dialect) + +(defvar LaTeX-varioref-package-options + '("afrikaans" "american" "arabic" "austrian" "naustrian" "basque" + "bahasam" "brazil" "breton" "bulgarian" "catalan" "croatian" + "czech" "danish" "dutch" "english" "esperanto" "finnish" "french" + "galician" "german" "ngerman" "greek" "icelandic" "italian" "magyar" + "norsk" "nynorsk" "polish" "portuges" "romanian" "russian" + "slovak" "slovene" "spanish" "swedish" "turkish" "ukrainian" + "francais" "germanb" "draft" "final" "space" "nospace") + "Package options for the varioref package.") + +;;; varioref.el ends here diff --git a/elpa/auctex-13.1.3/style/varioref.elc b/elpa/auctex-13.1.3/style/varioref.elc Binary files differnew file mode 100644 index 0000000..760f13a --- /dev/null +++ b/elpa/auctex-13.1.3/style/varioref.elc diff --git a/elpa/auctex-13.1.3/style/verbatim.el b/elpa/auctex-13.1.3/style/verbatim.el new file mode 100644 index 0000000..9062254 --- /dev/null +++ b/elpa/auctex-13.1.3/style/verbatim.el @@ -0,0 +1,65 @@ +;;; verbatim.el --- Style hook for the verbatim package. -*- lexical-binding: t; -*- + +;; Copyright (C) 2001, 2020 Free Software Foundation, Inc. + +;; Author: Masayuki Ataka <masayuki.ataka@gmail.com> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2001/05/01 + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; M-x TeX-auto-generate verbatim.sty makes garbages. + +;;; Code + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-set-syntactic-keywords + "font-latex") + +(TeX-add-style-hook + "verbatim" + (lambda () + (LaTeX-add-environments + "comment") + (TeX-add-symbols + '("verbatiminput" TeX-arg-file)) + + ;; Fontification: + ;; Code taken from `comment.el' + (when (and (boundp 'font-latex-syntactic-keywords-extra) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; For syntactic fontification. + (add-to-list 'font-latex-syntactic-keywords-extra + '("^[ \t]*\\\\begin *{comment}.*\\(\n\\)" + (1 "!" t))) + (add-to-list 'font-latex-syntactic-keywords-extra + '("^[ \t]*\\(\\\\\\)end *{comment}" + (1 "!" t))) + ;; Tell font-lock about the update. + (font-latex-set-syntactic-keywords))) + TeX-dialect) + +(defvar LaTeX-verbatim-package-options nil + "Package options for the verbatim package.") + +;;; verbatim.el ends here. diff --git a/elpa/auctex-13.1.3/style/verbatim.elc b/elpa/auctex-13.1.3/style/verbatim.elc Binary files differnew file mode 100644 index 0000000..aabeb36 --- /dev/null +++ b/elpa/auctex-13.1.3/style/verbatim.elc diff --git a/elpa/auctex-13.1.3/style/virtex.el b/elpa/auctex-13.1.3/style/virtex.el new file mode 100644 index 0000000..725cafe --- /dev/null +++ b/elpa/auctex-13.1.3/style/virtex.el @@ -0,0 +1,86 @@ +;;; virtex.el - Common code for all TeX formats. -*- lexical-binding: t; -*- + +;; Author: Per Abrahamsen <abraham@dina.kvl.dk> + +;;; Code: + +(require 'tex) + +(TeX-add-style-hook + "virtex" + (lambda () + (TeX-add-symbols "/" "above" "abovedisplayshortskip" + "abovedisplayskip" "abovewithdelims" "accent" + "adjdemerits" "advance" "afterassignment" + "aftergroup" "atop" "atopwithdelims" "badness" + "baselineskip" "batchmode" "begingroup" + "belowdisplayshortskip" "belowdisplayskip" + "binoppenalty" "botmark" "box" "boxmaxdepth" + "brokenpenalty" "catcode" "char" "chardef" + "cleaders" "closein" "closeout" "clubpenalty" + "copy" "count" "countdef" "cr" "crcr" "csname" + "day" "deadcycles" "def" "defaulthyphenchar" + "defaultskewchar" "delcode" "delimiter" + "delimiterfactor" "delimitershortfall" "dimen" + "dimendef" "discretionary" "displayindent" + "displaylimits" "displaystyle" + "displaywidowpenalty" "displaywidth" "divide" + "doublehyphendemerits" "dp" "dump" "edef" "else" + "emergencystretch" "end" "endcsname" "endgroup" + "endinput" "endlinechar" "eqno" "errhelp" + "errmessage" "errorcontextlines" "errorstopmode" + "escapechar" "everycr" "everydisplay" + "everyhbox" "everyjob" "everymath" "everypar" + "everyvbox" "exhyphenpenalty" "expandafter" + "fam" "fi" "finalhyphendemerits" "firstmark" + "floatingpenalty" "font" "fontdimen" "fontname" + "futurelet" "gdef" "global" "globaldefs" + "halign" "hangafter" "hangindent" "hbadness" + "hbox" "hfil" "hfill" "hfilneg" "hfuzz" + "hoffset" "holdinginserts" "hrule" "hsize" + "hskip" "hss" "ht" "hyphenpenation" "hyphenchar" + "hyphenpenalty" "if" "ifcase" "ifcat" "ifdim" + "ifeof" "iffalse" "ifhbox" "ifinner" "ifhmode" + "ifmmode" "ifnum" "ifodd" "iftrue" "ifvbox" + "ifvoid" "ifx" "ignorespaces" "immediate" + "indent" "input" "inputlineno" "insert" + "insertpenalties" "interlinepenalty" "jobname" + "kern" "language" "lastbox" "lastkern" + "lastpenalty" "lastskip" "lccode" "leaders" + "left" "lefthyphenmin" "leftskip" "leqno" "let" + "limits" "linepenalty" "lineskip" + "lineskiplimit" "long" "looseness" "lower" + "lowercase" "mag" "markaccent" "mathbin" + "mathchar" "mathchardef" "mathchoise" + "mathclose" "mathcode" "mathinner" "mathhop" + "mathopen" "mathord" "mathpunct" "mathrel" + "mathsurround" "maxdeadcycles" "maxdepth" + "meaning" "medmuskip" "message" "mkern" "month" + "moveleft" "moveright" "mskip" "multiply" + "muskip" "muskipdef" "newlinechar" "noalign" + "noboundary" "noexpand" "noindent" "nolimits" + "nonscript" "nonstopmode" "nulldelimiterspace" + "nullfont" "number" "omit" "openin" "openout" + "or" "outer" "output" "outputpenalty" + "overfullrule" "parfillskip" "parindent" + "parskip" "pausing" "postdisplaypenalty" + "predisplaypenalty" "predisplaysize" + "pretolerance" "relpenalty" "rightskip" + "scriptspace" "showboxbreadth" "showboxdepth" + "smallskipamount" "spaceskip" "splitmaxdepth" + "splittopskip" "tabskip" "thickmuskip" + "thinmuskip" "time" "tolerance" "topskip" + "tracingcommands" "tracinglostchars" + "tracingmacros" "tracingonline" "tracingoutput" + "tracingpages" "tracingparagraphs" + "tracingrestores" "tracingstats" "uccode" + "uchyph" "underline" "unhbox" "unhcopy" "unkern" + "unpenalty" "unskip" "unvbox" "unvcopy" + "uppercase" "vadjust" "valign" "vbadness" "vbox" + "vcenter" "vfil" "vfill" "vfilneg" "vfuzz" + "voffset" "vrule" "vsize" "vskip" "vss" "vtop" + "wd" "widowpenalty" "write" "xdef" "xleaders" + "xspaceskip" "year")) + TeX-dialect) + +;;; virtex.el ends here diff --git a/elpa/auctex-13.1.3/style/virtex.elc b/elpa/auctex-13.1.3/style/virtex.elc Binary files differnew file mode 100644 index 0000000..63e2062 --- /dev/null +++ b/elpa/auctex-13.1.3/style/virtex.elc diff --git a/elpa/auctex-13.1.3/style/vwcol.el b/elpa/auctex-13.1.3/style/vwcol.el new file mode 100644 index 0000000..03e813f --- /dev/null +++ b/elpa/auctex-13.1.3/style/vwcol.el @@ -0,0 +1,79 @@ +;;; vwcol.el --- AUCTeX style for `vwcol.sty' (v0.2) -*- lexical-binding: t; -*- + +;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-07-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `vwcol.sty' (v0.2) from 2015/02/10. +;; `vwcol.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-vwcol-key-val-options + '(("widths") + ("sep" ("fill")) + ("presep" ("true" "false")) + ("postsep" ("true" "false")) + ("sidesep" ("true" "false")) + ("rule" ("none" "0pt")) + ("prerule" ("true" "false")) + ("postrule" ("true" "false")) + ("siderule" ("true" "false")) + ("justify" ("ragged" "flush" "raggedleft" "center")) + ("rulecolor") + ("indent") + ("lines")) + "Key=value options for vwcol macros and environments.") + +(TeX-add-style-hook + "vwcol" + (lambda () + + (LaTeX-add-environments + '("vwcol" LaTeX-env-args + [ TeX-arg-key-val LaTeX-vwcol-key-val-options ])) + + (TeX-add-symbols + '("vwcolsetup" (TeX-arg-key-val LaTeX-vwcol-key-val-options))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("vwcolsetup" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-vwcol-package-options '("quiet") + "Package options for the vwcol package.") + +;;; vwcol.el ends here diff --git a/elpa/auctex-13.1.3/style/vwcol.elc b/elpa/auctex-13.1.3/style/vwcol.elc Binary files differnew file mode 100644 index 0000000..fd0e60f --- /dev/null +++ b/elpa/auctex-13.1.3/style/vwcol.elc diff --git a/elpa/auctex-13.1.3/style/wrapfig.el b/elpa/auctex-13.1.3/style/wrapfig.el new file mode 100644 index 0000000..35d8a05 --- /dev/null +++ b/elpa/auctex-13.1.3/style/wrapfig.el @@ -0,0 +1,121 @@ +;;; wrapfig.el --- AUCTeX style for `wrapfig.sty' version v3.6 -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-12-13 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `wrapfig.sty' version v3.6 from +;; 2003/01/31. `wrapfig.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(TeX-add-style-hook + "wrapfig" + (lambda () + (LaTeX-add-environments + ;; \begin{wrapfigure}[No.lines]{Placement}[Overhang]{Width} ... \end{wrapfigure} + '("wrapfigure" + (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((narrow (TeX-read-string "(Optional) Number of narrow lines: ")) + (placement (completing-read + "Placement: " '(("r") ("R") + ("l") ("L") + ("i") ("I") + ("o") ("O")))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) + (concat + (unless (string= narrow "") + (format "[%s]" narrow)) + (format "{%s}" placement) + (unless (string= overhang "") + (format "[%s]" overhang)) + (format "{%s}" width)))))) + ;; + ;; \begin{wraptable}[No.lines]{Placement}[Overhang]{Width} ... \end{wraptable} + '("wraptable" + (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((narrow (TeX-read-string "(Optional) Number of narrow lines: ")) + (placement (completing-read + "Placement: " '(("r") ("R") + ("l") ("L") + ("i") ("I") + ("o") ("O")))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) + (concat + (unless (string= narrow "") + (format "[%s]" narrow)) + (format "{%s}" placement) + (unless (string= overhang "") + (format "[%s]" overhang)) + (format "{%s}" width)))))) + ;; + ;; \begin{wrapfloat}{<Type>}[No.lines]{Placement}[Overhang]{Width} ... \end{wrapfloat} + ;; + ;; <Type> can be a new floating environment defined with + ;; "\DeclareFloatingEnvironment" from newfloat.el. We check if + ;; the function `LaTeX-newfloat-DeclareFloatingEnvironment-list' + ;; is bound and returns non-nil before offering environment for + ;; completion. Otherwise, just ask user without completion. + '("wrapfloat" + (lambda (env &rest ignore) + (LaTeX-insert-environment + env + (let ((floattype (if (and (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list) + (LaTeX-newfloat-DeclareFloatingEnvironment-list)) + (completing-read + "Float type: " + (mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list))) + (TeX-read-string "Float type: "))) + (narrow (TeX-read-string "(Optional) Number of narrow lines: ")) + (placement (completing-read + "Placement: " '(("r") ("R") + ("l") ("L") + ("i") ("I") + ("o") ("O")))) + (overhang (TeX-read-string "(Optional) Overhang: ")) + (width (TeX-read-string "Width: "))) + (concat + (format "{%s}" floattype) + (unless (string= narrow "") + (format "[%s]" narrow)) + (format "{%s}" placement) + (unless (string= overhang "") + (format "[%s]" overhang)) + (format "{%s}" width)))))))) + TeX-dialect) + +(defvar LaTeX-wrapfig-package-options '("verbose") + "Package options for the wrapfig package.") + +;;; wrapfig.el ends here diff --git a/elpa/auctex-13.1.3/style/wrapfig.elc b/elpa/auctex-13.1.3/style/wrapfig.elc Binary files differnew file mode 100644 index 0000000..c9a1c14 --- /dev/null +++ b/elpa/auctex-13.1.3/style/wrapfig.elc diff --git a/elpa/auctex-13.1.3/style/xcolor.el b/elpa/auctex-13.1.3/style/xcolor.el new file mode 100644 index 0000000..06bd28f --- /dev/null +++ b/elpa/auctex-13.1.3/style/xcolor.el @@ -0,0 +1,654 @@ +;; xcolor.el --- AUCTeX style for `xcolor.sty' (v2.12) -*- lexical-binding: t; -*- + +;; Copyright (C) 2016--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2015-07-04 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `xcolor.sty' (v2.13) from 2021/10/31. +;; `xcolor.sty' is part of TeXLive. + +;; `xcolor.sty' and `color.sty' share many command namens, but the +;; number of arguments is not always identical -- `xcolor.sty' +;; commands take more arguments. In order to make the commands and +;; font-locking work correctly, we follow this strategy: If +;; `xcolor.sty' is loaded after `color.sty', everything works fine. +;; For the way around, we guard the definitions for `color.sty' with: +;; +;; (unless (member "xcolor" (TeX-style-list)) +;; (<define stuff for color.sty>)) +;; +;; to make sure that we define stuff for `color.sty' only if AUCTeX +;; style for `xcolor.sty' is not already loaded. + +;;; Code: + +;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-xcolor-core-color-models + '("rgb" "cmy" "cmyk" "hsb" "gray") + "List of core color models provided by xcolor.sty.") + +(defvar LaTeX-xcolor-num-color-models + '("RGB" "HTML" "HSB" "Gray" "HsB" "tHsB" "wave") + "List of integer and decimal color models provided by xcolor.sty.") + +(defvar LaTeX-xcolor-pseudo-color-models + '("named") + "List of pseudo color models provided by xcolor.sty.") + +(defvar LaTeX-xcolor-type-color-models + '("named" "ps") + "List of type color models provided by xcolor.sty.") + +(defvar LaTeX-xcolor-base-colors + '("red" "green" "blue" "cyan" "magenta" "yellow" "black" + "gray" "white" "darkgray" "lightgray" "brown" "lime" "olive" + "orange" "pink" "purple" "teal" "violet") + "List of colors defined and always available from xcolor.sty.") + +(defvar LaTeX-xcolor-dvipsnames-colors + '("Apricot" "Aquamarine" "Bittersweet" "Black" + "Blue" "BlueGreen" "BlueViolet" "BrickRed" + "Brown" "BurntOrange" "CadetBlue" "CarnationPink" + "Cerulean" "CornflowerBlue" "Cyan" "Dandelion" + "DarkOrchid" "Emerald" "ForestGreen" "Fuchsia" + "Goldenrod" "Gray" "Green" "GreenYellow" + "JungleGreen" "Lavender" "LimeGreen" "Magenta" + "Mahogany" "Maroon" "Melon" "MidnightBlue" + "Mulberry" "NavyBlue" "OliveGreen" "Orange" + "OrangeRed" "Orchid" "Peach" "Periwinkle" + "PineGreen" "Plum" "ProcessBlue" "Purple" + "RawSienna" "Red" "RedOrange" "RedViolet" + "Rhodamine" "RoyalBlue" "RoyalPurple" "RubineRed" + "Salmon" "SeaGreen" "Sepia" "SkyBlue" + "SpringGreen" "Tan" "TealBlue" "Thistle" + "Turquoise" "Violet" "VioletRed" "White" + "WildStrawberry" "Yellow" "YellowGreen" "YellowOrange") + "List of colors defined by package option dvipsnames from xcolor.sty.") + +(defvar LaTeX-xcolor-svgnames-colors + '("AliceBlue" "DarkTurquoise" "LightSalmon" "PaleVioletRed" + "AntiqueWhite" "DarkViolet" "LightSeaGreen" "PapayaWhip" + "Aqua" "DeepPink" "LightSkyBlue" "PeachPuff" + "Aquamarine" "DeepSkyBlue" "LightSlateBlue" "Peru" + "Azure" "DimGray" "LightSlateGray" "Pink" + "Beige" "DimGrey" "LightSlateGrey" "Plum" + "Bisque" "DodgerBlue" "LightSteelBlue" "PowderBlue" + "Black" "FireBrick" "LightYellow" "Purple" + "BlanchedAlmond" "FloralWhite" "Lime" "Red" + "Blue" "ForestGreen" "LimeGreen" "RosyBrown" + "BlueViolet" "Fuchsia" "Linen" "RoyalBlue" + "Brown" "Gainsboro" "Magenta" "SaddleBrown" + "BurlyWood" "GhostWhite" "Maroon" "Salmon" + "CadetBlue" "Gold" "MediumAquamarine" "SandyBrown" + "Chartreuse" "Goldenrod" "MediumBlue" "SeaGreen" + "Chocolate" "Gray" "MediumOrchid" "Seashell" + "Coral" "Green" "MediumPurple" "Sienna" + "CornflowerBlue" "GreenYellow" "MediumSeaGreen" "Silver" + "Cornsilk" "Grey" "MediumSlateBlue" "SkyBlue" + "Crimson" "Honeydew" "MediumSpringGreen" "SlateBlue" + "Cyan" "HotPink" "MediumTurquoise" "SlateGray" + "DarkBlue" "IndianRed" "MediumVioletRed" "SlateGrey" + "DarkCyan" "Indigo" "MidnightBlue" "Snow" + "DarkGoldenrod" "Ivory" "MintCream" "SpringGreen" + "DarkGray" "Khaki" "MistyRose" "SteelBlue" + "DarkGreen" "Lavender" "Moccasin" "Tan" + "DarkGrey" "LavenderBlush" "NavajoWhite" "Teal" + "DarkKhaki" "LawnGreen" "Navy" "Thistle" + "DarkMagenta" "LemonChiffon" "NavyBlue" "Tomato" + "DarkOliveGreen" "LightBlue" "OldLace" "Turquoise" + "DarkOrange" "LightCoral" "Olive" "Violet" + "DarkOrchid" "LightCyan" "OliveDrab" "VioletRed" + "DarkRed" "LightGoldenrod" "Orange" "Wheat" + "DarkSalmon" "LightGoldenrodYellow" "OrangeRed" "White" + "DarkSeaGreen" "LightGray" "Orchid" "WhiteSmoke" + "DarkSlateBlue" "LightGreen" "PaleGoldenrod" "Yellow" + "DarkSlateGray" "LightGrey" "PaleGreen" "YellowGreen" + "DarkSlateGrey" "LightPink" "PaleTurquoise") + "List of colors defined by package option svgnames from xcolor.sty.") + +(defvar LaTeX-xcolor-x11names-colors + '("AntiqueWhite1" "DeepSkyBlue1" "LightYellow1" "RoyalBlue1" + "AntiqueWhite2" "DeepSkyBlue2" "LightYellow2" "RoyalBlue2" + "AntiqueWhite3" "DeepSkyBlue3" "LightYellow3" "RoyalBlue3" + "AntiqueWhite4" "DeepSkyBlue4" "LightYellow4" "RoyalBlue4" + "Aquamarine1" "DodgerBlue1" "Magenta1" "Salmon1" + "Aquamarine2" "DodgerBlue2" "Magenta2" "Salmon2" + "Aquamarine3" "DodgerBlue3" "Magenta3" "Salmon3" + "Aquamarine4" "DodgerBlue4" "Magenta4" "Salmon4" + "Azure1" "Firebrick1" "Maroon1" "SeaGreen1" + "Azure2" "Firebrick2" "Maroon2" "SeaGreen2" + "Azure3" "Firebrick3" "Maroon3" "SeaGreen3" + "Azure4" "Firebrick4" "Maroon4" "SeaGreen4" + "Bisque1" "Gold1" "MediumOrchid1" "Seashell1" + "Bisque2" "Gold2" "MediumOrchid2" "Seashell2" + "Bisque3" "Gold3" "MediumOrchid3" "Seashell3" + "Bisque4" "Gold4" "MediumOrchid4" "Seashell4" + "Blue1" "Goldenrod1" "MediumPurple1" "Sienna1" + "Blue2" "Goldenrod2" "MediumPurple2" "Sienna2" + "Blue3" "Goldenrod3" "MediumPurple3" "Sienna3" + "Blue4" "Goldenrod4" "MediumPurple4" "Sienna4" + "Brown1" "Green1" "MistyRose1" "SkyBlue1" + "Brown2" "Green2" "MistyRose2" "SkyBlue2" + "Brown3" "Green3" "MistyRose3" "SkyBlue3" + "Brown4" "Green4" "MistyRose4" "SkyBlue4" + "Burlywood1" "Honeydew1" "NavajoWhite1" "SlateBlue1" + "Burlywood2" "Honeydew2" "NavajoWhite2" "SlateBlue2" + "Burlywood3" "Honeydew3" "NavajoWhite3" "SlateBlue3" + "Burlywood4" "Honeydew4" "NavajoWhite4" "SlateBlue4" + "CadetBlue1" "HotPink1" "OliveDrab1" "SlateGray1" + "CadetBlue2" "HotPink2" "OliveDrab2" "SlateGray2" + "CadetBlue3" "HotPink3" "OliveDrab3" "SlateGray3" + "CadetBlue4" "HotPink4" "OliveDrab4" "SlateGray4" + "Chartreuse1" "IndianRed1" "Orange1" "Snow1" + "Chartreuse2" "IndianRed2" "Orange2" "Snow2" + "Chartreuse3" "IndianRed3" "Orange3" "Snow3" + "Chartreuse4" "IndianRed4" "Orange4" "Snow4" + "Chocolate1" "Ivory1" "OrangeRed1" "SpringGreen1" + "Chocolate2" "Ivory2" "OrangeRed2" "SpringGreen2" + "Chocolate3" "Ivory3" "OrangeRed3" "SpringGreen3" + "Chocolate4" "Ivory4" "OrangeRed4" "SpringGreen4" + "Coral1" "Khaki1" "Orchid1" "SteelBlue1" + "Coral2" "Khaki2" "Orchid2" "SteelBlue2" + "Coral3" "Khaki3" "Orchid3" "SteelBlue3" + "Coral4" "Khaki4" "Orchid4" "SteelBlue4" + "Cornsilk1" "LavenderBlush1" "PaleGreen1" "Tan1" + "Cornsilk2" "LavenderBlush2" "PaleGreen2" "Tan2" + "Cornsilk3" "LavenderBlush3" "PaleGreen3" "Tan3" + "Cornsilk4" "LavenderBlush4" "PaleGreen4" "Tan4" + "Cyan1" "LemonChiffon1" "PaleTurquoise1" "Thistle1" + "Cyan2" "LemonChiffon2" "PaleTurquoise2" "Thistle2" + "Cyan3" "LemonChiffon3" "PaleTurquoise3" "Thistle3" + "Cyan4" "LemonChiffon4" "PaleTurquoise4" "Thistle4" + "DarkGoldenrod1" "LightBlue1" "PaleVioletRed1" "Tomato1" + "DarkGoldenrod2" "LightBlue2" "PaleVioletRed2" "Tomato2" + "DarkGoldenrod3" "LightBlue3" "PaleVioletRed3" "Tomato3" + "DarkGoldenrod4" "LightBlue4" "PaleVioletRed4" "Tomato4" + "DarkOliveGreen1" "LightCyan1" "PeachPuff1" "Turquoise1" + "DarkOliveGreen2" "LightCyan2" "PeachPuff2" "Turquoise2" + "DarkOliveGreen3" "LightCyan3" "PeachPuff3" "Turquoise3" + "DarkOliveGreen4" "LightCyan4" "PeachPuff4" "Turquoise4" + "DarkOrange1" "LightGoldenrod1" "Pink1" "VioletRed1" + "DarkOrange2" "LightGoldenrod2" "Pink2" "VioletRed2" + "DarkOrange3" "LightGoldenrod3" "Pink3" "VioletRed3" + "DarkOrange4" "LightGoldenrod4" "Pink4" "VioletRed4" + "DarkOrchid1" "LightPink1" "Plum1" "Wheat1" + "DarkOrchid2" "LightPink2" "Plum2" "Wheat2" + "DarkOrchid3" "LightPink3" "Plum3" "Wheat3" + "DarkOrchid4" "LightPink4" "Plum4" "Wheat4" + "DarkSeaGreen1" "LightSalmon1" "Purple1" "Yellow1" + "DarkSeaGreen2" "LightSalmon2" "Purple2" "Yellow2" + "DarkSeaGreen3" "LightSalmon3" "Purple3" "Yellow3" + "DarkSeaGreen4" "LightSalmon4" "Purple4" "Yellow4" + "DarkSlateGray1" "LightSkyBlue1" "Red1" "Gray0" + "DarkSlateGray2" "LightSkyBlue2" "Red2" "Green0" + "DarkSlateGray3" "LightSkyBlue3" "Red3" "Grey0" + "DarkSlateGray4" "LightSkyBlue4" "Red4" "Maroon0" + "DeepPink1" "LightSteelBlue1" "RosyBrown1" "Purple0" + "DeepPink2" "LightSteelBlue2" "RosyBrown2" + "DeepPink3" "LightSteelBlue3" "RosyBrown3" + "DeepPink4" "LightSteelBlue4" "RosyBrown4") + "List of colors defined by package option x11names from xcolor.sty.") + +(defvar LaTeX-xcolor-color-models + (append LaTeX-xcolor-core-color-models + LaTeX-xcolor-num-color-models + LaTeX-xcolor-pseudo-color-models) + "Combine three variables `LaTeX-xcolor-core-color-models', +`LaTeX-xcolor-num-color-models' and `LaTeX-xcolor-pseudo-color-models'.") + +(defun LaTeX-xcolor-color-models (&optional no-named) + "Return the value of variable `LaTeX-xcolor-color-models'. +If NO-NAMED is non-nil, remove \"named\" and return the +remainder." + (if no-named + (remove "named" LaTeX-xcolor-color-models) + LaTeX-xcolor-color-models)) + +;; Needed for auto-parsing. +(require 'tex) + +;; Setup AUCTeX parser for \definecolor(set): +(TeX-auto-add-type "xcolor-definecolor" "LaTeX") +(TeX-auto-add-type "xcolor-definecolorset" "LaTeX") + +(defvar LaTeX-xcolor-definecolor-regexp + (eval-when-compile + `(,(concat "\\\\" + (regexp-opt '("definecolor" "providecolor" + "preparecolor" "colorlet")) + "\\(?:\\[\\(?:[^]]*\\)\\]\\)?{\\([^}]+\\)}") + 1 LaTeX-auto-xcolor-definecolor)) + "Match the argument of various color defining macros from xcolor package.") + +(defvar LaTeX-xcolor-definecolorset-regexp + `(,(concat "\\\\\\(?:define\\|provide\\|prepare\\)" + "colorset" + "\\(?:\\[\\(?:[^]]*\\)\\]\\)?" + "{\\(?:[^}]+\\)}" + "{\\([^}]+\\)}" + "{\\([^}]+\\)}" + "{\\([^}]+\\)}") + (1 2 3) LaTeX-auto-xcolor-definecolorset) + "Match the argument of various color-set defining macros from +xcolor package.") + +(defun LaTeX-xcolor-auto-prepare () + "Clear `LaTeX-auto-xcolor-definecolor' before parsing." + (setq LaTeX-auto-xcolor-definecolor nil + LaTeX-auto-xcolor-definecolorset nil)) + +(defun LaTeX-xcolor-auto-cleanup () + "Process the parsed elements from `LaTeX-auto-xcolor-definecolorset'." + (dolist (colset (LaTeX-xcolor-definecolorset-list)) + (let ((head (car colset)) + (tail (cadr colset)) + (cols (split-string + (replace-regexp-in-string "[ %\n\r\t]" "" (nth 2 colset)) + "\\(,[^;]+;\\|,[^;]+$\\)" t))) + (dolist (color cols) + (LaTeX-add-xcolor-definecolors (concat head color tail)))))) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-xcolor-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-xcolor-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(defun TeX-arg-xcolor-definecolor (optional) + "Insert arguments of \\definecolor and similar macros from xcolor.sty." + ;; \definecolor[<type>]{<name>}{<model-list>}{<spec-list>} + (let* ((TeX-last-optional-rejected nil) + (xcoltype (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Type") + LaTeX-xcolor-type-color-models))) + (xcolname (TeX-read-string + (TeX-argument-prompt optional nil "Color name"))) + (xcolmodel (completing-read + (TeX-argument-prompt optional nil "Model (list)") + (if (string= xcoltype "named") + (LaTeX-xcolor-color-models t) + LaTeX-xcolor-color-models))) + (xcolspec (if (string= xcolmodel "named") + (completing-read + (TeX-argument-prompt optional nil "Color") + (LaTeX-xcolor-definecolor-list)) + (TeX-read-string + (TeX-argument-prompt optional nil (concat xcolmodel " spec (list)")))))) + (when (and xcoltype (not (string= xcoltype ""))) + (insert (format "[%s]" xcoltype))) + (TeX-argument-insert xcolname optional) + (LaTeX-add-xcolor-definecolors xcolname) + (TeX-argument-insert xcolmodel optional) + (TeX-argument-insert xcolspec optional))) + +(defun TeX-arg-xcolor-definecolorset (optional) + "Insert arguments of \\definecolorset and similar macros from xcolor.sty." + (let* ((TeX-last-optional-rejected nil) + (xcoltype (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Type") + LaTeX-xcolor-type-color-models))) + (xcolmodel (completing-read + (TeX-argument-prompt optional nil "Model") + (LaTeX-xcolor-color-models t)))) + (when (and xcoltype (not (string= xcoltype ""))) + (insert (format "[%s]" xcoltype))) + (TeX-argument-insert xcolmodel optional))) + +(defun TeX-arg-xcolor (optional) + "Insert arguments of various color commands from xcolor.sty." + ;; \color{<name>} or \color[<model-list>]{<spec-list>} + (let* ((TeX-last-optional-rejected nil) + (xcolmodel (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Model (list)") + (LaTeX-xcolor-color-models t)))) + (xcolor (if (and xcolmodel (not (string= xcolmodel ""))) + (TeX-read-string + (TeX-argument-prompt optional nil (concat xcolmodel " spec (list)"))) + (completing-read + (TeX-argument-prompt optional nil "Color") + (LaTeX-xcolor-definecolor-list))))) + (when (and xcolmodel (not (string= xcolmodel ""))) + (insert (format "[%s]" xcolmodel))) + (TeX-argument-insert xcolor optional))) + +(defun TeX-arg-xcolor-fcolorbox (optional) + "Insert arguments of \\fcolorbox from xcolor.sty." + ;;\fcolorbox[<frame model>]{<frame spec>}[<background model>]{<background spec>}{<text>} + (let* ((TeX-last-optional-rejected nil) + (xfrmodel (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "(Frame) Color model") + LaTeX-xcolor-color-models))) + ;; Set `TeX-last-optional-rejected' acc. to `xfrmodel' + (TeX-last-optional-rejected (or (not xfrmodel) + (and xfrmodel (string= xfrmodel "")))) + (xfrspec (if (or (null xfrmodel) + (string= xfrmodel "") + (string= xfrmodel "named")) + (completing-read + (TeX-argument-prompt optional nil "Frame color spec") + (LaTeX-xcolor-definecolor-list)) + (TeX-read-string + (TeX-argument-prompt optional nil "Frame color spec")))) + (xbgmodel (LaTeX-check-insert-macro-default-style + (completing-read + (TeX-argument-prompt t nil "Background Color model") + LaTeX-xcolor-color-models))) + (xbgspec (if (or (null xfrmodel) + (string= xfrmodel "") + (string= xfrmodel "named") + (null xbgmodel) + (string= xbgmodel "") + (string= xbgmodel "named")) + (completing-read + (TeX-argument-prompt optional nil "Background color spec") + (LaTeX-xcolor-definecolor-list)) + (TeX-read-string + (TeX-argument-prompt optional nil "Background color spec"))))) + (when (and xfrmodel (not (string= xfrmodel ""))) + (insert (format "[%s]" xfrmodel))) + (TeX-argument-insert xfrspec optional) + (when (and xbgmodel (not (string= xbgmodel ""))) + (insert (format "[%s]" xbgmodel))) + (TeX-argument-insert xbgspec optional))) + +(TeX-add-style-hook + "xcolor" + (lambda () + ;; Add color to the parser. + (TeX-auto-add-regexp LaTeX-xcolor-definecolor-regexp) + (TeX-auto-add-regexp LaTeX-xcolor-definecolorset-regexp) + + ;; Add list of colors which are always available. + (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-base-colors) + + ;; Add dvips colors in conjunction with `dvipsnames*?'. + (when (or (LaTeX-provided-package-options-member "xcolor" "dvipsnames") + (LaTeX-provided-package-options-member "xcolor" "dvipsnames*")) + (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-dvipsnames-colors)) + + ;; For `svgnames*?' + (when (or (LaTeX-provided-package-options-member "xcolor" "svgnames") + (LaTeX-provided-package-options-member "xcolor" "svgnames*")) + (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-svgnames-colors)) + + ;; For `x11ames*?' + (when (or (LaTeX-provided-package-options-member "xcolor" "x11names") + (LaTeX-provided-package-options-member "xcolor" "x11names*")) + (apply #'LaTeX-add-xcolor-definecolors LaTeX-xcolor-x11names-colors)) + + (TeX-add-symbols + ;; 2.5.2 Color definition in xcolor + ;; \definecolor[<type>]{<name>}{<model-list>}{<spec-list>} + '("definecolor" TeX-arg-xcolor-definecolor) + + ;; \providecolor[<type>]{<name>}{<model-list>}{<spec-list>} + '("providecolor" TeX-arg-xcolor-definecolor) + + ;; \colorlet[<type>]{<name>}[<num model>]{<color>} + '("colorlet" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Type") + LaTeX-xcolor-type-color-models ] + (TeX-arg-eval + (lambda () + (let ((xcolor (TeX-read-string + (TeX-argument-prompt nil nil "Color")))) + (LaTeX-add-xcolor-definecolors xcolor) + (format "%s" xcolor)))) + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Model") + (LaTeX-xcolor-color-models t) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color") + (LaTeX-xcolor-definecolor-list))) + + ;; 2.5.3 Defining sets of colors + ;; \definecolorset[<type>]{<model-list>}{<head>}{<tail>}{<set spec>} + '("definecolorset" TeX-arg-xcolor-definecolorset "Head" "Tail" t) + + ;; \providecolorset[<type>]{<model-list>}{<head>}{<tail>}{<set spec>} + '("providecolorset" TeX-arg-xcolor-definecolorset "Head" "Tail" t) + + ;; 2.5.4 Immediate and deferred definitions + ;; \preparecolor[<type>]{<name>}{<model-list>}{<spec-list>} + '("preparecolor" TeX-arg-xcolor-definecolor) + + ;; \preparecolorset[<type>]{<model-list>}{<head>}{<tail>}{<set spec>} + '("preparecolorset" TeX-arg-xcolor-definecolorset "Head" "Tail" t) + + ;; \definecolors{<id-list>} + '("definecolors" t) + + ;; \providecolors{<id-list>} + '("providecolors" t) + + ;; 2.6 Color application + ;; 2.6.1 Standard color commands + + ;; \color{<name>} or \color[<model>]{<color spec>} + '("color" TeX-arg-xcolor) + + ;; \textcolor{<name>}{<text>} or + ;; \textcolor[<model>]{<color spec>}{<text>} + '("textcolor" TeX-arg-xcolor "Text") + + ;; \mathcolor{<name>}{<math>} or + ;; \mathcolor[<model>]{<color spec>}{<math>} + '("mathcolor" TeX-arg-xcolor "Math") + + ;; \pagecolor{<name>} or + ;; \pagecolor[<model>]{<color spec>} + '("pagecolor" TeX-arg-xcolor) + + ;; \nopagecolor + '("nopagecolor" 0) + + ;; 2.6.2 Colored boxes + ;; \colorbox{<name>}{<text>} or + ;; \colorbox[<model>]{<color spec>}{<text>} + '("colorbox" TeX-arg-xcolor "Text") + + ;; \fcolorbox{<frame color>}{<box color>}{<text>} or + ;; \fcolorbox[<model>]{<frame spec>}{<background spec>}{<text>} or + ;; \fcolorbox[<frame model>]{<frame spec>}[<background model>]{<background spec>}{<text>} + '("fcolorbox" TeX-arg-xcolor-fcolorbox "Text") + + ;; 2.6.4 Color testing + ;; \testcolor{<name>} or + ;; \testcolor[<model>]{<color spec>} + '("testcolor" TeX-arg-xcolor) + + ;; 2.7 Color blending + '("blendcolors" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Mix expr") + (LaTeX-xcolor-definecolor-list))) + '("blendcolors*" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Mix expr") + (LaTeX-xcolor-definecolor-list))) + + ;; 2.8 Color masks and separation + '("maskcolors" + [ TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Model") + (LaTeX-xcolor-color-models t) ] + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color") + (LaTeX-xcolor-definecolor-list))) + + ;; 2.9 Color series + '("definecolorseries" + "Name" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Core model") + LaTeX-xcolor-core-color-models) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Method") + '("step" "grad" "last")) + [ t ] nil [ nil ] nil) + + '("resetcolorseries" [ "Div." ] "Name") + + ;; 2.13 Color information + ;; \extractcolorspec{<color>}{<cmd>} + '("extractcolorspec" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color") + (LaTeX-xcolor-definecolor-list)) + (TeX-arg-define-macro "Command: \\")) + + ;; \extractcolorspecs{<color>}{<model-cmd>}{<color-cmd>} + '("extractcolorspecs" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Color") + (LaTeX-xcolor-definecolor-list)) + (TeX-arg-define-macro "Model command: \\") + (TeX-arg-define-macro "Color command: \\")) + + ;; \tracingcolors = <integer> + '("tracingcolors" + (TeX-arg-literal "=")) + + ;; 2.14 Color conversion + ;; \convertcolorspec{<model>}{<spec>}{<target model>}{cmd>} + '("convertcolorspec" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Model") + (LaTeX-xcolor-color-models)) + (TeX-arg-eval TeX-read-string + (TeX-argument-prompt nil nil "Spec")) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Model") + (LaTeX-xcolor-color-models t)) + (TeX-arg-define-macro "Macro: \\")) ) ; close TeX-add-symbols + + ;; 2.12 Color in tables + ;; These commands are available with `table' package option + (when (LaTeX-provided-package-options-member "xcolor" "table") + ;; Run style hook to colortbl.sty + (TeX-run-style-hooks "colortbl") + + ;; Add additional commands: + (TeX-add-symbols + ;; \rowcolors[<commands>]{<row>}{<odd-row color>}{<even-row color>} + '("rowcolors" + (TeX-arg-conditional (y-or-n-p "With optional commands? ") + ( [ t ] ) + (ignore)) + "Row" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Odd-row color") + (LaTeX-xcolor-definecolor-list)) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Even-row color") + (LaTeX-xcolor-definecolor-list))) + '("rowcolors*" + (TeX-arg-conditional (y-or-n-p "With optional commands? ") + ( [ t ] ) + (ignore)) + "Row" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Odd-row color") + (LaTeX-xcolor-definecolor-list)) + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Even-row color") + (LaTeX-xcolor-definecolor-list))) + '("showrowcolors" 0) + '("hiderowcolors" 0)) + (LaTeX-add-counters "rownum")) + + ;; 2.6.4 Color testing + (LaTeX-add-environments + '("testcolors" LaTeX-env-args + [ TeX-arg-eval mapconcat #'identity + (TeX-completing-read-multiple + (TeX-argument-prompt t nil "Color models") + (LaTeX-xcolor-color-models t)) + "," ] )) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("color" "[{") + ("pagecolor" "[{")) + 'type-declaration) + (font-latex-add-keywords '(("textcolor" "[{{") + ("colorbox" "[{{" ) + ("fcolorbox" "[{[{{")) + 'type-command) + (font-latex-add-keywords '(("definecolor" "[{{{") + ("providecolor" "[{{{") + ("colorlet" "[{[{") + ("definecolorset" "[{{{{") + ("providecolorset" "[{{{{") + ("preparecolor" "[{{{") + ("preparecolorset" "[{{{{") + ("definecolors" "{") + ("providecolors" "{") + ("testcolor" "[{") + ("blendcolors" "*{") + ("maskcolors" "[{") + ("definecolorseries" "{{{[{[{") + ("resetcolorseries" "[{") + ("extractcolorspec" "{{") + ("extractcolorspecs" "{{{") + ("convertcolorspec" "{{{{") + ("rowcolors" "*[{{{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-xcolor-package-options + '(;; options that determine the color driver + "dvipdf" "dvipdfm" "dvipdfmx" "dvips" "dvipsone" "dvisvgm" + "dviwin" "dviwindo" "emtex" "luatex" "oztex" "pctex32" + "pctexhp" "pctexps" "pctexwin" "pdftex" "tcidvi" "textures" + "truetex" "vtex" "xdvi" "xetex" + + ;; options that determine the target color model + "natural" "rgb" "cmy" "cmyk" "hsb" "gray" "RGB" "HTML" + "HSB" "Gray" "monochrome" + + ;; options that control predefined colors loading + "dvipsnames" "dvipsnames*" "svgnames" "svgnames*" "x11names" "x11names*" + + ;; options that determine which other packages to load + "table" "fixpdftex" "hyperref" + + ;; options that influence the behaviour of other commands + "prologue" "kernelfbox" "xcdraw" "noxcdraw" "fixinclude" + "showerrors" "hideerrors") + "Package options for the xcolor package.") + +;;; xcolor.el ends here diff --git a/elpa/auctex-13.1.3/style/xcolor.elc b/elpa/auctex-13.1.3/style/xcolor.elc Binary files differnew file mode 100644 index 0000000..fc96ccd --- /dev/null +++ b/elpa/auctex-13.1.3/style/xcolor.elc diff --git a/elpa/auctex-13.1.3/style/xkcdcolors.el b/elpa/auctex-13.1.3/style/xkcdcolors.el new file mode 100644 index 0000000..d00ad30 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xkcdcolors.el @@ -0,0 +1,1007 @@ +;;; xkcdcolors.el --- AUCTeX style for `xkcdcolors.sty' (v1.0.1) -*- lexical-binding: t; -*- + +;; Copyright (C) 2019, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2019-10-26 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `xkcdcolors.sty' (v1.0.1) from +;; 2019/10/21. `xkcdcolors.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function LaTeX-add-xcolor-definecolors + "xcolor" + (&rest xcolor-definecolors)) + +(defvar LaTeX-xkcdcolors-colornames + (eval-when-compile + (mapcar (lambda (x) (concat "xkcd" x)) + '("CloudyBlue" + "DarkPastelGreen" + "Dust" + "ElectricLime" + "FreshGreen" + "LightEggplant" + "NastyGreen" + "ReallyLightBlue" + "Tea" + "WarmPurple" + "YellowishTan" + "Cement" + "DarkGrassGreen" + "DustyTeal" + "GreyTeal" + "MacaroniAndCheese" + "PinkishTan" + "Spruce" + "StrongBlue" + "ToxicGreen" + "WindowsBlue" + "BlueBlue" + "BlueWithAHintOfPurple" + "Booger" + "BrightSeaGreen" + "DarkGreenBlue" + "DeepTurquoise" + "GreenTeal" + "StrongPink" + "Bland" + "DeepAqua" + "LavenderPink" + "LightMossGreen" + "LightSeafoamGreen" + "OliveYellow" + "PigPink" + "DeepLilac" + "Desert" + "DustyLavender" + "PurpleyGrey" + "Purply" + "CandyPink" + "LightPastelGreen" + "BoringGreen" + "KiwiGreen" + "LightGreyGreen" + "OrangePink" + "TeaGreen" + "VeryLightBrown" + "EggShell" + "EggplantPurple" + "PowderPink" + "ReddishGrey" + "BabyShitBrown" + "Liliac" + "StormyBlue" + "UglyBrown" + "Custard" + "DarkishPink" + "DeepBrown" + "GreenishBeige" + "Manilla" + "OffBlue" + "BattleshipGrey" + "BrownyGreen" + "Bruise" + "KelleyGreen" + "SicklyYellow" + "SunnyYellow" + "Azul" + "Darkgreen" + "GreenYellow" + "Lichen" + "LightLightGreen" + "PaleGold" + "SunYellow" + "TanGreen" + "Burple" + "Butterscotch" + "Toupe" + "DarkCream" + "IndianRed" + "LightLavendar" + "PoisonGreen" + "BabyPukeGreen" + "BrightYellowGreen" + "CharcoalGrey" + "Squash" + "Cinnamon" + "LightPeaGreen" + "RadioactiveGreen" + "RawSienna" + "BabyPurple" + "Cocoa" + "LightRoyalBlue" + "Orangeish" + "RustBrown" + "SandBrown" + "Swamp" + "TealishGreen" + "BurntSiena" + "Camo" + "DuskBlue" + "Fern" + "OldRose" + "PaleLightGreen" + "PeachyPink" + "RosyPink" + "LightBluishGreen" + "LightBrightGreen" + "LightNeonGreen" + "LightSeafoam" + "TiffanyBlue" + "WashedOutGreen" + "BrownyOrange" + "NiceBlue" + "Sapphire" + "GreyishTeal" + "OrangeyYellow" + "Parchment" + "Straw" + "VeryDarkBrown" + "Terracota" + "UglyBlue" + "ClearBlue" + "Creme" + "FoamGreen" + "GreyGreen" + "LightGold" + "SeafoamBlue" + "Topaz" + "VioletPink" + "Wintergreen" + "YellowTan" + "DarkFuchsia" + "IndigoBlue" + "LightYellowishGreen" + "PaleMagenta" + "RichPurple" + "SunflowerYellow" + "GreenBlue" + "Leather" + "RacingGreen" + "VividPurple" + "DarkRoyalBlue" + "Hazel" + "MutedPink" + "BoogerGreen" + "Canary" + "CoolGrey" + "DarkTaupe" + "DarkishPurple" + "TrueGreen" + "CoralPink" + "DarkSage" + "DarkSlateBlue" + "FlatBlue" + "Mushroom" + "RichBlue" + "DirtyPurple" + "Greenblue" + "IckyGreen" + "LightKhaki" + "WarmBlue" + "DarkHotPink" + "DeepSeaBlue" + "Carmine" + "DarkYellowGreen" + "PalePeach" + "PlumPurple" + "GoldenRod" + "NeonRed" + "OldPink" + "VeryPaleBlue" + "BloodOrange" + "Grapefruit" + "SandYellow" + "ClayBrown" + "DarkBlueGrey" + "FlatGreen" + "LightGreenBlue" + "WarmPink" + "DodgerBlue" + "GrossGreen" + "Ice" + "MetallicBlue" + "PaleSalmon" + "SapGreen" + "Algae" + "BlueyGrey" + "GreenyGrey" + "HighlighterGreen" + "LightLightBlue" + "LightMint" + "RawUmber" + "VividBlue" + "DeepLavender" + "DullTeal" + "LightGreenishBlue" + "MudGreen" + "Pinky" + "RedWine" + "ShitGreen" + "TanBrown" + "Darkblue" + "Rosa" + "Lipstick" + "PaleMauve" + "Claret" + "Dandelion" + "Orangered" + "PoopGreen" + "Ruby" + "Dark" + "GreenishTurquoise" + "PastelRed" + "PissYellow" + "BrightCyan" + "DarkCoral" + "AlgaeGreen" + "DarkishRed" + "ReddyBrown" + "BlushPink" + "CamouflageGreen" + "LawnGreen" + "Putty" + "VibrantBlue" + "DarkSand" + "PurpleBlue" + "Saffron" + "Twilight" + "WarmBrown" + "Bluegrey" + "BubbleGumPink" + "DuckEggBlue" + "GreenishCyan" + "Petrol" + "Royal" + "Butter" + "DustyOrange" + "OffYellow" + "PaleOliveGreen" + "Orangish" + "Leaf" + "LightBlueGrey" + "DriedBlood" + "LightishPurple" + "RustyRed" + "LavenderBlue" + "LightGrassGreen" + "LightMintGreen" + "Sunflower" + "Velvet" + "BrickOrange" + "LightishRed" + "PureBlue" + "TwilightBlue" + "VioletRed" + "YellowyBrown" + "Carnation" + "MuddyYellow" + "DarkSeafoamGreen" + "DeepRose" + "DustyRed" + "GreyBlue" + "LemonLime" + "PurplePink" + "BrownYellow" + "PurpleBrown" + "Wisteria" + "BananaYellow" + "LipstickRed" + "WaterBlue" + "BrownGrey" + "VibrantPurple" + "BabyGreen" + "BarfGreen" + "EggshellBlue" + "SandyYellow" + "CoolGreen" + "Pale" + "BlueGrey" + "HotMagenta" + "Greyblue" + "Purpley" + "BabyShitGreen" + "BrownishPink" + "DarkAquamarine" + "Diarrhea" + "LightMustard" + "PaleSkyBlue" + "TurtleGreen" + "BrightOlive" + "DarkGreyBlue" + "GreenyBrown" + "LemonGreen" + "LightPeriwinkle" + "SeaweedGreen" + "SunshineYellow" + "UglyPurple" + "MediumPink" + "PukeBrown" + "VeryLightPink" + "Viridian" + "Bile" + "FadedYellow" + "VeryPaleGreen" + "VibrantGreen" + "BrightLime" + "Spearmint" + "LightAquamarine" + "LightSage" + "Yellowgreen" + "BabyPoo" + "DarkSeafoam" + "DeepTeal" + "Heather" + "RustOrange" + "DirtyBlue" + "FernGreen" + "BrightLilac" + "WeirdGreen" + "PeacockBlue" + "AvocadoGreen" + "FadedOrange" + "GrapePurple" + "HotGreen" + "LimeYellow" + "Mango" + "Shamrock" + "Bubblegum" + "PurplishBrown" + "VomitYellow" + "PaleCyan" + "KeyLime" + "TomatoRed" + "Lightgreen" + "Merlot" + "NightBlue" + "PurpleishPink" + "Apple" + "BabyPoopGreen" + "GreenApple" + "Heliotrope" + "YellowGreen" + "AlmostBlack" + "CoolBlue" + "LeafyGreen" + "MustardBrown" + "Dusk" + "DullBrown" + "FrogGreen" + "VividGreen" + "BrightLightGreen" + "FluroGreen" + "Kiwi" + "Seaweed" + "NavyGreen" + "UltramarineBlue" + "Iris" + "PastelOrange" + "YellowishOrange" + "Perrywinkle" + "Tealish" + "DarkPlum" + "Pear" + "PinkishOrange" + "MidnightPurple" + "LightPurple" + "DarkMint" + "GreenishTan" + "LightBurgundy" + "TurquoiseBlue" + "UglyPink" + "Sandy" + "ElectricPink" + "MutedPurple" + "MidGreen" + "Greyish" + "NeonYellow" + "Banana" + "CarnationPink" + "Tomato" + "Sea" + "MuddyBrown" + "TurquoiseGreen" + "Buff" + "Fawn" + "MutedBlue" + "PaleRose" + "DarkMintGreen" + "Amethyst" + "BlueGreen" + "Chestnut" + "SickGreen" + "Pea" + "RustyOrange" + "Stone" + "RoseRed" + "PaleAqua" + "DeepOrange" + "Earth" + "MossyGreen" + "GrassyGreen" + "PaleLimeGreen" + "LightGreyBlue" + "PaleGrey" + "Asparagus" + "Blueberry" + "PurpleRed" + "PaleLime" + "GreenishTeal" + "Caramel" + "DeepMagenta" + "LightPeach" + "MilkChocolate" + "Ocher" + "OffGreen" + "PurplyPink" + "Lightblue" + "DuskyBlue" + "Golden" + "LightBeige" + "ButterYellow" + "DuskyPurple" + "FrenchBlue" + "UglyYellow" + "GreenyYellow" + "OrangishRed" + "ShamrockGreen" + "OrangishBrown" + "TreeGreen" + "DeepViolet" + "Gunmetal" + "BluePurple" + "Cherry" + "SandyBrown" + "WarmGrey" + "DarkIndigo" + "Midnight" + "BlueyGreen" + "GreyPink" + "SoftPurple" + "Blood" + "BrownRed" + "MediumGrey" + "Berry" + "Poo" + "PurpleyPink" + "LightSalmon" + "Snot" + "EasterPurple" + "LightYellowGreen" + "DarkNavyBlue" + "Drab" + "LightRose" + "Rouge" + "PurplishRed" + "SlimeGreen" + "BabyPoop" + "IrishGreen" + "PinkPurple" + "DarkNavy" + "GreenyBlue" + "LightPlum" + "PinkishGrey" + "DirtyOrange" + "RustRed" + "PaleLilac" + "OrangeyRed" + "PrimaryBlue" + "KermitGreen" + "BrownishPurple" + "MurkyGreen" + "Wheat" + "VeryDarkPurple" + "BottleGreen" + "Watermelon" + "DeepSkyBlue" + "FireEngineRed" + "YellowOchre" + "PumpkinOrange" + "PaleOlive" + "LightLilac" + "LightishGreen" + "CarolinaBlue" + "Mulberry" + "ShockingPink" + "Auburn" + "BrightLimeGreen" + "Celadon" + "PinkishBrown" + "PooBrown" + "BrightSkyBlue" + "Celery" + "DirtBrown" + "Strawberry" + "DarkLime" + "Copper" + "MediumBrown" + "MutedGreen" + "Robin'sEgg" + "BrightAqua" + "BrightLavender" + "Ivory" + "VeryLightPurple" + "LightNavy" + "PinkRed" + "OliveBrown" + "PoopBrown" + "MustardGreen" + "OceanGreen" + "VeryDarkBlue" + "DustyGreen" + "LightNavyBlue" + "MintyGreen" + "Adobe" + "Barney" + "JadeGreen" + "BrightLightBlue" + "LightLime" + "DarkKhaki" + "OrangeYellow" + "Ocre" + "Maize" + "FadedPink" + "BritishRacingGreen" + "Sandstone" + "MudBrown" + "LightSeaGreen" + "RobinEggBlue" + "AquaMarine" + "DarkSeaGreen" + "SoftPink" + "OrangeyBrown" + "CherryRed" + "BurntYellow" + "BrownishGrey" + "Camel" + "PurplishGrey" + "Marine" + "GreyishPink" + "PaleTurquoise" + "PastelYellow" + "BlueyPurple" + "CanaryYellow" + "FadedRed" + "Sepia" + "Coffee" + "BrightMagenta" + "Mocha" + "Ecru" + "Purpleish" + "Cranberry" + "DarkishGreen" + "BrownOrange" + "DuskyRose" + "Melon" + "SicklyGreen" + "Silver" + "PurplyBlue" + "PurpleishBlue" + "HospitalGreen" + "ShitBrown" + "MidBlue" + "Amber" + "EasterGreen" + "SoftBlue" + "CeruleanBlue" + "GoldenBrown" + "BrightTurquoise" + "RedPink" + "RedPurple" + "GreyishBrown" + "Vermillion" + "Russet" + "SteelGrey" + "LighterPurple" + "BrightViolet" + "PrussianBlue" + "SlateGreen" + "DirtyPink" + "DarkBlueGreen" + "Pine" + "YellowyGreen" + "DarkGold" + "Bluish" + "DarkishBlue" + "DullRed" + "PinkyRed" + "Bronze" + "PaleTeal" + "MilitaryGreen" + "BarbiePink" + "BubblegumPink" + "PeaSoupGreen" + "DarkMustard" + "Shit" + "MediumPurple" + "VeryDarkGreen" + "Dirt" + "DuskyPink" + "RedViolet" + "LemonYellow" + "Pistachio" + "DullYellow" + "DarkLimeGreen" + "DenimBlue" + "TealBlue" + "LightishBlue" + "PurpleyBlue" + "LightIndigo" + "SwampGreen" + "BrownGreen" + "DarkMaroon" + "HotPurple" + "DarkForestGreen" + "FadedBlue" + "DrabGreen" + "LightLimeGreen" + "SnotGreen" + "Yellowish" + "LightBlueGreen" + "Bordeaux" + "LightMauve" + "Ocean" + "Marigold" + "MuddyGreen" + "DullOrange" + "Steel" + "ElectricPurple" + "FluorescentGreen" + "YellowishBrown" + "Blush" + "SoftGreen" + "BrightOrange" + "Lemon" + "PurpleGrey" + "AcidGreen" + "PaleLavender" + "VioletBlue" + "LightForestGreen" + "BurntRed" + "KhakiGreen" + "Cerise" + "FadedPurple" + "Apricot" + "DarkOliveGreen" + "GreyBrown" + "GreenGrey" + "TrueBlue" + "PaleViolet" + "PeriwinkleBlue" + "LightSkyBlue" + "Blurple" + "GreenBrown" + "Bluegreen" + "BrightTeal" + "BrownishYellow" + "PeaSoup" + "Forest" + "BarneyPurple" + "Ultramarine" + "Purplish" + "PukeYellow" + "BluishGrey" + "DarkPeriwinkle" + "DarkLilac" + "Reddish" + "LightMaroon" + "DustyPurple" + "TerraCotta" + "Avocado" + "MarineBlue" + "TealGreen" + "SlateGrey" + "LighterGreen" + "ElectricGreen" + "DustyBlue" + "GoldenYellow" + "BrightYellow" + "LightLavender" + "Umber" + "Poop" + "DarkPeach" + "JungleGreen" + "Eggshell" + "Denim" + "YellowBrown" + "DullPurple" + "ChocolateBrown" + "WineRed" + "NeonBlue" + "DirtyGreen" + "LightTan" + "IceBlue" + "CadetBlue" + "DarkMauve" + "VeryLightBlue" + "GreyPurple" + "PastelPink" + "VeryLightGreen" + "DarkSkyBlue" + "Evergreen" + "DullPink" + "Aubergine" + "Mahogany" + "ReddishOrange" + "DeepGreen" + "VomitGreen" + "PurplePink" + "DustyPink" + "FadedGreen" + "CamoGreen" + "PinkyPurple" + "PinkPurple" + "BrownishRed" + "DarkRose" + "Mud" + "Brownish" + "EmeraldGreen" + "PaleBrown" + "DullBlue" + "BurntUmber" + "MediumGreen" + "Clay" + "LightAqua" + "LightOliveGreen" + "BrownishOrange" + "DarkAqua" + "PurplishPink" + "DarkSalmon" + "GreenishGrey" + "Jade" + "UglyGreen" + "DarkBeige" + "Emerald" + "PaleRed" + "LightMagenta" + "Sky" + "LightCyan" + "YellowOrange" + "ReddishPurple" + "ReddishPink" + "Orchid" + "DirtyYellow" + "OrangeRed" + "DeepRed" + "OrangeBrown" + "CobaltBlue" + "NeonPink" + "RosePink" + "GreyishPurple" + "Raspberry" + "AquaGreen" + "SalmonPink" + "Tangerine" + "BrownishGreen" + "RedBrown" + "GreenishBrown" + "Pumpkin" + "PineGreen" + "Charcoal" + "BabyPink" + "Cornflower" + "BlueViolet" + "Chocolate" + "GreyishGreen" + "Scarlet" + "GreenYellow" + "DarkOlive" + "Sienna" + "PastelPurple" + "Terracotta" + "AquaBlue" + "SageGreen" + "BloodRed" + "DeepPink" + "Grass" + "Moss" + "PastelBlue" + "BluishGreen" + "GreenBlue" + "DarkTan" + "GreenishBlue" + "PaleOrange" + "Vomit" + "ForrestGreen" + "DarkLavender" + "DarkViolet" + "PurpleBlue" + "DarkCyan" + "OliveDrab" + "Pinkish" + "Cobalt" + "NeonPurple" + "LightTurquoise" + "AppleGreen" + "DullGreen" + "Wine" + "PowderBlue" + "OffWhite" + "ElectricBlue" + "DarkTurquoise" + "BluePurple" + "Azure" + "BrightRed" + "PinkishRed" + "CornflowerBlue" + "LightOlive" + "Grape" + "GreyishBlue" + "PurplishBlue" + "YellowishGreen" + "GreenishYellow" + "MediumBlue" + "DustyRose" + "LightViolet" + "MidnightBlue" + "BluishPurple" + "RedOrange" + "DarkMagenta" + "Greenish" + "OceanBlue" + "Coral" + "Cream" + "ReddishBrown" + "BurntSienna" + "Brick" + "Sage" + "GreyGreen" + "White" + "Robin'sEggBlue" + "MossGreen" + "SteelBlue" + "Eggplant" + "LightYellow" + "LeafGreen" + "LightGrey" + "Puke" + "PinkishPurple" + "SeaBlue" + "PalePurple" + "SlateBlue" + "BlueGrey" + "HunterGreen" + "Fuchsia" + "Crimson" + "PaleYellow" + "Ochre" + "MustardYellow" + "LightRed" + "Cerulean" + "PalePink" + "DeepBlue" + "Rust" + "LightTeal" + "Slate" + "Goldenrod" + "DarkYellow" + "DarkGrey" + "ArmyGreen" + "GreyBlue" + "Seafoam" + "Puce" + "SpringGreen" + "DarkOrange" + "Sand" + "PastelGreen" + "Mint" + "LightOrange" + "BrightPink" + "Chartreuse" + "DeepPurple" + "DarkBrown" + "Taupe" + "PeaGreen" + "PukeGreen" + "KellyGreen" + "SeafoamGreen" + "BlueGreen" + "Khaki" + "Burgundy" + "DarkTeal" + "BrickRed" + "RoyalPurple" + "Plum" + "MintGreen" + "Gold" + "BabyBlue" + "YellowGreen" + "BrightPurple" + "DarkRed" + "PaleBlue" + "GrassGreen" + "Navy" + "Aquamarine" + "BurntOrange" + "NeonGreen" + "BrightBlue" + "Rose" + "LightPink" + "Mustard" + "Indigo" + "Lime" + "SeaGreen" + "Periwinkle" + "DarkPink" + "OliveGreen" + "Peach" + "PaleGreen" + "LightBrown" + "HotPink" + "Black" + "Lilac" + "NavyBlue" + "RoyalBlue" + "Beige" + "Salmon" + "Olive" + "Maroon" + "BrightGreen" + "DarkPurple" + "Mauve" + "ForestGreen" + "Aqua" + "Cyan" + "Tan" + "DarkBlue" + "Lavender" + "Turquoise" + "DarkGreen" + "Violet" + "LightPurple" + "LimeGreen" + "Grey" + "SkyBlue" + "Yellow" + "Magenta" + "LightGreen" + "Orange" + "Teal" + "LightBlue" + "Red" + "Brown" + "Pink" + "Blue" + "Green" + "Purple"))) + "List of colors provided by xkcdcolors package.") + +(TeX-add-style-hook + "xkcdcolors" + (lambda () + ;; Run the style hook for xcolor.sty: + (TeX-run-style-hooks "xcolor") + ;; Make the colors defined in xkcdcolors.sty available: + (apply #'LaTeX-add-xcolor-definecolors LaTeX-xkcdcolors-colornames)) + TeX-dialect) + +(defvar LaTeX-xkcdcolors-package-options nil + "Package options for the xkcdcolors package.") + +;;; xkcdcolors.el ends here diff --git a/elpa/auctex-13.1.3/style/xkcdcolors.elc b/elpa/auctex-13.1.3/style/xkcdcolors.elc Binary files differnew file mode 100644 index 0000000..3d575d2 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xkcdcolors.elc diff --git a/elpa/auctex-13.1.3/style/xltabular.el b/elpa/auctex-13.1.3/style/xltabular.el new file mode 100644 index 0000000..3fb3e0d --- /dev/null +++ b/elpa/auctex-13.1.3/style/xltabular.el @@ -0,0 +1,147 @@ +;;; xltabular.el --- AUCTeX style for `xltabular.sty' (v0.05) -*- lexical-binding: t; -*- + +;; Copyright (C) 2017--2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2017-11-03 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `xltabular.sty' (v0.05) from 2017/10/26. +;; `xltabular.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +(defvar LaTeX-xltabular-skipping-regexp + (concat "[ \t]*" (regexp-opt '("[l]" "[r]" "[c]" "")) "[ \t]*{[^}]*}[ \t]*") + "Regexp matching between \\begin{xltabular} and column specification. +For xltabular environment only. See `LaTeX-insert-ampersands' for detail. + +This regexp assumes that the width specification contains neither +nested curly brace pair nor escaped \"}\".") + +(defun LaTeX-env-xltabular (environment) + "Insert a xltabular ENVIRONMENT with spec, caption and label." + ;; xltabular has the following syntax: + ;; \begin{xltabular}[hPos]{width}{ l X ...} + ;; Optional <hPos> comes before <width>, hence we cannot use + ;; `LaTeX-env-tabular*' here and has to cook our own function which + ;; is a combination of `LaTeX-env-tabular*' and + ;; `LaTeX-env-longtable'. Note that `LaTeX-default-position' can be + ;; nil, i.e. do not prompt: + (let* ((pos (and LaTeX-default-position + (completing-read (TeX-argument-prompt t nil "Position") + '("l" "r" "c") + nil nil LaTeX-default-position))) + (width (TeX-read-string + (format "Width (default %s): " LaTeX-default-width) + nil nil LaTeX-default-width)) + (fmt (TeX-read-string + (if (string= LaTeX-default-format "") + "Format: " + (format "Format (default %s): " LaTeX-default-format)) + nil nil + (if (string= LaTeX-default-format "") + nil + LaTeX-default-format))) + (caption (TeX-read-string "Caption: ")) + (short-caption (when (>= (length caption) LaTeX-short-caption-prompt-length) + (TeX-read-string "(Optional) Short caption: ")))) + (setq LaTeX-default-position pos + LaTeX-default-width width + LaTeX-default-format fmt) + (LaTeX-insert-environment environment + (concat + (unless (zerop (length pos)) + (concat LaTeX-optop pos LaTeX-optcl)) + (concat TeX-grop width TeX-grcl) + (concat TeX-grop fmt TeX-grcl))) + ;; top caption -- do nothing if user skips caption + (unless (zerop (length caption)) + ;; insert `\caption[short-caption]{caption': + (insert TeX-esc "caption") + (when (and short-caption (not (string= short-caption ""))) + (insert LaTeX-optop short-caption LaTeX-optcl)) + (insert TeX-grop caption) + ;; ask for a label and insert it + (LaTeX-label environment 'environment) + ;; the longtable `\caption' is equivalent to a + ;; `\multicolumn', so it needs a `\\' at the + ;; end of the line. Prior to that, add } to + ;; close `\caption{' + (insert TeX-grcl "\\\\") + ;; fill the caption + (when auto-fill-function (LaTeX-fill-paragraph)) + ;; Insert a new line and indent + (LaTeX-newline) + (indent-according-to-mode)) + ;; Insert suitable number of &'s, suppress line break + (LaTeX-item-xltabular t))) + +(defun LaTeX-item-xltabular (&optional suppress) + "Insert line break macro on the last line and suitable number of &'s. +For xltabular environment only. + +If SUPPRESS is non-nil, do not insert line break macro." + (unless suppress + (save-excursion + (end-of-line 0) + (just-one-space) + (TeX-insert-macro "\\"))) + (LaTeX-insert-ampersands + LaTeX-xltabular-skipping-regexp #'LaTeX-array-count-columns)) + +(TeX-add-style-hook + "xltabular" + (lambda () + ;; ltablex loads both tabularx and longtable + (TeX-run-style-hooks "ltablex") + + ;; Add xltabular with `LaTeX-env-xltabular':: + (LaTeX-add-environments '("xltabular" LaTeX-env-xltabular)) + + ;; Use the enhanced table formatting. Append to + ;; `LaTeX-indent-environment-list' in order not to override custom settings. + (add-to-list (make-local-variable 'LaTeX-indent-environment-list) + '("xltabular" LaTeX-indent-tabular) t) + + ;; Append xltabular to `LaTeX-label-alist', in order not to + ;; override possible custome values. + (add-to-list 'LaTeX-label-alist '("xltabular" . LaTeX-table-label) t) + + ;; Append xltabular to `LaTeX-item-list' with `LaTeX-item-xltabular' + (add-to-list 'LaTeX-item-list '("xltabular" . LaTeX-item-xltabular) t) + + ;; Tell RefTeX -- This is the same entry as for "longtable" in + ;; `reftex-label-alist-builtin': + (when (fboundp 'reftex-add-label-environments) + (reftex-add-label-environments + '(("xltabular" ?t nil nil caption))))) + TeX-dialect) + +(defvar LaTeX-xltabular-package-options nil + "Package options for the xltabular package.") + +;;; xltabular.el ends here diff --git a/elpa/auctex-13.1.3/style/xltabular.elc b/elpa/auctex-13.1.3/style/xltabular.elc Binary files differnew file mode 100644 index 0000000..8e3c59e --- /dev/null +++ b/elpa/auctex-13.1.3/style/xltabular.elc diff --git a/elpa/auctex-13.1.3/style/xparse.el b/elpa/auctex-13.1.3/style/xparse.el new file mode 100644 index 0000000..fd9bb32 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xparse.el @@ -0,0 +1,353 @@ +;;; xparse.el --- AUCTeX style for `xparse.sty' version 2020-03-06 -*- lexical-binding: t; -*- + +;; Copyright (C) 2013, 2020, 2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Author: Mosè Giordano <mose@gnu.org> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds basic support for `xparse.sty' version 2020-03-06. +;; It parses argument specification of macros and environments. + +;; The "yet not more supported" specifiers `l', `u', `g' and `G' are +;; ignored completely and may lead to wrong parsing results. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-auto-add-type "xparse-macro" "LaTeX") + +(defvar LaTeX-xparse-macro-regexp + `(,(concat + (regexp-quote TeX-esc) + "\\(New\\|Renew\\|Provide\\|Declare\\)" + "\\(?:Expandable\\)?" + "DocumentCommand" + "[ \t\n\r]*" + "{?" + "[ \t\n\r]*" + (regexp-quote TeX-esc) + "\\([A-Za-z]+\\)" + "[ \t\n\r]*" + "}?" + "[ \t\n\r]*" + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}") + (0 2 3 1) LaTeX-auto-xparse-macro) + "Matches macros by xparse package.") + +(TeX-auto-add-type "xparse-environment" "LaTeX") + +(defvar LaTeX-xparse-environment-regexp + `(,(concat + (regexp-quote TeX-esc) + "\\(New\\|Renew\\|Provide\\|Declare\\)" + "DocumentEnvironment" + "[ \t\n\r]*" + "{" + "[ \t\n\r]*" + "\\([A-Za-z]+\\)" + "[ \t\n\r]*" + "}" + "[ \t\n\r]*" + "{\\([^}{]*\\({[^}{]*\\({[^}{]*\\({[^}{]*}[^}{]*\\)*}[^}{]*\\)*}[^}{]*\\)*\\)}") + (0 2 3 1) LaTeX-auto-xparse-environment) + "Matches environments by xparse package.") + +(defun LaTeX-arg-xparse-query (optional op-brace cl-brace &optional prompt) + "Special query function for parsed elements from xparse package. +If OPTIONAL is non-nil, indicate it in minibuffer. OP-BRACE sets +the opening brace, CL-BRACE sets the closing one. PROMPT +replaces the standard one." + (let ((TeX-arg-opening-brace op-brace) + (TeX-arg-closing-brace cl-brace)) + (TeX-argument-insert + (TeX-read-string (TeX-argument-prompt optional prompt "Text")) + optional))) + +(defun LaTeX-arg-xparse-embellishment-query (_optional embellish) + "Special insert function for embellishments from xparse package. +Compatibility argument OPTIONAL is ignored. EMBELLISH is a +string with parsed elements inserted in the buffer. This +function also sets the value of `TeX-exit-mark' where the point +will be once the insertion is completed." + (let (p) + (just-one-space) + (setq p (point)) + (insert embellish) + (set-marker TeX-exit-mark (1+ p)))) + +(defun LaTeX-xparse-macro-parse (type) + "Process parsed macro and environment definitions. +TYPE is one of the symbols mac or env." + (dolist (xcmd (if (eq type 'mac) + (LaTeX-xparse-macro-list) + (LaTeX-xparse-environment-list))) + (let ((name (nth 1 xcmd)) + (spec (nth 2 xcmd)) + (what (nth 3 xcmd)) + args opt-star opt-token) + (with-temp-buffer + (set-syntax-table LaTeX-mode-syntax-table) + ;; This one is probably not really needed? + (goto-char (point-min)) + (insert (replace-regexp-in-string "[ \t\r\n%]" "" spec)) + (goto-char (point-min)) + (while (looking-at-p "[+!>bmrRvodODsteE]") + (cond (;; + or !: Long argument or space aware: Move over + ;; them. b is special; only available for + ;; enviroments + (looking-at-p "[+!b]") + (forward-char 1)) + ((looking-at-p ">") + ;; Argument processors: Move over > and a balanced + ;; {} + (forward-char 1) + (forward-sexp)) + ;; Mandatory arguments: + ;; m: Ask for input with "Text" as prompt + ((looking-at-p "m") + (forward-char 1) + (push "Text" args)) + ;; r<token1><token2> + ((looking-at-p "r") + (re-search-forward "r\\(.\\)\\(.\\)" (+ (point) 3) t) + (push `(LaTeX-arg-xparse-query + ,(match-string-no-properties 1) + ,(match-string-no-properties 2)) + args)) + ;; R<token1><token2>{default} + ((looking-at-p "R") + (re-search-forward "R\\(.\\)\\(.\\)" (+ (point) 3) t) + (forward-sexp) + (push `(LaTeX-arg-xparse-query + ,(match-string-no-properties 1) + ,(match-string-no-properties 2)) + args)) + ;; v: Use `TeX-arg-verb-delim-or-brace' + ((looking-at-p "v") + (forward-char 1) + (push #'TeX-arg-verb-delim-or-brace args)) + ;; Optional arguments: + ;; o standard LaTeX optional in square brackets + ((looking-at-p "o") + (forward-char 1) + (push (vector "Text") args)) + ;; d<token1><token2> + ((looking-at-p "d") + (re-search-forward "d\\(.\\)\\(.\\)" (+ (point) 3) t) + (push (vector #'LaTeX-arg-xparse-query + (match-string-no-properties 1) + (match-string-no-properties 2)) + args)) + ;; O{default} + ((looking-at-p "O") + (forward-char 1) + (forward-sexp) + (push (vector "Text") args)) + ;; D<token1><token2>{default} + ((looking-at-p "D") + (re-search-forward "D\\(.\\)\\(.\\)" (+ (point) 3) t) + (forward-sexp) + (push (vector #'LaTeX-arg-xparse-query + (match-string-no-properties 1) + (match-string-no-properties 2)) + args)) + ;; s: optional star + ((looking-at-p "s") + (forward-char 1) + (setq opt-star t)) + ;; t: optional <token> + ((looking-at-p "t") + (re-search-forward "t\\(.\\)" (+ (point) 2) t) + (setq opt-token (match-string-no-properties 1))) + ;; e{tokes} a set of optional embellishments + ((looking-at-p "e") + (forward-char) + (if (looking-at-p TeX-grop) + (re-search-forward "{\\([^}]+\\)}" nil t) + (re-search-forward "\\(.\\)" (1+ (point)) t)) + (push `(LaTeX-arg-xparse-embellishment-query + ,(match-string-no-properties 1)) + args)) + ;; E{tokes}{defaults} + ((looking-at-p "E") + (forward-char) + (if (looking-at-p TeX-grop) + (re-search-forward "{\\([^}]+\\)}" nil t) + (re-search-forward "\\(.\\)" (1+ (point)) t)) + (push `(LaTeX-arg-xparse-embellishment-query + ,(match-string-no-properties 1)) + args) + (when (looking-at-p TeX-grop) + (forward-sexp))) + ;; Finished: + (t nil)))) + (if (eq type 'env) + ;; Parsed enviroments: If we are Renew'ing or Delare'ing, we + ;; delete the enviroment first from `LaTeX-environment-list' + ;; before adding the new one. We have to sort the value of + ;; `LaTeX-environment-list' by running the function of the + ;; same name: + (progn + (when (member what '("Renew" "Declare")) + (LaTeX-environment-list) + (setq LaTeX-environment-list + (assq-delete-all (car (assoc name LaTeX-environment-list)) + LaTeX-environment-list))) + (LaTeX-add-environments `(,name + LaTeX-env-args + ,@(reverse args)))) + ;; Parsed macros: If we are Renew'ing or Delare'ing, we delete + ;; the macros first from `TeX-symbol-list' before adding the + ;; new ones. We have to sort the value of `TeX-symbol-list' + ;; by running the function of the same name: + (when (member what '("Renew" "Declare")) + (TeX-symbol-list) + (setq TeX-symbol-list + (assq-delete-all (car (assoc name TeX-symbol-list)) + TeX-symbol-list)) + (when opt-star + (setq TeX-symbol-list + (assq-delete-all (car (assoc (concat name "*") TeX-symbol-list)) + TeX-symbol-list))) + (when opt-token + (setq TeX-symbol-list + (assq-delete-all (car (assoc (concat name opt-token) TeX-symbol-list)) + TeX-symbol-list)))) + (TeX-add-symbols (cons name + (reverse args))) + (when opt-star + (TeX-add-symbols (cons (concat name "*") + (reverse args)))) + (when opt-token + (TeX-add-symbols (cons (concat name opt-token) + (reverse args)))))))) + +(defun LaTeX-xparse-auto-prepare () + "Clear various `LaTeX-auto-xparse-*' variables before parsing." + (setq LaTeX-auto-xparse-macro nil + LaTeX-auto-xparse-environment nil)) + +(defun LaTeX-xparse-auto-cleanup () + "Process parsed elements for xparse package." + (LaTeX-xparse-macro-parse 'mac) + (LaTeX-xparse-macro-parse 'env)) + +(add-hook 'TeX-auto-prepare-hook #'LaTeX-xparse-auto-prepare t) +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-xparse-auto-cleanup t) +(add-hook 'TeX-update-style-hook #'TeX-auto-parse t) + +(TeX-add-style-hook + "xparse" + (lambda () + (TeX-auto-add-regexp LaTeX-xparse-macro-regexp) + (TeX-auto-add-regexp LaTeX-xparse-environment-regexp) + (TeX-run-style-hooks + "expl3") + (TeX-add-symbols + ;; Declaring commands + '("DeclareDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + '("NewDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + '("RenewDocumentCommand" + TeX-arg-macro "Argument specification" t) + '("ProvideDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + + ;; Declaring commands and environments + '("DeclareDocumentEnvironment" TeX-arg-define-environment + "Argument specification" t t) + '("NewDocumentEnvironment" TeX-arg-define-environment + "Argument specification" t t) + '("RenewDocumentEnvironment" TeX-arg-environment + "Argument specification" t t) + '("ProvideDocumentEnvironment" TeX-arg-define-environment + "Argument specification" t t) + + ;; Fully-expandable document commands + '("DeclareExpandableDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + '("NewExpandableDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + '("RenewExpandableDocumentCommand" + TeX-arg-macro "Argument specification" t) + '("ProvideExpandableDocumentCommand" + TeX-arg-define-macro "Argument specification" t) + + ;; Testing special values + '("IfBooleanTF" 3) + '("IfBooleanT" 2) + '("IfBooleanF" 2) + '("IfNoValueTF" 3) + '("IfNoValueT" 2) + '("IfNoValueF" 2) + '("IfValueTF" 3) + '("IfValueT" 2) + '("IfValueF" 2) + "BooleanTrue" + "BooleanFalse" + ;; Argument processors + "ProcessedArgument" + "ReverseBoolean" + '("SplitArgument" "Number" "Token") + '("SplitList" "Token") + "TrimSpaces" + '("ProcessList" "List" "Function") + ;; Access to the argument specification + '("GetDocumentCommandArgSpec" TeX-arg-macro) + '("GetDocumentEnvironmmentArgSpec" TeX-arg-environment) + '("ShowDocumentCommandArgSpec" TeX-arg-macro) + '("ShowDocumentEnvironmentArgSpec" TeX-arg-environment)) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("DeclareDocumentCommand" "|{\\{{") + ("NewDocumentCommand" "|{\\{{") + ("ProvideDocumentCommand" "|{\\{{") + ("RenewDocumentCommand" "|{\\{{") + ;; + ("DeclareExpandableDocumentCommand" "|{\\{{") + ("NewExpandableDocumentCommand" "|{\\{{") + ("ProvideExpandableDocumentCommand" "|{\\{{") + ("RenewExpandableDocumentCommand" "|{\\{{") + ;; + ("DeclareDocumentEnvironment" "{{{{") + ("NewDocumentEnvironment" "{{{{") + ("ProvideDocumentEnvironment" "{{{{") + ("RenewDocumentEnvironment" "{{{{")) + 'function))) + TeX-dialect) + +(defun LaTeX-xparse-package-options () + "Read the xparse package options from the user." + (TeX-read-key-val t '(("log-declarations" ("true" "false"))))) + +;;; xparse.el ends here diff --git a/elpa/auctex-13.1.3/style/xparse.elc b/elpa/auctex-13.1.3/style/xparse.elc Binary files differnew file mode 100644 index 0000000..725bea9 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xparse.elc diff --git a/elpa/auctex-13.1.3/style/xr-hyper.el b/elpa/auctex-13.1.3/style/xr-hyper.el new file mode 100644 index 0000000..472d028 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xr-hyper.el @@ -0,0 +1,73 @@ +;;; xr-hyper.el --- AUCTeX style for `xr-hyper.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-10-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `xr-hyper.sty' v7.00m form 2021-06-07. +;; RefTeX has good support for referencing external \label's, so it +;; should be used. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "xr-hyper" + (lambda () + (TeX-add-symbols + '("externaldocument" + ["Prefix"] + [TeX-arg-eval completing-read + (TeX-argument-prompt t nil "Cite option") + '("nocite")] + ;; Act like \include and not like \input: + (TeX-arg-input-file "File" t) + ["Final file"]) + + '("externalcitedocument" + ["Prefix"] + ;; Act like \include and not like \input: + (TeX-arg-input-file "File" t) + ["Final file"])) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("externaldocument" "[[{[") + ("externalcitedocument" "[[{[")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-xr-hyper-package-options nil + "Package options for the xr-hyper package.") + +;;; xr-hyper.el ends here diff --git a/elpa/auctex-13.1.3/style/xr-hyper.elc b/elpa/auctex-13.1.3/style/xr-hyper.elc Binary files differnew file mode 100644 index 0000000..144e7ad --- /dev/null +++ b/elpa/auctex-13.1.3/style/xr-hyper.elc diff --git a/elpa/auctex-13.1.3/style/xr.el b/elpa/auctex-13.1.3/style/xr.el new file mode 100644 index 0000000..c388ead --- /dev/null +++ b/elpa/auctex-13.1.3/style/xr.el @@ -0,0 +1,68 @@ +;;; xr.el --- AUCTeX style for `xr.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2021-10-05 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `xr.sty' v5.06 form 2020-05-10. RefTeX +;; has good support for referencing external \label's, so it should be +;; used. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "xr" + (lambda () + (TeX-add-symbols + '("externaldocument" + ["Prefix"] + ;; Act like \include and not like \input: + (TeX-arg-input-file "File" t)) + + '("externalcitedocument" + ["Prefix"] + ;; Act like \include and not like \input: + (TeX-arg-input-file "File" t))) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("externaldocument" "[{") + ("externalcitedocument" "[{")) + 'reference))) + TeX-dialect) + +(defvar LaTeX-xr-package-options nil + "Package options for the xr package.") + +;;; xr.el ends here diff --git a/elpa/auctex-13.1.3/style/xr.elc b/elpa/auctex-13.1.3/style/xr.elc Binary files differnew file mode 100644 index 0000000..1ff3923 --- /dev/null +++ b/elpa/auctex-13.1.3/style/xr.elc diff --git a/elpa/auctex-13.1.3/style/xspace.el b/elpa/auctex-13.1.3/style/xspace.el new file mode 100644 index 0000000..5f04c5b --- /dev/null +++ b/elpa/auctex-13.1.3/style/xspace.el @@ -0,0 +1,60 @@ +;;; xspace.el --- AUCTeX style for `xspace.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Mads Jensen <mje@inducks.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2011-02-01 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `xspace.sty'. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "xspace" + (lambda () + (TeX-add-symbols + '("xspace" 0) + "xspaceaddexception" + "xspaceremoveexception") + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("xspace" "") + ("xspaceaddexception" "{") + ("xspaceremoveexception" "{")) + 'function))) + TeX-dialect) + +(defvar LaTeX-xspace-package-options nil + "Package options for the xspace package.") + +;;; xspace.el ends here diff --git a/elpa/auctex-13.1.3/style/xspace.elc b/elpa/auctex-13.1.3/style/xspace.elc Binary files differnew file mode 100644 index 0000000..f39d27f --- /dev/null +++ b/elpa/auctex-13.1.3/style/xspace.elc diff --git a/elpa/auctex-13.1.3/style/zlmtt.el b/elpa/auctex-13.1.3/style/zlmtt.el new file mode 100644 index 0000000..40712fc --- /dev/null +++ b/elpa/auctex-13.1.3/style/zlmtt.el @@ -0,0 +1,65 @@ +;;; zlmtt.el --- AUCTeX style for `zlmtt.sty' (v1.01) -*- lexical-binding: t; -*- + +;; Copyright (C) 2014, 2018, 2020 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2014-10-31 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `zlmtt.sty' (v1.01) from 2014/06/28. +;; `zlmtt.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(TeX-add-style-hook + "zlmtt" + (lambda () + + ;; New symbols + (TeX-add-symbols + '("proptt" t) ; proportional typewriter + '("monott" t) ; monospace typewriter + '("lctt" t)) ; light condensed typewriter + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("proptt" "{") + ("monott" "{") + ("lctt" "{")) + 'type-command))) + TeX-dialect) + +(defvar LaTeX-zlmtt-package-options + '("light" "l" "lightcondensed" "lc" "med" "m" + "proportional" "p" "scaled") + "Package options for the zlmtt package.") + +;;; zlmtt.el ends here diff --git a/elpa/auctex-13.1.3/style/zlmtt.elc b/elpa/auctex-13.1.3/style/zlmtt.elc Binary files differnew file mode 100644 index 0000000..27c9044 --- /dev/null +++ b/elpa/auctex-13.1.3/style/zlmtt.elc diff --git a/elpa/auctex-13.1.3/tex-bar.el b/elpa/auctex-13.1.3/tex-bar.el new file mode 100644 index 0000000..a9863f8 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-bar.el @@ -0,0 +1,509 @@ +;;; tex-bar.el --- toolbar icons on AUCTeX in GNU emacs. -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2022 Free Software Foundation, Inc. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program; if not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +;; MA 02110-1301 USA + +;; Author: Miguel V. S. Frasson <frasson@math.leidenuniv.nl> +;; Keywords: tool-bar, tex, latex + +;;; Commentary: +;; + +;; This package also needs `toolbar-x.el', and `latex.el' for the +;; symbol-toolbar. + +;;; Use of this preliminary version: + +;; - Add `LaTeX-install-toolbar' to `LaTeX-mode-hook'. + +;; Special requirements for the use of experimental symbol-toolbar: + +;; - Customize `TeX-bar-LaTeX-buttons', adding the label +;; `LaTeX-symbols-experimental' at the end. + +;; - You should have a folder called "symb-pics" with the pics of the +;; symbols (xpm format is a good one), and the *parent* of this +;; folder should be in `load-path'. +;; Did you read carefully this item? I will say again: the folder +;; "symb-pics" should *not* be in `load-path', but its *parent*. + +;; - each image file is named after the command that it represents in +;; the following rules: the base name is the name of the command +;; without the escape character "\", like \delta -> "delta.xpm"; +;; however, since in some OS filenames are case insensitive, all +;; occurences of capital letter should be replaced by the letter +;; plus a dash: \Rightarrow -> "R-ightarrow.xpm" --- actually, for +;; the correct name, apply `TeX-bar-img-filename' to "Rightarrow" +;; (TeX-bar-img-filename "Rightarrow") +;; --> "R-ightarrow" +;; The function `TeX-bar-img-filename' also treats special commands +;; like `\{', `\|', etc. + +;; You can get the symbol images on (temporary solution) +;; http://www.math.leidenuniv.nl/~frasson/symb-pics.tar.gz + +;;; Code: + +(require 'custom) + +(require 'toolbar-x) + +(require 'tex) + +;; For the symbol toolbar +(require 'latex) + +;;; Standard buttons + +;; help strings +(defun TeX-bar-help-from-command-list (item) + "Return the help string of ITEM in `TeX-command-list'. +If there is no help, the empty string is returned." + (let ((help (nth 1 (memq :help (assoc item TeX-command-list))))) + (if help help ""))) + +(defgroup TeX-tool-bar nil + "Tool bar support in AUCTeX." + :group 'AUCTeX) + +(defcustom TeX-bar-TeX-buttons + '(new-file open-file dired kill-buffer save-buffer cut copy paste undo + separator tex next-error view bibtex spell) + "List of buttons available in `tex-mode'. +It should be a list in the same format of the BUTTONS parameter +in function `toolbarx-install-toolbar', often a symbol that +labels a button. + +Type `\\[TeX-bar-TeX-buttons]' for a list of available buttons. + +Buttons are defined in alists (labels associated to properties +that define a button). For a list of variables that hold such +alists, see variable `TeX-bar-TeX-all-button-alists'." + :type '(list (set :inline t + (const new-file) + (const open-file) + (const dired) + (const kill-buffer) + (const save-buffer) + (const write-file) + (const undo) + (const cut) + (const copy) + (const paste) + (const search-forward) + (const print-buffer) + (const separator) + (const tex) + (const next-error) + (const view) + (const file) + (const bibtex) + (const clean) + (const spell)) + ;; (const latex-symbols-experimental) + (repeat (choice (symbol :tag "Label") + (sexp :tag "General element")))) + :group 'TeX-tool-bar) + +(defgroup TeX-tool-bar-button-definitions nil + "Collections of button definitions." + :group 'TeX-tool-bar) + +(defcustom TeX-bar-TeX-all-button-alists + '(TeX-bar-TeX-button-alist + toolbarx-default-toolbar-meaning-alist) + "List of variables that hold buttons properties. +Each element should be a symbol bound to list in the format of +the argument BUTTON-ALIST in function `toolbarx-install-toolbar'." + :type '(repeat variable) + :group 'TeX-tool-bar-button-definitions) + +(defcustom TeX-bar-TeX-button-alist + '((tex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex")) + :command (progn + (TeX-save-document #'TeX-master-file) + (TeX-command "TeX" #'TeX-master-file -1)) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "TeX"))) + (pdftex :image "pdftex" + :command (progn + (TeX-save-document #'TeX-master-file) + (TeX-command "PDFTeX" #'TeX-master-file -1)) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "PDFTeX"))) + (next-error :image "error" + :command TeX-next-error + :enable (TeX-error-report-has-errors-p) + :visible (TeX-error-report-has-errors-p)) + (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi")) + :command (TeX-command "View" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "View"))) + (file :image "dvips" + :command (TeX-command "File" #'TeX-master-file -1) + :visible (not TeX-PDF-mode) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "File"))) + (bibtex :image "bibtex" + :command (TeX-command "BibTeX" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "BibTeX"))) + (clean :image "delete" + :command (TeX-command "Clean" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "Clean"))) + (spell :image "spell" + :command (TeX-command "Spell" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "Spell")))) + ;; latex-symbols-experimental? + "Alist for button definitions in TeX bar. +Value should le a list where each element is of format (KEY . +PROPS), where KEY is a symbol that labels the button and PROPS is +a list of properties of the button. For a description of the +format of PROPS, please see documentation of function +`toolbarx-install-toolbar'. This custom variable is in the same +format of the argument MEANING-ALIST in the mentioned function." + :type '(alist :key-type symbol :value-type sexp) + :group 'TeX-tool-bar-button-definitions) + +(defun TeX-bar-TeX-buttons () + "Display in a buffer a list of buttons for `tex-bar.el'." + (interactive) + (let ((assqs-button-alists) + (labels)) + (dolist (m-alist TeX-bar-TeX-all-button-alists) + (setq labels nil) + (dolist (as (eval m-alist t)) + (setq labels (cons (car as) labels))) + (setq assqs-button-alists (cons (cons m-alist (nreverse labels)) + assqs-button-alists))) + (setq assqs-button-alists (nreverse assqs-button-alists)) + ;; displaying results + (with-current-buffer (get-buffer-create "*TeX tool bar buttons*") + (erase-buffer) + (insert "Available buttons for TeX mode +================================") + (dolist (i assqs-button-alists) + (insert (format "\n\n`%s' provides the following buttons:\n " (car i))) + (dolist (j (cdr i)) + (insert (format " %s" j))) + (fill-region (point-at-bol) (point-at-eol)))) + (display-buffer "*TeX tool bar buttons*" t))) + +;;; Installation of the tool bar +;;;###autoload +(defun TeX-install-toolbar () + "Install toolbar buttons for TeX mode." + (interactive) + (add-to-list 'toolbarx-image-path + (expand-file-name "images" TeX-data-directory)) + (add-hook 'TeX-PDF-mode-hook #'toolbarx-refresh nil t) + (toolbarx-install-toolbar TeX-bar-TeX-buttons + (let ((append-list)) + (dolist (elt TeX-bar-TeX-all-button-alists) + (setq append-list (append append-list + (eval elt t)))) + append-list))) + +(defcustom TeX-bar-LaTeX-buttons + '(new-file open-file dired kill-buffer save-buffer cut copy paste undo + separator latex next-error view bibtex spell) + "List of buttons available in `latex-mode'. +It should be a list in the same format of the BUTTONS parameter +in function `toolbarx-install-toolbar', often a symbol that +labels a button. + +Type `\\[TeX-bar-LaTeX-buttons]' for a list of available buttons. + +Buttons are defined in alists (labels associated to properties +that define a button). For a list of variables that hold such +alists, see variable `TeX-bar-LaTeX-all-button-alists'." + :type '(list (set :inline t + (const new-file) + (const open-file) + (const dired) + (const kill-buffer) + (const save-buffer) + (const write-file) + (const undo) + (const cut) + (const copy) + (const paste) + (const search-forward) + (const print-buffer) + (const separator) + (const latex) + (const next-error) + (const view) + (const file) + (const bibtex) + (const clean) + (const spell) + (const latex-symbols-experimental)) + (repeat (choice (symbol :tag "Label") + (sexp :tag "General element")))) + :group 'TeX-tool-bar) + +(defcustom TeX-bar-LaTeX-all-button-alists + '(TeX-bar-LaTeX-button-alist + toolbarx-default-toolbar-meaning-alist) + "List of variables that hold buttons properties. +Each element should be a symbol bound to list in the format of +the argument BUTTON-ALIST in function `toolbarx-install-toolbar'." + :type '(repeat variable) + :group 'TeX-tool-bar-button-definitions) + +(defcustom TeX-bar-LaTeX-button-alist + '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex")) + :command (progn + (TeX-save-document #'TeX-master-file) + (TeX-command "LaTeX" #'TeX-master-file -1)) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "LaTeX"))) + (pdflatex :image "pdftex" + :command (progn + (TeX-save-document #'TeX-master-file) + (TeX-command "PDFLaTeX" #'TeX-master-file -1)) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "PDFLaTeX"))) + (next-error :image "error" + :command TeX-next-error + :enable (TeX-error-report-has-errors-p) + :visible (TeX-error-report-has-errors-p)) + (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi")) + :command (TeX-command "View" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "View"))) + (file :image "dvips" + :command (TeX-command "File" #'TeX-master-file -1) + :visible (not TeX-PDF-mode) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "File"))) + (bibtex :image "bibtex" + :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX") + #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list + (if LaTeX-using-Biber "Biber" "BibTeX")))) + (clean :image "delete" + :command (TeX-command "Clean" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "Clean"))) + (spell :image "spell" + :command (TeX-command "Spell" #'TeX-master-file -1) + :help (lambda (&rest ignored) + (TeX-bar-help-from-command-list "Spell"))) + (latex-symbols-experimental . (:alias :eval-group + LaTeX-symbols-toolbar-switch-contents + LaTeX-symbols-toolbar-contents))) + "Alist for button definitions in TeX bar. +Value should le a list where each element is of format (KEY . +PROPS), where KEY is a symbol that labels the button and PROPS is +a list of properties of the button. For a description of the +format of PROPS, please see documentation of function +`toolbarx-install-toolbar'. This custom variable is in the same +format of the argument MEANING-ALIST in the mentioned function." + :type '(alist :key-type symbol :value-type sexp) + :group 'TeX-tool-bar-button-definitions) + +(defun TeX-bar-LaTeX-buttons () + "Display in a buffer a list of buttons for `tex-bar.el'." + (interactive) + (let ((assqs-button-alists) + (labels)) + (dolist (m-alist TeX-bar-LaTeX-all-button-alists) + (setq labels nil) + (dolist (as (eval m-alist t)) + (setq labels (cons (car as) labels))) + (setq assqs-button-alists (cons (cons m-alist (nreverse labels)) + assqs-button-alists))) + (setq assqs-button-alists (nreverse assqs-button-alists)) + ;; displaying results + (with-current-buffer (get-buffer-create "*TeX tool bar buttons*") + (erase-buffer) + (insert "Available buttons for LaTeX mode +================================") + (dolist (i assqs-button-alists) + (insert (format "\n\n`%s' provides the following buttons:\n " (car i))) + (dolist (j (cdr i)) + (insert (format " %s" j))) + (fill-region (point-at-bol) (point-at-eol)))) + (display-buffer "*TeX tool bar buttons*" t))) + +;;; Installation of the tool bar +;;;###autoload +(defun LaTeX-install-toolbar () + "Install toolbar buttons for LaTeX mode." + (interactive) + (add-to-list 'toolbarx-image-path + (expand-file-name "images" TeX-data-directory)) + (add-hook 'TeX-PDF-mode-hook #'toolbarx-refresh nil t) + ;; Refresh the toolbar after styles update because `LaTeX-using-Biber' value + ;; could have been changed. Append the refresh to the hook so it is run after + ;; the other styles-related changes. + (add-hook 'TeX-update-style-hook #'toolbarx-refresh t t) + (toolbarx-install-toolbar TeX-bar-LaTeX-buttons + (let ((append-list)) + (dolist (elt TeX-bar-LaTeX-all-button-alists) + (setq append-list (append append-list + (eval elt t)))) + append-list))) + +;;; Experimental Symbol Toolbar + +;;; symbol toolbar +(defun TeX-bar-img-filename (tex-command) + "Return the filename (no extension) for the image button of TEX-COMMAND." + (let ((str-list (append tex-command nil)) + (str-result)) + (dolist (i str-list) + (cond + ;; capital letter -> letter + "-" + ((and (>= i ?A) (<= i ?Z)) + (setq str-result (cons ?- (cons i str-result)))) + ;; lowercase letter -> letter + ((and (>= i ?a) (<= i ?z)) + (setq str-result (cons i str-result))) + ;; open curly brackets `{' -> "ocb--" + ((eq i ?{) + (setq str-result (cons ?o str-result)) + (setq str-result (cons ?c str-result)) + (setq str-result (cons ?b str-result)) + (setq str-result (cons ?- str-result)) + (setq str-result (cons ?- str-result))) + ;; close curly brackets `}' -> "ccb--" + ((eq i ?}) + (setq str-result (cons ?c str-result)) + (setq str-result (cons ?c str-result)) + (setq str-result (cons ?b str-result)) + (setq str-result (cons ?- str-result)) + (setq str-result (cons ?- str-result))) + ;; vertical bar `|' -> "v--" + ((eq i ?|) + (setq str-result (cons ?v str-result)) + (setq str-result (cons ?- str-result)) + (setq str-result (cons ?- str-result))) + ;; slash `/' -> "s--" + ((eq i ?/) + (setq str-result (cons ?s str-result)) + (setq str-result (cons ?- str-result)) + (setq str-result (cons ?- str-result))))) + (concat (nreverse str-result)))) + +(let* ((menu-strings-buttons-alist + ;; make a alist os strings with the symbol classes and store it in + ;; `menu-strings-alist' + (let* ((menu-strings-alist-temp)) + (dolist (item-external (cdr LaTeX-math-menu) + (nreverse menu-strings-alist-temp)) + (when (listp item-external) + ;; if first element is vector, I am supposing that all are + ;; vectors as well + (if (vectorp (cadr item-external)) + (let* ((menu-str (car item-external)) + (menu-buttons)) + (dolist (button (cdr item-external)) + (setq menu-buttons + (cons (list (intern (TeX-bar-img-filename + (aref button 0))) + :image + (concat "symb-pics/" + (TeX-bar-img-filename + (aref button 0))) + :help (aref button 0) + :command (aref button 1)) + menu-buttons))) + (setq menu-buttons (nreverse menu-buttons)) + (setq menu-strings-alist-temp + (cons (cons menu-str (list menu-buttons)) + menu-strings-alist-temp))) + ;; if another list (therefore, up to second level menu) + (let ((parent-str (concat (car item-external) " "))) + (dolist (item-internal (cdr item-external)) + (unless (equal (car item-internal) "Special") + (let* ((menu-str (concat parent-str + (car item-internal))) + (menu-buttons)) + (dolist (button (cdr item-internal)) + (setq menu-buttons + (cons (list (intern (aref button 0)) + :image + (concat "symb-pics/" + (TeX-bar-img-filename + (aref button 0))) + :help (aref button 0) + :command (aref button 1)) + menu-buttons))) + (setq menu-buttons (nreverse menu-buttons)) + (setq menu-strings-alist-temp + (cons (cons menu-str (list menu-buttons)) + menu-strings-alist-temp))))))))))) + (list-strings (let* ((list-str-temp)) + (dolist (i menu-strings-buttons-alist + (nreverse list-str-temp)) + (setq list-str-temp (cons (car i) + list-str-temp)))))) + (defvar LaTeX-symbols-toolbar-visible-flag nil + "Non-nil means that the LaTeX symbols on toolbar are visible. +Internal variable.") + (defconst LaTeX-symbols-toolbar-switch-contents + `(;; the on-off switch button + (latex-symbols-switch + :image (lambda nil (if LaTeX-symbols-toolbar-visible-flag + "ltx-symb-turn-off" + "ltx-symb-turn-on")) + :command (progn + (setq LaTeX-symbols-toolbar-visible-flag + (not LaTeX-symbols-toolbar-visible-flag)) + (toolbarx-refresh)) + ;; help message depends on if symb-toolbar is on or off, and in + ;; the name of the current class of symbols + :help (lambda (&rest ignore) + (concat "Turn " + (if LaTeX-symbols-toolbar-visible-flag "off " "on ") + "the toolbar of LaTeX symbols (current class: " + (nth (1- LaTeX-symbols-active-menuitem) + (quote ,list-strings)) + ")"))) + ;; the dropdown button, that also switch on the symbols + ,(append '(:dropdown-group) + list-strings + '(:variable + LaTeX-symbols-active-menuitem + :save offer + :dropdown-prepend-command + (setq LaTeX-symbols-toolbar-visible-flag t) + :dropdown-help "Select a class of symbols to be displayed")))) + (defconst LaTeX-symbols-toolbar-contents + (let* ((ltx-symb) + (count 0)) + (dolist (i menu-strings-buttons-alist + (append (nreverse ltx-symb) + '(:insert + LaTeX-symbols-toolbar-visible-flag + :toolbar (bottom . top)))) + (setq count (1+ count)) + (setq ltx-symb + (cons (append (cdr i) + `(:insert (eq LaTeX-symbols-active-menuitem + ,count))) + ltx-symb)))))) + +(provide 'tex-bar) + +;;; tex-bar.el ends here diff --git a/elpa/auctex-13.1.3/tex-bar.elc b/elpa/auctex-13.1.3/tex-bar.elc Binary files differnew file mode 100644 index 0000000..d39e520 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-bar.elc diff --git a/elpa/auctex-13.1.3/tex-fold.el b/elpa/auctex-13.1.3/tex-fold.el new file mode 100644 index 0000000..6d50f31 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-fold.el @@ -0,0 +1,948 @@ +;;; tex-fold.el --- Fold TeX macros. -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2022 Free Software Foundation, Inc. + +;; Author: Ralf Angeli <angeli@caeruleus.net> +;; Maintainer: auctex-devel@gnu.org +;; Created: 2004-07-04 +;; Keywords: tex, wp + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides support for hiding and unhiding TeX, LaTeX, +;; ConTeXt, Texinfo and similar macros and environments inside of +;; AUCTeX. +;; +;; Caveats: +;; +;; The display string of content which should display part of itself +;; is made by copying the text from the buffer together with its text +;; properties. If fontification has not happened when this is done +;; (e.g. because of lazy or just-in-time font locking) the intended +;; fontification will not show up. Maybe this could be improved by +;; using some sort of "lazy folding" or refreshing the window upon +;; scrolling. As a workaround fontification of the whole buffer +;; currently is forced before folding it. + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) + +(require 'tex) +(autoload 'LaTeX-forward-paragraph "latex") +(autoload 'LaTeX-backward-paragraph "latex") +(autoload 'LaTeX-find-matching-begin "latex") +(autoload 'LaTeX-find-matching-end "latex") +(autoload 'ConTeXt-find-matching-start "context") +(autoload 'ConTeXt-find-matching-stop "context") +(autoload 'Texinfo-find-env-start "tex-info") +(autoload 'Texinfo-find-env-end "tex-info") + +(defgroup TeX-fold nil + "Fold TeX macros." + :group 'AUCTeX) + +(defcustom TeX-fold-type-list '(env macro math) + "List of item types to consider when folding. +Valid items are the symbols `env' for environments, `macro' for +macros, `math' for math macros and `comment' for comments." + :type '(set (const :tag "Environments" env) + (const :tag "Macros" macro) + (const :tag "Math Macros" math) + (const :tag "Comments" comment))) + +(defcustom TeX-fold-macro-spec-list + '(("[f]" ("footnote" "marginpar")) + ("[c]" ("cite")) + ("[l]" ("label")) + ("[r]" ("ref" "pageref" "eqref" "footref")) + ("[i]" ("index" "glossary")) + ("[1]:||*" ("item")) + ("..." ("dots")) + ("(C)" ("copyright")) + ("(R)" ("textregistered")) + ("TM" ("texttrademark")) + (1 ("part" "chapter" "section" "subsection" "subsubsection" + "paragraph" "subparagraph" + "part*" "chapter*" "section*" "subsection*" "subsubsection*" + "paragraph*" "subparagraph*" + "emph" "textit" "textsl" "textmd" "textrm" "textsf" "texttt" + "textbf" "textsc" "textup"))) + "List of replacement specifiers and macros to fold. + +The first element of each item can be a string, an integer or a +function symbol. The second element is a list of macros to fold +without the leading backslash. + +If the first element is a string, it will be used as a display +replacement for the whole macro. Numbers in braces, brackets, +parens or angle brackets will be replaced by the respective macro +argument. For example \"{1}\" will be replaced by the first +mandatory argument of the macro. One can also define +alternatives within the specifier which are used if an argument +is not found. Alternatives are separated by \"||\". They are +most useful with optional arguments. As an example, the default +specifier for \\item is \"[1]:||*\" which means that if there is +an optional argument, its value is shown followed by a colon. If +there is no optional argument, only an asterisk is used as the +display string. + +If the first element is an integer, the macro will be replaced by +the respective macro argument. + +If the first element is a function symbol, the function will be +called with all mandatory arguments of the macro and the result +of the function call will be used as a replacement for the macro. + +Setting this variable does not take effect immediately. Use +Customize or reset the mode." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1) + (function :tag "Function to execute")) + (repeat :tag "Macros" (string))))) + +(defvar TeX-fold-macro-spec-list-internal nil + "Internal list of display strings and macros to fold. +Is updated when the TeX Fold mode is being activated and then +contains all constructs to fold for the given buffer or mode +respectively, that is, contents of both `TeX-fold-macro-spec-list' +and <mode-prefix>-fold-macro-spec-list.") +(make-variable-buffer-local 'TeX-fold-macro-spec-list-internal) + +(defcustom TeX-fold-env-spec-list + '(("[comment]" ("comment"))) + "List of display strings and environments to fold." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1)) + (repeat :tag "Environments" (string))))) + +(defvar TeX-fold-env-spec-list-internal nil + "Internal list of display strings and environments to fold. +Is updated when the TeX Fold mode is being activated and then +contains all constructs to fold for the given buffer or mode +respectively, that is, contents of both `TeX-fold-env-spec-list' +and <mode-prefix>-fold-env-spec-list.") +(make-variable-buffer-local 'TeX-fold-env-spec-list-internal) + +(defcustom TeX-fold-math-spec-list nil + "List of display strings and math macros to fold." + :type '(repeat (group (choice (string :tag "Display String") + (integer :tag "Number of argument" :value 1)) + (repeat :tag "Math Macros" (string))))) + +(defvar TeX-fold-math-spec-list-internal nil + "Internal list of display strings and math macros to fold. +Is updated when the TeX Fold mode is being activated and then +contains all constructs to fold for the given buffer or mode +respectively, that is, contents of both `TeX-fold-math-spec-list' +and <mode-prefix>-fold-math-spec-list.") +(make-variable-buffer-local 'TeX-fold-math-spec-list-internal) + +(defcustom TeX-fold-unspec-macro-display-string "[m]" + "Display string for unspecified macros. +This string will be displayed if a single macro is being hidden +which is not specified in `TeX-fold-macro-spec-list'." + :type '(string)) + +(defcustom TeX-fold-unspec-env-display-string "[env]" + "Display string for unspecified environments. +This string will be displayed if a single environment is being +hidden which is not specified in `TeX-fold-env-spec-list'." + :type '(string)) + +(defcustom TeX-fold-unspec-use-name t + "If non-nil use the name of an unspecified item as display string. +Set it to nil if you want to use the values of the variables +`TeX-fold-unspec-macro-display-string' or +`TeX-fold-unspec-env-display-string' respectively as a display +string for any unspecified macro or environment." + :type 'boolean) + +(defcustom TeX-fold-preserve-comments nil + "If non-nil do not fold in comments." + :type 'boolean) + +(defcustom TeX-fold-unfold-around-mark t + "Unfold text around the mark, if active." + :type 'boolean) + +(defcustom TeX-fold-help-echo-max-length 70 + "Maximum length of help echo message for folded overlays. +Set it to zero in order to disable help echos." + :type 'integer) + +(defcustom TeX-fold-force-fontify t + "Force the buffer to be fully fontified by folding it." + :type 'boolean) + +(defcustom TeX-fold-auto nil + "If non-nil, fold macros automatically after `TeX-insert-macro'." + :type 'boolean) + +(defface TeX-fold-folded-face + '((((class color) (background light)) + (:foreground "SlateBlue")) + (((class color) (background dark)) + (:foreground "SlateBlue1")) + (((class grayscale) (background light)) + (:foreground "DimGray")) + (((class grayscale) (background dark)) + (:foreground "LightGray")) + (t (:slant italic))) + "Face for the display string of folded content.") + +(defvar TeX-fold-folded-face 'TeX-fold-folded-face + "Face for the display string of folded content.") + +(defface TeX-fold-unfolded-face + '((((class color) (background light)) + (:background "#f2f0fd")) + (((class color) (background dark)) + (:background "#38405d")) + (((class grayscale) (background light)) + (:background "LightGray")) + (((class grayscale) (background dark)) + (:background "DimGray")) + (t (:inverse-video t))) + "Face for folded content when it is temporarily opened.") + +(defvar TeX-fold-unfolded-face 'TeX-fold-unfolded-face + "Face for folded content when it is temporarily opened.") + +(defvar TeX-fold-ellipsis "..." + "String used as display string for overlays instead of a zero-length string.") + +(defvar TeX-fold-open-spots nil) +(make-variable-buffer-local 'TeX-fold-open-spots) + +(defcustom TeX-fold-command-prefix "\C-c\C-o" + "Prefix key to use for commands in TeX Fold mode. +The value of this variable is checked as part of loading TeX Fold mode. +After that, changing the prefix key requires manipulating keymaps." + :type 'string) + +(defvar TeX-fold-keymap + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'TeX-fold-dwim) + (define-key map "\C-b" #'TeX-fold-buffer) + (define-key map "\C-r" #'TeX-fold-region) + (define-key map "\C-p" #'TeX-fold-paragraph) + (define-key map "\C-m" #'TeX-fold-macro) + (define-key map "\C-e" #'TeX-fold-env) + (define-key map "\C-c" #'TeX-fold-comment) + (define-key map "b" #'TeX-fold-clearout-buffer) + (define-key map "r" #'TeX-fold-clearout-region) + (define-key map "p" #'TeX-fold-clearout-paragraph) + (define-key map "i" #'TeX-fold-clearout-item) + map)) + + +;;; Folding + +(defun TeX-fold-dwim () + "Hide or show items according to the current context. +If there is folded content, unfold it. If there is a marked +region, fold all configured content in this region. If there is +no folded content but a macro or environment, fold it." + (interactive) + (cond ((TeX-fold-clearout-item)) + ((TeX-active-mark) (TeX-fold-region (mark) (point))) + ((TeX-fold-item 'macro)) + ((TeX-fold-item 'math)) + ((TeX-fold-item 'env)) + ((TeX-fold-comment)))) + +(defun TeX-fold-buffer () + "Hide all configured macros and environments in the current buffer. +The relevant macros are specified in the variable `TeX-fold-macro-spec-list' +and `TeX-fold-math-spec-list', and environments in `TeX-fold-env-spec-list'." + (interactive) + (TeX-fold-clearout-region (point-min) (point-max)) + (when (and TeX-fold-force-fontify + (boundp 'jit-lock-mode) + jit-lock-mode + (fboundp 'jit-lock-fontify-now)) + ;; We force fontification here only because it should rarely be + ;; needed for the other folding commands. + (jit-lock-fontify-now)) + (TeX-fold-region (point-min) (point-max))) + +(defun TeX-fold-paragraph () + "Hide all configured macros and environments in the current paragraph. +The relevant macros are specified in the variable `TeX-fold-macro-spec-list' +and `TeX-fold-math-spec-list', and environments in `TeX-fold-env-spec-list'." + (interactive) + (save-excursion + (let ((end (progn (LaTeX-forward-paragraph) (point))) + (start (progn (LaTeX-backward-paragraph) (point)))) + (TeX-fold-clearout-region start end) + (TeX-fold-region start end)))) + +(defun TeX-fold-region (start end) + "Fold all items in region from START to END." + (interactive "r") + (when (and (memq 'env TeX-fold-type-list) + (not (eq major-mode 'plain-tex-mode))) + (TeX-fold-region-macro-or-env start end 'env)) + (when (memq 'macro TeX-fold-type-list) + (TeX-fold-region-macro-or-env start end 'macro)) + (when (memq 'math TeX-fold-type-list) + (TeX-fold-region-macro-or-env start end 'math)) + (when (memq 'comment TeX-fold-type-list) + (TeX-fold-region-comment start end))) + +(defun TeX-fold-region-macro-or-env (start end type) + "Fold all items of type TYPE in region from START to END. +TYPE can be one of the symbols 'env for environments, 'macro +for macros and 'math for math macros." + (save-excursion + (let (fold-list item-list regexp) + (dolist (item (cond ((eq type 'env) TeX-fold-env-spec-list-internal) + ((eq type 'math) TeX-fold-math-spec-list-internal) + (t TeX-fold-macro-spec-list-internal))) + (dolist (i (cadr item)) + (cl-pushnew (list i (car item)) fold-list :test #'equal) + (cl-pushnew i item-list :test #'equal))) + (when item-list + (setq regexp (cond ((and (eq type 'env) + (eq major-mode 'context-mode)) + (concat (regexp-quote TeX-esc) + "start" (regexp-opt item-list t))) + ((and (eq type 'env) + (eq major-mode 'texinfo-mode)) + (concat (regexp-quote TeX-esc) + (regexp-opt item-list t))) + ((eq type 'env) + (concat (regexp-quote TeX-esc) + "begin[ \t]*{" + (regexp-opt item-list t) "}")) + (t + (concat (regexp-quote TeX-esc) + (regexp-opt item-list t))))) + (save-restriction + (narrow-to-region start end) + ;; Start from the bottom so that it is easier to prioritize + ;; nested macros. + (goto-char (point-max)) + (let ((case-fold-search nil) + item-name) + (while (re-search-backward regexp nil t) + (setq item-name (match-string 1)) + (unless (or (and TeX-fold-preserve-comments + (TeX-in-commented-line)) + ;; Make sure no partially matched macros are + ;; folded. For macros consisting of letters + ;; this means there should be none of the + ;; characters [A-Za-z@*] after the matched + ;; string. Single-char non-letter macros like + ;; \, don't have this requirement. + (and (memq type '(macro math)) + (save-match-data + (string-match "[A-Za-z]" item-name)) + (save-match-data + (string-match "[A-Za-z@*]" + (string (char-after + (match-end 0))))))) + (let* ((item-start (match-beginning 0)) + (display-string-spec (cadr (assoc item-name + fold-list))) + (item-end (TeX-fold-item-end item-start type)) + (ov (TeX-fold-make-overlay item-start item-end type + display-string-spec))) + (TeX-fold-hide-item ov)))))))))) + +(defun TeX-fold-region-comment (start end) + "Fold all comments in region from START to END." + (save-excursion + (goto-char start) + (let (beg) + (while (setq beg (TeX-search-forward-comment-start end)) + (goto-char beg) + ;; Determine the start of the region to be folded just behind + ;; the comment starter. + (looking-at TeX-comment-start-regexp) + (setq beg (match-end 0)) + ;; Search for the end of the comment. + (while (TeX-comment-forward)) + (end-of-line 0) + ;; Hide the whole region. + (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment + TeX-fold-ellipsis)))))) + +(defun TeX-fold-macro () + "Hide the macro on which point currently is located." + (interactive) + (unless (TeX-fold-item 'macro) + (message "No macro found"))) + +(defun TeX-fold-math () + "Hide the math macro on which point currently is located." + (interactive) + (unless (TeX-fold-item 'math) + (message "No macro found"))) + +(defun TeX-fold-env () + "Hide the environment on which point currently is located." + (interactive) + (unless (TeX-fold-item 'env) + (message "No environment found"))) + +(defun TeX-fold-comment () + "Hide the comment on which point currently is located." + (interactive) + (unless (TeX-fold-comment-do) + (message "No comment found"))) + +(defun TeX-fold-item (type) + "Hide the item on which point currently is located. +TYPE specifies the type of item and can be one of the symbols +`env' for environments, `macro' for macros or `math' for math +macros. +Return non-nil if an item was found and folded, nil otherwise." + (if (and (eq type 'env) + (eq major-mode 'plain-tex-mode)) + (message + "Folding of environments is not supported in current mode") + (let ((item-start (cond ((and (eq type 'env) + (eq major-mode 'context-mode)) + (save-excursion + (ConTeXt-find-matching-start) (point))) + ((and (eq type 'env) + (eq major-mode 'texinfo-mode)) + (save-excursion + (Texinfo-find-env-start) (point))) + ((eq type 'env) + (condition-case nil + (save-excursion + (LaTeX-find-matching-begin) (point)) + (error nil))) + (t + (TeX-find-macro-start))))) + (when item-start + (let* ((item-name (save-excursion + (goto-char item-start) + (looking-at + (cond ((and (eq type 'env) + (eq major-mode 'context-mode)) + (concat (regexp-quote TeX-esc) + "start\\([A-Za-z]+\\)")) + ((and (eq type 'env) + (eq major-mode 'texinfo-mode)) + (concat (regexp-quote TeX-esc) + "\\([A-Za-z]+\\)")) + ((eq type 'env) + (concat (regexp-quote TeX-esc) + "begin[ \t]*{" + "\\([A-Za-z*]+\\)}")) + (t + (concat (regexp-quote TeX-esc) + "\\([A-Za-z@*]+\\)")))) + (match-string-no-properties 1))) + (fold-list (cond ((eq type 'env) TeX-fold-env-spec-list-internal) + ((eq type 'math) + TeX-fold-math-spec-list-internal) + (t TeX-fold-macro-spec-list-internal))) + fold-item + (display-string-spec + (or (catch 'found + (while fold-list + (setq fold-item (car fold-list)) + (setq fold-list (cdr fold-list)) + (when (member item-name (cadr fold-item)) + (throw 'found (car fold-item))))) + ;; Item is not specified. + (if TeX-fold-unspec-use-name + (concat "[" item-name "]") + (if (eq type 'env) + TeX-fold-unspec-env-display-string + TeX-fold-unspec-macro-display-string)))) + (item-end (TeX-fold-item-end item-start type)) + (ov (TeX-fold-make-overlay item-start item-end type + display-string-spec))) + (TeX-fold-hide-item ov)))))) + +(defun TeX-fold-comment-do () + "Hide the comment on which point currently is located. +This is the function doing the work for `TeX-fold-comment'. It +is an internal function communicating with return values rather +than with messages for the user. +Return non-nil if a comment was found and folded, nil otherwise." + (if (and (not (TeX-in-comment)) (not (TeX-in-line-comment))) + nil + (let (beg) + (save-excursion + (while (progn + (beginning-of-line 0) + (and (TeX-in-line-comment) + (not (bobp))))) + (goto-char (TeX-search-forward-comment-start (line-end-position 2))) + (looking-at TeX-comment-start-regexp) + (setq beg (match-end 0)) + (while (TeX-comment-forward)) + (end-of-line 0) + (when (> (point) beg) + (TeX-fold-hide-item (TeX-fold-make-overlay beg (point) 'comment + TeX-fold-ellipsis))))))) + + +;;; Utilities + +(defun TeX-fold-make-overlay (ov-start ov-end type display-string-spec) + "Make a TeX-fold overlay extending from OV-START to OV-END. +TYPE is a symbol which is used to describe the content to hide +and may be `macro' for macros, `math' for math macro and `env' for +environments. +DISPLAY-STRING-SPEC is the original specification of the display +string in the variables `TeX-fold-macro-spec-list' or +`TeX-fold-env-spec-list' and may be a string or an integer." + ;; Calculate priority before the overlay is instantiated. We don't + ;; want `TeX-overlay-prioritize' to pick up a non-prioritized one. + (let ((priority (TeX-overlay-prioritize ov-start ov-end)) + (ov (make-overlay ov-start ov-end (current-buffer) t nil))) + (overlay-put ov 'category 'TeX-fold) + (overlay-put ov 'priority priority) + (overlay-put ov 'evaporate t) + (overlay-put ov 'TeX-fold-type type) + (overlay-put ov 'TeX-fold-display-string-spec display-string-spec) + ov)) + +(defun TeX-fold-item-end (start type) + "Return the end of an item of type TYPE starting at START. +TYPE can be either `env' for environments, `macro' for macros or +`math' for math macros." + (save-excursion + (cond ((and (eq type 'env) + (eq major-mode 'context-mode)) + (goto-char start) + (ConTeXt-find-matching-stop) + (point)) + ((and (eq type 'env) + (eq major-mode 'texinfo-mode)) + (goto-char (1+ start)) + (Texinfo-find-env-end) + (point)) + ((eq type 'env) + (goto-char (1+ start)) + (LaTeX-find-matching-end) + (point)) + (t + (goto-char start) + (TeX-find-macro-end))))) + +(defun TeX-fold-overfull-p (ov-start ov-end display-string) + "Return t if an overfull line will result after adding an overlay. +The overlay extends from OV-START to OV-END and will display the +string DISPLAY-STRING." + (and + (save-excursion + (goto-char ov-end) + (search-backward "\n" ov-start t)) + (not (string-match "\n" display-string)) + (> (+ (- ov-start + (save-excursion + (goto-char ov-start) + (line-beginning-position))) + (length display-string) + (- (save-excursion + (goto-char ov-end) + (line-end-position)) + ov-end)) + (current-fill-column)))) + +(defun TeX-fold-macro-nth-arg (n macro-start &optional macro-end delims) + "Return a property list of the argument number N of a macro. +The start of the macro to examine is given by MACRO-START, its +end optionally by MACRO-END. With DELIMS the type of delimiters +can be specified as a cons cell containing the opening char as +the car and the closing char as the cdr. The chars have to have +opening and closing syntax as defined in +`TeX-search-syntax-table'. + +The first item in the returned list is the string specified in +the argument, with text properties. The second item is for +backward compatibility and always nil." + (save-excursion + (let* ((macro-end (or macro-end + (save-excursion (goto-char macro-start) + (TeX-find-macro-end)))) + (open-char (if delims (car delims) ?{)) + (open-string (char-to-string open-char)) + (close-char (if delims (cdr delims) ?})) + ;; (close-string (char-to-string close-char)) + content-start content-end) + (goto-char macro-start) + (if (condition-case nil + (progn + (while (> n 0) + (skip-chars-forward (concat "^" open-string) macro-end) + (when (= (point) macro-end) + (error nil)) + (setq content-start (progn + (skip-chars-forward + (concat open-string " \t")) + (point))) + (goto-char + (if delims + (with-syntax-table + (TeX-search-syntax-table open-char close-char) + (scan-lists (point) 1 1)) + (TeX-find-closing-brace))) + (setq content-end (save-excursion + (backward-char) + (skip-chars-backward " \t") + (point))) + (setq n (1- n))) + t) + (error nil)) + (list (TeX-fold-buffer-substring content-start content-end)) + nil)))) + +(defun TeX-fold-buffer-substring (start end) + "Return the contents of buffer from START to END as a string. +Like `buffer-substring' but copy overlay display strings as well." + ;; Swap values of `start' and `end' if necessary. + (when (> start end) (let ((tmp start)) (setq start end end tmp))) + (let ((overlays (overlays-in start end)) + result) + ;; Get rid of overlays not under our control or not completely + ;; inside the specified region. + (dolist (ov overlays) + (when (or (not (eq (overlay-get ov 'category) 'TeX-fold)) + (< (overlay-start ov) start) + (> (overlay-end ov) end)) + (setq overlays (remove ov overlays)))) + (if (null overlays) + (buffer-substring start end) + ;; Sort list according to ascending starts. + (setq overlays (sort (copy-sequence overlays) + (lambda (a b) + (< (overlay-start a) (overlay-start b))))) + ;; Get the string from the start of the region up to the first overlay. + (setq result (buffer-substring start (overlay-start (car overlays)))) + (let (ov) + (while overlays + (setq ov (car overlays) + overlays (cdr overlays)) + ;; Add the display string of the overlay. + (setq result (concat result (overlay-get ov 'display))) + ;; Remove overlays contained in the current one. + (dolist (elt overlays) + (when (< (overlay-start elt) (overlay-end ov)) + (setq overlays (remove elt overlays)))) + ;; Add the string from the end of the current overlay up to + ;; the next overlay or the end of the specified region. + (setq result (concat result (buffer-substring (overlay-end ov) + (if overlays + (overlay-start + (car overlays)) + end)))))) + result))) + +(defun TeX-fold-make-help-echo (start end) + "Return a string to be used as the help echo of folded overlays. +The text between START and END will be used for this but cropped +to the length defined by `TeX-fold-help-echo-max-length'. Line +breaks will be replaced by spaces." + (let* ((spill (+ start TeX-fold-help-echo-max-length)) + (lines (split-string (buffer-substring start (min end spill)) "\n")) + (result (pop lines))) + (dolist (line lines) + ;; Strip leading whitespace + (when (string-match "^[ \t]+" line) + (setq line (replace-match "" nil nil line))) + ;; Strip trailing whitespace + (when (string-match "[ \t]+$" line) + (setq line (replace-match "" nil nil line))) + (setq result (concat result " " line))) + (when (> end spill) (setq result (concat result "..."))) + result)) + +(defun TeX-fold-update-at-point () + "Update all TeX-fold overlays at point displaying computed content." + (let (overlays) + ;; Get all overlays at point under our control. + (dolist (ov (overlays-at (point))) + (when (and (eq (overlay-get ov 'category) 'TeX-fold) + (numberp (overlay-get ov 'TeX-fold-display-string-spec))) + (cl-pushnew ov overlays))) + (when overlays + ;; Sort list according to descending starts. + (setq overlays (sort (copy-sequence overlays) + (lambda (a b) + (> (overlay-start a) (overlay-start b))))) + (dolist (ov overlays) + (TeX-fold-hide-item ov))))) + + +;;; Removal + +(defun TeX-fold-clearout-buffer () + "Permanently show all macros in the buffer." + (interactive) + (TeX-fold-clearout-region (point-min) (point-max))) + +(defun TeX-fold-clearout-paragraph () + "Permanently show all macros in the paragraph point is located in." + (interactive) + (save-excursion + (let ((end (progn (LaTeX-forward-paragraph) (point))) + (start (progn (LaTeX-backward-paragraph) (point)))) + (TeX-fold-clearout-region start end)))) + +(defun TeX-fold-clearout-region (start end) + "Permanently show all macros in region starting at START and ending at END." + (interactive "r") + (let ((overlays (overlays-in start end))) + (TeX-fold-remove-overlays overlays))) + +(defun TeX-fold-clearout-item () + "Permanently show the macro on which point currently is located." + (interactive) + (let ((overlays (overlays-at (point)))) + (TeX-fold-remove-overlays overlays))) + +(defun TeX-fold-remove-overlays (overlays) + "Remove all overlays set by TeX-fold in OVERLAYS. +Return non-nil if a removal happened, nil otherwise." + (let (found) + (while overlays + (when (eq (overlay-get (car overlays) 'category) 'TeX-fold) + (delete-overlay (car overlays)) + (setq found t)) + (setq overlays (cdr overlays))) + found)) + + +;;; Toggling + +(defun TeX-fold-expand-spec (spec ov-start ov-end) + "Expand instances of {<num>}, [<num>], <<num>>, and (<num>). +Replace them with the respective macro argument." + (let ((spec-list (split-string spec "||")) + (delims '((?\{ . ?\}) (?\[ . ?\]) (?< . ?>) (?\( . ?\)))) + index success) + (catch 'success + ;; Iterate over alternatives. + (dolist (elt spec-list) + (setq spec elt + index nil) + ;; Find and expand every placeholder. + (while (and (string-match "\\([[{<]\\)\\([1-9]\\)\\([]}>]\\)" elt index) + ;; Does the closing delim match the opening one? + (string-equal + (match-string 3 elt) + (char-to-string + (cdr (assq (string-to-char (match-string 1 elt)) + delims))))) + (setq index (match-end 0)) + (let ((arg (car (save-match-data + ;; Get the argument. + (TeX-fold-macro-nth-arg + (string-to-number (match-string 2 elt)) + ov-start ov-end + (assoc (string-to-char (match-string 1 elt)) + delims)))))) + (when arg (setq success t)) + ;; Replace the placeholder in the string. + (setq elt (replace-match (or arg TeX-fold-ellipsis) nil t elt) + index (+ index (- (length elt) (length spec))) + spec elt))) + (when success (throw 'success nil)))) + spec)) + +(defun TeX-fold-hide-item (ov) + "Hide a single macro or environment. +That means, put respective properties onto overlay OV." + (let* ((ov-start (overlay-start ov)) + (ov-end (overlay-end ov)) + (spec (overlay-get ov 'TeX-fold-display-string-spec)) + (computed (cond + ((stringp spec) + (TeX-fold-expand-spec spec ov-start ov-end)) + ((functionp spec) + (let (arg arg-list + (n 1)) + (while (setq arg (TeX-fold-macro-nth-arg + n ov-start ov-end)) + (unless (member (car arg) arg-list) + (setq arg-list (append arg-list (list (car arg))))) + (setq n (1+ n))) + (or (condition-case nil + (apply spec arg-list) + (error nil)) + "[Error: No content or function found]"))) + (t (or (TeX-fold-macro-nth-arg spec ov-start ov-end) + "[Error: No content found]")))) + (display-string (if (listp computed) (car computed) computed)) + ;; (face (when (listp computed) (cadr computed))) + ) + ;; Do nothing if the overlay is empty. + (when (and ov-start ov-end) + ;; Cater for zero-length display strings. + (when (string= display-string "") (setq display-string TeX-fold-ellipsis)) + ;; Add a linebreak to the display string and adjust the overlay end + ;; in case of an overfull line. + (when (TeX-fold-overfull-p ov-start ov-end display-string) + (setq display-string (concat display-string "\n")) + (move-overlay ov ov-start (save-excursion + (goto-char ov-end) + (skip-chars-forward " \t") + (point)))) + (overlay-put ov 'mouse-face 'highlight) + (when font-lock-mode + ;; Add raise adjustment for superscript and subscript. + ;; (bug#42209) + (setq display-string + (propertize display-string + 'display (get-text-property ov-start 'display)))) + (overlay-put ov 'display display-string) + (when font-lock-mode + (overlay-put ov 'face TeX-fold-folded-face)) + (unless (zerop TeX-fold-help-echo-max-length) + (overlay-put ov 'help-echo (TeX-fold-make-help-echo + (overlay-start ov) (overlay-end ov))))))) + +(defun TeX-fold-show-item (ov) + "Show a single LaTeX macro or environment. +Remove the respective properties from the overlay OV." + (overlay-put ov 'mouse-face nil) + (overlay-put ov 'display nil) + (overlay-put ov 'help-echo nil) + (when font-lock-mode + (overlay-put ov 'face TeX-fold-unfolded-face))) + +;; Copy and adaption of `reveal-post-command' from reveal.el in GNU +;; Emacs on 2004-07-04. +(defun TeX-fold-post-command () + ;; `with-local-quit' is not supported in XEmacs. + (condition-case nil + (let ((inhibit-quit nil)) + (condition-case err + (let* ((spots (TeX-fold-partition-list + (lambda (x) + ;; We refresh any spot in the current + ;; window as well as any spots associated + ;; with a dead window or a window which + ;; does not show this buffer any more. + (or (eq (car x) (selected-window)) + (not (window-live-p (car x))) + (not (eq (window-buffer (car x)) + (current-buffer))))) + TeX-fold-open-spots)) + (old-ols (mapcar #'cdr (car spots)))) + (setq TeX-fold-open-spots (cdr spots)) + (when (or disable-point-adjustment + global-disable-point-adjustment + ;; See preview.el on how to make this configurable. + (memq this-command + (list (key-binding [left]) (key-binding [right]) + #'backward-char #'forward-char + #'mouse-set-point))) + ;; Open new overlays. + (dolist (ol (nconc (when (and TeX-fold-unfold-around-mark + mark-active) + (overlays-at (mark))) + (overlays-at (point)))) + (when (eq (overlay-get ol 'category) 'TeX-fold) + (push (cons (selected-window) ol) TeX-fold-open-spots) + (setq old-ols (delq ol old-ols)) + (TeX-fold-show-item ol)))) + ;; Close old overlays. + (dolist (ol old-ols) + (when (and (eq (current-buffer) (overlay-buffer ol)) + (not (rassq ol TeX-fold-open-spots))) + (if (and (>= (point) (overlay-start ol)) + (<= (point) (overlay-end ol))) + ;; Still near the overlay: keep it open. + (push (cons (selected-window) ol) TeX-fold-open-spots) + ;; Really close it. + (TeX-fold-hide-item ol))))) + (error (message "TeX-fold: %s" err)))) + (quit (setq quit-flag t)))) + + +;;; Misc + +;; Copy and adaption of `cvs-partition' from pcvs-util.el in GNU Emacs +;; on 2004-07-05 to make tex-fold.el mainly self-contained. +(defun TeX-fold-partition-list (p l) + "Partition a list L into two lists based on predicate P. +The function returns a `cons' cell where the `car' contains +elements of L for which P is true while the `cdr' contains +the other elements. The ordering among elements is maintained." + (let (car cdr) + (dolist (x l) + (if (funcall p x) (push x car) (push x cdr))) + (cons (nreverse car) (nreverse cdr)))) + + +;;; The mode + +;;;###autoload +(define-minor-mode TeX-fold-mode + "Minor mode for hiding and revealing macros and environments. + +Called interactively, with no prefix argument, toggle the mode. +With universal prefix ARG (or if ARG is nil) turn mode on. +With zero or negative ARG turn mode off." + :init-value nil + :lighter nil + :keymap (list (cons TeX-fold-command-prefix TeX-fold-keymap)) + (if TeX-fold-mode + (progn + ;; The value t causes problem when body text is hidden in + ;; outline-minor-mode. (bug#36651) + ;; In addition, it's better not to override user preference + ;; without good reason. + ;; (set (make-local-variable 'search-invisible) t) + (add-hook 'post-command-hook #'TeX-fold-post-command nil t) + (add-hook 'LaTeX-fill-newline-hook #'TeX-fold-update-at-point nil t) + (add-hook 'TeX-after-insert-macro-hook + (lambda () + (when (and TeX-fold-mode TeX-fold-auto) + (save-excursion + (backward-char) + (or (TeX-fold-item 'macro) + (TeX-fold-item 'math) + (TeX-fold-item 'env)))))) + ;; Update the `TeX-fold-*-spec-list-internal' variables. + (dolist (elt '("macro" "env" "math")) + (set (intern (format "TeX-fold-%s-spec-list-internal" elt)) + ;; Append the value of `TeX-fold-*-spec-list' to the + ;; mode-specific `<mode-prefix>-fold-*-spec-list' variable. + (append (symbol-value (intern (format "TeX-fold-%s-spec-list" + elt))) + (let ((symbol (intern (format "%s-fold-%s-spec-list" + (TeX-mode-prefix) elt)))) + (when (boundp symbol) + (symbol-value symbol))))))) + ;; (kill-local-variable 'search-invisible) + (remove-hook 'post-command-hook #'TeX-fold-post-command t) + (remove-hook 'LaTeX-fill-newline-hook #'TeX-fold-update-at-point t) + (TeX-fold-clearout-buffer)) + (TeX-set-mode-name)) + +;;;###autoload +(defalias 'tex-fold-mode #'TeX-fold-mode) + +(provide 'tex-fold) + +;;; tex-fold.el ends here diff --git a/elpa/auctex-13.1.3/tex-fold.elc b/elpa/auctex-13.1.3/tex-fold.elc Binary files differnew file mode 100644 index 0000000..4d754fe --- /dev/null +++ b/elpa/auctex-13.1.3/tex-fold.elc diff --git a/elpa/auctex-13.1.3/tex-font.el b/elpa/auctex-13.1.3/tex-font.el new file mode 100644 index 0000000..5f483d8 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-font.el @@ -0,0 +1,178 @@ +;;; tex-font.el --- Font-Lock support stolen from Emacs 21. -*- lexical-binding: t; -*- +;; +;; Copyright (C) 1985-2021 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex, faces + +;; This file is part of AUC TeX. + +;; AUC TeX is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUC TeX is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUC TeX; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Comments: + +;; Please keep this file in sync with GNU Emacs 21. + +;;; Code: + +(defconst tex-font-lock-keywords-1 + (eval-when-compile + (let* (;; Names of commands whose arg should be fontified as heading, etc. + (headings (regexp-opt + '("title" "begin" "end" "chapter" "part" + "section" "subsection" "subsubsection" + "paragraph" "subparagraph" "subsubparagraph" + "newcommand" "renewcommand" "newenvironment" + "newtheorem") + t)) + (variables (regexp-opt + '("newcounter" "newcounter*" "setcounter" "addtocounter" + "setlength" "addtolength" "settowidth") + t)) + (includes (regexp-opt + '("input" "include" "includeonly" "bibliography" + "epsfig" "psfig" "epsf" "nofiles" "usepackage" + "documentstyle" "documentclass" "verbatiminput" + "includegraphics" "includegraphics*") + t)) + ;; Miscellany. + (slash "\\\\") + (opt " *\\(\\[[^]]*\\] *\\)*") + ;; This would allow highlighting \newcommand\CMD but requires + ;; adapting subgroup numbers below. + ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) + (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) + (list + ;; Heading args. + (list (concat slash headings "\\*?" opt arg) + ;; If ARG ends up matching too much (if the {} don't match, f.ex) + ;; jit-lock will do funny things: when updating the buffer + ;; the re-highlighting is only done locally so it will just + ;; match the local line, but defer-contextually will + ;; match more lines at a time, so ARG will end up matching + ;; a lot more, which might suddenly include a comment + ;; so you get things highlighted bold when you type them + ;; but they get turned back to normal a little while later + ;; because "there's already a face there". + ;; Using `keep' works around this un-intuitive behavior as well + ;; as improves the behavior in the very rare case where you do + ;; have a comment in ARG. + 3 'font-lock-function-name-face 'keep) + (list (concat slash "\\(re\\)?newcommand\\** *\\(\\\\[A-Za-z@]+\\)") + 2 'font-lock-function-name-face 'keep) + ;; Variable args. + (list (concat slash variables " *" arg) 2 'font-lock-variable-name-face) + ;; Include args. + (list (concat slash includes opt arg) 3 'font-lock-builtin-face) + ;; Definitions. I think. + '("^[ \t]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)" + 1 font-lock-function-name-face)))) + "Subdued expressions to highlight in TeX modes.") + +(defconst tex-font-lock-keywords-2 + (append tex-font-lock-keywords-1 + (eval-when-compile + (let* (;; + ;; Names of commands whose arg should be fontified with fonts. + (bold (regexp-opt '("textbf" "textsc" "textup" + "boldsymbol" "pmb") + t)) + (italic (regexp-opt '("textit" "textsl" "emph") t)) + ;; (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t)) + ;; + ;; Names of commands whose arg should be fontified as a citation. + (citations (regexp-opt + '("label" "ref" "pageref" "vref" "eqref" + "cite" "nocite" "index" "glossary" "bibitem" + ;; These are text, rather than citations. + ;; "caption" "footnote" "footnotemark" "footnotetext" + ) + t)) + ;; + ;; Names of commands that should be fontified. + (specials (regexp-opt + '("\\" "\\*" ;; "-" + "linebreak" "nolinebreak" "pagebreak" "nopagebreak" + "newline" "newpage" "clearpage" "cleardoublepage" + "displaybreak" "allowdisplaybreaks" "enlargethispage") + t)) + (general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)") + ;; + ;; Miscellany. + (slash "\\\\") + (opt " *\\(\\[[^]]*\\] *\\)*") + (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) + (list + ;; + ;; Citation args. + (list (concat slash citations opt arg) 3 'font-lock-constant-face) + ;; + ;; Text between `` quotes ''. + (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t) + "[^'\">»]+" ;a bit pessimistic + (regexp-opt `("''" "\">" "\"'" ">>" "»") t)) + 'font-lock-string-face) + ;; + ;; Command names, special and general. + (cons (concat slash specials) 'font-lock-warning-face) + (concat slash general) + ;; + ;; Font environments. It seems a bit dubious to use `bold' etc. faces + ;; since we might not be able to display those fonts. + (list (concat slash bold " *" arg) 2 '(quote bold) 'append) + (list (concat slash italic " *" arg) 2 '(quote italic) 'append) + ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append) + ;; + ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables. + (list (concat "\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>" + "\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)") + 3 '(if (match-beginning 2) 'bold 'italic) 'append))))) + "Gaudy expressions to highlight in TeX modes.") + +(defvar tex-font-lock-keywords tex-font-lock-keywords-1 + "Default expressions to highlight in TeX modes.") + + +(defface tex-math-face + '((t :inherit font-lock-string-face)) + "Face used to highlight TeX math expressions." + :group 'tex) +(defvar tex-math-face 'tex-math-face) + +;; Use string syntax but math face for $...$. +(defun tex-font-lock-syntactic-face-function (state) + (if (nth 3 state) tex-math-face font-lock-comment-face)) + +;;;###autoload +(defun tex-font-setup () + "Setup font lock support for TeX." + (set (make-local-variable 'font-lock-defaults) + '((tex-font-lock-keywords + tex-font-lock-keywords-1 tex-font-lock-keywords-2) + nil nil ((?$ . "\"")) nil + ;; Who ever uses that anyway ??? + (font-lock-mark-block-function . mark-paragraph) + (font-lock-syntactic-face-function + . tex-font-lock-syntactic-face-function))) + ) + +(provide 'tex-font) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; tex-font.el ends here diff --git a/elpa/auctex-13.1.3/tex-font.elc b/elpa/auctex-13.1.3/tex-font.elc Binary files differnew file mode 100644 index 0000000..a48b275 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-font.elc diff --git a/elpa/auctex-13.1.3/tex-info.el b/elpa/auctex-13.1.3/tex-info.el new file mode 100644 index 0000000..66e5751 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-info.el @@ -0,0 +1,887 @@ +;;; tex-info.el --- Support for editing Texinfo source. -*- lexical-binding: t; -*- + +;; Copyright (C) 1993-2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) + +(require 'tex) + +(require 'texinfo) + +;;; Environments: +(defvar Texinfo-environment-list + '(("cartouche") ("command") ("copying") ("defcv") ("deffn") ("defivar") + ("defmac") ("defmethod") ("defop") ("defopt") ("defspec") + ("deftp") ("deftypefn") ("deftypefun") ("deftypevar") ("deftypevr") + ("defun") ("defvar") ("defvr") ("description") ("detailmenu") + ("direntry") ("display") ("documentdescription") ("enumerate") + ("example") ("float") ("flushleft") ("flushright") ("format") ("ftable") + ("group") ("html") ("ifclear") ("ifdocbook") ("ifhtml") ("ifinfo") + ("ifnotdocbook") ("ifnothtml") ("ifnotinfo") ("ifnotplaintext") + ("ifnottex") ("ifnotxml") ("ifplaintext") ("ifset") ("iftex") + ("ifxml") ("ignore") ("itemize") ("lisp") ("macro") ("menu") + ("multitable") ("quotation") ("smalldisplay") ("smallexample") + ("smallformat") ("smalllisp") ("table") ("tex") ("titlepage") + ("verbatim") ("vtable")) + "Alist of Texinfo environments.") + +(defconst texinfo-environment-regexp + ;; Overwrite version from `texinfo.el'. + (concat "^@\\(" + (mapconcat #'car Texinfo-environment-list "\\|") + "\\|end\\)\\>") + "Regexp for environment-like Texinfo list commands. +Subexpression 1 is what goes into the corresponding `@end' statement.") + +(defun Texinfo-environment (env &optional arg) + "Make Texinfo environment ENV. +With optional ARG, modify current environment." + ;; XXX: This could be enhanced to act like `LaTeX-environment', + ;; i.e. suggest a default environment and have its own history. + (interactive (list (completing-read "Environment: " + Texinfo-environment-list) + current-prefix-arg)) + (if arg + (Texinfo-modify-environment env) + (Texinfo-insert-environment env))) + +(defun Texinfo-insert-environment (env) + "Insert Texinfo environment ENV." + (if (and (TeX-active-mark) + (not (eq (mark) (point)))) + (progn + (when (< (mark) (point)) + (exchange-point-and-mark)) + (unless (TeX-looking-at-backward "^[ \t]*") + (newline)) + (insert "@" env) + (newline) + (goto-char (mark)) + (unless (TeX-looking-at-backward "^[ \t]*") + (newline)) + (insert "@end " env) + (save-excursion (newline)) + (end-of-line 0)) + (insert "@" env "\n\n@end " env "\n") + (if (null (cdr-safe (assoc "defcv" Texinfo-environment-list))) + (forward-line -2)))) + +(defun Texinfo-modify-environment (env) + "Change current environment to environment ENV." + (save-excursion + (Texinfo-find-env-end) + (re-search-backward (concat (regexp-quote TeX-esc) "end \\([a-zA-Z]*\\)") + (line-beginning-position)) + (replace-match env t t nil 1) + (beginning-of-line) + (Texinfo-find-env-start) + (re-search-forward (concat (regexp-quote TeX-esc) "\\([a-zA-Z]*\\)") + (line-end-position)) + (replace-match env t t nil 1))) + +(defun Texinfo-find-env-end () + "Move point to the end of the current environment." + (interactive) + (let* ((envs (mapcar #'car Texinfo-environment-list)) + (regexp (concat "^[ \t]*" (regexp-quote TeX-esc) "\\(end \\)*" + (regexp-opt envs t) "\\b")) + (orig-pos (point)) + (level 1) + case-fold-search) + (save-restriction + (save-excursion + (save-excursion + (beginning-of-line) + ;; Stop if point is inside of an @end <env> command, but not + ;; if it is behind it. + (when (and (looking-at regexp) + (match-string 1) + (> (match-end 0) orig-pos)) + (setq level 0))) + (while (and (> level 0) (re-search-forward regexp nil t)) + (if (match-string 1) + (setq level (1- level)) + (setq level (1+ level))))) + (if (= level 0) + (goto-char (match-end 0)) + (error "Can't locate end of current environment"))))) + +(defun Texinfo-find-env-start () + "Move point to the start of the current environment." + (interactive) + (let* ((envs (mapcar #'car Texinfo-environment-list)) + (regexp (concat "^[ \t]*\\(" (regexp-quote TeX-esc) "\\)\\(end \\)*" + (regexp-opt envs t) "\\b")) + (level 1) + (orig-pos (point)) + case-fold-search) + (save-restriction + (save-excursion + (save-excursion + (beginning-of-line) + ;; Stop if point is inside of an @<env> command, but not if + ;; it is before it. + (when (and (looking-at regexp) + (not (match-string 2)) + (< (match-beginning 1) orig-pos)) + (setq level 0))) + (while (and (> level 0) (re-search-backward regexp nil t)) + (if (match-string 2) + (setq level (1+ level)) + (setq level (1- level))))) + (if (= level 0) + (goto-char (match-beginning 0)) + (error "Can't locate start of current environment"))))) + +(defun Texinfo-mark-environment (&optional count) + "Set mark to end of current environment and point to the matching begin. +If prefix argument COUNT is given, mark the respective number of +enclosing environments. The command will not work properly if +there are unbalanced begin-end pairs in comments and verbatim +environments." + ;; TODO: + ;; This is identical to the LaTeX counterpart but for the find begin/end + ;; functions. So some day the implemenation should be factorized. + (interactive "p") + (setq count (if count (abs count) 1)) + (let ((cur (point)) beg end) + ;; Only change point and mark after beginning and end were found. + ;; Point should not end up in the middle of nowhere if the search fails. + (save-excursion + (dotimes (_ count) + (Texinfo-find-env-end)) + (setq end (line-beginning-position 2)) + (goto-char cur) + (dotimes (c count) + (Texinfo-find-env-start) + (unless (= (1+ c) count) + (beginning-of-line 0))) + (setq beg (point))) + (push-mark end) + (goto-char beg) + (TeX-activate-region))) + +(defun Texinfo-mark-section (&optional no-subsection) + "Mark current section, with inclusion of any containing node. + +The current section is detected as starting by any of the +structuring commands matched by regexp in variable +`outline-regexp' which in turn is a regexp matching any element +of variable `texinfo-section-list'. + +If optional argument NO-SUBSECTION is set to any integer or is a +non nil empty argument (that is, `\\[universal-argument] \\[Texinfo-mark-section]'), +then mark the current section with exclusion of any subsections. + +Otherwise, any included subsections are also marked along with +current section. + +Note that when current section is starting immediatley after a +node commande, then the node command is also marked as part as +the section." + (interactive "P") + (let (beg end is-beg-section is-end-section + (section-re (concat "^\\s-*" outline-regexp))) + (if (and (consp no-subsection) (eq (car no-subsection) 4)) + ;; section with exclusion of any subsection + (setq beg (save-excursion + (unless (looking-at section-re) + (end-of-line)) + (re-search-backward section-re nil t)) + is-beg-section t + end (save-excursion + (beginning-of-line) + (when + (re-search-forward (concat section-re + "\\|^\\s-*@bye\\_>" ) + nil t) + (save-match-data + (beginning-of-line) + (point)))) + is-end-section (match-string 1)) + ;; full section without exclusion of any subsection + (let (section-command-level) + (setq beg + (save-excursion + (end-of-line) + (re-search-backward section-re nil t))) + (when beg + (setq is-beg-section t + section-command-level + (cadr (assoc (match-string 1) texinfo-section-list)) + end + (save-excursion + (beginning-of-line) + (while + (and (re-search-forward + (concat section-re "\\|^\\s-*@bye\\_>" ) nil t) + (or (null (setq is-end-section (match-string 1))) + (> (cadr (assoc is-end-section + texinfo-section-list)) + section-command-level)))) + (when (match-string 0) + (beginning-of-line) + (point))))))); (if ...) + (when (and beg end) + ;; now take also enclosing node of beg and end + (let ((before-@node + (lambda (pos) + (save-excursion + (goto-char pos) + (while (and + (null (bobp)) + (progn + (beginning-of-line 0) + (looking-at + "^\\s-*\\($\\|@\\(c\\|comment\\)\\_>\\)")))) + (when (looking-at "^\\s-*@node\\_>") + (point)))))) + (when is-beg-section + (setq beg (or (funcall before-@node beg) beg))) + (when is-end-section + (setq end (or (funcall before-@node end) end)))) + + (push-mark end) + (goto-char beg) + (TeX-activate-region) ))) + +(defun Texinfo-mark-node () + "Mark the current node. +This is the node in which the pointer is. It is starting at +previous beginning of keyword `@node' and ending at next +beginning of keyword `@node' or `@bye'." + (interactive) + (let ((beg (save-excursion + (unless (looking-at "^\\s-*@\\(?:node\\)\\_>") + (end-of-line)) + (re-search-backward "^\\s-*@\\(?:node\\)\\_>" nil t ))) + (end (save-excursion + (beginning-of-line) + (and (re-search-forward "^\\s-*@\\(?:node\\|bye\\)\\_>" nil t ) + (progn (beginning-of-line) (point)))))) + + (when (and beg end) + (push-mark end) + (goto-char beg) + (TeX-activate-region) ))) + +(defun Texinfo-nodename-de-escape (node-name) + "In NODE-NAME, convert `@comma{}' commands to the corresponding `,' +character. Return the resulting string." + (let ((pos 0) (map '(("comma" . ",")))) + (while (and (< pos (length + node-name)) + (string-match "@\\(comma\\)[[:blank:]]*{}" node-name pos)) + (setq node-name (concat (substring node-name 0 (match-beginning 0)) + (cdr (assoc-string (match-string 1 node-name) map)) + (substring node-name (match-end 0))) + pos (1+ (match-beginning 0))))) + node-name) + + +(defun Texinfo-nodename-escape (node-name) + "Convert in NODE-NAME the `,' characters to `@comma{}' +commands. Return the resulting string." + (let* ((pos 0) + (map '(("," . "comma"))) + (re (regexp-opt (mapcar #'car map))) ) + (while (and (< pos (length node-name)) (string-match re node-name pos)) + (setq node-name (concat (substring node-name 0 (match-beginning 0)) + "@" (cdr (assoc-string (match-string 0 node-name) map)) + "{}" + (substring node-name (match-end 0))) + pos (1+ (match-beginning 0))))) + node-name) + + +(defun Texinfo-make-node-list () + ;; Build list of nodes in current buffer. + ;; (What about using `imenu--index-alist'?) + ;; FIXME: Support multi-file documents. + (save-excursion + (goto-char (point-min)) + (let (nodes dups) + (while (re-search-forward "^@node\\b" nil t) + (skip-chars-forward "[:blank:]") + (cl-pushnew (list (Texinfo-nodename-de-escape + (buffer-substring-no-properties + (point) (progn (skip-chars-forward "^\r\n,") + (skip-chars-backward "[:blank:]") + (point))))) + nodes + :test (lambda (a b) + (when (equal a b) + (push (cons a (line-number-at-pos (point))) dups) + t)))) + (when dups + (display-warning + 'AUCTeX + (format "There are duplicate nodes:\n%s" + (mapconcat (lambda (dup) + (format " %s on line %d" (car dup) (cdr dup))) + (nreverse dups) + "\n")))) + (nreverse nodes)))) + +(defun Texinfo-insert-node () + "Insert a Texinfo node in the current buffer. +That means, insert the string `@node' and prompt for current, +next, previous and upper node. If there is an active region, use +this for the current node and inhibit the prompt for it. Insert +a comment on the following line indicating the order of arguments +for @node." + (interactive) + (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point))))) + (nodes (Texinfo-make-node-list)) + node-name next-node previous-node up-node) + (unless active-mark + (setq node-name (Texinfo-nodename-escape + (TeX-read-string "Node name: ")))) + ;; FIXME: What if key binding for `minibuffer-complete' was changed? + ;; `substitute-command-keys' doesn't return the correct value. + (setq next-node (Texinfo-nodename-escape + (completing-read "Next node (TAB completes): " nodes))) + (setq previous-node + (Texinfo-nodename-escape + (completing-read "Previous node (TAB completes): " nodes))) + (setq up-node (Texinfo-nodename-escape + (completing-read "Upper node (TAB completes): " nodes))) + (when (and active-mark + (< (mark) (point))) + (exchange-point-and-mark)) + (insert "@node ") + (if active-mark + (goto-char (mark)) + (insert node-name)) + (insert ", " next-node ", " previous-node ", " up-node + "\n@comment node-name, next, previous, up\n") + ;; Position point at first empty field. + (unless (and (or (> (length node-name) 0) active-mark) + (> (length next-node) 0) + (> (length previous-node) 0) + (> (length up-node) 0)) + (forward-line -2) + (forward-char 6) + (catch 'break + (if (or (> (length node-name) 0) active-mark) + (progn (skip-chars-forward "^,") (forward-char 2)) + (throw 'break nil)) + (dolist (node (list next-node previous-node up-node)) + (if (> (length node) 0) + (progn (skip-chars-forward "^,") (forward-char 2)) + (throw 'break nil))))))) + +(defun Texinfo-arg-nodename (optional &optional prompt _definition) + "Prompt for a node name completing with known node names. +OPTIONAL is ignored. +Use PROMPT as the prompt string. +If DEFINITION is non-nil, then chosen node name is a node name to be +added to the list of defined node names. Current implementation +ignored DEFINITION as the full document is scanned for node names at +each invocation." + (let ((node-name (completing-read (TeX-argument-prompt optional prompt "Node") + (Texinfo-make-node-list)))) + (insert "{" (Texinfo-nodename-escape node-name) "}" ))) + +(defun Texinfo-arg-lrc (_optional &rest _args) + (let ((l (read-from-minibuffer "Enter left part: ")) + (c (read-from-minibuffer "Enter center part: ")) + (r (read-from-minibuffer "Enter right part: "))) + (insert " " l " @| " c " @| " r))) + +(defun Texinfo-arg-next-line (_optional &rest _args) + "Go to the beginning of next line if we are at the end of line. +Otherwise insert an end-of-line." + (if (eolp) (forward-line) (insert "\n"))) + +(defun Texinfo-arg-on|off (optional &optional prompt style) + "Prompt for a boolean input. +OPTIONAL is ignored. +Use PROMPT as the prompt string. +STYLE may be one of `:on|off' or `:true|false', if omitted `:on|off' +is assumed by default." +(let ((collection (cdr (assq style + '((nil . #1=("on" "off")) + (:on|off . #1#) + (:true|false "true" "false")))))) + (insert (if (y-or-n-p (TeX-argument-prompt optional prompt (concat (car collection) ", not " (cadr collection)))) + (car collection) + (cadr collection))))) + +(defun Texinfo-arg-choice (optional &optional prompt collection) + (insert (completing-read (TeX-argument-prompt optional prompt "Key") + collection))) + +;; Silence the byte-compiler from warnings for variables and functions declared +;; in reftex. +(defvar reftex-section-levels-all) +(defvar reftex-level-indent) +(defvar reftex-label-menu-flags) +(defvar reftex-tables-dirty) +(defvar reftex-label-alist-builtin) + +(declare-function reftex-match-string "reftex" (n)) +(declare-function reftex-section-number "reftex-parse" (&optional level star)) +(declare-function reftex-nicify-text "reftex" (text)) +(declare-function reftex-ensure-compiled-variables "reftex" ()) + +(defun Texinfo-reftex-section-info (file) + ;; Return a section entry for the current match. + ;; Carefull: This function expects the match-data to be still in place! + (let* ((marker (set-marker (make-marker) (1- (match-beginning 3)))) + (macro (reftex-match-string 3)) + (level-exp (cdr (assoc macro reftex-section-levels-all))) + (level (if (symbolp level-exp) + (save-match-data (funcall level-exp)) + level-exp)) + (unnumbered (< level 0)) + (level (abs level)) + (section-number (reftex-section-number level unnumbered)) + (text1 (save-match-data + (save-excursion + (buffer-substring-no-properties (point) (progn (end-of-line) (point)))))) + (literal (buffer-substring-no-properties + (1- (match-beginning 3)) + (min (point-max) (+ (match-end 0) (length text1) 1)))) + ;; Literal can be too short since text1 too short. No big problem. + (text (reftex-nicify-text text1))) + + ;; Add section number and indentation + (setq text + (concat + (make-string (* reftex-level-indent level) ?\ ) + (if (nth 1 reftex-label-menu-flags) ; section number flag + (concat section-number " ")) + text)) + (prog1 + (list 'toc "toc" text file marker level section-number + literal (marker-position marker)) + (set-marker marker nil)))) + +(defun Texinfo-reftex-hook () + "Hook function to plug Texinfo into RefTeX." + ;; force recompilation of variables + (when (string= TeX-base-mode-name "Texinfo") + ;; dirty temporary hook to remove when reftex has a Texinfo builtin + ;; TODO --- taken on <2014-01-06 mon> --- remove the dirty trick once reftex + ;; has been corrected for long enough a time + (unless (assq 'Texinfo reftex-label-alist-builtin) + (setq reftex-label-alist-builtin (append reftex-label-alist-builtin + '((Texinfo "Texinfo default environments" nil))))) + (dolist (v `((reftex-section-pre-regexp . "@") + ; section post-regexp must contain exactly one group + (reftex-section-post-regexp . "\\([ \t]+\\)") + (reftex-section-info-function . Texinfo-reftex-section-info) + (reftex-default-label-alist-entries . (Texinfo)) + (reftex-section-levels + . ,(mapcar + (lambda (x) + (if (string-match "\\(\\`unnumbered\\)\\|\\(heading\\'\\)\\|\\(\\`top\\'\\)" + (car x)) + (cons (car x) (- (cadr x))) + (cons (car x) (cadr x)))) + texinfo-section-list)))) + (set (make-local-variable (car v) ) (cdr v))) + (reftex-ensure-compiled-variables))) + +;;; Keymap: + +(defvar Texinfo-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-mode-map) + + ;; From texinfo.el + ;; bindings for updating nodes and menus + (define-key map "\C-c\C-um" #'texinfo-master-menu) + (define-key map "\C-c\C-u\C-m" #'texinfo-make-menu) + (define-key map "\C-c\C-u\C-n" #'texinfo-update-node) + (define-key map "\C-c\C-u\C-e" #'texinfo-every-node-update) + (define-key map "\C-c\C-u\C-a" #'texinfo-all-menus-update) + + ;; Simulating LaTeX-mode + (define-key map "\C-c\C-e" #'Texinfo-environment) + (define-key map "\C-c." #'Texinfo-mark-environment) + (define-key map "\C-c*" #'Texinfo-mark-section) + (define-key map "\M-\C-h" #'Texinfo-mark-node) + (define-key map "\C-c\n" #'texinfo-insert-@item) + (or (key-binding "\e\r") + (define-key map "\e\r" #'texinfo-insert-@item)) ;*** Alias + (define-key map "\C-c\C-s" #'Texinfo-insert-node) + (define-key map "\C-c]" #'texinfo-insert-@end) + + ;; Override some bindings in `TeX-mode-map' + ;; FIXME: Inside @math{}, you can use all plain TeX math commands + ;; even in Texinfo documents. Thus it might be nice to develop + ;; context sensitive command so that the following four keys + ;; inherit the command in `TeX-mode-map' inside @math{}. + (define-key map "$" #'self-insert-command) + (define-key map "^" #'self-insert-command) + (define-key map "_" #'self-insert-command) + (define-key map "\\" #'self-insert-command) + ;; Users benefit from `TeX-electric-macro' even in Texinfo mode + (define-key map "@" #'TeX-insert-backslash) + map) + "Keymap for Texinfo mode.") + +(easy-menu-define Texinfo-command-menu + Texinfo-mode-map + "Menu used in Texinfo mode for external commands." + (TeX-mode-specific-command-menu 'texinfo-mode)) + +(easy-menu-define Texinfo-mode-menu + Texinfo-mode-map + "Menu used in Texinfo mode." + `("Texinfo" + ["Node ..." texinfo-insert-@node + :help "Insert a node"] + ["Macro ..." TeX-insert-macro + :help "Insert a macro and possibly arguments"] + ["Complete Macro" TeX-complete-symbol + :help "Complete the current macro"] + ["Environment ..." Texinfo-insert-environment + :help "Insert an environment"] + ["Item" texinfo-insert-@item + :help "Insert an @item"] + "-" + ("Insert Font" + ["Emphasize" (TeX-font nil ?\C-e) :keys "C-c C-f C-e"] + ["Bold" (TeX-font nil ?\C-b) :keys "C-c C-f C-b"] + ["Typewriter" (TeX-font nil ?\C-t) :keys "C-c C-f C-t"] + ["Small Caps" (TeX-font nil ?\C-c) :keys "C-c C-f C-c"] + ["Italic" (TeX-font nil ?\C-i) :keys "C-c C-f C-i"] + ["Sample" (TeX-font nil ?\C-s) :keys "C-c C-f C-s"] + ["Roman" (TeX-font nil ?\C-r) :keys "C-c C-f C-r"]) + ("Replace Font" + ["Emphasize" (TeX-font t ?\C-e) :keys "C-u C-c C-f C-e"] + ["Bold" (TeX-font t ?\C-b) :keys "C-u C-c C-f C-b"] + ["Typewriter" (TeX-font t ?\C-t) :keys "C-u C-c C-f C-t"] + ["Small Caps" (TeX-font t ?\C-c) :keys "C-u C-c C-f C-c"] + ["Italic" (TeX-font t ?\C-i) :keys "C-u C-c C-f C-i"] + ["Sample" (TeX-font t ?\C-s) :keys "C-u C-c C-f C-s"] + ["Roman" (TeX-font t ?\C-r) :keys "C-u C-c C-f C-r"]) + ["Delete Font" (TeX-font t ?\C-d) :keys "C-c C-f C-d"] + "-" + ["Create Master Menu" texinfo-master-menu + :help "Make a master menu for the whole Texinfo file"] + ["Create Menu" texinfo-make-menu + :help "Make or update the menu for the current section"] + ["Update Node" texinfo-update-node + :help "Update the current node"] + ["Update Every Node" texinfo-every-node-update + :help "Update every node in the current file"] + ["Update All Menus" texinfo-all-menus-update + :help "Update every menu in the current file"] + "-" + ("Commenting" + ["Comment or Uncomment Region" + comment-or-uncomment-region + :help "Comment or uncomment the currently selected region"] + ["Comment or Uncomment Paragraph" + TeX-comment-or-uncomment-paragraph + :help "Comment or uncomment the current paragraph"]) + ,TeX-fold-menu + "-" + . ,TeX-common-menu-entries)) + +(defvar Texinfo-font-list + '((?\C-b "@b{" "}") + (?\C-c "@sc{" "}") + (?\C-e "@emph{" "}") + (?\C-i "@i{" "}") + (?\C-r "@r{" "}") + (?\C-s "@samp{" "}") + (?\C-t "@t{" "}") + (?s "@strong{" "}") + (?\C-f "@file{" "}") + (?d "@dfn{" "}") + (?\C-v "@var{" "}") + (?k "@key{" "}") + (?\C-k "@kbd{" "}") + (?c "@code{" "}") + (?C "@cite{" "}") + (?\C-d "" "" t)) + "Font commands used in Texinfo mode. See `TeX-font-list'.") + +;;; Mode: + +;;;###autoload +(defalias 'Texinfo-mode #'texinfo-mode) + +;;;###autoload +(defun TeX-texinfo-mode () + "Major mode in AUCTeX for editing Texinfo files. + +Special commands: +\\{Texinfo-mode-map} + +Entering Texinfo mode calls the value of `text-mode-hook' and then the +value of `Texinfo-mode-hook'." + (interactive) + (kill-all-local-variables) + (setq TeX-mode-p t) + (setq TeX-output-extension (if TeX-PDF-mode "pdf" "dvi")) + (setq TeX-sentinel-default-function #'TeX-TeX-sentinel) + ;; Mostly stolen from texinfo.el + (setq TeX-base-mode-name "Texinfo") + (setq major-mode 'texinfo-mode) + (use-local-map Texinfo-mode-map) + (set-syntax-table texinfo-mode-syntax-table) + + (set (make-local-variable 'page-delimiter) + (concat + "^@node [ \t]*[Tt]op\\|^@\\(" + texinfo-chapter-level-regexp + "\\)")) + (set (make-local-variable 'require-final-newline) t) + (set (make-local-variable 'indent-tabs-mode) nil) + (set (make-local-variable 'paragraph-separate) + (concat "@[a-zA-Z]*[ \n]\\|" paragraph-separate)) + (set (make-local-variable 'paragraph-start) + (concat "@[a-zA-Z]*[ \n]\\|" paragraph-start)) + (set (make-local-variable 'fill-column) 72) + (set (make-local-variable 'comment-start) "@c ") + (set (make-local-variable 'comment-start-skip) "@c +\\|@comment +") + (set (make-local-variable 'comment-use-syntax) nil) + (setq TeX-comment-start-regexp "@c\\(?:omment\\)?\\>") + (set (make-local-variable 'words-include-escapes) t) + (set (make-local-variable 'imenu-generic-expression) + texinfo-imenu-generic-expression) + + (set (make-local-variable 'font-lock-defaults) + '(texinfo-font-lock-keywords nil nil nil backward-paragraph)) + (set (make-local-variable 'syntax-propertize-function) + texinfo-syntax-propertize-function) + + ;; Outline settings. + (set (make-local-variable 'outline-regexp) + (concat "@\\(" + (mapconcat #'car texinfo-section-list "\\>\\|") + "\\>\\)")) + (set (make-local-variable 'outline-level) 'texinfo-outline-level) + + ;; Mostly AUCTeX stuff + (set (make-local-variable 'TeX-command-current) #'TeX-command-master) + + (setq TeX-default-extension "texi") + (set (make-local-variable 'TeX-esc) "@") + + (set (make-local-variable 'TeX-auto-regexp-list) 'TeX-auto-empty-regexp-list) + + (setq TeX-command-default "TeX") + (setq TeX-header-end "%*end") + (setq TeX-trailer-start (regexp-quote (concat TeX-esc "bye"))) + + (set (make-local-variable 'TeX-complete-list) + (list (list "@\\([a-zA-Z]*\\)" 1 'TeX-symbol-list-filtered nil) + (list "" TeX-complete-word))) + + (set (make-local-variable 'TeX-font-list) Texinfo-font-list) + (set (make-local-variable 'TeX-font-replace-function) + #'TeX-font-replace-macro) + (set (make-local-variable 'TeX-style-hook-dialect) :texinfo) + + (add-hook 'find-file-hook (lambda () + (unless (file-exists-p (buffer-file-name)) + (TeX-master-file nil nil t))) + nil t) + + (when (and (boundp 'add-log-current-defun-function) + (fboundp 'texinfo-current-defun-name)) + (set (make-local-variable 'add-log-current-defun-function) + #'texinfo-current-defun-name)) + + (TeX-add-symbols + '("acronym" "Acronym") + '("allowcodebreaks" (TeX-arg-literal " ") (Texinfo-arg-on|off nil :true|false) (Texinfo-arg-next-line)) + '("appendix" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("appendixsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("appendixsection" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("appendixsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("appendixsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("asis") + '("atchar" nil) + '("author" (TeX-arg-literal " ") (TeX-arg-free "Author")) + '("b" "Text") + '("bullet") + '("bye") + '("c" (TeX-arg-literal " ") (TeX-arg-free "Comment")) + '("caption" "Caption" + ;; TODO: caption is meaningful only inside float env. Maybe some checking + ;; and warning would be good. + ) + '("center" (TeX-arg-literal " ") (TeX-arg-free "Line of text")) + '("chapheading" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("chapter" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("cindex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("cite" "Reference") + '("clear" (TeX-arg-literal " ") (TeX-arg-free "Flag")) + '("code" "Sample code") + '("codequotebacktick" (TeX-arg-literal " ") (Texinfo-arg-on|off) (Texinfo-arg-next-line)) + '("codequoteundirected" (TeX-arg-literal " ") (Texinfo-arg-on|off) (Texinfo-arg-next-line)) + '("command" "Command") + '("comment" (TeX-arg-literal " ") (TeX-arg-free "Comment")) + '("contents") + '("copyright" nil) + '("defcodeindex" (TeX-arg-literal " ") (TeX-arg-free "Index name")) + '("defindex" (TeX-arg-literal " ") (TeX-arg-free "Index name")) + '("dfn" "Term") + '("dmn" "Dimension") + '("documentlanguage" (TeX-arg-literal " ") (Texinfo-arg-choice "Language" ("ca" "cs" "de" "en" "es" "fr" "hu" "is" "it" "ja" "nb" "nl" "nn" "pl" "pt" "ru" "sr" "tr" "uk")) (Texinfo-arg-next-line)) + '("documentencoding" (TeX-arg-literal " ") (Texinfo-arg-choice "Encoding" ("US-ASCII" "UTF-8" "ISO-8859-1" "ISO-8859-15" "ISO-8859-2" "koi8-r" "koi8-u")) (Texinfo-arg-next-line)) + '("dots" nil) + '("emph" "Text") + '("email" "Email address") + '("equiv" nil) + '("error") + '("evenfooting" Texinfo-arg-lrc) + '("evenheading" Texinfo-arg-lrc) + '("everyfooting" Texinfo-arg-lrc) + '("everyheading" Texinfo-arg-lrc) + '("exdent" (TeX-arg-literal " ") (TeX-arg-free "Line of text")) + '("expansion" nil) + '("file" "Filename") + '("finalout") + '("findex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("footnote" "Text of footnote") + '("footnotestyle" (TeX-arg-literal " ") (TeX-arg-free "Style")) + '("guillemetleft") + '("guillemetright") + '("guilsinglleft") + '("guilsinglright") + '("heading" (TeX-arg-literal " ") (TeX-arg-free "Title")) + ;; XXX: Would be nice with completion. + '("headings" (TeX-arg-literal " ") (TeX-arg-free "On off single double")) + '("i" "Text") + '("ignore") + '("include" (TeX-arg-literal " ") (TeX-arg-free "Filename")) + '("inforef" "Node name" "Info file name") + '("item") + '("itemx") + '("kbd" "Keyboard characters") + '("key" "Key name") + '("kindex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("LaTeX" nil) + '("lowersections" 0) + '("majorheading" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("menu") + '("minus") + '("need" "N") + '("node" (TeX-arg-literal " ") (TeX-arg-free "Name") + (TeX-arg-literal ", ") (TeX-arg-free "Next") + (TeX-arg-literal ", ") (TeX-arg-free "Previous") + (TeX-arg-literal ", ") (TeX-arg-free "Up")) + '("noindent") + '("oddfooting" Texinfo-arg-lrc) + '("oddheading" Texinfo-arg-lrc) + '("page") + '("paragraphindent" (TeX-arg-literal " ") (TeX-arg-free "Indent")) + '("pindex" "Entry") + '("point" nil) + '("print") + '("printindex" (TeX-arg-literal " ") (TeX-arg-free "Index name")) + '("pxref" (Texinfo-arg-nodename "Node name")) + '("quotedblbase") + '("quotesinglbase") + '("r" "Text") + '("raisesections" 0) + '("ref" (Texinfo-arg-nodename "Node name")) + '("refill") + '("result") + '("samp" "Text") + '("sc" "Text") + '("section" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("set" (TeX-arg-literal " ") (TeX-arg-free "Flag")) + '("setchapternewpage" (TeX-arg-literal " ") (Texinfo-arg-choice "On off odd" ("on" "off" "odd")) (Texinfo-arg-next-line)) + '("setfilename" (TeX-arg-literal " ") (TeX-arg-free "Info file name")) + '("settitle" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("shortcontents") + '("smallbook") + '("sp" "N") + '("strong" "Text") + '("subheading" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("subsection" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("subsubheading" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("subsubsection" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("subtitle" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("summarycontents") + '("syncodeindex" (TeX-arg-literal " ") (TeX-arg-free "From index") + (TeX-arg-literal " ") (TeX-arg-free "Into index")) + '("synindex" (TeX-arg-literal " ") (TeX-arg-free "From index") + (TeX-arg-literal " ") (TeX-arg-free "Into index")) + '("t" "Text") + '("TeX" nil) + '("thischapter") + '("thischaptername") + '("thisfile") + '("thispage") + '("tie") + '("tindex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("title" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("titlefont" "Text") + '("titlepage") + '("today" nil) + '("top" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("unnumbered" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("unnumberedsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("unnumberedsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("unnumberedsubsubsec" (TeX-arg-literal " ") (TeX-arg-free "Title")) + '("url" "Link") + '("value" "Flag") + '("var" "Metasyntactic variable") + '("vindex" (TeX-arg-literal " ") (TeX-arg-free "Entry")) + '("vskip" (TeX-arg-literal " ") (TeX-arg-free "Amount")) + '("w" "Text") + '("xref" (Texinfo-arg-nodename "Node name"))) + + ;; RefTeX plugging + (add-hook 'reftex-mode-hook #'Texinfo-reftex-hook) + (if (and (boundp 'reftex-mode) reftex-mode) + (Texinfo-reftex-hook)) + + (run-mode-hooks 'text-mode-hook 'Texinfo-mode-hook) + (TeX-set-mode-name)) + +(defcustom Texinfo-clean-intermediate-suffixes + '("\\.cps?" "\\.vrs?" "\\.fns?" "\\.tps?" "\\.pgs?" "\\.kys?") + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(defcustom Texinfo-clean-output-suffixes + ;; See `man texi2html' for the HTML stuff. + '("\\.info\\(-[0-9]+\\)?" "\\.dvi" "\\.pdf" "\\.ps" "\\.html" + "_toc\\.html" "_fot\\.html" "_abt\\.html" "_[0-9]+\\.html" "_l2h_img.+") + "List of regexps matching suffixes of files to be deleted. +The regexps will be anchored at the end of the file name to be matched, +that is, you do _not_ have to cater for this yourself by adding \\\\\\=' or $." + :type '(repeat regexp) + :group 'TeX-command) + +(provide 'tex-info) + +;;; tex-info.el ends here diff --git a/elpa/auctex-13.1.3/tex-info.elc b/elpa/auctex-13.1.3/tex-info.elc Binary files differnew file mode 100644 index 0000000..1a136a1 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-info.elc diff --git a/elpa/auctex-13.1.3/tex-ispell.el b/elpa/auctex-13.1.3/tex-ispell.el new file mode 100644 index 0000000..c743baf --- /dev/null +++ b/elpa/auctex-13.1.3/tex-ispell.el @@ -0,0 +1,449 @@ +;;; tex-ispell.el --- AUCTeX skip additions for Ispell -*- lexical-binding: t; -*- + +;; Copyright (C) 2016-2022 Free Software Foundation, Inc. + +;; Author: Arash Esbati <arash@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex, wp, convenience + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides additions to skip list of Ispell (in this +;; context, Ispell is synonym for Ispell, Aspell and Hunspell spelling +;; checker programs). Macro arguments and environments skipped by +;; Ispell are stored in the car and/or cdr of +;; `ispell-tex-skip-alists'. This file uses two functions +;; `TeX-ispell-skip-setcar' and `TeX-ispell-skip-setcdr' defined in +;; `tex.el' to add new items to this variable. + +;; Ispell has a lot of LaTeX macros and environments already built-in. +;; E.g., check this link for Hunspell program: + +;; https://github.com/hunspell/hunspell/blob/master/src/parsers/latexparser.cxx + +;; Ispell does not check spelling in the preamble of a document. +;; Hence, only document macros and environments should be added here. +;; Currently, this file has support for the following macro packages: + +;; acro.sty +;; amsmath.sty +;; attachfile.sty +;; booktabs.sty +;; breqn.sty +;; caption.sty +;; cleveref.sty +;; empheq.sty +;; enumitem.sty +;; fancyref.sty +;; fancyvrb.sty +;; filecontents.sty +;; fontaxes.sty +;; fontspec.sty +;; hyperref.sty +;; listings.sty +;; ltxdoc.cls +;; ltxtable.sty +;; mdframed.sty +;; minted.sty +;; nameref.sty +;; pythontex.sty +;; siunitx.sty +;; splitidx.sty +;; stabular.sty +;; tabularx.sty +;; tabulary.sty +;; tcolorbox.sty +;; tikz.sty +;; varioref.sty +;; xltabular.sty + +;; If you have further additions, drop a line to <auctex-devel@gnu.org>. + +;;; Code: + +(require 'tex) + +;; Add new macros here: +(eval-when-compile + (defvar TeX-ispell-skip-cmds-list + '(;; acro.sty + ("ac" . 1) + ("ac*" . 1) + ("Ac" . 1) + ("Ac*" . 1) + ("acs" . 1) + ("acs*" . 1) + ("acl" . 1) + ("acl*" . 1) + ("Acl" . 1) + ("Acl*" . 1) + ("aca" . 1) + ("aca*" . 1) + ("acf" . 1) + ("acf*" . 1) + ("Acf" . 1) + ("Acf*" . 1) + ("acp" . 1) + ("acp*" . 1) + ("Acp" . 1) + ("Acp*" . 1) + ("acsp" . 1) + ("acsp*" . 1) + ("aclp" . 1) + ("aclp*" . 1) + ("Aclp" . 1) + ("Aclp*" . 1) + ("acap" . 1) + ("acap*" . 1) + ("acfp" . 1) + ("acfp*" . 1) + ("Acfp" . 1) + ("Acfp*" . 1) + ("Iac" . 1) + ("iacs" . 1) + ("iacl" . 1) + ("acflike" . 1) + ("acflike*" . 1) + ("acfplike" . 1) + ("acfplike*" . 1) + ("acsingle" . 1) + ("acsingle*" . 1) + ("Acsingle" . 1) + ("Acsingle*" . 1) + ("acreset" . 1) + ("acuse" . 1) + ("acsetup" . 1) + ;; attachfile.sty + ("attachfile" . 1) + ("attachfilesetup" . 1) + ("textattachfile" . 1) + ;; booktabs.sty + ("addlinespace" . 0) + ("specialrule" . 3) + ;; caption.sty + ("captionlistentry" . 0) + ("captionof" . 1) + ("captionof*" . 1) + ("captionsetup" . 1) + ("captionsetup*" . 1) + ("clearcaptionsetup" . 1) + ("clearcaptionsetup*" . 1) + ;; cleveref.sty + ("cref" . 1) + ("Cref" . 1) + ("cref*" . 1) + ("Cref*" . 1) + ("cpageref" . 1) + ("Cpageref" . 1) + ("namecref" . 1) + ("nameCref" . 1) + ("lcnamecref" . 1) + ("labelcref" . 1) + ("crefrange" . 2) + ("Crefrange" . 2) + ("cpagerefrange" . 2) + ("Cpagerefrange" . 2) + ("crefrange*" . 2) + ("Crefrange*" . 2) + ;; empheq.sty + ("empheqset" . 1) + ;; fancyref.sty + ("fref" . 1) + ("Fref" . 1) + ;; fancyvrb.sty + ("fvset" . 1) + ("VerbatimInput" . 1) + ;; fontaxes.sty + ("figureversion" . 1) + ;; fontspec.sty + ("addfontfeatures" . 1) + ;; hyperref.sty + ("hypersetup" . 1) + ("href" . 1) + ("url" . 1) + ("nolinkurl" . 1) + ("hyperbaseurl" . 1) + ("hyperimage" . 1) + ("hyperdef" . 2) + ("hyperref" . 3) + ("hyperlink" . 1) + ("hypertarget" . 1) + ("autoref" . 1) + ("autoref*" . 1) + ("autopageref" . 1) + ("autopageref*" . 1) + ;; listings.sty + ("lstinputlisting" . 1) + ("lstset" . 1) + ;; ltxdoc.cls + ("cs" . 1) + ;; ltxtable.sty + ("LTXtable" . 2) + ;; mdframed.sty + ("mdfsetup" . 1) + ("mdfapptodefinestyle" . 2) + ;; minted.sty + ("inputminted" . 2) + ("setminted" . 1) + ("setmintedinline" . 1) + ;; nameref.sty + ("nameref" . 1) + ("Nameref" . 1) + ;; pythontex.sty: Only add the macros which will be used in the + ;; document; others should be in the preamble + ("setpythontexfv" . 1) + ("useprintpythontex" . 1) + ("usestdoutpythontex" . 1) + ("inputpygments" . 1) + ("setpygmentsfv" . 1) + ("setpygmentspygopt" . 1) + ;; siunitx.sty + ("num" . 1) + ("si" . 1) + ("sisetup" . 1) + ("SI" . 2) + ;; splitidx.sty + ("sindex" . 1) + ;; tcolorbox.sty + ("tcbox" . 0) + ("tcbset" . 1) + ("tcbsetforeverylayer" . 1) + ;; tcolorbox.sty -- raster library + ("tcbitem" . 0) + ;; varioref.sty + ("vref" . 1) + ("Vref" . 1) + ("vref*" . 1) + ("Ref" . 1) + ("vpageref" . 1) + ("vpageref*" . 1) + ("fullref" . 1) + ("vrefrange" . 2) + ("vrefrange*" . 2) + ("vpagerefrange" . 2) + ("vpagerefrange*" . 2)) + "List of commands with arguments to be skipped. +Each element of the list is a cons cell with command name +\(string) as car and the number of mandatory arguments to be +skipped as cdr. If number is 0, then only skip over the optional +argument and spell check the mandatory one.")) + + +;; Add new environments with one optional argument here: +(eval-when-compile + (defvar TeX-ispell-skip-envs-opt-arg-list + '(;; enumitem.sty + "description" + "description*" + "enumerate" + "enumerate*" + "itemize" + "itemize*" + ;; mdframed.sty + "mdframed" + ;; tcolorbox.sty + "tcolorbox" + ;; tcolorbox.sty -- raster library + "tcbraster" + "tcbitemize") + "List of LaTeX environments with an opt argument to be skipped.")) + + +;; Add new environments which should be skipped entirely here: +(eval-when-compile + (defvar TeX-ispell-skip-envs-list + '(;; amsmath.sty + "align" + "align*" + "alignat" + "alignat*" + "flalign" + "flalign*" + "gather" + "gather*" + "multline" + "multline*" + ;; breqn.sty + "darray" + "darray*" + "dgroup" + "dgroup*" + "dmath" + "dmath*" + "dseries" + "dseries*" + ;; empheq.sty + "empheq" + ;; fancyvrb.sty + "BVerbatim" + "BVerbatim*" + "LVerbatim" + "LVerbatim*" + "SaveVerbatim" + "Verbatim" + "Verbatim*" + "VerbatimOut" + ;; listings.sty + "lstlisting" + ;; minted.sty + "minted" + ;; pythontex.sty + "pycode" + "pysub" + "pyverbatim" + "pyblock" + "pyconsole" + "pyconcode" + "pyconverbatim" + "pylabcode" + "pylabsub" + "pylabverbatim" + "pylabblock" + "pylabconsole" + "pylabconcode" + "pylabconverbatim" + "sympycode" + "sympysub" + "sympyverbatim" + "sympyblock" + "sympyconsole" + "sympyconcode" + "sympyconverbatim" + "pygments" + ;; tikz.sty + "tikzpicture") + "List of LaTeX environments which will be skipped entirely. +Environments for math or verbatim text are candidates for this list.")) + + +;; Add others delimited here: +(TeX-ispell-skip-setcar + `(;; LaTeX-base + ("\\\\(" . "\\\\)") + ("\\\\raisebox" TeX-ispell-tex-arg-end 1 2 0) + ;; booktabs.sty + ("\\\\cmidrule" . "{[-0-9]+}") + ;; fontspec.sty + ("\\\\fontspec" TeX-ispell-tex-arg-end 1 1 0))) + + +;; Special setup for verbatim macros: +(defcustom TeX-ispell-verb-delimiters "!|#~\"/+^-" + "String with all delimiters for verbatim macros. +Characters special in regexps like `^' and `-' must come last and +not be quoted. An opening brace `{', asterisk `*' and at-sign +`@' should not be used as they are not recognized by +`font-latex.el' correctly." + :group 'TeX-misc + :type 'string) + +;; listings.sty, fancyvrb.sty, pythontex.sty: With opt. argument only +;; before verb content: +(TeX-ispell-skip-setcar + `((,(concat "\\\\" (regexp-opt '("Verb" "lstinline" + "py" "pyc" "pys" "pyv" "pyb" + "pycon" "pyconc" "pyconv" + "pylab" "pylabc" "pylabs" "pylabv" "pylabb" + "pylabcon" "pylabconc" "pylabconv" + "sympy" "sympyc" "sympys" "sympyv" "sympyb" + "sympycon" "sympyconc" "sympyconv"))) + TeX-ispell-tex-arg-verb-end))) + +;; minted.sty: With opt. and mandatory argument before verb content. +;; pythontex.sty: With one mandatory argument before verb content: +(TeX-ispell-skip-setcar + `((,(concat "\\\\" (regexp-opt '("mint" "mintinline" "pygment"))) + TeX-ispell-tex-arg-verb-end 1))) + + +;; Add environments here: +(TeX-ispell-skip-setcdr + '(;; filecontents.sty + ("filecontents\\*?" ispell-tex-arg-end) + ;; stabular.sty + ("stabular" ispell-tex-arg-end) + ("stabular\\*" TeX-ispell-tex-arg-end) + ;; tabularx.sty, tabulary.sty, Standard LaTeX tabular*-env + ("tabular[*xy]" TeX-ispell-tex-arg-end) + ;; tcolorbox.sty -- raster library + ("tcboxed\\(raster\\|itemize\\)" ispell-tex-arg-end) + ;; xltabular.sty + ("xltabular" ispell-tex-arg-end 2))) + + +;; No customization below this line + +(eval-when-compile + (defun TeX-ispell-sort-skip-cmds-list (arg) + "Return elements from `TeX-ispell-skip-cmds-list' acc. to ARG." + (when (member arg '(0 1 2 3)) + (let (cmds) + (dolist (elt TeX-ispell-skip-cmds-list) + (when (= (cdr elt) arg) + (push (car elt) cmds))) + cmds)))) + +(defvar TeX-ispell-skip-cmds-opt-arg-regexp + (eval-when-compile + (concat "\\\\" + (regexp-opt (TeX-ispell-sort-skip-cmds-list 0) t))) + "Regexp of LaTeX commands with only optional arguments to be skipped.") + +(defvar TeX-ispell-skip-cmds-one-arg-regexp + (eval-when-compile + (concat "\\\\" + (regexp-opt (TeX-ispell-sort-skip-cmds-list 1) t))) + "Regexp of LaTeX commands with one argument to be skipped.") + +(defvar TeX-ispell-skip-cmds-two-args-regexp + (eval-when-compile + (concat "\\\\" + (regexp-opt (TeX-ispell-sort-skip-cmds-list 2) t))) + "Regexp of LaTeX commands with two arguments to be skipped.") + +(defvar TeX-ispell-skip-cmds-three-args-regexp + (eval-when-compile + (concat "\\\\" + (regexp-opt (TeX-ispell-sort-skip-cmds-list 3) t))) + "Regexp of LaTeX commands with three arguments to be skipped.") + +(defvar TeX-ispell-skip-envs-opt-arg-regexp + (eval-when-compile + (regexp-opt TeX-ispell-skip-envs-opt-arg-list t)) + "Regexp of LaTeX environments with an opt argument to be skipped.") + +(defvar TeX-ispell-skip-envs-regexp + (eval-when-compile + (regexp-opt TeX-ispell-skip-envs-list t)) + "Regexp of LaTeX environments which will be skipped entirely.") + +;; Make them available to Ispell: +(TeX-ispell-skip-setcar + `((,TeX-ispell-skip-cmds-opt-arg-regexp ispell-tex-arg-end 0) + (,TeX-ispell-skip-cmds-one-arg-regexp ispell-tex-arg-end) + (,TeX-ispell-skip-cmds-two-args-regexp ispell-tex-arg-end 2) + (,TeX-ispell-skip-cmds-three-args-regexp ispell-tex-arg-end 3))) + +(TeX-ispell-skip-setcdr + `((,TeX-ispell-skip-envs-opt-arg-regexp ispell-tex-arg-end 0) + ,(cons TeX-ispell-skip-envs-regexp + (concat "\\\\end{" TeX-ispell-skip-envs-regexp "}")))) + +(provide 'tex-ispell) + +;;; tex-ispell.el ends here diff --git a/elpa/auctex-13.1.3/tex-ispell.elc b/elpa/auctex-13.1.3/tex-ispell.elc Binary files differnew file mode 100644 index 0000000..49678e1 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-ispell.elc diff --git a/elpa/auctex-13.1.3/tex-jp.el b/elpa/auctex-13.1.3/tex-jp.el new file mode 100644 index 0000000..8428c37 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-jp.el @@ -0,0 +1,908 @@ +;;; tex-jp.el --- Support for Japanese TeX. -*- lexical-binding: t; -*- + +;; Copyright (C) 1999, 2001-2008, 2012-2013, 2016-2018, 2020-2022 +;; Free Software Foundation, Inc. + +;; Author: KOBAYASHI Shinji <koba@flab.fujitsu.co.jp>, +;; Hidenobu Nabetani <nabe@debian.or.jp> +;; Maintainer: Masayuki Ataka <masayuki.ataka@gmail.com> +;; Ikumi Keita <ikumikeita@jcom.home.ne.jp> +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file was written by KOBAYASHI Shinji <koba@flab.fujitsu.co.jp> +;; based on many patches developed by Japanese NetNews community. +;; Japanese message translation by MATUI Takao <mat@nuis.ac.jp>. + +;;; Code: + +(require 'latex) + +;;; Customization + +(defgroup AUCTeX-jp nil + "Japanese support in AUCTeX." + :group 'AUCTeX + :link '(custom-manual "(auctex)Japanese")) + +(defcustom japanese-TeX-engine-default 'ptex + "Default TeX engine for Japanese TeX." + :type '(choice (const :tag "pTeX" ptex) + (const :tag "jTeX" jtex) + (const :tag "upTeX" uptex))) + +(defcustom japanese-TeX-use-kanji-opt-flag t + "Add kanji option to Japanese pTeX family if non-nil. +If `TeX-japanese-process-input-coding-system' or +`TeX-japanese-process-output-coding-system' are non-nil, the process coding +systems are determined by their values regardless of the kanji option." + :type 'boolean) + +(setq TeX-engine-alist-builtin + (append TeX-engine-alist-builtin + '((ptex "pTeX" "ptex %(kanjiopt)" "platex %(kanjiopt)" "eptex") + (jtex "jTeX" "jtex" "jlatex" nil) + (uptex "upTeX" "euptex" "uplatex" "euptex")))) + +;; customize option の初期値や saved value そのものを改変しないように +;; するため、setcar の使用は避ける。 +(setq TeX-command-list + ;; `TeX-command-list' と同じ構造の新しい list を作る。 + ;; 各要素の list を l として、l そのものを使ったり、l を + ;; 若干修正した list を作ったりして `mapcar' で集める。 + (mapcar + (lambda (l) + (cond + ;; l の第1要素が "BibTeX" や "Index" だったら、l の第2要素 + ;; だけを入れ替えた別の list を作る。 + ((equal (car l) "BibTeX") + (append (list (car l) "%(bibtex) %s") (cddr l))) + ((equal (car l) "Index") + (append (list (car l) "%(makeindex) %s") (cddr l))) + ;; それ以外の場合は l そのものを使う。 + (t + l))) + TeX-command-list)) + +;; Define before first use. +(defvar japanese-TeX-mode nil + "Non-nil means the current buffer handles Japanese TeX/LaTeX.") +(make-variable-buffer-local 'japanese-TeX-mode) +(put 'japanese-TeX-mode 'permanent-local t) + +(setq TeX-expand-list-builtin + (append + TeX-expand-list-builtin + '( + ;; -kanji オプションの文字列を作る。 + ("%(kanjiopt)" (lambda () + (if japanese-TeX-use-kanji-opt-flag + (let ((str (japanese-TeX-get-encoding-string))) + (if str (format " -kanji=%s " str) "")) + ""))) + ;; pbibtex, jbibtex, upbibtex, bibtex の中から適切なものを選択する。 + ("%(bibtex)" (lambda () + (cond + ((eq TeX-engine 'ptex) + ;; pLaTeX 用日本語 BibTeX が pbibtex になった + ;; のは比較的最近なので、まだ jbibtex の人もそ + ;; れなりにいるだろう。 + (if (executable-find "pbibtex") + "pbibtex %(kanjiopt)" "jbibtex")) + ((eq TeX-engine 'jtex) "jbibtex") + ((eq TeX-engine 'uptex) "upbibtex") + (t "bibtex")))) + ;; mendex, upmendex, makeindex のうち適切なものを選択する。 + ("%(makeindex)" (lambda () + (cond + ;; upmendex は XeLaTeX や LuaLaTeX でも + ;; 使える。see + ;; http://www.t-lab.opal.ne.jp/tex/README_upmendex.md + ;; FIXME: XeLaTeX や LuaLaTeX だけを使う + ;; 利用者の場合は、tex-jp は load されな + ;; いのでこの設定は意味がない。 + ((and (memq TeX-engine '(uptex xetex luatex)) + (executable-find "upmendex")) + "upmendex %(dic)") + ((memq TeX-engine '(ptex uptex)) + "mendex %(mendexkopt) %(dic)") + (t "makeindex")))) + ;; mendex 用日本語コードオプション。 + ("%(mendexkopt)" (lambda () + (if japanese-TeX-use-kanji-opt-flag + (let ((str (japanese-TeX-get-encoding-string))) + ;; 1文字目を大文字に。 + (if str (format " -%c " (upcase (aref str 0))) + "")) + ""))) + ;; (up)mendex 用辞書指定オプション。 + ("%(dic)" (lambda () + ;; master と同名で拡張子が .dic のファイルがあれば + ;; それを辞書名として -d オプションに与える。 + ;; C-c C-r 等の場合 _region_.dic にすべきでは + ;; ないので、`TeX-master-file' を陽に呼ぶ。 + (let ((dicname (TeX-master-file "dic" t))) + (if (file-exists-p + (expand-file-name dicname (TeX-master-directory))) + (let ((result (format "-d %s" dicname))) + ;; Advance past the file name in order to + ;; prevent expanding any substring of it. + (setq TeX-expand-pos + (+ TeX-expand-pos (length result))) + result) + "")))) + ;; pxdvi と %(o?)xdvi の適切な方を選択する。 + ("%(xdvi)" (lambda () + ;; pxdvi は ptex, jtex 共用なので、 + ;; japanese mode かどうかで判定すれば OK。 + (if (and japanese-TeX-mode (executable-find "pxdvi")) + "pxdvi" "%(o?)xdvi")))))) + +;;; Viewing (new implementation) + +(setq TeX-view-predicate-list-builtin + (append + '((paper-a4 + (let ((regex "\\`\\(?:a4j\\|a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'")) + (or (TeX-match-style regex) + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option regex))))) + (paper-a5 + (let ((regex "\\`\\(?:a5j\\|a5paper\\|a5comb\\)\\'")) + (or (TeX-match-style regex) + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option regex))))) + ;; jarticle などだと b4paper, b5paper は JIS B 系列。 + ;; j-article などの方には a4j, b5j といったオプションはない。 + (paper-b5 ; ISO B5 + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`b5paper\\'") + (not (TeX-match-style "\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'")))) + (paper-b5jis ; JIS B5 + (and (fboundp 'LaTeX-match-class-option) + (or (LaTeX-match-class-option "\\`b5j\\'") + (and (LaTeX-match-class-option "\\`b5paper\\'") + (TeX-match-style "\\`u?[jt]s?\\(?:article\\|report\\|book\\)\\'"))))) + ;; article などには b4paper というオプションはない。 + ;; b4paper というオプションがあったら JIS B4 と見なす。 + (paper-b4jis + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`\\(?:b4j\\|b4paper\\)\\'")))) + ;; jsclasses だと他にももっと判型のオプションがあるが、全部面倒 + ;; 見てるとキリがないので、これくらいでいいだろう。 + ;; jsarticle.el や jsbook.el で追加分の処理を仕込めばいいのかも知れない。 + TeX-view-predicate-list-builtin)) + +(unless (memq system-type '(windows-nt darwin)) + (let ((l (assoc "xdvi" TeX-view-program-list-builtin))) + (when l + (setcar (cadr l) "%(xdvi) -unique") + (setcdr (cdr l) '("%(xdvi)")))) + (setq TeX-view-program-list-builtin + (append TeX-view-program-list-builtin + '(("MuPDF" "mupdf %o" "mupdf"))))) + +;; これは tex.el に取り入れてもらうのは難しいか? +;; tex-jp.el が読み込まれるだけで、dvi viewer のデフォルトが dviout に +;; なってしまうのは抵抗が大きいかも。 +(unless (get 'TeX-view-program-selection 'saved-value) + (if (eq system-type 'windows-nt) + (setq TeX-view-program-selection + (append + '((output-dvi "dviout")) + TeX-view-program-selection)))) + +(mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (or (TeX-tree-expand + '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "platex" '("/ptex/" "/pbibtex/bst/")) + '("/usr/share/texmf/ptex/" "/usr/share/texmf/pbibtex/bst/"))) + +(mapc (lambda (dir) (add-to-list 'TeX-macro-global dir t)) + (or (TeX-tree-expand + '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "jlatex" '("/jtex/" "/jbibtex/bst/")) + '("/usr/share/texmf/jtex/" "/usr/share/texmf/jbibtex/bst/"))) + +(defcustom japanese-TeX-error-messages t + "If non-nil, explain LaTeX error messages in Japanese." + :type 'boolean) + +(defcustom TeX-japanese-process-input-coding-system nil + "If non-nil, used for encoding input to Japanese TeX process. +When nil, AUCTeX tries to choose suitable coding system. +See also a user custom option `TeX-japanese-process-output-coding-system'." + :type '(choice (const :tag "Default" nil) coding-system)) + +(defcustom TeX-japanese-process-output-coding-system nil + "If non-nil, used for decoding output from Japanese TeX process. +When nil, AUCTeX tries to choose suitable coding system. +See also a user custom option `TeX-japanese-process-input-coding-system'." + :type '(choice (const :tag "Default" nil) coding-system)) + +(defcustom japanese-LaTeX-default-style "jarticle" + "Default when creating new Japanese documents." + :type 'string) + +(defcustom japanese-LaTeX-style-list + '(("j-article") + ("j-report") + ("j-book") + ("jslides") + ("jarticle") + ("jreport") + ("jbook") + ("tarticle") + ("treport") + ("tbook") + ("jsarticle") + ("jsbook") + ;; for upLaTeX + ("ujarticle") ("ujreport") ("ujbook") + ("utarticle") ("utreport") ("utbook")) + "List of Japanese document classes." + :type '(repeat (group (string :format "%v")))) + +(setq LaTeX-style-list + (append japanese-LaTeX-style-list LaTeX-style-list)) + +;; text〜系の明朝体・ゴシック体指定コマンドは jLaTeX にはないようで、 +;; (u)pLaTeX でしか使えないが、問題になることはないだろう。 +(setq LaTeX-font-list + (append '((?m "\\textmc{" "}" "\\mathmc{" "}") + (?g "\\textgt{" "}" "\\mathgt{" "}")) + LaTeX-font-list)) + +;;; Coding system + +(defun japanese-TeX-set-process-coding-system (process) + "Set proper coding system for japanese TeX PROCESS." + (with-current-buffer TeX-command-buffer + (when japanese-TeX-mode + ;; TeX-engine が ptex, jtex, uptex のいずれかである場合のみ考え + ;; る。luatex-ja などの場合はそもそもただの latex-mode でよく、 + ;; わざわざ japanese-latex-mode にする必要がない。 + + ;; FIXME: 以下の処理は tex engine を対象とする場合しか考えていない。 + ;; bibtex や mendex 等の補助ツールの場合は正しくない処理かもしれない。 + (let* + ;; -kanji オプションありの時の文字コード。 + ((kanji (and japanese-TeX-use-kanji-opt-flag + (let ((str (japanese-TeX-get-encoding-string))) + (cond + ((equal str "euc") 'euc-jp) + ((equal str "jis") 'iso-2022-jp) + ((equal str "sjis") 'shift_jis) + ((equal str "utf8") 'utf-8))))) + + ;; process からの出力の文字コード。 + (dec (cond + ;; windows と mac の場合。 + ((memq system-type '(windows-nt darwin)) + (cond + ;; ptex なら mac は utf-8。 + ;; windows で -kanji オプションありの時はその文字コード、 + ;; なしの時は sjis。 + ;; texlive 2018 からは sjis ではなく utf-8 になったので + ;; そちらに合わせる。 + ((eq TeX-engine 'ptex) + (cond ((eq system-type 'darwin) + 'utf-8) + ((and japanese-TeX-use-kanji-opt-flag kanji) + kanji) + (t 'utf-8))) + ;; jtex なら sjis に固定する。 + ((eq TeX-engine 'jtex) + 'shift_jis) + ;; uptex なら utf-8 に固定する。 + (t + 'utf-8))) + ;; unix の場合。 + (t + ;; jtex なら euc に固定する。 + (cond + ((eq TeX-engine 'jtex) + 'euc-jp) + ;; それ以外は、uptex でも locale に従う。 + ;; ただし、locale が日本語をサポートしない場合は + ;; euc に固定する。 + (t + (let ((lcs locale-coding-system)) + (if (and lcs (japanese-TeX-coding-ejsu lcs)) + lcs 'euc-jp))))))) + + ;; process に与える入力の文字コード。 + (enc (cond + ;; ptex で -kanji オプションありなら、その文字コード。 + ;; なしなら utf-8 か sjis。 + ;; texlive 2018 で w32 でも utf-8 がデフォルトになっ + ;; たようなので、それに合わせる。 + ((eq TeX-engine 'ptex) + (if (and japanese-TeX-use-kanji-opt-flag kanji) + kanji + 'utf-8)) + ;; jtex なら euc か sjis に固定する。 + ((eq TeX-engine 'jtex) + (if (memq system-type '(windows-nt darwin)) + 'shift_jis 'euc-jp)) + ;; uptex なら utf-8 に固定する。 + (t + 'utf-8)))) + + ;; 改行コードを指定。 + (setq dec (coding-system-change-eol-conversion + dec + (if (eq system-type 'windows-nt) 'dos 'unix)) + enc (coding-system-change-eol-conversion + enc + (if (eq system-type 'windows-nt) 'dos 'unix))) + + ;; Customize 値があればそれを優先。 + (set-process-coding-system + process + (or TeX-japanese-process-output-coding-system dec) + (or TeX-japanese-process-input-coding-system enc)))))) + +(defun japanese-TeX-coding-ejsu (coding-system) + "Convert japanese CODING-SYSTEM to mnemonic string. +euc-jp: \"euc\" +jis: \"jis\" +shift_jis: \"sjis\" +utf-8: \"utf8\" +Return nil otherwise." + (let ((base (coding-system-base coding-system))) + (cdr (assq base + '((japanese-iso-8bit . "euc") + (iso-2022-jp . "jis") + (japanese-shift-jis . "sjis") + (utf-8 . "utf8") + ;; TeXLive 2018 から BOM つき UTF-8 もサポートされた。 + (utf-8-with-signature . "utf8") + + (euc-jis-2004 . "euc") + (iso-2022-jp-2004 . "jis") + (japanese-shift-jis-2004 . "sjis") + + (japanese-cp932 . "sjis") + (eucjp-ms . "euc")))))) + +(defun japanese-TeX-get-encoding-string () + "Return coding option string for Japanese pTeX family. +For inappropriate encoding, nil instead." + (or (japanese-TeX-coding-ejsu buffer-file-coding-system) + + ;; 複数ファイルに分割した文書の場合、emacs で開いたファイルが日本 + ;; 語を1字も含まないことがある。このため、そのファイルの + ;; buffer-file-coding-system は日本語コードが不定に留まって + ;; しまう可能性がある。そのような場合、master file の + ;; buffer-file-coding-system を使う。 + (if (stringp TeX-master) ; 自分が子ファイルのとき + (let ((buf (get-file-buffer (TeX-master-file t)))) + (if buf + (japanese-TeX-coding-ejsu + (with-current-buffer buf buffer-file-coding-system))))) + + ;; それでも決められない場合は buffer-file-coding-system の + ;; default 値を使う。 + (japanese-TeX-coding-ejsu + (default-value 'buffer-file-coding-system)))) + +;;; Japanese TeX modes + +;;;###autoload +(defun japanese-plain-tex-mode () + "Major mode in AUCTeX for editing Japanese plain TeX files. +Set `japanese-TeX-mode' to t, and enter `TeX-plain-tex-mode'." + (interactive) + (setq japanese-TeX-mode t) + (TeX-plain-tex-mode)) + +(defun japanese-plain-tex-mode-initialization () + "Japanese plain-TeX specific initializations." + (when japanese-TeX-mode + (TeX-engine-set japanese-TeX-engine-default) + + ;; For the intent of the following lines, see the comments below + ;; in `japanese-latex-mode-initialization'. + (when enable-local-variables + (setq major-mode 'japanese-plain-tex-mode) + (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name + nil t)))) + +(add-hook 'plain-TeX-mode-hook #'japanese-plain-tex-mode-initialization) + +;;;###autoload +(defun japanese-latex-mode () + "Major mode in AUCTeX for editing Japanese LaTeX files. +Set `japanese-TeX-mode' to t, and enter `TeX-latex-mode'." + (interactive) + (setq japanese-TeX-mode t) + (TeX-latex-mode)) + +(defun japanese-latex-mode-initialization () + "Japanese LaTeX specific initializations." + (when japanese-TeX-mode + ;; `TeX-match-style' を使うのは `TeX-update-style' の後に遅らせる。 + ;; この段階で使うと、その中で呼ぶ `TeX-style-list' の中で + ;; `TeX-update-style' が呼ばれてしまい、local variable 等の準備が + ;; 整ってない段階で style hook が実行されて不適な結果になることが + ;; ある。また、`TeX-update-style' は後から `find-file-hook' 中でも + ;; う一度呼ばれるので、`TeX-parse-self' が t だと parse 処理も無駄 + ;; に 2 回行われてしまう。 + (add-hook 'TeX-update-style-hook + #'japanese-LaTeX-guess-engine nil t) + (setq LaTeX-default-style japanese-LaTeX-default-style) + + (when (and (fboundp 'font-latex-add-keywords) + (eq TeX-install-font-lock 'font-latex-setup)) + ;; jLaTeX にはないコマンドだが、それはもう気にしなくていいだろう。 + (font-latex-add-keywords '(("textgt" "{") ("mathgt" "{")) + 'bold-command) + (font-latex-add-keywords '("gtfamily") + 'bold-declaration)) + + ;; The value of `major-mode' should be `latex-mode', not + ;; `japanese-latex-mode', because the name `latex-mode' is hard + ;; coded in several places of AUCTeX like "(eq major-mode + ;; 'latex-mode)", "(memq major-mode '(doctex-mode latex-mode)" and + ;; so on. By such piece of codes, `japanese-latex-mode' should + ;; simply be regarded as `latex-mode'. So we'd like to leave + ;; `major-mode' as `latex-mode' here, but doing so confuses + ;; `hack-local-variables' in two ways. + ;; (1) It is tricked into considering that the major mode is not + ;; yet initialized and calls `japanese-latex-mode' again. + ;; (2) It does not read the directory local variables prepared for + ;; `japanese-latex-mode'. + ;; Thus we temporarily set `major-mode' to `japanese-latex-mode' + ;; here and plan to reset it to `latex-mode' after + ;; `hack-local-variables' is done. + (when enable-local-variables + (setq major-mode 'japanese-latex-mode) + (add-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name + nil t)))) + +(add-hook 'LaTeX-mode-hook #'japanese-latex-mode-initialization) + +;; This function is useful only within `hack-local-variables-hook'. +(defun japanese-TeX-reset-mode-name () + (cond ((eq major-mode 'japanese-latex-mode) + (setq major-mode 'latex-mode)) + ((eq major-mode 'japanese-plain-tex-mode) + (setq major-mode 'plain-tex-mode))) + (remove-hook 'hack-local-variables-hook #'japanese-TeX-reset-mode-name t)) + +;; Make `hack-dir-local-variables' to regard `latex-mode' as parent +;; of `japanese-latex-mode', and `plain-tex-mode' as parent of +;; `japanese-plain-tex-mode'. +(put 'japanese-plain-tex-mode 'derived-mode-parent 'plain-tex-mode) +(put 'japanese-latex-mode 'derived-mode-parent 'latex-mode) + +(defun japanese-LaTeX-guess-engine () + "Guess Japanese TeX engine and set it to `TeX-engine'. +Document class and its option is considered in the guess. Do not +overwrite the value already set locally." + ;; `TeX-engine' may be set by the file local variable or by the menu + ;; Command->TeXing Options manually. Don't override the user + ;; preference set in such ways. + (unless (local-variable-p 'TeX-engine (current-buffer)) + (TeX-engine-set + (cond + ((TeX-match-style "\\`u[jt]\\(?:article\\|report\\|book\\)\\'") + 'uptex) + ((TeX-match-style "\\`[jt]s?\\(?:article\\|report\\|book\\)\\'") + (if (LaTeX-match-class-option "\\`uplatex\\'") + 'uptex 'ptex)) + ((TeX-match-style "\\`j-\\(?:article\\|report\\|book\\)\\'") + 'jtex) + (t japanese-TeX-engine-default))))) + +;;; Support for various self-insert-command + +(defalias 'japanese-TeX-self-insert-command + (cond ((fboundp 'can-n-egg-self-insert-command) + #'can-n-egg-self-insert-command) + ((fboundp 'egg-self-insert-command) + #'egg-self-insert-command) + ((fboundp 'canna-self-insert-command) + #'canna-self-insert-command) + (t + #'self-insert-command))) + +(defun TeX-insert-punctuation () + "Insert point or comma, cleaning up preceding space." + (interactive) + (expand-abbrev) + (if (TeX-looking-at-backward "\\\\/\\(}+\\)" 50) + (replace-match "\\1" t)) + (call-interactively #'japanese-TeX-self-insert-command)) + +;;; Error Messages + +(if japanese-TeX-error-messages + (setq LaTeX-error-description-list + '(("\\(?:Package Preview Error\\|Preview\\):.*" . + "`preview'へ`auctex'オプションを直接与えるのは避けてください. +プレビューの実行時以外でこのエラーが出た場合,余りにこみいったことを +しすぎか,でなければAUCTeXがひどい失敗をしています.") + + ("Bad \\\\line or \\\\vector argument.*" . + "線の傾きを指定する,\\lineまたは\\vectorの最初の引数が不正です.") + + ("Bad math environment delimiter.*" . + "数式モード中で数式モード開始コマンド\\[または\\(,または,数式モード外で +数式モード終了コマンド\\]または\\)をTeXが見つけました.この問題は,数式モー +ドのデリミタがマッチしていなかったり,括弧のバランスがとれていなかったりす +るために生じます.") + + ("Bad use of \\\\\\\\.*" . + "\\\\コマンドがパラグラフ中にありました.この使いかたは無意味です. +このエラーメッセージは\\\\がcentering環境やflushing環境で使われた +時,あるいはcentering/flushing宣言が有効なところで使われた時に生じます.") + + ("\\\\begin{[^ ]*} ended by \\\\end{[^ ]*}." . + "対応する\\begin命令のない\\end命令をLaTeXが見つけました.\\end命令の環 +境名を間違えたか,余分な\\begin命令があるか,\\end命令をわすれたかのいず +れかでしょう.") + + ("Can be used only in preamble." . + "プリアンブルでしか使えない\\documentclass・\\nofiles・\\includeonly +\\makeindex・\\makeglossaryのうちのいずれかが\\begin{document}よりも +後で使われているのをLaTeXが検出しました.このエラーは\\begin{document} +が余分にあった時にも生じます.") + + ("Command name [^ ]* already used.*" . + "すでに定義されている命令名または環境名に対して\\newcommand・ +\\newenvironment・\\newlength・\\newsavebox・\\newtheoremのうちのいず +れかを実行しようとしています(ある環境を定義すると同じ名前の命令が自動 +的に定義されるので,既に存在する環境と同名の命令は定義できません).新 +しい名前を考えるか,\\newcommandか\\newenvironmentの場合なら対応する +\\renew...命令を使わなければなりません.") + + ("Counter too large." . + "1. 文字で順序付けされたもの,たぶん番号付けされたリスト環境のラベルが, +26よりも大きい番号を受け取りました.非常に長いリストを使っているか, +カウンタを再設定してしまったかのいずれかでしょう. + +2. 脚注が文字または脚注記号で順序づけされていますが,文字または記号を +使い切ってしまいました.おそらく\\thanks命令の使いすぎです.") + + + ("Environment [^ ]* undefined." . + "定義されていない環境に対する\\begin命令をLaTeXが見つけました.おそらく +環境名を間違えたのでしょう.") + + ("Float(s) lost." . + "parboxのなかにfigure環境・table環境または\\marginpar命令がありました +\(なお,parboxはminipage環境か\\parbox命令によって作られるか,脚注や図 +などに対してLaTeXが生成するものです\).これは出力時のエラーなので,原因 +となっている環境あるいは命令は,LaTeXが問題を発見した場所よりもだいぶ +ん前にある可能性があります.出力されていない図・表・傍注などがいくつか +あるかもしれませんが,それらが原因であるとは限りません.") + + ("Illegal character in array arg." . + "array環境またはtabular環境の引数,または\\multicolumn命令の第2引数 +の中に不正な文字がありました.") + + ("Missing \\\\begin{document}." . + "\\begin{document}命令より前にLaTeXが出力を行なってしまいました. +\\begin{document}命令を忘れたか,プリアンブルに何か間違いがあるのでしょう. +打ち間違いによる文字や,宣言の誤りによる可能性もあります.例えば,引数を +囲む括弧を抜かしたとか,命令名の\\を忘れた場合などです.") + + ("Missing p-arg in array arg.*" . + "array環境・tabular環境の引数,あるいは\\multicolumn命令の第2引数の中に, +括弧に囲まれた表現のついていないpがありました.") + + ("Missing @-exp in array arg." . + "array環境・tabular環境の引数,あるいは\\multicolumn命令の第2引数の中に, +@表現のついていない@がありました.") + + ("No such counter." . + "\\setcounter命令または\\addtocounter命令で,存在しないカウンタが指定され +ました.おそらくただのタイプミスでしょう.ただし,エラーがauxファイルの中 +で生じた場合は,\\newcounter命令をプリアンブルの外で使ったのだと思われます.") + + ("Not in outer par mode." . + "figure環境・table環境あるいは\\marginpar命令が数式モードまたはparboxの中 +で使われました.") + + ("\\\\pushtabs and \\\\poptabs don't match." . + "\\pushtabsと対応しない\\poptabsがみつかったか,または,対応する\\poptabs +をもたない\\pushtabsがあるのに\\end{tabbing}が現れてしまいました.") + + ("Something's wrong--perhaps a missing \\\\item." . + "リスト環境の中に\\item命令がないのが最もありそうなケースです. +thebibliography環境で引数を忘れた場合にも生じます.") + + ("Tab overflow." . + "\\=が,LaTeXで許されるタブストップの最大数を超えています.") + + ("There's no line here to end." . + "\\newline命令または\\\\命令がパラグラフ間にあります.この使いかたは +無意味です.もし空行をあけたいのでしたら,\\vspaceを使ってください.") + + ("This may be a LaTeX bug." . + "まったくわけがわからなくなってしまいました.たぶんこれ以前に検出された +エラーのせいだと思われます.しかし,LaTeX自体のバグである可能性もあります. +もしこのエラーが入力ファイルに対する最初のエラーであり,何も間違いが見つ +からない場合は,そのファイルを保存して,ローカルガイドに書かれている責任 +者に連絡してください.") + + ("Too deeply nested." . + "リスト環境の入れ子が深すぎます.何段階の入れ子が許されるかは使っている +コンピュータに依存しますが,少なくとも4段階までは許されています(普通は +それで十分でしょう).") + + ("Too many unprocessed floats." . + "このエラーは1ページ中の\\marginpar命令が多すぎるために生じる場合もあ +りますが,もっとありそうなのは,限界を超えて図や表を保存しようとした場 +合です.長い文書を組版していくとき,LaTeXは図や表を個々に保存し,ペー +ジの分割を行なう時にそれらを挿入します.このエラーは,ページへの分割が +行なわれる前に,あまりにも多くのfigure環境やtable環境が見つかった場合 +に生じます.この問題は環境のうちのいくつかを文書の終わりの方に移動すれ +ば解決できます.また,このエラーは``logjam''によって生じることもありま +す.``logjam''とは,LaTeXが出現順序通りにしか図表を出力できないせいで, +図表の出力が1ヶ所でもつまるとその後ろの図表が軒並みすべてつっかえてしま +うことをいいます.このジャムの原因は,大きすぎて1ページないしはオプショ +ン引数で指定された位置に収まらないような図や表である可能性があります.こ +れは,引数にpオプションが指定されていないと起きやすくなります.") + + ("Undefined tab position." . + "\\>・\\+・\\-または\\<命令で,存在しないタブ位置,すなわち\\=命令で定 +義されていないタブ位置を指定しようとしています.") + + ("\\\\< in mid line." . + "\\<命令がtabbing環境の行の途中に現れました.この命令は行の先頭になければ +なりません.") + + ("Double subscript." . + "数式中の1つの列に2つの下付き文字がついています.例えばx_{2}_{3}のように. +このような表現は無意味です.") + + ("Double superscript." . + "数式中の1つの列に2つの上付き文字がついています.例えばx^{2}^{3}のように. +このような表現は無意味です.") + + ("Extra alignment tab has been changed to \\\\cr." . + "array環境またはtabular環境の1列中にある項目が多すぎます.言い換えると, +列の終わりまでにある&の数が多すぎます.おそらく前の列の最後に\\\\をつけ +るのを忘れたのでしょう.") + + ("Extra \\}, or forgotten \\$." . + "括弧または数式モードのデリミタが正しく対応していません.おそらく{・\\[・ +\\(あるいは$のうちのいずれかを書き忘れたのでしょう.") + + ("Font [^ ]* not loaded: Not enough room left." . + "この文書は限界よりも多くのフォントを使っています.もし文書の部分ごとに +別々のフォントが使われているのなら,分割して処理すれば問題は解決されます.") + + ("I can't find file `.*'." . + "必要なファイルが見つかりませんでした.もし見つからないファイルの拡張子 +がtexの場合,あなたが指定したファイル,すなわちメインファイルまたは +\\input命令・\\include命令で挿入されるファイルが見つからないのです. +拡張子がstyであれば,存在しない文書スタイルまたはスタイルオプションを +指定しようとしています.") + + ("Illegal parameter number in definition of .*" . + "これはおそらく,\\newcommand・\\renewcommand・\\newenvironmentまたは +\\renewenvironment命令のなかで#が正しく使われなかったために生じたエラー +です.\\#命令として使われる場合を除けば,#という文字は,例えば2番目の +引数を指定する#2のように,引数パラメータとしてしか使えません.また, +このエラーは,上にあげた4つのコマンドがお互いに入れ子になっている場合 +や,\\newenvironment命令・\\renewenvironment命令で#2のようなパラメータ +が最後の引数の中で使われている場合にも生じます.") + + ("Illegal unit of measure ([^ ]* inserted)." . + "もし + ! Missing number, treated as zero. +というエラーが起きた直後であれば,このエラーの原因もそれと同じです. +そうでない場合は,LaTeXが引数としてlengthを期待しているのにnumberが +現れたことを意味しています.このエラーの最もありがちな原因は長さ0を +表わす0inのような表現の代わりに0とかいてしまうことにあります.ただし, +命令の引数を書き忘れた場合にもこのエラーが生じることがあります.") + + ("Misplaced alignment tab character \\&." . + "arrayまたはtabular環境での項目区切りにのみ使われるべき文字&が普通の文 +の中にありました.たぶん\\&と入力したかったのでしょう.") + + ("Missing control sequence inserted." . + "このエラーは,おそらく命令名でないものを\\newcommand・\\renewcommand・ +\\newlengthまたは\\newsaveboxの第1引数として使ったために生じたのでしょう.") + + ("Missing number, treated as zero." . + "このエラーはたいてい,引数としてnumberまたはlengthを必要としている命令に +対して引数が与えられなかったために生じます.引数を書き忘れたのか,テキスト +の中の大括弧([])がオプション引数の指定と間違えられてしまったかのどちらかで +しょう.また,数を生成する\\valueのような命令やlength命令の前に\\protectを +置いた場合にもこのエラーは生じます.") + + ("Missing [{}] inserted." . + "TeXは既にわけがわからなくなっています.エラーメッセージによって示されて +いる場所はたぶん入力に間違いがあったところよりも後ろになってしまっている +でしょう.") + + ("Missing \\$ inserted." . + "おそらく,数式モード中でしか使えない命令をTeXが数式モード外で検出した +のだと思われます.特に記述されていない限り,LaTeX Book(Lamport著,訳書 +はアスキー出版)の3.3節にある添字・分数・数学記号などのコマンドはすべて +数式モードでしか使えないのだということに注意してください.たとえ命令が +数式環境の中にあったとしても,boxを生成する命令の引数を処理しはじめた +時点では,TeXはまだ数式モードに入っていないのです.また,このエラーは, +数式モード中でTeXが空行を検出した場合にも生じます.") + + ("Not a letter." . + "\\hyphenation命令の引数の中になにか正しくないものがあります.") + + ("Paragraph ended before [^ ]* was complete." . + "命令の引数の中に不正な空行が入ってしまっています.おそらく引数の終わり +に閉じ括弧をつけるのを忘れたのでしょう.") + + ("\\\\[^ ]*font [^ ]* is undefined .*" . + "このエラーはあまり一般的でないフォントが数式モードで使われた時に生じ +ます.例えば,脚注の中の数式で\\sc命令が使われると,footnotesizeの +small capsフォントが呼びだされることになります.この問題は\\load命令を +使えば解決できます.") + + ("Font .* not found." . + "未知のfamily/series/shape/sizeの組み合わせのフォントが指定されました. +このエラーが起きるケースは2つ考えられます. + 1) \\sizeマクロで使えないサイズを選択しようとした. + 2) そうでなければ,管理者のところに行って,フォント選択テーブルが + 腐っていると文句をつけてやりましょう!") + + ("TeX capacity exceeded, sorry .*" . + "TeXがメモリを使いきってしまい,実行を中断しました.しかし,慌てないで +ください.このエラーが生じた原因は,たぶん,TeXにあなたの文書を処理で +きるだけの能力がないからではありません.TeXにメモリを使いきらせた原因 +は,おそらく入力したファイルの前の方で生じたエラーです.あなたが本当に +TeXの容量を超えたことをしようとしたのかどうか,そしてその場合どうすれ +ばいいのかを判断する方法を以下に説明します.もし問題が入力ファイル中の +エラーにある場合は,個々のエラーを解決していく方法をとるのがよいでしょ +う.LaTeXが短いファイルでメモリを使いきることはめったにありませんから, +エラーの起きた位置より前に処理したページが数ページしかなければ,まず間 +違いなく入力ファイルに問題があるはずです. + +エラーメッセージの最後に,TeXが使いきってしまったメモリの種類が示され +ています.それらのうち一般的なものについて,考えられる原因を以下に挙げ +ます. + +buffer size +=========== +章節・\\caption・\\addcontentslineあるいは\\addtocontents命令の引数と +して与えたテキストが長すぎる場合に生じることがあります.このエラーは +たいてい\\end{document}を処理している時に生じますが,\\tableofcontents・ +\\listoffiguresあるいは\\listoftables命令を実行している場合にも起きる +ことがあります.この問題を解決するには,もっと短いテキストをオプション +引数として与えてください.目次や図表一覧を作成しても,見出しが長すぎる +と読みにくくなるはずです. + +exception dictionary +==================== +TeXが持っている領域以上にハイフネーション情報を与えようとしています. +あまり使わない単語の\\hyphenation命令を取り除いて,代わりに\\-命令を使っ +てください. + +hash size +========= +命令名の定義または相互参照ラベルの定義が多すぎます. + +input stack size +================ +このエラーはおそらく命令定義中の誤りによるものです.例えば,次の命令は +再帰的定義となっており,自分自身を使って\\gnuを定義しています. + + \\newcommand{\\gnu}{a \\gnu} % これはだめ + +この\\gnu命令を見つけるとTeXは\\gnuが何をうみだすのかを決定しようとし +てその末尾をいつまでも追いつづけ,やがて``input stack''を使いきってし +まいます. + +main memory size +================ +これは,TeXが短いファイルを処理している時に使いきる可能性のあるメモリ +のひとつです.main memoryを使いきるのは次の3つの場合のいずれかです. +\(1\)非常に長く複雑な命令を数多く定義した.(2)indexまたはglossaryを作っ +ているとき,1ページ中にあまりにも多くの\\indexまたは\\glossary命令があ +る.(3)生成のための情報をTeXが保持しきれないような,あまりにも複雑なペー +ジを生成しようとした.最初の2つの問題の解決方法は明らかです.命令定義 +の数あるいは\\index・\\glossary命令の数を減らすことです.3番目の問題は +ちょっと厄介です.これは,大きなtabbing・tabular・array・picture環境の +せいで生じることがあります.出力位置が決定されるのを待っている図や表で +TeXのメモリがいっぱいになっているのかもしれません.本当にTeXの容量を超 +えてしまったのかどうか調べるためには,エラーの起こった場所の直前に +\\clearpage命令を入れてもう一度コンパイルを実行してみてください.もし +それでもメモリが足りなくなるようなら,なんらかの手段を講じる必要があり +ます.TeXがページを切断するかどうか決定するためには段落全体を処理しな +ければならないということを思いだしてください.段落の途中に\\newpage命 +令を入れれば,段落の残りを処理する前に今のページをTeXに出力させること +で余裕ができるかもしれません(\\pagebreak命令ではだめです).もし図や表 +が溜まっていることが問題なのならば,図表をもっと後ろの方に移動するとか, +あるいはもっと前の時点で出力されるようにすれば回避できます.もしまだ文 +書を作成している途中なら,とりあえず\\clearpage命令を入れておいて,最 +終版を作る時までこの問題は棚上げしておきましょう.入力ファイルが変わる +と問題が解消される場合もあるのです. + +pool size +========= +相互参照の\\labelが多すぎるか,命令の定義が多すぎるかのどちらかです. +正確にいえば,定義したラベル名および命令名に使った文字数が多すぎるとい +うことです.ですから,もっと短い名前を使えばこの問題は解決します.ただ +し,このエラーは,\\setcounterなどのカウンタ命令や\\newenvironment・ +\\newtheorem命令の引数の終わりを示す右括弧を忘れた場合にも生じます. + +save size +========= +このエラーは,宣言の有効範囲や命令・環境があまりにも深く入れ子になって +いる場合に生じます.たとえば,\\multiput命令の引数にpicture環境があり, +そのなかに\\footnotesize宣言があり,その宣言の有効範囲に\\multiput命令 +があって,その引数に... というような場合です.") + + ("Text line contains an invalid character." . + "入力中に不正な文字が含まれています.ファイル作成の誤りによってテキスト +エディタがこの文字を挿入してしまったのでしょう.実際に何が起きたのかは +エディタによります.入力ファイルを調べてみて,指摘された文字が見つから +ない場合にはローカルガイドを見てください.") + + ("Undefined control sequence." . + "TeXが未定義の命令名を発見しました.おそらく入力の誤りでしょう.もしこ +のエラーがLaTeX命令の処理中に生じた場合は,その命令は間違った位置に置か +れています.例えば,リスト環境の中でないのに\\item命令が使われた場合など +です.また,\\documentclass命令がない場合にもこのエラーが生じます.") + + ("Use of [^ ]* doesn't match its definition." . + "おそらく描画のための命令だと思われますが,引数の使いかたが間違ってい +ます.間違っているのが\\@array命令の場合は,array環境かtabular環境での +@表現の引数になにか誤りがあるのでしょう.fragileな命令が\\protectされて +いないのかもしれません.") + + ("You can't use `macro parameter character \\#' in [^ ]* mode." . + "特殊文字#が普通のテキストの中に現れました.おそらく\\#と書きたかった +のでしょう.") + + ("Overfull \\\\hbox .*" . + "行分割のための適切な場所が見つからなかったので,1行に収まるべき分量以上 +の出力が行なわれてしまいました.") + + ("Overfull \\\\vbox .*" . + "ページ分割のための適切な場所が見つからなかったので,1ページに収まるべき +分量以上の出力が行なわれてしまいました.") + + ("Underfull \\\\hbox .*" . + "余分な垂直スペースがないかどうか出力を確かめてください.もしあれば,そ +れは\\\\命令または\\newline命令に関係する問題のために生じたものです.例 +えば2つの\\\\命令が続いている場合などです.この警告はsloppypar環境や +\\sloppy宣言の使用,あるいは\\linebreak命令の挿入などによる場合もあります.") + + ("Underfull \\\\vbox .*" . + "ページを分割するための適切な場所が見つけられず,十分なテキストのない +ページができてしまいました.") + + ;; New list items should be placed here + ;; + ;; ("err-regexp" . "context") + ;; + ;; the err-regexp item should match anything + + (".*" . "ごめんなさい.該当するヘルプメッセージがありません.")))) + +(provide 'tex-jp) + +;;; tex-jp.el ends here diff --git a/elpa/auctex-13.1.3/tex-jp.elc b/elpa/auctex-13.1.3/tex-jp.elc Binary files differnew file mode 100644 index 0000000..e719bcd --- /dev/null +++ b/elpa/auctex-13.1.3/tex-jp.elc diff --git a/elpa/auctex-13.1.3/tex-mik.el b/elpa/auctex-13.1.3/tex-mik.el new file mode 100644 index 0000000..1f27d3a --- /dev/null +++ b/elpa/auctex-13.1.3/tex-mik.el @@ -0,0 +1,62 @@ +;;; tex-mik.el --- MiKTeX support for AUCTeX. -*- lexical-binding: t; -*- + +;; Copyright (C) 1999-2021 Free Software Foundation, Inc. + +;; Author: Per Abrahamsen <abraham@dina.kvl.dk> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: +;; +;; This file contains variables customized for MiKTeX. + +;;; Code: + +(require 'tex) + + ;; Remove the Queue entry from the default, and make a non-Unix + ;; specific print entry, assuming that we'll print via gsview32. +(unless (get 'TeX-queue-command 'saved-value) + (setq TeX-queue-command nil)) + +(unless (get 'TeX-printer-list 'saved-value) + (setq TeX-printer-list nil)) + +(unless (get 'TeX-print-command 'saved-value) + (setq TeX-print-command + "start \"\" %f")) + +(unless (get 'TeX-source-specials-view-position-flags 'saved-value) + (setq TeX-source-specials-view-position-flags "-s %n%b")) + +;; Yap does not support a command line option for inverse searching. +;; The editor command has to be configured inside Yap in +;; "View/Options/Inverse Search" instead. +(unless (get 'TeX-source-specials-view-editor-flags 'saved-value) + (setq TeX-source-specials-view-editor-flags "")) + +;; kpsewhich in MiKTeX (aka findtexmf) does not emit any useful +;; information if fed with kpathsea-related variables anyway. +(unless (get 'TeX-kpathsea-path-delimiter 'saved-value) + (setq TeX-kpathsea-path-delimiter nil)) + +(provide 'tex-mik) + +;;; tex-mik.el ends here diff --git a/elpa/auctex-13.1.3/tex-mik.elc b/elpa/auctex-13.1.3/tex-mik.elc Binary files differnew file mode 100644 index 0000000..6b8cbef --- /dev/null +++ b/elpa/auctex-13.1.3/tex-mik.elc diff --git a/elpa/auctex-13.1.3/tex-site.el b/elpa/auctex-13.1.3/tex-site.el new file mode 100644 index 0000000..07c8d84 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-site.el @@ -0,0 +1,145 @@ +;;; tex-site.el - Site specific variables. Don't edit. -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2022 Free Software Foundation, Inc. +;; +;; completely rewritten. + +;; Author: David Kastrup <dak@gnu.org> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file contains startup code, autoloads and variables adapted to +;; the local site configuration. It is generated and placed by the +;; installation procedure and should not be edited by hand, nor moved +;; to a different place, as some settings may be established relative +;; to the file. + +;; All user customization should be done with +;; M-x customize-variable RET + +;;; Code: + +(when (< emacs-major-version 25) + (error "AUCTeX requires Emacs 25.1 or later")) + +(unless (or (fboundp 'TeX-modes-set) ;Avoid inf-looping. + (fboundp 'TeX-tex-mode)) ;auctex-autoloads is not loaded. + ;; Try and support the case where someone loads tex-site.el or + ;; auctex.el directly, in the old way. + (provide 'tex-site) ;Avoid (re)loading tex-site from auctex-autoloads. + (load "auctex-autoloads" 'noerror 'nomessage)) + +;; Define here in order for `M-x customize-group <RET> AUCTeX <RET>' +;; to work if the main AUCTeX files are not loaded yet. +(defgroup AUCTeX nil + "A (La)TeX environment." + :tag "AUCTeX" + :link '(custom-manual "(auctex)Top") + :link '(url-link :tag "Home Page" "https://www.gnu.org/software/auctex/") + :prefix "TeX-" + :group 'tex + :load "tex" :load "latex" :load "tex-style") + +(defvar TeX-lisp-directory + (file-name-directory load-file-name) + "The directory where most of the AUCTeX lisp files are located. +For the location of lisp files associated with +styles, see the variables TeX-style-* (hand-generated lisp) and +TeX-auto-* (automatically generated lisp).") + +(add-to-list 'load-path TeX-lisp-directory) + +(defvar TeX-data-directory + (file-name-directory load-file-name) + "The directory where the AUCTeX non-Lisp data is located.") + +(defcustom TeX-auto-global + (if (file-writable-p "/usr/local/var/auctex") "/usr/local/var/auctex" "~/.emacs.d/auctex") + "Directory containing automatically generated information. + +For storing automatic extracted information about the TeX macros +shared by all users of a site." + :group 'TeX-file + :type 'directory) + +(defconst TeX-mode-alist + '((tex-mode . tex-mode) + (plain-tex-mode . tex-mode) + (texinfo-mode . texinfo) + (latex-mode . tex-mode) + (doctex-mode . tex-mode)) + "Alist of built-in TeX modes and their load files.") + +(defalias 'TeX-load-hack #'ignore) + +(add-hook 'tex-site-unload-hook + (lambda () + (TeX-modes-set 'TeX-modes nil) + (setq load-path (delq TeX-lisp-directory load-path)))) + +(defun TeX-modes-set (var value &optional _ignored) + "Set VAR (which should be `TeX-modes') to VALUE. + +This places either the standard or the AUCTeX versions of +functions into the respective function cell of the mode." + (custom-set-default var value) + (let ((list TeX-mode-alist) elt) + (while list + (setq elt (car (pop list))) + (let ((dst (intern (concat "TeX-" (symbol-name elt))))) + (if (memq elt value) + (advice-add elt :override dst) + (advice-remove elt dst)))))) + +(defcustom TeX-modes + (mapcar #'car TeX-mode-alist) + "List of modes provided by AUCTeX. + +This variable can't be set normally; use customize for that, or +set it with `TeX-modes-set'." + :type (cons 'set + (mapcar (lambda(x) (list 'const (car x))) TeX-mode-alist)) + :set #'TeX-modes-set + :initialize #'custom-initialize-reset) + +(defconst AUCTeX-version "13.1.3" + "AUCTeX version. +If not a regular release, the date of the last change.") + +(defconst AUCTeX-date "2022-04-16" + "AUCTeX release date using the ISO 8601 format, yyyy-mm-dd.") + +;; Store bibitems when saving a BibTeX buffer +(add-hook 'bibtex-mode-hook #'BibTeX-auto-store) + +;;; Code specific to ELPA packaging: + +;; From preview-latex.el: + +(defvar preview-TeX-style-dir + (expand-file-name "latex" (file-name-directory load-file-name))) + +;;; Ensure that loading the autoloads file also loads this file. +;;;###autoload (require 'tex-site) + +(provide 'tex-site) +;;; tex-site.el ends here diff --git a/elpa/auctex-13.1.3/tex-site.elc b/elpa/auctex-13.1.3/tex-site.elc Binary files differnew file mode 100644 index 0000000..455d9f5 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-site.elc diff --git a/elpa/auctex-13.1.3/tex-style.el b/elpa/auctex-13.1.3/tex-style.el new file mode 100644 index 0000000..3ef92d2 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-style.el @@ -0,0 +1,413 @@ +;;; tex-style.el --- Customizable variables for AUCTeX style files -*- lexical-binding: t; -*- + +;; Copyright (C) 2005-2021 Free Software Foundation, Inc. + +;; Author: Reiner Steib <Reiner.Steib@gmx.de> +;; Keywords: tex, wp, convenience + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides customizable variables for AUCTeX style files. + +;;; Code: + +(defgroup LaTeX-style nil + "Support for special LaTeX style files in AUCTeX." + :group 'LaTeX-macro) + +;; Note: We don't have any defcustom in plain TeX style files yet. Else we +;; should also create a TeX-style group. + +;; Common + +(defcustom LaTeX-reftex-ref-style-auto-activate t + "Whether to activate automatically RefTeX reference styles." + :type 'boolean) + +(defcustom LaTeX-reftex-cite-format-auto-activate t + "Whether to activate automatically RefTeX citation format." + :type 'boolean) + +;; style/amsmath.el + +(defcustom LaTeX-amsmath-label nil + "Default prefix to amsmath equation labels. + +Amsmath equations include \"align\", \"alignat\", \"xalignat\", +\"multline\", \"flalign\" and \"gather\". If it is nil, +`LaTeX-equation-label' is used." + :group 'LaTeX-label + :type '(choice (const :tag "Use `LaTeX-equation-label'" nil) + (string))) + +;; style/beamer.el + +(defcustom LaTeX-beamer-section-labels-flag nil + "If non-nil section labels are added." + :type 'boolean) + +(defcustom LaTeX-beamer-item-overlay-flag t + "If non-nil do prompt for an overlay in itemize-like environments." + :type 'boolean) + +(defcustom LaTeX-beamer-themes 'local + "Presentation themes for the LaTeX beamer package. +It can be a list of themes or a function. If it is the symbol +`local', search only once per buffer." + :type + '(choice + (const :tag "TeX search" LaTeX-beamer-search-themes) + (const :tag "Search once per buffer" local) + (function :tag "Other function") + (list + :value + ;; Work around (bug in customize?), see + ;; <news:v9is48jrj1.fsf@marauder.physik.uni-ulm.de> + ("Antibes" "Bergen" "Berkeley" "Berlin" "Boadilla" "Copenhagen" + "Darmstadt" "Dresden" "Frankfurt" "Goettingen" "Hannover" + "Ilmenau" "JuanLesPins" "Luebeck" "Madrid" "Malmoe" "Marburg" + "Montpellier" "PaloAlto" "Pittsburgh" "Rochester" "Singapore" + "Szeged" "Warsaw") + (set :inline t + (const "Antibes") + (const "Bergen") + (const "Berkeley") + (const "Berlin") + (const "Boadilla") + (const "Copenhagen") + (const "Darmstadt") + (const "Dresden") + (const "Frankfurt") + (const "Goettingen") + (const "Hannover") + (const "Ilmenau") + (const "JuanLesPins") + (const "Luebeck") + (const "Madrid") + (const "Malmoe") + (const "Marburg") + (const "Montpellier") + (const "PaloAlto") + (const "Pittsburgh") + (const "Rochester") + (const "Singapore") + (const "Szeged") + (const "Warsaw")) + (repeat :inline t + :tag "Other" + (string))))) + +(defcustom LaTeX-beamer-inner-themes 'local + "Presentation inner themes for the LaTeX beamer package. +It can be a list of themes or a function. If it is the symbol +`local', search only once per buffer." + :type '(choice + (const :tag "TeX search" LaTeX-beamer-search-inner-themes) + (const :tag "Search once per buffer" local) + (function :tag "Other function") + (list + :value ("circles" "default" "inmargin" "rectangles" "rounded") + (set :inline t + (const "circles") + (const "default") + (const "inmargin") + (const "rectangles") + (const "rounded")) + (repeat :inline t + :tag "Other" + (string))))) + +(defcustom LaTeX-beamer-outer-themes 'local + "Presentation outer themes for the LaTeX beamer package. +It can be a list of themes or a function. If it is the symbol +`local', search only once per buffer." + :type + '(choice + (const :tag "TeX search" LaTeX-beamer-search-outer-themes) + (const :tag "Search once per buffer" local) + (function :tag "Other function") + (list + :value + ("default" "infolines" "miniframes" "shadow" "sidebar" "smoothbars" + "smoothtree" "split" "tree") + (set :inline t + (const "default") + (const "infolines") + (const "miniframes") + (const "shadow") + (const "sidebar") + (const "smoothbars") + (const "smoothtree") + (const "split") + (const "tree")) + (repeat :inline t + :tag "Other" + (string))))) + +(defcustom LaTeX-beamer-color-themes 'local + "Presentation color themes for the LaTeX beamer package. +It can be a list of themes or a function. If it is the symbol +`local', search only once per buffer." + :type + '(choice + (const :tag "TeX search" LaTeX-beamer-search-color-themes) + (const :tag "Search once per buffer" local) + (function :tag "Other function") + (list + :value + ("albatross" "beetle" "crane" "default" "dolphin" "dove" "fly" "lily" + "orchid" "rose" "seagull" "seahorse" "sidebartab" "structure" "whale") + (set :inline t + (const "albatross") + (const "beetle") + (const "crane") + (const "default") + (const "dolphin") + (const "dove") + (const "fly") + (const "lily") + (const "orchid") + (const "rose") + (const "seagull") + (const "seahorse") + (const "sidebartab") + (const "structure") + (const "whale")) + (repeat :inline t + :tag "Other" + (string))))) + +(defcustom LaTeX-beamer-font-themes 'local + "Presentation font themes for the LaTeX beamer package. +It can be a list of themes or a function. If it is the symbol +`local', search only once per buffer." + :type + '(choice + (const :tag "TeX search" LaTeX-beamer-search-font-themes) + (const :tag "Search once per buffer" local) + (function :tag "Other function") + (list + :value + ("default" "professionalfonts" "serif" "structurebold" + "structureitalicserif" "structuresmallcapsserif") + (set :inline t + (const "default") + (const "professionalfonts") + (const "serif") + (const "structurebold") + (const "structureitalicserif") + (const "structuresmallcapsserif")) + (repeat :inline t + :tag "Other" + (string))))) + +;; style/biblatex.el + +(defvar LaTeX-biblatex-use-Biber t + "Whether to use Biber with biblatex. + +This variable is intended to be used as a file local variable to +override the autodetection of the biblatex backend.") +(make-variable-buffer-local 'LaTeX-biblatex-use-Biber) +(put 'LaTeX-biblatex-use-Biber 'safe-local-variable #'booleanp) + +;; style/comment.el + +(defcustom LaTeX-comment-env-list '("comment") + "List of environment names defined with comment.sty. +Setting this variable does not take effect unless you +reinitialize affected buffers." + :type '(repeat string)) + +;; style/csquotes.el + +(defcustom LaTeX-csquotes-quote-after-quote nil + "Initial value of `TeX-quote-after-quote' for `csquotes.el'." + :type 'boolean) + +(defcustom LaTeX-csquotes-open-quote "" + "Opening quotation mark to be used with the csquotes package. +The specified string will be used for `TeX-open-quote' (and override +any language-specific setting) only if both `LaTeX-csquotes-open-quote' +and `LaTeX-csquotes-close-quote' are non-empty strings." + :type 'string) + +(defcustom LaTeX-csquotes-close-quote "" + "Closing quotation mark to be used with the csquotes package. +The specified string will be used for `TeX-close-quote' (and override +any language-specific setting) only if both `LaTeX-csquotes-open-quote' +and `LaTeX-csquotes-close-quote' are non-empty strings." + :type 'string) + +;; style/emp.el + +(defcustom LaTeX-write18-enabled-p t + "If non-nil, insert automatically the \\write18 calling metapost. +When disabled, you have to use mpost on the mp files automatically +produced by emp.sty and then re-LaTeX the document." + :type 'boolean) + +;; style/exam.el + +(defcustom LaTeX-exam-reftex-quick-id-key ?x + "Unique letter identifying exam class macros in RefTeX. + +A character argument for quick identification when RefTeX inserts +new references with `reftex-reference'. It must be unique. It +is initialized to ?x." + :type 'character) + +(defcustom LaTeX-exam-label "exm:" + "Default prefix to labels in environments of exam class." + :type 'string) + +;; style/fontspec.el + +(defcustom LaTeX-fontspec-arg-font-search t + "If `LaTeX-fontspec-arg-font' should search for fonts. +If the value is t, fonts are retrieved automatically and provided +for completion. If the value is nil, +`LaTeX-fontspec-font-list-default' is used for completion. If +the value is `ask', you are asked for the method to use every +time `LaTeX-fontspec-arg-font' is called. + +`LaTeX-fontspec-arg-font' calls `luaotf-load --list=basename' to +automatically get the list of fonts. This requires +`luaotfload-tool' version 2.3 or higher in order to work." + :type '(choice + (const :tag "Search automatically" t) + (const :tag "Use default font list" nil) + (const :tag "Ask what to do" ask))) + +(defcustom LaTeX-fontspec-font-list-default nil + "List of default fonts to be used as completion for +`LaTeX-fontspec-arg-font'." + :type '(repeat (string :tag "Font"))) + +;; style/graphicx.el + +(defcustom LaTeX-includegraphics-extensions + '("eps" "jpe?g" "pdf" "png") + "Extensions for images files used by \\includegraphics." + :type '(list (set :inline t + (const "eps") + (const "jpe?g") + (const "pdf") + (const "png")) + (repeat :inline t + :tag "Other" + (string)))) + +(defcustom LaTeX-includegraphics-strip-extension-flag t + "Non-nil means to strip known extensions from image file name." + :type 'boolean) + +(defcustom LaTeX-includegraphics-read-file + 'LaTeX-includegraphics-read-file-TeX + "Function for reading \\includegraphics files. + +`LaTeX-includegraphics-read-file-TeX' lists all graphic files +found in the TeX search path. + +`LaTeX-includegraphics-read-file-relative' lists all graphic files +in the master directory and its subdirectories and inserts the +relative file name. + +The custom option `simple' works as +`LaTeX-includegraphics-read-file-relative' but it lists all kind of +files. + +Inserting the subdirectory in the filename (as +`LaTeX-includegraphics-read-file-relative') is discouraged by +`epslatex.ps'." + ;; ,----[ epslatex.ps; Section 12; (page 26) ] + ;; | Instead of embedding the subdirectory in the filename, there are two + ;; | other options + ;; | 1. The best method is to modify the TeX search path [...] + ;; | 2. Another method is to specify sub/ in a \graphicspath command + ;; | [...]. However this is much less efficient than modifying the + ;; | TeX search path + ;; `---- + ;; See "Inefficiency" and "Unportability" in the same section for more + ;; information. + :type '(choice (const :tag "TeX" LaTeX-includegraphics-read-file-TeX) + (const :tag "relative" + LaTeX-includegraphics-read-file-relative) + (const :tag "simple" (lambda () + (file-relative-name + (read-file-name "Image file: ") + (TeX-master-directory)))) + (function :tag "other"))) + +;; style/revtex4-2.el + +(defcustom LaTeX-revtex4-2-video-label "vid:" + "Default prefix to labels in video environments of REVTeX4-2 class." + :group 'LaTeX-label + :type 'string) + +(defcustom LaTeX-revtex4-2-video-reftex-quick-id-key ?v + "Unique letter identifying \"video\" environment in RefTeX. + +A character argument for quick identification when RefTeX inserts +new references with `reftex-reference'. It must be unique. It +is initialized to ?v." + :type 'character) + +;; style/shortvrb.el + +(defcustom LaTeX-shortvrb-chars nil + "List of characters toggling verbatim mode. +When your document uses the shortvrb style and you have a +\\MakeShortVrb{\\|} in your file to write verbatim text as +|text|, then set this variable to the list (?|). Then AUCTeX +fontifies |text| as verbatim. + +Preferably, you should do this buffer-locally using a file +variable near the end of your document like so: + + %% Local Variables: + %% LaTeX-shortvrb-chars: (?|) + %% End: + +When you customize this variable to a non-nil value, then it +becomes the default value meaning that verbatim fontification is +always performed for the characters in the list, no matter if +your document actually defines shortvrb chars using +\\MakeShortVrb." + :type '(repeat character)) +(put 'LaTeX-shortvrb-chars 'safe-local-variable #'listp) + +;; style/splitidx.el + +(defcustom LaTeX-splitidx-sindex-reftex-quick-id-key ?s + "Unique letter identifying \"\\sindex\" macro in RefTeX. + +A character argument for quick identification of \"\\sindex\" +when RefTeX inserts new index entries with `reftex-index'. It +must be unique. It is initialized to ?s when added to +`reftex-index-macros'." + :type 'character) + +;; Don't look for file-local variables before this line, so that the +;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up. + + +(provide 'tex-style) + +;;; tex-style.el ends here diff --git a/elpa/auctex-13.1.3/tex-style.elc b/elpa/auctex-13.1.3/tex-style.elc Binary files differnew file mode 100644 index 0000000..9860351 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-style.elc diff --git a/elpa/auctex-13.1.3/tex-wizard.el b/elpa/auctex-13.1.3/tex-wizard.el new file mode 100644 index 0000000..1597e27 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-wizard.el @@ -0,0 +1,111 @@ +;;; tex-wizard.el --- Check the TeX configuration -*- lexical-binding: t; -*- + +;; Copyright (C) 2003-2021 Free Software Foundation, Inc. + +;; Author: David Kastrup <dak@gnu.org> +;; Keywords: tex, wp, convenience + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This checks through your TeX configuration. Call M-x TeX-wizard RET + +;;; Code: + +(defun TeX-wizard nil + (interactive) + (switch-to-buffer "*TeX wizard*") + (let ((wizwin (selected-window)) + (wizbuf (current-buffer))) + (set-visited-file-name nil) + (erase-buffer) + (if (featurep 'tex-site) + (insert-before-markers "AUCTeX is enabled. Good.\n") + (insert-before-markers "\ +It appears that AUCTeX is not enabled. AUCTeX is the main +major mode for editing TeX/LaTeX files.\n") + (condition-case nil + (info-other-window "(AUCTeX)") + (error (select-window wizwin) + (switch-to-buffer wizbuf) + (insert-before-markers "(I am unable to find AUCTeX's info file.)\n"))) + (if (prog1 (y-or-n-p "Should I try enabling AUCTeX now? ") + (select-window wizwin) + (switch-to-buffer wizbuf)) + (condition-case nil + (require 'tex-site) + (error (insert-before-markers "AUCTeX appears not to be installed.\n"))) + (insert-before-markers "AUCTeX installation imprudently skipped.\n")) + (when (featurep 'tex-site) + (when (prog1 (yes-or-no-p (format "Also enable AUCTeX in `%s'" user-init-file)) + (select-window wizwin) + (switch-to-buffer wizbuf)) + (write-region "\ +;;; Enable AUCTeX +\(require 'tex-site)\n" nil user-init-file t)))) + (if (memq 'turn-on-reftex + (if (featurep 'tex-site) + (and (boundp 'LaTeX-mode-hook) LaTeX-mode-hook) + (and (boundp 'latex-mode-hook) latex-mode-hook))) + (insert-before-markers "RefTeX is enabled. Good.\n") + (insert-before-markers "\ +It appears that RefTeX is not enabled. RefTeX is a mode +that will greatly facilitate the management of labels +and bibliographics references.\n") + (condition-case nil + (info-other-window "(RefTeX)") + (error (select-window wizwin) + (switch-to-buffer wizbuf) + (insert-before-markers + "(I am unable to find RefTeX's info file.)\n"))) + (when (prog1 (yes-or-no-p + (format "Enable RefTeX in `%s'" user-init-file)) + (select-window wizwin) + (switch-to-buffer wizbuf)) + (add-hook 'LaTeX-mode-hook #'turn-on-reftex) + (add-hook 'latex-mode-hook #'turn-on-reftex) + (condition-case nil + (write-region "\ +;;; Enable RefTeX +\(add-hook 'LaTeX-mode-hook #'turn-on-reftex) +\(add-hook 'latex-mode-hook #'turn-on-reftex) +" nil user-init-file t) + (error (insert-before-markers + (format "Unable to write to file `%s'\n" user-init-file)))))) + (when (and (featurep 'tex-site) + (boundp 'LaTeX-mode-hook) + (memq #'turn-on-reftex LaTeX-mode-hook)) + (if (and (boundp 'reftex-plug-into-AUCTeX) + reftex-plug-into-AUCTeX) + (insert-before-markers + "RefTeX appears to be configured for use with AUCTeX.\n") + (require 'reftex) + (insert-before-markers "\ +It appears that RefTeX is not configured to cooperate with +AUCTeX. Please configure it using the menus, save for future +sessions, then press the finish button.") + (customize-variable-other-window 'reftex-plug-into-AUCTeX) + (set (make-local-variable 'custom-buffer-done-kill) t) + (add-hook 'kill-buffer-hook #'exit-recursive-edit nil t) + (recursive-edit) + (select-window wizwin) + (switch-to-buffer wizbuf)))) + (insert-before-markers "That's all!\n")) + + +(provide 'tex-wizard) +;;; tex-wizard.el ends here diff --git a/elpa/auctex-13.1.3/tex-wizard.elc b/elpa/auctex-13.1.3/tex-wizard.elc Binary files differnew file mode 100644 index 0000000..b415fa2 --- /dev/null +++ b/elpa/auctex-13.1.3/tex-wizard.elc diff --git a/elpa/auctex-13.1.3/tex.el b/elpa/auctex-13.1.3/tex.el new file mode 100644 index 0000000..747753b --- /dev/null +++ b/elpa/auctex-13.1.3/tex.el @@ -0,0 +1,10227 @@ +;;; tex.el --- Support for TeX documents. -*- lexical-binding: t; -*- + +;; Copyright (C) 1985-2022 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file provides basic functions used by the AUCTeX modes. + +;;; Code: + +(when (< emacs-major-version 25) + (error "AUCTeX requires Emacs 25.1 or later")) + +(require 'custom) +(require 'tex-site) +(eval-when-compile + (require 'cl-lib)) +(require 'texmathp) +;; Require dbus at compile time to get macro definition of +;; `dbus-ignore-errors'. +(eval-when-compile (require 'dbus)) + +;; Silence the compiler for functions: +(declare-function dbus-get-unique-name "ext:dbusbind.c" + (bus)) +(declare-function dbus-ping "ext:dbus" + (bus service &optional timeout)) +(declare-function dbus-introspect-get-method "ext:dbus" + (bus service path interface method)) +(declare-function dbus-call-method "ext:dbus" + (bus service path interface method &rest args)) +(declare-function dbus-register-signal "ext:dbus" + (bus service path interface signal handler &rest args)) +(declare-function LaTeX-environment-list "latex" + nil) +(declare-function LaTeX-bibliography-list "latex" + nil) +(declare-function comint-exec + (buffer name command startfile switches)) +(declare-function comint-mode + nil) +(declare-function tex--prettify-symbols-compose-p "ext:tex-mode" + (start end match)) +(declare-function gnuserv-start "ext:gnuserv" + (&optional leave-dead) t) + +;; Silence the compiler for variables: +;; tex.el: Variables defined somewhere in this file: +(defvar TeX-PDF-from-DVI) +(defvar TeX-PDF-mode) +(defvar TeX-PDF-mode-parsed) +(defvar TeX-all-extensions) +(defvar TeX-command-default) +(defvar TeX-default-extension) +(defvar TeX-esc) +(defvar TeX-interactive-mode) +(defvar TeX-macro-global) +(defvar TeX-mode-map) +(defvar TeX-mode-p) +(defvar TeX-output-extension) +(defvar TeX-source-correlate-mode) +(defvar TeX-source-specials-places) +(defvar TeX-source-specials-tex-flags) +(defvar TeX-synctex-tex-flags) +(defvar TeX-current-process-region-p) +(defvar TeX-region) +(defvar TeX-region-orig-buffer) +;; Variables defined in other AUCTeX libraries: +;; latex.el: +(defvar LaTeX-default-verb-delimiter) +(defvar LaTeX-optcl) +(defvar LaTeX-optop) +(defvar LaTeX-largest-level) +(defvar LaTeX-section-list) +(defvar TeX-output-dir) +;; tex-ispell.el +(defvar TeX-ispell-verb-delimiters) +;; Others: +(defvar tex--prettify-symbols-alist) ; tex-mode.el +(defvar Info-file-list-for-emacs) ; info.el +(defvar ispell-parser) ; ispell.el +(defvar compilation-error-regexp-alist) ; compile.el + +(defgroup TeX-file nil + "Files used by AUCTeX." + :group 'AUCTeX) + +(defgroup TeX-command nil + "Calling external commands from AUCTeX." + :group 'AUCTeX) + +(defgroup LaTeX nil + "LaTeX support in AUCTeX." + :tag "LaTeX" + :group 'AUCTeX + :prefix "LaTeX-") + +(defgroup TeX-misc nil + "Various AUCTeX settings." + :group 'AUCTeX) + +;;; Site Customization +;; +;; The following variables are likely to need to be changed for your +;; site. You should do this with customize. + +(defcustom TeX-command "tex" + "Command to run plain TeX." + :group 'TeX-command + :type 'string) + +(defcustom TeX-Omega-command "omega" + "Command to run plain TeX on Omega." + :group 'TeX-command + :type '(choice (const :tag "Aleph" "aleph") + (const :tag "Omega" "omega") + (string :tag "Other command"))) + +(defcustom LaTeX-command "latex" + "Command to run LaTeX." + :group 'TeX-command + :type 'string) + +(defcustom LaTeX-Omega-command "lambda" + "Command to run LaTeX on Omega." + :group 'TeX-command + :type '(choice (const :tag "Lamed" "lamed") + (const :tag "Lambda" "lambda") + (string :tag "Other command"))) + +(defcustom TeX-file-line-error t + "Whether to have TeX produce file:line:error style error messages." + :group 'TeX-command + :type 'boolean) + +(defcustom ConTeXt-engine nil + "Engine to use for --engine in the texexec command. +If nil, none is specified." + :group 'TeX-command + :type '(choice (const :tag "Unspecified" nil) + string)) + +(defcustom ConTeXt-Omega-engine TeX-Omega-command + "Engine to use for --engine in the texexec command in Omega mode. +If nil, none is specified." + :group 'TeX-command + :type '(choice (const :tag "Unspecified" nil) + string)) +;; At least in TeXLive 2009 ConTeXt does not support an omega option anymore. +(make-obsolete-variable 'ConTeXt-Omega-engine 'TeX-engine-alist "11.86") + +(defcustom TeX-mode-hook nil + "A hook run in TeX mode buffers." + :type 'hook + :group 'TeX-misc) + +;; This is the major configuration variable. Most sites will only need to +;; change the second string in each entry, which is the name of a command to +;; send to the shell. If you use other formatters like AMSLaTeX or AMSTeX, you +;; can add those to the list. See `TeX-expand-list' and +;; `TeX-expand-list-builtin' for a description of the % escapes + +(defcustom TeX-command-list + '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts) %S%(PDFout)%(mode)%' %(output-dir) %t" + TeX-run-TeX nil + (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX") + ("LaTeX" "%`%l%(mode)%' %T" + TeX-run-TeX nil + (latex-mode doctex-mode) :help "Run LaTeX") + ;; Not part of standard TeX. + ("Makeinfo" "makeinfo %(extraopts) %(o-dir) %t" TeX-run-compile nil + (texinfo-mode) :help "Run Makeinfo with Info output") + ("Makeinfo HTML" "makeinfo %(extraopts) %(o-dir) --html %t" TeX-run-compile nil + (texinfo-mode) :help "Run Makeinfo with HTML output") + ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %S%(mode)%' %(output-dir) %t" + TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") + ;; support for ConTeXt --pg + ;; first version of ConTeXt to support nonstopmode: 2003.2.10 + ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t" + TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") + ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t" + TeX-run-TeX nil + (context-mode) :help "Run ConTeXt until completion") + ("BibTeX" "bibtex %(O?aux)" TeX-run-BibTeX nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode + context-mode) + :help "Run BibTeX") + ("Biber" "biber %(output-dir) %s" TeX-run-Biber nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Run Biber") + ;; Not part of standard TeX. + ;; It seems that texindex doesn't support "--output-dir" option. + ("Texindex" "texindex %s.??" TeX-run-command nil + (texinfo-mode) :help "Run Texindex") + ;; TODO: + ;; 1. Supply "--dvipdf" option if `TeX-PDF-mode' and + ;; `TeX-PDF-from-DVI' are non-nil. + ;; 2. Supply "--build-dir=DIR" option when `TeX-output-dir' is + ;; non-nil. + ("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil + (texinfo-mode) :help "Run Texi2dvi or Texi2pdf") + ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") + ("Print" "%p" TeX-run-command t t :help "Print the file") + ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" + :visible TeX-queue-command) + ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Generate PostScript file") + ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Convert DVI file to PostScript") + ("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d" TeX-run-dvipdfmx nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Convert DVI file to PDF with dvipdfmx") + ("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Convert PostScript file to PDF") + ("Glossaries" "makeglossaries %(d-dir) %s" TeX-run-command nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Run makeglossaries to create glossary file") + ("Index" "makeindex %(O?idx)" TeX-run-index nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Run makeindex to create index file") + ("upMendex" "upmendex %(O?idx)" TeX-run-index t + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Run upmendex to create index file") + ("Xindy" "texindy %s" TeX-run-command nil + (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) + :help "Run xindy to create index file") + ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) + :help "Check LaTeX file for correctness") + ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) + :help "Check LaTeX file for common mistakes") + ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t + :help "Spell-check the document") + ("Clean" "TeX-clean" TeX-run-function nil t + :help "Delete generated intermediate files") + ("Clean All" "(TeX-clean t)" TeX-run-function nil t + :help "Delete generated intermediate and output files") + ("Other" "" TeX-run-command t t :help "Run an arbitrary command")) + "List of commands to execute on the current document. + +Each element is a list, whose first element is the name of the command +as it will be presented to the user. + +The second element is the string handed to the shell after being +expanded. The expansion is done using the information found in +`TeX-expand-list'. + +The third element is the function which actually start the process. +Several such hooks have been defined: + +TeX-run-command: Start up the process and show the output in a +separate buffer. Check that there is not two commands running for the +same file. Return the process object. + +TeX-run-format: As `TeX-run-command', but assume the output is created +by a TeX macro package. Return the process object. + +TeX-run-TeX: For TeX output. + +TeX-run-interactive: Run TeX or LaTeX interactively. + +TeX-run-BibTeX: For BibTeX output. + +TeX-run-Biber: For Biber output. + +TeX-run-compile: Use `compile' to run the process. + +TeX-run-shell: Use `shell-command' to run the process. + +TeX-run-discard: Start the process in the background, discarding its +output. + +TeX-run-background: Start the process in the background, show output +in other window. + +TeX-run-silent: Start the process in the background. + +TeX-run-discard-foreground: Start the process in the foreground, +discarding its output. + +TeX-run-function: Execute the Lisp function or function call +specified by the string in the second element. Consequently, +this hook does not start a process. + +TeX-run-discard-or-function: If the command is a Lisp function, +execute it as such, otherwise start the command as a process, +discarding its output. + +To create your own hook, define a function taking three arguments: The +name of the command, the command string, and the name of the file to +process. It might be useful to use `TeX-run-command' in order to +create an asynchronous process. + +If the fourth element is non-nil, the user will get a chance to +modify the expanded string. + +The fifth element indicates in which mode(s) the command should be +present in the Command menu. Use t if it should be active in any +mode. If it should only be present in some modes, specify a list with +the respective mode names. + +Any additional elements get just transferred to the respective menu entries." + :group 'TeX-command + :type '(repeat (group :value ("" "" TeX-run-command nil t) + (string :tag "Name") + (string :tag "Command") + (choice :tag "How" + :value TeX-run-command + (function-item TeX-run-command) + (function-item TeX-run-format) + (function-item TeX-run-TeX) + (function-item TeX-run-interactive) + (function-item TeX-run-BibTeX) + (function-item TeX-run-Biber) + (function-item TeX-run-compile) + (function-item TeX-run-shell) + (function-item TeX-run-discard) + (function-item TeX-run-background) + (function-item TeX-run-silent) + (function-item TeX-run-discard-foreground) + (function-item TeX-run-function) + (function-item TeX-run-discard-or-function) + (function :tag "Other")) + (boolean :tag "Prompt") + (choice :tag "Modes" + (const :tag "All" t) + (set (const :tag "Plain TeX" plain-tex-mode) + (const :tag "LaTeX" latex-mode) + (const :tag "DocTeX" doctex-mode) + (const :tag "ConTeXt" context-mode) + (const :tag "Texinfo" texinfo-mode) + (const :tag "AmSTeX" ams-tex-mode))) + (repeat :tag "Menu elements" :inline t sexp)))) + +(defcustom TeX-command-output-list + '( + ; Add the following line if you want to use htlatex (tex4ht) + ; ("\\`htlatex" ("html")) + ) + "List of regexps and file extensions. + +Each element is a list, whose first element is a regular expression to +match against the name of the command that will be used to process the TeX +file. + +The second element is either a string or a list with a string as element. +If it is a string this is the default file extension that will be expected +for output files that are produced by commands that match the first +element. The real file extension will be obtained from the logging output +if possible, defaulting to the given string. +If it is a list, the element of the list will be the fixed extension used +without looking at the logging output. + +If this list does not yield an extension, the default is either \"dvi\" +or \"pdf\", depending on the setting of `TeX-PDF-mode'. +Extensions must be given without the \".\"." + + :group 'TeX-command + :type '(repeat (group (regexp :tag "Command Regexp") + (choice (string :tag "Default Extension") + (group (string :tag "Fixed Extension")))))) + +;; You may want to change the default LaTeX version for your site. +(defcustom LaTeX-version "2e" + "Default LaTeX version. Currently recognized is \"2\" and \"2e\"." + :group 'LaTeX + :type '(radio (const :format "%v\n%h" + :doc "\ +The executable `latex' is LaTeX version 2." + "2") + (const :format "%v\n%h" + :doc "\ +The executable `latex' is LaTeX version 2e." + "2e") + (string :tag "Other"))) + + +;; Use different compilation commands depending on style. +;; Only works if parsing is enabled. + +(defcustom LaTeX-command-style + ;; They have all been combined in LaTeX 2e. + '(("" "%(PDF)%(latex) %(file-line-error) %(extraopts) %(output-dir) %S%(PDFout)")) +"List of style options and LaTeX commands. + +If the first element (a regular expression) matches the name of one of +the style files, any occurrence of the string `%l' in a command in +`TeX-command-list' will be replaced with the second element. The first +match is used, if no match is found the `%l' is replaced with the empty +string." + :group 'TeX-command + :type '(repeat (group :value ("" "") + regexp (string :tag "Style")))) + +;; Printing: If you want to print, TeX-print-command must be non-nil +;; (if it is nil, you'll get a complaint when using the print menu). +;; If you want to view the queue, TeX-queue-command needs to be +;; non-nil (if it is nil, it won't get mentioned in the menu). If +;; TeX-printer-list is nil, nothing else gets asked: the menu entries +;; lead directly to the respective commands. If those commands +;; contain %p, the value of TeX-printer-default gets inserted there, +;; no questions asked. Now if TeX-printer-list is non-nil, you'll +;; always get asked which printer you want to use. You can enter a +;; configured printer from TeX-printer-list, or an unknown one. The +;; respective menus will show all configured printers. Since you can +;; enter unknown printers, the printer name _must_ be set with %p in +;; TeX-print-command. + +(defcustom TeX-print-command + "{ test -e %d && %(o?)dvips -P%p %r %s; } || lpr -P%p %o" + "Command used to print a file. + +First `%p' is expanded to the printer name, then ordinary expansion is +performed as specified in `TeX-expand-list'. If it is nil, +then customization is requested." + :group 'TeX-command + :type '(choice (string :tag "Print command") + (const :tag "No print command customized" nil))) + +(defcustom TeX-queue-command "lpq -P%p" + "Command used to show the status of a printer queue. + +First `%p' is expanded to the printer name, then ordinary expansion is +performed as specified in `TeX-expand-list'. If this is nil, +the printer has no corresponding command." + :group 'TeX-command + :type '(choice (string :tag "Queue check command") + (const :tag "No such command" nil))) + +;; Enter the names of the printers available at your site, or nil if +;; you only have one printer. + +(defcustom TeX-printer-list + '(("Default" + ;; Print to the (unnamed) default printer. If there is a DVI + ;; file print via Dvips. If not, pass the output file (which + ;; should then be a Postscript or PDF file) directly to lpr. + "{ test -e %d && %(o?)dvips -f %r %s | lpr; } || lpr %o" + ;; Show the queue for the (unnamed) default printer. + "lpq")) + "List of available printers. + +The first element of each entry is the printer name. + +The second element is the command used to print to this +printer. It defaults to the value of `TeX-print-command' when nil. + +The third element is the command used to examine the print queue for +this printer. It defaults to the value of `TeX-queue-command' similarly. + +Any occurrence of `%p' in the second or third element is expanded to +the printer name given in the first element, then ordinary expansion +is performed as specified in `TeX-expand-list'. + +If this list is empty, only `TeX-print-command' and `TeX-queue-command' +get consulted." + :group 'TeX-command + :type '(repeat (group (string :tag "Name") + (option (group :inline t + :extra-offset -4 + (choice :tag "Print" + (const :tag "default") + (string :format "%v")) + (option (choice :tag "Queue" + (const :tag "default") + (string + :format "%v")))))))) + +;; The name of the most used printer. + +(defcustom TeX-printer-default (or (getenv "PRINTER") + (and TeX-printer-list + (car (car TeX-printer-list))) + "lp") + "Default printer to use with `TeX-command'." + :group 'TeX-command + :type 'string) + +(defcustom TeX-print-style '(("^landscape$" "-t landscape")) + "List of style options and print options. + +If the first element (a regular expression) matches the name of one of +the style files, any occurrence of the string `%r' in a command in +`TeX-command-list' will be replaced with the second element. The first +match is used, if no match is found the `%r' is replaced with the empty +string." + :group 'TeX-command + :type '(repeat (group regexp (string :tag "Command")))) + +(defcustom TeX-command-extra-options "" + "String with the extra options to be given to the TeX processor." + :type 'string) +(make-variable-buffer-local 'TeX-command-extra-options) + +(defvar TeX-command-text nil + "Dynamically bound by `TeX-command-expand'.") +(defvar TeX-command-pos nil + "Dynamically bound by `TeX-command-expand'.") +(defvar TeX-expand-pos nil + "Dynamically bound by `TeX-command-expand'.") +(defvar TeX-expand-command nil + "Dynamically bound by `TeX-command-expand'.") + +;; This is the list of expansion for the commands in +;; TeX-command-list. Not likely to be changed, but you may e.g. want +;; to handle .ps files. + +(defvar TeX-expand-list-builtin + '(("%q" (lambda () + (TeX-printer-query t))) + ("%V" (lambda () + (TeX-source-correlate-start-server-maybe) + (TeX-view-command-raw))) + ("%r" (lambda () + (TeX-style-check TeX-print-style))) + ("%l" (lambda () + (TeX-style-check LaTeX-command-style))) + ("%(PDF)" (lambda () + (if (and (eq TeX-engine 'default) + (if TeX-PDF-mode + (not (TeX-PDF-from-DVI)) + TeX-DVI-via-PDFTeX)) + "pdf" + ""))) + ("%(PDFout)" (lambda () + (cond ((eq major-mode 'ams-tex-mode) + (if TeX-PDF-mode + " -output-format=pdf" + " -output-format=dvi")) + ((and (eq TeX-engine 'xetex) + (not TeX-PDF-mode)) + " -no-pdf") + ((and (eq TeX-engine 'luatex) + (not TeX-PDF-mode)) + " --output-format=dvi") + ((and (eq TeX-engine 'default) + (not TeX-PDF-mode) + TeX-DVI-via-PDFTeX) + " \"\\pdfoutput=0 \"") + (t "")))) + ("%(mode)" (lambda () + (if TeX-interactive-mode + "" + " -interaction=nonstopmode"))) + ("%(file-line-error)" + (lambda () (if TeX-file-line-error " -file-line-error" ""))) + ("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" ""))) + ("%(tex)" (lambda () (eval (nth 2 (TeX-engine-in-engine-alist TeX-engine))))) + ("%(latex)" (lambda () (eval (nth 3 (TeX-engine-in-engine-alist TeX-engine))))) + ("%(cntxcom)" ConTeXt-expand-command) + ("%(execopts)" ConTeXt-expand-options) + ("%(extraopts)" (lambda () TeX-command-extra-options)) + ("%(output-dir)" TeX--output-dir-arg "--output-directory=") + ("%(o-dir)" TeX--output-dir-arg "-o ") + ("%(d-dir)" TeX--output-dir-arg "-d ") + ("%S" TeX-source-correlate-expand-options) + ("%dS" TeX-source-specials-view-expand-options) + ("%cS" TeX-source-specials-view-expand-client) + ("%(outpage)" (lambda () + ;; When `TeX-source-correlate-output-page-function' is nil + ;; and we are using synctex, fallback on + ;; `TeX-synctex-output-page'. + (and TeX-source-correlate-mode + (null TeX-source-correlate-output-page-function) + (eq (TeX-source-correlate-method-active) 'synctex) + (setq TeX-source-correlate-output-page-function + #'TeX-synctex-output-page)) + (or (if TeX-source-correlate-output-page-function + (funcall TeX-source-correlate-output-page-function)) + "1"))) + ;; `TeX-active-master-with-quotes' calls either `TeX-master-file' + ;; or `TeX-region-file' returning the master or region file, and + ;; adds suitable quotes for use in shell command line. + ("%s" TeX-active-master-with-quotes nil t) + ("%t" TeX-active-master-with-quotes t t) + ("%(t-filename-only)" TeX-active-master-with-quotes t t nil nil file-name-nondirectory) + ;; If any TeX codes appear in the interval between %` and %', move + ;; all of them after the interval and supplement " \input". The + ;; appearance is marked by leaving the bind to `TeX-command-text' + ;; with the TeX codes. + ;; Rule: + ;; 1. %` and %' must appear in pair. + ;; 2. %` and %' must not appear more than once in one command + ;; line string (including the results of %-expansion). + ;; 3. Each TeX codes between %` and %' must be enclosed in + ;; double quotes and preceded by a space. + ("%`" (lambda nil + (setq TeX-command-pos t TeX-command-text nil) + "")) + (" \"\\" (lambda nil + (if (eq TeX-command-pos t) + (setq TeX-command-pos TeX-expand-pos + TeX-expand-pos (+ 3 TeX-expand-pos)) + (setq TeX-expand-pos (1+ TeX-expand-pos))))) + ("\"" (lambda nil (if (numberp TeX-command-pos) + (setq TeX-command-text + (concat + TeX-command-text + (substring TeX-expand-command + TeX-command-pos + (1+ TeX-expand-pos))) + TeX-expand-command + (concat + (substring TeX-expand-command + 0 + TeX-command-pos) + (substring TeX-expand-command + (1+ TeX-expand-pos))) + TeX-expand-pos TeX-command-pos + TeX-command-pos t) + (setq TeX-expand-pos (1+ TeX-expand-pos))))) + ("%'" (lambda nil + (setq TeX-command-pos nil) + (if (stringp TeX-command-text) + (progn + (setq TeX-expand-pos (+ TeX-expand-pos (length TeX-command-text) 9)) + (concat TeX-command-text " \"\\input\"")) + ""))) + ;; The fourth argument of t directs to supply "\detokenize{}" when + ;; necessary. See doc string and comment of + ;; `TeX-active-master-with-quotes'. + ("%T" TeX-active-master-with-quotes t t nil t) + ("%n" TeX-current-line) + ("%d" TeX-active-master-with-quotes "dvi" t) + ("%f" TeX-active-master-with-quotes "ps" t) + ("%(O?aux)" TeX-active-master-with-quotes "aux" t) + ("%(O?idx)" TeX-active-master-with-quotes "idx" t) + ("%(O?pdf)" TeX-active-master-with-quotes "pdf" t) + ("%o" (lambda nil (TeX-active-master-with-quotes (TeX-output-extension) t))) + ;; for source specials the file name generated for the xdvi + ;; command needs to be relative to the master file, just in + ;; case the file is in a different subdirectory + ("%b" TeX-current-file-name-master-relative) + ;; Okular forward PDF search requires absolute path. + ("%a" (lambda nil (prin1-to-string (expand-file-name (buffer-file-name))))) + ;; the following is for preview-latex. + ("%m" preview-create-subdirectory)) + "List of built-in expansion strings for TeX command names. + +This should not be changed by the user who can use +`TeX-expand-list' variable. The latter variable also contains a +description of the data format. + +Programs should not use these variables directly but the function +`TeX-expand-list'.") + +(defcustom TeX-expand-list nil + "List of expansion strings for TeX command names defined by the user. + +Each entry is a list with two or more elements. The first +element is the string to be expanded. The second element is the +name of a function returning the expanded string when called with +the remaining elements as arguments. +The second element can also be a variable name whose value is +such function. + +Built-in expansions provided in `TeX-expand-list-builtin' can be +overwritten by defining expansions strings with the same +expander. Only \"%p\" expander cannot be overwritten. + +Programs should not use these variables directly but the function +`TeX-expand-list'." + :group 'TeX-command + :type '(repeat (group (string :tag "Key") + (sexp :tag "Expander") + (repeat :inline t + :tag "Arguments" + (sexp :format "%v"))))) + +(defun TeX-expand-list () + "Complete list of expansion strings for TeX command names. + +Concatenate `TeX-expand-list' and `TeX-expand-list-builtin' making +sure \"%p\" is the first entry." + (append + ;; %p must be the first entry, see `TeX-print-command'. + '(("%p" TeX-printer-query)) + TeX-expand-list + TeX-expand-list-builtin)) + +;; This variable used to be defined in tex-buf.el. It is used in +;; `TeX-mode-specific-command-menu-entries' in this file. It is now +;; (June 2021) moved into this file to avoid `void-variable' errors +;; with the "Command" menu if tex-buf.el is not loaded yet for reasons +;; mentioned above. +(defcustom TeX-parse-all-errors t + "Whether to automatically collect all warning and errors after running TeX. + +If t, it makes it possible to use `TeX-previous-error' with TeX +commands." + :group 'TeX-command + :type 'boolean) + +;;; Portability. + +(defmacro TeX--if-macro-fboundp (name then &rest else) + "Execute THEN if macro NAME is bound and ELSE otherwise. +Essentially, + + (TeX--if-macro-fboundp name then else...) + +is equivalent to + + (if (fboundp \\='name) then else...) + +but takes care of byte-compilation issues where the byte-code for +the latter could signal an error if it has been compiled with +emacs 24.1 and is then later run by emacs 24.5." + (declare (indent 2) (debug (symbolp form &rest form))) + (if (fboundp name) ;If macro exists at compile-time, just use it. + then + `(if (fboundp ',name) ;Else, check if it exists at run-time. + (eval ',then) ;If it does, then run the then code. + ,@else))) ;Otherwise, run the else code. + +(require 'easymenu) + +;;; Documentation for Info-goto-emacs-command-node and similar + +(eval-after-load 'info '(dolist (elt '("TeX" "LaTeX" "ConTeXt" "Texinfo" + "docTeX")) + (add-to-list 'Info-file-list-for-emacs + (cons elt "AUCTeX")))) + +(advice-add 'hack-one-local-variable :after #'TeX--call-minor-mode) +(defun TeX--call-minor-mode (var val &rest _) + "Call minor mode function if minor mode variable is found." + ;; Instead of checking for each mode explicitly `minor-mode-list' + ;; could be used. But this may make the byte compiler pop up. + (when (memq var '(TeX-PDF-mode + TeX-source-correlate-mode TeX-interactive-mode + TeX-fold-mode LaTeX-math-mode)) + (funcall var (if (symbol-value val) 1 0)))) + +(defvar TeX-overlay-priority-step 16 + "Numerical difference of priorities between nested overlays. +The step should be big enough to allow setting a priority for new +overlays between two existing ones.") + +;; require crm here, because we often do +;; +;; (let ((crm-separator ",")) +;; (TeX-completing-read-multiple ...)) +;; +;; which results in a void-variable error if crm hasn't been loaded before. +(require 'crm) + +(if (or (and (= emacs-major-version 24) (>= emacs-minor-version 4)) + (>= emacs-major-version 25)) + ;; For GNU Emacs 24.4 or later, based on `completing-read-multiple' of + ;; git commit b14abca9476cba2f500b5eda89441d593dd0f12b + ;; 2013-01-10 * lisp/emacs-lisp/crm.el: Allow any regexp for separators. + (defun TeX-completing-read-multiple + (prompt table &optional predicate require-match initial-input + hist def inherit-input-method) + "Like `completing-read-multiple' which see. +Retain zero-length substrings but ensure that empty input results +in nil across different emacs versions." + (unwind-protect + (progn + (add-hook 'choose-completion-string-functions + #'crm--choose-completion-string) + (let* ((minibuffer-completion-table #'crm--collection-fn) + (minibuffer-completion-predicate predicate) + ;; see completing_read in src/minibuf.c + (minibuffer-completion-confirm + (unless (eq require-match t) require-match)) + (crm-completion-table table) + (map (if require-match + crm-local-must-match-map + crm-local-completion-map)) + ;; If the user enters empty input, `read-from-minibuffer' + ;; returns the empty string, not DEF. + (input (read-from-minibuffer + prompt initial-input map + nil hist def inherit-input-method)) + result) + (and def (string-equal input "") (setq input def)) + (if (equal (setq result (split-string input crm-separator)) + '("")) + nil + result))) + (remove-hook 'choose-completion-string-functions + #'crm--choose-completion-string))) + ;; For GNU Emacs <= 24.3. + (defun TeX-completing-read-multiple + (prompt table &optional predicate require-match initial-input + hist def inherit-input-method) + "Like `completing-read-multiple' which see. +Ensures that empty input results in nil across different emacs versions." + (let ((result (completing-read-multiple prompt table predicate + require-match initial-input + hist def inherit-input-method))) + (if (equal result '("")) nil result)))) + +(defun TeX-read-string (prompt &optional initial-input history default-value) + (read-string prompt initial-input history default-value t)) + +(defun TeX-active-mark () + (and transient-mark-mode mark-active)) + +(defun TeX-activate-region () + (setq deactivate-mark nil) + (activate-mark)) + +(defun TeX-overlay-prioritize (start end) + "Calculate a priority for an overlay extending from START to END. +The calculated priority is lower than the minimum of priorities +of surrounding overlays and higher than the maximum of enclosed +overlays." + (let (outer-priority inner-priority ov-priority) + (dolist (ov (overlays-in start end)) + (when (or (eq (overlay-get ov 'category) 'TeX-fold) + (overlay-get ov 'preview-state)) + (setq ov-priority (overlay-get ov 'priority)) + (if (>= (overlay-start ov) start) + (setq inner-priority (max ov-priority (or inner-priority + ov-priority))) + (setq outer-priority (min ov-priority (or outer-priority + ov-priority)))))) + (cond ((and inner-priority (not outer-priority)) + (+ inner-priority TeX-overlay-priority-step)) + ((and (not inner-priority) outer-priority) + (/ outer-priority 2)) + ((and inner-priority outer-priority) + (+ (/ (- outer-priority inner-priority) 2) inner-priority)) + (t TeX-overlay-priority-step)))) + +(defun TeX-delete-dups-by-car (alist &optional keep-list) + "Return a list of all elements in ALIST, but each car only once. +Elements of KEEP-LIST are not removed even if duplicate." + ;; Copy of `reftex-uniquify-by-car' (written by David Kastrup). + (setq keep-list (TeX-sort-strings keep-list)) + (setq alist (sort (copy-sequence alist) + #'TeX-car-string-lessp)) + (let ((new alist) elt) + (while (cdr new) + (setq elt (caar new)) + (while (and keep-list (string< (car keep-list) elt)) + (setq keep-list (cdr keep-list))) + (unless (and keep-list (string= elt (car keep-list))) + (while (string= elt (car (cadr new))) + (setcdr new (cddr new)))) + (setq new (cdr new)))) + alist) + +(defun TeX-delete-duplicate-strings (list) + "Return a list of all strings in LIST, but each only once." + (setq list (TeX-sort-strings list)) + (let ((new list) elt) + (while (cdr new) + (setq elt (car new)) + (while (string= elt (cadr new)) + (setcdr new (cddr new))) + (setq new (cdr new)))) + list) + +(defun TeX-sort-strings (list) + "Return sorted list of all strings in LIST." + (sort (copy-sequence list) #'string<)) + +(defun TeX-car-string-lessp (s1 s2) + "Compare the cars of S1 and S2 in lexicographic order. +Return t if first is less than second in lexicographic order." + (string-lessp (car s1) (car s2))) + +;;; Buffer + +(defgroup TeX-output nil + "Parsing TeX output." + :prefix "TeX-" + :group 'AUCTeX) + +(defcustom TeX-display-help t + "Control type of help display when stepping through errors with \\[TeX-next-error]. +If t display help buffer. If nil display message about error in +echo area. If `expert' display output buffer with raw processor output." + :group 'TeX-output + :type '(choice (const :tag "Help buffer" t) + (const :tag "Echo area" nil) + (const :tag "Output buffer" expert))) + +(defcustom TeX-debug-bad-boxes nil + "Non-nil means also find overfull/underfull box warnings with \\[TeX-next-error]." + :group 'TeX-output + :type 'boolean) + +(defcustom TeX-debug-warnings nil + "Non-nil means also find LaTeX or package warnings with \\[TeX-next-error]." + :group 'TeX-output + :type 'boolean) + +(defcustom TeX-ignore-warnings nil + "Controls which warnings are to be ignored. + +It can be either a regexp matching warnings to be ignored, or a +symbol with the name of a custom function taking as arguments all +the information of the warning listed in `TeX-error-list', except +the last one about whether to ignore the warning. + +If you want to use the custom function, see how it is used in the +code of `TeX-warning'." + :group 'TeX-command + :type '(choice (const :tag "Do not ignore anything" nil) + (string :tag "Regexp") + (symbol :tag "Function name"))) + +(defcustom TeX-suppress-ignored-warnings nil + "Whether to actually show ignored warnings. + +Note that `TeX-debug-warnings' always takes the precedence." + :group 'TeX-command + :type 'boolean) + +(defun TeX-toggle-debug-bad-boxes () + "Toggle if the debugger should display \"bad boxes\" too." + (interactive) + (setq TeX-debug-bad-boxes (not TeX-debug-bad-boxes)) + (message (concat "TeX-debug-bad-boxes: " + (if TeX-debug-bad-boxes "on" "off")))) + +(defun TeX-toggle-debug-warnings () + "Toggle if the debugger should display warnings too." + (interactive) + (setq TeX-debug-warnings (not TeX-debug-warnings)) + (message (concat "TeX-debug-warnings: " + (if TeX-debug-warnings "on" "off")))) + +(defun TeX-toggle-suppress-ignored-warnings () + "Toggle if the debugger should display ignored warnings too. + +See `TeX-suppress-ignored-warnings' and `TeX-ignore-warnings' for +more details." + (interactive) + (setq TeX-suppress-ignored-warnings (not TeX-suppress-ignored-warnings)) + (message (concat "TeX-suppress-ignored-warnings: " + (if TeX-suppress-ignored-warnings "on" "off")))) + +;;; Mode names. + +(defvar TeX-base-mode-name nil + "Base name of mode.") +(make-variable-buffer-local 'TeX-base-mode-name) + +(defun TeX-set-mode-name (&optional changed local reset) + "Build and set the mode name. +The base mode name will be concatenated with indicators for +helper modes where appropriate. + +If CHANGED is non-nil, it indicates which global mode +may have changed so that all corresponding buffers +without a local value might get their name updated. +A value of t will thus update all buffer names. + +If LOCAL is non-nil and CHANGED is buffer-local, only +a local change has been performed and only the local +name is to be updated. + +If RESET is non-nil, `TeX-command-next' is reset to +`TeX-command-default' in updated buffers." + (if (and changed + (not (and local (local-variable-p changed (current-buffer))))) + (dolist (buffer (buffer-list)) + (and (local-variable-p 'TeX-mode-p buffer) + (not (local-variable-p changed buffer)) + (with-current-buffer buffer (TeX-set-mode-name nil nil reset)))) + (if TeX-mode-p + (let ((trailing-flags + (concat + (and (boundp 'TeX-fold-mode) TeX-fold-mode "F") + (and (boundp 'LaTeX-math-mode) LaTeX-math-mode "M") + (and TeX-PDF-mode "P") + (and TeX-interactive-mode "I") + (and TeX-source-correlate-mode "S")))) + (setq mode-name (concat TeX-base-mode-name + (when (> (length trailing-flags) 0) + (concat "/" trailing-flags)))) + (when reset + (TeX-process-set-variable (TeX-master-file) + 'TeX-command-next TeX-command-default) + (TeX-process-set-variable (TeX-region-file) + 'TeX-command-next TeX-command-default)) + (set-buffer-modified-p (buffer-modified-p)))))) + +(defun TeX-mode-prefix (&optional mode) + "Return the prefix for the symbol MODE as string. +If no mode is given the current major mode is used." + (cdr (assoc (or mode major-mode) '((plain-tex-mode . "plain-TeX") + (latex-mode . "LaTeX") + (ams-tex-mode . "AmSTeX") + (doctex-mode . "docTeX") + (texinfo-mode . "Texinfo") + (context-mode . "ConTeXt"))))) + +;;; Viewing + +(defgroup TeX-view nil + "Calling viewers from AUCTeX." + :group 'TeX-command) + +(defvar TeX-view-predicate-list-builtin + '((output-dvi + (string-match "dvi" (TeX-output-extension))) + (output-pdf + (string-match "pdf" (TeX-output-extension))) + (output-html + (string-match "html" (TeX-output-extension))) + (has-no-display-manager + (not (display-graphic-p))) + (style-pstricks + (TeX-match-style "^pstricks$\\|^pst-\\|^psfrag$")) + (engine-omega + (eq TeX-engine 'omega)) + (engine-xetex + (eq TeX-engine 'xetex)) + (mode-io-correlate + TeX-source-correlate-mode) + (paper-landscape + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`landscape\\'"))) + (paper-portrait + (not (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`landscape\\'")))) + (paper-a4 + (let ((regex "\\`\\(?:a4paper\\|a4dutch\\|a4wide\\|sem-a4\\)\\'")) + (or (TeX-match-style regex) + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option regex))))) + (paper-a5 + (let ((regex "\\`\\(?:a5paper\\|a5comb\\)\\'")) + (or (TeX-match-style regex) + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option regex))))) + (paper-b5 + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`b5paper\\'"))) + (paper-letter + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`letterpaper\\'"))) + (paper-legal + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`legalpaper\\'"))) + (paper-executive + (and (fboundp 'LaTeX-match-class-option) + (LaTeX-match-class-option "\\`executivepaper\\'")))) + "Alist of built-in predicates for viewer selection and invocation. +See the doc string of `TeX-view-predicate-list' for a short +description of each predicate.") + +(defcustom TeX-view-predicate-list nil + "Alist of predicates for viewer selection and invocation. +The key of each list item is a symbol and the value a Lisp form +to be evaluated. The form should return nil if the predicate is +not fulfilled. + +Built-in predicates provided in `TeX-view-predicate-list-builtin' +can be overwritten by defining predicates with the same symbol. + +The following built-in predicates are available: + `output-dvi': The output is a DVI file. + `output-pdf': The output is a PDF file. + `output-html': The output is an HTML file. + `style-pstricks': The document loads a PSTricks package. + `engine-omega': The Omega engine is used for typesetting. + `engine-xetex': The XeTeX engine is used for typesetting. + `mode-io-correlate': TeX Source Correlate mode is active. + `paper-landscape': The document is typeset in landscape orientation. + `paper-portrait': The document is not typeset in landscape orientation. + `paper-a4': The paper format is A4. + `paper-a5': The paper format is A5. + `paper-b5': The paper format is B5. + `paper-letter': The paper format is letter. + `paper-legal': The paper format is legal. + `paper-executive': The paper format is executive." + :group 'TeX-view + :type '(alist :key-type symbol :value-type (group sexp))) + +;; XXX: Atril and xreader are forks of Evince and share an almost +;; identical interface with it. Instead of having different functions +;; for each program, we keep the original *-evince-* functions and +;; make them accept arguments to specify the actual name of the +;; program and the desktop environment, that will be used to set up +;; DBUS communication. + +(defun TeX-evince-dbus-p (de app &rest options) + "Return non-nil, if an evince-compatible reader is accessible via DBUS. +Additional OPTIONS may be given to extend the check. If none are +given, only the minimal requirements needed by backward search +are checked. If OPTIONS include `:forward', which is currently +the only option, then additional requirements needed by forward +search are checked, too. + +DE is the name of the desktop environment, APP is the name of viewer." + (let ((dbus-debug nil)) + (and (featurep 'dbusbind) + (require 'dbus nil :no-error) + (dbus-ignore-errors (dbus-get-unique-name :session)) + (dbus-ping :session (format "org.%s.%s.Daemon" de app)) + (or (not (memq :forward options)) + (let ((spec (dbus-introspect-get-method + :session (format "org.%s.%s.Daemon" de app) + (format "/org/%s/%s/Daemon" de app) + (format "org.%s.%s.Daemon" de app) + "FindDocument"))) + ;; FindDocument must exist, and its signature must be (String, + ;; Boolean, String). Evince versions between 2.30 and 2.91.x + ;; didn't have the Boolean spawn argument we need to start evince + ;; initially. + (and spec + (equal '("s" "b" "s") + (delq nil (mapcar (lambda (elem) + (when (and (listp elem) + (eq (car elem) 'arg)) + (cdr (caar (cdr elem))))) + spec))))))))) + +(defun TeX-pdf-tools-sync-view () + "Focus the focused page/paragraph in `pdf-view-mode'. +If `TeX-source-correlate-mode' is disabled, only find and pop to +the output PDF file. Used by default for the PDF Tools viewer +entry in `TeX-view-program-list-builtin'." + ;; Make sure `pdf-tools' is at least in the `load-path', but the user must + ;; take care of properly loading and installing the package. We used to test + ;; "(featurep 'pdf-tools)", but that doesn't play well with deferred loading. + (unless (fboundp 'pdf-tools-install) + (error "PDF Tools are not available")) + (unless TeX-PDF-mode + (error "PDF Tools only work with PDF output")) + (add-hook 'pdf-sync-backward-redirect-functions + #'TeX-source-correlate-handle-TeX-region) + (if (and TeX-source-correlate-mode + (fboundp 'pdf-sync-forward-search)) + (with-current-buffer (or (when TeX-current-process-region-p + (get-file-buffer (TeX-region-file t))) + (current-buffer)) + (pdf-sync-forward-search)) + (let ((pdf (TeX-active-master (TeX-output-extension)))) + (pop-to-buffer (or (find-buffer-visiting pdf) + (find-file-noselect pdf)))))) + +(defcustom TeX-view-evince-keep-focus nil + "Whether Emacs retains the focus when viewing PDF files with Evince. + +When calling `TeX-evince-sync-view', Evince normally captures the +focus. If this option is set to non-nil, Emacs will retain the +focus." + :group 'TeX-view + :type 'boolean) + +(defun TeX-evince-sync-view-1 (de app) + "Focus the focused page/paragraph in Evince with the position +of point in emacs by using Evince's DBUS API. Used by default +for the Evince-compatible entries in +`TeX-view-program-list-builtin' if the requirements are met. + +DE is the name of the desktop environment, APP is the name of +viewer." + (require 'url-util) + (let* ((uri (concat "file://" + ;; bug#45510: ? in filenames must be escaped as + ;; %3F to be a proper URI. + (replace-regexp-in-string + "[?]" "%3F" + (url-encode-url + (expand-file-name + (TeX-active-master (TeX-output-extension))))))) + (owner (dbus-call-method + :session (format "org.%s.%s.Daemon" de app) + (format "/org/%s/%s/Daemon" de app) + (format "org.%s.%s.Daemon" de app) + "FindDocument" + uri + t))) + (if owner + (with-current-buffer (or (when TeX-current-process-region-p + (get-file-buffer (TeX-region-file t))) + (current-buffer)) + (dbus-call-method + :session owner + (format "/org/%s/%s/Window/0" de app) + (format "org.%s.%s.Window" de app) + "SyncView" + (buffer-file-name) + (list :struct :int32 (1+ (TeX-current-offset)) + ;; FIXME: Using `current-column' here is dubious. + ;; Most of CJK letters count as occupying 2 columns, + ;; so the column number is not equal to the number of + ;; the characters counting from the beginning of a + ;; line. What is the right number to specify here? + ;; number of letters? bytes in UTF8? or other? + :int32 (1+ (current-column))) + :uint32 0) + (when TeX-view-evince-keep-focus + (select-frame-set-input-focus (selected-frame)))) + (error "Couldn't find the %s instance for %s" (capitalize app) uri)))) + +(defun TeX-atril-sync-view () + "Run `TeX-evince-sync-view-1', which see, set up for Atril." + (TeX-evince-sync-view-1 "mate" "atril")) + +(defun TeX-evince-sync-view () + "Run `TeX-evince-sync-view-1', which see, set up for Evince." + (TeX-evince-sync-view-1 "gnome" "evince")) + +(defun TeX-reader-sync-view () + "Run `TeX-evince-sync-view-1', which see, set up for Xreader." + (TeX-evince-sync-view-1 "x" "reader")) + +(defun TeX-view-program-select-evince (de app) + "Select how to call the Evince-like viewer. + +DE is the name of the desktop environment, APP is the name of +viewer." + (if (TeX-evince-dbus-p de app :forward) + (intern (format "TeX-%s-sync-view" app)) + `(,app (mode-io-correlate + ;; When tex.el is loaded as response to opening a tex file + ;; in a non-existent directory, we need to make sure + ;; `default-directory' exists, otherwise the shell-command + ;; below will error (bug#50225). + ,(let ((default-directory (file-name-as-directory + (expand-file-name "~")))) + ;; With evince 3, -p N opens the page *labeled* N, + ;; and -i,--page-index the physical page N. + (if (string-match "--page-index" + (shell-command-to-string (concat app " --help"))) + " -i %(outpage)" + " -p %(outpage)"))) " %o"))) + +(defvar TeX-view-program-list-builtin + (cond + ((eq system-type 'windows-nt) + '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o") "yap") + ("dviout" ("dviout -1 " + ((paper-a4 paper-portrait) "-y=A4 ") + ((paper-a4 paper-landscape) "-y=A4L ") + ((paper-a5 paper-portrait) "-y=A5 ") + ((paper-a5 paper-landscape) "-y=A5L ") + ((paper-b5 paper-portrait) "-y=E5 ") + ((paper-b5 paper-landscape) "-y=E5L ") + ((paper-b4jis paper-portrait) "-y=B4 ") + ((paper-b4jis paper-landscape) "-y=B4L ") + ((paper-b5jis paper-portrait) "-y=B5 ") + ((paper-b5jis paper-landscape) "-y=B5L ") + (paper-legal "-y=Legal ") + (paper-letter "-y=Letter ") + (paper-executive "-y=Executive ") + "%d" (mode-io-correlate " \"# %n '%b'\"")) "dviout") + ("PDF Tools" TeX-pdf-tools-sync-view) + ("SumatraPDF" + ("SumatraPDF -reuse-instance" + (mode-io-correlate " -forward-search \"%b\" %n") " %o") + "SumatraPDF") + ("dvips and start" "dvips %d -o && start \"\" %f" "dvips") + ("start" "start \"\" %o"))) + ((eq system-type 'darwin) + '(("Preview.app" "open -a Preview.app %o" "open") + ("Skim" "open -a Skim.app %o" "open") + ("PDF Tools" TeX-pdf-tools-sync-view) + ("displayline" "displayline %n %o %b" "displayline") + ("open" "open %o" "open"))) + (t + `(("dvi2tty" ("dvi2tty -q -w 132 %o")) + ("xdvi" ("%(o?)xdvi" + (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"") + ((paper-a4 paper-portrait) " -paper a4") + ((paper-a4 paper-landscape) " -paper a4r") + ((paper-a5 paper-portrait) " -paper a5") + ((paper-a5 paper-landscape) " -paper a5r") + (paper-b5 " -paper b5") + (paper-letter " -paper us") + (paper-legal " -paper legal") + (paper-executive " -paper 7.25x10.5in") + " %d") "%(o?)xdvi") + ("dvips and gv" "%(o?)dvips %d -o && gv %f" ,(list "%(o?)dvips" "gv")) + ("gv" "gv %o" "gv") + ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)")) "xpdf") + ("Evince" ,(TeX-view-program-select-evince "gnome" "evince") "evince") + ("Atril" ,(TeX-view-program-select-evince "mate" "atril") "atril") + ("Xreader" ,(TeX-view-program-select-evince "x" "reader") "xreader") + ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a")) "okular") + ("xdg-open" "xdg-open %o" "xdg-open") + ("PDF Tools" TeX-pdf-tools-sync-view) + ("Zathura" + ("zathura %o" + (mode-io-correlate + " --synctex-forward %n:0:\"%b\" -x \"emacsclient +%{line} %{input}\"")) + "zathura")))) + "Alist of built-in viewer specifications. +This variable should not be changed by the user who can use +`TeX-view-program-list' to add new viewers or overwrite the +definition of built-in ones. The latter variable also contains a +description of the data format.") + +(defcustom TeX-view-program-list nil + "List of viewer specifications. +This variable can be used to specify how a viewer is to be +invoked and thereby add new viewers on top of the built-in list +of viewers defined in `TeX-view-program-list-builtin' or override +entries in the latter. + +The car of each item is a string with a user-readable name. The +second element can be a command line to be run as a process or a +Lisp function to be executed. The command line can either be +specified as a single string or a list of strings and two-part +lists. The first element of the two-part lists is a symbol or a +list of symbols referring to one or more of the predicates in +`TeX-view-predicate-list' or `TeX-view-predicate-list-builtin'. +The second part of the two-part lists is a command line part. +The command line for the viewer is constructed by concatenating +the command line parts. Parts with a predicate are only +considered if the predicate was evaluated with a positive result. +Note that the command line can contain placeholders as defined in +`TeX-expand-list' which are expanded before the viewer is called. +The third element of the item is optional and is a string, or a +list of strings, with the name of the executable, or executables, +needed to open the output file in the viewer. Placeholders +defined in `TeX-expand-list' can be used here. This element is +used to check whether the viewer is actually available on the +system. + +The use of a function as the second element only works if the +View command in `TeX-command-list' makes use of the hook +`TeX-run-discard-or-function'. + +Note: Predicates defined in the current Emacs session will only +show up in the customization interface for this variable after +restarting Emacs." + :group 'TeX-view + :type + `(repeat + (list + (string :tag "Name") + (choice + (group :tag "Command" (string :tag "Command")) + (group :inline t :tag "Command parts" + (repeat + :tag "Command parts" + (choice + (string :tag "Command part") + (list :tag "Predicate and command part" + ,(let (list) + ;; Build the list of available predicates. + (mapc (lambda (spec) + (cl-pushnew `(const ,(car spec)) list :test #'equal)) + (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + ;; Sort the list alphabetically. + (setq list (sort list + (lambda (a b) + (string< + (downcase (symbol-name (cadr a))) + (downcase (symbol-name (cadr b))))))) + `(choice + (choice :tag "Predicate" ,@list) + (repeat :tag "List of predicates" + (choice :tag "Predicate" ,@list)))) + (string :tag "Command part"))))) + (group :tag "Function" function)) + (choice :tag "Viewer executable(s)" + (string :tag "One executable") + (repeat :tag "List of executables" (string :tag "Name")) + (const :tag "No executable" nil))))) + +(defcustom TeX-view-program-selection + (cond + ((eq system-type 'windows-nt) + '(((output-dvi style-pstricks) "dvips and start") + (output-dvi "Yap") + (output-pdf "start") + (output-html "start"))) + ((eq system-type 'darwin) + '((output-dvi "open") + (output-pdf "open") + (output-html "open"))) + (t + '(((output-dvi has-no-display-manager) "dvi2tty") + ((output-dvi style-pstricks) "dvips and gv") + (output-dvi "xdvi") + (output-pdf "Evince") + (output-html "xdg-open")))) + "Alist of predicates and viewers. +Each entry consists of a list with two elements. The first +element is a symbol or list of symbols referring to predicates as +defined in `TeX-view-predicate-list' or +`TeX-view-predicate-list-builtin'. The second element is a +string referring to the name of a viewer as defined in +`TeX-view-program-list' or `TeX-view-program-list-builtin'. +\(Note: Viewers added to `TeX-view-program-list' in the current +Emacs session will not show up in the customization interface of +`TeX-view-program-selection' until you restart Emacs.) + +When a viewer is called for, the entries are evaluated in turn +and the viewer related to the first entry all predicates of which +are evaluated positively is chosen." + :group 'TeX-view + :type `(alist :key-type + ;; Offer list of defined predicates. + ,(let (list) + (mapc (lambda (spec) + (cl-pushnew `(const ,(car spec)) list :test #'equal)) + (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + (setq list (sort list + (lambda (a b) + (string< + (downcase (symbol-name (cadr a))) + (downcase (symbol-name (cadr b))))))) + `(choice (choice :tag "Single predicate" ,@list) + (repeat :tag "Multiple predicates" + (choice ,@list)))) + :value-type + ;; Offer list of defined viewers. + (group (choice :tag "Viewer" + ,@(let (list) + (mapc (lambda (spec) + (cl-pushnew `(const ,(car spec)) + list :test #'equal)) + (append TeX-view-program-list + TeX-view-program-list-builtin)) + (sort list + (lambda (a b) + (string< (downcase (cadr a)) + (downcase (cadr b)))))))))) + +(defun TeX-match-style (regexp) + "Check if a style matching REGEXP is active." + (TeX-member regexp (TeX-style-list) #'string-match)) + +(defun TeX-view-match-predicate (predicate) + "Check if PREDICATE is true. +PREDICATE can be a symbol or a list of symbols defined in +`TeX-view-predicate-list-builtin' or `TeX-view-predicate-list'. +In case of a single symbol, return t if the predicate is true, +nil otherwise. In case of a list of symbols, return t if all +predicates are true, nil otherwise." + (let ((pred-symbols (if (listp predicate) predicate (list predicate))) + (pred-defs (append TeX-view-predicate-list + TeX-view-predicate-list-builtin)) + (result t) + elt) + (while (and (setq elt (pop pred-symbols)) result) + (unless (eval (cadr (assq elt pred-defs)) t) + (setq result nil))) + result)) + +(defun TeX-view-command-raw () + "Choose a viewer and return its unexpanded command string." + (let ((selection TeX-view-program-selection) + entry viewer item executable spec command) + ;; Find the appropriate viewer. + (while (and (setq entry (pop selection)) (not viewer)) + (when (TeX-view-match-predicate (car entry)) + (setq viewer (cadr entry)))) + (unless viewer + (error "No matching viewer found")) + (setq item (assoc viewer (append TeX-view-program-list + TeX-view-program-list-builtin)) + ;; Get the command line or function spec. + spec (cadr item) + ;; Get the name of the executable(s) associated to the viewer. + executable (nth 2 item)) + ;; Check the executable exists. + (unless (or (null executable) + (cond + ((stringp executable) + (executable-find (TeX-command-expand executable))) + ((listp executable) + (catch 'notfound + (dolist (exec executable t) + (unless (executable-find (TeX-command-expand exec)) + (throw 'notfound nil))))))) + (error (format "Cannot find %S viewer. \ +Select another one in `TeX-view-program-selection'" viewer))) + (cond ((functionp spec) + ;; Converting the function call to a string is ugly, but + ;; the backend currently only supports strings. + (prin1-to-string spec)) + ((stringp spec) + spec) + ((null spec) + (error + (format "Unknown %S viewer. \ +Check the `TeX-view-program-selection' variable" viewer))) + (t + ;; Build the unexpanded command line. Pieces with predicates are + ;; only added if the predicate is evaluated positively. + (dolist (elt spec) + (cond ((stringp elt) + (setq command (concat command elt))) + ((listp elt) + (when (TeX-view-match-predicate (car elt)) + (setq command (concat command (cadr elt))))))) + (if (stringp command) + command + ;; Signal an error if `command' isn't a string. This prevents an + ;; infinite loop in `TeX-command-expand' if `command' is nil. + (error "Wrong viewer specification in `TeX-view-program-list'")))))) + +;;; Engine + +(defvar TeX-engine-alist-builtin + '((default "Default" TeX-command LaTeX-command ConTeXt-engine) + (xetex "XeTeX" "xetex" "xelatex" "xetex") + ;; Some lualatex versions before 0.71 would use "texput" as file + ;; name if --jobname were not supplied + (luatex "LuaTeX" "luatex" "lualatex --jobname=%s" "luatex") + (omega "Omega" TeX-Omega-command LaTeX-Omega-command ConTeXt-Omega-engine)) + "Alist of built-in TeX engines and associated commands. +For a description of the format see `TeX-engine-alist'.") + +(defcustom TeX-engine-alist nil + "Alist of TeX engines and associated commands. +Each entry is a list with a maximum of five elements. The first +element is a symbol used to identify the engine. The second is a +string describing the engine. The third is the command to be +used for plain TeX. The fourth is the command to be used for +LaTeX. The fifth is the command to be used for the --engine +parameter of ConTeXt's texexec program. Each command can either +be a variable or a string. An empty string or nil means there is +no command available. + +You can override a built-in engine defined in the variable +`TeX-engine-alist-builtin' by adding an entry beginning with the +same symbol as the built-in entry to `TeX-engine-alist'." + :group 'TeX-command + :type '(repeat (group symbol + (string :tag "Name") + (choice :tag "Plain TeX command" string variable) + (choice :tag "LaTeX command" string variable) + (choice :tag "ConTeXt command" string variable)))) + +(defun TeX-engine-alist () + "Return an alist of TeX engines. +The function appends the built-in engine specs from +`TeX-engine-alist-builtin' and the user-defined engines from +`TeX-engine-alist' and deletes any entries from the built-in part +where an entry with the same car exists in the user-defined part." + (TeX-delete-dups-by-car (append TeX-engine-alist TeX-engine-alist-builtin))) + +(defun TeX-engine-in-engine-alist (engine) + "Return the `engine' entry in `TeX-engine-alist'. + +Throw an error if `engine' is not present in the alist." + (or + (assq engine (TeX-engine-alist)) + (error "Unknown engine `%s'. Valid values are: %s" engine + (mapconcat + (lambda (x) (prin1-to-string (car x))) + (TeX-engine-alist) ", ")))) + +(defcustom TeX-engine 'default + (concat "Type of TeX engine to use. +It should be one of the following symbols:\n\n" + (mapconcat (lambda (x) (format "* `%s'" (car x))) + (TeX-engine-alist) "\n")) + :group 'TeX-command + :type `(choice ,@(mapcar (lambda (x) + `(const :tag ,(nth 1 x) ,(car x))) + (TeX-engine-alist)))) +(make-variable-buffer-local 'TeX-engine) +(put 'TeX-engine 'safe-local-variable + (lambda (arg) (memq arg (mapcar #'car TeX-engine-alist-builtin)))) + +(defun TeX-engine-set (type) + "Set TeX engine to TYPE. +For available TYPEs, see variable `TeX-engine'." + (interactive (list (completing-read "Engine: " + (mapcar (lambda (x) + (symbol-name (car x))) + (TeX-engine-alist)) + nil t))) + (when (stringp type) + (setq type (intern type))) + (setq TeX-engine type) + ;; Automatically enable or disable TeX PDF mode as a convenience + (cond ((eq type 'xetex) + (TeX-PDF-mode 1) + (setq TeX-PDF-from-DVI nil)) + ((eq type 'omega) (TeX-PDF-mode 0)))) + +(define-minor-mode TeX-Omega-mode + "Minor mode for using the Omega engine." + :init-value nil :lighter nil :keymap nil + :group 'TeX-command + (TeX-engine-set (if TeX-Omega-mode 'omega 'default))) +(defalias 'tex-omega-mode #'TeX-Omega-mode) +(make-obsolete 'TeX-Omega-mode #'TeX-engine-set "11.86") +(make-obsolete-variable 'TeX-Omega-mode 'TeX-engine "11.86") + +;;; Forward and inverse search + +(defcustom TeX-source-correlate-method + '((dvi . source-specials) (pdf . synctex)) + "Method to use for enabling forward and inverse search. +This can be `source-specials' if source specials should be used, +`synctex' if SyncTeX should be used, or `auto' if AUCTeX should +decide. + +The previous values determine the variable for both DVI and PDF +mode. This variable can also be an alist of the kind + + ((dvi . <source-specials or synctex>) + (pdf . <source-specials or synctex>)) + +in which the CDR of each entry is a symbol specifying the method +to be used in the corresponding mode. + +Programs should not use this variable directly but the function +`TeX-source-correlate-method-active' which returns the method +actually used for forward and inverse search." + :type '(choice (const auto) + (const synctex) + (const source-specials) + (list :tag "Different method for DVI and PDF" + (cons (const dvi) + (choice :tag "Method for DVI mode" + (const synctex) + (const source-specials))) + (cons (const pdf) + (choice :tag "Method for PDF mode" + (const synctex) + (const source-specials))))) + :group 'TeX-view) + +(defvar TeX-source-correlate-output-page-function nil + "Symbol of function returning an output page relating to buffer position. +The function should take no arguments and return the page numer +as a string.") +(make-variable-buffer-local 'TeX-source-correlate-output-page-function) + +(define-obsolete-variable-alias 'TeX-source-specials-view-start-server + 'TeX-source-correlate-start-server "11.86") + +(defcustom TeX-source-correlate-start-server 'ask + "Control if server should be started for inverse search." + :type '(choice (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "Ask" ask)) + :group 'TeX-view) + +(defvar TeX-source-correlate-start-server-asked nil + "Keep track if question about server start search was asked.") + +(defvar TeX-source-correlate-start-server-flag nil + "If non-nil, `TeX-source-correlate-start-server-maybe' will start a server. +Code related to features requiring a server, for example, for inverse +search, can set the variable.") + +(defun TeX-source-correlate-gnuserv-p () + "Guess whether to use gnuserv when a server is requested." + (cond ((and (boundp 'gnuserv-process) + (processp gnuserv-process))) + ((and (boundp 'server-process) + (processp server-process)) + nil))) + +(defun TeX-source-correlate-server-enabled-p () + "Return non-nil if Emacs server or gnuserv is enabled." + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) + (process (if gnuserv-p 'gnuserv-process 'server-process))) + (and (boundp process) (processp (symbol-value process))))) + +(defun TeX-source-correlate-start-server-maybe () + "Start Emacs server or gnuserv if a feature using it is enabled. +This is the case if `TeX-source-correlate-start-server-flag' is non-nil." + (when (and TeX-source-correlate-start-server-flag + (not (TeX-source-correlate-server-enabled-p))) + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) + (start (if gnuserv-p #'gnuserv-start #'server-start))) + (cond + ;; Server should be started unconditionally + ((eq TeX-source-correlate-start-server t) + (funcall start)) + ;; Ask user if server is to be started + ((and (eq TeX-source-correlate-start-server 'ask) + (not TeX-source-correlate-start-server-asked) + (prog1 + (y-or-n-p (format "Start %s for inverse search in viewer? " + (if gnuserv-p + "gnuserv" + "Emacs server"))) + (setq TeX-source-correlate-start-server-asked t))) + (funcall start)))))) + +(defun TeX-source-correlate-determine-method () + "Determine which method is available for forward and inverse search." + (let ((help (condition-case nil + (with-output-to-string + (call-process LaTeX-command + nil (list standard-output nil) nil "--help")) + (error "")))) + (if (string-match "^[ ]*-?-synctex" help) + 'synctex + 'source-specials))) + +(defun TeX-source-correlate-method-active () + "Return the method actually used for forward and inverse search." + (cond + ((eq TeX-source-correlate-method 'auto) + (TeX-source-correlate-determine-method)) + ((listp TeX-source-correlate-method) + (if TeX-PDF-mode + (cdr (assoc 'pdf TeX-source-correlate-method)) + (cdr (assoc 'dvi TeX-source-correlate-method)))) + (t + TeX-source-correlate-method))) + +(defun TeX-source-correlate-expand-options () + "Return TeX engine command line option for forward search facilities. +The return value depends on the value of `TeX-source-correlate-mode'. +If this is nil, an empty string will be returned." + (if TeX-source-correlate-mode + (if (eq (TeX-source-correlate-method-active) 'source-specials) + (concat TeX-source-specials-tex-flags + (if TeX-source-specials-places + ;; -src-specials=WHERE: insert source specials + ;; in certain places of the DVI file. WHERE is a + ;; comma-separated value list: cr display hbox + ;; math par parend vbox + (concat "=" (mapconcat #'identity + TeX-source-specials-places ",")))) + TeX-synctex-tex-flags) + "")) + +(defvar TeX-source-correlate-map (make-sparse-keymap) + "Keymap for `TeX-source-correlate-mode'. +You could use this for unusual mouse bindings.") + +(defun TeX-source-correlate-handle-TeX-region (file line col) + "Translate backward search info with respect to `TeX-region'. +That is, if FILE is `TeX-region', update FILE to the real tex +file and LINE to (+ LINE offset-of-region), but retain COL as is. +Else, return nil." + (when (string-equal TeX-region (file-name-sans-extension + (file-name-nondirectory file))) + (with-current-buffer (or (find-buffer-visiting file) + (find-file-noselect file)) + (goto-char 0) + ;; Same regexp used in `preview-parse-messages'. XXX: XEmacs doesn't + ;; support regexp classes, so we can't use "[:digit:]" here. + (when (re-search-forward "!offset(\\([---0-9]+\\))" nil t) + (let ((offset (string-to-number (match-string-no-properties 1)))) + (when TeX-region-orig-buffer + (list (expand-file-name (buffer-file-name TeX-region-orig-buffer)) + (+ line offset) col))))))) + +(defcustom TeX-raise-frame-function #'raise-frame + "A function which will be called to raise the Emacs frame. +The function is called after `TeX-source-correlate-sync-source' +has processed an inverse search DBUS request from +Evince-compatible viewers in order to raise the Emacs frame. + +The default value is `raise-frame', however, depending on window +manager and focus stealing policies, it might very well be that +Emacs doesn't pop into the foreground. So you can do whatever it +takes here. + +For some users, `x-focus-frame' does the trick. For some +users (on GNOME 3.20), + + (lambda () + (run-at-time 0.5 nil #\\='x-focus-frame)) + +does the trick. Some other users use the external wmctrl tool to +raise the Emacs frame like so: + + (lambda () + (call-process + \"wmctrl\" nil nil nil \"-i\" \"-R\" + (frame-parameter (selected-frame) \\='outer-window-id)))" + :type 'function + :group 'TeX-view) + +(defun TeX-source-correlate-sync-source (file linecol &rest _ignored) + "Show TeX FILE with point at LINECOL. +This function is called when emacs receives a SyncSource signal +emitted from the Evince document viewer. IGNORED absorbs an +unused id field accompanying the DBUS signal sent by Evince-3.0.0 +or newer. + +If the Emacs frame isn't raised, customize +`TeX-raise-frame-function'." + ;; FILE may be given as relative path to the TeX-master root document or as + ;; absolute file:// URL. In the former case, the tex file has to be already + ;; opened. + (let* ((file (progn + (require 'url-parse) + (require 'url-util) + (url-unhex-string (aref (url-generic-parse-url file) 6)))) + (flc (or (apply #'TeX-source-correlate-handle-TeX-region file linecol) + (apply #'list file linecol))) + (file (car flc)) + (line (cadr flc)) + (col (nth 2 flc))) + (pop-to-buffer (or (find-buffer-visiting file) + (find-file-noselect file))) + (push-mark nil 'nomsg) + (let ((pos + (when (> line 0) + (save-excursion + (save-restriction + (widen) + (goto-char 1) + (forward-line (1- line)) + (when (> col 0) + (forward-char (1- col))) + (point)))))) + (when pos + (when (or (< pos (point-min)) + (> pos (point-max))) + (widen)) + (goto-char pos)) + (when TeX-raise-frame-function + (funcall TeX-raise-frame-function))))) + +(define-minor-mode TeX-source-correlate-mode + "Minor mode for forward and inverse search. + +If enabled, the viewer can be advised to show the output page +corresponding to the point in the source and vice versa. + +The method to be used can be controlled with the variable +`TeX-source-correlate-method'. Currently source specials or +SyncTeX are recognized." + :group 'TeX-view + ;; Since this is a global minor mode and we don't want to require + ;; tex.el when the mode variable is set, the mode function is called + ;; explicitly (if necessary) in `VirTeX-common-initialization'. We + ;; do it there because otherwise `kill-all-local-variables' would + ;; reset `TeX-source-correlate-output-page-function' which is + ;; buffer-local. + :global t + (set-keymap-parent TeX-mode-map (and TeX-source-correlate-mode + TeX-source-correlate-map)) + (TeX-set-mode-name 'TeX-source-correlate-mode t t) + (setq TeX-source-correlate-start-server-flag TeX-source-correlate-mode) + ;; Register Emacs for the SyncSource DBUS signal emitted by + ;; Evince-compatible viewers. + (dolist (de-app '(("gnome" "evince") ("mate" "atril") ("x" "reader"))) + (when (TeX-evince-dbus-p (car de-app) (cadr de-app)) + (dbus-register-signal + :session nil (format "/org/%s/%s/Window/0" (car de-app) (cadr de-app)) + (format "org.%s.%s.Window" (car de-app) (cadr de-app)) + "SyncSource" + #'TeX-source-correlate-sync-source)))) + +(defalias 'TeX-source-specials-mode #'TeX-source-correlate-mode) +(make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode "11.86") +(defalias 'tex-source-correlate-mode #'TeX-source-correlate-mode) +(put 'TeX-source-correlate-mode 'safe-local-variable #'booleanp) +(setq minor-mode-map-alist + (delq (assq 'TeX-source-correlate-mode minor-mode-map-alist) + minor-mode-map-alist)) + + +;;; Source Specials + +(defcustom TeX-source-specials-tex-flags "-src-specials" + "Extra flags to pass to TeX commands to generate source specials." + :group 'TeX-view + :type 'string) + +(defcustom TeX-source-specials-places nil + "List of places where to insert source specials into the DVI file. +If nil, use (La)TeX's defaults." + :group 'TeX-view + :type '(list (set :inline t + ;; :tag "Options known to work" + ;; cr display hbox math par parend vbox + (const "cr") + (const "display") + (const "hbox") + (const "math") + (const "par") + (const "parend") + (const "vbox")) + (repeat :inline t + :tag "Other options" + (string)))) + +(defcustom TeX-source-specials-view-position-flags + "-sourceposition \"%n %b\"" + "Flags to pass to the DVI viewer commands for the position in the source." + :group 'TeX-view + :type 'string) + +(defcustom TeX-source-specials-view-editor-flags + "-editor \"%cS\"" + "Flags to pass to DVI viewer commands for inverse search." + :group 'TeX-view + :type 'string) + +(defcustom TeX-source-specials-view-gnuclient-flags + "-q +%%l %%f" + "Flags to pass to gnuclient for inverse search." + :group 'TeX-view + :type 'string) + +(defcustom TeX-source-specials-view-emacsclient-flags + "--no-wait +%%l %%f" + "Flags to emacsclient for inverse search." + :group 'TeX-view + :type 'string) + +;; FIXME: Make client binaries configurable. +(defun TeX-source-specials-view-expand-client () + "Return gnuclient or emacslient executable with options. +Return the full path to the executable if possible." + (let* ((gnuserv-p (TeX-source-correlate-gnuserv-p)) + (client-base (if gnuserv-p + "gnuclient" + "emacsclient")) + (client-full (and invocation-directory + (expand-file-name client-base + invocation-directory))) + (options (if gnuserv-p + TeX-source-specials-view-gnuclient-flags + TeX-source-specials-view-emacsclient-flags))) + (if (and client-full (file-executable-p client-full)) + (concat client-full " " options) + (concat client-base " " options)))) + +(defun TeX-source-specials-view-expand-options (&optional _viewer) + "Return source specials command line option for viewer command. +The return value depends on the values of +`TeX-source-correlate-mode' and +`TeX-source-correlate-method-active'. If those are nil or not +`source-specials' respectively, an empty string will be +returned." + (if (and TeX-source-correlate-mode + (eq (TeX-source-correlate-method-active) 'source-specials)) + (concat TeX-source-specials-view-position-flags + (when (TeX-source-correlate-server-enabled-p) + (concat " " TeX-source-specials-view-editor-flags))) + "")) + +;;; SyncTeX + +(defvar TeX-synctex-tex-flags "--synctex=1" + "Extra flags to pass to TeX commands to enable SyncTeX.") + +(defun TeX-synctex-output-page-1 (file) + "Return the page corresponding to the current position in FILE. +This method assumes that the document was compiled with SyncTeX +enabled and the `synctex' binary is available." + (let ((synctex-output + (with-output-to-string + (call-process "synctex" nil (list standard-output nil) nil "view" + "-i" (format "%s:%s:%s" (1+ (TeX-current-offset)) + ;; FIXME: Using `current-column' + ;; here is dubious. See comment in + ;; `TeX-evince-sync-view-1'. + (1+ (current-column)) + file) + "-o" (TeX-active-master (TeX-output-extension)))))) + (when (string-match "^Page:\\([0-9]+\\)" synctex-output) + (match-string 1 synctex-output)))) + +(defun TeX-synctex-output-page () + "Return the page corresponding to the position in the current buffer. +This method assumes that the document was compiled with SyncTeX +enabled and the `synctex' binary is available." + (let* ((file (file-relative-name (buffer-file-name) + (file-name-directory + (TeX-active-master)))) + (abs-file (concat (expand-file-name (or (file-name-directory (TeX-active-master)) + (file-name-directory (buffer-file-name)))) + "./" file))) + ;; It's known that depending on synctex version one of + ;; /absolute/path/./foo/bar.tex, foo/bar.tex, or ./foo/bar.tex (relative to + ;; TeX-master, and the "." in the absolute path is important) are needed. + ;; So try all variants before falling back to page 1. + (or (TeX-synctex-output-page-1 abs-file) + (TeX-synctex-output-page-1 file) + (TeX-synctex-output-page-1 (concat "./" file)) + "1"))) + +;;; Miscellaneous minor modes + +(defvar TeX-mode-p nil + "This indicates a TeX mode being active.") +(make-variable-buffer-local 'TeX-mode-p) + +(defun TeX-mode-set (var value) + (set-default var value) + (TeX-set-mode-name var nil t)) + +(defcustom TeX-PDF-mode t nil + :group 'TeX-command + :set #'TeX-mode-set + :type 'boolean) +(put 'TeX-PDF-mode 'safe-local-variable #'booleanp) + +(define-minor-mode TeX-PDF-mode + "Minor mode for using PDFTeX. + +If enabled, PDFTeX will be used as an executable by default. +You can customize an initial value, and you can use the +function `TeX-global-PDF-mode' for toggling this value." + :group 'TeX-command + (when (eq TeX-engine 'omega) + (setq TeX-PDF-mode nil)) + (setq TeX-PDF-mode-parsed nil) + (TeX-set-mode-name nil nil t) + (setq TeX-output-extension + (if TeX-PDF-mode "pdf" "dvi"))) +(add-to-list 'minor-mode-alist '(TeX-PDF-mode "")) + +(defun TeX-global-PDF-mode (&optional arg) + "Toggle default for `TeX-PDF-mode'." + (interactive "P") + (prog1 + (setq-default TeX-PDF-mode + (if arg (> (prefix-numeric-value arg) 0) + (not (default-value 'TeX-PDF-mode)))) + (TeX-set-mode-name 'TeX-PDF-mode nil t))) + +(defalias 'tex-pdf-mode #'TeX-PDF-mode) + +(defvar TeX-PDF-mode-parsed nil + "Set if `TeX-PDF-mode' has come about by parsing.") + +(make-variable-buffer-local 'TeX-PDF-mode-parsed) + +(defun TeX-PDF-mode-parsed (arg) + "Change `TeX-PDF-mode' to ARG based on parsing. +If this conflicts with previous parsed settings, +just use the default. If an explicit setting is +already established, don't do anything." + +;; Basically we have the following situations: +;; TeX-PDF-mode-parsed (local-variable-p 'TeX-PDF-mode): +;; nil nil : virgin state +;; nil t : stably set state (possibly because of conflicting parse info) +;; t t : non-conflicting parsed info + + (if TeX-PDF-mode-parsed + (unless (eq TeX-PDF-mode arg) + (TeX-PDF-mode (if (default-value 'TeX-PDF-mode) 1 0))) + (unless (local-variable-p 'TeX-PDF-mode (current-buffer)) + (TeX-PDF-mode (if arg 1 0)) + (setq TeX-PDF-mode-parsed t)))) + +(defun TeX-PDF-mode-on () + "Use only from parsing routines." + (TeX-PDF-mode-parsed t)) + +(defun TeX-PDF-mode-off () + "Use only from parsing routines." + (TeX-PDF-mode-parsed nil)) + +(defcustom TeX-DVI-via-PDFTeX nil + "Whether to use PDFTeX also for producing DVI files." + :group 'TeX-command + :type 'boolean) + +(defcustom TeX-PDF-from-DVI nil + "Specify if and how to produce PDF output from a DVI file. + +If non-nil, the default compiler produces DVI output. The value +should be the name of the command used to convert the DVI file to +PDF or to an intermediate type. + +Possible values are + +* \"Dvips\": the DVI file is converted to PS with dvips. After + successfully running it, ps2pdf will be the default command to + convert the PS file to PDF +* \"Dvipdfmx\": the PDF is produced with dvipdfmx + +Programs should not use this variable directly but the function +`TeX-PDF-from-DVI' which handles now obsolete variable +`TeX-PDF-via-dvips-ps2pdf'." + :group 'TeX-command + :type '(choice + (const :tag "No DVI to PDF conversion" nil) + (const :tag "dvips - ps2pdf sequence" "Dvips") + (const :tag "dvipdfmx" "Dvipdfmx"))) +;; If you plan to support new values of `TeX-PDF-from-DVI' remember to update +;; `TeX-command-default' accordingly. +(make-variable-buffer-local 'TeX-PDF-from-DVI) +(put 'TeX-PDF-from-DVI 'safe-local-variable + (lambda (x) (or (stringp x) (null x)))) + +(defcustom TeX-PDF-via-dvips-ps2pdf nil + "Whether to produce PDF output through the (La)TeX - dvips - ps2pdf sequence." + :group 'TeX-command + :type 'boolean) +(make-variable-buffer-local 'TeX-PDF-via-dvips-ps2pdf) +(put 'TeX-PDF-via-dvips-ps2pdf 'safe-local-variable #'booleanp) +(make-obsolete-variable 'TeX-PDF-via-dvips-ps2pdf 'TeX-PDF-from-DVI "11.90") + +(defun TeX-PDF-from-DVI () + "Return the value of variable `TeX-PDF-from-DVI'. + +If `TeX-PDF-from-DVI' is not set and obsolete option +`TeX-PDF-via-dvips-ps2pdf' is non-nil, return \"Dvips\" +for backward compatibility." + (cond + (TeX-PDF-from-DVI) + (TeX-PDF-via-dvips-ps2pdf + "Dvips"))) + +(define-minor-mode TeX-interactive-mode + "Minor mode for interactive runs of TeX." + :init-value nil :lighter nil :keymap nil + :group 'TeX-command + (TeX-set-mode-name 'TeX-interactive-mode t t)) +(defalias 'tex-interactive-mode #'TeX-interactive-mode) +(add-to-list 'minor-mode-alist '(TeX-interactive-mode "")) + +;;; Commands + +(defgroup TeX-command-name nil + "Names for external commands in AUCTeX." + :group 'TeX-command) + +(defcustom TeX-command-BibTeX "BibTeX" + "The name of the BibTeX entry in `TeX-command-list'." + :group 'TeX-command-name + :type 'string) + (make-variable-buffer-local 'TeX-command-BibTeX) + +(defcustom TeX-command-Biber "Biber" + "The name of the Biber entry in `TeX-command-list'." + :group 'TeX-command-name + :type 'string) + (make-variable-buffer-local 'TeX-command-Biber) + +(defcustom TeX-command-Show "View" + "The default command to show (view or print) a TeX file. +Must be the car of an entry in `TeX-command-list'." + :group 'TeX-command-name + :type 'string) + (make-variable-buffer-local 'TeX-command-Show) + +(defcustom TeX-command-Print "Print" + "The name of the Print entry in `TeX-command-Print'." + :group 'TeX-command-name + :type 'string) + +(defcustom TeX-command-Queue "Queue" + "The name of the Queue entry in `TeX-command-Queue'." + :group 'TeX-command-name + :type 'string) + +(defvar TeX-trailer-start nil + "Regular expression delimiting start of trailer in a TeX file.") + + (make-variable-buffer-local 'TeX-trailer-start) + +(defvar TeX-header-end nil + "Regular expression delimiting end of header in a TeX file.") + + (make-variable-buffer-local 'TeX-header-end) + +(defvar TeX-command-default nil + "The default command for `TeX-command' in the current major mode.") + + (make-variable-buffer-local 'TeX-command-default) + +(put 'TeX-command-default 'safe-local-variable #'stringp) + +(defvar TeX-clean-default-intermediate-suffixes + '("\\.aux" "\\.bbl" "\\.blg" "\\.brf" "\\.fot" + "\\.glo" "\\.gls" "\\.idx" "\\.ilg" "\\.ind" + "\\.lof" "\\.log" "\\.lot" "\\.nav" "\\.out" + "\\.snm" "\\.toc" "\\.url" "\\.synctex\\.gz" + "\\.bcf" "\\.run\\.xml" "\\.fls" "-blx\\.bib") + "List of regexps matching suffixes of files to be cleaned. +Used as a default in TeX, LaTeX and docTeX mode.") + +(defvar TeX-clean-default-output-suffixes + '("\\.dvi" "\\.pdf" "\\.ps" "\\.xdv") + "List of regexps matching suffixes of files to be cleaned. +Used as a default in TeX, LaTeX and docTeX mode.") + +(defcustom TeX-clean-confirm t + "If non-nil, ask before deleting files." + :type 'boolean + :group 'TeX-command) + +(autoload 'dired-mark-pop-up "dired") + +(defun TeX-clean (&optional arg) + "Delete generated files associated with current master and region files. +If prefix ARG is non-nil, not only remove intermediate but also +output files." + (interactive "P") + (let* (;; Call with output extension then remove it, to make sure we + ;; get the correct directory in cases TeX-output-dir is + ;; non-nil + (master (file-name-sans-extension (TeX-active-master (TeX-output-extension)))) + (master-dir (file-name-directory master)) + (regexp (concat "\\(" + (regexp-quote (file-name-nondirectory master)) "\\|" + (regexp-quote (file-name-nondirectory (TeX-region-file nil t))) + "\\)" + "\\(" + (TeX--clean-extensions-regexp arg) + "\\)\\'" + "\\|" (regexp-quote (file-name-nondirectory (TeX-region-file t t))))) + (files (when (and regexp (or (not master-dir) (file-exists-p master-dir))) + (directory-files (or master-dir ".") nil regexp)))) + (if files + (when (or (not TeX-clean-confirm) + (dired-mark-pop-up " *Deletions*" 'delete + (if (> (length files) 1) + files + (cons t files)) + 'y-or-n-p "Delete files? ")) + (dolist (file files) + (delete-file (concat master-dir file)))) + (message "No files to be deleted")))) + +(defun TeX--clean-extensions-regexp (&optional arg) + "Return a regexp to match extensions that should be cleaned by `TeX-clean'. +If the optional argument ARG is non-nil then output files are +also included in the regexp." + (let* ((mode-prefix (TeX-mode-prefix)) + (suffixes (and mode-prefix + (append (symbol-value + (intern (concat mode-prefix + "-clean-intermediate-suffixes"))) + (when arg + (symbol-value + (intern (concat mode-prefix + "-clean-output-suffixes")))))))) + (when suffixes + (mapconcat #'identity suffixes "\\|")))) + +;;; Master File + +(defcustom TeX-master t + "The master file associated with the current buffer. +If the file being edited is actually included from another file, you +can tell AUCTeX the name of the master file by setting this variable. +If there are multiple levels of nesting, specify the top level file. + +If this variable is nil, AUCTeX will query you for the name. + +If the variable is t, AUCTeX will assume the file is a master file +itself. + +If the variable is `shared', AUCTeX will query for the name, but not +change the file. + +If the variable is `dwim', AUCTeX will try to avoid querying by +attempting to `do what I mean'; and then change the file. + +It is suggested that you use the File Variables (see the info node +`File Variables') to set this variable permanently for each file." + :group 'TeX-command + :group 'TeX-parse + :type '(choice (const :tag "Query" nil) + (const :tag "This file" t) + (const :tag "Shared" shared) + (const :tag "Dwim" dwim) + (string :format "%v"))) +(make-variable-buffer-local 'TeX-master) +(put 'TeX-master 'safe-local-variable + (lambda (x) + (or (stringp x) + (member x (quote (t nil shared dwim)))))) + +(defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$" + "Regular expression matching ordinary TeX files. + +You should set this variable to match the name of all files, where +automatically adding a file variable with the name of the master file +is a good idea. When AUCTeX adds the name of the master file as a +file variable, it does not need to ask next time you edit the file. + +If you dislike AUCTeX automatically modifying your files, you can set +this variable to \"<none>\"." + :group 'TeX-command + :type 'regexp) + +;; Can be let-bound temporarily in order to inhibit the master file question +;; by using its value instead in case `TeX-master' is nil or 'shared. +(defvar TeX-transient-master nil) + +(defun TeX-dwim-master () + "Find a likely `TeX-master'." + (let ((dir default-directory)) + (cl-loop for buf in (buffer-list) + until + (when (with-current-buffer buf + (and (equal dir default-directory) + (stringp TeX-master))) + (cl-return (with-current-buffer buf TeX-master)))))) + +(defun TeX-master-file-ask () + "Ask for master file, set `TeX-master' and add local variables." + (interactive) + (if (TeX-local-master-p) + (error "Master file already set") + (let* ((default (TeX-dwim-master)) + (name (or (and (eq 'dwim TeX-master) default) + (condition-case nil + (read-file-name (format "Master file (default %s): " + (or default "this file")) + nil default) + (quit "<quit>"))))) + (cond ((string= name "<quit>") + (setq TeX-master t)) + ((string= name default) + (setq TeX-master default) + (TeX-add-local-master)) + ((or + ;; Default `read-file-name' proposes and buffer visits a file. + (string= (expand-file-name name) (buffer-file-name)) + ;; Default of `read-file-name' and buffer does not visit a file. + (string= name default-directory) + ;; User typed <RET> in an empty minibuffer. + (string= name "")) + (setq TeX-master t) + (TeX-add-local-master)) + (t + (setq TeX-master (TeX-strip-extension (file-relative-name name) + (list TeX-default-extension) + 'path)) + (TeX-add-local-master)))))) + +(defun TeX-master-file (&optional extension nondirectory ask) + "Set and return the name of the master file for the current document. + +If optional argument EXTENSION is non-nil, add that file extension to +the name. Special value t means use `TeX-default-extension'. + +If optional second argument NONDIRECTORY is non-nil, do not include +the directory. + +If optional third argument ASK is non-nil, ask the user for the +name of master file if it cannot be determined otherwise." + (interactive) + (if (eq extension t) + (setq extension TeX-default-extension)) + (let ((my-name (if (buffer-file-name) + (TeX-strip-extension nil (list TeX-default-extension) t) + "<none>"))) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (cond + ((and TeX-transient-master + (or (not TeX-master) (eq TeX-master 'shared))) + (setq TeX-master TeX-transient-master)) + ;; Special value 't means it is own master (a free file). + ((equal TeX-master my-name) + (setq TeX-master t)) + + ;; For files shared between many documents. + ((and (eq 'shared TeX-master) ask) + (setq TeX-master + (let* ((default (TeX-dwim-master)) + (name (read-file-name + (format "Master file (default %s): " + (or default "this file")) + nil default))) + (cond ((string= name default) + default) + ((or + ;; Default `read-file-name' proposes and + ;; buffer visits a file. + (string= (expand-file-name name) + (buffer-file-name)) + ;; Default of `read-file-name' and + ;; buffer does not visit a file. + (string= name default-directory) + ;; User typed <RET> in an empty minibuffer. + (string= name "")) + t) + (t + (TeX-strip-extension + name (list TeX-default-extension) 'path)))))) + + ;; We might already know the name. + ((or (eq TeX-master t) (stringp TeX-master)) TeX-master) + + ;; Ask the user (but add it as a local variable). + (ask (TeX-master-file-ask))))) + + (let ((name (if (stringp TeX-master) + TeX-master + my-name))) + + (if (TeX-match-extension name) + ;; If it already has an extension... + (if (equal extension TeX-default-extension) + ;; Use instead of the default extension + (setq extension nil) + ;; Otherwise drop it. + (setq name (TeX-strip-extension name)))) + + (let* ((reg (TeX--clean-extensions-regexp t)) + (is-output-ext (and reg + (or (string-match-p reg (concat "." extension)) + (string= "prv" extension)))) + (output-dir (and is-output-ext + (TeX--master-output-dir + (file-name-directory name) + nondirectory)))) + (if output-dir + (setq name (concat output-dir (file-name-nondirectory name))) + ;; Remove directory if needed. + (if nondirectory + (setq name (file-name-nondirectory name))))) + (if extension + (concat name "." extension) + name)))) + +(defun TeX-master-directory () + "Directory of master file." + (file-name-as-directory + (abbreviate-file-name + (substitute-in-file-name + (expand-file-name + (let ((dir (file-name-directory (TeX-master-file)))) + (if dir (directory-file-name dir) ".")) + (and buffer-file-name + (file-name-directory buffer-file-name))))))) + +(defun TeX-add-local-master () + "Add local variable for `TeX-master'. + +Get `major-mode' from master file and enable it." + (when (and (buffer-file-name) + (string-match TeX-one-master + (file-name-nondirectory (buffer-file-name))) + (not buffer-read-only)) + (goto-char (point-max)) + (if (re-search-backward "^\\([^\n]+\\)Local Variables:" + (- (point-max) 3000) t) + (let ((prefix (TeX-match-buffer 1))) + (re-search-forward (regexp-quote (concat prefix + "End:"))) + (beginning-of-line 1) + (insert prefix "TeX-master: " (prin1-to-string TeX-master) "\n")) + (let* ((mode (if (stringp TeX-master) + (with-current-buffer + (find-file-noselect + (TeX-master-file TeX-default-extension)) + major-mode) + major-mode)) + (comment-prefix (cond ((eq mode 'texinfo-mode) "@c ") + ((eq mode 'doctex-mode) "% ") + (t "%%% "))) + (mode-string (concat (and (boundp 'japanese-TeX-mode) japanese-TeX-mode + "japanese-") + (substring (symbol-name mode) 0 -5)))) + (newline) + (when (eq major-mode 'doctex-mode) + (insert comment-prefix TeX-esc "endinput\n")) + (insert + comment-prefix "Local Variables:\n" + comment-prefix "mode: " mode-string "\n" + comment-prefix "TeX-master: " (prin1-to-string TeX-master) "\n" + comment-prefix "End:\n") + (unless (eq mode major-mode) + (funcall mode) + ;; TeX modes run `VirTeX-common-initialization' which kills all local + ;; variables, thus `TeX-master' will be forgotten after `(funcall + ;; mode)'. Reparse local variables in order to bring it back. + (hack-local-variables)))))) + +(defun TeX-local-master-p () + "Return non-nil if there is a `TeX-master' entry in local variables spec. +Return nil otherwise." + (assq 'TeX-master file-local-variables-alist)) + +;;; Style Paths + +(defcustom TeX-style-global (expand-file-name "style" TeX-data-directory) + "Directory containing hand generated TeX information. + +These correspond to TeX macros shared by all users of a site." + :group 'TeX-file + :type 'directory) + +(defcustom TeX-auto-local "auto" + "Directory containing automatically generated TeX information. + +This correspond to TeX macros found in the current directory, and must +be relative to that." + :group 'TeX-file + :type 'string) + +(defcustom TeX-output-dir nil + "The path of the directory where output files should be placed. + +A relative path is interpreted as being relative to the master +file in `TeX-master'. The path cannot contain a directory that +starts with '.'. If this variable is nil, the output directory +is assumed to be the same as the directory of `TeX-master'." + :group 'TeX-file + :safe #'string-or-null-p + :type '(choice (const :tag "Directory of master file" nil) + (string :tag "Custom" "build"))) +(make-variable-buffer-local 'TeX-output-dir) + +(defun TeX--master-output-dir (master-dir relative-to-master &optional ensure) + "Return the directory path where output files should be placed. +If `TeX-output-dir' is nil, then return nil. + +MASTER-DIR is the directory path where the master file is +located. If RELATIVE-TO-MASTER is non-nil, make the returned +path relative to the directory in MASTER-DIR. If ENSURE is +non-nil, the output directory is created if it does not exist." + (when TeX-output-dir + (let* ((master-dir (expand-file-name (or master-dir ""))) + (out-dir (file-name-as-directory + (abbreviate-file-name + (substitute-in-file-name + (expand-file-name + TeX-output-dir + master-dir)))))) + ;; Make sure the directory exists + (unless (or (not ensure) (file-exists-p out-dir)) + (make-directory (file-name-as-directory out-dir) t)) + (if relative-to-master + (file-relative-name out-dir master-dir) + out-dir)))) + +(defun TeX--output-dir-arg (argname) + "Format the output directory as a command argument. +ARGNAME is prepended to the quoted output directory. If +`TeX-output-dir' is nil then return an empty string." + (let ((out-dir (TeX--master-output-dir (TeX-master-directory) t t))) + (if out-dir + (concat argname "\"" out-dir "\"") + ""))) + +(defcustom TeX-style-local "style" + "Directory containing hand generated TeX information. + +These correspond to TeX macros found in the current directory, and must +be relative to that." + :group 'TeX-file + :type 'string) + +;; Compatibility alias +(defun TeX-split-string (regexp string) + (split-string string regexp)) +(make-obsolete 'TeX-split-string + "use (split-string STRING REGEXP) instead." "AUCTeX 13.0") + +(defun TeX-parse-path (env) + "Return a list if private TeX directories found in environment variable ENV." + (let* ((value (getenv env)) + (entries (and value + (split-string + value + (if (string-match ";" value) ";" ":")))) + (global (append '("/" "\\") + (mapcar #'file-name-as-directory + TeX-macro-global))) + entry + answers) + (while entries + (setq entry (car entries)) + (setq entries (cdr entries)) + (setq entry (file-name-as-directory + (if (string-match "/?/?\\'" entry) + (substring entry 0 (match-beginning 0)) + entry))) + (or (not (file-name-absolute-p entry)) + (member entry global) + (setq answers (cons entry answers)))) + answers)) + +(defun TeX-kpathsea-detect-path-delimiter () + "Auto detect the path delimiter for kpsewhich command. +Usually return \":\" or \";\". If auto detect fails for some reason, +return nil." + (let ((res (ignore-errors + (with-output-to-string + (call-process "kpsewhich" nil + (list standard-output nil) nil + "--expand-path" "{.,..}"))))) + ;; kpsewhich expands "{.,..}" to ".:SOMEDIR" or ".;SOMEDIR" + ;; according to its environment. + ;; Don't use "{.,.}" instead because kpsewhich of MiKTeX 2.9 + ;; simplifies it to just a ".", not ".;.". + (and (stringp res) (> (length res) 0) + ;; Check whether ; is contained. This should work even if + ;; some implementation of kpsewhich considers it sane to + ;; insert drive letters or directory separators or whatever + ;; else to the current directory. + (if (string-match ";" res) ";" ":")))) + +(defcustom TeX-kpathsea-path-delimiter + (TeX-kpathsea-detect-path-delimiter) + "Path delimiter for kpathsea output. +t means autodetect, nil means kpathsea is disabled." + :group 'TeX-file + :type '(choice (const ":") + (const ";") + (const :tag "Autodetect" t) + (const :tag "Off" nil))) + +(defun TeX-tree-expand (vars program &optional subdirs) + "Return directories corresponding to the kpathsea variables VARS. +This is done calling `kpsewhich --expand-path' for the variables. +PROGRAM if non-nil is passed as the parameter for --progname. +Optional argument SUBDIRS are subdirectories which are appended +to the directories of the TeX trees. Only existing directories +are returned." + ;; FIXME: The GNU convention only uses "path" to mean "list of directories" + ;; and uses "filename" for the name of a file even if it contains possibly + ;; several elements separated by "/". + (if (eq TeX-kpathsea-path-delimiter t) + (setq TeX-kpathsea-path-delimiter + (TeX-kpathsea-detect-path-delimiter))) + (when TeX-kpathsea-path-delimiter + (let* ((exit-status 1) + (args `(,@(if program `("--progname" ,program)) + "--expand-path" + ,(mapconcat #'identity vars + TeX-kpathsea-path-delimiter))) + (path-list (ignore-errors + (with-output-to-string + (setq exit-status + (apply #'call-process + "kpsewhich" nil + (list standard-output nil) nil + args)))))) + (if (not (zerop exit-status)) + ;; kpsewhich is not available. Disable subsequent usage. + (setq TeX-kpathsea-path-delimiter nil) + (let ((separators (format "[\n\r%s]" TeX-kpathsea-path-delimiter)) + path input-dir-list) + (dolist (item (split-string path-list separators t)) + (if subdirs + (dolist (subdir subdirs) + (setq path (file-name-as-directory (concat item subdir))) + (when (file-exists-p path) + (cl-pushnew path input-dir-list :test #'equal))) + (setq path (file-name-as-directory item)) + (when (file-exists-p path) + (cl-pushnew path input-dir-list :test #'equal)))) + ;; No duplication in result is assured since `cl-pushnew' is + ;; used above. Should we introduce an option for speed just + ;; to accumulate all the results without care for + ;; duplicates? + (nreverse input-dir-list)))))) + +(defun TeX-macro-global () + "Return directories containing the site's TeX macro and style files." + (or (TeX-tree-expand '("$SYSTEXMF" "$TEXMFLOCAL" "$TEXMFMAIN" "$TEXMFDIST") + "latex" '("/tex/" "/bibtex/bst/")) + '("/usr/share/texmf/tex/" "/usr/share/texmf/bibtex/bst/"))) + +(defun TeX-macro-private () + "Return directories containing the user's TeX macro and style files." + (TeX-tree-expand '("$TEXMFHOME") "latex" '("/tex/" "/bibtex/bst/"))) + +(defcustom TeX-macro-global (TeX-macro-global) + "Directories containing the site's TeX macro and style files." + :group 'TeX-file + :type '(repeat (directory :format "%v"))) + +(defcustom TeX-macro-private (or (append (TeX-parse-path "TEXINPUTS") + (TeX-parse-path "BIBINPUTS")) + (TeX-macro-private)) + "Directories where you store your personal TeX macros." + :group 'TeX-file + :type '(repeat (file :format "%v"))) + +(defcustom TeX-auto-private + (list (expand-file-name TeX-auto-local + (or (concat user-emacs-directory "auctex/") + "~/.emacs.d/auctex/"))) + "List of directories containing automatically generated AUCTeX style files. + +These correspond to the personal TeX macros." + :group 'TeX-file + :type '(repeat (file :format "%v"))) + +(if (stringp TeX-auto-private) ;Backward compatibility + (setq TeX-auto-private (list TeX-auto-private))) + +(defcustom TeX-style-private + (list (expand-file-name TeX-style-local + (or (concat user-emacs-directory "auctex/") + "~/.emacs.d/auctex/"))) + "List of directories containing hand-generated AUCTeX style files. + +These correspond to the personal TeX macros." + :group 'TeX-file + :type '(repeat (file :format "%v"))) + +(if (stringp TeX-style-private) ;Backward compatibility + (setq TeX-style-private (list TeX-style-private))) + +(defcustom TeX-style-path + (let ((path)) + ;; Put directories in an order where the more local files can + ;; override the more global ones. + (mapc (lambda (file) + (when (and file (not (member file path))) + (setq path (cons file path)))) + (append (list TeX-auto-global TeX-style-global) + TeX-auto-private TeX-style-private + (list TeX-auto-local TeX-style-local))) + (nreverse path)) + "List of directories to search for AUCTeX style files. +Per default the list is built from the values of the variables +`TeX-auto-global', `TeX-style-global', `TeX-auto-private', +`TeX-style-private', `TeX-auto-local', and `TeX-style-local'." + :group 'TeX-file + :type '(repeat (file :format "%v"))) + +(defcustom TeX-check-path + (append (list ".") TeX-macro-private TeX-macro-global) + "Directory path to search for dependencies. + +If nil, just check the current file. +Used when checking if any files have changed." + :group 'TeX-file + :type '(repeat (file :format "%v"))) + +;;; Style Files + +(define-obsolete-variable-alias 'LaTeX-dialect 'TeX-dialect "13.0") +(defconst TeX-dialect :latex + "Default dialect for use with function `TeX-add-style-hook' for +argument DIALECT-EXPR when the hook is to be run only on LaTeX +file, or any mode derived thereof. See variable +`TeX-style-hook-dialect'." ) + +(defvar TeX-style-hook-list nil + "List of TeX style hooks currently loaded. + +Each entry is a list: + + (STYLE HOOK1 HOOK2 ...) + +where the first element STYLE is the name of the style, and the +remaining elements HOOKN, if any, are hooks to be run when that +style is active. + +A hook HOOKN may be a hook function HOOK-FUN to be run in +all TeX dialects (LaTeX, Texinfo, etc.), or a vector like: + + [TeX-style-hook HOOK-FUN DIALECT-SET] + +where HOOK-FUN is the hook function to be run, and DIALECT-SET is +a non-empty set of dialects in which the hook function may be +run. + +This set is instantiated by function `TeX-add-style-hook' through +functions manipulating style hook dialect expression named with a +`TeX-shdex-' prefix. + +For supported dialects, see variables `TeX-style-hook-dialect'.") + +(defvar TeX-style-hook-dialect :latex + "Dialect for running hooks locally to the considered file. +Supported values are described below: + +* `:bibtex' for files in BibTeX mode. +* `:context' for files in ConTeXt mode. +* `:latex' for files in LaTeX mode, or any mode derived + thereof. +* `:plain-tex' for files in plain-TeX mode. +* `:texinfo' for Texinfo files. +* `:classopt' for class options of LaTeX document. Just + considered as a pseudo-dialect. + +Purpose is notably to prevent non-Texinfo hooks to be run in +Texinfo files, due to ambiguous style name, as this may cause bad +side effect for example on variable `TeX-font-list'.") + +(defcustom TeX-byte-compile nil + "Not nil means try to byte compile auto files before loading." + :group 'TeX-parse + :type 'boolean) + +(defun TeX-bibtex-set-BibTeX-dialect () + "Set `TeX-style-hook-dialect' to `:bibtex' locally to BibTeX buffers." + (set (make-local-variable 'TeX-style-hook-dialect) :bibtex)) + +(defun TeX-load-style (style) + "Search for and load each definition for STYLE in `TeX-style-path'." + (cond ((assoc style TeX-style-hook-list)) ; We already found it + ((string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) ;Complex path + (let* ((dir (substring style (match-beginning 1) (match-end 1))) + (style (substring style (match-beginning 2) (match-end 2))) + (master-dir (if (stringp TeX-master) + (file-name-directory + (file-relative-name TeX-master)) + "./")) + (TeX-style-path (append (list (expand-file-name + TeX-auto-local dir) + (expand-file-name + TeX-auto-local master-dir) + (expand-file-name + TeX-style-local dir) + (expand-file-name + TeX-style-local master-dir)) + TeX-style-path))) + (TeX-load-style style))) + (t ;Relative path + ;; Insert empty list to mark the fact that we have searched. + (setq TeX-style-hook-list (cons (list style) TeX-style-hook-list)) + ;; Now check each element of the path + (dolist (name TeX-style-path) + (TeX-load-style-file (expand-file-name style name)))))) + +(defun TeX-load-style-file (file) + "Load FILE checking for a Lisp extensions." + (let ((el (concat file ".el")) + (elc (concat file ".elc"))) + (cond ((file-newer-than-file-p el elc) + (if (file-readable-p el) + (if (and TeX-byte-compile + (file-writable-p elc) + (save-excursion + ;; `byte-compile-file' switches buffer in Emacs 20.3. + (byte-compile-file el)) + (file-readable-p elc)) + (load-file elc) + (load-file el)))) + ((file-readable-p elc) + (load-file elc)) + ((file-readable-p el) + (load-file el))))) + +(defconst TeX-style-hook-dialect-weight-alist + '((:latex . 1) (:texinfo . 2) (:bibtex . 4) (:plain-tex . 8) (:context . 16) + (:classopt . 32)) + "Association list to map dialects to binary weight, in order to +implement dialect sets as bitmaps." ) + +(defun TeX-shdex-eval (dialect-expr) + "Evaluate a style hook dialect expression DIALECT-EXPR." + (cond + ((symbolp dialect-expr) + (let ((cell (assq dialect-expr TeX-style-hook-dialect-weight-alist))) + (if cell (cdr cell) + (error "Invalid dialect expression : %S" dialect-expr)))) + ((and (consp dialect-expr) + (memq (car dialect-expr) '(or not and nor))) + (apply (intern + (concat "TeX-shdex-" (symbol-name (car dialect-expr)))) + (cdr dialect-expr))) + (t + (error "Invalid dialect expression : %S" dialect-expr)))) + +(defsubst TeX-shdex-or (&rest args) + "OR operator for style hook dialect expressions." + (apply #'logior (mapcar #'TeX-shdex-eval args))) + +(defsubst TeX-shdex-and (&rest args) + "AND operator for style hook dialect expressions." + (apply #'logand (mapcar #'TeX-shdex-eval args))) + +(defsubst TeX-shdex-nor (&rest args) + "NOR operator for style hook dialect expressions." + (lognot (apply #'TeX-shdex-or args))) + +(defsubst TeX-shdex-not (arg) + "NOT operator for style hook dialect expressions." + (lognot (TeX-shdex-eval arg))) + +(defsubst TeX-shdex-in-p (dialect dialect-set) + "Test whether dialect DIALECT is in dialect set DIALECT-SET." + (let ((cell (assq dialect TeX-style-hook-dialect-weight-alist))) + (if cell + (/= 0 (logand (cdr cell) dialect-set)) + (error "Invalid dialect %S" dialect)))) + +(defsubst TeX-shdex-listify (dialect-set) + "Converts a dialect set DIALECT-SET to a list of all dialect +comprised in this set, where dialects are symbols" + (let (ret) + (dolist (c dialect-set) + (when (/= 0 (logand (cdr c) dialect-set)) + (push (car c) ret))) + ret)) + +(defun TeX-add-style-hook (style hook &optional dialect-expr) + "Give STYLE yet another HOOK to run. + +DIALECT-EXPR serves the purpose of marking the hook to be run only in +that dicontext. + +DIALECT-EXPR may be a single symbol defining the dialect, see +variable `TeX-style-hook-dialect' for supported dialects. + +DIALECT-EXPR can also be an expression like one of the following: + +* (or DIALECT1 DIALECT2 ...) +* (nor DIALECT1 DIALECT2 ...) +* (and DIALECT1 DIALECT2 ...) +* (not DIALECT ) + +When omitted DIALECT-EXPR is equivalent to `(nor )', ie all +dialected are allowed." + (let ((entry (assoc-string style TeX-style-hook-list))) + (and dialect-expr (setq hook (vector 'TeX-style-hook hook + (TeX-shdex-eval dialect-expr)))) + (cond ((null entry) + ;; New style, add entry. + (setq TeX-style-hook-list (cons (list style hook) + TeX-style-hook-list))) + ((member hook entry) + ;; Old style, hook already there, do nothing. + nil) + (t + ;; Old style, new hook. + (setcdr entry (cons hook (cdr entry))))))) + +(defun TeX-keep-hooks-in-dialect (hooks dialect-list) + "Scan HOOKS for all hooks the associated dialect of which is +found in DIALECT-LIST and return the list thereof." + (let (ret dialect-list-1) + (dolist (hook hooks) + (setq dialect-list-1 (and (vectorp hook) (eq (aref hook 0) 'TeX-style-hook) + (TeX-shdex-listify (aref hook 2)))) + (while dialect-list-1 + (when (memq (pop dialect-list-1) dialect-list) + (push hook ret) + (setq dialect-list-1 nil))) + ret))) + +(defun TeX-unload-style (style &optional dialect-list) + "Forget that we once loaded STYLE. If DIALECT-LIST is provided +the STYLE is only removed for those dialects in DIALECT-LIST. + +See variable `TeX-style-hook-dialect' for supported dialects." + (let ((style-data (assoc-string style TeX-style-hook-list))) + (if style-data + (let ((hooks (and dialect-list (TeX-keep-hooks-in-dialect (cdr style-data) dialect-list)))) + (if hooks + (setcdr style-data hooks) + (setq TeX-style-hook-list (delq style-data TeX-style-hook-list))))))) + +(defcustom TeX-virgin-style (if (and TeX-auto-global + (file-directory-p TeX-auto-global)) + "virtex" + "NoVirtexSymbols") + "Style all documents use." + :group 'TeX-parse + :type 'string) + +(defvar TeX-active-styles nil + "List of styles currently active in the document.") + (make-variable-buffer-local 'TeX-active-styles) + +(defun TeX-run-style-hooks (&rest styles) + "Run the TeX style hooks STYLES." + (mapcar (lambda (style) + ;; Avoid recursion. + (unless (TeX-member style TeX-active-styles #'string-equal) + (setq TeX-active-styles + (cons style TeX-active-styles)) + (TeX-load-style style) + (let ((default-directory default-directory)) + ;; Complex path. + (when (string-match "\\`\\(.+[/\\]\\)\\([^/\\]*\\)\\'" style) + ;; Set `default-directory' to directory of master + ;; file since style files not stored in the fixed + ;; style directories are usually located there. + (setq default-directory (save-match-data + (TeX-master-directory)) + style (substring style + (match-beginning 2) (match-end 2)))) + (condition-case nil + (mapcar (lambda (hook) + (cond + ((functionp hook) + (funcall hook)) + ((and (vectorp hook) + (eq (aref hook 0) 'TeX-style-hook)) + (and (TeX-shdex-in-p TeX-style-hook-dialect (aref hook 2)) + (funcall (aref hook 1)))) + (t (error "Invalid style hook %S" hook)))) + ;; Reverse the list of style hooks in order to run + ;; styles in the order global, private, local + ;; (assuming TeX-style-path has that ordering, + ;; too). + (reverse (cdr-safe (assoc-string style TeX-style-hook-list)))) + ;; This happens in case some style added a new parser, and + ;; now the style isn't used anymore (user deleted + ;; \usepackage{style}). Then we're left over with, e.g., + ;; (LaTeX-add-siunitx-units "\\parsec"), but the function is + ;; defined in a style siunitx.el that's not loaded anymore. + (void-function nil))))) + styles)) + +(defcustom TeX-parse-self nil + "Parse file after loading it if no style hook is found for it." + :group 'TeX-parse + :type 'boolean) + +(defvar TeX-style-hook-applied-p nil + "Non-nil means the style specific hooks have been applied.") + (make-variable-buffer-local 'TeX-style-hook-applied-p) + +(defvar TeX-update-style-hook nil + "Hook run as soon as style specific hooks were applied.") + +(defun TeX-update-style (&optional force) + "Run style specific hooks for the current document. + +Only do this if it has not been done before, or if optional argument +FORCE is not nil." + (unless (or (eq major-mode 'bibtex-mode) ; Not a real TeX buffer + (and (not force) + TeX-style-hook-applied-p)) + (setq TeX-style-hook-applied-p t) + (message "Applying style hooks...") + (TeX-run-style-hooks (TeX-strip-extension nil nil t)) + ;; Run parent style hooks if it has a single parent that isn't itself. + (if (or (not (memq TeX-master '(nil t))) + (and (buffer-file-name) + (string-match TeX-one-master + (file-name-nondirectory (buffer-file-name))))) + (TeX-run-style-hooks (TeX-master-file))) + (if (and TeX-parse-self + (null (cdr-safe (assoc (TeX-strip-extension nil nil t) + TeX-style-hook-list)))) + (TeX-auto-apply)) + (run-hooks 'TeX-update-style-hook) + (message "Applying style hooks...done"))) + +(defvar TeX-remove-style-hook nil + "List of hooks to call when we remove the style specific information.") + +(defun TeX-remove-style () + "Remove all style specific information." + (setq TeX-style-hook-applied-p nil) + (run-hooks 'TeX-remove-style-hook) + (setq TeX-active-styles (list TeX-virgin-style))) + +(defun TeX-style-list () + "Return a list of all styles (subfiles) used by the current document." + (TeX-update-style) + TeX-active-styles) + +;;; Special Characters + +(defvar TeX-esc "\\" "The TeX escape character.") + (make-variable-buffer-local 'TeX-esc) + +(defvar TeX-grop "{" "The TeX group opening character.") + (make-variable-buffer-local 'TeX-grop) + +(defvar TeX-grcl "}" "The TeX group closing character.") + (make-variable-buffer-local 'TeX-grcl) + +;;; Symbols + +;; Must be before keymaps. + +(defgroup TeX-macro nil + "Support for TeX macros in AUCTeX." + :prefix "TeX-" + :group 'AUCTeX) + +(defcustom TeX-complete-word #'ispell-complete-word + "Function to call for completing non-macros in `tex-mode'." + :type 'function + :group 'TeX-macro) + +(defcustom TeX-complete-expert-commands nil + "Complete macros and environments marked as expert commands. + +Possible values are nil, t, or a list of style names. + + - nil Don't complete expert commands (default). + - t Always complete expert commands. + - (STYLES ...) Only complete expert commands of STYLES." + :group 'TeX-macro + :type '(choice (const :tag "Don't complete expert commands" nil) + (const :tag "Always complete expert commands" t) + (repeat :tag "Complete expert commands of certain styles" string))) + +(defmacro TeX-complete-make-expert-command-functions (thing list-var prefix) + (let* ((plural (concat thing "s")) + (upcase-plural (upcase plural)) + (table-var (intern (format "%s-expert-%s-table" prefix thing)))) + `(progn + (defvar ,table-var + (make-hash-table :test #'equal) + ,(format "A hash-table mapping %s names to the style name providing it. + +A %s occuring in this table is considered an expert %s and +treated specially in the completion." thing thing thing)) + + (defun ,(intern (format "%s-declare-expert-%s" prefix plural)) (style &rest ,(intern plural)) + ,(format "Declare %s as expert %s of STYLE. + +Expert %s are completed depending on `TeX-complete-expert-commands'." + upcase-plural plural plural) + (dolist (x ,(intern plural)) + (if (null style) + (remhash x ,table-var) + (puthash x style ,table-var)))) + + (defun ,(intern (format "%s-filtered" list-var)) () + ,(format "Filter (%s) depending on `TeX-complete-expert-commands'." + list-var) + (delq nil + (mapcar + (lambda (entry) + (if (eq t TeX-complete-expert-commands) + entry + (let* ((cmd (car entry)) + (style (gethash cmd ,table-var))) + (when (or (null style) + (member style TeX-complete-expert-commands)) + entry)))) + (,list-var))))))) + +(TeX-complete-make-expert-command-functions "macro" TeX-symbol-list "TeX") +(TeX-complete-make-expert-command-functions "environment" LaTeX-environment-list "LaTeX") + +(defvar TeX-complete-list nil + "List of ways to complete the preceding text. + +Each entry is a list with the following elements: + +0. Regexp matching the preceding text or a predicate of arity 0 +which returns non-nil and sets `match-data' appropriately if it +is applicable. +1. A number indicating the subgroup in the regexp containing the +text. +2. A function returning an alist of possible completions. +3. Text to append after a succesful completion. + +Or alternatively: + +0. Regexp matching the preceding text. +1. Function to do the actual completion.") + +(defun TeX--complete-find-entry () + "Return the first applicable entry of `TeX-complete-list'." + (let ((list TeX-complete-list) + entry) + (while list + (setq entry (car list) + list (cdr list)) + (when (if (functionp (car entry)) + (funcall (car entry)) + (TeX-looking-at-backward (car entry) 250)) + (setq list nil))) + entry)) + +(defun TeX-complete-symbol () + "Perform completion on TeX/LaTeX symbol preceding point." + (interactive "*") + (let ((entry (TeX--complete-find-entry))) + (when entry + (if (numberp (nth 1 entry)) + (let* ((sub (nth 1 entry)) + (close (if (and (nth 3 entry) + (listp (nth 3 entry)) + (symbolp (car (nth 3 entry)))) + (eval (nth 3 entry) t) + (nth 3 entry))) + (begin (match-beginning sub)) + (end (match-end sub)) + (pattern (TeX-match-buffer 0)) + (symbol (buffer-substring begin end)) + (list (funcall (nth 2 entry))) + (completion (try-completion symbol list)) + (buf-name "*Completions*")) + (cond ((eq completion t) + (and close + (not (looking-at (regexp-quote close))) + (insert close)) + (let ((window (get-buffer-window buf-name))) + (when window (delete-window window)))) + ((null completion) + (error "Can't find completion for \"%s\"" pattern)) + ((not (string-equal symbol completion)) + (delete-region begin end) + (insert completion) + (and close + (eq (try-completion completion list) t) + (not (looking-at (regexp-quote close))) + (insert close)) + (let ((window (get-buffer-window buf-name))) + (when window (delete-window window)))) + (t + (completion-in-region begin end + (all-completions symbol list nil))))) + (funcall (nth 1 entry)))))) + +(defun TeX--completion-annotation-from-tex--prettify-symbols-alist (sym) + (when (boundp 'tex--prettify-symbols-alist) + (let ((ann (cdr (assoc (concat "\\" sym) + tex--prettify-symbols-alist)))) + (when ann + (concat " " (char-to-string ann)))))) + +(declare-function LaTeX--completion-annotation-from-math-menu + "latex" (sym)) + +(defun TeX--completion-annotation-function (sym) + "Annotation function for symbol/macro completion. +Used as `:annotation-function' in `completion-extra-properties'." + (or (TeX--completion-annotation-from-tex--prettify-symbols-alist sym) + (and (fboundp #'LaTeX--completion-annotation-from-math-menu) + (LaTeX--completion-annotation-from-math-menu sym)))) + +(defun TeX--completion-at-point () + "(La)TeX completion at point function. +See `completion-at-point-functions'." + (let ((entry (TeX--complete-find-entry))) + (when entry + (if (numberp (nth 1 entry)) + (let* ((sub (nth 1 entry)) + (begin (match-beginning sub)) + (end (match-end sub)) + (symbol (buffer-substring-no-properties begin end)) + (list (funcall (nth 2 entry)))) + (list begin end (all-completions symbol list) + :annotation-function + #'TeX--completion-annotation-function)) + ;; We intentionally don't call the fallback completion functions because + ;; they do completion on their own and don't work too well with things + ;; like company-mode. And the default function `ispell-complete-word' + ;; isn't so useful anyway. + nil)))) + +(defcustom TeX-default-macro "ref" + "The default macro when creating new ones with `TeX-insert-macro'." + :group 'TeX-macro + :type 'string) + +(make-variable-buffer-local 'TeX-default-macro) + +(defcustom TeX-insert-braces t + "If non-nil, append a empty pair of braces after inserting a macro. + +See also `TeX-insert-braces-alist'." + :group 'TeX-macro + :type 'boolean) + +(defcustom TeX-insert-braces-alist nil + "Alist of macros to which braces should or should not be appended. + +Each element is a cons cell, whose CAR is the macro name, and the +CDR is non-nil or nil, depending on whether a pair of braces +should be, respectively, appended or not to the macro. + +If a macro has an element in this variable, `TeX-parse-macro' +will use its value to decide what to do, whatever the value of +the variable `TeX-insert-braces'." + :group 'TeX-macro + :type '(repeat (cons (string :tag "Macro name") + (boolean :tag "Append braces?")))) +(make-variable-buffer-local 'TeX-insert-braces-alist) + +(defcustom TeX-insert-macro-default-style 'show-optional-args + "Specifies whether `TeX-insert-macro' will ask for all optional arguments. + +If set to the symbol `show-optional-args', `TeX-insert-macro' +asks for optional arguments of TeX marcos, unless the previous +optional argument has been rejected. If set to +`show-all-optional-args', `TeX-insert-macro' asks for all +optional arguments. If set to `mandatory-args-only', +`TeX-insert-macro' asks only for mandatory argument. + +When `TeX-insert-macro' is called with \\[universal-argument], it's the other +way round. + +Note that for some macros, there are special mechanisms, see for example +`LaTeX-includegraphics-options-alist' and `TeX-arg-cite-note-p'." + :group 'TeX-macro + :type '(choice (const mandatory-args-only) + (const show-optional-args) + (const show-all-optional-args))) + +(defvar TeX-arg-opening-brace nil + "String used as an opening brace for argument insertion. +The variable will be temporarily let-bound with the necessary value.") + +(defvar TeX-arg-closing-brace nil + "String used as a closing brace for argument insertion. +The variable will be temporarily let-bound with the necessary value.") + +(defvar TeX-after-insert-macro-hook nil + "A hook run after `TeX-insert-macro'.") + +(defvar TeX-macro-history nil) + +(defun TeX--symbol-completion-table () + (completion-table-dynamic + (lambda (_str) + (TeX-symbol-list-filtered)) + t)) + +(defun TeX-insert-macro (symbol) + "Insert TeX macro SYMBOL with completion. + +AUCTeX knows of some macros and may query for extra arguments, depending on +the value of `TeX-insert-macro-default-style' and whether `TeX-insert-macro' +is called with \\[universal-argument]." + ;; When called with a prefix (C-u), only ask for mandatory arguments, + ;; i.e. all optional arguments are skipped. See `TeX-parse-arguments' for + ;; details. Note that this behavior may be changed in favor of a more + ;; flexible solution in the future, therefore we don't document it at the + ;; moment. + (interactive (list + (let ((completion-extra-properties + (list :annotation-function + #'TeX--completion-annotation-function))) + (completing-read (concat "Macro (default " + TeX-default-macro + "): " + TeX-esc) + (TeX--symbol-completion-table) nil nil nil + 'TeX-macro-history TeX-default-macro)))) + (when (called-interactively-p 'any) + (setq TeX-default-macro symbol)) + (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list)))) + (run-hooks 'TeX-after-insert-macro-hook)) + +(defvar TeX-electric-macro-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-completion-map) + (define-key map " " #'minibuffer-complete-and-exit) + map)) + +(defun TeX-electric-macro () + "Insert TeX macro with completion. + +AUCTeX knows of some macros, and may query for extra arguments. +Space will complete and exit." + (interactive) + (cond ((eq (preceding-char) last-command-event) + (call-interactively #'self-insert-command)) + ((eq (preceding-char) ?.) + (let ((TeX-default-macro " ") + (minibuffer-local-completion-map TeX-electric-macro-map)) + (call-interactively #'TeX-insert-macro))) + (t + (let ((minibuffer-local-completion-map TeX-electric-macro-map)) + (call-interactively #'TeX-insert-macro))))) + +(defvar TeX-exit-mark nil + "Dynamically bound by `TeX-parse-macro' and `LaTeX-env-args'.") + +(defun TeX-parse-macro (symbol args) + "How to parse TeX macros which takes one or more arguments. + +First argument SYMBOL is the name of the macro. + +If ARGS is nil, insert macro with point inside braces. +Otherwise, each element in ARGS should match an argument to the +TeX macro. What is done depend on the type of the element: + + string: Use the string as a prompt to prompt for the argument. + + number: Insert that many braces, leave point inside the first. + + nil: Insert empty braces. + + t: Insert empty braces, leave point between the braces. + + other symbols: Call the symbol as a function. You can define + your own hook, or use one of the predefined argument hooks. If + you add new hooks, you can assume that point is placed directly + after the previous argument, or after the macro name if this is + the first argument. Please leave point located after the + argument you are inserting. If you want point to be located + somewhere else after all hooks have been processed, set the + value of `TeX-exit-mark'. It will point nowhere, until the + argument hook set it. By convention, these hooks all start + with `TeX-arg-'. + + list: If the car is a string, insert it as a prompt and the next + element as initial input. Otherwise, call the car of the list + with the remaining elements as arguments. + + vector: Optional argument. If it has more than one element, + parse it as a list, otherwise parse the only element as above. + Use square brackets instead of curly braces, and is not inserted + on empty user input." + (let ((TeX-grop (if (and (or (atom args) (= (length args) 1)) + (fboundp 'LaTeX-verbatim-macros-with-delims) + (member symbol (LaTeX-verbatim-macros-with-delims))) + LaTeX-default-verb-delimiter + TeX-grop)) + (TeX-grcl (if (and (or (atom args) (= (length args) 1)) + (fboundp 'LaTeX-verbatim-macros-with-delims) + (member symbol (LaTeX-verbatim-macros-with-delims))) + LaTeX-default-verb-delimiter + TeX-grcl))) + (if (and (TeX-active-mark) + (> (point) (mark))) + (exchange-point-and-mark)) + (insert TeX-esc symbol) + (let ((TeX-exit-mark (make-marker)) + (position (point))) + (TeX-parse-arguments args) + (cond ((marker-position TeX-exit-mark) + (goto-char (marker-position TeX-exit-mark)) + (set-marker TeX-exit-mark nil)) + ((let ((element (assoc symbol TeX-insert-braces-alist))) + ;; If in `TeX-insert-braces-alist' there is an element associated + ;; to the current macro, use its value to decide whether inserting + ;; a pair of braces, otherwise use the standard criterion. + (if element + (cdr element) + (and TeX-insert-braces + ;; Do not add braces if the argument is 0 or -1. + (not (and (= (safe-length args) 1) + (numberp (car args)) + (<= (car args) 0))) + (equal position (point)) + (string-match "[a-zA-Z]+" symbol)))) + (if (texmathp) + (when (TeX-active-mark) + (insert TeX-grop) + (exchange-point-and-mark) + (insert TeX-grcl)) + (insert TeX-grop) + (if (TeX-active-mark) + (progn + (exchange-point-and-mark) + (insert TeX-grcl)) + (insert TeX-grcl) + (backward-char)))))))) + +(defun TeX-arg-string (optional &optional prompt initial-input) + "Prompt for a string. + +If OPTIONAL is not nil then the PROMPT will start with ``(Optional) ''. +INITIAL-INPUT is a string to insert before reading input." + (TeX-argument-insert + (if (and (not optional) (TeX-active-mark)) + (let ((TeX-argument (buffer-substring (point) (mark)))) + (delete-region (point) (mark)) + TeX-argument) + (TeX-read-string (TeX-argument-prompt optional prompt "Text") initial-input)) + optional)) + +(defvar TeX-last-optional-rejected nil + "Dynamically bound by `TeX-parse-arguments'.") + +(defun TeX-parse-arguments (args) + "Parse TeX macro arguments ARGS. + +See `TeX-parse-macro' for details." + (let ((TeX-last-optional-rejected nil)) + (while args + (if (vectorp (car args)) + ;; Maybe get rid of all optional arguments. See `TeX-insert-macro' + ;; for more comments. See `TeX-insert-macro-default-style'. + ;; The macro `LaTeX-check-insert-macro-default-style' in + ;; `latex.el' uses the code inside (unless ...) This macro + ;; should be adapted if the code here changs. + (unless (if (eq TeX-insert-macro-default-style 'show-all-optional-args) + (equal current-prefix-arg '(4)) + (or + (and (eq TeX-insert-macro-default-style 'show-optional-args) + (equal current-prefix-arg '(4))) + (and (eq TeX-insert-macro-default-style 'mandatory-args-only) + (null (equal current-prefix-arg '(4)))) + TeX-last-optional-rejected)) + (let ((TeX-arg-opening-brace LaTeX-optop) + (TeX-arg-closing-brace LaTeX-optcl)) + (TeX-parse-argument t (if (equal (length (car args)) 1) + (aref (car args) 0) + (append (car args) nil))))) + (let ((TeX-arg-opening-brace TeX-grop) + (TeX-arg-closing-brace TeX-grcl)) + (setq TeX-last-optional-rejected nil) + (TeX-parse-argument nil (car args)))) + (setq args (cdr args))))) + +(defun TeX-parse-argument (optional arg) + "Depending on OPTIONAL, insert TeX macro argument ARG. +If OPTIONAL is set, only insert if there is anything to insert, and +then use square brackets instead of curly braces. + +See `TeX-parse-macro' for details." + (let (insert-flag) + (cond ((stringp arg) + (TeX-arg-string optional arg) + (setq insert-flag t)) + ((numberp arg) + (cond ((< arg 0) + (when (TeX-active-mark) + ;; Put both the macro and the marked region in a TeX group. + (let ((beg (min (point) (mark))) + (end (set-marker (make-marker) (max (point) (mark))))) + (insert " ") + (goto-char beg) + (skip-chars-backward "^\\\\") + (backward-char) + (insert TeX-arg-opening-brace) + (goto-char (marker-position end)) + (insert TeX-arg-closing-brace) + (setq insert-flag t) + (set-marker end nil)))) + ((= arg 0)) ; nop for clarity + ((> arg 0) + (TeX-parse-argument optional t) + (while (> arg 1) + (TeX-parse-argument optional nil) + (setq arg (- arg 1)))))) + ((null arg) + (insert TeX-arg-opening-brace) + (when (and (not optional) (TeX-active-mark)) + (exchange-point-and-mark)) + (insert TeX-arg-closing-brace) + (setq insert-flag t)) + ((eq arg t) + (insert TeX-arg-opening-brace) + (if (and (not optional) (TeX-active-mark)) + (progn + (exchange-point-and-mark)) + (set-marker TeX-exit-mark (point))) + (insert TeX-arg-closing-brace) + (setq insert-flag t)) + ((symbolp arg) + (funcall arg optional)) + ((listp arg) + (let ((head (car arg)) + (tail (cdr arg))) + (cond ((stringp head) + (apply #'TeX-arg-string optional arg)) + ((symbolp head) + (apply head optional tail)) + (t (error "Unknown list argument type %s" + (prin1-to-string head)))))) + (t (error "Unknown argument type %s" (prin1-to-string arg)))) + (when (and insert-flag (not optional) (TeX-active-mark)) + (deactivate-mark)))) + +(defun TeX-argument-insert (name optional &optional prefix) + "Insert NAME surrounded by curly braces. + +If OPTIONAL, only insert it if not empty, and then use square brackets. +If PREFIX is given, insert it before NAME." + (if (and optional (string-equal name "")) + (setq TeX-last-optional-rejected t) + (insert TeX-arg-opening-brace) + (if prefix + (insert prefix)) + (if (and (string-equal name "") + (null (marker-position TeX-exit-mark))) + (set-marker TeX-exit-mark (point)) + (insert name)) + (insert TeX-arg-closing-brace))) + +(defun TeX-argument-prompt (optional prompt default &optional complete) + "Return a argument prompt. + +If OPTIONAL is not nil then the prompt will start with ``(Optional) ''. + +PROMPT will be used if not nil, otherwise use DEFAULT. + +Unless optional argument COMPLETE is non-nil, ``: '' will be appended." + (concat (if optional "(Optional) " "") + (if prompt prompt default) + (if complete "" ": "))) + +(defun TeX-string-divide-number-unit (string) + "Divide number and unit in STRING and return a list (number unit)." + (if (string-match "[0-9]*\\.?[0-9]+" string) + (list (substring string 0 (string-match "[^.0-9]" string)) + (substring string (if (string-match "[^.0-9]" string) + (string-match "[^.0-9]" string) + (length string)))) + (list "" string))) + +(defcustom TeX-default-unit-for-image "cm" + "Default unit when prompting for an image size." + :group 'TeX-macro + :type '(choice (const "cm") + (const "in") + (const "\\linewidth") + (string :tag "Other"))) + +(defun TeX-arg-maybe (symbol list form) + "Evaluate FORM, if SYMBOL is an element of LIST." + (when (memq symbol list) + (eval form t))) + +(defun TeX-arg-free (optional &rest args) + "Parse its arguments but use no braces when they are inserted." + (let ((TeX-arg-opening-brace "") + (TeX-arg-closing-brace "")) + (if (equal (length args) 1) + (TeX-parse-argument optional (car args)) + (TeX-parse-argument optional args)))) + +(defun TeX-arg-literal (_optional &rest args) + "Insert its arguments ARGS into the buffer. +Used for specifying extra syntax for a macro. The compatibility +argument OPTIONAL is ignored." + (apply #'insert args)) + + +;;; Font Locking + +(defcustom TeX-install-font-lock #'font-latex-setup + "Function to call to install font lock support. +Choose `ignore' if you don't want AUCTeX to install support for font locking." + :group 'TeX-misc + :type '(radio (function-item font-latex-setup) + (function-item tex-font-setup) + (function-item ignore) + (function :tag "Other"))) + +;;; The Mode + +(defvar TeX-format-list + '(("JLATEX" japanese-latex-mode + "\\\\\\(documentstyle\\|documentclass\\)[^%\n]*{u?\\(j[s-]?\\|t\\)\ +\\(article\\|report\\|book\\|slides\\)") + ("JTEX" japanese-plain-tex-mode + "-- string likely in Japanese TeX --") + ("AMSTEX" ams-tex-mode + "\\\\document\\b") + ("CONTEXT" context-mode + "\\\\\\(start\\(text\\|tekst\\|proje[ck]t\\|proiect\\|\ +produ[ck]t\\|produs\\|environment\\|omgeving\\|umgebung\\|prostredi\\|mediu\\|\ +component\\|onderdeel\\|komponent[ea]\\|componenta\\)\ +\\|inizia\\(testo\\|progetto\\|prodotto\\|ambiente\\|componente\\)\ +\\)\\|%.*?interface=") + ("LATEX" latex-mode + "\\\\\\(begin\\|\\(?:sub\\)\\{0,2\\}section\\|chapter\\|documentstyle\\|\ +documentclass\\)\\b") + ("TEX" plain-tex-mode ".")) + "List of format packages to consider when choosing a TeX mode. + +A list with an entry for each format package available at the site. + +Each entry is a list with three elements. + +1. The name of the format package. +2. The name of the major mode. +3. A regexp typically matched in the beginning of the file. + +When entering `tex-mode', each regexp is tried in turn in order to find +the major mode to be used.") + +(defcustom TeX-default-mode #'latex-mode + "Mode to enter for a new file when it can't be determined otherwise." + :group 'TeX-misc + :type '(radio (function-item latex-mode) + (function-item plain-tex-mode) + (function :tag "Other"))) + +(defcustom TeX-force-default-mode nil + "If set to nil, try to infer the mode of the file from its content." + :group 'TeX-misc + :type 'boolean) + +;;;###autoload +(defun TeX-tex-mode () + "Major mode in AUCTeX for editing TeX or LaTeX files. +Tries to guess whether this file is for plain TeX or LaTeX. + +The algorithm is as follows: + + 1) if the file is empty or `TeX-force-default-mode' is not set to nil, + `TeX-default-mode' is chosen + 2) If \\documentstyle or \\begin{, \\section{, \\part{ or \\chapter{ is + found, `latex-mode' is selected. + 3) Otherwise, use `plain-tex-mode'" + (interactive) + + (funcall (if (or (equal (buffer-size) 0) + TeX-force-default-mode) + TeX-default-mode + (save-excursion + (goto-char (point-min)) + (let ((comment-start-skip ;Used by TeX-in-comment + (concat + "\\(\\(^\\|[^\\\n]\\)\\(" + (regexp-quote TeX-esc) + (regexp-quote TeX-esc) + "\\)*\\)\\(%+ *\\)")) + (entry TeX-format-list) + answer case-fold-search) + (while (and entry (not answer)) + (if (re-search-forward (nth 2 (car entry)) + 10000 t) + (if (not (TeX-in-comment)) + (setq answer (nth 1 (car entry)))) + (setq entry (cdr entry)))) + (if answer + answer + TeX-default-mode)))))) + +(defun TeX--prettify-symbols-compose-p (start end match) + (and (tex--prettify-symbols-compose-p start end match) + (not (let ((face (get-text-property end 'face))) + (if (consp face) + (memq 'font-latex-verbatim-face face) + (eq face 'font-latex-verbatim-face)))))) + +(defun VirTeX-common-initialization () + "Perform basic initialization." + (kill-all-local-variables) + (setq TeX-mode-p t) + (setq TeX-output-extension (if TeX-PDF-mode "pdf" "dvi")) + (setq indent-tabs-mode nil) + + ;; Ispell support + (set (make-local-variable 'ispell-parser) 'tex) + + ;; Redefine some standard variables + (make-local-variable 'paragraph-start) + (make-local-variable 'paragraph-separate) + (set (make-local-variable 'comment-start) "%") + (set (make-local-variable 'comment-start-skip) + (concat + "\\(\\(^\\|[^\\\n]\\)\\(" + (regexp-quote TeX-esc) + (regexp-quote TeX-esc) + "\\)*\\)\\(%+[ \t]*\\)")) + (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\n\\)") + (set (make-local-variable 'comment-use-syntax) t) + (set (make-local-variable 'comment-padding) " ") + ;; Removed as commenting in (La)TeX is done with one `%' not two + ;; (make-local-variable 'comment-add) + ;; (setq comment-add 1) ;default to `%%' in comment-region + (set (make-local-variable 'comment-indent-function) #'TeX-comment-indent) + (set (make-local-variable 'comment-multi-line) nil) + (make-local-variable 'compile-command) + (unless (boundp 'compile-command) + (setq compile-command "make")) + (set (make-local-variable 'words-include-escapes) nil) + + ;; Make TAB stand out + ;; (make-local-variable 'buffer-display-table) + ;; (setq buffer-display-table (if standard-display-table + ;; (copy-sequence standard-display-table) + ;; (make-display-table))) + ;; (aset buffer-display-table ?\t (apply 'vector (append "<TAB>" nil))) + + ;; Symbol completion. + (set (make-local-variable 'TeX-complete-list) + (list (list "\\\\\\([a-zA-Z]*\\)" + 1 'TeX-symbol-list-filtered + (if TeX-insert-braces "{}")) + (list "" TeX-complete-word))) + + (funcall TeX-install-font-lock) + + ;; We want this to be early in the list, so we do not add it before + ;; we enter TeX mode the first time. + (add-hook 'write-contents-functions #'TeX-safe-auto-write nil t) + + ;; Minor modes + (when TeX-source-correlate-mode + (TeX-source-correlate-mode 1)) + + ;; Prettify Symbols mode + (require 'tex-mode) + (setq-local prettify-symbols-alist tex--prettify-symbols-alist) + (add-function :override (local 'prettify-symbols-compose-predicate) + #'TeX--prettify-symbols-compose-p) + + ;; Standard Emacs completion-at-point support + (add-hook 'completion-at-point-functions + #'TeX--completion-at-point nil t) + + ;; Let `TeX-master-file' be called after a new file was opened and + ;; call `TeX-update-style' on any file opened. (The addition to the + ;; hook has to be made here because its local value will be deleted + ;; by `kill-all-local-variables' if it is added e.g. in `tex-mode'.) + ;; + ;; `TeX-update-style' has to be called before + ;; `global-font-lock-mode', which may also be specified in + ;; `find-file-hook', gets called. Otherwise style-based + ;; fontification will break (in XEmacs). That means, `add-hook' + ;; cannot be called with a non-nil value of the APPEND argument. + ;; + ;; `(TeX-master-file nil nil t)' has to be called *before* + ;; `TeX-update-style' as the latter will call `TeX-master-file' + ;; without the `ask' bit set. + (add-hook 'find-file-hook + (lambda () + ;; Check if we are looking at a new or shared file. + (when (or (not (file-exists-p (buffer-file-name))) + (eq TeX-master 'shared)) + (TeX-master-file nil nil t)) + (TeX-update-style t)) nil t)) + + +;;; Hilighting + +;; FIXME: It's likely that `hilit-patterns-alist' is much obsolete. +(if (boundp 'hilit-patterns-alist) + (let ((latex-patterns (cdr-safe (assq 'latex-mode hilit-patterns-alist))) + (plain-tex-patterns (cdr-safe (assq 'plain-tex-mode + hilit-patterns-alist)))) + (if (and latex-patterns plain-tex-patterns) + (setq hilit-patterns-alist + (append (list (cons 'ams-tex-mode plain-tex-patterns)) + hilit-patterns-alist))))) + +;;; Parsing + +(defgroup TeX-parse nil + "Parsing TeX files from AUCTeX." + :group 'AUCTeX) + +(defvar TeX-auto-parser '((styles TeX-auto-file TeX-run-style-hooks))) +;; Alist of parsed information. +;; Each entry is a list with the following elements: +;; +;; 0. Name of information type. +;; 1. Name of temporary variable used when parsing. +;; 2. Name of function to add information to add to #3. +;; 3. Name of variable holding buffer local information. +;; 4. Name of variable indicating that #3 has changed. + + +(defconst TeX-auto-parser-temporary 1) +(defconst TeX-auto-parser-add 2) +(defconst TeX-auto-parser-local 3) +(defconst TeX-auto-parser-change 4) + +(defun TeX-auto-add-information (name entries) + "For NAME in `TeX-auto-parser' add ENTRIES." + (let* ((entry (assoc name TeX-auto-parser)) + (change (nth TeX-auto-parser-change entry)) + (change-value (symbol-value change)) + (local (nth TeX-auto-parser-local entry)) + (local-value (symbol-value local))) + (if change-value + (set local (cons entries local-value)) + (set change t) + (set local (list entries local-value))))) + +(defun TeX-auto-list-information (name) + "Return information in `TeX-auto-parser' about NAME." + (TeX-update-style) + (let* ((entry (assoc name TeX-auto-parser)) + (change (nth TeX-auto-parser-change entry)) + (change-value (symbol-value change)) + (local (nth TeX-auto-parser-local entry))) + (if (not change-value) + () + (set change nil) + ;; Sort it + (message "Sorting %s..." name) + (set local + (sort (mapcar #'TeX-listify (apply #'append (symbol-value local))) + #'TeX-car-string-lessp)) + (message "Sorting %s...done" name) + ;; Make it unique + (message "Removing duplicates...") + (let ((entry (symbol-value local))) + (while (and entry (cdr entry)) + (let ((this (car entry)) + (next (car (cdr entry)))) + (if (not (string-equal (car this) (car next))) + (setq entry (cdr entry)) + ;; We have two equal symbols. Use the one with + ;; most arguments. + (if (> (length next) (length this)) + (setcdr this (cdr next))) + (setcdr entry (cdr (cdr entry))))))) + (message "Removing duplicates...done")) + (symbol-value local))) + +(defmacro TeX-auto-add-type (name prefix &optional plural) + "Add information about NAME to the parser using PREFIX. + +Optional third argument PLURAL is the plural form of NAME. +By default just add an `s'. + +This macro creates a set of variables and functions to maintain a +separate type of information in the parser." + (let* ((names (or plural (concat name "s"))) + (tmp (intern (concat prefix "-auto-" name))) + (add (intern (concat prefix "-add-" names))) + (local (intern (concat prefix "-" name "-list"))) + (change (intern (concat prefix "-" name "-changed"))) + (vardoc (concat "Information about " names + " in the current buffer. +Generated by `TeX-auto-add-type'."))) + `(progn + (defvar ,tmp nil ,vardoc) + (defvar ,local nil ,vardoc) + (make-variable-buffer-local ',local) + (defvar ,change nil ,vardoc) + (make-variable-buffer-local ',change) + (defun ,add (&rest ,(intern names)) + ,(concat "Add information about " (upcase names) + " to the current buffer. +Generated by `TeX-auto-add-type'.") + (TeX-auto-add-information ,name ,(intern names))) + (defun ,local () + ,(concat "List of " names + " active in the current buffer. +Generated by `TeX-auto-add-type'.") + (TeX-auto-list-information ,name)) + ;; Append new type to `TeX-auto-parser' in order to make `style' type + ;; always the first. + (add-to-list 'TeX-auto-parser ',(list name tmp add local change) t) + (add-hook 'TeX-remove-style-hook + (lambda () + (setq ,local nil)))))) + +(TeX-auto-add-type "symbol" "TeX") + +(defvar TeX-auto-apply-hook nil + "Hook run when a buffer is parsed and the information is applied.") + +(defun TeX-auto-apply () + "Parse and apply TeX information in the current buffer." + (TeX-auto-parse) + (run-hooks 'TeX-auto-apply-hook) + (mapcar #'TeX-auto-apply-entry TeX-auto-parser)) + +(defun TeX-auto-apply-entry (entry) + "Apply the information in ENTRY in `TeX-auto-parser'." + (let ((value (symbol-value (nth TeX-auto-parser-temporary entry))) + (add (nth TeX-auto-parser-add entry))) + (if value (apply add value)))) + +(defun TeX-safe-auto-write () + "Call `TeX-auto-write' safely." + (condition-case _ignored + (TeX-auto-write) + (error nil)) + ;; Continue with the other write file hooks. + nil) + +(defcustom TeX-auto-save nil + "Automatically save style information when saving the buffer." + :group 'TeX-parse + :type 'boolean) + +(defcustom TeX-auto-untabify nil + "Automatically untabify when saving the buffer." + :group 'TeX-parse + :type 'boolean) + +(defun TeX-auto-write () + "Save all relevant TeX information from the current buffer." + (if TeX-auto-untabify + (untabify (point-min) (point-max))) + (if (and TeX-auto-save TeX-auto-local) + (let* ((file (expand-file-name + (concat + (file-name-as-directory TeX-auto-local) + (TeX-strip-extension nil TeX-all-extensions t) + ".el") + (TeX-master-directory))) + (dir (file-name-directory file))) + ;; Create auto directory if possible. + (if (not (file-exists-p dir)) + (condition-case _ignored + (make-directory dir) + (error nil))) + (if (file-writable-p file) + (save-excursion + (TeX-update-style) + (TeX-auto-store file)) + (message "Can't write style information."))))) + +(defcustom TeX-macro-default (car-safe TeX-macro-private) + "Default directory to search for TeX macros." + :group 'TeX-file + :type 'directory) + +(defcustom TeX-auto-default (car-safe TeX-auto-private) + "Default directory to place automatically generated TeX information." + :group 'TeX-file + :type 'directory) + +(defcustom TeX-ignore-file + "\\(^\\|[/\\]\\)\\(\\.\\|\\.\\.\\|RCS\\|SCCS\\|CVS\\|babel\\..*\\)$" + "Regular expression matching file names to ignore. + +These files or directories will not be considered when searching for +TeX files in a directory." + :group 'TeX-parse + :type 'regexp) + +(defcustom TeX-file-recurse t + "Whether to search TeX directories recursively. +nil means do not recurse, a positive integer means go that far deep in the +directory hierarchy, t means recurse indefinitely." + :group 'TeX-parse + :type '(choice (const :tag "On" t) + (const :tag "Off" nil) + (integer :tag "Depth" :value 1))) + +(defvar TeX-file-extensions) +(defvar BibTeX-file-extensions) +(defvar TeX-Biber-file-extensions) + +;;;###autoload +(defun TeX-auto-generate (tex auto) + "Generate style file for TEX and store it in AUTO. +If TEX is a directory, generate style files for all files in the directory." + (interactive (list (setq TeX-macro-default + (expand-file-name (read-file-name + "TeX file or directory: " + TeX-macro-default + TeX-macro-default 'confirm))) + (setq TeX-auto-default + (expand-file-name (read-file-name + "AUTO lisp directory: " + TeX-auto-default + TeX-auto-default 'confirm))))) + (cond ((not (file-readable-p tex))) + ((string-match TeX-ignore-file tex)) + ((file-directory-p tex) + (let ((files (directory-files (expand-file-name tex))) + (default-directory (file-name-as-directory + (expand-file-name tex))) + (TeX-file-recurse (cond ((symbolp TeX-file-recurse) + TeX-file-recurse) + ((zerop TeX-file-recurse) + nil) + ((1- TeX-file-recurse))))) + (mapcar (lambda (file) + (if (or TeX-file-recurse + (not (file-directory-p file))) + (TeX-auto-generate file auto))) + files))) + ((not (file-newer-than-file-p + tex + (concat (file-name-as-directory auto) + (TeX-strip-extension tex TeX-all-extensions t) + ".el")))) + ((TeX-match-extension tex (TeX-delete-duplicate-strings + (append TeX-file-extensions + BibTeX-file-extensions + TeX-Biber-file-extensions))) + (with-current-buffer (let (enable-local-eval) + (find-file-noselect tex)) + (message "Parsing %s..." tex) + (TeX-auto-store (concat (file-name-as-directory auto) + (TeX-strip-extension tex + TeX-all-extensions + t) + ".el")) + (kill-buffer (current-buffer)) + (message "Parsing %s...done" tex))))) + +;;;###autoload +(defun TeX-auto-generate-global () + "Create global auto directory for global TeX macro definitions." + (interactive) + (unless (file-directory-p TeX-auto-global) + (make-directory TeX-auto-global)) + (let ((TeX-file-extensions '("cls" "sty")) + (BibTeX-file-extensions nil) + (TeX-Biber-file-extensions nil)) + (mapc (lambda (macro) (TeX-auto-generate macro TeX-auto-global)) + TeX-macro-global)) + (byte-recompile-directory TeX-auto-global 0)) + +(defun TeX-auto-store (file) + "Extract information for AUCTeX from current buffer and store it in FILE." + (TeX-auto-parse) + + (if (member nil (mapcar #'TeX-auto-entry-clear-p TeX-auto-parser)) + (let ((style (TeX-strip-extension nil TeX-all-extensions t)) + (class-opts (if (boundp 'LaTeX-provided-class-options) + LaTeX-provided-class-options)) + (pkg-opts (if (boundp 'LaTeX-provided-package-options) + LaTeX-provided-package-options)) + (tex-cmd-opts TeX-command-extra-options) + (verb-envs (when (boundp 'LaTeX-verbatim-environments-local) + LaTeX-verbatim-environments-local)) + (verb-macros-delims (when (boundp 'LaTeX-verbatim-macros-with-delims-local) + LaTeX-verbatim-macros-with-delims-local)) + (verb-macros-braces (when (boundp 'LaTeX-verbatim-macros-with-braces-local) + LaTeX-verbatim-macros-with-braces-local)) + (dialect TeX-style-hook-dialect) + (bibtex-p (eq major-mode 'bibtex-mode))) + (TeX-unload-style style) + (with-current-buffer (generate-new-buffer file) + (erase-buffer) + (insert "(TeX-add-style-hook\n \"" + style "\"\n (lambda ()") + (unless (string= tex-cmd-opts "") + (insert "\n (setq TeX-command-extra-options\n" + " " (prin1-to-string tex-cmd-opts) ")")) + (when class-opts + (insert "\n (TeX-add-to-alist 'LaTeX-provided-class-options\n" + " '" (prin1-to-string class-opts) ")")) + (when pkg-opts + (insert "\n (TeX-add-to-alist 'LaTeX-provided-package-options\n" + " '" (prin1-to-string pkg-opts) ")")) + (dolist (env verb-envs) + (insert + (format "\n (add-to-list 'LaTeX-verbatim-environments-local \"%s\")" + env))) + (dolist (env verb-macros-braces) + (insert + (format "\n (add-to-list 'LaTeX-verbatim-macros-with-braces-local \"%s\")" + env))) + (dolist (env verb-macros-delims) + (insert + (format "\n (add-to-list 'LaTeX-verbatim-macros-with-delims-local \"%s\")" + env))) + (mapc (lambda (el) (TeX-auto-insert el style)) + TeX-auto-parser) + (insert ")") + (if dialect (insert (concat + "\n " + (prin1-to-string + (if bibtex-p + ;; Add :latex since functions such + ;; as `LaTeX-add-bibitems' are + ;; only meaningful in LaTeX + ;; document buffer. + ;; FIXME: BibTeX is available to + ;; plain TeX through eplain + ;; (<URL:https://tug.org/eplain/doc/eplain.html#Citations>). + ;; It would be nice if AUCTeX + ;; supports such usage. + `'(or ,dialect :latex) + dialect))))) + (insert ")\n\n") + (write-region (point-min) (point-max) file nil 'silent) + (kill-buffer (current-buffer)))) + (if (file-exists-p (concat file "c")) + (delete-file (concat file "c"))) + (if (file-exists-p file) + (delete-file file)))) + +(defun TeX-auto-entry-clear-p (entry) + "Check if the temporary for `TeX-auto-parser' entry ENTRY is clear." + ;; FIXME: This doc-string isn't clear to me. -- rs + (null (symbol-value (nth TeX-auto-parser-temporary entry)))) + +(defun TeX-auto-insert (entry &optional skip) + "Insert code to initialize ENTRY from `TeX-auto-parser'. + +If SKIP is not-nil, don't insert code for SKIP." + (let ((name (symbol-name (nth TeX-auto-parser-add entry))) + (list (symbol-value (nth TeX-auto-parser-temporary entry)))) + (unless (null list) + (insert "\n (" name) + (dolist (el list) + (cond ((and (stringp el) (not (string= el skip))) + (insert "\n ") + (insert (prin1-to-string el))) + ((not (stringp el)) + (insert "\n ") + (insert "'" (prin1-to-string el))))) + (insert ")")))) + +(defvar TeX-auto-ignore + '("csname" "filedate" "fileversion" "docdate" "next" "labelitemi" + "labelitemii" "labelitemiii" "labelitemiv" "labelitemv" + "labelenumi" "labelenumii" "labelenumiii" "labelenumiv" + "labelenumv" "theenumi" "theenumii" "theenumiii" "theenumiv" + "theenumv" "document" "par" "do" "expandafter") + "List of symbols to ignore when scanning a TeX style file.") + +(defcustom TeX-auto-regexp-list 'TeX-auto-full-regexp-list + "List of regular expressions used for parsing the current file. +It can also be a name of a variable having such value." + :type '(radio (variable-item TeX-auto-empty-regexp-list) + (variable-item TeX-auto-full-regexp-list) + (variable-item plain-TeX-auto-regexp-list) + (variable-item LaTeX-auto-minimal-regexp-list) + (variable-item LaTeX-auto-label-regexp-list) + (variable-item LaTeX-auto-regexp-list) + (variable :tag "Other") + (repeat :tag "Specify" + (group (regexp :tag "Match") + (sexp :tag "Groups") + symbol))) + :group 'TeX-parse) + (make-variable-buffer-local 'TeX-auto-regexp-list) + +(defun TeX-auto-add-regexp (regexp) + "Add REGEXP to `TeX-auto-regexp-list' if not already a member." + (if (symbolp TeX-auto-regexp-list) + (setq TeX-auto-regexp-list (symbol-value TeX-auto-regexp-list))) + (or (member regexp TeX-auto-regexp-list) + (setq TeX-auto-regexp-list (cons regexp TeX-auto-regexp-list)))) + +(defvar TeX-auto-empty-regexp-list + '(("<IMPOSSIBLE>\\(\\'\\`\\)" 1 ignore)) + "List of regular expressions guaranteed to match nothing.") + +(defvar TeX-token-char + "\\(?:[a-zA-Z]\\|\\cj\\)" + "Regexp matching a character in a TeX macro. + +Please use a shy group if you use a grouping construct, because +the functions/variables which use `TeX-token-char' expect not to +alter the numbering of any ordinary, non-shy groups.") + +(defvar plain-TeX-auto-regexp-list + (let ((token TeX-token-char)) + `((,(concat "\\\\def\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol-check) + (,(concat "\\\\let\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol-check) + (,(concat "\\\\font\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol) + (,(concat "\\\\chardef\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol) + (,(concat "\\\\new\\(?:count\\|dimen\\|muskip\\|skip\\)\\\\\\(" token + "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol) + (,(concat "\\\\newfont{?\\\\\\(" token "+\\)}?") 1 TeX-auto-symbol) + (,(concat "\\\\typein\\[\\\\\\(" token "+\\)\\]") 1 TeX-auto-symbol) + ("\\\\input +\\(\\.*[^#%\\\\\\.\n\r]+\\)\\(\\.[^#%\\\\\\.\n\r]+\\)?" + 1 TeX-auto-file) + (,(concat "\\\\mathchardef\\\\\\(" token "+\\)[^a-zA-Z@]") + 1 TeX-auto-symbol))) + "List of regular expression matching common plain TeX macro definitions.") + +(defvar TeX-auto-full-regexp-list plain-TeX-auto-regexp-list + "Full list of regular expression matching TeX macro definitions.") + +(defvar TeX-auto-prepare-hook nil + "List of hooks to be called before parsing a TeX file.") + +(defvar TeX-auto-cleanup-hook nil + "List of hooks to be called after parsing a TeX file.") + +(defcustom TeX-auto-parse-length 999999 + "Maximal length of TeX file (in characters) that will be parsed." + :group 'TeX-parse + :type 'integer) + (make-variable-buffer-local 'TeX-auto-parse-length) + +(defcustom TeX-auto-x-parse-length 0 + "Maximum length of TeX file that will be parsed additionally. +Use `TeX-auto-x-regexp-list' for parsing the region between +`TeX-auto-parse-length' and this value." + :group 'TeX-parse + :type 'integer) + (make-variable-buffer-local 'TeX-auto-x-parse-length) + +(defcustom TeX-auto-x-regexp-list 'LaTeX-auto-label-regexp-list + "List of regular expressions used for additional parsing. +It can also be a name of a variable having such value. +See `TeX-auto-x-parse-length'." + :type '(radio (variable-item TeX-auto-empty-regexp-list) + (variable-item TeX-auto-full-regexp-list) + (variable-item plain-TeX-auto-regexp-list) + (variable-item LaTeX-auto-minimal-regexp-list) + (variable-item LaTeX-auto-label-regexp-list) + (variable-item LaTeX-auto-regexp-list) + (variable :tag "Other") + (repeat :tag "Specify" + (group (regexp :tag "Match") + (sexp :tag "Groups") + symbol))) + :group 'TeX-parse) + (make-variable-buffer-local 'TeX-auto-x-regexp-list) + +(defun TeX-regexp-group-count (regexp) + "Return number of groups in a REGEXP. This is not foolproof: +you should not use something like `[\\(]' for a character range." + (let (start (n 0)) + (while (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\([^?]" + regexp start) + (setq start (- (match-end 0) 2) + n (1+ n))) + n)) + +(defun TeX-auto-parse-region (regexp-list beg end) + "Parse TeX information according to REGEXP-LIST between BEG and END." + (if (symbolp regexp-list) + (setq regexp-list (and (boundp regexp-list) (symbol-value regexp-list)))) + (if regexp-list + ;; Extract the information. + (let* (groups + (count 1) + (regexp (concat "\\(" + (mapconcat + (lambda(x) + (push (cons count x) groups) + (setq count + (+ 1 count + (TeX-regexp-group-count (car x)))) + (car x)) + regexp-list "\\)\\|\\(") + "\\)")) + syms + lst) + ;; TODO: Emacs allows at most 255 groups in a regexp, see the + ;; "#define MAX_REGNUM 255" in regex-emacs.c. If our regex + ;; has more groups, bad things may happen, e.g., + ;; (match-beginning 271) returns nil although the regexp that + ;; matched contains group number 271. Sadly, MAX_REGNUM is + ;; not exposed to Lisp, so we need to hard-code it here (and + ;; sometimes check if it increased in newer Emacs versions). + (when (> count 255) + (error "The TeX auto-parser's regexp has too many groups (%d)" count)) + (setq count 0) + (goto-char (if end (min end (point-max)) (point-max))) + (while (re-search-backward regexp beg t) + (let* ((entry (cdr (TeX-member nil groups + (lambda (_a b) + (match-beginning (car b)))))) + (symbol (nth 2 entry)) + (match (nth 1 entry))) + (unless (TeX-in-comment) + (looking-at (nth 0 entry)) + (if (fboundp symbol) + (funcall symbol match) + (puthash (if (listp match) + (mapcar #'TeX-match-buffer match) + (TeX-match-buffer match)) + (setq count (1- count)) + (cdr (or (assq symbol syms) + (car (push + (cons symbol + (make-hash-table :test #'equal)) + syms))))))))) + (setq count 0) + (dolist (symbol syms) + (setq lst (symbol-value (car symbol))) + (while lst + (puthash (pop lst) + (setq count (1+ count)) + (cdr symbol))) + (maphash (lambda (key value) + (push (cons value key) lst)) + (cdr symbol)) + (clrhash (cdr symbol)) + (set (car symbol) (mapcar #'cdr (sort lst #'car-less-than-car))))))) + +(defun TeX-auto-parse () + "Parse TeX information in current buffer. + +Call the functions in `TeX-auto-prepare-hook' before parsing, and the +functions in `TeX-auto-cleanup-hook' after parsing." + + (let ((case-fold-search nil)) + + (mapc #'TeX-auto-clear-entry TeX-auto-parser) + (run-hooks 'TeX-auto-prepare-hook) + + (save-excursion + (and (> TeX-auto-x-parse-length TeX-auto-parse-length) + (> (point-max) TeX-auto-parse-length) + (TeX-auto-parse-region TeX-auto-x-regexp-list + TeX-auto-parse-length + TeX-auto-x-parse-length)) + (TeX-auto-parse-region TeX-auto-regexp-list + nil TeX-auto-parse-length)) + + ;; Cleanup ignored symbols. + + ;; NOTE: This is O(N M) where it could be O(N log N + M log M) if we + ;; sorted the lists first. + (while (member (car TeX-auto-symbol) TeX-auto-ignore) + (setq TeX-auto-symbol (cdr TeX-auto-symbol))) + (let ((list TeX-auto-symbol)) + (while (and list (cdr list)) + (if (member (car (cdr list)) TeX-auto-ignore) + (setcdr list (cdr (cdr list))) + (setq list (cdr list))))) + + (run-hooks 'TeX-auto-cleanup-hook))) + +(defun TeX-auto-clear-entry (entry) + "Set the temporary variable in ENTRY to nil." + (set (nth TeX-auto-parser-temporary entry) nil)) + +(defvar LaTeX-auto-end-symbol nil) + +(defun TeX-auto-symbol-check (match) + "Add MATCH to TeX-auto-symbols. +Check for potential LaTeX environments." + (let ((symbol (if (listp match) + (mapcar #'TeX-match-buffer match) + (TeX-match-buffer match)))) + (if (and (stringp symbol) + (string-match "^end\\(.+\\)$" symbol)) + (add-to-list 'LaTeX-auto-end-symbol + (substring symbol (match-beginning 1) (match-end 1))) + (if (listp symbol) + (dolist (elt symbol) + (add-to-list 'TeX-auto-symbol elt)) + (add-to-list 'TeX-auto-symbol symbol))))) + + +;;; File Extensions + +(defgroup TeX-file-extension nil + "File extensions recognized by AUCTeX." + :group 'TeX-file) + +(defcustom TeX-file-extensions '("tex" "sty" "cls" "ltx" "texi" "txi" "texinfo" "dtx") + "File extensions used by manually generated TeX files." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defcustom TeX-all-extensions '("[^.\n]+") + "All possible file extensions." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defcustom TeX-default-extension "tex" + "Default extension for TeX files." + :group 'TeX-file-extension + :type 'string) + + (make-variable-buffer-local 'TeX-default-extension) + +(defvar TeX-doc-extensions + '("dvi" "pdf" "ps" "txt" "html" "dvi\\.gz" "pdf\\.gz" "ps\\.gz" "txt\\.gz" + "html\\.gz" "dvi\\.bz2" "pdf\\.bz2" "ps\\.bz2" "txt\\.bz2" "html\\.bz2") + "File extensions of documentation files.") + +(defcustom docTeX-default-extension "dtx" + "Default extension for docTeX files." + :group 'TeX-file-extension + :type 'string) + +(defvar TeX-output-extension nil + "Extension of TeX output file. +This is either a string or a list with +a string as element. Its value is obtained from `TeX-command-output-list'. +Access to the value should be through the function `TeX-output-extension'.") + + (make-variable-buffer-local 'TeX-output-extension) + +(defcustom TeX-Biber-file-extensions '("bib" "ris" "xml") + "Valid file extensions for Biber files." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defcustom BibTeX-file-extensions '("bib") + "Valid file extensions for BibTeX files." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defcustom BibLaTeX-style-extensions '("bbx") + "Valid file extensions for BibLaTeX styles." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defcustom BibTeX-style-extensions '("bst") + "Valid file extensions for BibTeX styles." + :group 'TeX-file-extension + :type '(repeat (regexp :format "%v"))) + +(defun TeX-match-extension (file &optional extensions) + "Return non-nil if FILE has one of EXTENSIONS. + +If EXTENSIONS is not specified or nil, the value of +`TeX-file-extensions' is used instead." + + (if (null extensions) + (setq extensions TeX-file-extensions)) + + (let ((regexp (concat "\\.\\(" + (mapconcat #'identity extensions "\\|") + "\\)$")) + (case-fold-search t)) + (string-match regexp file))) + +(defun TeX-strip-extension (&optional string extensions nodir nostrip) + "Return STRING without any trailing extension in EXTENSIONS. +If NODIR is t, also remove directory part of STRING. +If NODIR is `path', remove directory part of STRING if it is +equal to the current directory or is a member of +`TeX-macro-private' or `TeX-macro-global'. +If NOSTRIP is set, do not remove extension after all. +STRING defaults to the name of the current buffer. +EXTENSIONS defaults to `TeX-file-extensions'." + + (if (null string) + (setq string (or (buffer-file-name) "<none>"))) + + (if (null extensions) + (setq extensions TeX-file-extensions)) + + (let* ((strip (if (and (not nostrip) + (TeX-match-extension string extensions)) + (substring string 0 (match-beginning 0)) + string)) + (dir (expand-file-name (or (file-name-directory strip) "./")))) + (if (or (eq nodir t) + (string-equal dir (expand-file-name "./")) + (member dir (mapcar #'file-name-as-directory TeX-macro-global)) + (member dir (mapcar #'file-name-as-directory TeX-macro-private))) + (file-name-nondirectory strip) + strip))) + + +;;; File Searching + +(defun TeX-tree-roots () + "Return a list of available TeX tree roots." + (let (list) + (dolist (dir (TeX-tree-expand '("$TEXMFHOME" "$TEXMFMAIN" "$TEXMFLOCAL" + "$TEXMFDIST") + "latex")) + (when (file-readable-p dir) + (cl-pushnew dir list :test #'equal))) + (nreverse list))) + +(defcustom TeX-tree-roots (TeX-tree-roots) + "List of all available TeX tree root directories." + :group 'TeX-file + :type '(repeat directory)) + +;; We keep this function in addition to `TeX-search-files' because it +;; is faster. Since it does not look further into subdirectories, +;; this comes at the price of finding a smaller number of files. +(defun TeX-search-files-kpathsea (var extensions scope nodir strip) + "Return a list of files in directories determined by expanding VAR. +Only files which match EXTENSIONS are returned. SCOPE defines +the scope for the search and can be `local' or `global' besides +nil. If NODIR is non-nil, remove directory part. If STRIP is +non-nil, remove file extension." + (when TeX-kpathsea-path-delimiter + (let ((dirs (if (eq scope 'local) + '("./") + (TeX-tree-expand (list var) nil))) + result) + (if (eq scope 'global) + (setq dirs (delete "./" dirs))) + (setq extensions (concat "\\.\\(?:" + (mapconcat #'identity extensions "\\|") + "\\)\\'") + result (apply #'append (mapcar (lambda (x) + (when (file-readable-p x) + (directory-files + x (not nodir) extensions t))) + dirs))) + (if strip + (mapcar (lambda (x) + (if (string-match extensions x) + (substring x 0 (match-beginning 0)) + x)) + result) + result)))) + +(defun TeX-search-files (&optional directories extensions nodir strip) + "Return a list of all reachable files in DIRECTORIES ending with EXTENSIONS. +If optional argument NODIR is set, remove directory part. +If optional argument STRIP is set, remove file extension. +If optional argument DIRECTORIES is set, search in those directories. +Otherwise, search in all TeX macro directories. +If optional argument EXTENSIONS is not set, use `TeX-file-extensions'" + (when (null extensions) + (setq extensions TeX-file-extensions)) + (when (null directories) + (setq directories (cons "./" (append TeX-macro-private TeX-macro-global)))) + (let (match + (TeX-file-recurse (cond ((symbolp TeX-file-recurse) + TeX-file-recurse) + ((zerop TeX-file-recurse) + nil) + ((1- TeX-file-recurse))))) + (while directories + (let* ((directory (car directories)) + (content (and directory + (file-readable-p directory) + (file-directory-p directory) + (directory-files directory)))) + (setq directories (cdr directories)) + (while content + (let ((file (concat directory (car content)))) + (setq content (cdr content)) + (cond ((string-match TeX-ignore-file file)) + ((not (file-readable-p file))) + ((file-directory-p file) + (if TeX-file-recurse + (setq match + (append match + (TeX-search-files + (list (file-name-as-directory file)) + extensions nodir strip))))) + ((TeX-match-extension file extensions) + (setq match (cons (TeX-strip-extension + file extensions nodir (not strip)) + match)))))))) + match)) + +;; The variables `TeX-macro-private' and `TeX-macro-global' are not +;; used for specifying the directories because the number of +;; directories to be searched should be limited as much as possible +;; and the TeX-macro-* variables are just too broad for this. +(defvar TeX-search-files-type-alist + '((texinputs "${TEXINPUTS}" ("tex/") TeX-file-extensions) + (docs "${TEXDOCS}" ("doc/") TeX-doc-extensions) + (bibinputs "${BIBINPUTS}" ("bibtex/bib/") BibTeX-file-extensions) + (bstinputs "${BSTINPUTS}" ("bibtex/bst/") BibTeX-style-extensions)) + "Alist of filetypes with locations and file extensions. +Each element of the alist consists of a symbol expressing the +filetype, a variable which can be expanded on kpathsea-based +systems into the directories where files of the given type +reside, a list of absolute directories, relative directories +below the root of a TDS-compliant TeX tree or a list of variables +with either type of directories as an alternative for +non-kpathsea-based systems and a list of extensions to be matched +upon a file search. Note that the directories have to end with a +directory separator. + +Each AUCTeX mode should set the variable buffer-locally with a +more specific value. See `LaTeX-search-files-type-alist' for an +example.") + +(defun TeX-search-files-by-type (filetype &optional scope nodir strip) + "Return a list of files in TeX's search path with type FILETYPE. +FILETYPE is a symbol used to choose the search paths and +extensions. See `TeX-search-files-type-alist' for supported +symbols. + +The optional argument SCOPE sets the scope for the search. +Besides nil the symbols `local' and `global' are accepted. +`local' means to search in the current directory only, `global' +in the global directories only and nil in both. + +If optional argument NODIR is non-nil, remove directory part. + +If optional argument STRIP is non-nil, remove file extension." + (let* ((gc-cons-threshold 10000000) + (spec (assq filetype TeX-search-files-type-alist)) + (kpse-var (nth 1 spec)) + (rawdirs (nth 2 spec)) + (exts (nth 3 spec)) + expdirs dirs local-files) + (setq exts (if (symbolp exts) (eval exts t) exts)) + (or (TeX-search-files-kpathsea kpse-var exts scope nodir strip) + (progn + (unless (eq scope 'global) + (setq local-files + (let ((TeX-file-recurse nil)) + (TeX-search-files '("./") exts nodir strip)))) + (if (eq scope 'local) + local-files + (if (null TeX-tree-roots) + (error "No TeX trees available; configure `TeX-tree-roots'") + ;; Expand variables. + (setq expdirs + ;; Don't use `delete-dups' instead of + ;; `TeX-delete-duplicate-strings' here. + ;; Otherwise, when the last element of `rawdirs' + ;; is a variable, its value might be truncated as + ;; side effect. + (TeX-delete-duplicate-strings + (apply #'append + (mapcar (lambda (rawdir) + (if (symbolp rawdir) + (symbol-value rawdir) + (list rawdir))) + rawdirs)))) + ;; Assumption: Either all paths are absolute or all are relative. + (if (file-name-absolute-p (car expdirs)) + (setq dirs expdirs) + ;; Append relative TDS subdirs to all TeX tree roots. + (dolist (root TeX-tree-roots) + (dolist (dir expdirs) + (let ((dir (expand-file-name dir root))) + (unless (member dir dirs) + (setq dirs (append dirs (list dir))))))))) + (append local-files (TeX-search-files dirs exts nodir strip))))))) + +;;; Narrowing + +(defun TeX-narrow-to-group () + "Make text outside current group invisible." + (interactive) + (save-excursion + (widen) + (let ((opoint (point)) + beg end) + (if (null (search-backward "{" nil t)) + (message "Nothing to be narrowed here.") + (setq beg (point)) + (forward-sexp) + (setq end (point)) + (if (< end opoint) + (message "Nothing to be narrowed here.") + (narrow-to-region beg end)))))) +(put 'TeX-narrow-to-group 'disabled t) + +;;; Utilities +;; +;; Some of these functions has little to do with TeX, but nonetheless we +;; should use the "TeX-" prefix to avoid name clashes. + +(defun TeX-listify (elt) + "Return a newly created list with element ELT. +If ELT already is a list, return ELT." + (if (listp elt) elt (list elt))) + +(defun TeX-member (elt list how) + "Return the member ELT in LIST. Comparison done with HOW. +Return nil if ELT is not a member of LIST." + (while (and list (not (funcall how elt (car list)))) + (setq list (cdr list))) + (car-safe list)) + +(defun TeX-elt-of-list-member (elts list) + "Return non-nil if an element of ELTS is a member of LIST." + (catch 'found + (dolist (elt elts) + (when (member elt list) + (throw 'found t))))) + +;; Compatibility alias +(defun TeX-assoc (key list) + (assoc-string key list t)) +(make-obsolete 'TeX-assoc + "use (assoc-string KEY LIST t) instead." "AUCTeX 13.0") + +(defun TeX-match-buffer (n) + "Return the substring corresponding to the N'th match. +See `match-data' for details." + (if (match-beginning n) + (buffer-substring-no-properties (match-beginning n) (match-end n)) + "")) + +(defun TeX-looking-at-backward (regexp &optional limit) + "Return non-nil if the text before point matches REGEXP. +Optional second argument LIMIT gives a max number of characters +to look backward for." + (let ((pos (point))) + (save-excursion + (and (re-search-backward regexp + (if limit (max (point-min) (- (point) limit))) + t) + (eq (match-end 0) pos))))) + +(defun TeX-current-line () + "The current line number." + (format "%d" (1+ (TeX-current-offset)))) + +(defun TeX-current-file-name-master-relative () + "Return current filename, relative to master directory." + (file-relative-name + (buffer-file-name) + (TeX-master-directory))) + +(defun TeX-near-bobp () + "Return t if there's nothing but whitespace between (bob) and (point)." + (save-excursion + (skip-chars-backward " \t\n") + (bobp))) + +(defun TeX-add-to-alist (alist-var new-alist) + "Add NEW-ALIST to the ALIST-VAR. +If an element with the same key as the key of an element of +NEW-ALIST is already present in ALIST-VAR, add the new values to +it; if a matching element is not already present, append the new +element to ALIST-VAR." + ;; Loop over all elements of NEW-ALIST. + (while new-alist + (let* ((new-element (car new-alist)) + ;; Get the element of ALIST-VAR with the same key of the current + ;; element of NEW-ALIST, if any. + (old-element (assoc (car new-element) (symbol-value alist-var)))) + (if old-element + (progn + (set alist-var (delete old-element (symbol-value alist-var))) + ;; Append to `old-element' the values of the current element of + ;; NEW-ALIST. + (mapc (lambda (elt) + (unless (member elt (cdr old-element)) + (setq old-element (append old-element (list elt))))) + (cdr new-element)) + (add-to-list alist-var old-element t)) + (add-to-list alist-var new-element t))) + ;; Next element of NEW-ALIST. + (setq new-alist (cdr new-alist)))) + +;;; Syntax Table + +(defvar TeX-mode-syntax-table (make-syntax-table) + "Syntax table used while in TeX mode.") + + (make-variable-buffer-local 'TeX-mode-syntax-table) + +(progn ; Define TeX-mode-syntax-table. + (modify-syntax-entry (string-to-char TeX-esc) + "\\" TeX-mode-syntax-table) + (modify-syntax-entry ?\f ">" TeX-mode-syntax-table) + (modify-syntax-entry ?\n ">" TeX-mode-syntax-table) + (modify-syntax-entry (string-to-char TeX-grop) + (concat "(" TeX-grcl) + TeX-mode-syntax-table) + (modify-syntax-entry (string-to-char TeX-grcl) + (concat ")" TeX-grop) + TeX-mode-syntax-table) + (modify-syntax-entry ?% "<" TeX-mode-syntax-table) + (modify-syntax-entry ?\" "." TeX-mode-syntax-table) + (modify-syntax-entry ?& "." TeX-mode-syntax-table) + (modify-syntax-entry ?_ "." TeX-mode-syntax-table) + (modify-syntax-entry ?@ "_" TeX-mode-syntax-table) + (modify-syntax-entry ?~ "." TeX-mode-syntax-table) + (modify-syntax-entry ?$ "$" TeX-mode-syntax-table) + (modify-syntax-entry ?' "w" TeX-mode-syntax-table) + (modify-syntax-entry ?« "." TeX-mode-syntax-table) + (modify-syntax-entry ?» "." TeX-mode-syntax-table) + (modify-syntax-entry ?| "." TeX-mode-syntax-table)) + +;;; Menu Support + +(defvar TeX-command-current #'TeX-command-master + "Specify whether to run command on master, buffer or region.") +;; Function used to run external command. + +(defun TeX-command-select-master () + "Determine that the next command will be on the master file." + (interactive) + (message "Next command will be on the master file.") + (setq TeX-command-current #'TeX-command-master)) + +(defun TeX-command-select-buffer () + "Determine that the next command will be on the buffer." + (interactive) + (message "Next command will be on the buffer") + (setq TeX-command-current #'TeX-command-buffer)) + +(defun TeX-command-select-region () + "Determine that the next command will be on the region." + (interactive) + (message "Next command will be on the region") + (setq TeX-command-current #'TeX-command-region)) + +(defvar TeX-command-force nil) +;; If non-nil, TeX-command-query will return the value of this +;; variable instead of quering the user. + +(defun TeX-command-menu (name) + "Execute `TeX-command-list' NAME from a menu." + (let ((TeX-command-force name)) + (funcall TeX-command-current))) + +(defun TeX-command-menu-print (printer command name) + "Print on PRINTER using method COMMAND to run NAME." + (let ((TeX-printer-default (unless (string= printer "Other") printer)) + (TeX-printer-list (and (string= printer "Other") TeX-printer-list)) + (TeX-print-command command) + (TeX-queue-command command)) + (TeX-command-menu name))) + +(defun TeX-command-menu-printer-entry (entry lookup command name) + "Return `TeX-printer-list' ENTRY as a menu item." + (vector (nth 0 entry) + (list 'TeX-command-menu-print + (nth 0 entry) + (or (nth lookup entry) command) + name))) + +(defun TeX-command-menu-entry (entry) + "Return `TeX-command-list' ENTRY as a menu item." + (let ((name (car entry))) + (cond ((and (string-equal name TeX-command-Print) + TeX-printer-list) + (cons TeX-command-Print + (mapcar (lambda (entry) + (TeX-command-menu-printer-entry + entry 1 TeX-print-command name)) + (append TeX-printer-list '(("Other")))))) + ((and (string-equal name TeX-command-Queue) + TeX-printer-list) + (cons TeX-command-Queue + (mapcar (lambda (entry) + (TeX-command-menu-printer-entry + entry 2 TeX-queue-command name)) + (append TeX-printer-list '(("Other")))))) + (t + (vconcat `(,name (TeX-command-menu ,name)) + (nthcdr 5 entry)))))) + +(defconst TeX-command-menu-name "Command" + "Name to be displayed for the command menu in all modes defined by AUCTeX.") + +;;; Keymap + +(defcustom TeX-electric-escape nil + "If non-nil, ``\\'' will offer on-the-fly completion. +In Texinfo-mode, ``@'' will do that job instead and ``\\'' is not +affected. See `TeX-electric-macro' for detail." + :group 'TeX-macro + :type 'boolean) + +(defcustom TeX-electric-sub-and-superscript nil + "If non-nil, insert braces after typing `^' and `_' in math mode." + :group 'TeX-macro + :type 'boolean) + +(defcustom TeX-newline-function #'newline + "Function to be called upon pressing `RET'." + :group 'TeX-indentation + :type '(choice (const newline) + (const newline-and-indent) + (const reindent-then-newline-and-indent) + (sexp :tag "Other"))) + +(defun TeX-insert-backslash (arg) + "Either insert typed key ARG times or call `TeX-electric-macro'. +`TeX-electric-macro' will be called if `TeX-electric-escape' is non-nil." + (interactive "*p") + (if TeX-electric-escape + (TeX-electric-macro) + (self-insert-command arg))) + +(defun TeX-insert-sub-or-superscript (arg) + "Insert typed key ARG times and possibly a pair of braces. +Brace insertion is only done if point is in a math construct and +`TeX-electric-sub-and-superscript' has a non-nil value." + (interactive "*p") + (self-insert-command arg) + (when (and TeX-electric-sub-and-superscript (texmathp)) + (insert (concat TeX-grop TeX-grcl)) + (backward-char))) + +(defun TeX-newline () + "Call the function specified by the variable `TeX-newline-function'." + (interactive) (call-interactively TeX-newline-function)) + +(defvar TeX-mode-map + (let ((map (make-sparse-keymap))) + ;; Standard + ;; (define-key map "\177" #'backward-delete-char-untabify) + (define-key map "\C-c}" #'up-list) + (define-key map "\C-c#" #'TeX-normal-mode) + (define-key map "\C-c\C-n" #'TeX-normal-mode) + (define-key map "\C-c?" #'TeX-documentation-texdoc) + (define-key map "\C-c\C-i" #'TeX-goto-info-page) + (define-key map "\r" #'TeX-newline) + + ;; From tex.el + (define-key map "\"" #'TeX-insert-quote) + (define-key map "$" #'TeX-insert-dollar) + ;; Removed because LaTeX 2e have a better solution to italic correction. + ;; (define-key map "." #'TeX-insert-punctuation) + ;; (define-key map "," #'TeX-insert-punctuation) + (define-key map "\C-c{" #'TeX-insert-braces) + (define-key map "\C-c\C-f" #'TeX-font) + (define-key map "\C-c\C-m" #'TeX-insert-macro) + (define-key map "\\" #'TeX-insert-backslash) + (define-key map "^" #'TeX-insert-sub-or-superscript) + (define-key map "_" #'TeX-insert-sub-or-superscript) + (define-key map "\e\t" #'TeX-complete-symbol) ;*** Emacs 19 way + + (define-key map "\C-c'" #'TeX-comment-or-uncomment-paragraph) ;*** Old way + (define-key map "\C-c:" #'comment-or-uncomment-region) ;*** Old way + (define-key map "\C-c\"" #'TeX-uncomment) ;*** Old way + + (define-key map "\C-c;" #'comment-or-uncomment-region) + (define-key map "\C-c%" #'TeX-comment-or-uncomment-paragraph) + + (define-key map "\C-c\C-t\C-p" #'TeX-PDF-mode) + (define-key map "\C-c\C-t\C-i" #'TeX-interactive-mode) + (define-key map "\C-c\C-t\C-s" #'TeX-source-correlate-mode) + (define-key map "\C-c\C-t\C-r" #'TeX-pin-region) + (define-key map "\C-c\C-w" #'TeX-toggle-debug-bad-boxes); to be removed + (define-key map "\C-c\C-t\C-b" #'TeX-toggle-debug-bad-boxes) + (define-key map "\C-c\C-t\C-w" #'TeX-toggle-debug-warnings) + (define-key map "\C-c\C-t\C-x" #'TeX-toggle-suppress-ignored-warnings) + (define-key map "\C-c\C-v" #'TeX-view) + (define-key map "\C-c\C-d" #'TeX-save-document) + (define-key map "\C-c\C-r" #'TeX-command-region) + (define-key map "\C-c\C-b" #'TeX-command-buffer) + (define-key map "\C-c\C-c" #'TeX-command-master) + (define-key map "\C-c\C-a" #'TeX-command-run-all) + (define-key map "\C-c\C-k" #'TeX-kill-job) + (define-key map "\C-c\C-l" #'TeX-recenter-output-buffer) + (define-key map "\C-c^" #'TeX-home-buffer) + (define-key map "\C-c`" #'TeX-next-error) + ;; Remap bindings of `next-error' + (define-key map [remap next-error] #'TeX-next-error) + ;; Remap bindings of `previous-error' + (define-key map [remap previous-error] #'TeX-previous-error) + ;; From tex-fold.el + (define-key map "\C-c\C-o\C-f" #'TeX-fold-mode) + + ;; Multifile + (define-key map "\C-c_" #'TeX-master-file-ask) ;*** temporary + + (define-key map "\C-xng" #'TeX-narrow-to-group) + map) + "Keymap for common TeX and LaTeX commands.") + +(defun TeX-mode-specific-command-menu (mode) + "Return a Command menu specific to the major MODE." + (list TeX-command-menu-name + :filter (lambda (&rest _ignored) + (TeX-mode-specific-command-menu-entries mode)) + "Bug.")) + +(defun TeX-mode-specific-command-menu-entries (mode) + "Return the entries for a Command menu specific to the major MODE." + (append + `("Command on" + [ "Master File" TeX-command-select-master + :keys "C-c C-c" :style radio + :selected (eq TeX-command-current #'TeX-command-master) + :help "Commands in this menu work on the Master File"] + [ "Buffer" TeX-command-select-buffer + :keys "C-c C-b" :style radio + :selected (eq TeX-command-current #'TeX-command-buffer) + :help "Commands in this menu work on the current buffer"] + [ "Region" TeX-command-select-region + :keys "C-c C-r" :style radio + :selected (eq TeX-command-current #'TeX-command-region) + :help "Commands in this menu work on the region"] + [ "Fix the Region" TeX-pin-region + :active (or (if prefix-arg + (<= (prefix-numeric-value prefix-arg) 0) + (and (boundp 'TeX-command-region-begin) + (markerp TeX-command-region-begin))) + mark-active) + ;;:visible (eq TeX-command-current 'TeX-command-region) + :style toggle + :selected (and (boundp 'TeX-command-region-begin) + (markerp TeX-command-region-begin)) + :help "Fix the region for \"Command on Region\""] + "-" + ["Recenter Output Buffer" TeX-recenter-output-buffer + :help "Show the output of current TeX process"] + ["Kill Job" TeX-kill-job + :help "Kill the current TeX process"] + ["Next Error" TeX-next-error + :help "Jump to the next error of the last TeX run"] + ["Previous Error" TeX-previous-error + :help "Jump to the previous error of the last TeX run" + :visible TeX-parse-all-errors] + ["Error Overview" TeX-error-overview + :help "Open an overview of errors occured in the last TeX run" + :visible TeX-parse-all-errors] + ["Quick View" TeX-view + :help "Start a viewer without prompting"] + "-" + ("TeXing Options" + ,@(mapcar (lambda (x) + (let ((symbol (car x)) (name (nth 1 x))) + `[ ,(format "Use %s engine" name) (TeX-engine-set ',symbol) + :style radio :selected (eq TeX-engine ',symbol) + :help ,(format "Use %s engine for compiling" name) ])) + (TeX-engine-alist)) + "-" + [ "Generate PDF" TeX-PDF-mode + :style toggle :selected TeX-PDF-mode + :active (not (eq TeX-engine 'omega)) + :help "Use PDFTeX to generate PDF instead of DVI"] + ( "PDF from DVI" + :visible TeX-PDF-mode + :help "Compile to DVI with (La)TeX and convert to PDF" + [ "Compile directly to PDF" + (lambda () (interactive) (setq TeX-PDF-from-DVI nil)) + :style radio :selected (null (TeX-PDF-from-DVI)) + :help "Compile directly to PDF without intermediate conversions"] + [ "dvips + ps2pdf" + (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvips")) + :style radio :selected (equal (TeX-PDF-from-DVI) "Dvips") + :help "Convert DVI to PDF with dvips + ps2pdf sequence"] + [ "dvipdfmx" + (lambda () (interactive) (setq TeX-PDF-from-DVI "Dvipdfmx")) + :style radio :selected (equal (TeX-PDF-from-DVI) "Dvipdfmx") + :help "Convert DVI to PDF with dvipdfmx"]) + [ "Run Interactively" TeX-interactive-mode + :style toggle :selected TeX-interactive-mode :keys "C-c C-t C-i" + :help "Stop on errors in a TeX run"] + [ "Correlate I/O" TeX-source-correlate-mode + :style toggle :selected TeX-source-correlate-mode + :help "Enable forward and inverse search in the previewer"] + ["Debug Bad Boxes" TeX-toggle-debug-bad-boxes + :style toggle :selected TeX-debug-bad-boxes :keys "C-c C-t C-b" + :help "Make \"Next Error\" show overfull and underfull boxes"] + ["Debug Warnings" TeX-toggle-debug-warnings + :style toggle :selected TeX-debug-warnings + :help "Make \"Next Error\" show warnings"]) + ["Compile and view" TeX-command-run-all + :help "Compile the document until it is ready and open the viewer"]) + (delq nil + (mapcar #'TeX-command-menu-entry + (TeX-mode-specific-command-list mode))))) + +(defun TeX-mode-specific-command-list (mode) + "Return the list of commands available in the given MODE." + (let ((full-list TeX-command-list) + out-list + entry) + (while (setq entry (pop full-list)) + ;; `(nth 4 entry)' may be either an atom in case of which the + ;; entry should be present in any mode or a list of major modes. + (if (or (atom (nth 4 entry)) + (memq mode (nth 4 entry))) + (push entry out-list))) + (nreverse out-list))) + +(defvar TeX-fold-menu + '("Show/Hide" + ["Fold Mode" TeX-fold-mode + :style toggle + :selected (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Toggle folding mode"] + "-" + ["Hide All in Current Buffer" TeX-fold-buffer + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide all configured TeX constructs in the current buffer"] + ["Hide All in Current Region" TeX-fold-region + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide all configured TeX constructs in the marked region"] + ["Hide All in Current Paragraph" TeX-fold-paragraph + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide all configured TeX constructs in the paragraph containing point"] + ["Hide Current Macro" TeX-fold-macro + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide the macro containing point"] + ["Hide Current Environment" TeX-fold-env + :visible (not (eq major-mode 'plain-tex-mode)) + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide the environment containing point"] + ["Hide Current Comment" TeX-fold-comment + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide the comment containing point"] + "-" + ["Show All in Current Buffer" TeX-fold-clearout-buffer + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Permanently show all folded content again"] + ["Show All in Current Region" TeX-fold-clearout-region + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Permanently show all folded content in marked region"] + ["Show All in Current Paragraph" TeX-fold-clearout-paragraph + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Permanently show all folded content in paragraph containing point"] + ["Show Current Item" TeX-fold-clearout-item + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Permanently show the item containing point"] + "-" + ["Hide or Show Current Item" TeX-fold-dwim + :active (and (boundp 'TeX-fold-mode) TeX-fold-mode) + :help "Hide or show the item containing point"]) + "Menu definition for commands from tex-fold.el.") + +(defvar TeX-customization-menu nil) + +(defvar TeX-common-menu-entries + `(("Multifile/Parsing" + ["Switch to Master File" TeX-home-buffer + :help "Switch to buffer of Master File, or buffer of last TeX command"] + ["Save Document" TeX-save-document + :help "Save all buffers associated with the current Master File"] + ["Set Master File" TeX-master-file-ask + :active (not (TeX-local-master-p)) + :help "Set the main file to run TeX commands on"] + ["Reset Buffer" TeX-normal-mode + :help "Save and reparse the current buffer for style information"] + ["Reset AUCTeX" (TeX-normal-mode t) :keys "C-u C-c C-n" + :help "Reset buffer and reload AUCTeX style files"]) + ["Find Documentation..." TeX-documentation-texdoc + :help "Get help on commands, packages, or TeX-related topics in general"] + ["Read the AUCTeX Manual" TeX-goto-info-page + :help "Everything worth reading"] + ("Customize AUCTeX" + ["Browse Options" + (customize-group 'AUCTeX) + :help "Open the customization buffer for AUCTeX"] + ["Extend this Menu" + (progn + (easy-menu-add-item + nil + ;; Ugly hack because docTeX mode uses the LaTeX menu. + (list (if (eq major-mode 'doctex-mode) "LaTeX" TeX-base-mode-name)) + (or TeX-customization-menu + (setq TeX-customization-menu + (customize-menu-create 'AUCTeX "Customize AUCTeX"))))) + :help "Make this menu a full-blown customization menu"]) + ["Report AUCTeX Bug" TeX-submit-bug-report + :help ,(format "Problems with AUCTeX %s? Mail us!" + AUCTeX-version)])) + + +;;; Verbatim constructs + +(defvar TeX-verbatim-p-function nil + "Mode-specific function to be called by `TeX-verbatim-p'. +It must accept optional argument POS for position.") +(make-variable-buffer-local 'TeX-verbatim-p-function) + +;; XXX: We only have an implementation for LaTeX mode at the moment (Oct 2009). +(defun TeX-verbatim-p (&optional pos) + "Return non-nil if position POS is in a verbatim-like construct. +A mode-specific implementation is required. If it is not +available, the function always returns nil." + (when TeX-verbatim-p-function + (funcall TeX-verbatim-p-function pos))) + + +;;; Comments + +(defvar TeX-comment-start-regexp "%" + "Regular expression matching a comment starter. +Unlike the variable `comment-start-skip' it should not match any +whitespace after the comment starter or any character before it.") +(make-variable-buffer-local 'TeX-comment-start-regexp) + +(defun TeX-uncomment () + "Delete comment characters from the beginning of each line in a comment." + (interactive) + (save-excursion + ;; Find first comment line + (beginning-of-line) + (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp)) + (not (bobp))) + (forward-line -1)) + (let ((beg (point))) + (forward-line 1) + ;; Find last comment line + (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp)) + (not (eobp))) + (forward-line 1)) + ;; Uncomment region + (uncomment-region beg (point))))) + +(defun TeX-comment-or-uncomment-paragraph () + "Comment or uncomment current paragraph." + (interactive) + (if (TeX-in-commented-line) + (TeX-uncomment) + (save-excursion + (beginning-of-line) + ;; Don't do anything if we are in an empty line. If this line + ;; is followed by a lot of commented lines, this shall prevent + ;; that mark-paragraph skips over these lines and marks a + ;; paragraph outside the visible window which might get + ;; commented without the user noticing. + (unless (looking-at "^[ \t]*$") + (mark-paragraph) + (comment-region (point) (mark)))))) + +(defun TeX-in-comment () + "Return non-nil if point is in a comment." + (if (or (bolp) + (null comment-start-skip) + (eq (preceding-char) ?\r)) + nil + (save-excursion + (save-match-data + (let ((pos (point))) + (beginning-of-line) + (and (or (looking-at comment-start-skip) + (re-search-forward comment-start-skip pos t)) + (not (TeX-verbatim-p)))))))) + +(defun TeX-in-commented-line () + "Return non-nil if point is in a line consisting only of a comment. +The comment can be preceded by whitespace. This means that +`TeX-in-commented-line' is more general than `TeX-in-line-comment' +which will not match commented lines with leading whitespace. But +`TeX-in-commented-line' will match commented lines without leading +whitespace as well." + (save-excursion + (forward-line 0) + (skip-chars-forward " \t") + (string= (buffer-substring-no-properties + (point) (min (point-max) (+ (point) (length comment-start)))) + comment-start))) + +(defun TeX-in-line-comment () + "Return non-nil if point is in a line comment. +A line comment is a comment starting in column one, that is, there is +no whitespace before the comment sign." + (save-excursion + (forward-line 0) + (string= (buffer-substring-no-properties + (point) (min (point-max) (+ (point) (length comment-start)))) + comment-start))) + +(defun TeX-comment-prefix () + "Return the comment prefix of the current line. +If there are no comment starters after potential whitespace at +the beginning of the line, return nil." + (save-excursion + (beginning-of-line) + (save-match-data + (when (looking-at (concat "\\([ \t]*" TeX-comment-start-regexp "+\\)+")) + (match-string 0))))) + +(defun TeX-forward-comment-skip (&optional count limit) + "Move forward to the next comment skip. +This may be a switch between commented and not commented adjacent +lines or between lines with different comment prefixes. With +argument COUNT do it COUNT times. If argument LIMIT is given, do +not move point further than this value." + (unless count (setq count 1)) + ;; A value of 0 is nonsense. + (when (= count 0) (setq count 1)) + (unless limit (setq limit (point-max))) + (dotimes (_ (abs count)) + (if (< count 0) + (forward-line -1) + (beginning-of-line)) + (let ((prefix (when (looking-at (concat "\\([ \t]*" + TeX-comment-start-regexp "+\\)+")) + (buffer-substring (+ (line-beginning-position) + (current-indentation)) + (match-end 0))))) + (while (save-excursion + (and (if (> count 0) + (<= (point) limit) + (>= (point) limit)) + (zerop (if (> count 0) + (forward-line 1) + (forward-line -1))) + (if prefix + (if (looking-at (concat "\\([ \t]*" + TeX-comment-start-regexp + "+\\)+")) + ;; If the preceding line is a commented line + ;; as well, check if the prefixes are + ;; identical. + (string= prefix + (buffer-substring + (+ (line-beginning-position) + (current-indentation)) + (match-end 0))) + nil) + (not (looking-at (concat "[ \t]*" + TeX-comment-start-regexp)))))) + (if (> count 0) + (forward-line 1) + (forward-line -1))) + (if (> count 0) + (forward-line 1))))) + +(defun TeX-backward-comment-skip (&optional count limit) + "Move backward to the next comment skip. +This may be a switch between commented and not commented adjacent +lines or between lines with different comment prefixes. With +argument COUNT do it COUNT times. If argument LIMIT is given, do +not move point to a position less than this value." + (unless count (setq count 1)) + (when (= count 0) (setq count 1)) + (unless limit (setq limit (point-min))) + (TeX-forward-comment-skip (- count) limit)) + +(defun TeX-comment-forward (&optional n) + "Skip forward over N comments. +Just like `forward-comment' but only for positive N +and can use regexps instead of syntax." + (comment-normalize-vars) + (comment-forward n)) + +(defun TeX-comment-padding-string () + "Return comment padding as a string. +The variable `comment-padding' can hold an integer or a string. +This function will return the appropriate string representation +regardless of its data type." + (if (integerp comment-padding) + (make-string comment-padding ? ) + comment-padding)) + + +;;; Indentation + +(defgroup TeX-indentation nil + "Indentation of TeX buffers in AUCTeX." + :group 'AUCTeX) + +(defcustom TeX-brace-indent-level 2 + "The level of indentation produced by an open brace." + :group 'TeX-indentation + :type 'integer) + +(defcustom TeX-indent-open-delimiters "" + "Additional open delimiters to increase indentation. +Include \"[\" to indent inside square brackets. +See `TeX-brace-count-line' and `TeX-indent-close-delimiters'." + :group 'TeX-indentation + :type '(string :tag "Open delimiters")) + +(defcustom TeX-indent-close-delimiters "" + "Additional close delimiters to increase indentation. +Include \"]\" to indent inside square brackets. +See `TeX-brace-count-line' and `TeX-indent-open-delimiters'." + :group 'TeX-indentation + :type '(string :tag "Close delimiters")) + +(defun TeX-comment-indent () + "Determine the indentation of a comment." + (if (looking-at "%%%") + (current-column) + (skip-chars-backward " \t") + (max (if (bolp) 0 (1+ (current-column))) + comment-column))) + +(defun TeX-brace-count-line () + "Count indent caused by open/closed braces. +In addition to \"{\" and \"}\", characters in +`TeX-indent-open-delimiters' and `TeX-indent-close-delimiters' +are also taken into account. Ignore them when they are escaped +by \"\\\". In comments, ignore \"{\" and \"}\" but don't ignore +additional characters." + (save-excursion + (let ((count 0) (limit (line-end-position)) char) + (while (progn + (skip-chars-forward + (concat "^{}\\\\" + TeX-indent-open-delimiters + TeX-indent-close-delimiters) + limit) + (when (and (< (point) limit) + (not (and (memq (setq char (char-after)) + '(?\{ ?\} ?\\)) + (TeX-in-comment)))) + (forward-char) + (cond ((memq char (append + TeX-indent-open-delimiters + '(?\{))) + (setq count (+ count TeX-brace-indent-level))) + ((memq char (append + TeX-indent-close-delimiters + '(?\}))) + (setq count (- count TeX-brace-indent-level))) + ((eq char ?\\) + (when (< (point) limit) + (forward-char) + t)))))) + count))) + +;;; Navigation + +(defvar TeX-search-syntax-table + (let ((table (make-syntax-table (make-char-table 'syntax-table)))) + ;; Preset mode-independent syntax entries. (Mode-dependent + ;; entries are set in the function `TeX-search-syntax-table'.) + ;; ?\", ?\( and ?\) explicitly get whitespace syntax because + ;; Emacs 21.3 and XEmacs don't generate a completely empty syntax + ;; table. + (dolist (elt '((?\f . ">") (?\n . ">") (?\" . " ") (?\( . " ") (?\) . " "))) + (modify-syntax-entry (car elt) (cdr elt) table)) + table) + "Syntax table used for searching purposes. +It should be accessed through the function `TeX-search-syntax-table'.") + +(defun TeX-search-syntax-table (&rest args) + "Return a syntax table for searching purposes. +ARGS may be a list of characters. For each of them the +respective predefined syntax is set. Currently the parenthetical +characters ?{, ?}, ?[, ?], ?\(, ?\), ?<, and ?> are supported. +The syntax of each of these characters not specified will be +reset to \" \"." + (let ((char-syntax-alist '((?\{ . "(}") (?\} . "){") + (?\[ . "(]") (?\] . ")[") + (?\( . "()") (?\) . ")(") + (?\< . "(>") (?\> . ")<")))) + ;; Clean entries possibly set before. + (modify-syntax-entry ?\\ " " TeX-search-syntax-table) + (modify-syntax-entry ?@ " " TeX-search-syntax-table) + (modify-syntax-entry ?\% " " TeX-search-syntax-table) + ;; Preset mode-dependent syntax entries. (Mode-independent entries + ;; are set when the variable `TeX-search-syntax-table' is created.) + (modify-syntax-entry (string-to-char TeX-esc) "\\" TeX-search-syntax-table) + (unless (eq major-mode 'texinfo-mode) + (modify-syntax-entry ?\% "<" TeX-search-syntax-table)) + ;; Clean up the entries which can be specified as arguments. + (dolist (elt char-syntax-alist) + (modify-syntax-entry (car elt) " " TeX-search-syntax-table)) + ;; Now set what we got. + (dolist (elt args) + (unless (assoc elt char-syntax-alist) (error "Char not supported")) + (modify-syntax-entry elt (cdr (assoc elt char-syntax-alist)) + TeX-search-syntax-table)) + ;; Return the syntax table. + TeX-search-syntax-table)) + +(defun TeX-find-balanced-brace (&optional count depth limit) + "Return the position of a balanced brace in a TeX group. +The function scans forward COUNT parenthetical groupings. +Default is 1. If COUNT is negative, it searches backwards. With +optional DEPTH>=1, find that outer level. If LIMIT is non-nil, +do not search further than this position in the buffer." + (let ((count (if count + (if (= count 0) (error "COUNT has to be <> 0") count) + 1)) + (depth (if depth + (if (< depth 1) (error "DEPTH has to be > 0") depth) + 1))) + (save-restriction + (when limit + (if (> count 0) + (narrow-to-region (point-min) limit) + (narrow-to-region limit (point-max)))) + (with-syntax-table (TeX-search-syntax-table ?\{ ?\}) + (condition-case nil + (scan-lists (point) count depth) + (error nil)))))) + +(defun TeX-find-closing-brace (&optional depth limit) + "Return the position of the closing brace in a TeX group. +The function assumes that point is inside the group, that is, after +an opening brace. With optional DEPTH>=1, find that outer level. +If LIMIT is non-nil, do not search further down than this +position in the buffer." + (TeX-find-balanced-brace 1 depth limit)) + +(defun TeX-find-opening-brace (&optional depth limit) + "Return the position of the opening brace in a TeX group. +The function assumes that point is inside the group, that is, before +a closing brace. With optional DEPTH>=1, find that outer level. +If LIMIT is non-nil, do not search further up than this position +in the buffer." + (TeX-find-balanced-brace -1 depth limit)) + +(defun TeX-find-macro-boundaries (&optional lower-bound) + "Return a list containing the start and end of a macro. +If LOWER-BOUND is given, do not search backward further than this +point in buffer. Arguments enclosed in brackets or braces are +considered part of the macro." + (save-restriction + (when lower-bound + (narrow-to-region lower-bound (point-max))) + (let ((orig-point (point)) + start-point) + ;; Point is located directly at the start of a macro. (-!-\foo{bar}) + (when (and (eq (char-after) (aref TeX-esc 0)) + (not (TeX-escaped-p))) + (setq start-point (point))) + ;; Point is located on a macro. (\fo-!-o{bar}) + (unless start-point + (save-excursion + (skip-chars-backward "A-Za-z@*") + (when (and (eq (char-before) (aref TeX-esc 0)) + (not (TeX-escaped-p (1- (point))))) + (setq start-point (1- (point)))))) + ;; Point is located in the argument of a macro. (\foo{ba-!-r}) + (unless start-point + (save-excursion + (catch 'abort + (let ((parse-sexp-ignore-comments t)) + (when (condition-case nil (progn (up-list) t) (error nil)) + (while (progn + (condition-case nil (backward-sexp) + (error (throw 'abort nil))) + (forward-comment -1) + (and (memq (char-before) '(?\] ?\})) + (not (TeX-escaped-p (1- (point))))))) + (skip-chars-backward "A-Za-z@*") + (when (and (eq (char-before) (aref TeX-esc 0)) + (not (TeX-escaped-p (1- (point))))) + (setq start-point (1- (point))))))))) + ;; Search forward for the end of the macro. + (when start-point + (save-excursion + (goto-char (TeX-find-macro-end-helper start-point)) + (if (< orig-point (point)) + (cons start-point (point)) + nil)))))) + +(defun TeX-find-macro-end-helper (start) + "Find the end of a macro given its START. +START is the position just before the starting token of the macro. +If the macro is followed by square brackets or curly braces, +those will be considered part of it." + (save-excursion + (save-match-data + (catch 'found + (goto-char (1+ start)) + (if (zerop (skip-chars-forward "A-Za-z@")) + (forward-char) + (skip-chars-forward "*")) + (while (not (eobp)) + (cond + ;; Skip over pairs of square brackets + ((or (looking-at "[ \t]*\n?\\(\\[\\)") ; Be conservative: Consider + ; only consecutive lines. + (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp)) + (save-excursion + (forward-line 1) + (looking-at "[ \t]*\\(\\[\\)")))) + (goto-char (match-beginning 1)) + (condition-case nil + (forward-sexp) + (scan-error (throw 'found (point))))) + ;; Skip over pairs of curly braces + ((or (looking-at "[ \t]*\n?{") ; Be conservative: Consider + ; only consecutive lines. + (and (looking-at (concat "[ \t]*" TeX-comment-start-regexp)) + (save-excursion + (forward-line 1) + (looking-at "[ \t]*{")))) + (goto-char (match-end 0)) + (goto-char (or (TeX-find-closing-brace) + ;; If we cannot find a regular end, use the + ;; next whitespace. + (save-excursion (skip-chars-forward "^ \t\n") + (point))))) + (t + (throw 'found (point))))) + ;; Make sure that this function does not return nil, even + ;; when the above `while' loop is totally skipped. (bug#35638) + (throw 'found (point)))))) + +(defun TeX-find-macro-start (&optional limit) + "Return the start of a macro. +If LIMIT is given, do not search backward further than this point +in buffer. Arguments enclosed in brackets or braces are +considered part of the macro." + (car (TeX-find-macro-boundaries limit))) + +(defun TeX-find-macro-end () + "Return the end of a macro. +Arguments enclosed in brackets or braces are considered part of +the macro." + (cdr (TeX-find-macro-boundaries))) + +(defun TeX-search-forward-unescaped (string &optional bound noerror) + "Search forward from point for unescaped STRING. +The optional argument BOUND limits the search to the respective +buffer position. +If NOERROR is non-nil, return nil if the search failed instead of +throwing an error. +A pattern is escaped, if it is preceded by an odd number of escape +characters." + (TeX-search-unescaped string 'forward nil bound noerror)) + +(defun TeX-search-backward-unescaped (string &optional bound noerror) + "Search backward from point for unescaped STRING. +The optional argument BOUND limits the search to the respective +buffer position. +If NOERROR is non-nil, return nil if the search failed instead of +throwing an error. +A pattern is escaped, if it is preceded by an odd number of escape +characters." + (TeX-search-unescaped string 'backward nil bound noerror)) + +(defun TeX-re-search-forward-unescaped (regexp &optional bound noerror) + "Search forward from point for unescaped regular expression REGEXP. +The optional argument BOUND limits the search to the respective +buffer position. +If NOERROR is non-nil, return nil if the search failed instead of +throwing an error. +A pattern is escaped, if it is preceded by an odd number of escape +characters." + (TeX-search-unescaped regexp 'forward t bound noerror)) + +(defun TeX-search-unescaped (pattern + &optional direction regexp-flag bound noerror) + "Search for unescaped PATTERN in a certain DIRECTION. +DIRECTION can be indicated by the symbols 'forward and 'backward. +If DIRECTION is omitted, a forward search is carried out. +If REGEXP-FLAG is non-nil, PATTERN may be a regular expression, +otherwise a string. +The optional argument BOUND limits the search to the respective +buffer position. +If NOERROR is non-nil, return nil if the search failed instead of +throwing an error. +A pattern is escaped, if it is preceded by an odd number of escape +characters." + (let ((search-fun (if (eq direction 'backward) + (if regexp-flag 're-search-backward 'search-backward) + (if regexp-flag 're-search-forward 'search-forward)))) + (catch 'found + (while (funcall search-fun pattern bound noerror) + (when (not (TeX-escaped-p (match-beginning 0))) + (throw 'found (point))))))) + +(defun TeX-escaped-p (&optional pos) + "Return t if the character at position POS is escaped. +If POS is omitted, examine the character at point. +A character is escaped if it is preceded by an odd number of +escape characters, such as \"\\\" in LaTeX." + (save-excursion + (when pos (goto-char pos)) + (not (zerop (mod (skip-chars-backward (regexp-quote TeX-esc)) 2))))) + +(defun TeX-current-macro () + "Return the name of the macro containing point, nil if there is none." + (let ((macro-start (TeX-find-macro-start))) + (when macro-start + (save-excursion + (goto-char macro-start) + (forward-char (length TeX-esc)) + (buffer-substring-no-properties + (point) (progn (skip-chars-forward "@A-Za-z*") (point))))))) + +(defvar TeX-search-forward-comment-start-function nil + "Function to find the start of a comment. +The function should accept an optional argument for specifying +the limit of the search. It should return the position just +before the comment if one is found and nil otherwise. Point +should not be moved.") +(make-variable-buffer-local 'TeX-search-forward-comment-start-function) + +(defun TeX-search-forward-comment-start (&optional limit) + "Search forward for a comment start from current position till LIMIT. +If LIMIT is omitted, search till the end of the buffer. + +The search relies on `TeX-comment-start-regexp' being set +correctly for the current mode. + +Set `TeX-search-forward-comment-start-function' in order to +override the default implementation." + (if TeX-search-forward-comment-start-function + (funcall TeX-search-forward-comment-start-function limit) + (setq limit (or limit (point-max))) + (when (TeX-re-search-forward-unescaped TeX-comment-start-regexp limit t) + (match-beginning 0)))) + +;;; Fonts + +(defcustom TeX-font-list '((?\C-b "{\\bf " "}") + (?\C-c "{\\sc " "}") + (?\C-e "{\\em " "\\/}") + (?\C-i "{\\it " "\\/}") + (?\C-r "{\\rm " "}") + (?\C-s "{\\sl " "\\/}") + (?\C-t "{\\tt " "}") + (?\C-d "" "" t)) + "List of fonts used by `TeX-font'. + +Each entry is a list. +The first element is the key to activate the font. +The second element is the string to insert before point, and the third +element is the string to insert after point. +If the fourth and fifth element are strings, they specify the prefix and +suffix to be used in math mode. +An optional fourth (or sixth) element means always replace if t." + :group 'TeX-macro + :type '(repeat + (group + :value (?\C-a "" "") + (character :tag "Key") + (string :tag "Prefix") + (string :tag "Suffix") + (option (group + :inline t + (string :tag "Math Prefix") + (string :tag "Math Suffix"))) + (option (sexp :format "Replace\n" :value t))))) + +(defvar TeX-font-replace-function #'TeX-font-replace + "Determines the function which is called when a font should be replaced.") + +(defun TeX-describe-font-entry (entry) + "A textual description of an ENTRY in `TeX-font-list'." + (concat (format "%16s " (key-description (char-to-string (nth 0 entry)))) + (if (or (eq t (nth 3 entry)) (eq t (nth 5 entry))) + "-- delete font" + (format "%14s %-3s %14s %-3s" + (nth 1 entry) (nth 2 entry) + (if (stringp (nth 3 entry)) (nth 3 entry) "") + (if (stringp (nth 4 entry)) (nth 4 entry) ""))))) + +(defun TeX-font (replace what) + "Insert template for font change command. +If REPLACE is not nil, replace current font. WHAT determines the font +to use, as specified by `TeX-font-list'." + (interactive "*P\nc") + (TeX-update-style) + (let* ((entry (assoc what TeX-font-list)) + (in-math (texmathp)) + (before (nth 1 entry)) + (after (nth 2 entry))) + (setq replace (or replace (eq t (nth 3 entry)) (eq t (nth 5 entry)))) + (if (and in-math (stringp (nth 3 entry))) + (setq before (nth 3 entry) + after (nth 4 entry))) + (cond ((null entry) + (let ((help (concat + "Font list: " + "KEY TEXTFONT MATHFONT\n\n" + (mapconcat #'TeX-describe-font-entry + TeX-font-list "\n")))) + (with-output-to-temp-buffer "*Help*" + (set-buffer "*Help*") + (insert help)))) + (replace + (funcall TeX-font-replace-function before after)) + ((TeX-active-mark) + (save-excursion + (cond ((> (mark) (point)) + (insert before) + (goto-char (mark)) + (insert after)) + (t + (insert after) + (goto-char (mark)) + (insert before))))) + (t + (insert before) + (save-excursion + (insert after)))))) + +(defun TeX-font-replace (start end) + "Replace font specification around point with START and END. +For modes with font specifications like `{\\font text}'. +See also `TeX-font-replace-macro' and `TeX-font-replace-function'." + (save-excursion + (while (not (looking-at "{\\\\[a-zA-Z]+ ")) + (up-list -1)) + (forward-sexp) + (save-excursion + (replace-match start t t)) + (if (save-excursion + (backward-char 3) + (if (looking-at (regexp-quote "\\/}")) + (progn + (delete-char 3) + nil) + t)) + (delete-char -1)) + (insert end))) + +(defun TeX-font-replace-macro (start end) + "Replace font specification around point with START and END. +For modes with font specifications like `\\font{text}'. +See also `TeX-font-replace' and `TeX-font-replace-function'." + (let ((font-list TeX-font-list) + cmds strings regexp) + (while font-list + (setq strings (cdr (car font-list)) + font-list (cdr font-list)) + (and (stringp (car strings)) (null (string= (car strings) "")) + (setq cmds (cons (car strings) cmds))) + (setq strings (cdr (cdr strings))) + (and (stringp (car strings)) (null (string= (car strings) "")) + (setq cmds (cons (car strings) cmds)))) + (setq regexp (mapconcat #'regexp-quote cmds "\\|")) + (save-excursion + (catch 'done + (while t + (if (/= ?\\ (following-char)) + (skip-chars-backward "a-zA-Z ")) + (skip-chars-backward (regexp-quote TeX-esc)) + (if (looking-at regexp) + (throw 'done t) + (up-list -1)))) + ;; Use stripped syntax table in order to get stuff like "\emph{(}" right. + (with-syntax-table (TeX-search-syntax-table ?\{ ?\}) + (forward-sexp 2)) + (save-excursion + (replace-match start t t)) + (delete-char -1) + (insert end)))) + +;;; Dollars +;; +;; Rewritten from scratch with use of `texmathp' by +;; Carsten Dominik <dominik@strw.leidenuniv.nl> + +(defvar TeX-symbol-marker nil) + +(defvar TeX-symbol-marker-pos 0) + +;; The following constants are no longer used, but kept in case some +;; foreign code uses any of them. +(defvar TeX-dollar-sign ?$ + "Character used to enter and leave math mode in TeX.") +(defconst TeX-dollar-string (char-to-string TeX-dollar-sign)) +(defconst TeX-dollar-regexp + (concat "^" (regexp-quote TeX-dollar-string) "\\|[^" TeX-esc "]" + (regexp-quote TeX-dollar-string))) + +(defcustom TeX-math-toggle-off-input-method t + "If non-nil, auto turn off some input methods when entering math mode. +See `TeX-math-input-method-off-regexp'." + :group 'TeX-macro + :type 'boolean) + +(defcustom TeX-electric-math nil + "If non-nil, when outside math mode `TeX-insert-dollar' will +insert symbols for opening and closing inline equation and put +the point between them. If there is an active region, +`TeX-insert-dollar' will put around it symbols for opening and +closing inline equation and keep the region active, with point +after closing symbol. If you press `$' again, you can toggle +between inline equation, display equation, and no equation. + +If non-nil and point is inside math mode right between a couple +of single dollars, pressing `$' will insert another pair of +dollar signs and leave the point between them. + +If nil, `TeX-insert-dollar' will simply insert \"$\" at point, +this is the default. + +If non-nil, this variable is a cons cell whose CAR is the string +to insert before point, the CDR is the string to insert after +point. You can choose between \"$...$\" and \"\\(...\\)\"." + :group 'TeX-macro + :type '(choice (const :tag "No electricity" nil) + (const :tag "$...$" ("$" . "$")) + (const :tag "\\(...\\)" ("\\(" . "\\)")) + (cons :tag "Other" + (string :tag "Insert before point") + (string :tag "Insert after point")))) + +(defun TeX-insert-dollar (&optional arg) + "Insert dollar sign. + +If current math mode was not entered with a dollar, refuse to +insert one. Show matching dollar sign if this dollar sign ends +the TeX math mode and `blink-matching-paren' is non-nil. + +When outside math mode, the behavior is controlled by the variable +`TeX-electric-math'. + +With raw \\[universal-argument] prefix, insert exactly one dollar +sign. With optional ARG, insert that many dollar signs." + (interactive "P") + (cond + ((and arg (listp arg)) + ;; C-u always inserts one + (insert "$")) + (arg + ;; Numerical arg inserts that many + (insert (make-string (prefix-numeric-value arg) ?\$))) + ((or (TeX-escaped-p) (TeX-verbatim-p)) + ;; Point is escaped with `\' or is in a verbatim-like construct, so just + ;; insert one $. + (insert "$")) + ((texmathp) + ;; We are inside math mode + (cond + ((and TeX-electric-math + (eq (preceding-char) ?\$) + (eq (following-char) ?\$)) + ;; Point is between "$$" and `TeX-electric-math' is non-nil - insert + ;; another pair of dollar signs and leave point between them. + (insert "$$") + (backward-char)) + ((and (stringp (car texmathp-why)) + (string-equal (substring (car texmathp-why) 0 1) "\$")) + ;; Math mode was turned on with $ or $$ - insert a single $. + (insert "$") + ;; Compatibility, `TeX-math-close-double-dollar' has been removed + ;; after AUCTeX 11.87. + (if (boundp 'TeX-math-close-double-dollar) + (message + (concat "`TeX-math-close-double-dollar' has been removed," + "\nplease use `TeX-electric-math' instead."))) + (when (and blink-matching-paren + (or (string= (car texmathp-why) "$") + (zerop (mod (save-excursion + (skip-chars-backward "$")) 2)))) + (save-excursion + (goto-char (cdr texmathp-why)) + (if (pos-visible-in-window-p) + (sit-for blink-matching-delay) + (message "Matches %s" + (buffer-substring + (point) (progn (end-of-line) (point)))))))) + (t + ;; Math mode was not entered with dollar - we cannot finish it with one. + (message "Math mode started with `%s' cannot be closed with dollar" + (car texmathp-why))))) + (t + ;; Just somewhere in the text. + (cond + ((and TeX-electric-math (TeX-active-mark)) + (if (> (point) (mark)) + (exchange-point-and-mark)) + (cond + ;; $...$ to $$...$$ + ((and (eq last-command #'TeX-insert-dollar) + (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t)) + (replace-match "$$\\1$$") + (set-mark (match-beginning 0))) + ;; \(...\) to \[...\] + ((and (eq last-command #'TeX-insert-dollar) + (re-search-forward "\\=\\\\(\\([^z-a]*\\)\\\\)" (mark) t)) + (replace-match "\\\\[\\1\\\\]") + (set-mark (match-beginning 0))) + ;; Strip \[...\] or $$...$$ + ((and (eq last-command #'TeX-insert-dollar) + (or (re-search-forward "\\=\\\\\\[\\([^z-a]*\\)\\\\\\]" (mark) t) + (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t))) + (replace-match "\\1") + (set-mark (match-beginning 0))) + (t + ;; We use `save-excursion' because point must be situated before opening + ;; symbol. + (save-excursion (insert (car TeX-electric-math))) + (exchange-point-and-mark) + (insert (cdr TeX-electric-math)))) + ;; Keep the region active. + (TeX-activate-region)) + (TeX-electric-math + (insert (car TeX-electric-math)) + (save-excursion (insert (cdr TeX-electric-math))) + (if blink-matching-paren + (progn + (backward-char) + (sit-for blink-matching-delay) + (forward-char)))) + ;; In any other case just insert a single $. + ((insert "$"))))) + (TeX-math-input-method-off)) + +(defcustom TeX-math-input-method-off-regexp + (concat "^" (regexp-opt '("chinese" "japanese" "korean" "bulgarian" "russian") t)) + "Regexp matching input methods to be deactivated when entering math mode." + :group 'TeX-misc + :type 'regexp) + +(defun TeX-math-input-method-off () + "Toggle off input method when entering math mode." + (and TeX-math-toggle-off-input-method + (texmathp) + current-input-method + (string-match TeX-math-input-method-off-regexp current-input-method) + (deactivate-input-method))) + +;;; Simple Commands + +(defvar TeX-normal-mode-reset-list '(TeX-style-hook-list) + "List of variables to reset with `\\[universal-argument] \\[TeX-normal-mode]'. +AUCTeX libraries and styles should add variables for reset to +this list.") + +(defun TeX-normal-mode (&optional arg) + "Remove all information about this buffer, and apply the style hooks again. +Save buffer first including style information. +With optional argument ARG, also reload the style hooks." + (interactive "*P") + (if arg + (dolist (var TeX-normal-mode-reset-list) + (set var nil))) + (let ((TeX-auto-save t)) + (if (buffer-modified-p) + (save-buffer) + (TeX-auto-write))) + (normal-mode) + ;; See also addition to `find-file-hook' in `VirTeX-common-initialization'. + (when (eq TeX-master 'shared) (TeX-master-file nil nil t)) + (TeX-update-style t)) + +(defgroup TeX-quote nil + "Quoting in AUCTeX." + :group 'AUCTeX) + +(defcustom TeX-open-quote "``" + "String inserted by typing \\[TeX-insert-quote] to open a quotation." + :group 'TeX-quote + :type 'string) + +(defcustom TeX-close-quote "''" + "String inserted by typing \\[TeX-insert-quote] to close a quotation." + :group 'TeX-quote + :type 'string) + +(defcustom TeX-quote-after-quote nil + "Behaviour of \\[TeX-insert-quote]. +Nil means standard behaviour; when non-nil, opening and closing +quotes are inserted only after \"." + :group 'TeX-quote + :type 'boolean) + +(defcustom TeX-quote-language-alist nil + "Alist for overriding the default language-specific quote insertion. +First element in each item is the name of the language as set by +the language style file as a string. Second element is the +opening quotation mark. Third element is the closing quotation +mark. Opening and closing quotation marks can be specified +directly as strings or as functions returning a string. Fourth +element is a boolean specifying insertion behavior, overriding +`TeX-quote-after-quote'. See Info node `(auctex)European' for +valid languages." + :group 'TeX-quote + :link '(custom-manual "(auctex)European") + :type '(repeat (group (choice + (const "czech") + (const "danish") + (const "dutch") + (const "german") + (const "ngerman") + (const "french") ;; not frenchb or francais + (const "italian") + (const "polish") + (const "portuguese") + (const "slovak") + (const "swedish") + (string :tag "Other Language")) + (choice :tag "Opening quotation mark" string function) + (choice :tag "Closing quotation mark" string function) + (boolean :tag "Insert plain quote first" :value t)))) + +(defvar TeX-quote-language nil + "If non-nil determines behavior of quote insertion. +It is usually set by language-related style files. Its value has +the same structure as the elements of `TeX-quote-language-alist'. +The symbol `override' can be used as its car in order to override +the settings of style files. Style files should therefore check +if this symbol is present and not alter `TeX-quote-language' if +it is.") +(make-variable-buffer-local 'TeX-quote-language) + +(defun TeX-insert-quote (force) + "Insert the appropriate quotation marks for TeX. +Inserts the value of `TeX-open-quote' (normally \\=`\\=`) or `TeX-close-quote' +\(normally \\='\\=') depending on the context. If `TeX-quote-after-quote' +is non-nil, this insertion works only after \". +With prefix argument FORCE, always inserts \" characters." + (interactive "*P") + (if (or force + ;; Do not insert TeX quotes in verbatim, math or comment constructs. + (and (fboundp 'font-latex-faces-present-p) + (font-latex-faces-present-p '(font-latex-verbatim-face + font-latex-math-face + font-lock-comment-face)) + (font-latex-faces-present-p '(font-latex-verbatim-face + font-latex-math-face + font-lock-comment-face) + (1- (point)))) + (texmathp) + (and (TeX-in-comment) (not (eq major-mode 'doctex-mode)))) + (self-insert-command (prefix-numeric-value force)) + (TeX-update-style) + (let* ((lang-override (if (eq (car TeX-quote-language) 'override) + TeX-quote-language + (assoc (car TeX-quote-language) + TeX-quote-language-alist))) + (lang (or lang-override TeX-quote-language)) + (open-quote (if lang (nth 1 lang) TeX-open-quote)) + (close-quote (if lang (nth 2 lang) TeX-close-quote)) + (q-after-q (if lang (nth 3 lang) TeX-quote-after-quote))) + (when (functionp open-quote) + (setq open-quote (funcall open-quote))) + (when (functionp close-quote) + (setq close-quote (funcall close-quote))) + (if q-after-q + (insert (cond ((bobp) + ?\") + ((save-excursion + (TeX-looking-at-backward + (concat (regexp-quote open-quote) "\\|" + (regexp-quote close-quote)) + (max (length open-quote) (length close-quote)))) + (delete-char (- (length (match-string 0)))) + "\"\"") + ((< (save-excursion (skip-chars-backward "\"")) -1) + ?\") + ((not (= (preceding-char) ?\")) + ?\") + ((save-excursion + (forward-char -1) + (bobp)) + (delete-char -1) + open-quote) + ((save-excursion + (forward-char -2) ;;; at -1 there is double quote + (looking-at "[ \t\n]\\|\\s(")) + (delete-char -1) + open-quote) + (t + (delete-char -1) + close-quote))) + (insert (cond ((bobp) + open-quote) + ((= (preceding-char) (string-to-char TeX-esc)) + ?\") + ((= (preceding-char) ?\") + ?\") + ((and (<= (length open-quote) (- (point) (point-min))) + (save-excursion + (forward-char (- (length open-quote))) + (looking-at (regexp-quote open-quote)))) + (delete-char (- (length open-quote))) + ?\") + ((and (<= (length open-quote) (- (point) (point-min))) + (save-excursion + (forward-char (- (length close-quote))) + (looking-at (regexp-quote close-quote)))) + (delete-char (- (length close-quote))) + ?\") + ((save-excursion + (forward-char -1) + (looking-at "[ \t\n]\\|\\s(")) + open-quote) + (t + close-quote))))))) + +(defun TeX-insert-punctuation () + "Insert point or comma, cleaning up preceding space." + (interactive) + (expand-abbrev) + (if (TeX-looking-at-backward "\\\\/\\(}+\\)" 50) + (replace-match "\\1" t)) + (call-interactively #'self-insert-command)) + +(defun TeX-insert-braces (arg) + "Make a pair of braces around next ARG sexps and leave point inside. +No argument is equivalent to zero: just insert braces and leave point +between. + +If there is an active region, ARG will be ignored, braces will be +inserted around the region, and point will be left after the +closing brace." + (interactive "P") + (if (TeX-active-mark) + (progn + (if (< (point) (mark)) + (exchange-point-and-mark)) + (insert TeX-grcl) + (save-excursion + (goto-char (mark)) + (insert TeX-grop))) + (insert TeX-grop) + (save-excursion + (if arg (forward-sexp (prefix-numeric-value arg))) + (insert TeX-grcl)))) + +;;;###autoload +(defun TeX-submit-bug-report () + "Submit a bug report on AUCTeX via mail. + +Don't hesitate to report any problems or inaccurate documentation. + +If you don't have setup sending mail from Emacs, please copy the +output buffer into your mail program, as it gives us important +information about your AUCTeX version and AUCTeX configuration." + (interactive) + (require 'reporter) + (defvar reporter-prompt-for-summary-p) + (let ((reporter-prompt-for-summary-p "Bug report subject: ")) + (reporter-submit-bug-report + "bug-auctex@gnu.org" + AUCTeX-version + (list 'AUCTeX-date + 'window-system + 'LaTeX-version + 'TeX-style-path + 'TeX-auto-save + 'TeX-parse-self + 'TeX-master + 'TeX-command-list) + nil + ;; reporter adds too many new lines around salutation text, that we don't + ;; want, since it's itself a new line. + (lambda () + (save-excursion + (goto-char (point-min)) + (re-search-forward mail-header-separator) + (forward-char) + (delete-char 1) + (forward-char) + (delete-char 2))) + (propertize + "\n" 'display + (with-temp-buffer + (insert + "Remember to cover the basics, that is, what you expected to happen and +what in fact did happen. + +Be sure to consult the FAQ section in the manual before submitting +a bug report. In addition check if the bug is reproducable with an +up-to-date version of AUCTeX. So please upgrade to the version +available from ") + (insert-text-button + "https://www.gnu.org/software/auctex/" + 'face 'link + 'help-echo (concat "mouse-2, RET: Follow this link") + 'action (lambda (_button) + (browse-url "https://www.gnu.org/software/auctex/")) + 'follow-link t) + (insert " if your +installation is older than the one available from the web site. + +If the bug is triggered by a specific \(La\)TeX file, you should try +to produce a minimal sample file showing the problem and include it +in your report. + +Your report will be posted for the auctex package at the GNU bug +tracker. Visit ") + (insert-text-button + "https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex" + 'face 'link + 'help-echo (concat "mouse-2, RET: Follow this link") + 'action (lambda (_button) + (browse-url "https://debbugs.gnu.org/cgi/pkgreport.cgi?pkg=auctex")) + 'follow-link t) + (insert "\nto browse existing AUCTeX bugs. +------------------------------------------------------------------------\n\n") + (buffer-string)))))) + + +;;; Documentation + +(defun TeX-documentation-texdoc (&optional arg) + "Run texdoc to read documentation. + +Prompt for selection of the package of which to show the documentation. + +If called with a prefix argument ARG, after selecting the +package, prompt for selection of the manual of that package to +show." + (interactive "P") + (let ((pkg (thing-at-point 'symbol)) + buffer list doc) + ;; Strip off properties. XXX: XEmacs doesn't have + ;; `substring-no-properties'. + (set-text-properties 0 (length pkg) nil pkg) + (setq pkg (TeX-read-string "View documentation for: " pkg)) + (unless (zerop (length pkg)) + (if arg + ;; Called with prefix argument: run "texdoc --list --nointeract <pkg>" + (progn + ;; Create the buffer, insert the result of the command, and + ;; accumulate the list of manuals. + (with-current-buffer (get-buffer-create + (setq buffer (format "*texdoc: %s*" pkg))) + (erase-buffer) + (insert (shell-command-to-string + (concat "texdoc --list --nointeract " pkg))) + (goto-char 1) ; No need to use `point-min' here. + (save-excursion + (while (re-search-forward + ;; XXX: XEmacs doesn't support character classes in + ;; regexps, like "[:alnum:]". + "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\ ()]+\\)" nil t) + (push (cons (match-string 1) (match-string 2)) list)))) + (unwind-protect + (cond + ((null (executable-find "texdoc")) + ;; Note: `shell-command-to-string' uses shell, only + ;; `call-process' looks at `exec-path', thus only here makes + ;; sense to use `executable-find' to test whether texdoc is + ;; available. + (message "texdoc not found")) + (list + ;; Go on if there are manuals listed: show the buffer, prompt + ;; for the number of the manual, then run + ;; texdoc --just-view <doc> + (TeX-pop-to-buffer (get-buffer buffer)) + (condition-case nil + (when (setq doc + (cdr (assoc (TeX-read-string "Please enter \ +the number of the file to view, anything else to skip: ") list))) + (call-process "texdoc" nil 0 nil "--just-view" doc)) + ;; Exit gently if a `quit' signal is thrown. + (quit nil))) + (t (message "No documentation found for %s" pkg))) + ;; In any case quit-and-kill the window. + (when (get-buffer-window buffer) + (quit-window t (get-buffer-window buffer))))) + ;; Called without prefix argument: just run "texdoc --view <pkg>" and + ;; show the output, so that the user is warned in case it doesn't find + ;; the documentation or "texdoc" is not available. + (message "%s" + ;; The folowing code to the end of `defun' used to be + ;; just + ;; (shell-command-to-string (concat "texdoc --view " pkg)) + ;; , but in some cases it blocks emacs until the user + ;; quits the viewer (bug#28905). + (with-output-to-string + (let* (;; Use pipe rather than pty because the + ;; latter causes atril (evince variant + ;; viewer) to exit before showing anything. + (process-connection-type nil) + (process (start-process-shell-command + "Doc view" standard-output + (concat "texdoc --view " pkg)))) + ;; Suppress the message "Process Doc view + ;; finished". + (set-process-sentinel process #'ignore) + ;; Kill temp buffer without query. This is + ;; necessary, at least for some environment, if + ;; the underlying shell can't find the texdoc + ;; executable. + (set-process-query-on-exit-flag process nil) + ;; Don't discard shell output. + (accept-process-output process)))))))) + +(defun TeX-goto-info-page () + "Read documentation for AUCTeX in the info system." + (interactive) + (info "auctex")) + +(autoload 'info-lookup->completions "info-look") + +(defvar TeX-doc-backend-alist + '((texdoc (plain-tex-mode latex-mode doctex-mode ams-tex-mode context-mode) + (lambda () + (when (executable-find "texdoc") + (TeX-search-files-by-type 'docs 'global t t))) + (lambda (doc) + ;; texdoc in MiKTeX requires --view in order to start + ;; the viewer instead of an intermediate web page. + (call-process "texdoc" nil 0 nil "--view" doc))) + (latex-info (latex-mode) + (lambda () + (mapcar (lambda (x) + (let ((x (car x))) + (if (string-match "\\`\\\\" x) + (substring x 1) x))) + (info-lookup->completions 'symbol 'latex-mode))) + (lambda (doc) + (info-lookup-symbol (concat "\\" doc) 'latex-mode))) + (texinfo-info (texinfo-mode) + (lambda () + (mapcar (lambda (x) + (let ((x (car x))) + (if (string-match "\\`@" x) + (substring x 1) x))) + (info-lookup->completions 'symbol + 'texinfo-mode))) + (lambda (doc) + (info-lookup-symbol (concat "@" doc) 'texinfo-mode)))) + "Alist of backends used for looking up documentation. +Each item consists of four elements. + +The first is a symbol describing the backend's name. + +The second is a list of modes the backend should be activated in. + +The third is a function returning a list of documents available +to the backend. It should return nil if the backend is not +available, for example if a required executable is not present on the +system in question. + +The fourth is a function for displaying the documentation. The +function should accept a single argument, the chosen package, +command, or document name.") + +(defun TeX-doc (&optional name) + "Display documentation for string NAME. +NAME may be a package, a command, or a document." + (interactive) + (let (docs) + ;; Build the lists of available documentation used for completion. + (dolist (elt TeX-doc-backend-alist) + (when (memq major-mode (nth 1 elt)) + (let ((completions (funcall (nth 2 elt)))) + (unless (null completions) + (cl-pushnew (cons completions (nth 0 elt)) docs :test #'equal))))) + (if (null docs) + (progn + (if (executable-find "texdoc") + ;; Fallback if we did not find anything via the backend list. + (let ((doc (read-from-minibuffer "Input for `texdoc': "))) + (when doc (call-process "texdoc" nil 0 nil "--view" doc))) + ;; Give up. + (message "No documentation found"))) + ;; Ask the user about the package, command, or document. + (when (and (called-interactively-p 'any) + (or (not name) (string= name ""))) + (let ((symbol (thing-at-point 'symbol)) + contained completions) + ;; Is the symbol at point contained in the lists of available + ;; documentation? + (setq contained (catch 'found + (dolist (elt docs) + (when (member symbol (car elt)) + (throw 'found t))))) + ;; Setup completion list in a format suitable for `completing-read'. + (dolist (elt docs) + ;; FIXME: Probably not needed! + (setq completions (nconc (mapcar #'list (car elt)) completions))) + ;; Query user. + (setq name (completing-read + (if contained + (format "Package, command, or document (default %s): " + symbol) + "Package, command, or document: ") + completions nil nil nil nil symbol)))) + (if (not name) + (message "No documentation specified") + ;; XXX: Provide way to choose in case a symbol can be found in + ;; more than one backend. + (let* ((backend (catch 'found + (dolist (elt docs) + (when (member name (car elt)) + (throw 'found (cdr elt))))))) + (if backend + (funcall (nth 3 (assoc backend TeX-doc-backend-alist)) name) + (message "Documentation not found"))))))) + + +;;; Ispell Support + +(defun TeX-run-ispell (_command _string file) + "Run ispell on current TeX buffer." + (cond ((string-equal file (TeX-region-file)) + (call-interactively #'ispell-region)) + (t + (ispell-buffer)))) + +(defun TeX-ispell-document (name) + "Run ispell on all open files belonging to the current document." + (interactive (list (TeX-master-file))) + (if (string-equal name "") + (setq name (TeX-master-file))) + + (let ((regexp (concat "\\`\\(" + (mapconcat (lambda (dir) + (regexp-quote + (expand-file-name + (file-name-as-directory dir)))) + (append (when (file-name-directory name) + (list (file-name-directory name))) + TeX-check-path) + "\\|") + "\\).*\\(" + (mapconcat #'regexp-quote + (cons (file-name-nondirectory name) + (TeX-style-list)) + "\\|") + "\\)\\.\\(" + (mapconcat #'identity TeX-file-extensions "\\|") + "\\)\\'")) + (buffers (buffer-list))) + (while buffers + (let* ((buffer (car buffers)) + (name (buffer-file-name buffer))) + (setq buffers (cdr buffers)) + (when (and name (string-match regexp name)) + (save-excursion (switch-to-buffer buffer) (ispell-buffer)) + t))))) + +(defcustom TeX-ispell-extend-skip-list t + "Whether to extend regions selected for skipping during spell checking." + :group 'TeX-misc + :type 'boolean) + +;; These functions are used to add new items to +;; `ispell-tex-skip-alists' -- see tex-ispell.el: +(defun TeX-ispell-skip-setcar (skip) + "Add SKIP to car of `ispell-tex-skip-alists'. +SKIP is an alist with the format described in +`ispell-tex-skip-alists'. Each element in SKIP is added on top +of the car of `ispell-tex-skip-alists'. This only happens if +`TeX-ispell-extend-skip-list' is non-nil." + (when TeX-ispell-extend-skip-list + (let ((raws (car ispell-tex-skip-alists)) + (envs (cadr ispell-tex-skip-alists))) + (dolist (x skip) + (cl-pushnew x raws :test #'equal)) + (setq ispell-tex-skip-alists (list raws envs))))) + +(defun TeX-ispell-skip-setcdr (skip) + "Add SKIP to cdr of `ispell-tex-skip-alists'. +SKIP is an alist with the format described in +`ispell-tex-skip-alists'. Each element in SKIP is added on top +of the cdr of `ispell-tex-skip-alists'. This only happens if +`TeX-ispell-extend-skip-list' is non-nil." + (when TeX-ispell-extend-skip-list + (let ((raws (car ispell-tex-skip-alists)) + (envs (cadr ispell-tex-skip-alists))) + (dolist (x skip) + (cl-pushnew x envs :test #'equal)) + (setq ispell-tex-skip-alists (list raws envs))))) + +(defun TeX-ispell-tex-arg-end (&optional arg1 arg2 arg3) + "Skip across ARG1, ARG2 and ARG3 number of braces and brackets. +This function is a variation of `ispell-tex-arg-end'. It should +be used when adding skip regions to `ispell-tex-skip-alists' for +constructs like: + + \\begin{tabularx}{300pt}[t]{lrc} ... + or + \\fontspec{font name}[font features] + +where optional and/or mandatory argument(s) follow(s) a mandatory +one. ARG1 is the number of mandatory arguments before the +optional one, ARG2 the max. number of following optional +arguments, ARG3 is the max. number of mandatory arguments +following. Omitting argument means 1. + +Here some examples for additions to `ispell-tex-skip-alists': + + \\begin{tabularx}{300pt}[t]{lrc} ... + ARG 1 2 3 + (\"tabularx\" TeX-ispell-tex-arg-end) or equivalent + (\"tabularx\" TeX-ispell-tex-arg-end 1 1 1) + + \\fontspec{font name}[font features] + ARG1 ARG2 ARG3=0 + (\"\\\\\\\\fontspec\" TeX-ispell-tex-arg-end 1 1 0) + + \\raisebox{lift}[height][depth]{contents} + ARG1 ARG2 ARG3=0 (checked by Ispell) + (\"\\\\\\\\raisebox\" TeX-ispell-tex-arg-end 1 2 0) + +Optional arguments before the first mandatory one are all +skipped." + (condition-case nil + (progn + (while (looking-at "[ \t\n]*\\[") (forward-sexp)) + (forward-sexp (or arg1 1)) + (let ((num 0)) + (while (and (looking-at "[ \t\n]*\\[") + (< num (or arg2 1))) + (setq num (1+ num)) + (forward-sexp))) + (forward-sexp (or arg3 1))) + (error + (message "Error skipping s-expressions at point %d" (point)) + (sit-for 2)))) + +(defun TeX-ispell-tex-arg-verb-end (&optional arg) + "Skip an optional argument, ARG number of mandatory ones and verbatim content. +This function always checks if one optional argument in brackets +is given and skips over it. If ARG is a number, it skips over +that many mandatory arguments in braces. Then it checks for +verbatim content to skip which is enclosed by a character given +in `TeX-ispell-verb-delimiters' or in braces, otherwise raises an +error." + (condition-case nil + (progn + (when (looking-at "[ \t\n]*\\[") (forward-sexp)) + (when (and arg (looking-at "{")) + (forward-sexp arg)) + (cond ((looking-at (concat "[" TeX-ispell-verb-delimiters "]")) + (forward-char) + (skip-chars-forward (concat "^" (string (char-before)))) + (forward-char)) + ((looking-at "{") + (forward-sexp)) + (t (error nil)))) + (error + (message "Verbatim delimiter is not one of %s" + (split-string TeX-ispell-verb-delimiters "" t)) + (sit-for 2)))) + +;;; Abbrev mode + +(defmacro TeX-abbrev-mode-setup (mode) + "Set up the abbrev table and variable for MODE." + (let ((symbol (intern (concat (symbol-name mode) "-abbrev-table"))) + (name (TeX-mode-prefix mode))) + `(progn + (defvar ,symbol nil + ,(format "Abbrev table for %s mode." name)) + (define-abbrev-table ',symbol nil) + (abbrev-table-put ,symbol :parents (list text-mode-abbrev-table))))) + + +;;; Special provisions for other modes and libraries + +;; desktop-locals-to-save is broken by design. Don't have +;; buffer-local values of it. +(eval-after-load "desktop" + '(progn + (dolist (elt '(TeX-master)) + (unless (member elt (default-value 'desktop-locals-to-save)) + (setq-default desktop-locals-to-save + (cons elt (default-value 'desktop-locals-to-save))))) + (add-hook 'desktop-after-read-hook (lambda () + (TeX-set-mode-name t))))) + +;; delsel.el, `delete-selection-mode' +(put 'TeX-newline 'delete-selection t) +(put 'TeX-insert-quote 'delete-selection t) +(put 'TeX-insert-backslash 'delete-selection t) +;; When `TeX-electric-math' is non-nil, `TeX-insert-dollar' interferes with +;; `delete-selection-mode', but when it's nil users may want to be able to +;; delete active region if `delete-selection-mode' is active, see bug#23177. We +;; can dynamically determine the behavior of `delete-selection' with +;; `TeX-insert-dollar' based on the value of `TeX-electric-math'. +(put 'TeX-insert-dollar 'delete-selection + (lambda () (null TeX-electric-math))) + +(defun TeX--list-of-string-p (lst) + "Return non-nil if LST is a list of strings. +Used as function for validating a variable's `safe-local-variable' property." + (and (listp lst) + (let ((all-strings t)) + (while (and all-strings lst) + (setq all-strings (stringp (car lst))) + (setq lst (cdr lst))) + all-strings))) + +;; add-log.el: This function is a variation of +;; `tex-current-defun-name' defined in `tex-mode.el'. In `latex.el', +;; the variable `add-log-current-defun-function' is set to this +;; function. +(defun TeX-current-defun-name () + "Return the name of the TeX section/paragraph/chapter at point, or nil." + (save-excursion + (let (s1 e1 s2 e2) + ;; If we are now precisely at the beginning of a sectioning + ;; command, move forward and make sure `re-search-backward' + ;; finds this one rather than the previous one: + (or (eobp) (progn + (when (looking-at-p "\\\\") + (forward-char)) + (unless (eolp) + (forward-sexp)))) + ;; Search backward for sectioning command. If + ;; `LaTeX-section-label' is buffer-local, assume that a style + ;; has changed the value and recalculate the string. Otherwise + ;; take the standard one: + (when (re-search-backward + (if (local-variable-p 'LaTeX-section-label) + (concat "\\\\" + (regexp-opt + (remove "part" (mapcar #'car LaTeX-section-label))) + "\\*?") + "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)\\*?") + nil t) + ;; Skip over the backslash: + (setq s1 (1+ (point))) + ;; Skip over the sectioning command, incl. the *: + (setq e1 (goto-char (match-end 0))) + ;; Skip over the optional argument, if any: + (when (looking-at-p "[ \t]*\\[") + (forward-sexp)) + ;; Skip over any chars until the mandatory argument: + (skip-chars-forward "^{") + ;; Remember the points for the mandatory argument: + (setq s2 (point)) + (setq e2 (progn (forward-sexp) + (point))) + ;; Now pick the content: For one-line title, return it + ;; incl. the closing brace. For multi-line, return the first + ;; line of the mandatory argument incl. ellipsis and a brace; + (concat + (buffer-substring-no-properties s1 e1) + (buffer-substring-no-properties + (goto-char s2) + (min (line-end-position) e2)) + (when (> e2 (line-end-position)) + (concat "..." TeX-grcl))))))) + +;;; Customization: + +(defcustom TeX-process-asynchronous (not (eq system-type 'ms-dos)) + "Use asynchronous processes." + :group 'TeX-command + :type 'boolean) + +(defcustom TeX-shell + (if (memq system-type '(ms-dos emx windows-nt)) + shell-file-name + "/bin/sh") + "Name of shell used to parse TeX commands." + :group 'TeX-command + :type 'file) + +(defcustom TeX-shell-command-option + (cond ((memq system-type '(ms-dos emx windows-nt)) + shell-command-switch) + (t ;Unix & EMX (Emacs 19 port to OS/2) + "-c")) + "Shell argument indicating that next argument is the command." + :group 'TeX-command + :type 'string) + +;;; Interactive Commands +;; +;; The general idea is, that there is one process and process buffer +;; associated with each master file, and one process and process +;; buffer for running TeX on a region. +;; +;; Some user commands operates on ``the'' process, which is the last +;; process still running or already finished. Note that you cannot +;; run more than one process simultaneously, including preview by +;; preview-latex, because process filters and sentinels refer to +;; certain set of global variables which each invokation of the +;; process overwrites. If you dare to do, the result is thus +;; unpredictable. + +(defun TeX-save-document (name-or-file-fn) + "Save all files belonging to the current document. +Return non-nil if document needs to be re-TeX'ed. +In Lisp program, NAME-OR-FILE-FN specifies the current document. +It is either the master name without extension or the function +`TeX-master-file'." + (interactive (list #'TeX-master-file)) + (TeX-check-files (TeX--concat-ext name-or-file-fn (TeX-output-extension)) + (cons (TeX--concat-ext name-or-file-fn) (TeX-style-list)) + TeX-file-extensions)) + +(defun TeX--concat-ext (name-or-file-fn &optional extension) + "Append EXTENSION to a filename specified by NAME-OR-FILE-FN. + +If NAME-OR-FILE-FN is a string, interpret it as the filename. +Otherwise, assume it is a callable function and call it with +EXTENSION as an argument and return the result without +modification. EXTENSION is a string which should not start with +'.'." + (if (stringp name-or-file-fn) + (if extension + (concat name-or-file-fn "." extension) + name-or-file-fn) + (funcall name-or-file-fn extension))) + +(defun TeX-command-master (&optional override-confirm) + "Run command on the current document. + +If a prefix argument OVERRIDE-CONFIRM is given, confirmation will +depend on it being positive instead of the entry in `TeX-command-list'." + (interactive "P") + (TeX-master-file nil nil t) ;; call to ask if necessary + (TeX-command (TeX-command-query #'TeX-master-file) + #'TeX-master-file override-confirm)) + +(defcustom TeX-region-extra "" + "String to insert in the region file between the header and the text." + :group 'TeX-command + :type 'string) + +;; This was "{\\makeatletter\\gdef\\AucTeX@cite#1[#2]#3{[#3#1#2]}\ +;; \\gdef\\cite{\\@ifnextchar[{\\AucTeX@cite{, }}\ +;; {\\AucTeX@cite{}[]}}}\n" +;; However, that string is inappropriate for plain TeX and ConTeXt. +;; This needs reconsideration. + +(defvar TeX-command-region-begin nil) +(defvar TeX-command-region-end nil) +;; Used for marking the last region. + +(make-variable-buffer-local 'TeX-command-region-begin) +(make-variable-buffer-local 'TeX-command-region-end) + +(defun TeX-current-offset (&optional pos) + "Calculate line offset of POS, or of point if POS is nil." + (save-restriction + (widen) + (save-excursion + (let ((inhibit-point-motion-hooks t) + (inhibit-field-text-motion t)) + (if pos (goto-char pos)) + (+ (count-lines (point-min) (point)) + (if (bolp) 0 -1)))))) + +(defun TeX-pin-region (begin end) + "Pin the TeX region specified by BEGIN and END. +If BEGIN is nil, the region is unpinned. + +In interactive use, a positive prefix arg will pin the region, +a non-positive one will unpin it. Without a prefix arg, if +a region is actively marked, it will get pinned. If not, a +pinned region will get unpinned and vice versa." + (interactive + (if + (if current-prefix-arg + (> (prefix-numeric-value current-prefix-arg) 0) + (or (TeX-active-mark) + (null TeX-command-region-begin))) + (list (region-beginning) (region-end)) + '(nil nil))) + (if begin + (progn + (unless (markerp TeX-command-region-begin) + (setq TeX-command-region-begin (make-marker)) + (setq TeX-command-region-end (make-marker))) + (set-marker TeX-command-region-begin begin) + (set-marker TeX-command-region-end end) + (message "TeX region pinned.")) + (when (markerp TeX-command-region-begin) + (set-marker TeX-command-region-begin nil) + (set-marker TeX-command-region-end nil)) + (setq TeX-command-region-begin nil) + (setq TeX-command-region-end nil) + (message "TeX region unpinned."))) + +(defun TeX-region-update () + "Update the TeX-region file." + ;; Note that TeX-command-region-begin is not a marker when called + ;; from TeX-command-buffer. + (and (or (null TeX-command-region-begin) + (markerp TeX-command-region-begin)) + (TeX-active-mark) + (TeX-pin-region (region-beginning) (region-end))) + (let* ((begin (or TeX-command-region-begin (region-beginning))) + (end (or TeX-command-region-end (region-end))) + (TeX-region-extra + ;; Write out counter information to region. + (concat (and (fboundp 'preview--counter-information) + (preview--counter-information begin)) + TeX-region-extra))) + (TeX-region-create (TeX-region-file TeX-default-extension) + (buffer-substring-no-properties begin end) + (file-name-nondirectory (buffer-file-name)) + (TeX-current-offset begin)))) + +(defun TeX-command-region (&optional override-confirm) + "Run TeX on the current region. + +Query the user for a command to run on the temporary file specified by +the variable `TeX-region'. If there is an explicitly active region, +it is stored for later commands. If not, a previously stored region +\(can be also be set with `TeX-pin-region') overrides the current region, +if present. + +If a prefix argument OVERRIDE-CONFIRM is given, prompting will +ignore the prompting flag from `TeX-command-list' and instead +will prompt only if the prefix is positive. + +If the master file for the document has a header, it is written to the +temporary file before the region itself. The document's header is all +text before `TeX-header-end'. + +If the master file for the document has a trailer, it is written to +the temporary file after the region itself. The document's trailer is +all text after `TeX-trailer-start'." + (interactive "P") + (TeX-region-update) + ;; In the next line, `TeX-region-file' should be called with nil + ;; `nondirectory' argument, otherwise `TeX-command-default' called + ;; within `TeX-command-query' won't work in included files not + ;; placed in `TeX-master-directory'. + (TeX-command (TeX-command-query #'TeX-region-file) #'TeX-region-file + override-confirm)) + +(defun TeX-command-buffer (&optional override-confirm) + "Run TeX on the current buffer. + +Query the user for a command to run on the temporary file specified by +the variable `TeX-region'. The region file will be recreated from the +visible part of the buffer. + +If a prefix argument OVERRIDE-CONFIRM is given, confirmation will +depend on it being positive instead of the entry in `TeX-command-list'." + (interactive "P") + (let ((TeX-command-region-begin (point-min)) + (TeX-command-region-end (point-max))) + (TeX-command-region override-confirm))) + +(defcustom TeX-record-buffer nil + "Whether to record buffer names of generated TeX buffers. +When non-nil, these buffers are put at the front of the list of +recently selected ones." + :group 'TeX-command + :type 'boolean) + +(defun TeX-pop-to-buffer (buffer &optional other-window norecord) + "Compatibility wrapper for `pop-to-buffer'. + +Select buffer BUFFER in some window, preferably a different one. +BUFFER may be a buffer, a string (a buffer name), or nil. +If BUFFER is a string which is not the name of an existing buffer, +then this function creates a buffer with that name. +If BUFFER is nil, then it chooses some other buffer. +If `pop-up-windows' is non-nil, windows can be split to do this. +If optional second arg OTHER-WINDOW is non-nil, insist on finding another +window even if BUFFER is already visible in the selected window, +and ignore `same-window-regexps' and `same-window-buffer-names'. +This function returns the buffer it switched to. +This uses the function `display-buffer' as a subroutine; see the documentation +of `display-buffer' for additional customization information. + +Optional third arg NORECORD non-nil means do not put this buffer +at the front of the list of recently selected ones." + (pop-to-buffer buffer other-window (and norecord (not TeX-record-buffer)))) + +(defun TeX-recenter-output-buffer (line) + "Redisplay buffer of TeX job output so that most recent output can be seen. +The last line of the buffer is displayed on line LINE of the window, or +at bottom if LINE is nil." + (interactive "P") + (let ((buffer (TeX-active-buffer))) + (if buffer + (let ((old-buffer (current-buffer))) + (TeX-pop-to-buffer buffer t t) + (bury-buffer buffer) + (goto-char (point-max)) + (recenter (if line + (prefix-numeric-value line) + (/ (window-height) 2))) + (TeX-pop-to-buffer old-buffer nil t)) + (message "No process for this document.")))) + +(defun TeX-kill-job () + "Kill the currently running TeX job." + (interactive) + (let ((process (TeX-active-process))) + (if process + (kill-process process) + ;; Should test for TeX background process here. + (error "No TeX process to kill")))) + +;; FIXME: The vars below are defined in this file, but they're defined too +;; far down (i.e. further down than their first use), so we have to pre-declare +;; them here to explain it to the compiler. +;; We should move those vars's definitions earlier instead! +(defvar TeX-current-process-region-p) +(defvar TeX-save-query) +(defvar TeX-parse-function) +(defvar TeX-sentinel-function) +(defvar TeX-sentinel-default-function) +(defvar compilation-in-progress) +(defvar TeX-current-page) +(defvar TeX-error-overview-open-after-TeX-run) +(defvar TeX-error-list) +(defvar TeX-command-buffer) +(defvar TeX-region) + +(defun TeX-home-buffer () + "Go to the buffer where you last issued a TeX command. +If there is no such buffer, or you already are in that buffer, find +the master file." + (interactive) + (if (or (null TeX-command-buffer) + (null (buffer-name TeX-command-buffer)) + (eq TeX-command-buffer (current-buffer))) + (find-file (TeX-master-file TeX-default-extension)) + (switch-to-buffer TeX-command-buffer))) + +(defvar TeX-error-last-visited -1 + "Index of the last visited error listed in `TeX-error-list'. + +This variable is intended to be set only in output buffer so it +will be shared among all files of the same document.") +(make-variable-buffer-local 'TeX-error-last-visited) + +(defun TeX-get-parse-function () + "Get the parse function for the current buffer." + (with-current-buffer TeX-command-buffer + (TeX-process-get-variable (TeX-active-master) 'TeX-parse-function))) + +(defun TeX-next-error (&optional arg reparse) + "Find the next error in the TeX output buffer. + +A prefix ARG specifies how many error messages to move; +negative means move back to previous error messages, if possible. + +If REPARSE is non-nil, reparse the error message buffer. + +\\[universal-argument] as a prefix means reparse the error +message buffer and start at the first error." + (interactive "P") + (if (or (null (TeX-active-buffer)) + (eq 'compilation-mode (with-current-buffer TeX-command-buffer + major-mode))) + (next-error arg reparse) + + ;; Force reparsing when the function is called with a universal-argument. + (if (consp arg) (setq reparse t arg nil)) + + (funcall (TeX-get-parse-function) arg reparse))) + +(defun TeX-previous-error (arg) + "Find the previous error in the TeX output buffer. + +Prefix ARG says how many error messages to move backward (or +forward, if negative). + +This works only with TeX commands and if the +`TeX-parse-all-errors' variable is non-nil." + (interactive "p") + (if (or (null (TeX-active-buffer)) + (eq 'compilation-mode (with-current-buffer TeX-command-buffer + major-mode))) + (previous-error arg) + + (let ((parse-function (TeX-get-parse-function))) + (if (and TeX-parse-all-errors (equal parse-function #'TeX-parse-TeX)) + ;; When `TeX-parse-all-errors' is non-nil and the parsing function is + ;; `TeX-parse-TeX' we can move backward in the errors. + (TeX-parse-TeX (- arg) nil) + ;; XXX: moving backward in the errors hasn't yet been implemented for + ;; other parsing functions. + (error "Jumping to previous error not supported"))))) + +;;; Command Query + +(defvar TeX-error-overview-frame nil + "The frame of the error overview.") + +(defconst TeX-error-overview-buffer-name "*TeX errors*" + "Name of the buffer in which to show error list.") + +(defvar LaTeX-idx-md5-alist nil + "Alist of MD5 hashes of idx file. + +Car is the idx file, cdr is its md5 hash.") + +(defvar LaTeX-idx-changed-alist nil + "Whether the idx files changed. + +Car is the idx file, cdr is whether idx changed after LaTeX +run.") + +(defcustom TeX-check-engine t + "Check the correct engine has been set before running TeX commands." + :group 'TeX-command + :type 'boolean) + +(defvar TeX-check-engine-list '(default luatex omega xetex) + "List of engines required by the loaded TeX packages. + +Do not set this variable directly, use +`TeX-check-engine-add-engines' to specify required engines.") +(make-variable-buffer-local 'TeX-check-engine-list) + +(defun TeX-check-engine-add-engines (&rest engines) + "Add ENGINES to list of required engines. + +Set `TeX-check-engine-list' to the intersection between the list +itself and the list of provided engines. + +See for example style/fontspec.el" + (let ((list TeX-check-engine-list) + (res nil)) + (setq TeX-check-engine-list + ;; The following is based on the definition of `cl-intersection' of + ;; GNU Emacs. + (and list engines + (if (equal list engines) list + (or (>= (length list) (length engines)) + (setq list (prog1 engines (setq engines list)))) + (while engines + (if (memq (car engines) list) + (push (car engines) res)) + (pop engines)) + res))))) + +(defun TeX-check-engine (name) + "Check the correct engine has been set. + +Look into `TeX-check-engine-list' for the required engines. + +NAME is the command to be run. Actually do the check only if the +variable `TeX-check-engine' is non-nil and LaTeX is the command +to be run." + (and + (string= name "LaTeX") + TeX-check-engine + TeX-check-engine-list + (null (memq TeX-engine TeX-check-engine-list)) + (memq TeX-engine '(default luatex omega xetex)) + ;; The set engine is not listed in `TeX-check-engine-list'. We check only + ;; builtin engines because we can't take care of custom ones. Do nothing if + ;; there is no allowed engine, we don't know what to do in that case. + (let ((length (length TeX-check-engine-list)) + (name-alist '((default . "TeX") + (luatex . "LuaTeX") + (omega . "Omega") + (xetex . "XeTeX"))) + (completion-ignore-case t) + (engine nil)) + (when + (cond + ;; There is exactly one allowed engine. + ((= length 1) + (setq engine (car TeX-check-engine-list)) + (y-or-n-p (format "%s is required to build this document. +Do you want to use this engine? " (cdr (assoc engine name-alist))))) + ;; More than one engine is allowed. + ((> length 1) + (if (y-or-n-p (format "It appears %s are required to build this document. +Do you want to select one of these engines? " + (mapconcat + (lambda (elt) (cdr (assoc elt name-alist))) + TeX-check-engine-list ", "))) + (setq engine + (car (rassoc + (completing-read + (format + "Choose between %s: " + (mapconcat + (lambda (elt) (cdr (assoc elt name-alist))) + TeX-check-engine-list ", ")) + (mapcar + (lambda (elt) (cdr (assoc elt name-alist))) + TeX-check-engine-list)) + name-alist))) + ;; Don't keep asking. If user doesn't want to change engine, + ;; probably has a good reason. In order to do so, without adding + ;; yet another variable we just hack `TeX-check-engine-list' and + ;; make it nil. + (setq TeX-check-engine-list nil)))) + (TeX-engine-set engine) + (when (y-or-n-p "Do you want to remember the choice? ") + (add-file-local-variable 'TeX-engine engine) + (save-buffer)))))) + +(defcustom TeX-check-TeX t + "Whether AUCTeX should check if a working TeX distribution is present." + :group 'TeX-command + :type 'boolean) + +(defcustom TeX-check-TeX-command-not-found 127 + "Numerical code returned by shell for a command not found error." + :group 'TeX-command + :type 'integer) + +(defun TeX-command (name file-fn &optional override-confirm) + "Run command NAME on the file returned by calling FILE-FN. + +FILE-FN is the symbol of a function returning a file name. The +function has one optional argument, the extension to use on the +file. Valid choices are `TeX-master-file' and `TeX-region-file'. + +Use the information in `TeX-command-list' to determine how to run +the command. + +If OVERRIDE-CONFIRM is a prefix argument, confirmation will be +asked if it is positive, and suppressed if it is not. + +Run function `TeX-check-engine' to check the correct engine has +been set." + (TeX-check-engine name) + + ;; Make sure that `TeX-command-buffer' is set always. + ;; It isn't safe to remove similar lines in `TeX-run-command' etc. + ;; because preview-latex calls `TeX-run-command' directly. + (setq-default TeX-command-buffer (current-buffer)) + + (cond ((eq file-fn #'TeX-region-file) + (setq TeX-current-process-region-p t)) + ((eq file-fn #'TeX-master-file) + (setq TeX-current-process-region-p nil))) + + ;; When we're operating on a region, we need to update the position + ;; of point in the region file so that forward search works. + (if (string= name "View") (TeX-region-update-point)) + + (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command-list)))) + (hook (nth 2 (assoc name TeX-command-list))) + (confirm (if override-confirm + (> (prefix-numeric-value override-confirm) 0) + (nth 3 (assoc name TeX-command-list))))) + + ;; Verify the expanded command + (if confirm + (setq command + (read-from-minibuffer (concat name " command: ") command + nil nil))) + + ;; Kill the frame and buffer associated to the error overview before running + ;; the command, but keep them if the command to be run is View. + (unless (string= name "View") + (if (frame-live-p TeX-error-overview-frame) + (delete-frame TeX-error-overview-frame)) + (if (get-buffer TeX-error-overview-buffer-name) + (kill-buffer TeX-error-overview-buffer-name))) + + ;; Before running some commands, check that AUCTeX is able to find "tex" + ;; program. + (and TeX-check-TeX + (member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full")) + (= TeX-check-TeX-command-not-found + (call-process TeX-shell nil nil nil + TeX-shell-command-option TeX-command)) + (error (format "ERROR: AUCTeX cannot find a working TeX distribution. +Make sure you have one and that TeX binaries are in PATH environment variable%s" + (if (eq system-type 'darwin) + ". +If you are using OS X El Capitan or later +remember to add /Library/TeX/texbin/ to your PATH" + "")))) + + ;; Now start the process + (let ((file (funcall file-fn))) + (TeX-process-set-variable file 'TeX-command-next TeX-command-Show) + (funcall hook name command file)))) + +(defun TeX-command-expand (command &optional list) + "Expand COMMAND for `TeX-active-master' as described in LIST. +LIST default to `TeX-expand-list'. As a special exception, +`%%' can be used to produce a single `%' sign in the output +without further expansion." + (let ((TeX-expand-command command) + TeX-expand-pos + TeX-command-text + TeX-command-pos + pat entry case-fold-search string expansion arguments) + (setq list (cons + (list "%%" (lambda nil + (setq TeX-expand-pos (1+ TeX-expand-pos)) + "%")) + (or list (TeX-expand-list))) + pat (regexp-opt (mapcar #'car list))) + (while (setq TeX-expand-pos (string-match pat TeX-expand-command TeX-expand-pos)) + (setq string (match-string 0 TeX-expand-command) + entry (assoc string list) + expansion (car (cdr entry)) ;Second element + arguments (cdr (cdr entry)) ;Remaining elements + string (save-match-data + (cond + ((functionp expansion) + (apply expansion arguments)) + ((boundp expansion) + (apply (symbol-value expansion) arguments)) + (t + (error "Nonexpansion %s" expansion))))) + (if (stringp string) + (setq TeX-expand-command + (replace-match string t t TeX-expand-command)))) + TeX-expand-command)) + +(defun TeX-active-master-with-quotes + (&optional extension nondirectory ask extra preprocess-fn) + "Return the current master or region file name with quote for shell. +Pass arguments EXTENSION NONDIRECTORY ASK to `TeX-active-master'. +If the returned file name contains space, enclose it within +quotes `\"' when \" \\input\" is supplemented (indicated by +dynamically bound variable `TeX-command-text' having string +value.) Also enclose the file name within \\detokenize{} when +the following three conditions are met: + 1. compiling with standard (pdf)LaTeX or upLaTeX + 2. \" \\input\" is supplemented + 3. EXTRA is non-nil (default when expanding \"%T\") +Adjust dynamically bound variable `TeX-expand-pos' to avoid possible +infinite loop in `TeX-command-expand'. +If PREPROCESS-FN is non-nil then it is called with the filename +as an argument and the result is enclosed instead of the +filename. + +Helper function of `TeX-command-expand'. Use only within entries in +`TeX-expand-list-builtin' and `TeX-expand-list'." + (let* ((raw (TeX-active-master extension nondirectory ask)) + ;; String `TeX-command-text' means that the file name is + ;; given through \input command. + (quote-for-space (if (and (stringp TeX-command-text) + (string-match " " raw)) + "\"" "")) + (res + (shell-quote-argument + (format + (if (and extra + (stringp TeX-command-text) + (memq major-mode '(latex-mode doctex-mode)) + (memq TeX-engine '(default uptex))) + ;; Since TeXLive 2018, the default encoding for LaTeX + ;; files has been changed to UTF-8 if used with + ;; classic TeX or pdfTeX. I.e., + ;; \usepackage[utf8]{inputenc} is enabled by default + ;; in (pdf)latex. + ;; c.f. LaTeX News issue 28 + ;; Due to this change, \detokenize is required to + ;; recognize non-ascii characters in the file name + ;; when \input precedes. + "\\detokenize{ %s }" "%s") + (concat quote-for-space + (if preprocess-fn + (funcall preprocess-fn raw) + raw) + quote-for-space))))) + ;; Advance past the file name in order to + ;; prevent expanding any substring of it. + (setq TeX-expand-pos + (+ TeX-expand-pos (length res))) + res)) + +(defun TeX-check-files (derived originals extensions) + "Check if DERIVED is newer than any of the ORIGINALS. +Try each original with each member of EXTENSIONS, in all directories +in `TeX-check-path'. Returns true if any of the ORIGINALS with any of the +EXTENSIONS are newer than DERIVED. Will prompt to save the buffer of any +ORIGINALS which are modified but not saved yet." + (let (existingoriginals + found + (extensions (TeX-delete-duplicate-strings extensions)) + (buffers (buffer-list))) + (dolist (path (TeX-delete-duplicate-strings + (mapcar (lambda (dir) + (expand-file-name (file-name-as-directory dir))) + (append + TeX-check-path + ;; In `TeX-command-default', this function is used to + ;; check whether bibliography databases are newer + ;; than generated *.bbl files, but bibliography + ;; database are relative to `TeX-master-directory' + ;; and the test can be run also from included files + ;; that are in directories different from + ;; `TeX-master-directory'. + (list (TeX-master-directory)))))) + (dolist (orig originals) + (dolist (ext extensions) + (let ((filepath (concat path orig "." ext))) + (if (or (file-exists-p filepath) + (get-file-buffer filepath)) + (setq existingoriginals (cons filepath existingoriginals))))))) + (while buffers + (let* ((buffer (car buffers)) + (name (buffer-file-name buffer))) + (setq buffers (cdr buffers)) + (if (and name (member name existingoriginals)) + (progn + (and (buffer-modified-p buffer) + (or (not TeX-save-query) + (y-or-n-p (concat "Save file " + (buffer-file-name buffer) + "? "))) + (with-current-buffer buffer (save-buffer))))))) + (dolist (eo existingoriginals) + (if (file-newer-than-file-p eo derived) + (setq found t))) + found)) + +(defcustom TeX-command-sequence-max-runs-same-command 4 + "Maximum number of runs of the same command." + :type 'integer + :group 'TeX-command) + +(defcustom TeX-command-sequence-max-runs 12 + "Maximum number of total runs." + :type 'integer + :group 'TeX-command) + +(defvar TeX-command-sequence-count-same-command 1 + "Counter for the runs of the same command in `TeX-command-sequence'.") + +(defvar TeX-command-sequence-count 1 + "Counter for the total runs of `TeX-command-sequence'.") + +(defvar TeX-command-sequence-last-command nil + "Last command run in `TeX-command-sequence'.") + +(defvar TeX-command-sequence-sentinel nil + "Sentinel for `TeX-command-sequence'.") + +(defvar TeX-command-sequence-file-function nil + "File function for `TeX-command-sequence'.") + +(defvar TeX-command-sequence-command nil + "Command argument for `TeX-command-sequence'. + +It is set in `TeX-command-sequence' and used in +`TeX-command-sequence-sentinel' to call again +`TeX-command-sequence' with the appropriate command argument.") + +(defun TeX-command-sequence (command &optional reset file-fn) + "Run a sequence of TeX commands defined by COMMAND. + +The COMMAND argument may be + + * nil: no command will be run in this case + + * a string with a command from `TeX-command-list' + + * a non-nil list of strings, which are commands from + `TeX-command-list'; the car of the list is used as command to + be executed in the first run of `TeX-command-sequence', the + cdr of the list will be passed to the function in the next + run, etc. + + * a function name, returning a string which is command from + `TeX-command-list'; it will be funcall'd (without arguments!) + and used again in the next run of `TeX-command-sequence'. + + * with any other value the function `TeX-command-default' is + used to determine the command to run, until a stopping + condition is met. + +This function runs at most +`TeX-command-sequence-max-runs-same-command' times the same +command in a row, and `TeX-command-sequence-max-runs' times in +total in any case. It ends when `TeX-command-Show' is the +command to be run. + +A non-nil value for the optional argument RESET means this is the +first run of the function and some variables need to be reset. + +FILE-FN is a function of zero arguments returning the current +filename. Valid choices are `TeX-master-file' (default if +omitted) and `TeX-region-file'." + (setq TeX-command-sequence-file-function (or file-fn #'TeX-master-file)) + (if (null command) + (message "No command to run.") + (let (cmd process) + (cond + ((stringp command) + (setq cmd command + TeX-command-sequence-command nil)) + ((listp command) + (setq cmd (pop command) + TeX-command-sequence-command command)) + ((functionp command) + (setq cmd (funcall command) + TeX-command-sequence-command command)) + (t + ;; We first call `TeX-master-file' with the third argument + ;; (`ask') set to t, so that the master file is properly set. + ;; This is also what `TeX-command-master' does. + (funcall TeX-command-sequence-file-function nil nil t) + (setq cmd (TeX-command-default TeX-command-sequence-file-function) + TeX-command-sequence-command t))) + (TeX-command cmd TeX-command-sequence-file-function 0) + (when reset + (setq TeX-command-sequence-count-same-command 1 + TeX-command-sequence-count 1 + TeX-command-sequence-last-command nil)) + (cond + ;; Stop when the same command has been run + ;; `TeX-command-sequence-max-runs-same-command' times in a row. + ((>= TeX-command-sequence-count-same-command + TeX-command-sequence-max-runs-same-command) + (message "Stopping after running %S %d times in a row." + TeX-command-sequence-last-command + TeX-command-sequence-count-same-command)) + ;; Stop when there have been `TeX-command-sequence-max-runs' total + ;; compilations. + ((>= TeX-command-sequence-count TeX-command-sequence-max-runs) + (message "Stopping after %d compilations." TeX-command-sequence-count)) + ;; The command just run is `TeX-command-Show'. + ((equal command TeX-command-Show)) + ;; In any other case continue: increase counters (when needed), update + ;; `TeX-command-sequence-last-command' and run the sentinel. + (t + (if (equal cmd TeX-command-sequence-last-command) + (setq TeX-command-sequence-count-same-command + (1+ TeX-command-sequence-count-same-command)) + (setq TeX-command-sequence-count-same-command 1)) + (setq TeX-command-sequence-count (1+ TeX-command-sequence-count) + TeX-command-sequence-last-command cmd) + (and (setq process (get-buffer-process (current-buffer))) + (setq TeX-command-sequence-sentinel (process-sentinel process)) + (set-process-sentinel process + #'TeX-command-sequence-sentinel))))))) + +(defcustom TeX-save-query t + "If non-nil, ask user for permission to save files before starting TeX." + :group 'TeX-command + :type 'boolean) + +(defvar TeX-command-history nil) + +(defun TeX-command-default (name-or-file-fn) + "Guess the next command to be run on NAME-OR-FILE-FN." + (let ((command-next nil) + (name (TeX--concat-ext name-or-file-fn))) + (cond ((if (eq name-or-file-fn #'TeX-region-file) + (TeX-check-files (TeX-region-file (TeX-output-extension)) + ;; Each original will be checked for all dirs + ;; in `TeX-check-path' so this needs to be just + ;; a filename without directory. + (list (file-relative-name name)) + TeX-file-extensions) + (TeX-save-document name-or-file-fn)) + TeX-command-default) + ((and (memq major-mode '(doctex-mode latex-mode)) + ;; Want to know if bib file is newer than .bbl + ;; We don't care whether the bib files are open in emacs + (TeX-check-files (TeX--concat-ext name-or-file-fn "bbl") + (mapcar #'car + (LaTeX-bibliography-list)) + (append BibTeX-file-extensions + TeX-Biber-file-extensions))) + ;; We should check for bst files here as well. + (if (bound-and-true-p LaTeX-using-Biber) + TeX-command-Biber TeX-command-BibTeX)) + ((and + ;; Rationale: makeindex should be run when final document is almost + ;; complete (see + ;; https://tex-talk.net/2012/09/dont-forget-to-run-makeindex/), + ;; otherwise, after following latex runs, index pages may change due + ;; to changes in final document, resulting in extra makeindex and + ;; latex runs. + (member + (setq command-next + (TeX-process-get-variable + name + 'TeX-command-next + (or (and TeX-PDF-mode (TeX-PDF-from-DVI)) + TeX-command-Show))) + (list "Dvips" "Dvipdfmx" TeX-command-Show)) + (cdr (assoc (expand-file-name (TeX--concat-ext name-or-file-fn "idx")) + LaTeX-idx-changed-alist))) + "Index") + (command-next) + (TeX-command-Show)))) + +(defun TeX-command-query (name-or-file-fn) + "Query the user for what TeX command to use." + (let* ((default (TeX-command-default name-or-file-fn)) + (completion-ignore-case t) + (answer (or TeX-command-force + (completing-read + (concat "Command (default " default "): ") + (TeX-mode-specific-command-list major-mode) nil t + nil 'TeX-command-history default)))) + ;; If the answer is "latex" it will not be expanded to "LaTeX" + (setq answer (car-safe (assoc-string answer TeX-command-list t))) + (if (and answer + (not (string-equal answer ""))) + answer + default))) + +(defvar TeX-command-next nil + "The default command next time `TeX-command' is invoked.") + + (make-variable-buffer-local 'TeX-command-next) + +(defun TeX-printer-query (&optional queue) + "Query the user for a printer name. +QUEUE is non-nil when we are checking for the printer queue." + (let (command element printer) + (if queue + (unless (setq element 2 command TeX-queue-command) + (error "Need to customize `TeX-queue-command'")) + (unless (setq element 1 command TeX-print-command) + (error "Need to customize `TeX-print-command'"))) + (while (progn + (setq printer (if TeX-printer-list + (let ((completion-ignore-case t)) + (completing-read + (format "Printer%s: " + (if TeX-printer-default + (format " (default %s)" TeX-printer-default) "")) + TeX-printer-list)) + "")) + (setq printer (or (car-safe (assoc-string printer TeX-printer-list t)) + printer)) + (not (if (or (null printer) (string-equal "" printer)) + (setq printer TeX-printer-default) + (setq TeX-printer-default printer))))) + + (let ((expansion (let ((entry (assoc printer TeX-printer-list))) + (or (nth element entry) + command)))) + (if (string-match "%p" printer) + (error "Don't use %s in printer names" "%p")) + (while (string-match "%p" expansion) + (setq expansion (replace-match printer t t expansion 0))) + expansion))) + +(defun TeX-style-check (styles) + "Check STYLES compared to the current style options." + (let ((files (TeX-style-list))) + (while (and styles + (not (TeX-member (car (car styles)) files #'string-match))) + (setq styles (cdr styles)))) + (if styles + (nth 1 (car styles)) + "")) + +(defun TeX-output-extension () + "Get the extension of the current TeX output file." + (if (listp TeX-output-extension) + (car TeX-output-extension) + (or (TeX-process-get-variable (TeX-active-master) + 'TeX-output-extension + TeX-output-extension) + TeX-output-extension))) + +(defun TeX-view-mouse (event) + "Start `TeX-view' at mouse position." + (interactive "e") + (with-current-buffer (window-buffer (posn-window (event-start event))) + (goto-char (posn-point (event-start event))) + (TeX-view))) + +(defun TeX-region-update-point () + "Syncs the location of point in the region file with the current file. + +Thereafter, point in the region file is on the same text as in +the current buffer. + +Do nothing in case the last command hasn't operated on the region +or `TeX-source-correlate-mode' is disabled." + (when (and TeX-current-process-region-p TeX-source-correlate-mode) + (let ((region-buf (get-file-buffer (TeX-region-file t))) + (orig-line (TeX-current-offset)) + (pos-in-line (- (point) (max (line-beginning-position) + (or TeX-command-region-begin + (region-beginning)))))) + (when region-buf + (with-current-buffer region-buf + (goto-char (point-min)) + (when (re-search-forward "!offset(\\(-?[0-9]+\\)" nil t) + (let ((offset (string-to-number (match-string 1)))) + (goto-char (point-min)) + (forward-line (- orig-line offset)) + (forward-char pos-in-line)))))))) + +(defun TeX-view () + "Start a viewer without confirmation. +The viewer is started either on region or master file, +depending on the last command issued." + (interactive) + (let ((output-file (TeX-active-master (TeX-output-extension)))) + (if (file-exists-p output-file) + (TeX-command "View" #'TeX-active-master 0) + (message "Output file %S does not exist." output-file)))) + +;;; Command Hooks + +(defvar TeX-after-compilation-finished-functions nil + "Hook being run after TeX/LaTeX/ConTeXt finished successfully. +The functions in this hook are run with the DVI/PDF output file +given as argument. Using this hook can be useful for updating +the viewer automatically after re-compilation of the document. + +If you use an emacs-internal viewer such as `doc-view-mode' or +`pdf-view-mode', add `TeX-revert-document-buffer' to this hook.") + +(make-obsolete-variable 'TeX-after-TeX-LaTeX-command-finished-hook + 'TeX-after-compilation-finished-functions + "11.89") + +(defun TeX-revert-document-buffer (file) + "Revert the buffer visiting FILE. +This function is intended to be used in +`TeX-after-compilation-finished-functions' for users that view +their compiled document with an emacs viewer such as +`doc-view-mode' or `pdf-view-mode'. (Note that this function +just calls `revert-buffer' in the respective buffer and thus +requires that the corresponding mode defines a sensible +`revert-buffer-function'.)" + (let ((buf (find-buffer-visiting file))) + (when buf + (with-current-buffer buf + (revert-buffer nil t t))))) + +(defvar TeX-after-start-process-function + #'TeX-adjust-process-coding-system + "Function to adjust coding system of an asynchronous process. +Called with one argument PROCESS.") + +(defun TeX-adjust-process-coding-system (process) + "Adjust coding system of PROCESS to suitable value. +Usually coding system is the same as the TeX file with eol format +adjusted to OS default value. Take care of Japanese TeX, which +requires special treatment." + (if (and (boundp 'japanese-TeX-mode) + (fboundp 'japanese-TeX-set-process-coding-system) + (with-current-buffer TeX-command-buffer + japanese-TeX-mode)) + (japanese-TeX-set-process-coding-system process) + (let ((cs (coding-system-base (with-current-buffer TeX-command-buffer + buffer-file-coding-system)))) + ;; The value of `buffer-file-coding-system' is sometimes + ;; undecided-{unix,dos,mac}. That happens when the file + ;; contains no multibyte chars and only end of line format is + ;; determined. Emacs lisp reference recommends not to use + ;; undecided-* for process coding system, so it might seem + ;; reasonable to change `undecided' into some fixed coding + ;; system like this: + ;; (if (eq 'undecided cs) + ;; (setq cs 'utf-8)) + ;; However, that can lose when the following conditions are met: + ;; (1) The document is divided into multiple files. + ;; (2) The command buffer contains no multibyte chars. + ;; (3) The other files contain mutlibyte chars and saved in a + ;; coding system other than the one chosen above. + ;; So we leave `undecided' unchanged here. Although `undecided' + ;; is not quite safe for the coding system for encoding, i.e., + ;; keyboard input to the TeX process, we expect that this does + ;; not raise serious problems because it is pretty rare that TeX + ;; process needs keyboard input of multibyte chars. + + ;; `utf-8-with-signature' (UTF-8 with BOM) doesn't suit at all + ;; for the coding system for encoding because it always injects + ;; 3-byte BOM in front of its return value (even when the string + ;; to be sent has only ascii characters!) Thus we change it + ;; into `utf-8'. On decoding, `utf-8' can decode UTF-8 with + ;; BOM. So it is safe for both decoding and encoding. + (if (eq cs 'utf-8-with-signature) + (setq cs 'utf-8)) + + ;; Eol format of TeX files can differ from OS default. TeX + ;; binaries accept all type of eol format in the given files + ;; and output messages according to OS default. So we set eol + ;; format to OS default value. + (setq cs (coding-system-change-eol-conversion + cs + ;; The eol of macosX is LF, not CR. So we choose + ;; other than `unix' only for w32 system. + ;; FIXME: what should we do for cygwin? + (if (eq system-type 'windows-nt) 'dos 'unix))) + (set-process-coding-system process cs cs)))) + +(defcustom TeX-show-compilation nil + "If non-nil, show output of TeX compilation in other window." + :group 'TeX-command + :type 'boolean) + +(defun TeX-run-command (name command file) + "Create a process for NAME using COMMAND to process FILE. +Return the new process." + (let ((default TeX-command-default) + (buffer (TeX-process-buffer-name file)) + (dir (TeX-master-directory)) + (command-buff (current-buffer))) + (TeX-process-check file) ; Check that no process is running + (setq-default TeX-command-buffer command-buff) + (get-buffer-create buffer) + (set-buffer buffer) + (buffer-disable-undo) + (erase-buffer) + (set (make-local-variable 'line-number-display-limit) 0) + (setq TeX-output-extension nil) + (set (make-local-variable 'TeX-command-buffer) command-buff) + (if dir (cd dir)) + (insert "Running `" name "' on `" file "' with ``" command "''\n") + (TeX-output-mode) + (if TeX-show-compilation + (display-buffer buffer) + (message "Type `%s' to display results of compilation." + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (setq TeX-parse-function #'TeX-parse-command) + (setq TeX-command-default default) + (setq TeX-sentinel-function + (lambda (_process name) + (message (concat name ": done.")))) + (if TeX-process-asynchronous + (let ((process (start-process name buffer TeX-shell + TeX-shell-command-option command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (TeX-command-mode-line process) + (set-process-filter process #'TeX-command-filter) + (set-process-sentinel process #'TeX-command-sentinel) + (set-marker (process-mark process) (point-max)) + (setq compilation-in-progress (cons process compilation-in-progress)) + process) + (setq mode-line-process ": run") + (force-mode-line-update) + (call-process TeX-shell nil buffer nil + TeX-shell-command-option command)))) + +(defun TeX-run-set-command (name command) + "Remember TeX command to use to NAME and set corresponding output extension." + (setq TeX-command-default name + TeX-output-extension + (if (and (null (TeX-PDF-from-DVI)) TeX-PDF-mode) "pdf" "dvi")) + (let ((case-fold-search t) + (lst TeX-command-output-list)) + (while lst + (if (string-match (car (car lst)) command) + (setq TeX-output-extension (car (cdr (car lst))) + lst nil) + (setq lst (cdr lst)))))) + +(defvar TeX-error-report-switches nil + "Reports presence of errors after `TeX-run-TeX'. +Actually, `TeX-run-format' sets it. +To test whether the current buffer has a compile error from last +run of `TeX-run-format', use + (TeX-error-report-has-errors-p)") + +(defun TeX-error-report-has-errors-p () + "Return non-nil if current buffer has compile errors from last TeX run." + (plist-get TeX-error-report-switches (intern (TeX-master-file)))) + +(defun TeX-run-format (name command file) + "Create a process for NAME using COMMAND to format FILE with TeX." + (TeX-run-set-command name command) + (let ((current-master (TeX-master-file)) + (buffer (TeX-process-buffer-name file)) + (process (TeX-run-command name command file))) + + ;; Save information in TeX-error-report-switches + ;; Initialize error to nil (no error) for current master. + ;; Presence of error is reported inside `TeX-TeX-sentinel-check' + + ;; the current master file is saved because error routines are + ;; parsed in other buffers; + (setq TeX-error-report-switches + (plist-put TeX-error-report-switches + 'TeX-current-master current-master)) + ;; reset error to nil (no error) + (setq TeX-error-report-switches + (plist-put TeX-error-report-switches + (intern current-master) nil)) + + ;; Hook to TeX debugger. + (with-current-buffer buffer + (TeX-parse-reset) + (setq TeX-parse-function #'TeX-parse-TeX) + (setq TeX-sentinel-function #'TeX-TeX-sentinel) + (if TeX-process-asynchronous + (progn + ;; Updating the mode line. + (setq TeX-current-page "[0]") + (TeX-format-mode-line process) + (set-process-filter process #'TeX-format-filter))) + process))) + +(defun TeX-run-TeX (name command file) + "Create a process for NAME using COMMAND to format FILE with TeX." + + (let ((idx-file nil) (element nil)) + ;; Store md5 hash of the index file before running LaTeX. + (and (memq major-mode '(doctex-mode latex-mode)) + (prog1 (file-exists-p + (setq idx-file (expand-file-name (TeX-active-master "idx")))) + ;; In order to avoid confusion and pollution of + ;; `LaTeX-idx-md5-alist', remove from this alist all md5 hashes of + ;; the current index file. Note `assq-delete-all' doesn't work with + ;; string keys and has problems with non-list elements in Emacs 21 + ;; (see file tex-site.el). + (while (setq element (assoc idx-file LaTeX-idx-md5-alist)) + (setq LaTeX-idx-md5-alist (delq element LaTeX-idx-md5-alist)))) + (with-temp-buffer + (insert-file-contents-literally idx-file) + (push (cons idx-file (md5 (current-buffer))) LaTeX-idx-md5-alist)))) + + ;; can we assume that TeX-sentinel-function will not be changed + ;; during (TeX-run-format ..)? --pg + ;; rather use let* ? --pg + + (if TeX-interactive-mode + (TeX-run-interactive name command file) + (let* ((sentinel-function TeX-sentinel-default-function) + (process (TeX-run-format name command file))) + (setq TeX-sentinel-function sentinel-function) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process))))) + +;; backward compatibilty + +(defalias 'TeX-run-LaTeX #'TeX-run-TeX) + + +(defun TeX-run-BibTeX (name command file) + "Create a process for NAME using COMMAND to format FILE with BibTeX." + (let ((process (TeX-run-command name command file))) + (setq TeX-sentinel-function #'TeX-BibTeX-sentinel) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-Biber (name command file) + "Create a process for NAME using COMMAND to format FILE with Biber." + (let ((process (TeX-run-command name command file))) + (setq TeX-sentinel-function #'TeX-Biber-sentinel) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-dvips (name command file) + "Create a process for NAME using COMMAND to convert FILE with dvips." + (let ((process (TeX-run-command name command file))) + (setq TeX-sentinel-function #'TeX-dvips-sentinel) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-dvipdfmx (name command file) + "Create a process for NAME using COMMAND to convert FILE with dvipdfmx." + (let ((process (TeX-run-command name command file))) + (setq TeX-sentinel-function #'TeX-dvipdfmx-sentinel) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-ps2pdf (name command file) + "Create a process for NAME using COMMAND to convert FILE with ps2pdf." + (let ((process (TeX-run-command name command file))) + (setq TeX-sentinel-function #'TeX-ps2pdf-sentinel) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-index (name command file) + "Create a process for NAME using COMMAND to compile the index file." + (let ((process (TeX-run-command name command file)) + (element nil)) + (setq TeX-sentinel-function #'TeX-index-sentinel) + ;; Same cleaning as that for `LaTeX-idx-md5-alist' in `TeX-run-TeX'. + (while (setq element + ;; `file' has been determined in `TeX-command-buffer', while + ;; this function has `TeX-master-directory' as + ;; `default-directory', then we have to expand `file' file-name + ;; in the same directory of `TeX-command-buffer'. + (assoc (with-current-buffer TeX-command-buffer + (expand-file-name (TeX-active-master "idx"))) + LaTeX-idx-changed-alist)) + (setq LaTeX-idx-changed-alist (delq element LaTeX-idx-changed-alist))) + (if TeX-process-asynchronous + process + (TeX-synchronous-sentinel name file process)))) + +(defun TeX-run-compile (_name command _file) + "Ignore first and third argument, start compile with second argument." + (let ((default-directory (TeX-master-directory))) + (setq TeX-command-buffer (compile command))) + ;; Make `compilation-mode' recognize file names with spaces. + ;; (bug#36483) + ;; FIXME: This is just an ad-hoc workaround and it's better to fix + ;; the regular expression in compile.el properly, if possible. But + ;; there was no response to such request in emacs-devel@gnu.org. + (with-current-buffer TeX-command-buffer + (make-local-variable 'compilation-error-regexp-alist) + ;; Add slightly modified entry of the one associated with `comma' + ;; in `compilation-error-regexp-alist-alist' to pick up file names + ;; with spaces. + (add-to-list 'compilation-error-regexp-alist + '("^\"\\([^,\"\n\t]+\\)\", line \\([0-9]+\\)\ +\\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4)) + t))) + +(defun TeX-run-shell (_name command _file) + "Ignore first and third argument, start shell-command with second argument." + (let ((default-directory (TeX-master-directory))) + (shell-command command) + (if (eq system-type 'ms-dos) + (redraw-display)))) + +(defun TeX-run-discard (_name command _file) + "Start COMMAND as process, discarding its output. +NAME and FILE are ignored." + (let ((default-directory (TeX-master-directory))) + (call-process TeX-shell + nil 0 nil + TeX-shell-command-option + command))) + +(defun TeX-run-discard-foreground (_name command _file) + "Call process with second argument in the foreground, discarding its output. +With support for MS-DOS, especially when dviout is used with PC-9801 series." + (if (and (boundp 'dos-machine-type) (eq dos-machine-type 'pc98)) ;if PC-9801 + (send-string-to-terminal "\e[2J")) ; clear screen + (call-process TeX-shell (if (eq system-type 'ms-dos) "con") nil nil + TeX-shell-command-option command) + (if (eq system-type 'ms-dos) + (redraw-display))) +(defalias 'TeX-run-dviout #'TeX-run-discard-foreground) + +(defun TeX-run-background (name command _file) + "Start process with second argument, show output when and if it arrives." + (let ((dir (TeX-master-directory))) + (set-buffer (get-buffer-create "*TeX background*")) + (if dir (cd dir)) + (erase-buffer) + (let ((process (start-process (concat name " background") + nil TeX-shell + TeX-shell-command-option command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (set-process-filter process #'TeX-background-filter) + (set-process-query-on-exit-flag process nil)))) + +(defun TeX-run-silent (name command _file) + "Start process with second argument." + (let ((dir (TeX-master-directory))) + (set-buffer (get-buffer-create "*TeX silent*")) + (if dir (cd dir)) + (erase-buffer) + (let ((process (start-process (concat name " silent") + (current-buffer) TeX-shell + TeX-shell-command-option command))) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (set-process-query-on-exit-flag process nil)))) + +(defun TeX-run-interactive (name command file) + "Run TeX interactively. +Run command in a buffer (in comint-shell-mode) so that it accepts user +interaction. If you return to the file buffer after the TeX run, +Error parsing on \\[next-error] should work with a bit of luck." + (TeX-run-set-command name command) + (require 'comint) + (let ((default TeX-command-default) + (buffer (TeX-process-buffer-name file)) + (process nil) + (dir (TeX-master-directory)) + (command-buff (current-buffer)) + (sentinel-function TeX-sentinel-default-function)) ; inherit from major mode + (TeX-process-check file) ; Check that no process is running + (setq-default TeX-command-buffer command-buff) + (with-output-to-temp-buffer buffer) + (set-buffer buffer) + (set (make-local-variable 'TeX-command-buffer) command-buff) + (setq buffer-read-only nil) + (if dir (cd dir)) + (insert "Running `" name "' on `" file "' with ``" command "''\n") + (comint-exec buffer name TeX-shell nil + (list TeX-shell-command-option command)) + (comint-mode) + (add-hook 'comint-output-filter-functions #'TeX-interactive-goto-prompt) + (setq mode-name name) + (setq TeX-command-default default) + (setq process (get-buffer-process buffer)) + (if TeX-after-start-process-function + (funcall TeX-after-start-process-function process)) + (TeX-command-mode-line process) + (set-process-sentinel process #'TeX-command-sentinel) + (set-marker (process-mark process) (point-max)) + (setq compilation-in-progress (cons process compilation-in-progress)) + (TeX-parse-reset) + (setq TeX-parse-function #'TeX-parse-TeX) + ;; use the sentinel-function that the major mode sets, not the LaTeX one + (setq TeX-sentinel-function sentinel-function))) + +(defun TeX-run-function (_name command _file) + "Execute Lisp function or function call given as the string COMMAND. +Parameters NAME and FILE are ignored." + (let ((fun (car (read-from-string command)))) + (if (functionp fun) (funcall fun) (eval fun t)))) + +(defun TeX-run-discard-or-function (name command file) + "Start COMMAND as process or execute it as a Lisp function. +If run as a process, the output is discarded. COMMAND is +expected to be a string. NAME and FILE are ignored." + (if (functionp (car (read-from-string command))) + (TeX-run-function name command file) + (TeX-run-discard name command file))) + +(defun TeX-run-ispell-on-document (_command _ignored _name) + "Run Ispell on all open files belonging to the current document. +This function is *obsolete* and only here for compatibility +reasons. Use `TeX-run-function' instead." + (interactive) + (TeX-ispell-document "")) + + +;;; Command Sentinels + +(defun TeX-synchronous-sentinel (name file result) + "Process TeX command output buffer after the process dies." + (let ((buffer (TeX-process-buffer (file-name-nondirectory file)))) + (with-current-buffer buffer + + ;; Append post-mortem information to the buffer + (goto-char (point-max)) + (insert "\n" mode-name (if (and result (zerop result)) + " finished" " exited") " at " + (substring (current-time-string) 0 -5)) + (setq mode-line-process ": exit") + + ;; Do command specific actions. + (setq TeX-command-next TeX-command-Show) + (goto-char (point-min)) + (apply TeX-sentinel-function nil name nil) + + ;; Force mode line redisplay soon + (force-mode-line-update)))) + +(defun TeX-command-sentinel (process msg) + "Process TeX command output buffer after the PROCESS dies. +Insert MSG with some additional information." + ;; Set `TeX-transient-master' here because `preview-parse-messages' + ;; may open files and thereby trigger master file questions which we + ;; don't want and need because we already know the master. Use + ;; `TeX-master-file' instead of `TeX-active-master' to determine the + ;; master because the region file should never be the master. + (let* ((TeX-transient-master (TeX-master-file)) + (buffer (process-buffer process)) + (name (process-name process))) + (cond ((null (buffer-name buffer)) ; buffer killed + (set-process-buffer process nil) + (set-process-sentinel process nil)) + ((memq (process-status process) '(signal exit)) + (with-current-buffer buffer + + ;; Append post-mortem information to the buffer + (goto-char (point-max)) + (insert-before-markers "\n" mode-name " " msg) + (forward-char -1) + (insert " at " + (substring (current-time-string) 0 -5)) + (forward-char 1) + + ;; Do command specific actions. + (TeX-command-mode-line process) + (setq TeX-command-next TeX-command-Show) + (goto-char (point-min)) + (apply TeX-sentinel-function process name nil) + + + ;; If buffer and mode line will show that the process + ;; is dead, we can delete it now. Otherwise it + ;; will stay around until M-x list-processes. + (delete-process process)) + + ;; Force mode line redisplay soon + ;; Do this in all buffers (bug#38058 and bug#40965) + (force-mode-line-update t)))) + + (setq compilation-in-progress (delq process compilation-in-progress))) + + +(defvar TeX-sentinel-function (lambda (_process _name) nil) + "Hook to cleanup TeX command buffer after termination of PROCESS. +NAME is the name of the process.") + +(make-variable-buffer-local 'TeX-sentinel-function) + + +(defvar TeX-sentinel-default-function (lambda (_process _name) nil) + "Default for `TeX-sentinel-function'. To be set in major mode. +Hook to cleanup TeX command buffer after termination of PROCESS. +NAME is the name of the process.") + +(make-variable-buffer-local 'TeX-sentinel-default-function) + +(defun TeX-TeX-sentinel (process name) + "Cleanup TeX output buffer after running TeX. + +Parse the output buffer to collect errors and warnings if the +variable `TeX-parse-all-errors' is non-nil. + +Open the error overview if +`TeX-error-overview-open-after-TeX-run' is non-nil and there are +errors or warnings to show." + (if (TeX-TeX-sentinel-check process name) + (progn + (if TeX-parse-all-errors + (TeX-parse-all-errors)) + (if (and TeX-error-overview-open-after-TeX-run + (TeX-error-overview-make-entries + (TeX-master-directory) (TeX-active-buffer))) + (TeX-error-overview))) + (message (concat name ": formatted " (TeX-current-pages))) + (let (dvi2pdf) + (if (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) + (setq TeX-command-next dvi2pdf) + (setq TeX-command-next TeX-command-Show))))) + +(defun TeX-current-pages () + "Return string indicating the number of pages formatted." + (cond ((null TeX-current-page) + "some pages") + ((string-match "[^0-9]1[^0-9]" TeX-current-page) + (concat TeX-current-page " page")) + (t + (concat TeX-current-page " pages")))) + +(defun TeX-TeX-sentinel-check (process name) + "Cleanup TeX output buffer after running TeX. +Return nil only if no errors were found." + (save-excursion + (goto-char (point-max)) + (cond + ((and (string-match "ConTeXt" name) (boundp 'ConTeXt-Mark-version) + (with-current-buffer TeX-command-buffer + (string= ConTeXt-Mark-version "IV"))) + (when (re-search-backward " > result saved in file: \\(.*?\\), " nil t) + (let ((output-file (TeX-match-buffer 1))) + ;; Shave off quotation marks if present. + (when (string-match "\\`\"\\(.*\\)\"\\'" output-file) + (setq output-file (match-string 1 output-file))) + (setq TeX-output-extension + (if (string-match "\\.\\([^.]*\\)$" output-file) + (match-string 1 output-file) + "dvi"))) + (if (re-search-forward ", \\([0-9]+\\) shipped pages, " nil t) + (setq TeX-current-page (concat "{" (TeX-match-buffer 1) "}"))))) + (t + (if (re-search-backward "^Output written on \\(.*?\\) (\\([0-9]+\\) page" + nil t) + (let ((output-file (TeX-match-buffer 1))) + (setq TeX-current-page (concat "{" (TeX-match-buffer 2) "}")) + ;; Shave off quotation marks if present. + (when (string-match "\\`\"\\(.*\\)\"\\'" output-file) + (setq output-file (match-string 1 output-file))) + (setq TeX-output-extension + (if (string-match "\\.\\([^.]*\\)$" output-file) + (match-string 1 output-file) + "dvi"))))))) + (if process (TeX-format-mode-line process)) + (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t) + (progn + (message "%s errors in `%s'. Use %s to display." name (buffer-name) + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-next-error]")) + (setq TeX-command-next TeX-command-default) + ;; error reported to TeX-error-report-switches + (setq TeX-error-report-switches + (plist-put TeX-error-report-switches + (intern (plist-get TeX-error-report-switches + 'TeX-current-master)) + t)) + t) + (let (dvi2pdf) + (if (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) + (setq TeX-command-next dvi2pdf) + (setq TeX-command-next TeX-command-Show))) + nil)) + +;; This regexp should catch warnings of the type +;; LaTeX Warning: ... +;; LaTeX Font Warning: ... +;; Package xyz123 Warning: ... +;; Class xyz123 Warning: ... +(defvar LaTeX-warnings-regexp + "\\(?:LaTeX\\|Class\\|Package\\|\\*\\) [-A-Za-z0-9]* ?[Ww]arning:" + "Regexp matching LaTeX warnings.") + +(defun TeX-LaTeX-sentinel-has-warnings () + "Return non-nil, if the output buffer contains warnings. +Warnings can be indicated by LaTeX or packages." + (save-excursion + (goto-char (point-min)) + (re-search-forward (concat "^" LaTeX-warnings-regexp) nil t))) + +(defun TeX-LaTeX-sentinel-has-bad-boxes () + "Return non-nil, if LaTeX output indicates overfull or underfull boxes." + (save-excursion + (goto-char (point-min)) + (re-search-forward "^\\(Ov\\|Und\\)erfull \\\\" nil t))) + +;; should go into latex.el? --pg +(defun TeX-LaTeX-sentinel (process name) + "Cleanup TeX output buffer after running LaTeX. + +Parse the output buffer to collect errors and warnings if the +variable `TeX-parse-all-errors' is non-nil. + +Open the error overview if +`TeX-error-overview-open-after-TeX-run' is non-nil and there are +errors or warnings to show." + (if TeX-parse-all-errors + (TeX-parse-all-errors)) + (if (and TeX-error-overview-open-after-TeX-run + (TeX-error-overview-make-entries + (TeX-master-directory) (TeX-active-buffer))) + (TeX-error-overview)) + (cond ((TeX-TeX-sentinel-check process name)) + ((and (save-excursion + (re-search-forward + "^Package biblatex Warning: Please (re)run Biber on the file" + nil t)) + (with-current-buffer TeX-command-buffer + (and (LaTeX-bibliography-list) + (TeX-check-files (TeX-master-file "bbl") + (TeX-style-list) + (append TeX-file-extensions + BibTeX-file-extensions + TeX-Biber-file-extensions))))) + (message "%s%s" "You should run Biber to get citations right, " + (TeX-current-pages)) + (setq TeX-command-next (with-current-buffer TeX-command-buffer + TeX-command-Biber))) + ((and (save-excursion + (re-search-forward + "^\\(?:LaTeX\\|Package natbib\\) Warning: Citation" nil t)) + (with-current-buffer TeX-command-buffer + (and (LaTeX-bibliography-list) + (TeX-check-files (TeX-master-file "bbl") + (TeX-style-list) + (append TeX-file-extensions + BibTeX-file-extensions + TeX-Biber-file-extensions))))) + (message "%s%s" "You should run BibTeX to get citations right, " + (TeX-current-pages)) + (setq TeX-command-next (with-current-buffer TeX-command-buffer + TeX-command-BibTeX))) + ((re-search-forward "Package biblatex Warning: Please rerun LaTeX" nil t) + (message "%s%s" "You should run LaTeX again, " (TeX-current-pages)) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "^(biblatex)\\W+Page breaks have changed" nil t) + (message "%s%s" "You should run LaTeX again - page breaks have changed, " + (TeX-current-pages)) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "^\\(?:LaTeX Warning: Label(s)\\|\ +Package natbib Warning: Citation(s)\\)" nil t) + (message "%s%s" "You should run LaTeX again to get references right, " + (TeX-current-pages)) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward + "^\\(?:(rerunfilecheck)\\|Package hyperref Warning:\\)\\W+\ +Rerun to get outlines right" nil t) + (message "%s%s" "You should run LaTeX again to get outlines right, " + (TeX-current-pages)) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "^LaTeX Warning: Reference" nil t) + (message "%s%s%s" name ": there were unresolved references, " + (TeX-current-pages)) + (let (dvi2pdf) + (if (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) + (setq TeX-command-next dvi2pdf) + (setq TeX-command-next TeX-command-Show)))) + ((re-search-forward "^\\(?:LaTeX Warning: Citation\\|\ +Package natbib Warning:.*undefined citations\\)" nil t) + (message "%s%s%s" name ": there were unresolved citations, " + (TeX-current-pages)) + (let (dvi2pdf) + (if (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) + (setq TeX-command-next dvi2pdf) + (setq TeX-command-next TeX-command-Show)))) + ((re-search-forward "^No file .*\\.\\(toc\\|lof\\|lot\\)\\.$" nil t) + (message "%s" (concat "You should run LaTeX again to get " + (upcase (match-string-no-properties 1)) + " right")) + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "Package longtable Warning: Table widths have \ +changed\\. Rerun LaTeX\\." nil t) + (message + "%s" "You should run LaTeX again to get table formatting right") + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "^hf-TikZ Warning: Mark '.*' changed\\. \ +Rerun to get mark in right position\\." nil t) + (message + "%s" "You should run LaTeX again to get TikZ marks in right position") + (setq TeX-command-next TeX-command-default)) + ((re-search-forward "^\\* xsim warning: \"rerun\"" nil t) + (message + "%s" "You should run LaTeX again to synchronize exercise properties") + (setq TeX-command-next TeX-command-default)) + ((re-search-forward + "^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \ +\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t) + (let* ((warnings (and TeX-debug-warnings + (TeX-LaTeX-sentinel-has-warnings))) + (bad-boxes (and TeX-debug-bad-boxes + (TeX-LaTeX-sentinel-has-bad-boxes))) + (add-info (when (or warnings bad-boxes) + (concat " (with " + (when warnings "warnings") + (when (and warnings bad-boxes) " and ") + (when bad-boxes "bad boxes") + ")")))) + (message "%s" (concat name ": successfully formatted " + (TeX-current-pages) add-info))) + (let (dvi2pdf) + (if (with-current-buffer TeX-command-buffer + (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) + (setq TeX-command-next dvi2pdf) + (setq TeX-command-next TeX-command-Show)))) + (t + (message "%s%s%s" name ": problems after " (TeX-current-pages)) + (setq TeX-command-next TeX-command-default))) + + ;; Check whether the idx file changed. + (let (idx-file) + (and (file-exists-p + (setq idx-file + (with-current-buffer TeX-command-buffer + (expand-file-name (TeX-active-master "idx"))))) + ;; imakeidx package automatically runs makeindex, thus, we need to be + ;; sure .ind file isn't newer than .idx. + (TeX-check-files (with-current-buffer TeX-command-buffer + (expand-file-name (TeX-active-master "ind"))) + (with-current-buffer TeX-command-buffer + (list (file-name-nondirectory (TeX-active-master)))) + '("idx")) + (with-temp-buffer + (insert-file-contents-literally idx-file) + (not (equal + ;; Compare old md5 hash of the idx file with the new one. + (cdr (assoc idx-file LaTeX-idx-md5-alist)) + (md5 (current-buffer))))) + (push (cons idx-file t) LaTeX-idx-changed-alist))) + + (unless (TeX-error-report-has-errors-p) + (run-hook-with-args 'TeX-after-compilation-finished-functions + (with-current-buffer TeX-command-buffer + (expand-file-name + (TeX-active-master (TeX-output-extension))))))) + +;; should go into latex.el? --pg +(defun TeX-BibTeX-sentinel (_process _name) + "Cleanup TeX output buffer after running BibTeX." + (goto-char (point-max)) + (cond + ;; Check whether BibTeX reports any warnings or errors. + ((re-search-backward (concat + "^(There \\(?:was\\|were\\) \\([0-9]+\\) " + "\\(warnings?\\|error messages?\\))") + nil t) + ;; Tell the user their number so that she sees whether the + ;; situation is getting better or worse. + (message (concat "BibTeX finished with %s %s. " + "Type `%s' to display output.") + (match-string 1) (match-string 2) + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (t + (message (concat "BibTeX finished successfully. " + "Run LaTeX again to get citations right.")))) + ;; In any case, run the default next command. + (setq TeX-command-next TeX-command-default)) + +(defun TeX-Biber-sentinel (_process _name) + "Cleanup TeX output buffer after running Biber." + (goto-char (point-max)) + (cond + ((re-search-backward "^INFO - \\(WARNINGS\\|ERRORS\\): \\([0-9]+\\)" nil t) + (message (concat "Biber finished with %s %s. " + "Type `%s' to display output.") + (match-string 2) (downcase (match-string 1)) + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")) + (setq TeX-command-next TeX-command-default)) + ((re-search-backward "^FATAL" nil t) + (message (concat "Biber had a fatal error and did not finish! " + "Type `%s' to display output.") + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]")) + (setq TeX-command-next TeX-command-Biber)) + (t + (message (concat "Biber finished successfully. " + "Run LaTeX again to get citations right.")) + (setq TeX-command-next TeX-command-default)))) + +(defun TeX-dvips-sentinel (_process _name) + "Cleanup TeX output buffer after running dvips." + (goto-char (point-max)) + (cond + ((search-backward "TeX Output exited abnormally" nil t) + (message "Dvips failed. Type `%s' to display output." + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (t + (if (with-current-buffer TeX-command-buffer + (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode)) + (setq TeX-output-extension "ps" + TeX-command-next "Ps2pdf")) + (message "Dvips finished successfully. ")))) + +(defun TeX-dvipdfmx-sentinel (_process _name) + "Cleanup TeX output buffer after running dvipdfmx." + (goto-char (point-max)) + (cond + ((search-backward "TeX Output exited abnormally" nil t) + (message "Dvipdfmx failed. Type `%s' to display output." + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (t + (if (with-current-buffer TeX-command-buffer + (and (equal (TeX-PDF-from-DVI) "Dvipdfmx") TeX-PDF-mode)) + (setq TeX-output-extension "pdf" + TeX-command-next TeX-command-Show)) + (message "Dvipdfmx finished successfully. ")))) + +(defun TeX-ps2pdf-sentinel (_process _name) + "Cleanup TeX output buffer after running ps2pdf." + (goto-char (point-max)) + (cond + ((search-backward "TeX Output exited abnormally" nil t) + (message "ps2pdf failed. Type `%s' to display output." + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (t + (if (with-current-buffer TeX-command-buffer + (and (equal (TeX-PDF-from-DVI) "Dvips") TeX-PDF-mode)) + (setq TeX-command-next TeX-command-Show + TeX-output-extension "pdf")) + (message "ps2pdf finished successfully. ")))) + +(defun TeX-index-sentinel (_process _name) + "Cleanup TeX output buffer after compiling index." + (goto-char (point-max)) + (cond + ((search-backward "TeX Output exited abnormally" nil t) + (message "Index failed. Type `%s' to display output." + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-recenter-output-buffer]"))) + (t + (setq TeX-command-next TeX-command-default) + (message (concat "Index finished successfully. " + "Run LaTeX again to get index right."))))) + +(defun TeX-command-sequence-sentinel (process string) + "Call the appropriate sentinel for the current PROCESS. +Pass two arguments PROCESS and STRING to the sentinel. + +If there are no errors, call back `TeX-command-sequence' using +`TeX-command-sequence-command' as command argument, unless this +variable is nil." + (with-current-buffer (process-buffer process) + (funcall TeX-command-sequence-sentinel process string) + (if (string-match "\\(finished\\|exited\\)" string) + (with-current-buffer TeX-command-buffer + (unless + (or + (TeX-error-report-has-errors-p) + (null TeX-command-sequence-command)) + (TeX-command-sequence TeX-command-sequence-command nil + TeX-command-sequence-file-function)))))) + +;;; Process Control + +;; COMPATIBILITY for emacs < 27 +(if (< emacs-major-version 27) + (or (assq 'compilation-in-progress minor-mode-alist) + (setq minor-mode-alist (cons '(compilation-in-progress " Compiling") + minor-mode-alist)))) + +(defun TeX-process-get-variable (name symbol &optional default) + "Return the value in the process buffer for NAME of SYMBOL. + +Return DEFAULT if the process buffer does not exist or SYMBOL is not +defined." + (let ((buffer (TeX-process-buffer name))) + (if (and buffer + (local-variable-p symbol buffer)) + (with-current-buffer buffer + (symbol-value symbol)) + default))) + +(defun TeX-process-set-variable (name symbol value) + "Set the variable SYMBOL in the process buffer to VALUE. +Return nil only if no process buffer exists." + (let ((buffer (TeX-process-buffer name))) + (if buffer + (with-current-buffer buffer + (set symbol value) + t) + nil))) + +(defun TeX-process-check (name) + "Check if a process for the TeX document NAME already exist. +If so, give the user the choice of aborting the process or the current +command." + (let (process) + (while (and (setq process (TeX-process name)) + (eq (process-status process) 'run)) + (cond + ((yes-or-no-p (concat "Process `" + (process-name process) + "' for document `" + name + "' running, kill it? ")) + (delete-process process)) + ((eq (process-status process) 'run) + (error "Cannot have two processes for the same document")))))) + +(defun TeX-process-buffer-name (name) + "Return name of AUCTeX buffer associated with the document NAME." + (concat "*" (abbreviate-file-name (expand-file-name name)) " output*")) + +(defun TeX-process-buffer (name) + "Return the AUCTeX buffer associated with the document NAME." + (get-buffer (TeX-process-buffer-name name))) + +(defun TeX-process (name) + "Return AUCTeX process associated with the document NAME." + (and TeX-process-asynchronous + (get-buffer-process (TeX-process-buffer name)))) + +;;; Process Filters + +(defun TeX-command-mode-line (process) + "Format the mode line for a buffer containing output from PROCESS." + (setq mode-line-process (concat ": " + (symbol-name (process-status process)))) + (force-mode-line-update)) + +(defun TeX-command-filter (process string) + "Filter to process normal output." + (with-current-buffer (process-buffer process) + (save-excursion + (goto-char (process-mark process)) + (insert-before-markers string) + (set-marker (process-mark process) (point))))) + +(defvar TeX-current-page nil + "The page number currently being formatted, enclosed in brackets.") + + (make-variable-buffer-local 'TeX-current-page) + +(defun TeX-format-mode-line (process) + "Format the mode line for a buffer containing TeX output from PROCESS." + (setq mode-line-process (concat " " TeX-current-page ": " + (symbol-name (process-status process)))) + (force-mode-line-update)) + +(defun TeX-format-filter (process string) + "Filter to process TeX output." + (with-current-buffer (process-buffer process) + (let (str pos end (pt (marker-position (process-mark process)))) + (save-excursion + (goto-char pt) + (insert-before-markers string) + (set-marker (process-mark process) (point)) + ;; Remove line breaks at columns 79 and 80 + (while (> (point) pt) + (end-of-line 0) + (when (and (memq (- (point) (line-beginning-position)) '(79 80)) + ;; Heuristic: Don't delete the linebreak if the next line + ;; is empty or starts with an opening parenthesis, or if + ;; point is located after a period and in the next line no + ;; word char follows. + (not (memq (char-after (1+ (point))) '(?\n ?\())) + (not (and (eq (char-before) ?.) + (char-after (1+ (point))) + (not (eq ?w (char-syntax (char-after (1+ (point))))))))) + (delete-char 1))) + (goto-char (marker-position (process-mark process))) + ;; Determine current page + (while (and pt + (skip-chars-backward "^]" pt) + (> (point) pt)) + (setq end (point)) + (backward-char) + (skip-chars-backward "-0-9\n." (max (point-min) (- pt 128))) + (when (and (eq ?\[ (char-before)) + (not (eq ?\] (char-after))) + (progn + (setq str (buffer-substring (1- (point)) end) + pos nil) + (while (setq pos (string-match "\n" str pos)) + (setq str (replace-match "" t t str))) + (string-match + "\\`\\[-?[0-9]+\\(\\.-?[0-9]+\\)\\{0,9\\}\\]\\'" + str))) + (setq TeX-current-page str + pt nil) + (TeX-format-mode-line process))))))) + +(defvar TeX-parse-function nil + "Function to call to parse content of TeX output buffer.") +(make-variable-buffer-local 'TeX-parse-function) + +(defun TeX-background-filter (_process string) + "Filter to process background output." + (let ((old-window (selected-window)) + (pop-up-windows t)) + (TeX-pop-to-buffer "*TeX background*" nil t) + (goto-char (point-max)) + (insert string) + (select-window old-window))) + +;; Copy and adaption of `comint-postoutput-scroll-to-bottom' from CVS +;; Emacs of 2005-04-24. +(defun TeX-interactive-goto-prompt (string) + "Move point to prompt of an interactive TeX run." + (let* ((selected (selected-window)) + (current (current-buffer)) + (process (get-buffer-process current))) + (unwind-protect + (when process + (walk-windows + (lambda (window) + (when (eq (window-buffer window) current) + (select-window window) + (when (and (< (point) (process-mark process)) + (string-match "^\\? $" string)) + (goto-char (process-mark process))) + (select-window selected))) + nil t)) + (set-buffer current)))) + + +;;; Active Process + +(defvar TeX-current-process-region-p nil + "Non-nil means that the last TeX command is on a region.") + +(defun TeX-active-process () + "Return the active process for the current buffer." + (TeX-process (TeX-active-master))) + +(defun TeX-active-buffer () + "Return the buffer of the active process for this buffer." + (and TeX-command-buffer + (with-current-buffer TeX-command-buffer + (TeX-process-buffer (TeX-active-master))))) + +(defun TeX-active-master (&optional extension nondirectory _ignore) + "The master file currently being compiled. + +If optional argument EXTENSION is non-nil, add that file extension to +the name. Special value t means use `TeX-default-extension'. + +If optional second argument NONDIRECTORY is non-nil, do not include +the directory. + +The compatibility argument IGNORE is ignored." + ;; The third argument `_ignore' is kept for symmetry with + ;; `TeX-master-file's third argument `ask'. For example, it's used + ;; in `TeX-active-master-with-quotes' for backward compatibility. + ;; Keep this in mind should you want to use another argument here. + ;; See also the similar comment in `TeX-region-file'. + (if TeX-current-process-region-p + (TeX-region-file extension nondirectory) + (TeX-master-file extension nondirectory))) + +(defvar TeX-command-buffer nil + "The buffer from where the last TeX command was issued.") + +;;; Region File + + +(defvar TeX-region-hook nil + "List of hooks to run before the region file is saved. +The hooks are run in the region buffer, you may use the variable +`TeX-region-master-buffer' to access the buffer of the master +file and `TeX-region-orig-buffer' to access the buffer where +\\[TeX-command-region] or \\[TeX-command-buffer] is invoked +from.") + +(defun TeX-quote-filename (file) + "Convert file name FILE into a form acceptable to TeX." + (let (pos) + (while (setq pos (string-match "\\\\" file pos)) + (setq file (replace-match "/" t t file 0) + pos (1+ pos))) + (while (setq pos (string-match "[~#]" file pos)) + (setq file (replace-match "\\\\string\\&" t nil file 0) + pos (+ pos 8)))) + ;; Use \unexpanded so that \message outputs the raw file name. + ;; When \usepackage[utf8]{inputenc} is used in standard (pdf)latex, + ;; \message does not output non-ascii file name in raw form without + ;; \unexpanded, which makes AUCTeX to fail to recognize the file + ;; names right when analysing the process output buffer. + ;; Note that \usepackage[utf8]{inputenc} is enabled by default in + ;; standard (pdf)latex since TeXLive 2018. + (if (and (memq major-mode '(latex-mode doctex-mode)) + ;; Japanese upLaTeX requires the same treatment with + ;; respect to non-ascii characters other than Japanese, in + ;; file names within \message{}. + ;; However, pLaTeX (non u- version) does not support + ;; non-ascii file name encoded in UTF-8. So considering + ;; `ptex' doesn't make sense here. We cater for only + ;; `default' and `uptex' engines. + (memq TeX-engine '(default uptex))) + ;; It would fail to put entire `file' inside \unexpanded{} when + ;; the above loop injects \string before "#" and "~". So put + ;; only multibyte characters inside \unexpanded{}. + ;; It is safe in upLaTeX to use \unexpanded{} on Japanese + ;; characters though they are handled by upLaTeX in a totally + ;; different way from inputenc. + ;; Thus put all multibyte characters, without considering + ;; whether they are Japanese or not, inside \unexpanded{}. + (replace-regexp-in-string "[[:multibyte:]]+" + "\\\\unexpanded{\\&}" file t) + file)) + +(defvar-local TeX-region-orig-buffer nil + "The original buffer in which the TeX-region was created.") + +(defvar-local TeX-region-master-buffer nil + "The TeX-master buffer of the document for which the TeX-region +was created.") + +(defun TeX-region-create (file region original offset) + "Create a new file named FILE with the string REGION. +The region is taken from ORIGINAL starting at line OFFSET. + +The current buffer and master file is searched, in order to ensure +that the TeX header and trailer information is also included. + +The OFFSET is used to provide the debugger with information about the +original file." + (if (fboundp 'preview--skip-preamble-region) + (let ((temp (preview--skip-preamble-region region offset))) + (if temp + ;; Skip preamble for the sake of predumped formats. + (setq region (car temp) + offset (cdr temp))))) + + (let* (;; We shift buffer a lot, so we must keep track of the buffer + ;; local variables. + (header-end TeX-header-end) + (trailer-start TeX-trailer-start) + + ;; We seach for header and trailer in the master file. + (orig-buffer (current-buffer)) + (master-name (TeX-master-file TeX-default-extension)) + (master-buffer (find-file-noselect master-name)) + + ;; Attempt to disable font lock. + (font-lock-mode-hook nil) + ;; And insert them into the FILE buffer. + (file-buffer (let (;; Don't query for master file + (TeX-transient-master t) + ;; Don't choose a special mode (and call its hooks) + (auto-mode-alist nil) + (magic-mode-alist nil) + (enable-local-variables nil) + ;; Don't run any f-f hooks + (find-file-hook nil)) + (find-file-noselect file t))) + ;; But remember original content. + original-content + + ;; We search for the header from the master file, if it is + ;; not present in the region. + (header (if (string-match header-end region) + "" + (save-excursion + (save-restriction + (set-buffer master-buffer) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + ;; NOTE: We use the local value of + ;; TeX-header-end from the master file. + (if (not (re-search-forward TeX-header-end nil t)) + "" + (re-search-forward "[\r\n]" nil t) + (buffer-substring-no-properties + (point-min) (point))))))))) + (header-offset 0) + first-line + ;; We search for the trailer from the master file, if it is + ;; not present in the region. + (trailer-offset 0) + (trailer (if (string-match trailer-start region) + "" + (save-excursion + (save-restriction + (set-buffer master-buffer) + (save-excursion + (save-restriction + (widen) + (goto-char (point-max)) + ;; NOTE: We use the local value of + ;; TeX-trailer-start from the master file. + (if (not (re-search-backward TeX-trailer-start nil t)) + "" + ;;(beginning-of-line 1) + (re-search-backward "[\r\n]" nil t) + (setq trailer-offset (TeX-current-offset)) + (buffer-substring-no-properties + (point) (point-max)))))))))) + ;; file name should be relative to master + (setq original (TeX-quote-filename (file-relative-name + original (TeX-master-directory))) + master-name (TeX-quote-filename master-name)) + + ;; If the first line begins with "%&", put that line separately on + ;; the very first line of the region file so that the first line + ;; parsing will work. + (setq first-line (if (and (> (length header) 1) + (string= (substring header 0 2) "%&")) + ;; This would work even if header has no newline. + (substring header 0 (string-match "\n" header)) + "")) + (unless (string= first-line "") + ;; Remove first-line from header. + (setq header (substring header (length first-line))) + (setq first-line (concat first-line "\n"))) + + (with-current-buffer file-buffer + (setq buffer-read-only t + buffer-undo-list t) + (setq original-content (buffer-string)) + (let ((inhibit-read-only t)) + (erase-buffer) + (setq buffer-file-coding-system + (with-current-buffer master-buffer buffer-file-coding-system)) + (insert first-line + "\\message{ !name(" master-name ")}" + header + TeX-region-extra + "\n\\message{ !name(" original ") !offset(") + (setq header-offset (- offset + (1+ (TeX-current-offset)))) + (insert (int-to-string header-offset) + ") }\n" + region + "\n\\message{ !name(" master-name ") !offset(") + (insert (int-to-string (- trailer-offset + (1+ (TeX-current-offset)))) + ") }\n" + trailer) + (setq TeX-region-orig-buffer orig-buffer) + (setq TeX-region-master-buffer master-buffer) + (run-hooks 'TeX-region-hook) + (if (string-equal (buffer-string) original-content) + (set-buffer-modified-p nil) + (save-buffer 0)))))) + +(defun TeX-region-file (&optional extension nondirectory _ignore) + "Return TeX-region file name with EXTENSION. +If optional second argument NONDIRECTORY is non-nil, do not include +the directory. + +The compatibility argument IGNORE is ignored." + ;; The third argument `_ignore' is kept for symmetry with `TeX-master-file's + ;; third argument `ask'. For example, it's used in `TeX-command-sequence', + ;; where we don't know which function has to be called. Keep this in mind + ;; should you want to use another argument here. + (let ((master-dir (TeX-master-directory))) + (concat (or (TeX--master-output-dir master-dir nondirectory) + (if nondirectory "" master-dir)) + (cond ((eq extension t) + (concat TeX-region "." TeX-default-extension)) + (extension + (concat TeX-region "." extension)) + (t + TeX-region))))) + +(defcustom TeX-region "_region_" + "Base name of temporary file for `TeX-command-region' and `TeX-command-buffer'." + :group 'TeX-command + :type 'string) + +(defvar LaTeX-command-section-level nil + "The section level used for `LaTeX-command-section'. +Will be initialized to `LaTeX-largest-level' buffer-locally.") +(make-variable-buffer-local 'LaTeX-command-section-level) + +(defun LaTeX-command-section-level () + "Return the value of `LaTeX-command-section-level'. +Initialize it to `LaTeX-largest-level' if needed." + (unless LaTeX-command-section-level + (setq LaTeX-command-section-level LaTeX-largest-level)) + LaTeX-command-section-level) + + +(defun LaTeX-command-section-change-level (arg) + "Change `LaTeX-command-section-level' by ARG. +`LaTeX-command-section-level' is the sectioning level used to +determine the current section by `LaTeX-command-section'. +The levels are defined by `LaTeX-section-list'." + (interactive "p") + (let ((old-level (car (rassoc (list (LaTeX-command-section-level)) + LaTeX-section-list)))) + (setq LaTeX-command-section-level (+ LaTeX-command-section-level arg)) + (cond + ((> LaTeX-command-section-level 6) + (setq LaTeX-command-section-level 6) + (message "Cannot shrink LaTeX-command-section-level below subparagraph.")) + ((< LaTeX-command-section-level 0) + (setq LaTeX-command-section-level 0) + (message "Cannot enlarge LaTeX-command-section-level above part.")) + (t (message "Changed level from %s to %s." + old-level (car (rassoc (list LaTeX-command-section-level) + LaTeX-section-list))))))) + +(defun LaTeX-command-section-boundaries () + "Return the boundaries of the current section as (start . end). +The section is determined by `LaTeX-command-section-level'." + (let* ((case-fold-search nil) + (rx (concat "\\\\" (regexp-opt + (mapcar + (lambda (level) + (car (rassoc (list level) LaTeX-section-list))) + (let (r) + (dotimes (i (1+ (LaTeX-command-section-level))) + (push i r)) + r))) + "{"))) + (cons (save-excursion + (re-search-backward rx nil t) + (point)) + (save-excursion + (re-search-forward (concat rx "\\|\\\\end{document}") nil t) + (forward-line 0) + (point))))) + +(defun LaTeX-command-section (&optional override-confirm) + "Run a command on the current section. + +What makes the current section is defined by +`LaTeX-command-section-level' which can be enlarged or shrunken +with `LaTeX-command-section-change-level'. + +Query the user for a command to run on the temporary file +specified by the variable `TeX-region'. The region file will be +recreated from current section. + +If a prefix argument OVERRIDE-CONFIRM is given, confirmation will +depend on it being positive instead of the entry in +`TeX-command-list'." + (interactive "P") + (if (eq major-mode 'latex-mode) + (let* ((bounds (LaTeX-command-section-boundaries)) + (TeX-command-region-begin (car bounds)) + (TeX-command-region-end (cdr bounds))) + (TeX-command-region override-confirm)) + (error "LaTeX-command-section can only be run on LaTeX documents"))) + +(defun TeX-command-run-all-region () + "Compile the current region until an error occurs or it is finished." + (interactive) + (TeX-region-update) + (TeX-command-sequence t t #'TeX-region-file)) + +(defun LaTeX-command-run-all-section () + "Compile the current section until an error occurs or it is finished." + (interactive) + (if (eq major-mode 'latex-mode) + (let* ((bounds (LaTeX-command-section-boundaries)) + (TeX-command-region-begin (car bounds)) + (TeX-command-region-end (cdr bounds))) + (TeX-region-update) + (TeX-command-sequence t t #'TeX-region-file)) + (error "LaTeX-command-run-all-section can only be run on LaTeX documents"))) + +(defun TeX-command-run-all (arg) + "Compile the current document until an error occurs or it is finished. +With a prefix ARG (`\\[universal-argument] \\[TeX-command-run-all]'), +compile the current region instead, that is, call +`TeX-command-run-all-region'. With multiple prefix +arguments (`\\[universal-argument] \\[universal-argument] \\[TeX-command-run-all]'), +compile the current section instead, that is, call +`LaTeX-command-run-all-section'." + (interactive "P") + (cond + ((null arg) (TeX-command-sequence t t)) + ((= 4 (car arg)) (TeX-command-run-all-region)) + (t (LaTeX-command-run-all-section)))) + +;;; Parsing + +;;; - Global Parser Variables + +(defvar TeX-error-point nil + "How far we have parsed until now.") + +(make-variable-buffer-local 'TeX-error-point) + +(defvar TeX-error-file nil + "Stack of files in which errors have occurred.") + +(make-variable-buffer-local 'TeX-error-file) + +(defvar TeX-error-offset nil + "Add this to any line numbers from TeX. Stack like `TeX-error-file'.") + +(make-variable-buffer-local 'TeX-error-offset) + +(defun TeX-parse-reset (&optional reparse) + "Reset all variables used for parsing TeX output. +If optional argument REPARSE is non-nil, reparse the output log." + (setq TeX-error-point (point-min) + TeX-error-offset nil + TeX-error-file nil + TeX-error-list nil + TeX-error-last-visited -1) + (if reparse + (TeX-parse-all-errors))) + +;;; - Parsers Hooks + +;; All this parsers hooks should have the same arguments even though they will +;; be ignored, because `TeX-next-error' can call any of these functions. +(defun TeX-parse-command (_arg _reparse) + "We can't parse anything but TeX." + (error "I cannot parse %s output, sorry" + (if (TeX-active-process) + (process-name (TeX-active-process)) + "this"))) + +(defun TeX-error-list-skip-warning-p (type ignore) + "Decide if a warning of `TeX-error-list' should be skipped. + +TYPE is one of the types listed in `TeX-error-list', IGNORE +is the flag to choose if the warning should be skipped." + ;; The warning should be skipped if it... + (or + ;; ...is a warning and we want to ignore all warnings, or... + (and (null TeX-debug-warnings) + (equal type 'warning)) + ;; ...is a bad-box and we want to ignore all bad-boxes, or... + (and (null TeX-debug-bad-boxes) + (equal type 'bad-box)) + ;; ...is a warning to be ignored. + (and TeX-suppress-ignored-warnings + ignore))) + +(defun TeX-parse-TeX (arg reparse) + "Find the next error produced by running TeX. + +ARG specifies how many error messages to move, when possible; +negative means move back to previous error messages. + +If REPARSE is non-nil, reparse the output log. + +If the file occurs in an included file, the file is loaded (if not +already in an Emacs buffer) and the cursor is placed at the error." + (let ((old-buffer (current-buffer)) + max-index item) + + ;; Switch to the output buffer. + (with-current-buffer (TeX-active-buffer) + (if reparse + (TeX-parse-reset reparse)) + (if TeX-parse-all-errors + (progn + (setq arg (or arg 1) + max-index (length TeX-error-list)) + ;; This loop is needed to skip ignored warnings, when + ;; `TeX-suppress-ignored-warnings' is non-nil and there are ignore + ;; warnings. + (while (null (zerop arg)) + (setq TeX-error-last-visited + ;; Increase or decrese `TeX-error-last-visited' depending on + ;; the sign of `arg'. Note: `signum' is a function from + ;; `cl' library, do not be tempted to use it. + (if (> arg 0) + (1+ TeX-error-last-visited) + (1- TeX-error-last-visited)) + item (nth TeX-error-last-visited TeX-error-list)) + ;; Increase or decrease `arg' only if the warning isn't to be + ;; skipped. + (unless (TeX-error-list-skip-warning-p (nth 0 item) (nth 10 item)) + ;; Note: `signum' is a function from `cl' library, do not be + ;; tempted to use it. + (setq arg (if (> arg 0) + (1- arg) + (1+ arg))))) + (if (< TeX-error-last-visited -1) + (setq TeX-error-last-visited -1)) + (cond ((or (null item) + (< TeX-error-last-visited 0)) + (if (> TeX-error-last-visited max-index) + (setq TeX-error-last-visited max-index)) + (message "No more errors.") + (beep) + (TeX-pop-to-buffer old-buffer)) + (t + (apply #'TeX-find-display-help item)))) + + (goto-char TeX-error-point) + (TeX-parse-error old-buffer))))) + +;;; - Parsing (La)TeX + +(defvar TeX-translate-location-file nil) +(defvar TeX-translate-location-offset nil) +(defvar TeX-translate-location-line nil) +(defvar TeX-translate-location-string nil) +(defvar TeX-translate-location-error nil) +(defvar TeX-translate-location-context nil) + +(defvar TeX-translate-location-hook nil + "List of functions to be called before showing an error or warning. + +You might want to examine and modify the dynamically bound +variables + `TeX-translate-location-file', + `TeX-translate-location-offset', + `TeX-translate-location-line', + `TeX-translate-location-string', + `TeX-translate-location-error', and + `TeX-translate-location-context' +from this hook.") + +;; `ignore' flag should be the always the last one in the list of information +;; for each error/warning, because it can be set within `TeX-warning' by a +;; custom function taking as argument all information present in +;; `TeX-error-list' but `ignore', see `TeX-ignore-warnings'. +(defvar TeX-error-list nil + "List of warnings and errors. + +Each element of the list is a list of information for a specific +error or warning. This is the structure of each element: + * 0: type (error, warning, bad-box) + * 1: file + * 2: line + * 3: message of the error or warning + * 4: offset + * 5: context, to be displayed in the help window + * 6: string to search in the buffer, in order to find location + of the error or warning + * 7: for warnings referring to multiple lines (for exapmle, bad boxes), + the last line mentioned in the warning message + * 8: t if it is a bad-box, nil otherwise + * 9: value of `TeX-error-point' + * 10: whether the warning should be ignored + +This variable is intended to be set only in output buffer so it +will be shared among all files of the same document.") +(make-variable-buffer-local 'TeX-error-list) + +(defun TeX-parse-all-errors () + "Parse TeX output buffer to collect all warnings and errors." + ;; Reset error list. + (setq TeX-error-list nil) + (save-excursion + (goto-char (point-min)) + (while (TeX-parse-error nil t))) + ;; Reset last visited error. + (setq TeX-error-last-visited -1)) + +(defun TeX-parse-error (old &optional store) + "Goto next error. Pop to OLD buffer if no more errors are found. + +If the optional argument STORE is non-nil, the function will +store the found warning or error in `TeX-error-list' instead of +displaying the issue. + +Return non-nil if an error or warning is found." + (let ((regexp + (concat + ;; TeX error + "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|" + ;; New file + "(\n?\\([^\n()]+\\)\\|" + ;; End of file. + "\\()\\)\\|" + ;; Hook to change line numbers + " !\\(?:offset(\\([---0-9]+\\))\\|" + ;; Hook to change file name + "name(\\([^)]+\\))\\)\\|" + ;; Start of LaTeX bad box + "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\) " + ;; Horizontal bad box + "\\(?:\\\\hbox.* at lines? [0-9]+\\(?:--[0-9]+\\)?$\\|" + ;; Vertical bad box. See also `TeX-warning'. + "\\\\vbox ([ a-z0-9]+) has occurred while \\\\output is active \\[[^]]+\\]\\)\\)\\|" + ;; LaTeX warning + "^\\(" LaTeX-warnings-regexp ".*\\)")) + (error-found nil)) + (while + (cond + ((null + (re-search-forward regexp nil t)) + ;; No more errors. + (unless store + (message "No more errors.") + (beep) + (TeX-pop-to-buffer old)) + nil) + ;; TeX error + ((match-beginning 1) + (when (match-beginning 2) + (unless TeX-error-file + (push nil TeX-error-file) + (push nil TeX-error-offset)) + (unless (car TeX-error-offset) + (rplaca TeX-error-file (TeX-match-buffer 2)))) + (setq error-found t) + (if (looking-at "Preview ") + t + (TeX-error store) + nil)) + ;; LaTeX bad box + ((match-beginning 7) + ;; In `TeX-error-list' we collect all warnings, also if they're going + ;; to be actually skipped. + (if (or store TeX-debug-bad-boxes) + (progn + (setq error-found t) + (TeX-warning (TeX-match-buffer 7) (match-beginning 7) t store) + nil) + (re-search-forward "\r?\n\ +\\(?:.\\{79\\}\r?\n\ +\\)*.*\r?$") + t)) + ;; LaTeX warning + ((match-beginning 8) + ;; In `TeX-error-list' we collect all warnings, also if they're going + ;; to be actually skipped. + (if (or store TeX-debug-warnings) + (progn + (setq error-found t) + (TeX-warning (TeX-match-buffer 8) (match-beginning 8) nil store) + nil) + t)) + + ;; New file -- Push on stack + ((match-beginning 3) + (let ((file (TeX-match-buffer 3)) + (end (match-end 3))) + ;; Strip quotation marks and remove newlines if necessary + (when (or (eq (string-to-char file) ?\") + (string-match "[ \t\n]" file)) + (setq file (mapconcat #'identity (split-string file "[\"\n]+") ""))) + ;; Polish `file' string + (setq file + (let ((string file)) + (setq string + (if (string-match "\\`[ \t\n\r]+" string) + (replace-match "" t t string) + string)) + ;; Sometimes `file' is something like + ;; "./path/to/file.tex [9] [10 <./path/to/file>] " + ;; where "[9]" and "[10 <./path/to/file>]" are pages of the + ;; output file, with path to an included file. Remove these + ;; numbers together with whitespaces at the end of the + ;; string. + (if (string-match "\\( *\\(\\[[^]]+\\]\\)? *\\)*\\'" string) + (replace-match "" t t string) + string))) + (push file TeX-error-file) + (push nil TeX-error-offset) + (goto-char end)) + t) + + ;; End of file -- Pop from stack + ((match-beginning 4) + (when (> (length TeX-error-file) 0) + (pop TeX-error-file) + (pop TeX-error-offset)) + (goto-char (match-end 4)) + t) + + ;; Hook to change line numbers + ((match-beginning 5) + (setq TeX-error-offset + (list (string-to-number (TeX-match-buffer 5)))) + t) + + ;; Hook to change file name + ((match-beginning 6) + (setq TeX-error-file + (list (TeX-match-buffer 6))) + t))) + error-found)) + +(defun TeX-find-display-help (type file line error offset context string + line-end _bad-box error-point _ignore) + "Find the error and display the help. + +For a description of arguments, see `TeX-error-list'. IGNORE +value is not used here." + ;; Go back to TeX-buffer + (let ((runbuf (TeX-active-buffer)) + (master (with-current-buffer TeX-command-buffer + (expand-file-name (TeX-master-file)))) + (command-buffer TeX-command-buffer) + (TeX-translate-location-file file) + (TeX-translate-location-line line) + (TeX-translate-location-error error) + (TeX-translate-location-offset offset) + (TeX-translate-location-context context) + (TeX-translate-location-string string) + error-file-buffer start) + + (run-hooks 'TeX-translate-location-hook) + + (if TeX-translate-location-file + (progn + (setq error-file-buffer + (find-file + (expand-file-name TeX-translate-location-file + (file-name-directory master)))) + ;; Use the major mode of `TeX-command-buffer' when visiting + ;; the error point. + (if (eq major-mode (default-value 'major-mode)) + (funcall (buffer-local-value 'major-mode command-buffer))) + ;; Set the value of `TeX-command-buffer' in the next file + ;; with an error to be displayed to the value it has in the + ;; current buffer. + (setq-local TeX-command-buffer command-buffer) + + ;; Find the location of the error or warning. + (when TeX-translate-location-line + (goto-char (point-min)) + (forward-line (+ TeX-translate-location-offset + TeX-translate-location-line -1)) + (cond + ;; Error. + ((equal type 'error) + (if (not (string= TeX-translate-location-string " ")) + (search-forward TeX-translate-location-string nil t))) + ;; Warning or bad box. + (t + (beginning-of-line 0) + (setq start (point)) + (goto-char (point-min)) + (forward-line (+ TeX-translate-location-offset + line-end -1)) + (end-of-line) + (when TeX-translate-location-string + (search-backward TeX-translate-location-string start t) + (search-forward TeX-translate-location-string nil t)))))) + ;; When the file cannot be determined stay here but issue a + ;; warning. + (message "Could not determine file for %s" + (if (eq type 'error) "error" "warning")) + (beep)) + + ;; Display the help. + (cond ((eq TeX-display-help 'expert) + (TeX-pop-to-buffer runbuf nil t) + (goto-char error-point) + (if error-file-buffer + (TeX-pop-to-buffer error-file-buffer nil t))) + (TeX-display-help + (TeX-help-error + TeX-translate-location-error + (if (equal type 'warning) + (concat "\n" TeX-translate-location-context) + TeX-translate-location-context) + runbuf type)) + (t + (message "! %s" TeX-translate-location-error))))) + +(defun TeX-error (&optional store) + "Display an error. + +If optional argument STORE is non-nil, store the error +information in `TeX-error-list' instead of displaying the error." + + (let* ( ;; We need the error message to show the user. + (error (progn + (re-search-forward "\\(.*\\)") + (TeX-match-buffer 1))) + + ;; And the context for the help window. + (context-start (point)) + context-available + + ;; And the line number to position the cursor. + (line (cond + ;; regular style + ((re-search-forward "l\\.\\([0-9]+\\)" nil t) + (setq context-available t) + (string-to-number (TeX-match-buffer 1))) + ;; file:line:error style + ((save-excursion + (re-search-backward ":\\([0-9]+\\): " + (line-beginning-position) t)) + (string-to-number (TeX-match-buffer 1))) + ;; nothing found + (t 1))) + + ;; And a string of the context to search for. + (string (progn + (beginning-of-line) + (re-search-forward " \\(\\([^ \t]*$\\)\\|\\($\\)\\)") + (TeX-match-buffer 1))) + + ;; And we have now found to the end of the context. + (context (if context-available + (buffer-substring context-start (progn (forward-line 1) + (end-of-line) + (point))) + ;; There is no real context available, so we + ;; simply show the line with the error message. + (buffer-substring (1- (line-beginning-position)) + context-start))) + ;; We may use these in another buffer. + (offset (or (car TeX-error-offset) 0)) + (file (car TeX-error-file)) + info-list) + + ;; Remember where we was. + (setq TeX-error-point (point) + info-list (list 'error file line error offset context string nil nil + TeX-error-point nil)) + (if store + ;; Store the error information. + (add-to-list 'TeX-error-list info-list t) + ;; Find the error point and display the help. + (apply #'TeX-find-display-help info-list)))) + +(defun TeX-warning (warning warning-start bad-box &optional store) + "Display a warning for WARNING. + +WARNING-START is the position where WARNING starts. If BAD-BOX +is non-nil, the warning refers to a bad-box, otherwise it is a +generic warning. + +If optional argument STORE is non-nil, store the warning +information in `TeX-error-list' instead of displaying the +warning." + + (let* ( ;; line-string: match 1 is beginning line, match 2 is end line + (line-string (if bad-box + "at lines? \\([0-9]*\\)\\(?:--\\([0-9]*\\)\\)?" + ;; Traditional messages say "on input line X", + ;; the LaTeX3 \msg_line_context:. just reads + ;; "on line X". + "on \\(?:input \\)?line \\([0-9]*\\)\\.")) + ;; word-string: match 1 is the word + (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$" + ;; Match "ref" in both "Reference `ref' on page NN + ;; undefined" and "Citation 'ref' on page NN undefined". + "\\(?:`\\|'\\)\\([-a-zA-Z0-9:]+\\)'")) + + ;; Get error-line (warning). Don't search before `warning-start' to + ;; avoid catching completely unrelated line numbers. + (line (when (save-excursion (re-search-backward line-string + warning-start t)) + (string-to-number (TeX-match-buffer 1)))) + ;; If this is a bad box and the warning ends with "...at lines MM--NN" + ;; we can use "NN" as `line-end', in any other case (including bad + ;; boxes ending with "...at line NN") just use `line'. + (line-end (if (and bad-box (match-beginning 2)) + (string-to-number (TeX-match-buffer 2)) + line)) + + ;; Find the context + (context-start (progn (cond + ((and bad-box (string-match "\\\\hbox" warning)) + ;; Horizontal bad box + (end-of-line)) + (bad-box + ;; Vertical bad box (by exclusion), don't move + ;; point. In the output buffer, unlike in the + ;; actual *.log file, these warnings do not end + ;; with "...is active []", but in the same line + ;; there may be something else, including a new + ;; file opened. Thus, point shouldn't move + ;; from the end of the actual bad box warning. + ;; This is why the corresponding regexp in + ;; `TeX-parse-error' doesn't match everything + ;; until the end of the line. + nil) + (t + ;; Generic warning. + (beginning-of-line))) + (point))) + + (context (cond ((string-match LaTeX-warnings-regexp warning) + ;; The warnings matching `LaTeX-warnings-regexp' are + ;; emitted by \GenericWarning macro, or macros based on + ;; it (\ClassWarning, \PackageWarning, etc). After + ;; such warnings there is an empty line, just look for + ;; it to find the end. + (beginning-of-line) + (while (null (eolp)) + (forward-line 1)) + (buffer-substring context-start (progn (end-of-line) + (point)))) + + ((and bad-box (string-match "\\\\vbox" warning)) + ;; Vertical bad boxes don't provide any additional + ;; information. In this case, reuse the `warning' as + ;; `context' and don't move point, so that we avoid + ;; eating the next line that may contain another + ;; warning. See also comment for `context-start'. + (concat "\n" warning)) + + (t + ;; Horizontal bad boxes. + (forward-line 1) + (end-of-line) + (while (equal (current-column) 79) + (forward-line 1) + (end-of-line)) + (buffer-substring context-start (point))))) + + ;; This is where we want to be. + (error-point (point)) + + ;; Now find the error word. + (string (when (save-excursion + (re-search-backward word-string context-start t)) + (TeX-match-buffer 1))) + + ;; We might use these in another file. + (offset (or (car TeX-error-offset) 0)) + (file (car TeX-error-file)) + info-list ignore) + + ;; Second chance to get line number right. If `line' is nil, check whether + ;; the reference to the line number is in `context'. For example, this is + ;; the case for warnings emitted with \ClassWarning and \PackageWarning. + ;; XXX: maybe it suffices to evaluate `line' after `context' above, but I + ;; don't know if there are cases in which it's important to get `line' + ;; before `context'. + (and (null line) + (string-match line-string context) + (setq line-end + (setq line (and (match-beginning 1) + (string-to-number (match-string 1 context)))))) + + ;; This is where we start next time. + (goto-char error-point) + (setq TeX-error-point (point)) + + ;; Explanation of what follows: we add the warning to `TeX-error-list' even + ;; if it has to be ignored, with a flag specifying whether it is ignored. + ;; We do so in order to be able to change between "ignore" and "dont-ignore" + ;; behavior by just looking to the flag, without the need to reparse the + ;; output log. + + ;; Store the list of information about the warning. + (setq info-list (list (if bad-box 'bad-box 'warning) file line warning + offset context string line-end bad-box + TeX-error-point) + ;; Decide whether it should be ignored. + ignore (and TeX-ignore-warnings + (cond + ((stringp TeX-ignore-warnings) + (string-match TeX-ignore-warnings warning)) + ((fboundp TeX-ignore-warnings) + (apply TeX-ignore-warnings info-list)))) + ;; Update `info-list'. + info-list (append info-list (list ignore))) + + (if store + ;; Store the warning information. + (add-to-list 'TeX-error-list info-list t) + ;; Find the warning point and display the help. + (apply #'TeX-find-display-help info-list)))) + +;;; Error Messages + +(defcustom TeX-error-description-list nil + "User defined help messages for errors in TeX run. +See `TeX-error-description-list-local' for its format. All +entries have higher priority than those in +`TeX-error-description-list-local'. +It must not have a fallback entry that matches any error." + :group 'TeX-output + :type '(repeat (cons :tag "Entry" + (regexp :tag "Match") + (string :format "Description:\n%v")))) + +(defvar TeX-error-description-list-local + '((".*" . "No help available")) + "Buffer local help messages for errors in TeX run. +A list of the form (ERR-REGEXP . CONTEXT) used by function +`TeX-help-error' to display help-text on an error message or warning. +ERR-REGEXP should be a regular expression matching the error message +given from TeX/LaTeX, and CONTEXT should be some lines describing that +error. +Major modes of AUCTeX can set its own catalogue as buffer local +value of this variable, as LaTeX mode does. +Style files of AUCTeX can also add their own entries to buffer local +value of this variable to provide their own help messages. +It must end with a fallback entry that matches any error, for example +\(\".*\" . \"No help available\")") + +;;; - Help + +(defgroup TeX-error-description-faces nil + "Faces used in error descriptions." + :prefix "TeX-error-description-" + :group 'TeX-output) + +(defface TeX-error-description-error + ;; This is the same as `error' face in latest GNU Emacs versions. + '((((class color) (min-colors 88) (background light)) + :foreground "Red1" :weight bold) + (((class color) (min-colors 88) (background dark)) + :foreground "Pink" :weight bold) + (((class color) (min-colors 16) (background light)) + :foreground "Red1" :weight bold) + (((class color) (min-colors 16) (background dark)) + :foreground "Pink" :weight bold) + (((class color) (min-colors 8)) + :foreground "red" :weight bold) + (t (:inverse-video t :weight bold))) + "Face for \"Error\" string in error descriptions.") + +(defface TeX-error-description-warning + ;; This is the same as `warning' face in latest GNU Emacs versions. + '((((class color) (min-colors 16)) :foreground "DarkOrange" :weight bold) + (((class color)) :foreground "yellow" :weight bold)) + "Face for \"Warning\" string in error descriptions.") + +(defface TeX-error-description-tex-said + ;; This is the same as `font-lock-function-name-face' face in latest GNU + ;; Emacs versions. + '((((class color) (min-colors 88) (background light)) + :foreground "Blue1") + (((class color) (min-colors 88) (background dark)) + :foreground "LightSkyBlue") + (((class color) (min-colors 16) (background light)) + :foreground "Blue") + (((class color) (min-colors 16) (background dark)) + :foreground "LightSkyBlue") + (((class color) (min-colors 8)) + :foreground "blue" :weight bold) + (t (:inverse-video t :weight bold))) + "Face for \"TeX said\" string in error descriptions.") + +(defface TeX-error-description-help + '((t (:inherit TeX-error-description-tex-said))) + "Face for \"Help\" string in error descriptions.") + +(defun TeX-help-error (error output runbuffer type) + "Print ERROR in context OUTPUT from RUNBUFFER in another window. +TYPE is a symbol specifing if ERROR is a real error, a warning or +a bad box." + + (let ((old-buffer (current-buffer)) + (log-file (with-current-buffer runbuffer + (with-current-buffer TeX-command-buffer + (expand-file-name (TeX-active-master "log"))))) + (error-description-list + (append TeX-error-description-list + (buffer-local-value 'TeX-error-description-list-local + (buffer-local-value + 'TeX-command-buffer + runbuffer)))) + (TeX-error-pointer 0)) + + ;; Find help text entry. + (while (not (string-match (car (nth TeX-error-pointer + error-description-list)) + error)) + (setq TeX-error-pointer (+ TeX-error-pointer 1))) + + (TeX-pop-to-buffer (get-buffer-create "*TeX Help*") nil t) + (let ((inhibit-read-only t)) + (erase-buffer) + (insert + (cond + ((equal type 'error) + (propertize "ERROR" 'font-lock-face 'TeX-error-description-error)) + ((equal type 'warning) + (propertize "WARNING" 'font-lock-face 'TeX-error-description-warning)) + ((equal type 'bad-box) + (propertize "BAD BOX" 'font-lock-face 'TeX-error-description-warning))) + ": " error + (propertize "\n\n--- TeX said ---" 'font-lock-face + 'TeX-error-description-tex-said) + output + (propertize "\n--- HELP ---\n" 'font-lock-face + 'TeX-error-description-help) + (let ((help (cdr (nth TeX-error-pointer + error-description-list)))) + (save-excursion + (if (and (= (1+ TeX-error-pointer) + (length error-description-list)) + (let* ((log-buffer (find-buffer-visiting log-file))) + (if log-buffer + (progn + (set-buffer log-buffer) + (revert-buffer t t)) + (setq log-buffer + (find-file-noselect log-file)) + (set-buffer log-buffer)) + (auto-save-mode nil) + (setq buffer-read-only t) + (goto-char (point-min)) + (search-forward error nil t 1)) + (re-search-forward "^l\\." nil t) + (re-search-forward "^ [^\n]+$" nil t)) + (let ((start (1+ (point)))) + (forward-char 1) + (re-search-forward "^$") + (concat "From the .log file...\n\n" + (buffer-substring start (point)))) + help))))) + (goto-char (point-min)) + (TeX-special-mode) + (TeX-pop-to-buffer old-buffer nil t))) + +;;; Error Overview + +(defvar TeX-error-overview-active-buffer nil + "The active buffer for the current error overview.") + +(defvar TeX-error-overview-orig-frame nil + "Frame from which the error overview has been launched.") + +(defvar TeX-error-overview-orig-window nil + "Window from which the error overview has been launched.") + +(defcustom TeX-error-overview-setup nil + "The frame setup of the error overview. + +The possible value is: `separate-frame' (error oveview in a +separate frame); with a nil value the current frame is used. + +If the display does not support multi frame, the current frame +will be used regardless of the value of this variable." + :group 'TeX-output + :type '(choice + (const :tag "Error overview in separate frame" separate-frame) + (const :tag "Use current frame" nil))) + +(defun TeX-error-overview-setup () + "Return the frame setup of the error overview for the current display." + (and (display-multi-frame-p) TeX-error-overview-setup)) + +(defun TeX-error-overview-goto-source (&optional button) + "Go to the error point in the source. +If optional argument BUTTON is non-nil, go to source associated +to the selected error." + (interactive) + (let ((index (if button (button-get button 'id) (tabulated-list-get-id))) + item window) + (if index + (progn + ;; Select the source frame/window, if still live. + (if (TeX-error-overview-setup) + (if (frame-live-p TeX-error-overview-orig-frame) + (select-frame TeX-error-overview-orig-frame) + (error "You have deleted a vital frame---\ +please restart TeX error overview")) + (if (window-live-p TeX-error-overview-orig-window) + (select-window TeX-error-overview-orig-window) + (error "You have deleted a vital window---\ +please restart TeX error overview"))) + ;; Get the error details. + (with-current-buffer TeX-error-overview-active-buffer + (setq item (nth index TeX-error-list) + TeX-error-last-visited index)) + ;; Find the error and display the help. + (with-current-buffer TeX-command-buffer + ;; Find the error and display the help. + (apply #'TeX-find-display-help item)) + ;; Return to the error overview. + (if (TeX-error-overview-setup) + (select-frame TeX-error-overview-frame) + (if (setq window + (get-buffer-window TeX-error-overview-buffer-name)) + ;; If error overview window is visible just select it. + (select-window window) + ;; Otherwise, split the help window and display the error overview + ;; near to it. This should be the only reason for the error + ;; overview window not being still visible after the beginning of + ;; the function. + (select-window + (get-buffer-window (cond + ((eq TeX-display-help 'expert) + TeX-error-overview-active-buffer) + (TeX-display-help "*TeX Help*")))) + (if (window-splittable-p (selected-window) t) + (split-window-horizontally) + (split-window-vertically)) + (switch-to-buffer TeX-error-overview-buffer-name)))) + (message "No more errors.") + (beep)))) + +(defun TeX-error-overview-make-entries (&optional master-dir active-buffer) + "Generate the list of errors to be printed using `tabulated-list-entries'. +Write file names relative to MASTER-DIR when they are not absolute. + +ACTIVE-BUFFER is used as buffer from which to extract the list of +errors. If nil, defaults to `TeX-error-overview-active-buffer'." + (with-current-buffer (or active-buffer TeX-error-overview-active-buffer) + (let ((id 0) + type file line msg entries) + (mapc + (lambda (entry) + (setq type (nth 0 entry) + file (nth 1 entry) + line (nth 2 entry) + msg (nth 3 entry)) + ;; Add the entry only if it isn't to be skipped. + (unless (TeX-error-list-skip-warning-p type (nth 10 entry)) + (push + (list + ;; ID. + id + (vector + ;; File. + (if (stringp file) + (if (file-name-absolute-p file) + file + (file-relative-name file master-dir)) + "") + ;; Line. + (if (numberp line) + (number-to-string line) + "") + ;; Type. + (cond + ((equal type 'error) + (propertize "Error" 'font-lock-face 'TeX-error-description-error)) + ((equal type 'warning) + (propertize "Warning" 'font-lock-face + 'TeX-error-description-warning)) + ((equal type 'bad-box) + (propertize "Bad box" 'font-lock-face + 'TeX-error-description-warning)) + (t + "")) + ;; Message. + (list (if (stringp msg) + ;; Sometimes, the message can be longer than one line, + ;; but print here only the first one. + (progn + (string-match "^.*" msg) + (match-string 0 msg)) + "") + 'face 'link + 'follow-link t + 'id id + 'action #'TeX-error-overview-goto-source))) + entries)) + ;; Increase the `id' counter in any case. + (setq id (1+ id))) + TeX-error-list) + (reverse entries)))) + +(defun TeX-error-overview-next-error (&optional arg) + "Move to the next line and find the associated error. + +A prefix ARG specifies how many error messages to move; negative +means move back to previous error messages." + (interactive "p") + (if (= (forward-line arg) 0) + (TeX-error-overview-goto-source) + ;; If there are lines left to move we are at the beginning or at the end of + ;; the buffer and there are no more errors. + (message "No more errors.") + (beep))) + +(defun TeX-error-overview-previous-error (&optional arg) + "Move to the previous line and find the associated error. + +Prefix ARG says how many error messages to move backward (or +forward, if negative)." + (interactive "p") + (TeX-error-overview-next-error (- arg))) + +(defun TeX-error-overview-jump-to-source () + "Display the help and move point to the error source." + (interactive) + (TeX-error-overview-goto-source) + (pop-to-buffer + (save-window-excursion + (select-window TeX-error-overview-orig-window) + (current-buffer)))) + +(defun TeX-error-overview-goto-log () + "Display the current error in log buffer." + (interactive) + (let ((TeX-display-help 'expert)) + (TeX-error-overview-goto-source))) + +(defun TeX-error-overview-toggle-debug-bad-boxes () + "Run `TeX-toggle-debug-bad-boxes' and update entries list." + (interactive) + (TeX-toggle-debug-bad-boxes) + (setq tabulated-list-entries + (TeX-error-overview-make-entries + (with-current-buffer TeX-command-buffer (TeX-master-directory)))) + (tabulated-list-init-header) + (tabulated-list-print)) + +(defun TeX-error-overview-toggle-debug-warnings () + "Run `TeX-toggle-debug-warnings' and update entries list." + (interactive) + (TeX-toggle-debug-warnings) + (setq tabulated-list-entries + (TeX-error-overview-make-entries + (with-current-buffer TeX-command-buffer (TeX-master-directory)))) + (tabulated-list-init-header) + (tabulated-list-print)) + +(defun TeX-error-overview-toggle-suppress-ignored-warnings () + "Toggle visibility of ignored warnings and update entries list." + (interactive) + (TeX-toggle-suppress-ignored-warnings) + (setq tabulated-list-entries + (TeX-error-overview-make-entries + (with-current-buffer TeX-command-buffer (TeX-master-directory)))) + (tabulated-list-init-header) + (tabulated-list-print)) + +(defun TeX-error-overview-quit () + "Delete the window or the frame of the error overview." + (interactive) + (if (TeX-error-overview-setup) + (delete-frame TeX-error-overview-frame) + (delete-window)) + (setq TeX-error-overview-orig-frame nil)) + +(defvar TeX-error-overview-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "b" #'TeX-error-overview-toggle-debug-bad-boxes) + (define-key map "j" #'TeX-error-overview-jump-to-source) + (define-key map "l" #'TeX-error-overview-goto-log) + (define-key map "n" #'TeX-error-overview-next-error) + (define-key map "p" #'TeX-error-overview-previous-error) + (define-key map "q" #'TeX-error-overview-quit) + (define-key map "w" #'TeX-error-overview-toggle-debug-warnings) + (define-key map "x" #'TeX-error-overview-toggle-suppress-ignored-warnings) + (define-key map "\C-m" #'TeX-error-overview-goto-source) + map) + "Local keymap for `TeX-error-overview-mode' buffers.") + +(easy-menu-define TeX-error-overview-menu + TeX-error-overview-mode-map + "Menu used in TeX error overview mode." + '("TeX errors" + ["Next error" TeX-error-overview-next-error + :help "Jump to the next error"] + ["Previous error" TeX-error-overview-previous-error + :help "Jump to the previous error"] + ["Go to source" TeX-error-overview-goto-source + :help "Show the error in the source"] + ["Jump to source" TeX-error-overview-jump-to-source + :help "Move point to the error in the source"] + ["Go to log" TeX-error-overview-goto-log + :help "Show the error in the log buffer"] + "-" + ["Debug Bad Boxes" TeX-error-overview-toggle-debug-bad-boxes + :style toggle :selected TeX-debug-bad-boxes + :help "Show overfull and underfull boxes"] + ["Debug Warnings" TeX-error-overview-toggle-debug-warnings + :style toggle :selected TeX-debug-warnings + :help "Show warnings"] + ["Ignore Unimportant Warnings" + TeX-error-overview-toggle-suppress-ignored-warnings + :style toggle :selected TeX-suppress-ignored-warnings + :help "Hide specified warnings"] + "-" + ["Quit" TeX-error-overview-quit + :help "Quit"])) + +(defvar TeX-error-overview-list-entries nil + "List of errors to be used in the error overview.") + +(define-derived-mode TeX-error-overview-mode tabulated-list-mode + "TeX errors" + "Major mode for listing TeX errors." + (setq tabulated-list-format [("File" 25 nil) + ("Line" 4 nil :right-align t) + ("Type" 7 nil) + ("Message" 0 nil)] + tabulated-list-padding 1 + tabulated-list-entries TeX-error-overview-list-entries) + (tabulated-list-init-header) + (tabulated-list-print)) + +(defcustom TeX-error-overview-frame-parameters + '((name . "TeX errors") + (title . "TeX errors") + (height . 10) + (width . 80) + (top . (- 0)) + (left . (- 0)) + (unsplittable . t) + (minibuffer . nil) + (vertical-scroll-bars . t) + (tool-bar-lines . 0)) + "Parameters of the error overview frame." + :group 'TeX-output + :type 'alist + :options '((name string) (title string) (height integer) (width integer) + (top integer) (left integer) (unsplittable boolean) + (minibuffer boolean) (vertical-scroll-bars boolean) + (tool-bar-lines integer))) + +(defcustom TeX-error-overview-open-after-TeX-run nil + "Whether to open automatically the error overview after running TeX." + :group 'TeX-output + :type 'boolean) + +(defun TeX-error-overview () + "Show an overview of the errors occurred in the last TeX run." + (interactive) + ;; Check requirements before start. + (if (setq TeX-error-overview-active-buffer (TeX-active-buffer)) + ;; `TeX-error-overview-list-entries' is going to be used only as value + ;; of `tabulated-list-entries' in `TeX-error-overview-mode'. In + ;; principle, we don't need `TeX-error-overview-list-entries', but + ;; `tabulated-list-entries' is buffer-local and we need the list of + ;; entries before creating the error overview buffer in order to + ;; decide whether we need to show anything. + (if (setq TeX-error-overview-list-entries + (TeX-error-overview-make-entries + (TeX-master-directory))) + (progn + (setq TeX-error-overview-orig-window (selected-window) + TeX-error-overview-orig-frame + (window-frame TeX-error-overview-orig-window)) + ;; Create the error overview buffer. This is + ;; automatically killed before running TeX commands, so if + ;; exists it is up-to-date and doesn't need to be + ;; re-created. + (unless (get-buffer TeX-error-overview-buffer-name) + (with-current-buffer + (get-buffer-create TeX-error-overview-buffer-name) + (TeX-error-overview-mode))) + ;; Move point to the line associated to the last visited + ;; error. + (with-current-buffer TeX-error-overview-buffer-name + (goto-char (point-min)) + (forward-line (with-current-buffer + TeX-error-overview-active-buffer + TeX-error-last-visited)) + ;; Create a new frame for the error overview or display the + ;; buffer in the same frame, depending on the setup. + (if (TeX-error-overview-setup) + (if (frame-live-p TeX-error-overview-frame) + ;; Do not create a duplicate frame if there is + ;; already one, just select it. + (select-frame-set-input-focus + TeX-error-overview-frame) + ;; Create a new frame and store its name. + (select-frame + (setq TeX-error-overview-frame + (make-frame + TeX-error-overview-frame-parameters))) + (set-window-buffer (selected-window) + TeX-error-overview-buffer-name) + (set-window-dedicated-p (selected-window) t)) + (TeX-pop-to-buffer TeX-error-overview-buffer-name)))) + (error (concat "No error or warning to show" + ;; Suggest to display warnings and bad boxes with the + ;; appropriate key-bindings if there are such + ;; messages in the output buffer. Rationale of the + ;; test: `TeX-error-overview-list-entries' is nil, + ;; but if `TeX-error-list' is not nil it means that + ;; there are hidden warnings/bad boxes. + (when (TeX-process-get-variable (TeX-active-master) + 'TeX-error-list) + (format ". Type `%s' and `%s' to display \ +warnings and bad boxes" + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]") + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]")))))) + (error "No process for this document"))) + +;;; Output mode + +(define-derived-mode TeX-special-mode special-mode "TeX") + +(defvar TeX-output-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map TeX-special-mode-map) + (define-key map "n" #'TeX-next-error) + (define-key map "p" #'TeX-previous-error) + (define-key map "b" #'TeX-toggle-debug-bad-boxes) + (define-key map "w" #'TeX-toggle-debug-warnings) + (define-key map "i" (lambda () + (interactive) + (with-current-buffer TeX-command-buffer + (TeX-interactive-mode (if TeX-interactive-mode -1 1))))) + (define-key map "s" (lambda () + (interactive) + (with-current-buffer TeX-command-buffer + (TeX-source-correlate-mode (if TeX-source-correlate-mode -1 1))))) + map) + "Keymap for `TeX-output-mode'.") + +(define-derived-mode TeX-output-mode TeX-special-mode "TeX Output" + "Major mode for viewing TeX output. +\\{TeX-output-mode-map} " + :syntax-table nil + (set (make-local-variable 'revert-buffer-function) + #'TeX-output-revert-buffer) + ;; special-mode makes it read-only which prevents input from TeX. + (setq buffer-read-only nil)) + +(defun TeX-output-revert-buffer (_ignore-auto _noconfirm) + "Rerun the TeX command which of which this buffer was the output." + (goto-char (point-min)) + (if (looking-at "Running `\\(.*\\)' on `\\(.*\\)' with ``\\(.*\\)''$") + (let ((name (match-string 1)) + (file (match-string 2))) + (with-current-buffer TeX-command-buffer + (TeX-command name (if (string-match TeX-region file) + #'TeX-region-file + #'TeX-master-file)))) + (error "Unable to find what command to run"))) + +(provide 'tex) + +;; Local Variables: +;; coding: utf-8 +;; End: + +;;; tex.el ends here diff --git a/elpa/auctex-13.1.3/tex.elc b/elpa/auctex-13.1.3/tex.elc Binary files differnew file mode 100644 index 0000000..d6e540b --- /dev/null +++ b/elpa/auctex-13.1.3/tex.elc diff --git a/elpa/auctex-13.1.3/texmathp.el b/elpa/auctex-13.1.3/texmathp.el new file mode 100644 index 0000000..f02824c --- /dev/null +++ b/elpa/auctex-13.1.3/texmathp.el @@ -0,0 +1,438 @@ +;;; texmathp.el -- Code to check if point is inside LaTeX math environment -*- lexical-binding: t; -*- + +;; Copyright (C) 1998-2021 Free Software Foundation, Inc. + +;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl> +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: +;; +;; This code provides a function to determine if point in a buffer is +;; inside a (La)TeX math environment. This is not trivial since many +;; different ways are used to switch between the two. Examples: +;; +;; \begin{equation} ... \end{equation} +;; $ ... $ +;; $$ ... $$ +;; \[ ... \] +;; \ensuremath{...} +;; \mbox{...} +;; +;; To install, put this file on your load-path and compile it. +;; +;; To use this in a Lisp program, do +;; +;; (require 'texmathp) +;; +;; You can then write code like this: +;; +;; (if (texmathp) ...) +;; +;; The call to `texmathp' leaves some extra information in the +;; variable `texmathp-why'. It's value is a cons cell (MATCH . POSITION), +;; specifying which command at what position is responsible for math +;; mode being on or off. +;; +;; To configure which macros and environments influence LaTeX math +;; mode, customize the variable `texmathp-tex-commands'. By default +;; it recognizes the plain TeX and LaTeX core as well as AMS-LaTeX +;; and packages mathtools, empheq and breqn (see the variable +;; `texmathp-tex-commands-default', also as an example). +;; +;; To try out the code interactively, use `M-x texmathp RET'. +;; +;; Of course, in order to work this function has to assume that the +;; LaTeX above point is syntactically correct. In particular: +;; +;; o The different math delimiters are paired correctly. Thus if +;; you do things like "\begin{equation} $" or "\[ ... \)" +;; the result of (texmathp) is undefined. It is in fact possible +;; in LaTeX to pair \[ with $$ and \( with $, but this will confuse +;; texmathp (and human readers as well). +;; +;; o However, texmathp will correctly work with nested delimiters. +;; Something like the following will be parsed correctly at any point: +;; +;; \begin{equation} +;; x = y \mbox{abc \ensuremath{\alpha} cba $2^3$} +;; \end{equation} +;; +;; o texmathp is somewhat forgiving if you have an empty line inside +;; the current math environment, which is not legal in TeX but may +;; easily happen during editing. Depending upon the variable +;; `texmathp-search-n-paragraphs' several paragraphs are checked +;; backwards, by default 2. Paragraph here means something limited +;; by an empty line. +;;-------------------------------------------------------------------------- +;; +;; BUGS: +;; +;; If any of the the special macros like \mbox or \ensuremath has optional +;; arguments, math mode inside these optional arguments is *not* influenced +;; by the macro. +;; +;; Nested \(\) and \[\] can confuse texmathp. It returns nil at AAA +;; in the following examples: +;; \[ x=y \mbox{abc \(\alpha\) cba} AAA \] +;; \[ x=y \begin{minipage}{3cm} abc \[\alpha\] cba \end{minipage} AAA \] +;;-------------------------------------------------------------------------- + +;;; Code: + +(defgroup texmathp nil + "Testing TeX and LaTeX documents for math mode." + :tag "Test For TeX and LaTeX Math Mode" + :prefix "texmathp-" + :group 'tex) + +;; Some internal variables which are computed from `texmathp-tex-commands' +;; and `texmathp-tex-commands-default'. +(defvar texmathp-environments nil) +(defvar texmathp-macros nil) +(defvar texmathp-onoff-regexp nil) +(defvar texmathp-toggle-regexp nil) +(defvar texmathp-tex-commands1 nil) +(defvar texmathp-memory nil) + +(defvar texmathp-tex-commands) ; silence the compiler + +(defvar texmathp-tex-commands-default + '(;; Plain TeX + ("$$" sw-toggle) ("$" sw-toggle) + ("\\hbox" arg-off) + ("\\vbox" arg-off) + ("\\vtop" arg-off) + ("\\vcenter" arg-off) + + ;; Standard LaTeX + ("equation" env-on) + ("eqnarray" env-on) ("eqnarray*" env-on) + ("math" env-on) + ("displaymath" env-on) + ("minipage" env-off) + ("\\fbox" arg-off) + ("\\mbox" arg-off) + ("\\framebox" arg-off) + ("\\label" arg-off) + ("\\textrm" arg-off) + ("\\(" sw-on) ("\\)" sw-off) + ("\\[" sw-on) ("\\]" sw-off) + ("\\ensuremath" arg-on) + + ;; AMS-LaTeX + ("equation*" env-on) + ("align" env-on) ("align*" env-on) + ("gather" env-on) ("gather*" env-on) + ("multline" env-on) ("multline*" env-on) + ("flalign" env-on) ("flalign*" env-on) + ("alignat" env-on) ("alignat*" env-on) + ("xalignat" env-on) ("xalignat*" env-on) + ("xxalignat" env-on) ("\\boxed" arg-on) + ("\\text" arg-off) ("\\intertext" arg-off) + ("\\tag" arg-off) ("\\tag*" arg-off) + + ;; mathtools + ("\\shortintertext" arg-off) + + ;; empheq + ("empheq" env-on) + ("AmSequation" env-on) ("AmSequation*" env-on) + ("AmSalign" env-on) ("AmSalign*" env-on) + ("AmSgather" env-on) ("AmSgather*" env-on) + ("AmSmultline" env-on) ("AmSmultline*" env-on) + ("AmSflalign" env-on) ("AmSflalign*" env-on) + ("AmSalignat" env-on) ("AmSalignat*" env-on) + + ;; breqn + ("dmath" env-on) ("dmath*" env-on) + ("dseries" env-on) ("dseries*" env-on) + ("dgroup" env-on) ("dgroup*" env-on) + ("darray" env-on) ("darray*" env-on) + ("dsuspend" env-off)) + "The default entries for `texmathp-tex-commands', which see.") + +(defun texmathp-compile () + "Compile the value of `texmathp-tex-commands' into the internal lists. +Call this when you have changed the value of that variable without using +customize (customize calls it when setting the variable)." + (interactive) + ;; Extract lists and regexp. + (setq texmathp-macros nil texmathp-environments nil) + (setq texmathp-memory + (cons texmathp-tex-commands texmathp-tex-commands-default)) + (setq texmathp-tex-commands1 (append texmathp-tex-commands + texmathp-tex-commands-default)) + (let ((list (reverse texmathp-tex-commands1)) + entry type switches togglers) + (while (setq entry (car list)) + (setq type (nth 1 entry) + list (cdr list)) + (cond ((memq type '(env-on env-off)) (push (car entry) texmathp-environments)) + ((memq type '(arg-on arg-off)) (push (car entry) texmathp-macros)) + ((memq type '(sw-on sw-off)) (push (car entry) switches)) + ((memq type '(sw-toggle)) (push (car entry) togglers)))) + (setq texmathp-onoff-regexp + (concat "\\(?:[^\\]\\|\\`\\)" + (regexp-opt switches t)) + texmathp-toggle-regexp + (concat "\\([^\\$]\\|\\`\\)" + (regexp-opt togglers t))))) + +(defcustom texmathp-tex-commands nil + "List of environments and macros influencing (La)TeX math mode. +This user-defined list is used in addition to LaTeX and AMSLaTeX defaults. +The structure of each entry is (NAME TYPE) + +- The first item in each entry is the name of an environment or macro. + If it's a macro, include the backslash. + +- The second item is a symbol indicating how the command works: + `env-on' Environment: turns math mode for its body on + `env-off' Environment: turns math mode for its body off + `arg-on' Command: turns math mode for its arguments on + `arg-off' Command: turns math mode for its arguments off + `sw-on' Switch: turns math-mode of following text on + `sw-off' Switch: turns math-mode of following text off + `sw-toggle' Switch: toggles math mode of following text" + :set (lambda (symbol value) (set-default symbol value) (texmathp-compile)) + :type + '(repeat + (list :value ("" env-on) + (string :tag "Name") + (choice :tag "Type" + (const :tag "Environment: turns math mode for its body on" env-on) + (const :tag "Environment: turns math mode for its body off" env-off) + (const :tag "Command: turns math mode for its argument on" arg-on) + (const :tag "Command: turns math-mode for its argument off" arg-off) + (const :tag "Switch: turns math-mode of following text on" sw-on) + (const :tag "Switch: turns math-mode of following text off" sw-off) + (const :tag "Switch: toggles math mode of following text" sw-toggle))))) + +(defcustom texmathp-search-n-paragraphs 2 + "Number of paragraphs to check before point. +Normally, you cannot have an empty line in a math environment in (La)TeX. +The fastest method to test for math mode is then limiting the search +backward to the nearest empty line. +However, during editing it happens that such lines exist temporarily. +Therefore we look a little further. This variable determines how many +empty lines we go back to fix the search limit." + :type 'number) + +(defcustom texmathp-allow-detached-args nil + "Non-nil means, allow arguments of macros to be detached by whitespace. +When this is t, `aaa' will be interpreted as an argument of \\bbb in the +following construct: \\bbb [xxx] {aaa} +This is legal in TeX. The disadvantage is that any number of braces expressions +will be considered arguments of the macro independent of its definition." + :type 'boolean) + +(defvar texmathp-why nil + "After a call to `texmathp' this variable shows why math-mode is on or off. +The value is a cons cell (MATCH . POSITION). +MATCH is a string like a car of an entry in `texmathp-tex-commands', for +example \"equation\" or \"\\ensuremath\" or \"\\=\\[\" or \"$\". +POSITION is the buffer position of the match. If there was no match, +it points to the limit used for searches, usually two paragraphs up.") + +;; We need our own syntax table to play with the syntax of () [] and {} +;; For speed reasons we define it statically instead of copying it each time. +(defvar texmathp-syntax-table + (let ((table (make-syntax-table))) + (mapc (lambda (x) (modify-syntax-entry (car x) (cdr x) table)) + '((?\\ . "\\") (?\f .">") (?\n . ">") (?% . "<") + (?\[ . ".") (?\] . ".") (?\{ . "(}") (?\} . "){") + (?\( . ".") (?\) . ".") (?\" . ".") (?& . ".") (?_ . ".") + (?@ . "_") (?~ . " ") (?$ . "$") (?' . "w"))) + table) + "Syntax table used while texmathp is parsing.") + +;;;###autoload +(defun texmathp () + "Determine if point is inside (La)TeX math mode. +Returns t or nil. Additional info is placed into `texmathp-why'. +The functions assumes that you have (almost) syntactically correct (La)TeX in +the buffer. +See the variable `texmathp-tex-commands' about which commands are checked." + (interactive) + (let* ((pos (point)) math-on sw-match + (bound (save-excursion + (if (re-search-backward + (if (eq major-mode 'doctex-mode) + "[\n\r]%*[ \t]*[\n\r]" + "[\n\r][ \t]*[\n\r]") + nil 1 texmathp-search-n-paragraphs) + (match-beginning 0) + (point-min)))) + (mac-match (texmathp-match-macro bound)) + (env-match (texmathp-match-environment + (if (and mac-match (> (cdr mac-match) bound)) + (cdr mac-match) + bound))) + (match (cons nil bound))) + + ;; Select the nearer match + (and env-match (setq match env-match)) + ;; Use `>=' instead of `>' in case called inside \ensuremath{..} + ;; beginning just at (point-min). + (and mac-match (>= (cdr mac-match) (cdr match)) (setq match mac-match)) + (setq math-on (memq (nth 1 (assoc (car match) texmathp-tex-commands1)) + '(env-on arg-on))) + + ;; Check for switches + (and (not math-on) + (setq sw-match (texmathp-match-switch bound)) + ;; Use `>=' instead of `>' by similar reason as above. (bug#41559) + (>= (cdr sw-match) (cdr match)) + (eq (nth 1 (assoc (car sw-match) texmathp-tex-commands1)) 'sw-on) + (setq match sw-match math-on t)) + + ;; Check for togglers + (if (not math-on) + (save-excursion + (goto-char (cdr match)) + (while (re-search-forward texmathp-toggle-regexp pos t) + (if (setq math-on (not math-on)) + (setq sw-match (cons (match-string-no-properties 2) (match-beginning 2))) + (setq sw-match nil))) + (and math-on sw-match (setq match sw-match)))) + + ;; Store info, show as message when interactive, and return + (setq texmathp-why match) + (and (called-interactively-p 'any) + (message "math-mode is %s: %s begins at buffer position %d" + (if math-on "on" "off") + (or (car match) "new paragraph") + (cdr match))) + (and math-on t))) + +(defun texmathp-match-environment (bound) + "Find out if point is inside any of the math environments. +Limit searched to BOUND. The return value is like (\"equation\" . (point))." + (catch 'exit + (save-excursion + (and (null texmathp-environments) (throw 'exit nil)) + ;; Check if the line we are starting with is a commented one. + (let ((orig-comment-flag + ;; Could be replaced by `TeX-in-commented-line'. + (progn + (save-excursion + (beginning-of-line) + (skip-chars-forward " \t") + (string= (buffer-substring-no-properties + (point) (min (point-max) + (+ (point) (length comment-start)))) + comment-start)))) + end-list env) + (while (re-search-backward "\\\\\\(begin\\|end\\)[ \t]*{\\([^}]+\\)}" + bound t) + ;; Check if the match found is inside of a comment. + (let ((current-comment-flag + ;; Could be replaced by `TeX-in-comment'. + (when (save-match-data + (re-search-backward comment-start-skip + (line-beginning-position) t)) + ;; We need a t for comparison with `orig-comment-flag', + ;; not a number. + t))) + ;; Only consider matching alternatives with respect to + ;; "in-commentness", i.e. if we started with a comment + ;; only consider matches which are in comments as well and + ;; vice versa. + (when (eq orig-comment-flag current-comment-flag) + (setq env (buffer-substring-no-properties + (match-beginning 2) (match-end 2))) + (cond ((string= (match-string-no-properties 1) "end") + (setq end-list (cons env end-list))) + ((equal env (car end-list)) + (setq end-list (cdr end-list))) + ((member env texmathp-environments) + (throw 'exit (cons env (point)))))))) + nil)))) + +(defun texmathp-match-macro (bound) + "Find out if point is within the arguments of any of the Math macros. +Limit searches to BOUND. The return value is like (\"\\macro\" . (point))." + (catch 'exit + (and (null texmathp-macros) (throw 'exit nil)) + (let (pos cmd (syntax-table (syntax-table))) + (unwind-protect + (save-restriction + (save-excursion + (set-syntax-table texmathp-syntax-table) + (narrow-to-region (max 1 bound) (point)) + ;; Move back out of the current parenthesis + (while (condition-case nil (progn (up-list -1) t) (error nil)) + ;; Move back over any touching sexps (in fact also non-touching) + (while + (and + (cond + ((memq (preceding-char) '(?\] ?\}))) + ((and + texmathp-allow-detached-args + (re-search-backward + "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" + bound t)) + (goto-char (1+ (match-beginning 0))) t)) + (if (eq (preceding-char) ?\}) + ;; Jump back over {} + (condition-case nil + (progn (backward-sexp) t) + (error nil)) + ;; Jump back over []. Modify syntax temporarily for this. + (unwind-protect + (progn + (modify-syntax-entry ?\{ ".") + (modify-syntax-entry ?\} ".") + (modify-syntax-entry ?\[ "(]") + (modify-syntax-entry ?\] ")[") + (condition-case nil + (progn (backward-sexp) t) + (error nil))) + (modify-syntax-entry ?\{ "(}") + (modify-syntax-entry ?\} "){") + (modify-syntax-entry ?\[ ".") + (modify-syntax-entry ?\] ".") + nil)))) + (setq pos (point)) + (and (memq (following-char) '(?\[ ?\{)) + (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t) + (setq cmd (buffer-substring-no-properties + (match-beginning 0) (match-end 0))) + (member cmd texmathp-macros) + (throw 'exit (cons cmd (point)))) + (goto-char pos)) + (throw 'exit nil))) + (set-syntax-table syntax-table))))) + +;;;###autoload +(defun texmathp-match-switch (bound) + "Search backward for any of the math switches. +Limit searched to BOUND." + ;; The return value is like ("\\(" . (point)). + (save-excursion + (if (re-search-backward texmathp-onoff-regexp bound t) + (cons (buffer-substring-no-properties (match-beginning 1) (match-end 1)) + (match-beginning 1)) + nil))) + +(provide 'texmathp) + +;;; texmathp.el ends here diff --git a/elpa/auctex-13.1.3/texmathp.elc b/elpa/auctex-13.1.3/texmathp.elc Binary files differnew file mode 100644 index 0000000..a519de9 --- /dev/null +++ b/elpa/auctex-13.1.3/texmathp.elc diff --git a/elpa/auctex-13.1.3/toolbar-x.el b/elpa/auctex-13.1.3/toolbar-x.el new file mode 100644 index 0000000..d97035f --- /dev/null +++ b/elpa/auctex-13.1.3/toolbar-x.el @@ -0,0 +1,1565 @@ +;;; toolbar-x.el --- fancy toolbar handling in Emacs -*- lexical-binding: t; -*- + +;; Copyright (C) 2004-2022 Free Software Foundation, Inc. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 3 of +;; the License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be +;; useful, but WITHOUT ANY WARRANTY; without even the implied +;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +;; PURPOSE. See the GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public +;; License along with this program; if not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +;; MA 02110-1301 USA + +;;; Author: Miguel Vinicius Santini Frasson + +;;; Commentary: +;; This program implements a common interface to display toolbar +;; buttons. A toolbar should be basically +;; defined by a image and a command to run when the button is pressed, +;; and additional properties could be added. This is the idea of this +;; program. See the documentation of function +;; `toolbarx-install-toolbar' for a description of how to specify +;; toolbars. + +;;; Features: + +;; * Button properties are given in the toolbar definition (BUTTON +;; paramenter in `toolbarx-install-toolbar') and/or in an alist with +;; associates the symbol with properties (MEANING-ALIST paramenter in +;; `toolbarx-install-toolbar'). + +;; * Supported properties: +;; - `:insert', `:image', `:command', `:help', `:enable', +;; `:append-command', `:prepend-command', +;; `:visible' and `:button'; +;; For the precise value-type for each property, see documentation of +;; the function `toolbarx-install-toolbar'. +;; (ps: properties that are particular to an editor are just ignored +;; the other editor flavour.) + +;; * Properties can have value specified by function (with no +;; argument) or variables that evaluate to an object of the correct +;; type for a particular property. The evaluation is done when the +;; roolbar is refresh (a call of `toolbarx-refresh'.) +;; (ps: this is valid only for properties that *not* have \`form\' as +;; value type.) + +;; * On `refresh time' (a call `toolbarx-refresh', necessary when the +;; toolbar should change), the `:insert' property (if present) is +;; evaluated to decide if button will be displayed. + +;; Properties can be distributed to several buttons, using \`groups\'. +;; Example: (foo (bar baz :enable (mytest)) :help "please") +;; means that `foo', `bar' and `baz' have `:help "please"' and `bar' and +;; `baz' have the property `:enable (mytest)'. + +;; * (Part of) the toolbar definition can be stored in a variable, +;; evaluated in `installation time'. See `:eval-group' on the +;; documentation of the function `toolbarx-install-toolbar'. + +;; * It is possible to define sets of buttons that appear according to +;; an option selected in a dropdown menu. See `:dropdown-group' on +;; the documentation of the function `toolbarx-install-toolbar'. + +;;; Rough description of the implementation +;; There are 2 \`engines\' implemented: + +;; == the 1st one (parsing) parses the toolbar definition +;; independently of editor flavour and store the parsed buttons with +;; their properties, in the same order that they appear in the +;; definitions, in a variable `toolbarx-internal-button-switches'; + +;; == the 2nd one (refresh for Emacs) inserts buttons in the Emacs +;; toolbar in the same order that they appear in the definitions; +;; if a (real) button does not have at least (valid) image +;; and command properties, they are silently ignored; + +;;; History: + +;; This program was motivated by the intention of implementation of a +;; good toolbar for AUCTeX, that would work in both Emacs and XEmacs. +;; Since toolbars were very different in behaviour and implementation +;; (for instance, in Emacs one can display as many toolbar buttons as +;; wanted, because it becomes mult-line, and in XEmacs, there is one +;; line, but toolbars and all sides of a frame.) + + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) + +;; Note that this just gives a useful default. Icons are expected to +;; be in subdirectory "images" or "toolbar" relative to the load-path. +;; Packages loading toolbarx are advised to explicitly add their own +;; searchpath with add-to-list here even when they fulfill that +;; criterion: another package might have loaded toolbar-x previously +;; when load-path was not yet correctly set. The default setting +;; really caters only for toolbar-x' stock icons. + +(defvar toolbarx-image-path + (nconc + (delq nil (mapcar #'(lambda(x) + (and x + (member + (file-name-nondirectory + (directory-file-name x)) + '("toolbar" "images")) + ;;(file-directory-p x) + x)) + load-path)) + (list data-directory)) + "List of directories where toolbarx finds its images.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; First engine: Parsing buttons + +;; it obtains button information, process it and stores result in +;; `toolbarx-internal-button-switches', which is a list with 1st +;; element the symbol `:switches', the 2nd element as a list of +;; processed buttons, and the 3rd element is used for Emacs to store +;; the keys used in ``constant'' buttons. + +;; The 2nd element of `toolbarx-internal-button-switches' is a list +;; where each element is either: +;; * a button-list, that is, a list with elements to define a button. +;; * a list where 1st elem is `:insert' and 2nd is a form, and the +;; following elements are in the same format of the 2nd element of +;; `toolbarx-internal-button-switches'. + +(defun toolbarx-make-string-from-symbol (symbol) + "Return a string from the name of a SYMBOL. +Upcase initials and replace dashes by spaces." + (let* ((str (upcase-initials (symbol-name symbol))) + (str2)) + (dolist (i (append str nil)) + (if (eq i 45) ; if dash, push space + (push 32 str2) + (push i str2))) ; else push identical + (concat (nreverse str2)))) + +(defun toolbarx-make-symbol-from-string (string) + "Return a (intern) symbol from STRING. +Downcase string and replace spaces by dashes." + (let* ((str1 (append (downcase string) nil)) + (str2)) + (dolist (i str1) + (if (eq i 32) ; if dash, push space + (push 45 str2) + (push i str2))) + (intern (concat (nreverse str2))))) + +(defun toolbarx-good-option-list-p (option-list valid-options) + "Non-nil means the OPTION-LIST is of form (OPT FORM ... OPT FORM). +Each OPT is member of VALID-OPTIONS and OPT are pairwise +different. OPTION-LIST equal to nil is a good option list." + (let ((elt-in-valid t) + (temp-opt-list option-list) + (list-diff) + (n (/ (length option-list) 2))) + (dotimes (i n) + (when (> i 0) + (setq temp-opt-list (cddr temp-opt-list))) + (cl-pushnew (car temp-opt-list) list-diff :test #'equal) + (setq elt-in-valid (and elt-in-valid + (memq (car temp-opt-list) + valid-options)))) + (and elt-in-valid ; options are on VALID-OPTOPNS + ;; OPTION-LIST has all option different from each other + (eq (length list-diff) n) + ;; OPTION-LIST has even number of elements + (eq (% (length option-list) 2) 0)))) + +(defun toolbarx-separate-options (group-list valid-options &optional check) + "Return a cons cell with non-options and options of GROUP-LIST. +The options-part is the largest tail of the list GROUP-LIST that +has an element of VALID-OPTIONS (the comparation is made with +`memq'.) The non-options-part is the beginning of GROUP-LIST +less its tail. Return a cons cell which `car' is the +non-options-part and the `cdr' is the options-part. + +If CHECK is non-nil, the tail is the largest that yield non-nil +when applied to `toolbarx-good-option-list-p'." + (let ((maximal) + (temp)) + (dolist (i valid-options) + (setq temp (memq i group-list)) + (when (and (> (length temp) (length maximal)) + (if check + (toolbarx-good-option-list-p temp valid-options) + t)) + (setq maximal (memq i group-list)))) + (cons (butlast group-list (length maximal)) maximal))) + + +(defun toolbarx-merge-props (inner-props outer-props override add) + "Merge property lists INNER-PROPS and OUTER-PROPS. +INNER-PROPS and OUTER-PROPS are two lists in the format + (PROP VAL PROP VAL ... PROP VAL). +Returns a list with properties and values merged. + +OVERRIDE and ADD are supposed to be lists of symbols. The value +of a property in OVERRIDE is the one on OUTER-PROPS or +INNER-PROPS, but if the property is in both, the value in +INNER-PROPS is used. The value of a property in ADD will be a +list with first element the symbol `:add-value-list' and the rest +are the properties, inner properties first." + (let* ((merged) + (inner-prop) + (outer-prop)) + (dolist (prop override) + (if (memq prop inner-props) + (setq merged (append merged + (list prop (cadr (memq prop inner-props))))) + (when (memq prop outer-props) + (setq merged (append merged + (list prop (cadr (memq prop outer-props)))))))) + (dolist (prop add merged) + (setq inner-prop (memq prop inner-props)) + (when inner-prop + (if (and (listp (cadr inner-prop)) + (eq (car (cadr inner-prop)) :add-value-list)) + (setq inner-prop (cdr (cadr inner-prop))) + (setq inner-prop (list (cadr inner-prop))))) + (setq outer-prop (memq prop outer-props)) + (when outer-prop + (if (and (listp (cadr outer-prop)) + (eq (car (cadr outer-prop)) :add-value-list)) + (setq outer-prop (cdr (cadr outer-prop))) + (setq outer-prop (list (cadr outer-prop))))) + (when (append inner-prop outer-prop) + (setq merged (append merged + (list prop (cons :add-value-list + (append inner-prop + outer-prop))))))))) + +(defun toolbarx-make-command (comm prep app) + "Return a command made from COMM, PREP and APP. +COMM is a command or a form. PREP and APP are forms. If PREP or +APP are non-nil, they are added to the resulting command at the +beginning and end, respectively. If both are nil and COMM is a +command, COMM is returned." + (let ((comm-is-command (commandp comm))) + (if (and (not prep) + (not app) + comm-is-command) + comm + (lambda () (interactive) + (let (result) + (when prep (setq result (eval prep t))) + (when comm (setq result + (if comm-is-command + (call-interactively comm) + (eval comm t)))) + (when app (setq result (eval app t))) + result))))) + +(defun toolbarx-emacs-mount-popup-menu + (strings var type &optional title save) + "Return an interactive `lambda'-expression that shows a popup menu. +This function is the action of `toolbarx-mount-popup-menu' if +inside Emacs. See documentation of that function for more." + ;; making the menu keymap by adding each menu-item definition + ;; see (info "(elisp)Menu keymaps") + (let* ((keymap (make-sparse-keymap title)) + (count 1) + (used-symbols '(nil)) + (key) + (real-type + (pcase type + ((or `toggle `radio) type) + ;; Warn if type is not `radio' or `toggle'. + (_ (display-warning 'toolbarx + (format "TYPE should be symbols `radio' or `toggle', but %s found; using `radio'" + type)) + ;; Use `radio' if incorrect. + 'radio))) + (real-save + (pcase save + ((or `nil `offer `always) save) + ;; Warn if save is not `nil', `offer' or ;; `always'. + (_ (display-warning 'toolbarx + (format "SAVE should be symbols `nil', `offer' or `always', but %s found; using `nil'" + save)) + ;; Use nil when incorrect. + nil)))) + (dolist (i strings) + ;; finding a new symbol + (let* ((aux-count 0) + (i-symb (toolbarx-make-symbol-from-string i))) + (setq key i-symb) + (while (memq key used-symbols) + (setq aux-count (1+ aux-count)) + (setq key (intern (format "%s-%d" i-symb aux-count)))) + (setq used-symbols (cons key used-symbols))) + (define-key-after keymap (vector key) + `(menu-item ,i + ,(let ((count count)) + (lambda () (interactive) + (set var + (if (eq real-type 'radio) + count + (if (memq count (symbol-value var)) + (delete count (symbol-value var)) + (sort (cons count (symbol-value var)) #'<)))) + (toolbarx-refresh) + (when (eq real-save 'always) + (customize-save-variable var (symbol-value var))) + (symbol-value var))) + :button ,(if (eq real-type 'radio) + `(:radio eq ,var ,count) + `(:toggle memq ,count ,var)))) + (setq count (1+ count))) + (when (eq real-save 'offer) + (define-key-after keymap [sep] '(menu-item "--shadow-etched-in-dash")) + (let* ((aux-count 0) + (i-symb 'custom-save)) + (setq key i-symb) + (while (memq key used-symbols) + (setq aux-count (1+ aux-count)) + (setq key (intern (format "%s-%d" i-symb aux-count)))) + (setq used-symbols (cons key used-symbols))) + (define-key-after keymap (vector key) + `(menu-item "Save state of this menu" + (lambda nil (interactive) + (customize-save-variable (quote ,var) ,var))))) + ;; returns a `lambda'-expression + (lambda () (interactive) (popup-menu keymap)))) + +(defun toolbarx-mount-popup-menu (strings var type &optional title save) + "Return a command that show a popup menu. +The return is a `lambda'-expression with a interactive declaration. + +STRINGS is a list of strings which will be the itens of the menu. + +VAR is a symbol that is set when an item is clicked. TYPE should +be one of the symbols `radio' or `toggle': `radio' means that the +nth item is selected if VAR is `n' and this item sets VAR to `n'; +`toggle' means that VAR should be a list of integers and the nth +item is selected if `n' belongs to VAR. The item inserts or +deletes `n' from VAR. + +TITLE is a string (the title of the popup menu) or nil for no +title. + +SAVE is one of the symbols nil, `offer' or `always'. If value +is nil, do not try to save anything. If it is `offer', a menu +item is added offering the user the possibiity to save state of +that dropdown menu for future sesseions (using `custom'). If it +is `always', state is saved every time that a item is clicked." + (toolbarx-emacs-mount-popup-menu strings var type title save)) + +(defun toolbarx-option-value (opt) + "If OPT is a vector, return first element, otherwise, return OPT. +If OPT is vector and length is smaller than the necessary, then +nil is returned." + ;; FIXME: This is backward compatibility for when we supported XEmacs + ;; and entries could take the shape [FOO BAR] where FOO was the + ;; value to use for Emacs and BAR the value to use for XEmacs. + ;; This is unused since Mar 2021. + (if (vectorp opt) + (when (> (length opt) 0) + (aref opt 0)) + opt)) + +(defun toolbarx-eval-function-or-symbol (object type-test-func) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ non-nil means that VAL is a valid value, according to +the car of the result of TYPE-TEST-FUNCTION, that should return a +cons cell in the same format as the return of this function. + +If OBJECT applied to TYPE-TEST-FUNC return (GOOD-OBJ . VAL), and +GOOD-OBJ is non-nil, return that. Else, check if OBJECT is a +function. If so, evaluate and test again with TYPE-TEST-FUNC. If +not a function or if GOOD-OBJ is again nil, test if OBJECT is a +bound symbol, evaluate that and return the result of +TYPE-TEST-FUNC." + (let* ((ret (funcall type-test-func object))) + (unless (car ret) + (if (functionp object) + (progn + (setq ret (funcall type-test-func (funcall object))) + (unless (car ret) + (when (and (symbolp object) (boundp object)) + (setq ret (funcall type-test-func (symbol-value object)))))) + ;; ok, obj is not function; try symbol + (when (and (symbolp object) (boundp object)) + (setq ret (funcall type-test-func (symbol-value object)))))) + ret)) + +(defun toolbarx-test-image-type (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid image object VAL (see +documentation of function `toolbarx-process-symbol')." + (let ((toolbarx-test-image-type-simple + (lambda (img) + (let* ((val (toolbarx-option-value img)) + (all-obj-ok t) + (good-obj + (or (stringp val) ; string + (eq (car-safe val) 'image) ; or image descriptor + (and (symbolp val) ; or a symbol bound to a + (boundp val) ; image descriptor + ; (defined with `defimage') + (consp (symbol-value val)) + (eq (car (symbol-value val)) 'image)) + (and (listp val) ; or list with 4 strings or + ; image descriptors + (= (length val) 4) + (dolist (i val all-obj-ok) + (setq all-obj-ok + (and all-obj-ok + (or (stringp i) + (eq (car-safe i) 'image))))))))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-image-type-simple))) + +(defun toolbarx-test-button-type (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid button object VAL (see +documentation of function `toolbarx-process-symbol')." + (let ((toolbarx-test-button-type-simple + (lambda (but) + (let* ((val (toolbarx-option-value but)) + (good-obj + (and (consp val) + (memq (car val) '(:toggle :radio))))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-button-type-simple))) + +(defun toolbarx-test-any-type (obj) + "Return a cons cell (t . VAL). +If OBJ is vector, return VAL according to editor. Else, return +OBJ, because it is a form anyway." + (cons t (toolbarx-option-value obj))) + +(defun toolbarx-test-string-or-nil (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid help object VAL (see +documentation of function `toolbarx-process-symbol')." + (let ((toolbarx-test-string-or-nil-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + (good-obj (or (stringp val) + (not val)))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-string-or-nil-simple))) + +(defun toolbarx-test-toolbar-type (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid toolbar property object +VAL (see documentation of function `toolbarx-process-symbol')." + (let ((toolbarx-test-toolbar-type-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + ;; (all-but-def-opts '(top bottom left right)) + ;; (all-opts '(default top bottom left right)) + ;; (good-obj t) + ) + (cons t val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-toolbar-type-simple))) + +(defun toolbarx-test-dropdown-type (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid `:type' property object +VAL of a dropdown group (see documentation of function +`toolbarx-process-dropdown-group'." + (let ((toolbarx-test-dropdown-type-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + (good-obj (memq val '(radio toggle)))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-dropdown-type-simple))) + +(defun toolbarx-test-symbol (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid `:variable' property +object VAL of a dropdown group (see documentation of function +`toolbarx-process-dropdown-group'." + (let ((toolbarx-test-symbol-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + (good-obj (symbolp val))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-symbol-simple))) + +(defun toolbarx-test-dropdown-default (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid `:default' property +object VAL of a dropdown group (see documentation of function +`toolbarx-process-dropdown-group'." + (let ((toolbarx-test-dropdown-default-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + (good-obj (or (integerp val) + (and (listp val) + (let ((ok t)) + (dolist (i val ok) + (setq ok (and ok (integerp i))))))))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj + toolbarx-test-dropdown-default-simple))) + +(defun toolbarx-test-dropdown-save (obj) + "Return a cons cell (GOOD-OBJ . VAL). +GOOD-OBJ is non-nil if OBJ yields a valid `:save' property +object VAL of a dropdown group (see documentation of function +`toolbarx-process-dropdown-group'." + (let ((toolbarx-test-dropdown-save-simple + (lambda (obj) + (let* ((val (toolbarx-option-value obj)) + (good-obj (memq val '(nil offer always)))) + (cons good-obj val))))) + (toolbarx-eval-function-or-symbol obj toolbarx-test-dropdown-save-simple))) + +(defconst toolbarx-button-props + (let* ((props-types-alist + '((:image toolbarx-test-image-type) + (:command toolbarx-test-any-type) + (:enable toolbarx-test-any-type) + (:visible toolbarx-test-any-type) + (:help toolbarx-test-string-or-nil) + (:insert toolbarx-test-any-type . and) + ;; (:toolbar toolbarx-test-toolbar-type) + (:button toolbarx-test-button-type) + (:append-command toolbarx-test-any-type . progn) + (:prepend-command toolbarx-test-any-type . progn))) + (possible-props (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (setq props (cons (car p) props)))))) + (props-override (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (unless (cddr p) + (setq props (cons (car p) props))))))) + (props-add (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (when (cddr p) + (setq props (cons (car p) props)))))))) + (list props-types-alist possible-props props-override props-add)) + "List yielding all encarnations of properties of a button. +First element: alist, where each element is of form + (PROP . (TYPE-TEST-FUNCTION . ADD-OR-NIL)) +Second is a list with all properties. +Third, a list with properties that override when merging. +Fourth, a list of lists, each in the format (PROP ADD).") + +(defconst toolbarx-dropdown-props + ;; for naming dropdown properties see `Convention' in the doc string + (let* ((props-types-alist + '((:type toolbarx-test-dropdown-type) + (:variable toolbarx-test-symbol) + (:default toolbarx-test-dropdown-default) + (:save toolbarx-test-dropdown-save) + (:title toolbarx-test-string-or-nil) + (:dropdown-image toolbarx-test-image-type) + (:dropdown-enable toolbarx-test-any-type) + (:dropdown-visible toolbarx-test-any-type) + (:dropdown-insert toolbarx-test-any-type . and) + (:dropdown-help toolbarx-test-string-or-nil) + ;; (:dropdown-toolbar toolbarx-test-toolbar-type) + (:dropdown-append-command toolbarx-test-any-type . progn) + (:dropdown-prepend-command toolbarx-test-any-type . progn))) + (possible-props (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (setq props (cons (car p) props)))))) + (props-override (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (unless (cddr p) + (setq props (cons (car p) props))))))) + (props-add (nreverse (let* ((props ())) + (dolist (p props-types-alist props) + (when (cddr p) + (setq props (cons (car p) props)))))))) + (list props-types-alist possible-props props-override props-add)) + "List yielding all encarnations of properties of a dropdown group. +First element: alist, where each element is of form + (PROP . (TYPE-TEST-FUNCTION . ADD-OR-NIL)) +Second is a list with all properties. +Third, a list with properties that override when merging. +Fourth, a list of lists, each in the format (PROP ADD). + +Convention: properties for the dropdown button should be formed +with the strings \":dropdown-\" with the button property name +without `:'. This is used on the implementation.") + +(defun toolbarx-process-group-without-insert (group-without-props + merged-props-without-insert + meaning-alist switches) + "Return an updated version of SWITCHES. +GROUP-WITHOUT-PROPS and MERGED-PROPS-WITHOUT-INSERT are +preprocessed variables in `toolbarx-process-group'." + (let ((current-switches switches)) + (dolist (i group-without-props current-switches) + (setq i (toolbarx-option-value i)) + (if (symbolp i) + (setq current-switches + (toolbarx-process-symbol i meaning-alist + merged-props-without-insert + current-switches)) + (when (listp i) + (setq current-switches + (toolbarx-process-group i meaning-alist + merged-props-without-insert + current-switches))))))) + +(defun toolbarx-process-group (group meaning-alist props switches) + "Return an updated version of SWITCHES. +Append to already processed buttons (stored in SWITCHES) a +processed version of GROUP. Groups are useful to distribute +properties. External properties are given in PROPS, and merged +with the internal properties that are in the end of GROUP. If +properties (after merge) contain a `:insert' property, return a +list where the first and second elements are `:insert' and its +value, and after that a list in the same format as SWITCHES." + (cond + ;; if DROPDOWN group + ((eq (car group) :dropdown-group) + (toolbarx-process-dropdown-group group meaning-alist props switches)) + ;; if EVAL group + ((eq (car group) :eval-group) + (let ((current-switches switches)) + (dolist (elt (cdr group) current-switches) + (let ((eval-elt (eval elt t))) + (setq current-switches + (toolbarx-process-group (if (listp eval-elt) + eval-elt + (list eval-elt)) + meaning-alist props + current-switches)))))) + ;; if normal group + (t + (let* ((splited-props + (toolbarx-separate-options + group (append (nth 1 toolbarx-button-props) + (nth 1 toolbarx-dropdown-props)))) + (intern-props (cdr splited-props)) + (group-without-props (car splited-props)) + (merged-props + (toolbarx-merge-props intern-props props + (append (nth 2 toolbarx-button-props) + (nth 2 toolbarx-dropdown-props)) + (append (nth 3 toolbarx-button-props) + (nth 3 toolbarx-dropdown-props))))) + ;; check whether merged props have an `:insert' + (if (memq :insert merged-props) + ;; if yes, prepend switches with a (:insert cond elements) + (let* ((memq-ins (memq :insert merged-props)) + (ins-val (if (and (listp (cadr memq-ins)) + (eq :add-value-list + (car (cadr memq-ins)))) + ;; if property is add-value property + (let* ((p (assq + :insert + (nth 0 toolbarx-button-props))) + (add-list (list (cddr p))) + (prop-good-val)) + (dolist (val (cdr (cadr memq-ins))) + (setq prop-good-val (funcall (cadr p) val)) + (when (car prop-good-val) + (setq add-list (cons (cdr prop-good-val) + add-list)))) + ;; return: (nreverse add-list) + (setq add-list (nreverse add-list)) + (if (eq 2 (length add-list)) + (cadr add-list) ; just 1 value, no + add-list)) ; add-function + ;; if property is not add-value + (cadr memq-ins))) + (merged-props-without-insert + (append (butlast merged-props (length memq-ins)) + (cddr memq-ins))) + (group-switches + (toolbarx-process-group-without-insert + group-without-props merged-props-without-insert + meaning-alist nil))) + ;; return + (nreverse (cons (append (list :insert ins-val) + group-switches) + (nreverse switches)))) + ;; if not, just append what is processed to switches + (toolbarx-process-group-without-insert group-without-props + merged-props meaning-alist + switches)))))) + +(defun toolbarx-process-symbol (symbol meaning-alist props switches) + "Process a button given by SYMBOL in MEANING-ALIST. +The processed button is appended in SWITCHES, which is returned. +Look for a association of SYMBOL in MEANING-ALIST for collecting +properties. Such association is a list that represents either a +normal button (a description of the button) or an alias +group (the symbol is an alias for a group of buttons). PROPS is +a externel list of properties that are merged and then applied to +the button. Scope is given by GLOBAL-FLAG." + ;; there are 3 situations: symbol is :new-line, there is an alias group + ;; or a normal button + (let ((button-assq (cdr (assq symbol meaning-alist)))) + (cond + ((eq (car button-assq) :alias) + ;; button association is ALIAS GROUP is passed to + ;; `toolbarx-process-group' as is but without the car. + ;; return: (toolbarx-process-group... returns updates switch + (toolbarx-process-group (cdr button-assq) meaning-alist props switches)) + (t + ;; NORMAL BUTTON (association is a list of properties) + ;; + ;; properties need to be processed, that is, merge internal + ;; and external (given by PROPS) properties + (let* (;; button properties defined in `toolbarx-button-props' + (props-override (nth 2 toolbarx-button-props)) + (props-add (nth 3 toolbarx-button-props)) + ;; split considering also dropdown-group properties + (button-assq-split + (toolbarx-separate-options + button-assq + (append (nth 1 toolbarx-button-props) + (nth 1 toolbarx-dropdown-props)))) + (button-split-no-props (car button-assq-split)) + (button-split-props (cdr button-assq-split)) + ;; if there is no :image or :command in the props, + ;; try to get them from no-props part + (button-image-no-prop + (unless (memq :image button-split-props) + (when (> (length button-split-no-props) 0) + (list :image (nth 0 button-split-no-props))))) + (button-command-no-prop + (unless (memq :command button-split-props) + (when (> (length button-split-no-props) 1) + (list :command (nth 1 button-split-no-props))))) + (button-props (append button-split-props + button-image-no-prop + button-command-no-prop)) + ;; merge props + (merged-props (toolbarx-merge-props button-props props + props-override + props-add))) + ;; return: + (nreverse (cons (cons symbol merged-props) (nreverse switches)))))))) + +(defun toolbarx-process-dropdown-group (dropdown meaning-alist props switches) + "Process buttons that appear according to dropdown menu. +Process a dropdown group DROPDOWN with meaning alist +MEANING-ALIST, external property list PROP and GLOBAL-FLAG +specifying scope. For a complete description, see documentation +of `toolbarx-install-toolbar'. The processed buttons are stored +in the end of SWITCHES, which is returned." + (let* ((dropdown-group (if (eq (car dropdown) :dropdown-group) + (cdr dropdown) + dropdown)) + (dropdown-list-splited + (toolbarx-separate-options dropdown-group + (append + (nth 1 toolbarx-button-props) + (nth 1 toolbarx-dropdown-props)))) + (dropdown-list (car dropdown-list-splited)) + (dropdown-props (cdr dropdown-list-splited)) + (merged-props + (toolbarx-merge-props dropdown-props props + (append (nth 2 toolbarx-button-props) + (nth 2 toolbarx-dropdown-props)) + (append (nth 3 toolbarx-button-props) + (nth 3 toolbarx-dropdown-props)))) + (merged-props-button-only + (let* ((props-button-only) + (prop)) + (dolist (p (nth 1 toolbarx-button-props) props-button-only) + (setq prop (memq p merged-props)) + (when prop + (setq props-button-only + (append (list p (cadr prop)) + props-button-only)))))) + (merged-props-dropdown-only + (let* ((props-dropdown-only) + (prop)) + (dolist (p (nth 1 toolbarx-dropdown-props) props-dropdown-only) + (setq prop (memq p merged-props)) + (when prop + (setq props-dropdown-only + (append (list p (cadr prop)) + props-dropdown-only)))))) + ;; get value for each property and check type ONLY for props that do + ;; not concern the dropdown button, like `:type', `:save', etc. The + ;; props that concern the button are going to be handled in refresh + ;; time. + (filtered-dropdown-group-props-only + (let* ((filtered-props-temp) + (prop-good-val) + (prop)) + (save-match-data + (dolist (p (nth 0 toolbarx-dropdown-props) filtered-props-temp) + (unless (string-match "^:dropdown-.*$" + (symbol-name (car p))) + ;; property -> (car p) + ;; test type function -> (cadr p) + (setq prop (memq (car p) merged-props-dropdown-only)) + ;; if so, check if value is of correct type + (when prop + (setq prop-good-val (funcall (cadr p) (cadr prop))) + (if (car prop-good-val) + (setq filtered-props-temp + (append filtered-props-temp + (list (car p) (cdr prop-good-val)))) + (display-warning + 'toolbarx + (format (concat "Wrong type for value in " + "property `%s' in dropdown group") + (car p)))))))))) + ;; properties for the dropdown button from dropdown merged properties + (dropdown-button-props + (let* ((props)) + (save-match-data + (dolist (pr (nth 1 toolbarx-dropdown-props)) + (when (and (memq pr merged-props-dropdown-only) + (string-match "^:dropdown-\\(.*\\)$" + (symbol-name pr))) + (let* ((new-pr (intern (concat ":" + (substring (symbol-name pr) + (match-beginning 1) + (match-end 1))))) + (val (cadr (memq pr merged-props-dropdown-only)))) + (setq props (append (list new-pr val) props)))))) + (unless (memq :image props) + (setq props (append (list :image "dropdown") props))) + props)) + (dropdown-button-without-command + (cons 'dropdown dropdown-button-props)) + ;; `:type' defaults to `radio' + (type (if (memq :type filtered-dropdown-group-props-only) + (cadr (memq :type filtered-dropdown-group-props-only)) + 'radio)) + ;; `:default' defaults to 1 or nil depending on `type' + ;; if type is toggle and default is not a list, but a + ;; integer, set as the list with integer + (default + (let* ((memq-default (memq :default + filtered-dropdown-group-props-only)) + (def-temp (cadr memq-default)) + (default-temp (if memq-default + def-temp + (if (eq type 'radio) 1 (list 1))))) + default-temp)) + ;; `:save' defaults to nil and require `:variable' + (save (let* ((save-temp + (when (memq :save filtered-dropdown-group-props-only) + (cadr (memq :save + filtered-dropdown-group-props-only))))) + (if (and save-temp + (not (memq :variable + filtered-dropdown-group-props-only))) + (progn + (display-warning + 'toolbarx + (concat "`:save' property with non-nil value should " + "be used only with the `:variable' property; " + "using value nil for `:save'.")) + nil) + save-temp))) + ;; `:title' defaults to nil + (title (when (memq :title filtered-dropdown-group-props-only) + (cadr (memq :title filtered-dropdown-group-props-only)))) + ;; the menu variable is buildt from the `:variable' option or + ;; make a symbol not used + (variable (if (memq :variable filtered-dropdown-group-props-only) + (cadr (memq :variable + filtered-dropdown-group-props-only)) + (let* ((count 0) + (symb (intern (format + "toolbarx-internal-menu-var-%d" + count)))) + (while (boundp symb) + (setq count (1+ count)) + (setq symb + (intern (format "toolbarx-internal-menu-var-%d" + count)))) + symb))) + ;; auxiliary variables + (list-strings) + (list-buttons)) + ;; setting `variable' + (if save + (custom-declare-variable + variable default + "Used as variable of dropdown menu defined with `toolbarx'.") + (when (not (boundp variable)) + (set variable default))) + ;; now check `variable' content + (set variable + (let ((val (symbol-value variable))) + (if (eq type 'toggle) + (if (listp val) + val + (if (integerp val) + (list val) + (list 1))) + ;; then, type is radio + (if (integerp val) + val + (if (and val + (listp val) + (integerp (car val))) + (car val) + 1))))) + ;; === buiding `list-strings' and `list-buttons' === + ;; if only symbols, build `list-strings' and `list-buttons' from symbols + (if (let ((only-symbols-flag t)) + (dolist (i dropdown-list only-symbols-flag) + (setq only-symbols-flag (and only-symbols-flag (symbolp i))))) + (let ((count 0)) + (dolist (i dropdown-list) + ;; list-strings and list-buttons are built reversed + (setq list-strings (cons (toolbarx-make-string-from-symbol i) + list-strings)) + (setq count (1+ count)) + (setq list-buttons (cons (list i + :insert + (if (eq type 'radio) + (list 'eq count variable) + (list 'memq count variable))) + list-buttons)))) + ;; if not, the it must start with string + (unless (stringp (car dropdown-list)) + (error "%s %s %s" + "If not all items on dropdown are symbols, then a string" + "must come before each set of buttons; no string found" + "in first position")) + (let ((count 0) + (elem) + (temp-list-buttons)) + (while dropdown-list + (setq elem (car dropdown-list)) + (setq dropdown-list (cdr dropdown-list)) + (if (stringp elem) + ;; if string, output `temp-list-buttons' and prepair it again + (progn + ;; list-strings and list-buttons are buildt reversed + (setq list-strings (cons elem list-strings)) + (when temp-list-buttons + (setq list-buttons (cons (append (nreverse temp-list-buttons) + (list :insert + (if (eq type 'radio) + (list 'eq count + variable) + (list 'memq count + variable)))) + list-buttons))) + (setq temp-list-buttons nil) + (setq count (1+ count))) + ;; else, if not string, just insert it to `temp-list-buttons' + ;; which is also buildt reversed + (setq temp-list-buttons (cons elem temp-list-buttons)))) + ;; output last temp list, left behind + (when temp-list-buttons + (setq list-buttons (cons (append (nreverse + temp-list-buttons) + (list + :insert (if (eq type 'radio) + (list 'eq count + variable) + (list 'memq count + variable)))) + list-buttons))))) + ;; lists were made reversed (elements inserted at the beginning) + (setq list-strings (nreverse list-strings)) + (setq list-buttons (nreverse list-buttons)) + ;; now, pass `list-buttons' as a group to `toolbarx-process-group' + (let ((current-switches switches)) + (setq current-switches + (toolbarx-process-group list-buttons meaning-alist + merged-props ; pass non-processed props + current-switches)) + (setq current-switches + ;; outputing dropdown button + (toolbarx-process-group (append dropdown-button-without-command + (list :command + (toolbarx-mount-popup-menu + list-strings variable type + title save))) + meaning-alist merged-props-button-only + switches)) + current-switches))) + + + +;; Still functions `toolbarx-install-toolbar' and `toolbarx-refresh'to +;; complete the parsing engine. Since they interface with other engines, +;; they must come in the end. + +;;; How a image is made, giving a string as (part of) file name. + +;; look at function `image-type-available-p' for Emacs !!!! + +(defun toolbarx-find-image (image) + "Return image descriptor or glyph for IMAGE. + +IMAGE is string. Usually IMAGE neither contains a directory nor +an extension. If the extension is omitted, `xpm', `xbm' and +`pbm' are tried. If the directory is omitted, +`toolbarx-image-path' is searched." + (let ((file)) + (dolist (i '("" ".xpm" ".xbm" ".pbm")) + (unless file + (setq file (locate-library (concat image i) t toolbarx-image-path)))) + (if file + (create-image file) + (find-image `((:type xpm :file ,(concat image ".xpm")) + (:type xbm :file ,(concat image ".xbm")) + (:type pbm :file ,(concat image ".pbm"))))))) + +;; next variable interfaces between parsing and display engines +(defvar toolbarx-internal-button-switches nil + "Store the list of processed buttons, used by `toolbarx-refresh'. +This variable can store different values for the different buffers.") + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Second engine: display parsed buttons in Emacs + +(defun toolbarx-emacs-add-button (button used-keys keymap) + "Insert a button where BUTTON is its description. +USED-KEYS should be a list of symbols, where the first element is +`:used-symbols'. This list should store the symbols of the +buttons already inserted. This list is changed by side effect. +KEYMAP is the keymap where the menu-item corresponding to the +tool-bal button is going to be inserted. Insertion is made in +the end of KEYMAP. + +BUTTON should be a list of form (SYMBOL . PROP-LIST). SYMBOL is +a symbol that \"names\" this button. PROP-LIST is a list in the +format (PROP VAL ... PROP VAL). The supported properties are +`:image', `:command', `:append-command', `:prepend-command', +`:help', `:enable', `:visible', `:button', and `:insert'. +For a description of properties, see documentation of +function `toolbar-install-toolbar'." + (let* ((symbol (nth 0 button)) + (used-keys-list (when used-keys + (cdr used-keys))) + (filtered-props + (let* ((filtered-props-temp) + (prop-good-val) + (prop)) + (dolist (p (nth 0 toolbarx-button-props) filtered-props-temp) + ;; property -> (car p) + ;; test type function -> (cadr p) + ;; add-function -> (cddr p) + (setq prop (memq (car p) button)) + ;; if so, check if value is of correct type + (when prop + ;; if property is of add-type, them the value is a list + ;; (:add-value-list VAL VAL). Each VAL should be checked. + (if (and (cddr p) (eq :add-value-list (car (cadr prop)))) + (let* ((add-list (list (cddr p)))) + (dolist (val (cdr (cadr prop))) + (setq prop-good-val (funcall (cadr p) val)) + (when (car prop-good-val) + (setq add-list (cons (cdr prop-good-val) add-list)))) + (setq add-list (nreverse add-list)) + (when (eq 2 (length add-list)) ; just 1 value, no + ; add-function + (setq add-list (cadr add-list))) + (setq filtered-props-temp (append + (list (car p) add-list) + filtered-props-temp))) + ;; if override-property + (setq prop-good-val (funcall (cadr p) (cadr prop))) + (when (car prop-good-val) + (setq filtered-props-temp (append + (list (car p) + (cdr prop-good-val)) + filtered-props-temp)))))))) + (insert (or (not (memq :insert filtered-props)) + ;; (memq :insert filtered-props) + (eval (nth 1 (memq :insert filtered-props)) t)))) + (when insert + (cond + (t + ;; symbol is not :new-line, therefore a normal button + (let* ((image (cadr (memq :image filtered-props))) + (image-descriptor + (when (memq :image filtered-props) + (cond + ((stringp image) ; string + (toolbarx-find-image image)) + ((and (consp image) ; or image descriptor + (eq (car image) 'image)) + image) + ((and (symbolp image) ; or a symbol bound to a + (boundp image) ; image descriptor (defined + ; with `defimage')g + (consp (symbol-value image)) + (eq (car (symbol-value image)) 'image)) + (symbol-value image)) + (t ; otherwise, must be a list + ; with 4 strings or image + ; descriptors + (apply #'vector (mapcar (lambda (img) + (if (stringp img) + (toolbarx-find-image img) + img)) + image)))))) + (command + (let* ((com (nth 1 (memq :command filtered-props))) + (app (nth 1 (memq :append-command filtered-props))) + (prep (nth 1 (memq :prepend-command filtered-props)))) + (when (or com app prep) + (toolbarx-make-command com prep app)))) + (help (cons (memq :help filtered-props) + (cadr (memq :help filtered-props)))) + (enable (cons (memq :enable filtered-props) + (cadr (memq :enable filtered-props)))) + (visible (cons (memq :visible filtered-props) + (cadr (memq :visible filtered-props)))) + (button (cons (memq :button filtered-props) + (cadr (memq :button filtered-props)))) + (menuitem (if (eq symbol 'separator) + '(menu-item "--") + (append + (list 'menu-item + (toolbarx-make-string-from-symbol symbol) + command + :image image-descriptor) + (when (car help) + (list :help (cdr help))) + (when (car enable) + (list :enable (cdr enable))) + (when (car visible) + (list :visible (cdr visible))) + (when (car button) + (list :button (cdr button))) + '(:vert-only t)))) + (key-not-used + (let* ((count 0) + (symb symbol)) + (while (memq symb used-keys-list) + (setq count (1+ count)) + (setq symb (intern (format "%s-%d" symbol count)))) + symb))) + (when (and image-descriptor command) + (setq used-keys-list (cons key-not-used used-keys-list)) + (define-key-after keymap + (vector key-not-used) menuitem)))))) + (when used-keys (setcdr used-keys used-keys-list)))) + + +(defun toolbarx-emacs-refresh-process-button-or-insert-list (switches + used-keys + keymap) + "Process SWITCHES, inserting buttons in `tool-bar-map'. +If a button is actually a `:insert' clause group (if `car' is +`:insert') and evaluation of `cdr' yields non-nil, process `cddr' +recursively as SWITCHES. USED-KEYS is a list which `car' is +`:used-symbols' and which `cdr' is a list of symbols that have already +been used as keys in the keymap `tool-bar-map'." + (dolist (button switches) + (if (eq (car button) :insert) + (when (eval (cadr button) t) + (toolbarx-emacs-refresh-process-button-or-insert-list (cddr button) + used-keys + keymap)) + (toolbarx-emacs-add-button button used-keys keymap)))) + + + +(defun toolbarx-emacs-refresh (&optional global-flag) + "Refresh and redraw the toolbar in Emacs. +If GLOBAL-FLAG is non-nil, the default value of toolbar switches +is used and the default value of `toolbarx-map' is changed." + (let* ((switches (if global-flag + (if (default-boundp 'toolbarx-internal-button-switches) + (default-value 'toolbarx-internal-button-switches) + toolbarx-internal-button-switches) + toolbarx-internal-button-switches)) + (used-keys (list :used-symbols nil)) + (tool-bar-map-temp (make-sparse-keymap))) + (toolbarx-emacs-refresh-process-button-or-insert-list switches used-keys + tool-bar-map-temp) + (if global-flag + (setq-default tool-bar-map tool-bar-map-temp) + (setq tool-bar-map tool-bar-map-temp)))) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; finishing parsing engine + +(defun toolbarx-refresh (&optional global-flag) + "Redraw the toolbar, peviously installed with `toolbarx'. +Force global refresh if GLOBAL-FLAG is non-nil." + (interactive "P") + (toolbarx-emacs-refresh global-flag)) + +;;;###autoload (autoload 'toolbarx-install-toolbar "toolbar-x") + +(defun toolbarx-install-toolbar (buttons &optional meaning-alist global-flag) + "Install toolbar buttons given in BUTTONS. +Button properties are optionally given in MEANING-ALIST. If +GLOBAL-FLAG is non-nil, toolbar is installed globally (on every +buffer that does not have a toolbar set locally). BUTTONS is a +list of format + (ELEM ... ELEM . PROPS), +where each ELEM is either + + - a list in the same format od BUTTONS, which is going to be + refered as a *group*; groups are used to distribute properties + recursively to its elements; there are groups with special + format for special purpose: *dropdown groups* and also *eval + groups*. + + - a symbol, which could be associated in MEANING-ALIST with a + list of button properties (symbol + properties = a *button*) + or associated to a special kind of group (an *alias group*). + +Meaning alist +============= + +MEANING-ALIST is a list where each element is in one of the +formats (SYMB . BUTTON-PROPS-LIST) or (SYMB . ALIAS-GROUP). +BUTTON-PROPS-LIST is a list in one of the formats + (IMAGE COMMAND PROP VAL PROP VAL ... PROP VAL) or + (PROP VAL PROP VAL ... PROP VAL). +The IMAGE is going to be used as the `:image' property of the +button (see button properties bellow), and COMMAND shall be used +as the `:command' property of the button. Each PROP is one of +the button properties, and VAL is its respective value. +ALIAS-GROUP is a list which first element is the symbol `:alias' +and the cdr shall be processed as a group. + +However, a symbol is not required to have an association in +MEANING-ALIST, which is only a way to specify properties to a +button. One can use groups to specify properties. Nil is a good +MEANING-ALIST. + +Buttons +======= + +A toolbar button in `toolbarx' is the set with a symbol and +properties used to display the button, like a image and a command +to call when the button is pressed (which are the minimal +elements that a button should have.) The supported properties +for buttons and their `basic types' (see note on how values of +properties are obtained!) are: + + :image -- either a string or image descriptor (see + info for a definition), or a variable bound to a image + descriptor (like those defined with `defimage') or a list of 4 + strings or image descriptors; + defines the image file displayed by the button. If + it is a string, the image file found with that name (always + using the function `toolbarx-find-image' to make the + \`internal\' image descriptor) is used as button image. For + the other formats, the button image is handled in the same way + as it is treated by the editors; see info nodes bellow for a + description of the capabilities: + info file \"elisp\", node \"Tool Bar\" (see `:image' property); + PS: a *vector* of four strings is used in the Emacs + Lisp documentation as the `more ellaborated' image + property format, but here we reserve vectors to + provide editor-dependent values; this motivates our + choice for a list instead of vector (however, + internally the list becomes a vector when displaying + the button). + + :command -- a form; if the form happens to be a command, it will + be called with `call-interactively'. + + :append-command -- a form added to the end of the value of + `:command'. + + :prepend-command -- a form added at the beginning of the value + of `:command'. + + :help -- either a string or nil; defined the help string of the + button; + + :enable -- a form, evaluated constantly by both editors to + determine if a button is active (enabled) or not. + + :visible -- a form that is evaluated constantly to + determine if a button is visible. + + :button -- a cons cell (TYPE . SELECTED) where the + TYPE should be `:toggle' or `:radio' and the cdr should be a + form. SELECTED is evaluated to determine when the button is + selected. + + :insert -- a form that is evaluated every time that the toolbar + is refresh (a call of `toolbarx-refresh') to determine if the + button is inserted or just ignored (until next refresh). + +How to specify a button +======================= + +One can specify a button by its symbol or by a group to specify +properties. For example, + BUTTON = + ( foo + (bar :image \"bar\" + :command bar-function :help \"Bar help string\") + :insert foo-bar ) + MEANING-ALIST = ( (foo :image \"foo\" :command foo-function) ) +specifiy two buttons `foo' and `bar', each one with its necessary +:image and :command properties, and both use the :insert property +specified ate the end of BUTTONS (because groups distribute +properties to all its elements). `foo' and `bar' will be +inserted only if `foo-bar' evaluation yields non-nil. + +Note on how values of properties are obtained +============================================= + +For each property PROP, its value should be either: + i) a vector of 2 elements; then each element should be of the + basic type of PROP. + ii) an element on the basic type of PROP. + iii) a function (that does not need arguments); it is evaluated + and the return should be ot type i) or ii) above + iv) a symbol bound to a element of type i) or ii). + +The type is cheched in the order i), ii) iii) and iv). This +evaluations are done every time that the oolbar is refresh. + +Ps.: in order to specify a vector as value of a property (like +the :image in Emacs), it is necessary to provide the vector as +element of another vector. + +Special groups +============== + +Eval groups +----------- + +If the first element of a group is the symbol `:eval-group', each +element is evaluated (with `eval'), put inside a list and +processed like a group. Eval groups are useful to store +definition of buttons in a variable. + +Dropdown groups +--------------- + +The idea is to specify a set of buttons that appear when a +determined menu item of a dropdown menu is active. The dropdown +menu appears when a button (by default with a triangle pointing +down) is clicked. This button is called `dropdown button'. The +dropdown button appears on the left of the currently visible +buttons of the dropdown group. + +A dropdown group is a list which first element is the symbol +`:dropdown-group' and in one of the following formats + (:dropdown-group SYMBOL-1 ... SYMBOL-n PROP-1 VAL-1 ... PROP-k VAL-k) +or + (:dropdown-group + STRING-1 ITEM-11 ... ITEM-1n + STRING-2 ITEM-21 ... ITEM-2m + . . . + STRING-n ITEM-n1 ... ITEM-np + PROP-1 VAL-1 ... PROP-j VAL-j) +where + SYMBOL-* is a symbol that defines a button in MEANING-ALIST; + STRING-* is a string that will appear in the dropdown menu; + ITEM-* is any format that define buttons or groups. + +\(a dropdown group of first format is internally converted to the +second by making strings from the symbols and each symbol is the +item) + +The same rules for obtaining property values, described above, +apply here. Properties are also distributed by groups. The +supported properties and their basic type are: + + :type -- one of the symbols `radio' (default) or `toggle'; if + type is radio, only one of the itens may be active, and if + type is toggle, any item number of itens can be active. + + :variable -- a symbol; it is the variable that govern the + dropdown button; every time the value should be an integer + starting from 1 (if type is radio) or a list of integers (if + type is toggle). The Nth set of buttons is :insert'ed. + + :default -- determines the default value when the menu is + installed; it is ignored if a value was saved with custom; it + defaults to 1 if type is radio or nil if type is toggle. If + value is a integer and type is `toggle', value used is a list + with that integer. + + :save -- one of the symbols nil (default), `offer' or + `always'; determined if it is possible for the user to save + the which menu itens are active, for a next session. If value + is `offer', a item (offering to save) is added to the + popup menu. If the value is `always', every time that a item + is selected, the variable is saved. If value is nil, variable + shall not be saved. If value is non-nil then `:variable' is + mandatory. + + :title -- a string or nil; if a string, the popup menu will show + is as menu title; if nil, no title is shown. + + :dropdown-help -- a string or nil; the help string of the + dropdown button. + + :dropdown-image -- either a string or a vector of 4 strings; + defines the image file displayed by the dropdown button; + by default, it is the string \"dropdown\". + + :dropdown-append-command, + :dropdownprepend-command -- a form; append or prepend forms to + the command that shows the dropdown menu, allowing extra code + to run before or after the menu appears (remember that every + menu item clicked refresh the toolbar.) + + :dropdown-enable -- a form; evaluated constantly by both editors + to determine if the dropdown button is active (enabled) or + not. + + :dropdown-visible -- a form; it is evaluated + constantly to determine if the dropdown button is visible. + +Also, if the symbol `dropdown' is associted in MEANING-ALIST +with some properties, these properties override (or add) with +higher precedence. + +Special buttons +=============== + +If the symbol of a button is `:new-line', it is inserted +a (faked) return, and the next button will be displayed a next +line of buttons. The only property supported for this button is +`:insert'." + (let ((switches (toolbarx-process-group buttons meaning-alist nil nil))) + (if global-flag + (setq-default toolbarx-internal-button-switches + switches) + (set (make-local-variable 'toolbarx-internal-button-switches) + switches) + (make-local-variable 'tool-bar-map))) + (toolbarx-refresh global-flag)) + + +(defconst toolbarx-default-toolbar-meaning-alist + '((separator :image "sep" :command t :enable nil :help "") + + (new-file + :image "new" + :command find-file + :enable (not (window-minibuffer-p + (frame-selected-window menu-updating-frame))) + :help "Specify a new file's name, to edit the file") + + (open-file :image "open" + :command menu-find-file-existing + :enable (not (window-minibuffer-p + (frame-selected-window menu-updating-frame))) + :help "Read a file into an Emacs buffer") + + (dired :image "diropen" + :command dired + :help "Read a directory, operate on its files") + + (save-buffer :image "save" + :command save-buffer + :enable (and + (buffer-modified-p) + (buffer-file-name) + (not (window-minibuffer-p + (frame-selected-window menu-updating-frame)))) + :help "Save current buffer to its file" + :visible (or buffer-file-name + (not (eq 'special + (get major-mode 'mode-class))))) + + (write-file :image "saveas" + :command write-file + :enable (not + (window-minibuffer-p + (frame-selected-window menu-updating-frame))) + :help "Write current buffer to another file" + :visible (or buffer-file-name + (not (eq 'special (get major-mode 'mode-class))))) + + (undo :image "undo" + :command undo + :enable (and (not buffer-read-only) + (not (eq t buffer-undo-list)) + (if (eq last-command #'undo) + pending-undo-list + (consp buffer-undo-list))) + :help "Undo last operation" + :visible (not (eq 'special (get major-mode 'mode-class)))) + + (cut :image "cut" + :help "Delete text in region and copy it to the clipboard" + :command clipboard-kill-region + :visible (not (eq 'special (get major-mode 'mode-class)))) + + (copy :image "copy" + :help "Copy text in region to the clipboard" + :command clipboard-kill-ring-save) + + (paste :image "paste" + :help "Paste text from clipboard" + :command clipboard-yank + :visible (not (eq 'special (get major-mode 'mode-class)))) + + (search-forward :command nonincremental-search-forward + :help "Search forward for a string" + :image "search") + + (search-replace + :image "search-replace" + :command query-replace + :help "Replace string interactively, ask about each occurrence") + + (print-buffer :image "print" + :command print-buffer + :help "Print current buffer with page headings") + + (customize :image "preferences" + :command customize + :help "Edit preferences (customize)") + + (help :image "help" + :command (lambda () (interactive) (popup-menu menu-bar-help-menu)) + :help "Pop up the Help menu") + + (kill-buffer :command kill-this-buffer + :enable (kill-this-buffer-enabled-p) + :help "Discard current buffer" + :image "close") + + (exit-emacs :image "exit" + :command save-buffers-kill-emacs + :help "Offer to save unsaved buffers, then exit Emacs") + + (spell-buffer :image "spell" + :command ispell-buffer + :help "Check spelling of selected buffer") + + (info :image "info" + :command info + :help "Enter Info, the documentation browser")) + "A meaning alist with definition of the default buttons. +The following buttons are available: + + `open-file', `dired', `save-buffer', + `undo', `cut', `copy', `paste', `search-replace', `print-buffer', + `spell-buffer', `info'. + `new-file', `write-file', `search-forward', + `customize', `help', `kill-buffer', `exit-emacs'. + +To reproduce the default toolbar with use as BUTTON +in `toolbarx-install-toolbar': + +\(toolbarx-install-toolbar + \\='((open-file dired kill-buffer save-buffer write-file undo cut + copy paste search-forward print-buffer customize help)) + toolbarx-default-toolbar-meaning-alist) + +Ps.: there are more buttons available than suggested in the +expression above.") + +(provide 'toolbar-x) + +;;; toolbar-x.el ends here diff --git a/elpa/auctex-13.1.3/toolbar-x.elc b/elpa/auctex-13.1.3/toolbar-x.elc Binary files differnew file mode 100644 index 0000000..8204379 --- /dev/null +++ b/elpa/auctex-13.1.3/toolbar-x.elc diff --git a/elpa/evil-20220510.2302/dir b/elpa/evil-20220510.2302/dir new file mode 100644 index 0000000..b3717a5 --- /dev/null +++ b/elpa/evil-20220510.2302/dir @@ -0,0 +1,18 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "H" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs<Return>" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Emacs +* evil: (evil.info). Extensible vi layer for Emacs diff --git a/elpa/evil-20220510.2302/evil-autoloads.el b/elpa/evil-20220510.2302/evil-autoloads.el new file mode 100644 index 0000000..fb58c6a --- /dev/null +++ b/elpa/evil-20220510.2302/evil-autoloads.el @@ -0,0 +1,128 @@ +;;; evil-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "evil-command-window" "evil-command-window.el" +;;;;;; (0 0 0 0)) +;;; Generated autoloads from evil-command-window.el + +(register-definition-prefixes "evil-command-window" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-commands" "evil-commands.el" (0 0 0 0)) +;;; Generated autoloads from evil-commands.el + +(register-definition-prefixes "evil-commands" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-common" "evil-common.el" (0 0 0 0)) +;;; Generated autoloads from evil-common.el + +(register-definition-prefixes "evil-common" '("bounds-of-evil-" "evil-" "forward-evil-")) + +;;;*** + +;;;### (autoloads nil "evil-core" "evil-core.el" (0 0 0 0)) +;;; Generated autoloads from evil-core.el + (autoload 'evil-mode "evil" nil t) + +(register-definition-prefixes "evil-core" '("evil-" "turn-o")) + +;;;*** + +;;;### (autoloads nil "evil-digraphs" "evil-digraphs.el" (0 0 0 0)) +;;; Generated autoloads from evil-digraphs.el + +(register-definition-prefixes "evil-digraphs" '("evil-digraph")) + +;;;*** + +;;;### (autoloads nil "evil-ex" "evil-ex.el" (0 0 0 0)) +;;; Generated autoloads from evil-ex.el + +(register-definition-prefixes "evil-ex" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-integration" "evil-integration.el" (0 +;;;;;; 0 0 0)) +;;; Generated autoloads from evil-integration.el + +(register-definition-prefixes "evil-integration" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-jumps" "evil-jumps.el" (0 0 0 0)) +;;; Generated autoloads from evil-jumps.el + +(register-definition-prefixes "evil-jumps" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-macros" "evil-macros.el" (0 0 0 0)) +;;; Generated autoloads from evil-macros.el + +(register-definition-prefixes "evil-macros" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-maps" "evil-maps.el" (0 0 0 0)) +;;; Generated autoloads from evil-maps.el + +(register-definition-prefixes "evil-maps" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-repeat" "evil-repeat.el" (0 0 0 0)) +;;; Generated autoloads from evil-repeat.el + +(register-definition-prefixes "evil-repeat" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-search" "evil-search.el" (0 0 0 0)) +;;; Generated autoloads from evil-search.el + +(register-definition-prefixes "evil-search" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-states" "evil-states.el" (0 0 0 0)) +;;; Generated autoloads from evil-states.el + +(register-definition-prefixes "evil-states" '("evil-")) + +;;;*** + +;;;### (autoloads nil "evil-types" "evil-types.el" (0 0 0 0)) +;;; Generated autoloads from evil-types.el + +(register-definition-prefixes "evil-types" '("evil-ex-get-optional-register-and-count")) + +;;;*** + +;;;### (autoloads nil "evil-vars" "evil-vars.el" (0 0 0 0)) +;;; Generated autoloads from evil-vars.el + +(register-definition-prefixes "evil-vars" '("evil-")) + +;;;*** + +;;;### (autoloads nil nil ("evil-development.el" "evil-keybindings.el" +;;;;;; "evil-pkg.el" "evil.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; evil-autoloads.el ends here diff --git a/elpa/evil-20220510.2302/evil-command-window.el b/elpa/evil-20220510.2302/evil-command-window.el new file mode 100644 index 0000000..b4c2b1a --- /dev/null +++ b/elpa/evil-20220510.2302/evil-command-window.el @@ -0,0 +1,189 @@ +;;; evil-command-window.el --- Evil command line window implementation -*- lexical-binding: t -*- +;; Author: Emanuel Evans <emanuel.evans at gmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This provides an implementation of the vim command line window for +;; editing and repeating past ex commands and searches. + +;;; Code: + +(require 'evil-vars) +(require 'evil-common) +(require 'evil-search) +(require 'evil-ex) + +(defvar evil-search-module) + +(define-derived-mode evil-command-window-mode fundamental-mode "Evil-cmd" + "Major mode for the Evil command line window." + (auto-fill-mode 0) + (setq-local after-change-functions (cons 'evil-command-window-draw-prefix + after-change-functions))) + +(defun evil-command-window (hist cmd-key execute-fn) + "Open a command line window for HIST with CMD-KEY and EXECUTE-FN. +HIST should be a list of commands. CMD-KEY should be the string of +the key whose history is being shown (one of \":\", \"/\", or +\"?\"). EXECUTE-FN should be a function of one argument to +execute on the result that the user selects." + (when (eq major-mode 'evil-command-window-mode) + (user-error "Cannot recursively open command line window")) + (dolist (win (window-list)) + (when (equal (buffer-name (window-buffer win)) + "*Command Line*") + (kill-buffer (window-buffer win)) + (delete-window win))) + (split-window nil + (unless (zerop evil-command-window-height) + evil-command-window-height) + 'above) + (setq evil-command-window-current-buffer (current-buffer)) + (ignore-errors (kill-buffer "*Command Line*")) + (switch-to-buffer "*Command Line*") + (setq-local evil-command-window-execute-fn execute-fn) + (setq-local evil-command-window-cmd-key cmd-key) + (evil-command-window-mode) + (evil-command-window-insert-commands hist)) + +(defun evil-command-window-ex (&optional current-command execute-fn) + "Open a command line window for editing and executing ex commands. +If CURRENT-COMMAND is present, it will be inserted under the +cursor as the current command to be edited. If EXECUTE-FN is given, +it will be used as the function to execute instead of +`evil-command-window-ex-execute', the default." + (interactive) + (evil-command-window (cons (or current-command "") evil-ex-history) + ":" + (or execute-fn 'evil-command-window-ex-execute))) + +(defun evil-ex-command-window () + "Start command window with ex history and current minibuffer content." + (interactive) + (let ((current (minibuffer-contents)) + (config (current-window-configuration))) + (evil-ex-teardown) + (select-window (minibuffer-selected-window) t) + (evil-command-window-ex current (apply-partially 'evil-ex-command-window-execute config)))) + +(defun evil-ex-search-command-window () + "Start command window with search history and current minibuffer content." + (interactive) + (let ((current (minibuffer-contents)) + (config (current-window-configuration))) + (select-window (minibuffer-selected-window) t) + (evil-command-window (cons current evil-ex-search-history) + (evil-search-prompt (eq evil-ex-search-direction 'forward)) + (apply-partially 'evil-ex-command-window-execute config)))) + +(defun evil-command-window-execute () + "Execute the command under the cursor in the appropriate buffer. +The local var `evil-command-window-execute-fn' determines which +function to execute." + (interactive) + (let ((result (buffer-substring (line-beginning-position) + (line-end-position))) + (execute-fn evil-command-window-execute-fn) + (command-window (get-buffer-window))) + (select-window (previous-window)) + (unless (equal evil-command-window-current-buffer (current-buffer)) + (user-error "Originating buffer is no longer active")) + (kill-buffer "*Command Line*") + (delete-window command-window) + (funcall execute-fn result) + (setq evil-command-window-current-buffer nil))) + +(defun evil-command-window-ex-execute (result) + "Execute RESULT as an ex command in the appropriate buffer." + (unless (string-match-p "^ *$" result) + (unless (equal result (car evil-ex-history)) + (setq evil-ex-history (cons result evil-ex-history))) + (let ((evil-ex-current-buffer evil-command-window-current-buffer)) + (evil-ex-execute result)))) + +(defun evil-command-window-search-forward () + "Open a command line window for forward searches." + (interactive) + (evil-command-window (cons "" + (if (eq evil-search-module 'evil-search) + evil-ex-search-history + evil-search-forward-history)) + "/" + (lambda (result) + (evil-command-window-search-execute result t)))) + +(defun evil-command-window-search-backward () + "Open a command line window for backward searches." + (interactive) + (evil-command-window (cons "" + (if (eq evil-search-module 'evil-search) + evil-ex-search-history + evil-search-backward-history)) + "?" + (lambda (result) + (evil-command-window-search-execute result nil)))) + +(defun evil-command-window-search-execute (result forward) + "Search for RESULT using FORWARD to determine direction." + (unless (zerop (length result)) + + (if (eq evil-search-module 'evil-search) + (progn + (setq evil-ex-search-pattern (evil-ex-make-search-pattern result) + evil-ex-search-direction (if forward 'forward 'backward)) + (unless (equal result (car-safe evil-ex-search-history)) + (push result evil-ex-search-history)) + (evil-ex-search)) + (if forward + (unless (equal result (car-safe evil-search-forward-history)) + (push result evil-search-forward-history)) + (unless (equal result (car-safe evil-search-backward-history)) + (push result evil-search-backward-history))) + (evil-search result forward evil-regexp-search)))) + +(defun evil-command-window-draw-prefix (&rest ignored) + "Display `evil-command-window-cmd-key' as a prefix to the current line. +Parameters passed in through IGNORED are ignored." + (let ((prefix (propertize evil-command-window-cmd-key + 'font-lock-face 'minibuffer-prompt))) + (set-text-properties (line-beginning-position) (line-beginning-position 2) + (list 'line-prefix prefix)))) + +(defun evil-command-window-insert-commands (hist) + "Insert the commands in HIST." + (let ((inhibit-modification-hooks t)) + (mapc #'(lambda (cmd) (insert cmd) (newline)) hist) + (reverse-region (point-min) (point-max))) + (let ((prefix (propertize evil-command-window-cmd-key + 'font-lock-face 'minibuffer-prompt))) + (set-text-properties (point-min) (point-max) (list 'line-prefix prefix))) + (goto-char (point-max)) + (when (and (bolp) (not (bobp))) (backward-char)) + (evil-adjust-cursor)) + +(provide 'evil-command-window) + +;;; evil-command-window.el ends here diff --git a/elpa/evil-20220510.2302/evil-command-window.elc b/elpa/evil-20220510.2302/evil-command-window.elc Binary files differnew file mode 100644 index 0000000..886eccf --- /dev/null +++ b/elpa/evil-20220510.2302/evil-command-window.elc diff --git a/elpa/evil-20220510.2302/evil-commands.el b/elpa/evil-20220510.2302/evil-commands.el new file mode 100644 index 0000000..d6b2e62 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-commands.el @@ -0,0 +1,4908 @@ +;;; evil-commands.el --- Evil commands and operators -*- lexical-binding: t -*- +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-common) +(require 'evil-digraphs) +(require 'evil-search) +(require 'evil-states) +(require 'evil-ex) +(require 'evil-types) +(require 'evil-command-window) +(require 'evil-jumps) +(require 'evil-vars) +(require 'flyspell) +(require 'cl-lib) +(require 'reveal) + +(declare-function imenu--in-alist "imenu") + +;;; Motions + +;; Movement commands, or motions, are defined with the macro +;; `evil-define-motion'. A motion is a command with an optional +;; argument COUNT (interactively accessed by the code "<c>"). +;; It may specify the :type command property (e.g., :type line), +;; which determines how it is handled by an operator command. +;; Furthermore, the command must have the command properties +;; :keep-visual t and :repeat motion; these are automatically +;; set by the `evil-define-motion' macro. + +;;; Code: + +(evil-define-motion evil-forward-char (count &optional crosslines noerror) + "Move cursor to the right by COUNT characters. +Movement is restricted to the current line unless CROSSLINES is non-nil. +If NOERROR is non-nil, don't signal an error upon reaching the end +of the line or the buffer; just return nil." + :type exclusive + (interactive "<c>" (list evil-cross-lines + (evil-kbd-macro-suppress-motion-error))) + (cond + (noerror + (condition-case nil + (evil-forward-char count crosslines nil) + (error nil))) + ((not crosslines) + ;; for efficiency, narrow the buffer to the projected + ;; movement before determining the current line + (evil-with-restriction + (point) + (save-excursion + (evil-forward-char (1+ (or count 1)) t t) + (point)) + (condition-case err + (evil-narrow-to-line + (evil-forward-char count t noerror)) + (error + ;; Restore the previous command (this one never happend). + ;; Actually, this preserves the current column if the + ;; previous command was `evil-next-line' or + ;; `evil-previous-line'. + (setq this-command last-command) + (signal (car err) (cdr err)))))) + (t + (evil-motion-loop (nil (or count 1)) + (forward-char) + ;; don't put the cursor on a newline + (when (and (not evil-move-beyond-eol) + (not (evil-visual-state-p)) + (not (evil-operator-state-p)) + (eolp) (not (eobp)) (not (bolp))) + (forward-char)))))) + +(evil-define-motion evil-backward-char (count &optional crosslines noerror) + "Move cursor to the left by COUNT characters. +Movement is restricted to the current line unless CROSSLINES is non-nil. +If NOERROR is non-nil, don't signal an error upon reaching the beginning +of the line or the buffer; just return nil." + :type exclusive + (interactive "<c>" (list evil-cross-lines + (evil-kbd-macro-suppress-motion-error))) + (cond + (noerror + (condition-case nil + (evil-backward-char count crosslines nil) + (error nil))) + ((not crosslines) + ;; restrict movement to the current line + (evil-with-restriction + (save-excursion + (evil-backward-char (1+ (or count 1)) t t) + (point)) + (1+ (point)) + (condition-case err + (evil-narrow-to-line + (evil-backward-char count t noerror)) + (error + ;; Restore the previous command (this one never happened). + ;; Actually, this preserves the current column if the + ;; previous command was `evil-next-line' or + ;; `evil-previous-line'. + (setq this-command last-command) + (signal (car err) (cdr err)))))) + (t + (evil-motion-loop (nil (or count 1)) + (backward-char) + ;; don't put the cursor on a newline + (unless (or (evil-visual-state-p) (evil-operator-state-p)) + (evil-adjust-cursor)))))) + +(evil-define-motion evil-next-line (count) + "Move the cursor COUNT lines down." + :type line + (let (line-move-visual) + (evil-line-move (or count 1)))) + +(evil-define-motion evil-previous-line (count) + "Move the cursor COUNT lines up." + :type line + (let (line-move-visual) + (evil-line-move (- (or count 1))))) + +(evil-define-motion evil-next-visual-line (count) + "Move the cursor COUNT screen lines down." + :type exclusive + (let ((line-move-visual t)) + (evil-line-move (or count 1)))) + +(evil-define-motion evil-previous-visual-line (count) + "Move the cursor COUNT screen lines up." + :type exclusive + (let ((line-move-visual t)) + (evil-line-move (- (or count 1))))) + +;; used for repeated commands like "dd" +(evil-define-motion evil-line (count) + "Move COUNT - 1 lines down." + :type line + (let (line-move-visual) + ;; Catch bob and eob errors. These are caused when not moving + ;; point starting in the first or last line, respectively. In this + ;; case the current line should be selected. + (condition-case _err + (evil-line-move (1- (or count 1))) + ((beginning-of-buffer end-of-buffer))))) + +(evil-define-motion evil-line-or-visual-line (count) + "Move COUNT - 1 lines down." + :type screen-line + (let ((line-move-visual (and evil-respect-visual-line-mode + visual-line-mode))) + ;; Catch bob and eob errors. These are caused when not moving + ;; point starting in the first or last line, respectively. In this + ;; case the current line should be selected. + (condition-case _err + (evil-line-move (1- (or count 1))) + ((beginning-of-buffer end-of-buffer))))) + +(evil-define-motion evil-beginning-of-line () + "Move the cursor to the beginning of the current line." + :type exclusive + (move-beginning-of-line nil)) + +(evil-define-motion evil-end-of-line (count) + "Move the cursor to the end of the current line. +If COUNT is given, move COUNT - 1 lines downward first." + :type inclusive + (move-end-of-line count) + (when evil-track-eol + (setq temporary-goal-column most-positive-fixnum + this-command 'next-line)) + (if (evil-visual-state-p) + (when evil-v$-excludes-newline + (let ((evil-move-beyond-eol nil)) + (evil-adjust-cursor))) + (evil-adjust-cursor) + (when (eolp) + ;; prevent "c$" and "d$" from deleting blank lines + (setq evil-this-type 'exclusive)))) + +(evil-define-motion evil-beginning-of-visual-line () + "Move the cursor to the first character of the current screen line." + :type exclusive + (if (fboundp 'beginning-of-visual-line) + (beginning-of-visual-line) + (beginning-of-line))) + +(evil-define-motion evil-end-of-visual-line (count) + "Move the cursor to the last character of the current screen line. +If COUNT is given, move COUNT - 1 screen lines downward first." + :type inclusive + (if (fboundp 'end-of-visual-line) + (end-of-visual-line count) + (end-of-line count))) + +(evil-define-motion evil-end-of-line-or-visual-line (count) + "Move the cursor to the last character of the current screen +line if `visual-line-mode' is active and +`evil-respect-visual-line-mode' is non-nil. If COUNT is given, +move COUNT - 1 screen lines downward first." + :type inclusive + (if (and (fboundp 'end-of-visual-line) + evil-respect-visual-line-mode + visual-line-mode) + (end-of-visual-line count) + (evil-end-of-line count))) + +(evil-define-motion evil-middle-of-visual-line () + "Move the cursor to the middle of the current visual line." + :type exclusive + (beginning-of-visual-line) + (evil-with-restriction + nil + (save-excursion (end-of-visual-line) (point)) + (move-to-column (+ (current-column) + -1 + (/ (with-no-warnings (window-body-width)) 2))))) + +(evil-define-motion evil-percentage-of-line (count) + "Move the cursor to COUNT % of the width of the current line. +If no COUNT is given, default to 50%." + :type exclusive + (let ((line-length (- (line-end-position) + (line-beginning-position) + (if evil-move-beyond-eol -1 0)))) + (move-to-column (truncate (* line-length (/ (or count 50) 100.0)))))) + +(evil-define-motion evil-first-non-blank () + "Move the cursor to the first non-blank character of the current line." + :type exclusive + (evil-narrow-to-line (back-to-indentation))) + +(evil-define-motion evil-last-non-blank (count) + "Move the cursor to the last non-blank character of the current line. +If COUNT is given, move COUNT - 1 lines downward first." + :type inclusive + (goto-char + (save-excursion + (evil-move-beginning-of-line count) + (if (re-search-forward "[ \t]*$") + (max (line-beginning-position) + (1- (match-beginning 0))) + (line-beginning-position))))) + +(evil-define-motion evil-first-non-blank-of-visual-line () + "Move the cursor to the first non blank character +of the current screen line." + :type exclusive + (evil-beginning-of-visual-line) + (skip-chars-forward " \t\r")) + +(evil-define-motion evil-next-line-first-non-blank (count) + "Move the cursor COUNT lines down on the first non-blank character." + :type line + (let ((this-command this-command)) + (evil-next-line (or count 1))) + (evil-first-non-blank)) + +(evil-define-motion evil-next-line-1-first-non-blank (count) + "Move the cursor COUNT-1 lines down on the first non-blank character." + :type line + (let ((this-command this-command)) + (evil-next-line (1- (or count 1)))) + (evil-first-non-blank)) + +(evil-define-motion evil-previous-line-first-non-blank (count) + "Move the cursor COUNT lines up on the first non-blank character." + :type line + (let ((this-command this-command)) + (evil-previous-line (or count 1))) + (evil-first-non-blank)) + +(evil-define-motion evil-goto-line (count) + "Go to line COUNT. By default the last line." + :jump t + :type line + (evil-ensure-column + (if (null count) + (goto-char (point-max)) + (goto-char (point-min)) + (forward-line (1- count))))) + +(evil-define-motion evil-goto-first-line (count) + "Go to line COUNT. By default the first line." + :jump t + :type line + (evil-goto-line (or count 1))) + +(evil-define-motion evil-forward-word-begin (count &optional bigword) + "Move the cursor to the beginning of the COUNT-th next word. +If BIGWORD is non-nil, move by WORDS. + +If this command is called in operator-pending state it behaves +differently. If point reaches the beginning of a word on a new +line point is moved back to the end of the previous line. + +If called after a change operator, i.e. cw or cW, +`evil-want-change-word-to-end' is non-nil and point is on a word, +then both behave like ce or cE. + +If point is at the end of the buffer and cannot be moved signal +'end-of-buffer is raised. +" + :type exclusive + (let ((thing (if bigword 'evil-WORD 'evil-word)) + (orig (point)) + (count (or count 1))) + (evil-signal-at-bob-or-eob count) + (cond + ;; default motion, beginning of next word + ((not (evil-operator-state-p)) + (evil-forward-beginning thing count)) + ;; the evil-change operator, maybe behave like ce or cE + ((and evil-want-change-word-to-end + (memq evil-this-operator evil-change-commands) + (< orig (or (cdr-safe (bounds-of-thing-at-point thing)) orig))) + ;; forward-thing moves point to the correct position because + ;; this is an exclusive motion + (forward-thing thing count)) + ;; operator state + (t + (prog1 (evil-forward-beginning thing count) + ;; if we reached the beginning of a word on a new line in + ;; Operator-Pending state, go back to the end of the previous + ;; line + (when (and (> (line-beginning-position) orig) + (looking-back "^[[:space:]]*" (line-beginning-position))) + ;; move cursor back as long as the line contains only + ;; whitespaces and is non-empty + (evil-move-end-of-line 0) + ;; skip non-empty lines containing only spaces + (while (and (looking-back "^[[:space:]]+$" (line-beginning-position)) + (not (<= (line-beginning-position) orig))) + (evil-move-end-of-line 0)) + ;; but if the previous line is empty, delete this line + (when (bolp) (forward-char)))))))) + +(evil-define-motion evil-forward-word-end (count &optional bigword) + "Move the cursor to the end of the COUNT-th next word. +If BIGWORD is non-nil, move by WORDS." + :type inclusive + (let ((thing (if bigword 'evil-WORD 'evil-word)) + (count (or count 1))) + (evil-signal-at-bob-or-eob count) + ;; Evil special behaviour: e or E on a one-character word in + ;; operator state does not move point + (unless (and (evil-operator-state-p) + (= 1 count) + (let ((bnd (bounds-of-thing-at-point thing))) + (and bnd + (= (car bnd) (point)) + (= (cdr bnd) (1+ (point))))) + (looking-at "[[:word:]]")) + (evil-forward-end thing count)))) + +(evil-define-motion evil-backward-word-begin (count &optional bigword) + "Move the cursor to the beginning of the COUNT-th previous word. +If BIGWORD is non-nil, move by WORDS." + :type exclusive + (let ((thing (if bigword 'evil-WORD 'evil-word))) + (evil-signal-at-bob-or-eob (- (or count 1))) + (evil-backward-beginning thing count))) + +(evil-define-motion evil-backward-word-end (count &optional bigword) + "Move the cursor to the end of the COUNT-th previous word. +If BIGWORD is non-nil, move by WORDS." + :type inclusive + (let ((thing (if bigword 'evil-WORD 'evil-word))) + (evil-signal-at-bob-or-eob (- (or count 1))) + (evil-backward-end thing count))) + +(evil-define-motion evil-forward-WORD-begin (count) + "Move the cursor to the beginning of the COUNT-th next WORD." + :type exclusive + (evil-forward-word-begin count t)) + +(evil-define-motion evil-forward-WORD-end (count) + "Move the cursor to the end of the COUNT-th next WORD." + :type inclusive + (evil-forward-word-end count t)) + +(evil-define-motion evil-backward-WORD-begin (count) + "Move the cursor to the beginning of the COUNT-th previous WORD." + :type exclusive + (evil-backward-word-begin count t)) + +(evil-define-motion evil-backward-WORD-end (count) + "Move the cursor to the end of the COUNT-th previous WORD." + :type inclusive + (evil-backward-word-end count t)) + +;; section movement +(evil-define-motion evil-forward-section-begin (count) + "Move the cursor to the beginning of the COUNT-th next section." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob count) + (evil-forward-beginning 'evil-defun count)) + +(evil-define-motion evil-forward-section-end (count) + "Move the cursor to the end of the COUNT-th next section." + :jump t + :type inclusive + (evil-signal-at-bob-or-eob count) + (evil-forward-end 'evil-defun count) + (unless (eobp) (forward-line))) + +(evil-define-motion evil-backward-section-begin (count) + "Move the cursor to the beginning of the COUNT-th previous section." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob (- (or count 1))) + (evil-backward-beginning 'evil-defun count)) + +(evil-define-motion evil-backward-section-end (count) + "Move the cursor to the end of the COUNT-th previous section." + :jump t + :type inclusive + (evil-signal-at-bob-or-eob (- (or count 1))) + (end-of-line -1) + (evil-backward-end 'evil-defun count) + (unless (eobp) (forward-line))) + +(evil-define-motion evil-forward-sentence-begin (count) + "Move to the next COUNT-th beginning of a sentence or end of a paragraph." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob count) + (evil-forward-nearest count + #'(lambda (_cnt) + (evil-forward-beginning 'evil-sentence)) + #'evil-forward-paragraph)) + +(evil-define-motion evil-backward-sentence-begin (count) + "Move to the previous COUNT-th beginning of a sentence or paragraph." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob (- (or count 1))) + (evil-forward-nearest (- (or count 1)) + #'(lambda (_cnt) + (evil-backward-beginning 'evil-sentence)) + #'(lambda (_cnt) + (evil-backward-paragraph)))) + +(evil-define-motion evil-forward-paragraph (count) + "Move to the end of the COUNT-th next paragraph." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob count) + (evil-forward-end 'evil-paragraph count) + (unless (eobp) (forward-line))) + +(evil-define-motion evil-backward-paragraph (count) + "Move to the beginning of the COUNT-th previous paragraph." + :jump t + :type exclusive + (evil-signal-at-bob-or-eob (- (or count 1))) + (unless (eobp) (forward-line)) + (evil-backward-beginning 'evil-paragraph count) + (unless (bobp) (forward-line -1))) + +(defvar hif-ifx-else-endif-regexp) +(evil-define-motion evil-jump-item (count) + "Find the next item in this line after or under the cursor +and jump to the corresponding one." + :jump t + :type inclusive + (cond + ;; COUNT% jumps to a line COUNT percentage down the file + (count + (evil-ensure-column + (goto-char + (evil-normalize-position + (let ((size (- (point-max) (point-min)))) + (+ (point-min) + (if (> size 80000) + (* count (/ size 100)) + (/ (* count size) 100))))))) + (setq evil-this-type 'line)) + ((and (evil-looking-at-start-comment t) + (let ((pnt (point))) + (forward-comment 1) + (or (not (bolp)) + (prog1 nil (goto-char pnt))))) + (backward-char)) + ((and (not (eolp)) (evil-looking-at-end-comment t)) + (forward-comment -1)) + ((and + (memq major-mode '(c-mode c++-mode)) + (require 'hideif nil t) + (with-no-warnings + (let* ((hif-else-regexp (concat hif-cpp-prefix "\\(?:else\\|elif[ \t]+\\)")) + (hif-ifx-else-endif-regexp + (concat hif-ifx-regexp "\\|" hif-else-regexp "\\|" hif-endif-regexp))) + (cond + ((save-excursion (beginning-of-line) (or (hif-looking-at-ifX) (hif-looking-at-else))) + (hif-find-next-relevant) + (while (hif-looking-at-ifX) + (hif-ifdef-to-endif) + (hif-find-next-relevant)) + t) + ((save-excursion (beginning-of-line) (hif-looking-at-endif)) + (hif-endif-to-ifdef) + t)))))) + (t + (let* ((open (point-max)) + (close (point-max)) + (open-pair (condition-case nil + (save-excursion + ;; consider the character right before eol given that + ;; point may be placed there, e.g. in visual state + (when (and (eolp) (not (bolp))) + (backward-char)) + (setq open (1- (scan-lists (point) 1 -1))) + (when (< open (line-end-position)) + (goto-char open) + (forward-list) + (1- (point)))) + (error nil))) + (close-pair (condition-case nil + (save-excursion + ;; consider the character right before eol given that + ;; point may be placed there, e.g. in visual state + (when (and (eolp) (not (bolp))) + (backward-char)) + (setq close (1- (scan-lists (point) 1 1))) + (when (< close (line-end-position)) + (goto-char (1+ close)) + (backward-list) + (point))) + (error nil)))) + (cond + ((not (or open-pair close-pair)) + ;; nothing found, check if we are inside a string + (let ((pnt (point)) + (bnd (bounds-of-thing-at-point 'evil-string))) + (if (not (and bnd (< (point) (cdr bnd)))) + ;; no, then we really failed + (user-error "No matching item found on the current line") + ;; yes, go to the end of the string and try again + (let ((endstr (cdr bnd))) + (when (or (save-excursion + (goto-char endstr) + (let ((b (bounds-of-thing-at-point 'evil-string))) + (and b (< (point) (cdr b))))) ; not at end of string + (condition-case nil + (progn + (goto-char endstr) + (evil-jump-item) + nil) + (error t))) + ;; failed again, go back to original point + (goto-char pnt) + (user-error "No matching item found on the current line")))))) + ((< open close) (goto-char open-pair)) + (t (goto-char close-pair))))))) + +(defun evil--flyspell-overlays-in-p (beg end) + (let ((ovs (overlays-in beg end)) + done) + (while (and ovs (not done)) + (when (flyspell-overlay-p (car ovs)) + (setq done t)) + (setq ovs (cdr ovs))) + done)) + +(defun evil--flyspell-overlay-at (pos forwardp) + (when (not forwardp) + (setq pos (max (1- pos) (point-min)))) + (let ((ovs (overlays-at pos)) + done) + (while (and ovs (not done)) + (if (flyspell-overlay-p (car ovs)) + (setq done t) + (setq ovs (cdr ovs)))) + (when done + (car ovs)))) + +(defun evil--flyspell-overlay-after (pos limit forwardp) + (let (done) + (while (and (if forwardp + (< pos limit) + (> pos limit)) + (not done)) + (let ((ov (evil--flyspell-overlay-at pos forwardp))) + (when ov + (setq done ov))) + (setq pos (if forwardp + (next-overlay-change pos) + (previous-overlay-change pos)))) + done)) + +(defun evil--next-flyspell-error (forwardp) + (when (evil--flyspell-overlays-in-p (point-min) (point-max)) + (let ((pos (point)) + limit + ov) + (when (evil--flyspell-overlay-at pos forwardp) + (if (/= pos (point-min)) + (setq pos (save-excursion (goto-char pos) + (forward-word (if forwardp 1 -1)) + (point))) + (setq pos (point-max)))) + (setq limit (if forwardp (point-max) (point-min)) + ov (evil--flyspell-overlay-after pos limit forwardp)) + (if ov + (goto-char (overlay-start ov)) + (when evil-search-wrap + (setq limit pos + pos (if forwardp (point-min) (point-max)) + ov (evil--flyspell-overlay-after pos limit forwardp)) + (when ov + (goto-char (overlay-start ov)))))))) + +(evil-define-motion evil-next-flyspell-error (count) + "Go to the COUNT'th spelling mistake after point." + (interactive "p") + (dotimes (_ count) + (evil--next-flyspell-error t))) + +(evil-define-motion evil-prev-flyspell-error (count) + "Go to the COUNT'th spelling mistake preceding point." + (interactive "p") + (dotimes (_ count) + (evil--next-flyspell-error nil))) + +(evil-define-motion evil-previous-open-paren (count) + "Go to [count] previous unmatched '('." + :type exclusive + (evil-up-paren ?\( ?\) (- (or count 1)))) + +(evil-define-motion evil-next-close-paren (count) + "Go to [count] next unmatched ')'." + :type exclusive + (forward-char) + (evil-up-paren ?\( ?\) (or count 1)) + (backward-char)) + +(evil-define-motion evil-previous-open-brace (count) + "Go to [count] previous unmatched '{'." + :type exclusive + (evil-up-paren ?{ ?} (- (or count 1)))) + +(evil-define-motion evil-next-close-brace (count) + "Go to [count] next unmatched '}'." + :type exclusive + (forward-char) + (evil-up-paren ?{ ?} (or count 1)) + (backward-char)) + +(defun evil--lowercase-markers () + "Get all lowercase markers." + (cl-remove-if-not (lambda (x) (and (markerp (cdr x)) + (<= ?a (car x) ?z))) + evil-markers-alist)) + +(defun evil--next-mark (forwardp) + "Move to next lowercase mark. +Move forward if FORWARDP is truthy or backward if falsey. +Loop back to the top of buffer if the end is reached." + (let ((pos (point)) + (sorted-markers (sort (evil--lowercase-markers) + (lambda (a b) (< (cdr a) (cdr b)))))) + (cond + ((null sorted-markers) + (user-error "No marks in this buffer")) + (forwardp + (let ((next-marker (cl-some (lambda (x) (and (< pos (cdr x)) (cdr x))) + sorted-markers))) + (if next-marker + (goto-char (marker-position next-marker)) + (goto-char (marker-position (cdar sorted-markers)))))) + (t + (let* ((descending-markers (reverse sorted-markers)) + (prev-marker (cl-some (lambda (x) (and (> pos (cdr x)) (cdr x))) + descending-markers))) + (if prev-marker + (goto-char (marker-position prev-marker)) + (goto-char (marker-position (cdar descending-markers))))))))) + +(evil-define-motion evil-next-mark (count) + "Go to [count] next lowercase mark." + :keep-visual t + :repeat nil + :type exclusive + :jump t + (dotimes (_ (or count 1)) + (evil--next-mark t))) + +(evil-define-motion evil-next-mark-line (count) + "Go to [count] line of next lowercase mark after current line." + :keep-visual t + :repeat nil + :type exclusive + :jump t + (if (evil--lowercase-markers) + (dotimes (_ (or count 1)) + (evil-end-of-line) + (evil--next-mark t) + (evil-first-non-blank)) + (user-error "No marks in this buffer"))) + +(evil-define-motion evil-previous-mark (count) + "Go to [count] previous lowercase mark." + :keep-visual t + :repeat nil + :type exclusive + :jump t + (dotimes (_ (or count 1)) + (evil--next-mark nil))) + +(evil-define-motion evil-previous-mark-line (count) + "Go to [count] line of previous lowercase mark before current line." + :keep-visual t + :repeat nil + :type exclusive + :jump t + (if (evil--lowercase-markers) + (dotimes (_ (or count 1)) + (evil-beginning-of-line) + (evil--next-mark nil) + (evil-first-non-blank)) + (user-error "No marks in this buffer"))) + +(evil-define-command evil-set-col-0-mark (beg end mark) + "Set MARK at column 0 of line of END. Default is cursor line." + (interactive "<r><a>") + (if (< 1 (length mark)) + (user-error "Trailing characters") + (save-excursion + (goto-char (if (eobp) end (1- end))) + (evil-beginning-of-line) + (evil-set-marker (string-to-char mark))))) + +(evil-define-motion evil-find-char (count char) + "Move to the next COUNT'th occurrence of CHAR. +Movement is restricted to the current line unless `evil-cross-lines' is non-nil." + :type inclusive + (interactive "<c><C>") + (setq count (or count 1)) + (let ((fwd (> count 0)) + (visual (and evil-respect-visual-line-mode + visual-line-mode))) + (setq evil-last-find (list #'evil-find-char char fwd)) + (when fwd (evil-forward-char 1 evil-cross-lines)) + (let ((case-fold-search nil)) + (unless (prog1 + (search-forward (char-to-string char) + (cond (evil-cross-lines + nil) + ((and fwd visual) + (save-excursion + (end-of-visual-line) + (point))) + (fwd + (line-end-position)) + (visual + (save-excursion + (beginning-of-visual-line) + (point))) + (t + (line-beginning-position))) + t count) + (when fwd (backward-char))) + (user-error "Can't find %c" char))))) + +(evil-define-motion evil-find-char-backward (count char) + "Move to the previous COUNT'th occurrence of CHAR." + :type exclusive + (interactive "<c><C>") + (evil-find-char (- (or count 1)) char)) + +(evil-define-motion evil-find-char-to (count char) + "Move before the next COUNT'th occurrence of CHAR." + :type inclusive + (interactive "<c><C>") + (unwind-protect + (progn + (evil-find-char count char) + (if (> (or count 1) 0) + (backward-char) + (forward-char))) + (setcar evil-last-find #'evil-find-char-to))) + +(evil-define-motion evil-find-char-to-backward (count char) + "Move before the previous COUNT'th occurrence of CHAR." + :type exclusive + (interactive "<c><C>") + (evil-find-char-to (- (or count 1)) char)) + +(evil-define-motion evil-repeat-find-char (count) + "Repeat the last find COUNT times." + :type inclusive + (setq count (or count 1)) + (if evil-last-find + (let ((cmd (car evil-last-find)) + (char (nth 1 evil-last-find)) + (fwd (nth 2 evil-last-find)) + evil-last-find) + ;; ensure count is non-negative + (when (< count 0) + (setq count (- count) + fwd (not fwd))) + ;; skip next character when repeating t or T + (and (eq cmd #'evil-find-char-to) + evil-repeat-find-to-skip-next + (= count 1) + (or (and fwd (= (char-after (1+ (point))) char)) + (and (not fwd) (= (char-before) char))) + (setq count (1+ count))) + (funcall cmd (if fwd count (- count)) char) + (unless (nth 2 evil-last-find) + (setq evil-this-type 'exclusive))) + (user-error "No previous search"))) + +(evil-define-motion evil-repeat-find-char-reverse (count) + "Repeat the last find COUNT times in the opposite direction." + :type inclusive + (evil-repeat-find-char (- (or count 1)))) + +;; ceci n'est pas une pipe +(evil-define-motion evil-goto-column (count) + "Go to column COUNT on the current line. +Columns are counted from zero." + :type exclusive + (move-to-column (or count 0))) + +(evil-define-command evil-goto-mark (char &optional noerror) + "Go to the marker specified by CHAR." + :keep-visual t + :repeat nil + :type exclusive + :jump t + (interactive (list (read-char))) + (let ((marker (evil-get-marker char))) + (cond + ((markerp marker) + (switch-to-buffer (marker-buffer marker)) + (goto-char (marker-position marker))) + ((numberp marker) + (goto-char marker)) + ((consp marker) + (when (or (find-buffer-visiting (car marker)) + (and (y-or-n-p (format "Visit file %s again? " + (car marker))) + (find-file (car marker)))) + (goto-char (cdr marker)))) + ((not noerror) + (user-error "Marker `%c' is not set%s" char + (if (evil-global-marker-p char) "" + " in this buffer")))))) + +(evil-define-command evil-goto-mark-line (char &optional noerror) + "Go to the line of the marker specified by CHAR." + :keep-visual t + :repeat nil + :type line + :jump t + (interactive (list (read-char))) + (evil-goto-mark char noerror) + (evil-first-non-blank)) + +(evil-define-motion evil-jump-backward (count) + "Go to older position in jump list. +To go the other way, press \ +\\<evil-motion-state-map>\\[evil-jump-forward]." + (evil--jump-backward count)) + +(evil-define-motion evil-jump-forward (count) + "Go to newer position in jump list. +To go the other way, press \ +\\<evil-motion-state-map>\\[evil-jump-backward]." + (evil--jump-forward count)) + +(evil-define-motion evil-jump-backward-swap (count) + "Go to the previous position in jump list. +The current position is placed in the jump list." + (let ((pnt (point))) + (evil--jump-backward 1) + (evil-set-jump pnt))) + +(defvar xref-prompt-for-identifier) +(evil-define-motion evil-jump-to-tag (arg) + "Jump to tag under point. +If called with a prefix argument, provide a prompt +for specifying the tag." + :jump t + (interactive "P") + (cond + ((fboundp 'xref-find-definitions) + (let ((xref-prompt-for-identifier arg)) + (call-interactively #'xref-find-definitions))) + ((fboundp 'find-tag) + (if arg (call-interactively #'find-tag) + (let ((tag (funcall (or find-tag-default-function + (get major-mode 'find-tag-default-function) + #'find-tag-default)))) + (unless tag (user-error "No tag candidate found around point")) + (find-tag tag)))))) + +(evil-define-motion evil-lookup () + "Look up the keyword at point. +Calls `evil-lookup-func'." + (funcall evil-lookup-func)) + +(defun evil-ret-gen (count indent?) + (let* ((field (get-char-property (point) 'field)) + (button (get-char-property (point) 'button)) + (doc (get-char-property (point) 'widget-doc)) + (widget (or field button doc))) + (cond + ((and widget + (fboundp 'widget-type) + (fboundp 'widget-button-press) + (or (and (symbolp widget) + (get widget 'widget-type)) + (and (consp widget) + (get (widget-type widget) 'widget-type)))) + (when (evil-operator-state-p) + (setq evil-inhibit-operator t)) + (when (fboundp 'widget-button-press) + (widget-button-press (point)))) + ((and (fboundp 'button-at) + (fboundp 'push-button) + (button-at (point))) + (when (evil-operator-state-p) + (setq evil-inhibit-operator t)) + (push-button)) + ((or (evil-emacs-state-p) + (and (evil-insert-state-p) + (not buffer-read-only))) + (if (not indent?) + (newline count) + (delete-horizontal-space t) + (newline count) + (indent-according-to-mode))) + (t + (evil-next-line-first-non-blank count))))) + +(evil-define-motion evil-ret (count) + "Move the cursor COUNT lines down. +If point is on a widget or a button, click on it. +In Insert state, insert a newline." + :type line + (evil-ret-gen count nil)) + +(evil-define-motion evil-ret-and-indent (count) + "Move the cursor COUNT lines down. +If point is on a widget or a button, click on it. +In Insert state, insert a newline and indent." + :type line + (evil-ret-gen count t)) + +(evil-define-motion evil-window-top (count) + "Move the cursor to line COUNT from the top of the window." + :jump t + :type line + (evil-ensure-column + (move-to-window-line (max (or count 0) + (if (= (point-min) (window-start)) + 0 + scroll-margin))))) + +(evil-define-motion evil-window-middle () + "Move the cursor to the middle line in the window." + :jump t + :type line + (evil-ensure-column + (move-to-window-line + (/ (1+ (save-excursion (move-to-window-line -1))) 2)))) + +(evil-define-motion evil-window-bottom (count) + "Move the cursor to line COUNT from the bottom of the window." + :jump t + :type line + (evil-ensure-column + (move-to-window-line (- (max (or count 1) (1+ scroll-margin)))))) + +;; scrolling +(evil-define-command evil-scroll-line-up (count) + "Scrolls the window COUNT lines upwards." + :repeat nil + :keep-visual t + (interactive "p") + (let ((scroll-preserve-screen-position nil)) + (scroll-down count))) + +(evil-define-command evil-scroll-line-down (count) + "Scrolls the window COUNT lines downwards." + :repeat nil + :keep-visual t + (interactive "p") + (let ((scroll-preserve-screen-position nil)) + (scroll-up count))) + +(evil-define-command evil-scroll-count-reset () + "Sets `evil-scroll-count' to 0. +`evil-scroll-up' and `evil-scroll-down' will scroll +for a half of the screen(default)." + :repeat nil + :keep-visual t + (interactive) + (setq evil-scroll-count 0)) + +(evil-define-command evil-scroll-up (count) + "Scrolls the window and the cursor COUNT lines upwards. +If COUNT is not specified the function scrolls down +`evil-scroll-count', which is the last used count. +If the scroll count is zero the command scrolls half the screen." + :repeat nil + :keep-visual t + (interactive "<c>") + (evil-ensure-column + (setq count (or count (max 0 evil-scroll-count)) + evil-scroll-count count + this-command 'next-line) + (when (= (point-min) (line-beginning-position)) + (signal 'beginning-of-buffer nil)) + (when (zerop count) + (setq count (/ (window-body-height) 2))) + (let ((xy (evil-posn-x-y (posn-at-point)))) + (condition-case nil + (progn + (scroll-down count) + (goto-char (posn-point (posn-at-x-y (car xy) (cdr xy))))) + (beginning-of-buffer + (condition-case nil + (with-no-warnings (previous-line count)) + (beginning-of-buffer))))))) + +(evil-define-command evil-scroll-down (count) + "Scrolls the window and the cursor COUNT lines downwards. +If COUNT is not specified the function scrolls down +`evil-scroll-count', which is the last used count. +If the scroll count is zero the command scrolls half the screen." + :repeat nil + :keep-visual t + (interactive "<c>") + (evil-ensure-column + (setq count (or count (max 0 evil-scroll-count)) + evil-scroll-count count + this-command 'next-line) + (when (eobp) (signal 'end-of-buffer nil)) + (when (zerop count) + (setq count (/ (window-body-height) 2))) + ;; BUG #660: First check whether the eob is visible. + ;; In that case we do not scroll but merely move point. + (if (<= (point-max) (window-end)) + (with-no-warnings (next-line count nil)) + (let ((xy (evil-posn-x-y (posn-at-point)))) + (condition-case nil + (progn + (scroll-up count) + (let* ((wend (window-end nil t)) + (p (posn-at-x-y (car xy) (cdr xy))) + (margin (max 0 (- scroll-margin + (cdr (posn-col-row p)))))) + (goto-char (posn-point p)) + ;; ensure point is not within the scroll-margin + (when (> margin 0) + (with-no-warnings (next-line margin)) + (recenter scroll-margin)) + (when (<= (point-max) wend) + (save-excursion + (goto-char (point-max)) + (recenter (- (max 1 scroll-margin))))))) + (end-of-buffer + (goto-char (point-max)) + (recenter (- (max 1 scroll-margin))))))))) + +(evil-define-command evil-scroll-page-up (count) + "Scrolls the window COUNT pages upwards." + :repeat nil + :keep-visual t + (interactive "p") + (evil-ensure-column + (dotimes (i count) + (condition-case err + (scroll-down nil) + (beginning-of-buffer + (if (and (bobp) (zerop i)) + (signal (car err) (cdr err)) + (goto-char (point-min)))))))) + +(evil-define-command evil-scroll-page-down (count) + "Scrolls the window COUNT pages downwards." + :repeat nil + :keep-visual t + (interactive "p") + (evil-ensure-column + (dotimes (i count) + (condition-case err + (scroll-up nil) + (end-of-buffer + (if (and (eobp) (zerop i)) + (signal (car err) (cdr err)) + (goto-char (point-max)))))))) + +(evil-define-command evil-scroll-line-to-top (count) + "Scrolls line number COUNT (or the cursor line) to the top of the window." + :repeat nil + :keep-visual t + (interactive "<c>") + (evil-save-column + (let ((line (or count (line-number-at-pos (point))))) + (goto-char (point-min)) + (forward-line (1- line))) + (recenter (1- (max 1 scroll-margin))))) + +(evil-define-command evil-scroll-line-to-center (count) + "Scrolls line number COUNT (or the cursor line) to the center of the window." + :repeat nil + :keep-visual t + (interactive "<c>") + (evil-save-column + (when count + (goto-char (point-min)) + (forward-line (1- count))) + (recenter nil))) + +(evil-define-command evil-scroll-line-to-bottom (count) + "Scrolls line number COUNT (or the cursor line) to the bottom of the window." + :repeat nil + :keep-visual t + (interactive "<c>") + (evil-save-column + (let ((line (or count (line-number-at-pos (point))))) + (goto-char (point-min)) + (forward-line (1- line))) + (recenter (- (max 1 scroll-margin))))) + +(evil-define-command evil-scroll-bottom-line-to-top (count) + "Scrolls the line right below the window, +or line COUNT to the top of the window." + :repeat nil + :keep-visual t + (interactive "<c>") + (if count + (progn + (goto-char (point-min)) + (forward-line (1- count))) + (goto-char (window-end)) + (evil-move-cursor-back)) + (recenter (1- (max 0 scroll-margin))) + (evil-first-non-blank)) + +(evil-define-command evil-scroll-top-line-to-bottom (count) + "Scrolls the line right below the window, +or line COUNT to the top of the window." + :repeat nil + :keep-visual t + (interactive "<c>") + (if count + (progn + (goto-char (point-min)) + (forward-line (1- count))) + (goto-char (window-start))) + (recenter (- (max 1 scroll-margin))) + (evil-first-non-blank)) + +(evil-define-command evil-scroll-left (count) + "Scrolls the window COUNT half-screenwidths to the left." + :repeat nil + :keep-visual t + (interactive "p") + (evil-with-hproject-point-on-window + (scroll-right (* count (/ (window-width) 2))))) + +(evil-define-command evil-scroll-right (count) + "Scrolls the window COUNT half-screenwidths to the right." + :repeat nil + :keep-visual t + (interactive "p") + (evil-with-hproject-point-on-window + (scroll-left (* count (/ (window-width) 2))))) + +(evil-define-command evil-scroll-column-left (count) + "Scrolls the window COUNT columns to the left." + :repeat nil + :keep-visual t + (interactive "p") + (evil-with-hproject-point-on-window + (scroll-right count))) + +(evil-define-command evil-scroll-column-right (count) + "Scrolls the window COUNT columns to the right." + :repeat nil + :keep-visual t + (interactive "p") + (evil-with-hproject-point-on-window + (scroll-left count))) + +;;; Text objects + +;; Text objects are defined with `evil-define-text-object'. In Visual +;; state, they modify the current selection; in Operator-Pending +;; state, they return a pair of buffer positions. Outer text objects +;; are bound in the keymap `evil-outer-text-objects-map', and inner +;; text objects are bound in `evil-inner-text-objects-map'. +;; +;; Common text objects like words, WORDS, paragraphs and sentences are +;; defined via a corresponding move-function. This function must have +;; the following properties: +;; +;; 1. Take exactly one argument, the count. +;; 2. When the count is positive, move point forward to the first +;; character after the end of the next count-th object. +;; 3. When the count is negative, move point backward to the first +;; character of the count-th previous object. +;; 4. If point is placed on the first character of an object, the +;; backward motion does NOT count that object. +;; 5. If point is placed on the last character of an object, the +;; forward motion DOES count that object. +;; 6. The return value is "count left", i.e., in forward direction +;; count is decreased by one for each successful move and in +;; backward direction count is increased by one for each +;; successful move, returning the final value of count. +;; Therefore, if the complete move is successful, the return +;; value is 0. +;; +;; A useful macro in this regard is `evil-motion-loop', which quits +;; when point does not move further and returns the count difference. +;; It also provides a "unit value" of 1 or -1 for use in each +;; iteration. For example, a hypothetical "foo-bar" move could be +;; written as such: +;; +;; (defun foo-bar (count) +;; (evil-motion-loop (var count) +;; (forward-foo var) ; `var' is 1 or -1 depending on COUNT +;; (forward-bar var))) +;; +;; If "forward-foo" and "-bar" didn't accept negative arguments, +;; we could choose their backward equivalents by inspecting `var': +;; +;; (defun foo-bar (count) +;; (evil-motion-loop (var count) +;; (cond +;; ((< var 0) +;; (backward-foo 1) +;; (backward-bar 1)) +;; (t +;; (forward-foo 1) +;; (forward-bar 1))))) +;; +;; After a forward motion, point has to be placed on the first +;; character after some object, unless no motion was possible at all. +;; Similarly, after a backward motion, point has to be placed on the +;; first character of some object. This implies that point should +;; NEVER be moved to eob or bob, unless an object ends or begins at +;; eob or bob. (Usually, Emacs motions always move as far as possible. +;; But we want to use the motion-function to identify certain objects +;; in the buffer, and thus exact movement to object boundaries is +;; required.) + +(evil-define-text-object evil-a-word (count &optional beg end type) + "Select a word." + (evil-select-an-object 'evil-word beg end type count)) + +(evil-define-text-object evil-inner-word (count &optional beg end type) + "Select inner word." + (evil-select-inner-object 'evil-word beg end type count)) + +(evil-define-text-object evil-a-WORD (count &optional beg end type) + "Select a WORD." + (evil-select-an-object 'evil-WORD beg end type count)) + +(evil-define-text-object evil-inner-WORD (count &optional beg end type) + "Select inner WORD." + (evil-select-inner-object 'evil-WORD beg end type count)) + +(evil-define-text-object evil-a-symbol (count &optional beg end type) + "Select a symbol." + (evil-select-an-unrestricted-object 'evil-symbol beg end type count)) + +(evil-define-text-object evil-inner-symbol (count &optional beg end type) + "Select inner symbol." + (evil-select-inner-unrestricted-object 'evil-symbol beg end type count)) + +(evil-define-text-object evil-a-sentence (count &optional beg end type) + "Select a sentence." + (evil-select-an-unrestricted-object 'evil-sentence beg end type count)) + +(evil-define-text-object evil-inner-sentence (count &optional beg end type) + "Select inner sentence." + (evil-select-inner-unrestricted-object 'evil-sentence beg end type count)) + +(evil-define-text-object evil-a-paragraph (count &optional beg end type) + "Select a paragraph." + :type line + (evil-select-an-unrestricted-object 'evil-paragraph beg end type count t)) + +(evil-define-text-object evil-inner-paragraph (count &optional beg end type) + "Select inner paragraph." + :type line + (evil-select-inner-unrestricted-object 'evil-paragraph beg end type count t)) + +(evil-define-text-object evil-a-paren (count &optional beg end type) + "Select a parenthesis." + :extend-selection nil + (evil-select-paren ?\( ?\) beg end type count t)) + +(evil-define-text-object evil-inner-paren (count &optional beg end type) + "Select inner parenthesis." + :extend-selection nil + (evil-select-paren ?\( ?\) beg end type count)) + +(evil-define-text-object evil-a-bracket (count &optional beg end type) + "Select a square bracket." + :extend-selection nil + (evil-select-paren ?\[ ?\] beg end type count t)) + +(evil-define-text-object evil-inner-bracket (count &optional beg end type) + "Select inner square bracket." + :extend-selection nil + (evil-select-paren ?\[ ?\] beg end type count)) + +(evil-define-text-object evil-a-curly (count &optional beg end type) + "Select a curly bracket (\"brace\")." + :extend-selection nil + (evil-select-paren ?{ ?} beg end type count t)) + +(evil-define-text-object evil-inner-curly (count &optional beg end type) + "Select inner curly bracket (\"brace\")." + :extend-selection nil + (evil-select-paren ?{ ?} beg end type count)) + +(evil-define-text-object evil-an-angle (count &optional beg end type) + "Select an angle bracket." + :extend-selection nil + (evil-select-paren ?< ?> beg end type count t)) + +(evil-define-text-object evil-inner-angle (count &optional beg end type) + "Select inner angle bracket." + :extend-selection nil + (evil-select-paren ?< ?> beg end type count)) + +(evil-define-text-object evil-a-single-quote (count &optional beg end type) + "Select a single-quoted expression." + :extend-selection t + (evil-select-quote ?' beg end type count t)) + +(evil-define-text-object evil-inner-single-quote (count &optional beg end type) + "Select inner single-quoted expression." + :extend-selection nil + (evil-select-quote ?' beg end type count)) + +(evil-define-text-object evil-a-double-quote (count &optional beg end type) + "Select a double-quoted expression." + :extend-selection t + (evil-select-quote ?\" beg end type count t)) + +(evil-define-text-object evil-inner-double-quote (count &optional beg end type) + "Select inner double-quoted expression." + :extend-selection nil + (evil-select-quote ?\" beg end type count)) + +(evil-define-text-object evil-a-back-quote (count &optional beg end type) + "Select a back-quoted expression." + :extend-selection t + (evil-select-quote ?\` beg end type count t)) + +(evil-define-text-object evil-inner-back-quote (count &optional beg end type) + "Select inner back-quoted expression." + :extend-selection nil + (evil-select-quote ?\` beg end type count)) + +(evil-define-text-object evil-a-tag (count &optional beg end type) + "Select a tag block." + :extend-selection nil + (evil-select-xml-tag beg end type count t)) + +(evil-define-text-object evil-inner-tag (count &optional beg end type) + "Select inner tag block." + :extend-selection nil + (evil-select-xml-tag beg end type count)) + +(defun evil-match (direction count) + "Find COUNTth next match in DIRECTION." + (unless (and (boundp 'evil-search-module) + (eq evil-search-module 'evil-search)) + (user-error "Match text objects only work with Evil search module")) + (let ((pnt (point)) + (count (abs count)) ;; Undo effect of evil-visual-direction + (evil-ex-search-direction 'backward) + (visual-state (evil-visual-state-p)) + on-start-match in-match on-end-match) + (save-excursion + (unless (eobp) (forward-char)) ;; If on start of a match, stay there + (evil-ex-search 1) + (setq on-start-match (= evil-ex-search-match-beg pnt) + in-match (<= evil-ex-search-match-beg pnt (1- evil-ex-search-match-end)) + on-end-match (= (1- evil-ex-search-match-end) pnt) + evil-ex-search-direction direction) + (cond + ((and visual-state on-start-match (eq 'backward direction)) + (evil-ex-search count)) + ((and visual-state on-end-match (eq 'forward direction)) + (evil-ex-search count)) + ((or in-match (eq 'backward direction)) + (evil-ex-search (1- count))) + (t (evil-ex-search count))) + (setq pnt (point))) + (goto-char pnt) + (cond + ((evil-normal-state-p) + (evil-visual-select evil-ex-search-match-beg + evil-ex-search-match-end + 'inclusive + (cl-case direction ('forward +1) ('backward -1)) + t) + (list evil-ex-search-match-beg evil-ex-search-match-end)) + ((and visual-state (eq 'forward direction)) + (goto-char (1- evil-ex-search-match-end))) + ((and visual-state (eq 'backward direction)) + (goto-char evil-ex-search-match-beg)) + ;; e.g. operator pending... + (t (list evil-ex-search-match-beg evil-ex-search-match-end))))) + +(evil-define-text-object evil-next-match (count &optional beg end type) + "Select next match." + :extend-selection t + (evil-match 'forward count)) + +(evil-define-text-object evil-previous-match (count &optional beg end type) + "Select previous match." + :extend-selection t + (evil-match 'backward count)) + +;;; Operator commands + +(evil-define-operator evil-yank (beg end type register yank-handler) + "Saves the characters in motion into the kill-ring." + :move-point nil + :repeat nil + (interactive "<R><x><y>") + (let ((evil-was-yanked-without-register + (and evil-was-yanked-without-register (not register)))) + (cond + ((and (fboundp 'cua--global-mark-active) + (fboundp 'cua-copy-region-to-global-mark) + (cua--global-mark-active)) + (cua-copy-region-to-global-mark beg end)) + ((eq type 'block) + (evil-yank-rectangle beg end register yank-handler)) + ((memq type '(line screen-line)) + (evil-yank-lines beg end register yank-handler)) + (t + (evil-yank-characters beg end register yank-handler))))) + +(evil-define-operator evil-yank-line (beg end type register) + "Saves whole lines into the kill-ring." + :motion evil-line-or-visual-line + :move-point nil + (interactive "<R><x>") + (when (evil-visual-state-p) + (unless (memq type '(line block screen-line)) + (let ((range (evil-expand beg end + (if (and evil-respect-visual-line-mode + visual-line-mode) + 'screen-line + 'line)))) + (setq beg (evil-range-beginning range) + end (evil-range-end range) + type (evil-type range)))) + (evil-exit-visual-state)) + (evil-yank beg end type register)) + +(evil-define-operator evil-delete (beg end type register yank-handler) + "Delete text from BEG to END with TYPE. +Save in REGISTER or in the kill-ring with YANK-HANDLER." + (interactive "<R><x><y>") + (if (and (memq type '(inclusive exclusive)) + (not (evil-visual-state-p)) + (eq 'evil-delete evil-this-operator) + (save-excursion (goto-char beg) (bolp)) + (save-excursion (goto-char end) (eolp)) + (<= 1 (evil-count-lines beg end))) + ;; Imitate Vi strangeness: if motion meets above criteria, + ;; delete linewise. Not for change operator or visual state. + (let ((new-range (evil-expand beg end 'line))) + (evil-delete (nth 0 new-range) (nth 1 new-range) 'line register yank-handler)) + (unless register + (let ((text (filter-buffer-substring beg end))) + (unless (string-match-p "\n" text) + ;; set the small delete register + (evil-set-register ?- text)))) + (let ((evil-was-yanked-without-register nil)) + (evil-yank beg end type register yank-handler)) + (cond + ((eq type 'block) + (evil-apply-on-block #'delete-region beg end nil)) + ((and (eq type 'line) + (= end (point-max)) + (or (= beg end) + (/= (char-before end) ?\n)) + (/= beg (point-min)) + (= (char-before beg) ?\n)) + (delete-region (1- beg) end)) + (t + (delete-region beg end))) + (when (and (called-interactively-p 'any) + (eq type 'line)) + (evil-first-non-blank) + (when (and (not evil-start-of-line) + evil-operator-start-col + ;; Special exceptions to ever saving column: + (not (memq evil-this-motion '(evil-forward-word-begin + evil-forward-WORD-begin)))) + (move-to-column evil-operator-start-col))))) + +(evil-define-operator evil-delete-line (beg end type register yank-handler) + "Delete to end of line." + :motion nil + :keep-visual t + (interactive "<R><x>") + ;; act linewise in Visual state + (let* ((beg (or beg (point))) + (end (or end beg)) + (visual-line-mode (and evil-respect-visual-line-mode + visual-line-mode)) + (line-end (if visual-line-mode + (save-excursion + (end-of-visual-line) + (point)) + (line-end-position)))) + (when (evil-visual-state-p) + (unless (memq type '(line screen-line block)) + (let ((range (evil-expand beg end + (if visual-line-mode + 'screen-line + 'line)))) + (setq beg (evil-range-beginning range) + end (evil-range-end range) + type (evil-type range)))) + (evil-exit-visual-state)) + (cond + ((eq type 'block) + ;; equivalent to $d, i.e., we use the block-to-eol selection and + ;; call `evil-delete'. In this case we fake the call to + ;; `evil-end-of-line' by setting `temporary-goal-column' and + ;; `last-command' appropriately as `evil-end-of-line' would do. + (let ((temporary-goal-column most-positive-fixnum) + (last-command 'next-line)) + (evil-delete beg end 'block register yank-handler))) + ((memq type '(line screen-line)) + (evil-delete beg end type register yank-handler)) + (t + (evil-delete beg line-end type register yank-handler))))) + +(evil-define-operator evil-delete-whole-line + (beg end type register yank-handler) + "Delete whole line." + :motion evil-line-or-visual-line + (interactive "<R><x>") + (evil-delete beg end type register yank-handler)) + +(evil-define-operator evil-delete-char (beg end type register) + "Delete next character." + :motion evil-forward-char + (interactive "<R><x>") + (evil-delete beg end type register)) + +(evil-define-operator evil-delete-backward-char (beg end type register) + "Delete previous character." + :motion evil-backward-char + (interactive "<R><x>") + (evil-delete beg end type register)) + +(evil-define-command evil-delete-backward-char-and-join (count) + "Delete previous character and join lines. +If point is at the beginning of a line then the current line will +be joined with the previous line if and only if +`evil-backspace-join-lines'." + (interactive "p") + (if (or evil-backspace-join-lines (not (bolp))) + (call-interactively 'delete-backward-char) + (user-error "Beginning of line"))) + +(evil-define-command evil-delete-backward-word () + "Delete previous word." + (let ((beg (save-excursion (evil-backward-word-begin) (point))) + (end (point))) + (cond + ((evil-replace-state-p) (while (< beg (point)) + (evil-replace-backspace))) + ((or (not (bolp)) (bobp)) (delete-region (max beg (line-beginning-position)) + end)) + (evil-backspace-join-lines (delete-char -1)) + (t (user-error "Beginning of line"))))) + +(evil-define-command evil-delete-back-to-indentation () + "Delete back to the first non-whitespace character. +If point is before the first non-whitespace character of a +current line then delete from the point to the beginning of the +current line. If point is on the beginning of the line, behave +according to `evil-backspace-join-lines'." + (let ((beg (if (<= (current-column) (current-indentation)) + (line-beginning-position) + (save-excursion + (evil-first-non-blank) + (point))))) + (cond + ((and (bolp) (evil-replace-state-p)) (evil-replace-backspace)) + ((bolp) (evil-delete-backward-char-and-join 1)) + ((evil-replace-state-p) (while (< beg (point)) + (evil-replace-backspace))) + (t (delete-region beg (point)))))) + +(defun evil-ex-delete-or-yank (should-delete beg end type register count yank-handler) + "Execute evil-delete or evil-yank on the given region. +If SHOULD-DELETE is t, evil-delete will be executed, otherwise +evil-yank. +The region specified by BEG and END will be adjusted if COUNT is +given." + (when count + ;; with COUNT, the command should go the end of the region and delete/yank + ;; COUNT lines from there + (setq beg (save-excursion + (goto-char end) + (forward-line -1) + (point)) + end (save-excursion + (goto-char end) + (point-at-bol count)) + type 'line)) + (funcall (if should-delete 'evil-delete 'evil-yank) beg end type register yank-handler)) + +(evil-define-operator evil-ex-delete (beg end type register count yank-handler) + "The Ex delete command. +\[BEG,END]delete [REGISTER] [COUNT]" + (interactive "<R><xc/><y>") + (evil-ex-delete-or-yank t beg end type register count yank-handler)) + +(evil-define-operator evil-ex-yank (beg end type register count yank-handler) + "The Ex yank command. +\[BEG,END]yank [REGISTER] [COUNT]" + :restore-point t + (interactive "<R><xc/><y>") + (evil-ex-delete-or-yank nil beg end type register count yank-handler)) + +(evil-define-command evil-ex-put (beg end ex-arg &optional force) + (interactive "<r><a><!>") + (let* ((arg-chars (remove ?\s (string-to-list ex-arg))) + (reg (or (car arg-chars) ?\")) + (text (cond + ((and (< 1 (length arg-chars)) + (/= ?= reg)) + (user-error "Trailing characters")) + ((eq ?= reg) + (evil--eval-expr (if (= 1 (length arg-chars)) + evil-last-=-register-input + (setq evil-last-=-register-input (substring ex-arg 1))))) + (t (evil-get-register reg))))) + (unless text (user-error "Nothing in register %c" reg)) + (evil-remove-yank-excluded-properties text) + (goto-char (if (= (point-max) end) end (1- end))) + (if force (evil-insert-newline-above) (evil-insert-newline-below)) + (evil-set-marker ?\[ (point)) + ;; `insert' rather than `insert-for-yank' as we want to ignore yank-handlers... + (insert (if (and (< 0 (length text)) + (eq ?\n (aref text (1- (length text))))) + (substring text 0 (1- (length text))) + text)) + (evil-set-marker ?\] (1- (point))) + (back-to-indentation) + (evil-normal-state))) + +(evil-define-operator evil-change + (beg end type register yank-handler delete-func) + "Change text from BEG to END with TYPE. +Save in REGISTER or the kill-ring with YANK-HANDLER. +DELETE-FUNC is a function for deleting text, default `evil-delete'. +If TYPE is `line', insertion starts on an empty line. +If TYPE is `block', the inserted text in inserted at each line +of the block." + (interactive "<R><x><y>") + (let ((delete-func (or delete-func #'evil-delete)) + (nlines (1+ (evil-count-lines beg end))) + (opoint (save-excursion + (goto-char beg) + (line-beginning-position)))) + (unless (eq evil-want-fine-undo t) + (evil-start-undo-step)) + (funcall delete-func beg end type register yank-handler) + (cond + ((eq type 'line) + (setq this-command 'evil-change-whole-line) ; for evil-maybe-remove-spaces + (if (= opoint (point)) + (evil-open-above 1) + (evil-open-below 1))) + ((eq type 'block) + (evil-insert 1 nlines)) + (t + (evil-insert 1))) + (setq evil-this-register nil))) + +(evil-define-operator evil-change-line (beg end type register yank-handler) + "Change to end of line, or change whole line if characterwise visual mode." + :motion evil-end-of-line-or-visual-line + (interactive "<R><x><y>") + (if (and (evil-visual-state-p) (eq 'inclusive type)) + (cl-destructuring-bind (beg* end* &rest) (evil-line-expand beg end) + (evil-change-whole-line beg* end* register yank-handler)) + (evil-change beg end type register yank-handler #'evil-delete-line))) + +(evil-define-operator evil-change-whole-line + (beg end register yank-handler) + "Change whole line." + :motion evil-line-or-visual-line + :type line + (interactive "<r><x>") + (evil-change beg end 'line register yank-handler #'evil-delete-whole-line)) + +(evil-define-command evil-copy (beg end address) + "Copy lines in BEG END below line given by ADDRESS." + :motion evil-line-or-visual-line + (interactive "<r><addr>") + (goto-char (point-min)) + (forward-line address) + (let* ((txt (buffer-substring-no-properties beg end)) + (len (length txt))) + ;; ensure text consists of complete lines + (when (or (zerop len) (/= (aref txt (1- len)) ?\n)) + (setq txt (concat txt "\n"))) + (when (and (eobp) (not (bolp))) (newline)) ; incomplete last line + (insert txt) + (forward-line -1))) + +(evil-define-command evil-move (beg end address) + "Move lines in BEG END below line given by ADDRESS." + :motion evil-line-or-visual-line + (interactive "<r><addr>") + (unless (= (1+ address) (line-number-at-pos beg)) + (goto-char (point-min)) + (forward-line address) + (let* ((m (set-marker (make-marker) (point))) + (txt (buffer-substring-no-properties beg end)) + (len (length txt)) + (last-line-blank (progn (goto-char (point-max)) (bolp)))) + (delete-region beg end) + (unless last-line-blank ; as vim, preserve lack of blank last line + (progn (goto-char (point-max)) (when (bolp) (delete-char -1)))) + (goto-char m) + (set-marker m nil) + ;; ensure text consists of complete lines + (when (or (zerop len) (/= (aref txt (1- len)) ?\n)) + (setq txt (concat txt "\n"))) + (when (and (eobp) (not (bolp))) (newline)) ; incomplete last line + (when (evil-visual-state-p) + (move-marker evil-visual-mark (point))) + (insert txt) + (forward-line -1) + (when (evil-visual-state-p) + (move-marker evil-visual-point (point)))))) + +(defun evil--check-undo-system () + (when (and (eq evil-undo-system 'undo-tree) + (not (bound-and-true-p undo-tree-mode))) + (user-error "Enable `global-undo-tree-mode' to use undo-tree commands. +Add (add-hook 'evil-local-mode-hook 'turn-on-undo-tree-mode) to your init file for undo in non-file buffers."))) + +(evil-define-command evil-undo (count) + "Undo COUNT changes in buffer using `evil-undo-function'." + :repeat abort + (interactive "*p") + (evil--check-undo-system) + (funcall evil-undo-function count)) + +(evil-define-command evil-redo (count) + "Undo COUNT changes in buffer using `evil-redo-function'." + :repeat abort + (interactive "*p") + (evil--check-undo-system) + (funcall evil-redo-function count)) + +(evil-define-operator evil-substitute (beg end type register) + "Change a character." + :motion evil-forward-char + (interactive "<R><x>") + (evil-change beg end type register)) + +(evil-define-operator evil-upcase (beg end type) + "Convert text to upper case." + (if (eq type 'block) + (evil-apply-on-block #'evil-upcase beg end nil) + (upcase-region beg end))) + +(evil-define-operator evil-downcase (beg end type) + "Convert text to lower case." + (if (eq type 'block) + (evil-apply-on-block #'evil-downcase beg end nil) + (downcase-region beg end))) + +(evil-define-operator evil-invert-case (beg end type) + "Invert case of text." + (let (char) + (if (eq type 'block) + (evil-apply-on-block #'evil-invert-case beg end nil) + (save-excursion + (goto-char beg) + (while (< beg end) + (setq char (following-char)) + (delete-char 1 nil) + (if (eq (upcase char) char) + (insert-char (downcase char) 1) + (insert-char (upcase char) 1)) + (setq beg (1+ beg))))))) + +(evil-define-operator evil-invert-char (beg end type) + "Invert case of character." + :motion evil-forward-char + (if (eq type 'block) + (evil-apply-on-block #'evil-invert-case beg end nil) + (evil-invert-case beg end) + (when evil-this-motion + (goto-char end) + (when (and evil-cross-lines + (not evil-move-beyond-eol) + (not (evil-visual-state-p)) + (not (evil-operator-state-p)) + (eolp) (not (eobp)) (not (bolp))) + (forward-char))))) + +(evil-define-operator evil-rot13 (beg end type) + "ROT13 encrypt text." + (if (eq type 'block) + (evil-apply-on-block #'evil-rot13 beg end nil) + (rot13-region beg end))) + +(evil-define-operator evil-join (beg end) + "Join the selected lines." + :motion evil-line + (let ((count (count-lines beg end))) + (when (> count 1) + (setq count (1- count))) + (goto-char beg) + (dotimes (_ count) + (join-line 1)))) + +(evil-define-operator evil-join-whitespace (beg end) + "Join the selected lines without changing whitespace. +\\<evil-normal-state-map>Like \\[evil-join], \ +but doesn't insert or remove any spaces." + :motion evil-line + (let ((count (count-lines beg end))) + (when (> count 1) + (setq count (1- count))) + (goto-char beg) + (dotimes (_ count) + (evil-move-end-of-line 1) + (unless (eobp) + (delete-char 1))))) + +(evil-define-operator evil-ex-join (beg end &optional count bang) + "Join the selected lines with optional COUNT and BANG." + (interactive "<r><a><!>") + (if (and count (not (string-match-p "^[1-9][0-9]*$" count))) + (user-error "Invalid count") + (let ((join-fn (if bang 'evil-join-whitespace 'evil-join))) + (cond + ((not count) + ;; without count - just join the given region + (funcall join-fn beg end)) + (t + ;; emulate vim's :join when count is given - start from the + ;; end of the region and join COUNT lines from there + (let* ((count-num (string-to-number count)) + (beg-adjusted (save-excursion + (goto-char end) + (forward-line -1) + (point))) + (end-adjusted (save-excursion + (goto-char end) + (point-at-bol count-num)))) + (funcall join-fn beg-adjusted end-adjusted))))))) + +(evil-define-operator evil-fill (beg end) + "Fill text." + :move-point nil + :type line + (save-excursion + (condition-case nil + (fill-region beg end) + (error nil)))) + +(evil-define-operator evil-fill-and-move (beg end) + "Fill text and move point to the end of the filled region." + :move-point nil + :type line + (let ((marker (make-marker))) + (move-marker marker (1- end)) + (condition-case nil + (progn + (fill-region beg end) + (goto-char marker) + (evil-first-non-blank)) + (error nil)))) + +(evil-define-operator evil-indent (beg end) + "Indent text." + :move-point nil + :type line + (save-restriction + (narrow-to-region beg end) + (if (and (= beg (line-beginning-position)) + (= end (line-beginning-position 2))) + ;; since some Emacs modes can only indent one line at a time, + ;; implement "==" as a call to `indent-according-to-mode' + (indent-according-to-mode) + (goto-char beg) + (indent-region beg end)) + ;; Update `beg' and `end' + (setq beg (point-min) + end (point-max)) + ;; We also need to tabify or untabify the leading white characters + (when evil-indent-convert-tabs + (let* ((beg-line (line-number-at-pos beg)) + (end-line (line-number-at-pos end)) + (ln beg-line) + (convert-white (if indent-tabs-mode 'tabify 'untabify))) + (save-excursion + (while (<= ln end-line) + (goto-char (point-min)) + (forward-line (- ln 1)) + (back-to-indentation) + ;; Whether tab or space should be used is determined by indent-tabs-mode + (funcall convert-white (line-beginning-position) (point)) + (setq ln (1+ ln))))) + (back-to-indentation)))) + +(evil-define-operator evil-indent-line (beg end) + "Indent the line." + :motion evil-line + (evil-indent beg end)) + +(evil-define-operator evil-shift-left (beg end &optional count preserve-empty) + "Shift text from BEG to END to the left. +The text is shifted to the nearest multiple of `evil-shift-width' +\(the rounding can be disabled by setting `evil-shift-round'). +If PRESERVE-EMPTY is non-nil, lines that contain only spaces are +indented, too, otherwise they are ignored. Location of point +is preserved relative to text when called from insert state. +Otherwise, it is determined by `evil-start-of-line' and/or `evil-track-eol'. +See also `evil-shift-right'." + :type line + (interactive "<r><vc>") + (evil-shift-right beg end (- (or count 1)) preserve-empty)) + +(evil-define-operator evil-shift-right (beg end &optional count preserve-empty) + "Shift text from BEG to END to the right. +The text is shifted to the nearest multiple of `evil-shift-width' +\(the rounding can be disabled by setting `evil-shift-round'). +If PRESERVE-EMPTY is non-nil, lines that contain only spaces are +indented, too, otherwise they are ignored. Location of point +is preserved relative to text when called from insert or replace states. +Otherwise, it is determined by `evil-start-of-line' and/or `evil-track-eol'. +See also `evil-shift-left'." + :type line + :move-point nil ; point is moved according to `evil-start-of-line' and state + (interactive "<r><vc>") + (setq count (or count 1)) + (let ((beg (set-marker (make-marker) beg)) + (end (set-marker (make-marker) end)) + (col-for-insert (current-column)) + first-shift) ; shift of first line + (save-excursion + (goto-char beg) + (while (< (point) end) + (let* ((indent (current-indentation)) + (new-indent + (max 0 + (if (not evil-shift-round) + (+ indent (* count evil-shift-width)) + (* (+ (/ indent evil-shift-width) + count + (cond + ((> count 0) 0) + ((zerop (mod indent evil-shift-width)) 0) + (t 1))) + evil-shift-width))))) + (unless first-shift + (setq first-shift (- new-indent indent))) + (when (or preserve-empty + (save-excursion + (skip-chars-forward " \t") + (not (eolp)))) + (indent-to new-indent 0)) + (delete-region (point) (progn (skip-chars-forward " \t") (point))) + (forward-line 1)))) + ;; in case we're in an empty buffer first-shift is still unchanged + (unless first-shift + (if (< count 0) + (setq first-shift 0) + (setq first-shift (* count evil-shift-width)) + (indent-to first-shift))) + ;; When called from insert state (C-t or C-d) the cursor should shift with the line, + ;; otherwise (normal state) its position is determined by `evil-start-of-line'. + (cond + ((or (evil-insert-state-p) (evil-replace-state-p)) + (move-to-column (max 0 (+ col-for-insert first-shift)))) + (evil-start-of-line (evil-first-non-blank)) + ((evil--stick-to-eol-p) (move-end-of-line 1)) + (t (move-to-column (or goal-column evil-operator-start-col col-for-insert)))) + (setq temporary-goal-column 0))) + +(defun evil-delete-indentation () + "Delete all indentation on current line." + (interactive) + (save-excursion + (evil-beginning-of-line) + (delete-region (point) (progn (skip-chars-forward " \t") (point))))) + +(evil-define-command evil-shift-right-line (count) + "Shift the current line COUNT times to the right. +The text is shifted to the nearest multiple of +`evil-shift-width'. Like `evil-shift-right' but always works on +the current line." + (interactive "<c>") + (evil-shift-right (line-beginning-position) (line-beginning-position 2) count t)) + +(evil-define-command evil-shift-left-line (count) + "Shift the current line COUNT times to the left. +The text is shifted to the nearest multiple of +`evil-shift-width'. Like `evil-shift-left' but always works on +the current line." + (interactive "<c>") + (if (and (eq 'self-insert-command last-command) + (eq ?0 (char-before))) + (progn (backward-delete-char 1) + (evil-delete-indentation)) + (evil-shift-left (line-beginning-position) (line-beginning-position 2) count t))) + +(evil-define-operator evil-align-left (beg end type &optional width) + "Left-align lines in the region at WIDTH columns. +The default for width is the value of `fill-column'." + :motion evil-line + :type line + (interactive "<R><a>") + (evil-justify-lines beg end 'left (if width + (string-to-number width) + 0))) + +(evil-define-operator evil-align-right (beg end type &optional width) + "Right-align lines in the region at WIDTH columns. +The default for width is the value of `fill-column'." + :motion evil-line + :type line + (interactive "<R><a>") + (evil-justify-lines beg end 'right (if width + (string-to-number width) + fill-column))) + +(evil-define-operator evil-align-center (beg end type &optional width) + "Centers lines in the region between WIDTH columns. +The default for width is the value of `fill-column'." + :motion evil-line + :type line + (interactive "<R><a>") + (evil-justify-lines beg end 'center (if width + (string-to-number width) + fill-column))) + +(evil-define-operator evil-replace (beg end type char) + "Replace text from BEG to END with CHAR." + :motion evil-forward-char + (interactive "<R>" + (unwind-protect + (let ((evil-force-cursor 'replace)) + (evil-refresh-cursor) + (list (evil-read-key))) + (evil-refresh-cursor))) + (when char + (if (eq type 'block) + (save-excursion + (evil-apply-on-rectangle + #'(lambda (begcol endcol char) + (let ((maxcol (evil-column (line-end-position)))) + (when (< begcol maxcol) + (setq endcol (min endcol maxcol)) + (let ((beg (evil-move-to-column begcol nil t)) + (end (evil-move-to-column endcol nil t))) + (delete-region beg end) + (insert (make-string (- endcol begcol) char)))))) + beg end char)) + (goto-char beg) + (cond + ((eq char ?\n) + (delete-region beg end) + (newline) + (when evil-auto-indent + (indent-according-to-mode))) + (t + (while (< (point) end) + (if (eq (char-after) ?\n) + (forward-char) + (delete-char 1) + (insert-char char 1))) + (goto-char (max beg (1- end)))))))) + +(evil-define-command evil-paste-before + (count &optional register yank-handler) + "Pastes the latest yanked text before the cursor position. +The return value is the yanked text." + :suppress-operator t + (interactive "*P<x>") + (setq count (prefix-numeric-value count)) + (if (evil-visual-state-p) + (evil-visual-paste count register) + (evil-with-undo + (let* ((text (if register + (evil-get-register register) + (current-kill 0))) + (yank-handler (or yank-handler + (when (stringp text) + (car-safe (get-text-property + 0 'yank-handler text))))) + (opoint (point))) + (when evil-paste-clear-minibuffer-first + (delete-minibuffer-contents) + (setq evil-paste-clear-minibuffer-first nil)) + (when text + (if (functionp yank-handler) + (let ((evil-paste-count count) + ;; for non-interactive use + (this-command #'evil-paste-before)) + (push-mark opoint t) + (insert-for-yank text)) + ;; no yank-handler, default + (when (vectorp text) + (setq text (evil-vector-to-string text))) + (set-text-properties 0 (length text) nil text) + (push-mark opoint t) + (dotimes (_ (or count 1)) + (insert-for-yank text)) + (setq evil-last-paste + (list #'evil-paste-before + count + opoint + opoint ; beg + (point))) ; end + (evil-set-marker ?\[ opoint) + (evil-set-marker ?\] (1- (point))) + (when (and evil-move-cursor-back + (> (length text) 0)) + (backward-char)))) + ;; no paste-pop after pasting from a register + (when register + (setq evil-last-paste nil)) + (and (> (length text) 0) text))))) + +(evil-define-command evil-paste-after + (count &optional register yank-handler) + "Pastes the latest yanked text behind point. +The return value is the yanked text." + :suppress-operator t + (interactive "*P<x>") + (setq count (prefix-numeric-value count)) + (if (evil-visual-state-p) + (evil-visual-paste count register) + (evil-with-undo + (let* ((text (if register + (evil-get-register register) + (current-kill 0))) + (yank-handler (or yank-handler + (when (stringp text) + (car-safe (get-text-property + 0 'yank-handler text))))) + (opoint (point))) + (when text + (if (functionp yank-handler) + (let ((evil-paste-count count) + ;; for non-interactive use + (this-command #'evil-paste-after)) + (insert-for-yank text)) + ;; no yank-handler, default + (when (vectorp text) + (setq text (evil-vector-to-string text))) + (set-text-properties 0 (length text) nil text) + (unless (eolp) (forward-char)) + (push-mark (point) t) + ;; TODO: Perhaps it is better to collect a list of all + ;; (point . mark) pairs to undo the yanking for COUNT > 1. + ;; The reason is that this yanking could very well use + ;; `yank-handler'. + (let ((beg (point))) + (dotimes (_ (or count 1)) + (insert-for-yank text)) + (setq evil-last-paste + (list #'evil-paste-after + count + opoint + beg ; beg + (point))) ; end + (evil-set-marker ?\[ beg) + (evil-set-marker ?\] (1- (point))) + (when (evil-normal-state-p) + (evil-move-cursor-back))))) + (when register + (setq evil-last-paste nil)) + (and (> (length text) 0) text))))) + +(defun evil-insert-for-yank-at-col (startcol _endcol string count) + "Insert STRING at STARTCOL." + (move-to-column startcol) + (dotimes (_ (or count 1)) + (insert-for-yank string)) + (evil-set-marker ?\] (1- (point)))) + +(evil-define-command evil-visual-paste (count &optional register) + "Paste over Visual selection." + :suppress-operator t + (interactive "*P<x>") + (setq count (prefix-numeric-value count)) + ;; evil-visual-paste is typically called from evil-paste-before or + ;; evil-paste-after, but we have to mark that the paste was from + ;; visual state + (setq this-command 'evil-visual-paste) + (let* ((text (if register + (evil-get-register register) + (current-kill 0))) + (yank-handler (car-safe (get-text-property + 0 'yank-handler text))) + (dir (evil-visual-direction)) + beg end paste-eob) + (evil-with-undo + (let ((kill-ring-yank-pointer (when kill-ring (list (current-kill 0))))) + (when (evil-visual-state-p) + (setq beg evil-visual-beginning + end evil-visual-end) + (evil-visual-rotate 'upper-left) + ;; if we replace the last buffer line that does not end in a + ;; newline, we use `evil-paste-after' because `evil-delete' + ;; will move point to the line above + (when (and (= evil-visual-end (point-max)) + (/= (char-before (point-max)) ?\n)) + (setq paste-eob t)) + (evil-delete beg end (evil-visual-type) (unless evil-kill-on-visual-paste ?_)) + (when (and (eq yank-handler #'evil-yank-line-handler) + (not (memq (evil-visual-type) '(line block))) + (not (= evil-visual-end (point-max)))) + (insert "\n")) + (evil-normal-state) + (when kill-ring (current-kill 1))) + ;; Effectively memoize `evil-get-register' because it can be + ;; side-effecting (e.g. for the `=' register)... + (cl-letf (((symbol-function 'evil-get-register) + (lambda (&rest _) text))) + (cond + ((eq 'block (evil-visual-type)) + (when (eq yank-handler #'evil-yank-line-handler) + (setq text (concat "\n" text))) + (evil-set-marker ?\[ beg) + (evil-apply-on-block #'evil-insert-for-yank-at-col beg end t text count)) + (paste-eob (evil-paste-after count register)) + (t (evil-paste-before count register))))) + (when evil-kill-on-visual-paste + (current-kill -1)) + ;; Ensure that gv can restore visually pasted area... + (setq evil-visual-previous-mark evil-visual-mark + evil-visual-mark (evil-get-marker (if (<= 0 dir) ?\[ ?\]) t) + evil-visual-previous-point evil-visual-point + evil-visual-point (evil-get-marker (if (<= 0 dir) ?\] ?\[) t)) + ;; mark the last paste as visual-paste + (setq evil-last-paste + (list (nth 0 evil-last-paste) + (nth 1 evil-last-paste) + (nth 2 evil-last-paste) + (nth 3 evil-last-paste) + (nth 4 evil-last-paste) + t))))) + +(defun evil-paste-from-register (register) + "Paste from REGISTER." + (interactive + (let* ((opoint (point)) + (overlay (make-overlay opoint (+ opoint (if (evil-replace-state-p) 1 0))))) + (unwind-protect + (progn + (overlay-put overlay 'invisible t) + (overlay-put overlay 'after-string (propertize "\"" + 'face 'minibuffer-prompt + 'cursor 1)) + (list (or evil-this-register (read-char)))) + (delete-overlay overlay)))) + (let ((opoint (point)) + (evil-move-cursor-back nil) + reg-length chars-to-delete) + (evil-paste-before nil register t) + (when (evil-replace-state-p) + (setq reg-length (- (point) opoint) + chars-to-delete (min (- (point-at-eol) (point)) reg-length)) + ;; TODO: handle multi-line paste backspacing + (evil-update-replace-alist (point) reg-length chars-to-delete chars-to-delete) + (delete-char chars-to-delete)))) + +(defun evil-paste-last-insertion () + "Paste last insertion." + (interactive) + (evil-paste-from-register ?.)) + +(defun evil-paste-last-insertion-and-stop-insert () + "Paste last insertion and change to normal state." + (interactive) + (evil-paste-last-insertion) + (evil-normal-state)) + +(evil-define-command evil-use-register (register) + "Use REGISTER for the next command." + :keep-visual t + :repeat ignore + (interactive "<C>") + (setq evil-this-register register)) + +(defvar evil-macro-buffer nil + "The buffer that has been active on macro recording.") + +(defun evil-end-and-return-macro () + "Like `kmacro-end-macro' but also return the macro. +Remove \\<evil-insert-state-map>\\[evil-execute-in-normal-state] from the end." + ;; `end-kbd-macro' rather than `kmacro-end-macro' to allow clearing registers + (end-kbd-macro nil #'kmacro-loop-setup-function) + (let ((end-keys-seq (append evil-execute-normal-keys nil)) + (last-kbd-macro-seq (append last-kbd-macro nil))) + (unless last-kbd-macro-seq + (setq last-kbd-macro nil)) + (if (and end-keys-seq last-kbd-macro-seq) + (apply #'vector (butlast last-kbd-macro-seq (length end-keys-seq))) + last-kbd-macro))) + +(evil-define-command evil-record-macro (register) + "Record a keyboard macro into REGISTER. +If REGISTER is :, /, or ?, the corresponding command line window +will be opened instead." + :keep-visual t + :suppress-operator t + (interactive + (list (unless (and evil-this-macro defining-kbd-macro) + (or evil-this-register (evil-read-key))))) + (let (last-macro) + (cond + ((eq register ?\C-g) + (keyboard-quit)) + ((and evil-this-macro defining-kbd-macro) + (setq evil-macro-buffer nil) + (condition-case nil + (setq last-macro (evil-end-and-return-macro)) + (error nil)) + (when last-macro + (evil-set-register evil-this-macro last-macro)) + (setq evil-this-macro nil)) + ((eq register ?:) + (evil-command-window-ex)) + ((eq register ?/) + (evil-command-window-search-forward)) + ((eq register ??) + (evil-command-window-search-backward)) + ((or (<= ?0 register ?9) + (<= ?a register ?z) + (<= ?A register ?Z)) + (when defining-kbd-macro (end-kbd-macro)) + (setq evil-this-macro register) + (evil-set-register evil-this-macro nil) + (kmacro-start-macro nil) + (setq evil-macro-buffer (current-buffer))) + (t (error "Invalid register"))))) + +(evil-define-command evil-execute-macro (count macro) + "Execute keyboard macro MACRO, COUNT times. +When called with a non-numerical prefix \ +\(such as \\[universal-argument]), +COUNT is infinite. MACRO is read from a register +when called interactively." + :keep-visual t + :suppress-operator t + (interactive + (let (count macro register) + (setq count (if current-prefix-arg + (if (numberp current-prefix-arg) + current-prefix-arg + 0) 1) + register (or evil-this-register (read-char))) + (cond + ((or (and (eq register ?@) (eq evil-last-register ?:)) + (eq register ?:)) + (setq macro (lambda () (evil-ex-repeat nil)) + evil-last-register ?:)) + ((eq register ?@) + (unless evil-last-register + (user-error "No previously executed keyboard macro.")) + (setq macro (evil-get-register evil-last-register t))) + (t + (setq macro (evil-get-register register t) + evil-last-register register))) + (list count macro))) + (cond + ((functionp macro) + (evil-repeat-abort) + (dotimes (_ (or count 1)) + (funcall macro))) + ((or (and (not (stringp macro)) + (not (vectorp macro))) + (member macro '("" []))) + ;; allow references to currently empty registers + ;; when defining macro + (unless evil-this-macro + (user-error "No previous macro"))) + (t + (condition-case err + (evil-with-single-undo + (dotimes (_ (or count 1)) + (execute-kbd-macro macro))) + ;; enter Normal state if the macro fails + (error + (evil-normal-state) + (evil-normalize-keymaps) + (signal (car err) (cdr err))))))) + +;;; Visual commands + +(evil-define-motion evil-visual-restore () + "Restore previous selection." + (let* ((point (point)) + (mark (or (mark t) point)) + (type (evil-visual-type))) + ;; TODO handle swapping selection in visual state... + (unless (evil-visual-state-p) + (cond + ;; No previous selection. + ((or (null evil-visual-selection) + (null evil-visual-mark) + (null evil-visual-point))) + (t + (setq mark evil-visual-mark + point evil-visual-point))) + (evil-visual-make-selection mark point type t)))) + +(evil-define-motion evil-visual-exchange-corners () + "Rearrange corners in Visual Block mode. + + M---+ +---M + | | <=> | | + +---P P---+ + +For example, if mark is in the upper left corner and point +in the lower right, this function puts mark in the upper right +corner and point in the lower left." + (cond + ((eq evil-visual-selection 'block) + (let* ((point (point)) + (mark (or (mark t) point)) + (point-col (evil-column point)) + (mark-col (evil-column mark)) + (mark (save-excursion + (goto-char mark) + (evil-move-to-column point-col) + (point))) + (point (save-excursion + (goto-char point) + (evil-move-to-column mark-col) + (point)))) + (evil-visual-refresh mark point))) + (t + (evil-exchange-point-and-mark) + (evil-visual-refresh)))) + +(evil-define-command evil-visual-rotate (corner &optional beg end type) + "In Visual Block selection, put point in CORNER. +Corner may be one of `upper-left', `upper-right', `lower-left' +and `lower-right': + + upper-left +---+ upper-right + | | + lower-left +---+ lower-right + +When called interactively, the selection is rotated blockwise." + :keep-visual t + (interactive + (let ((corners '(upper-left upper-right lower-right lower-left))) + (list (or (cadr (memq (evil-visual-block-corner) corners)) + 'upper-left)))) + (let* ((beg (or beg (point))) + (end (or end (mark t) beg)) + (type (or type evil-this-type)) + range) + (cond + ((memq type '(rectangle block)) + (setq range (evil-block-rotate beg end :corner corner) + beg (pop range) + end (pop range)) + (unless (eq corner (evil-visual-block-corner corner beg end)) + (evil-swap beg end)) + (goto-char beg) + (when (evil-visual-state-p) + (evil-move-mark end) + (evil-visual-refresh nil nil nil :corner corner))) + ((memq corner '(upper-right lower-right)) + (goto-char (max beg end)) + (when (evil-visual-state-p) + (evil-move-mark (min beg end)))) + (t + (goto-char (min beg end)) + (when (evil-visual-state-p) + (evil-move-mark (max beg end))))))) + +;;; Insertion commands + +(defun evil-insert (count &optional vcount skip-empty-lines) + "Switch to Insert state just before point. +The insertion will be repeated COUNT times and repeated once for +the next VCOUNT - 1 lines starting at the same column. +If SKIP-EMPTY-LINES is non-nil, the insertion will not be performed +on lines on which the insertion point would be after the end of the +lines. This is the default behaviour for Visual-state insertion." + (interactive + (list (prefix-numeric-value current-prefix-arg) + (and (evil-visual-state-p) + (memq (evil-visual-type) '(line block)) + (save-excursion + (let ((m (mark))) + ;; go to upper-left corner temporarily so + ;; `count-lines' yields accurate results + (evil-visual-rotate 'upper-left) + (prog1 (count-lines evil-visual-beginning evil-visual-end) + (set-mark m))))) + (evil-visual-state-p))) + (if (and (called-interactively-p 'any) + (evil-visual-state-p)) + (cond + ((eq (evil-visual-type) 'line) + (evil-visual-rotate 'upper-left) + (evil-insert-line count vcount)) + ((eq (evil-visual-type) 'block) + (let ((column (min (evil-column evil-visual-beginning) + (evil-column evil-visual-end)))) + (evil-visual-rotate 'upper-left) + (move-to-column column t) + (evil-insert count vcount skip-empty-lines))) + (t + (evil-visual-rotate 'upper-left) + (evil-insert count vcount skip-empty-lines))) + (setq evil-insert-count count + evil-insert-lines nil + evil-insert-vcount (and vcount + (> vcount 1) + (list (line-number-at-pos) + (current-column) + vcount)) + evil-insert-skip-empty-lines skip-empty-lines) + (evil-insert-state 1))) + +(defun evil-append (count &optional vcount skip-empty-lines) + "Switch to Insert state just after point. +The insertion will be repeated COUNT times and repeated once for +the next VCOUNT - 1 lines starting at the same column. If +SKIP-EMPTY-LINES is non-nil, the insertion will not be performed +on lines on which the insertion point would be after the end of +the lines." + (interactive + (list (prefix-numeric-value current-prefix-arg) + (and (evil-visual-state-p) + (memq (evil-visual-type) '(line block)) + (save-excursion + (let ((m (mark))) + ;; go to upper-left corner temporarily so + ;; `count-lines' yields accurate results + (evil-visual-rotate 'upper-left) + (prog1 (count-lines evil-visual-beginning evil-visual-end) + (set-mark m))))))) + (if (and (called-interactively-p 'any) + (evil-visual-state-p)) + (cond + ((or (eq (evil-visual-type) 'line) + (and (eq (evil-visual-type) 'block) + (memq last-command '(next-line previous-line)) + (numberp temporary-goal-column) + (= temporary-goal-column most-positive-fixnum))) + (evil-visual-rotate 'upper-left) + (evil-append-line count vcount)) + ((eq (evil-visual-type) 'block) + (let ((column (max (evil-column evil-visual-beginning) + (evil-column evil-visual-end)))) + (evil-visual-rotate 'upper-left) + (move-to-column column t) + (evil-insert count vcount skip-empty-lines))) + (t + (evil-visual-rotate 'lower-right) + (backward-char) + (evil-append count))) + (unless (= (current-column) + (save-excursion (end-of-line) (current-column))) + ;; Subtly different from `(eolp)' - see issue #1617 + (forward-char)) + (evil-insert count vcount skip-empty-lines) + (add-hook 'post-command-hook #'evil-maybe-remove-spaces))) + +(defun evil-insert-resume (count) + "Switch to Insert state at previous insertion point. +The insertion will be repeated COUNT times. If called from visual +state, only place point at the previous insertion position but do not +switch to insert state." + (interactive "p") + (evil-goto-mark ?^ t) + (unless (evil-visual-state-p) + (evil-insert count))) + +(defun evil-quoted-insert (count) + "Like `quoted-insert' but delete COUNT chars forward in replace state. +Adds a `^' overlay as an input prompt." + (interactive "p") + (let* ((opoint (point)) + chars-to-delete insert-prompt) + (unwind-protect + (progn + (if (evil-replace-state-p) + (progn + (setq chars-to-delete (min (- (point-at-eol) opoint) count) + insert-prompt (make-overlay opoint (+ chars-to-delete opoint))) + (evil-update-replace-alist opoint count chars-to-delete)) + (setq insert-prompt (make-overlay opoint opoint))) + (overlay-put insert-prompt 'invisible t) + (overlay-put insert-prompt 'after-string (propertize "^" + 'face 'escape-glyph + 'cursor 1)) + (let (overwrite-mode) ;; Force `read-quoted-char' + (quoted-insert count)) + (when (evil-replace-state-p) (delete-char chars-to-delete))) + (when insert-prompt (delete-overlay insert-prompt))))) + +(defun evil-open-above (count) + "Insert a new line above point and switch to Insert state. +The insertion will be repeated COUNT times." + (interactive "p") + (unless (eq evil-want-fine-undo t) + (evil-start-undo-step)) + (evil-insert-newline-above) + (setq evil-insert-count count + evil-insert-lines t + evil-insert-vcount nil) + (evil-insert-state 1) + (when evil-auto-indent + (indent-according-to-mode))) + +(defun evil-open-below (count) + "Insert a new line below point and switch to Insert state. +The insertion will be repeated COUNT times." + (interactive "p") + (unless (eq evil-want-fine-undo t) + (evil-start-undo-step)) + (push (point) buffer-undo-list) + (evil-insert-newline-below) + (setq evil-insert-count count + evil-insert-lines t + evil-insert-vcount nil) + (evil-insert-state 1) + (when evil-auto-indent + (indent-according-to-mode))) + +(defun evil--insert-line (count vcount non-blank-p) + "Switch to insert state at the beginning of the current line. +If NON-BLANK-P is non-nil, point is placed at the first non-blank character +on the current line. If NON-BLANK-P is nil, point is placed at column 0, +or the beginning of visual line. The insertion will be repeated COUNT times. +If VCOUNT is non nil it should be number > 0. The insertion will be repeated +in the next VCOUNT - 1 lines below the current one." + (push (point) buffer-undo-list) + (let ((move-fn (if non-blank-p #'back-to-indentation #'evil-beginning-of-line))) + (if (and visual-line-mode + evil-respect-visual-line-mode) + (goto-char + (max (save-excursion + (funcall move-fn) + (point)) + (save-excursion + (beginning-of-visual-line) + (point)))) + (funcall move-fn))) + (setq evil-insert-count count + evil-insert-lines nil + evil-insert-vcount + (and vcount + (> vcount 1) + (list (line-number-at-pos) + (if non-blank-p #'evil-first-non-blank #'evil-beginning-of-line) + vcount))) + (evil-insert-state 1)) + +(defun evil-insert-line (count &optional vcount) + "Switch to insert state at beginning of current line. +Point is placed at the first non-blank character on the current +line. The insertion will be repeated COUNT times. If VCOUNT is +non nil it should be number > 0. The insertion will be repeated +in the next VCOUNT - 1 lines below the current one." + (interactive "p") + (evil--insert-line count vcount t)) + +(defun evil-insert-0-line (count &optional vcount) + "Switch to insert state at beginning of current line. +Point is placed at column 0, or the beginning of the visual line. +The insertion will be repeated COUNT times. If VCOUNT is +non nil it should be number > 0. The insertion will be repeated +in the next VCOUNT - 1 lines below the current one." + (interactive "p") + (evil--insert-line count vcount nil)) + +(defun evil-append-line (count &optional vcount) + "Switch to Insert state at the end of the current line. +The insertion will be repeated COUNT times. If VCOUNT is non nil +it should be number > 0. The insertion will be repeated in the +next VCOUNT - 1 lines below the current one." + (interactive "p") + (if (and visual-line-mode + evil-respect-visual-line-mode) + (evil-end-of-visual-line) + (evil-move-end-of-line)) + (setq evil-insert-count count + evil-insert-lines nil + evil-insert-vcount + (and vcount + (> vcount 1) + (list (line-number-at-pos) + #'end-of-line + vcount))) + (evil-insert-state 1)) + +(evil-define-command evil-insert-digraph (count) + "Insert COUNT digraphs." + :repeat change + (interactive "p") + (let ((opoint (point)) + chars-to-delete insert-prompt) + (if (evil-replace-state-p) + (progn + (setq chars-to-delete (min (- (point-at-eol) opoint) count) + insert-prompt (make-overlay opoint (+ chars-to-delete opoint))) + (evil-update-replace-alist opoint count chars-to-delete)) + (setq insert-prompt (make-overlay opoint opoint))) + (insert-char (evil-read-digraph-char-with-overlay insert-prompt) count) + (when chars-to-delete (delete-char chars-to-delete)))) + +(evil-define-command evil-ex-show-digraphs () + "Shows a list of all available digraphs." + :repeat nil + (let ((columns 3)) + (evil-with-view-list + :name "evil-digraphs" + :mode-name "Evil Digraphs" + :format + (cl-loop repeat columns + vconcat [("Digraph" 8 nil) + ("Sequence" 16 nil)]) + :entries + (let* ((digraphs (mapcar #'(lambda (digraph) + (cons (cdr digraph) + (car digraph))) + (append evil-digraphs-table + evil-digraphs-table-user))) + (entries (cl-loop for digraph in digraphs + collect `(,(concat (char-to-string (nth 1 digraph)) + (char-to-string (nth 2 digraph))) + ,(char-to-string (nth 0 digraph))))) + (row) + (rows) + (clength (* columns 2))) + (cl-loop for e in entries + do + (push (nth 0 e) row) + (push (nth 1 e) row) + (when (eq (length row) clength) + (push `(nil ,(apply #'vector row)) rows) + (setq row nil))) + rows)))) + +(defun evil--self-insert-string (string) + "Insert STRING as if typed interactively." + (let ((chars (append string nil))) + (dolist (char chars) + (let ((last-command-event char)) + (self-insert-command 1))))) + +(defun evil-copy-from-above (arg) + "Copy characters from preceding non-blank line. +The copied text is inserted before point. +ARG is the number of lines to move backward. +See also \\<evil-insert-state-map>\\[evil-copy-from-below]." + (interactive + (cond + ;; if a prefix argument was given, repeat it for subsequent calls + ((and (null current-prefix-arg) + (eq last-command #'evil-copy-from-above)) + (setq current-prefix-arg last-prefix-arg) + (list (prefix-numeric-value current-prefix-arg))) + (t + (list (prefix-numeric-value current-prefix-arg))))) + (evil--self-insert-string (evil-copy-chars-from-line arg -1))) + +(defun evil-copy-from-below (arg) + "Copy characters from following non-blank line. +The copied text is inserted before point. +ARG is the number of lines to move forward. +See also \\<evil-insert-state-map>\\[evil-copy-from-above]." + (interactive + (cond + ((and (null current-prefix-arg) + (eq last-command #'evil-copy-from-below)) + (setq current-prefix-arg last-prefix-arg) + (list (prefix-numeric-value current-prefix-arg))) + (t + (list (prefix-numeric-value current-prefix-arg))))) + (evil--self-insert-string (evil-copy-chars-from-line arg 1))) + +;; adapted from `copy-from-above-command' in misc.el +(defun evil-copy-chars-from-line (n num &optional col) + "Return N characters from line NUM, starting at column COL. +NUM is relative to the current line and can be negative. +COL defaults to the current column." + (interactive "p") + (let ((col (or col (current-column))) prefix) + (save-excursion + (forward-line num) + (when (looking-at "[[:space:]]*$") + (if (< num 0) + (skip-chars-backward " \t\n") + (skip-chars-forward " \t\n"))) + (evil-move-beginning-of-line) + (move-to-column col) + ;; if the column winds up in middle of a tab, + ;; return the appropriate number of spaces + (when (< col (current-column)) + (if (eq (preceding-char) ?\t) + (let ((len (min n (- (current-column) col)))) + (setq prefix (make-string len ?\s) + n (- n len))) + ;; if in middle of a control char, return the whole char + (backward-char 1))) + (concat prefix + (buffer-substring (point) + (min (line-end-position) + (+ n (point)))))))) + +;; completion +(evil-define-command evil-complete-next (&optional arg) + "Complete to the nearest following word. +Search backward if a match isn't found. +Calls `evil-complete-next-func'." + :repeat change + (interactive "P") + (if (minibufferp) + (funcall evil-complete-next-minibuffer-func) + (funcall evil-complete-next-func arg))) + +(evil-define-command evil-complete-previous (&optional arg) + "Complete to the nearest preceding word. +Search forward if a match isn't found. +Calls `evil-complete-previous-func'." + :repeat change + (interactive "P") + (if (minibufferp) + (funcall evil-complete-previous-minibuffer-func) + (funcall evil-complete-previous-func arg))) + +(evil-define-command evil-complete-next-line (&optional arg) + "Complete a whole line. +Calls `evil-complete-next-line-func'." + :repeat change + (interactive "P") + (if (minibufferp) + (funcall evil-complete-next-minibuffer-func) + (funcall evil-complete-next-line-func arg))) + +(evil-define-command evil-complete-previous-line (&optional arg) + "Complete a whole line. +Calls `evil-complete-previous-line-func'." + :repeat change + (interactive "P") + (if (minibufferp) + (funcall evil-complete-previous-minibuffer-func) + (funcall evil-complete-previous-line-func arg))) + +;;; Search + +(defun evil-repeat-search (flag) + "Called to record a search command. +FLAG is either 'pre or 'post if the function is called before resp. +after executing the command." + (cond + ((and (evil-operator-state-p) (eq flag 'pre)) + (evil-repeat-record (this-command-keys)) + (evil-clear-command-keys)) + ((and (evil-operator-state-p) (eq flag 'post)) + ;; The value of (this-command-keys) at this point should be the + ;; key-sequence that called the last command that finished the + ;; search, usually RET. Therefore this key-sequence will be + ;; recorded in the post-command of the operator. Alternatively we + ;; could do it here. + (evil-repeat-record (if evil-regexp-search + (car-safe regexp-search-ring) + (car-safe search-ring)))) + (t (evil-repeat-motion flag)))) + +(evil-define-motion evil-search-forward () + (format "Search forward for user-entered text. +Searches for regular expression if `evil-regexp-search' is t.%s" + (if (and (fboundp 'isearch-forward) + (documentation 'isearch-forward)) + (format "\n\nBelow is the documentation string \ +for `isearch-forward',\nwhich lists available keys:\n\n%s" + (documentation 'isearch-forward)) "")) + :jump t + :type exclusive + :repeat evil-repeat-search + (evil-search-incrementally t evil-regexp-search)) + +(evil-define-motion evil-search-backward () + (format "Search backward for user-entered text. +Searches for regular expression if `evil-regexp-search' is t.%s" + (if (and (fboundp 'isearch-forward) + (documentation 'isearch-forward)) + (format "\n\nBelow is the documentation string \ +for `isearch-forward',\nwhich lists available keys:\n\n%s" + (documentation 'isearch-forward)) "")) + :jump t + :type exclusive + :repeat evil-repeat-search + (evil-search-incrementally nil evil-regexp-search)) + +(evil-define-motion evil-search-next (count) + "Repeat the last search." + :jump t + :type exclusive + (let ((orig (point)) + (search-string (if evil-regexp-search + (car-safe regexp-search-ring) + (car-safe search-ring)))) + (goto-char + ;; Wrap in `save-excursion' so that multiple searches have no visual effect. + (save-excursion + (evil-search search-string isearch-forward evil-regexp-search) + (when (and (> (point) orig) + (save-excursion + (evil-adjust-cursor) + (= (point) orig))) + ;; Point won't move after first attempt and `evil-adjust-cursor' takes + ;; effect, so start again. + (evil-search search-string isearch-forward evil-regexp-search)) + (point))) + (when (and count (> count 1)) + (dotimes (_ (1- count)) + (evil-search search-string isearch-forward evil-regexp-search))))) + +(evil-define-motion evil-search-previous (count) + "Repeat the last search in the opposite direction." + :jump t + :type exclusive + (dotimes (_ (or count 1)) + (evil-search (if evil-regexp-search + (car-safe regexp-search-ring) + (car-safe search-ring)) + (not isearch-forward) evil-regexp-search))) + +(evil-define-motion evil-search-word-backward (count &optional symbol) + "Search backward for symbol under point." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (dotimes (_ (or count 1)) + (evil-search-word nil nil symbol))) + +(evil-define-motion evil-search-word-forward (count &optional symbol) + "Search forward for symbol under point." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (dotimes (_ (or count 1)) + (evil-search-word t nil symbol))) + +(evil-define-motion evil-search-unbounded-word-backward (count &optional symbol) + "Search backward for symbol under point. +The search is unbounded, i.e., the pattern is not wrapped in +\\<...\\>." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (dotimes (_ (or count 1)) + (evil-search-word nil t symbol))) + +(evil-define-motion evil-search-unbounded-word-forward (count &optional symbol) + "Search forward for symbol under point. +The search is unbounded, i.e., the pattern is not wrapped in +\\<...\\>." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (dotimes (_ (or count 1)) + (evil-search-word t t symbol))) + +(defun evil-goto-definition-imenu (string _position) + "Find definition for STRING with imenu." + (require 'imenu nil t) + (let (ientry ipos) + (when (fboundp 'imenu--make-index-alist) + (ignore-errors (setq ientry (imenu--make-index-alist))) + (setq ientry (imenu--in-alist string ientry)) + (setq ipos (cdr ientry)) + (when (and (markerp ipos) + (eq (marker-buffer ipos) (current-buffer))) + (setq ipos (marker-position ipos)) + (when (numberp ipos) + (evil-search (format "\\_<%s\\_>" (regexp-quote string)) t t ipos) + t))))) + +(defun evil-goto-definition-semantic (_string position) + "Find definition for POSITION with semantic." + (and (fboundp 'semantic-ia-fast-jump) + (ignore-errors (semantic-ia-fast-jump position)))) + +(declare-function xref-backend-identifier-at-point "xref") + +(defun evil-goto-definition-xref (_string position) + "Find definition at POSITION with xref." + (when (fboundp 'xref-find-definitions) + (let ((identifier (save-excursion + (goto-char position) + (xref-backend-identifier-at-point (xref-find-backend))))) + (condition-case () + (progn + (xref-find-definitions identifier) + t) + (user-error nil))))) + +(defun evil-goto-definition-search (string _position) + "Find definition for STRING with evil-search." + (evil-search (format "\\_<%s\\_>" (regexp-quote string)) t t (point-min)) + t) + +(evil-define-motion evil-goto-definition () + "Go to definition or first occurrence of symbol under point. +See also `evil-goto-definition-functions'." + :jump t + :type exclusive + (let* ((match (evil--find-thing t 'symbol)) + (string (car match)) + (position (cdr match))) + (if (null string) + (user-error "No symbol under cursor") + (setq isearch-forward t) + (run-hook-with-args-until-success 'evil-goto-definition-functions + string position)))) + +;;; Folding +(defun evil-fold-action (list action) + "Perform fold ACTION for each matching major or minor mode in LIST. + +ACTION will be performed for the first matching handler in LIST. For more +information on its features and format, see the documentation for +`evil-fold-list'. + +If no matching ACTION is found in LIST, an error will signaled. + +Handler errors will be demoted, so a problem in one handler will (hopefully) +not interfere with another." + (if (null list) + (user-error + "Enable one of the following modes for folding to work: %s" + (mapconcat 'symbol-name (mapcar 'caar evil-fold-list) ", ")) + (let* ((modes (caar list))) + (if (evil--mode-p modes) + (let* ((actions (cdar list)) + (fn (plist-get actions action))) + (when fn + (with-demoted-errors "Error: %S" (funcall fn)))) + (evil-fold-action (cdr list) action))))) + +(defun evil--mode-p (modes) + "Determines whether any symbol in MODES represents the current +buffer's major mode or any of its minors." + (unless (eq modes '()) + (let ((mode (car modes))) + (or (eq major-mode mode) + (and (boundp mode) (symbol-value mode)) + (evil--mode-p (cdr modes)))))) + +(evil-define-command evil-toggle-fold () + "Open or close a fold under point. +See also `evil-open-fold' and `evil-close-fold'." + (evil-fold-action evil-fold-list :toggle)) + +(evil-define-command evil-open-folds () + "Open all folds. +See also `evil-close-folds'." + (evil-fold-action evil-fold-list :open-all)) + +(evil-define-command evil-close-folds () + "Close all folds. +See also `evil-open-folds'." + (evil-fold-action evil-fold-list :close-all)) + +(evil-define-command evil-open-fold () + "Open fold at point. +See also `evil-close-fold'." + (evil-fold-action evil-fold-list :open)) + +(evil-define-command evil-open-fold-rec () + "Open fold at point recursively. +See also `evil-open-fold' and `evil-close-fold'." + (evil-fold-action evil-fold-list :open-rec)) + +(evil-define-command evil-close-fold () + "Close fold at point. +See also `evil-open-fold'." + (evil-fold-action evil-fold-list :close)) + +;;; Ex + +(evil-define-operator evil-write (beg end type file-or-append &optional bang) + "Save the current buffer, from BEG to END, to FILE-OR-APPEND. +If FILE-OR-APPEND is of the form \">> FILE\", append to FILE +instead of overwriting. The current buffer's filename is not +changed unless it has no associated file and no region is +specified. If the file already exists and the BANG argument is +non-nil, it is overwritten without confirmation." + :motion nil + :move-point nil + :type line + :repeat nil + (interactive "<R><fsh><!>") + (let* ((append-and-filename (evil-extract-append file-or-append)) + (append (car append-and-filename)) + (filename (cdr append-and-filename)) + (bufname (buffer-file-name (buffer-base-buffer)))) + (when (zerop (length filename)) + (setq filename bufname)) + (cond + ((zerop (length filename)) + (user-error "Please specify a file name for the buffer")) + ;; execute command on region + ((eq (aref filename 0) ?!) + (shell-command-on-region beg end (substring filename 1))) + ;; with region or append, always save to file without resetting + ;; modified flag + ((or append (and beg end)) + (write-region beg end filename append nil nil (not (or append bang)))) + ;; no current file + ((null bufname) + (write-file filename (not bang))) + ;; save current buffer to its file + ((string= filename bufname) + (if (not bang) (save-buffer) (write-file filename))) + ;; save to another file + (t + (write-region nil nil filename + nil (not bufname) nil + (not bang)))))) + +(evil-define-command evil-write-all (bang) + "Saves all buffers visiting a file. +If BANG is non nil then read-only buffers are saved, too, +otherwise they are skipped. " + :repeat nil + :move-point nil + (interactive "<!>") + (if bang + (save-some-buffers t) + ;; save only buffer that are not read-only and + ;; that are visiting a file + (save-some-buffers t + #'(lambda () + (and (not buffer-read-only) + (buffer-file-name)))))) + +(evil-define-command evil-update () + "Same as `evil-write', but only write when the buffer has been modified." + :motion nil + :move-point nil + :type line + :repeat nil + (when (buffer-modified-p) + (call-interactively #'evil-write))) + +(evil-define-command evil-save (filename &optional bang) + "Save the current buffer to FILENAME. +Changes the file name of the current buffer to FILENAME. If no +FILENAME is given, the current file name is used." + :repeat nil + :move-point nil + (interactive "<f><!>") + (when (zerop (length filename)) + (setq filename (buffer-file-name (buffer-base-buffer)))) + (write-file filename (not bang))) + +(evil-define-command evil-edit (file &optional bang) + "Open FILE. +If no FILE is specified, reload the current buffer from disk." + :repeat nil + (interactive "<f><!>") + (if file + (find-file file) + (revert-buffer bang (or bang (not (buffer-modified-p))) t))) + +(evil-define-command evil-read (count file) + "Inserts the contents of FILE below the current line or line COUNT." + :repeat nil + :move-point nil + (interactive "P<fsh>") + (when (and file (not (zerop (length file)))) + (when count (goto-char (point-min))) + (when (or (not (zerop (forward-line (or count 1)))) + (not (bolp))) + (insert "\n")) + (cond + ((/= (aref file 0) ?!) + (when (member file '("#" "%")) + (setq file (evil-ex-replace-special-filenames file))) + (let ((result (insert-file-contents file))) + (save-excursion + (forward-char (cadr result)) + (unless (bolp) (insert "\n"))))) + (t + (shell-command (evil-ex-replace-special-filenames (substring file 1)) t) + (goto-char (mark)) + (unless (bolp) (insert "\n")) + (forward-line -1))))) + +(evil-define-command evil-show-files () + "Shows the file-list. +The same as `buffer-menu', but shows only buffers visiting +files." + :repeat nil + (buffer-menu 1)) + +(evil-define-command evil-goto-error (count) + "Go to error number COUNT. + +If no COUNT supplied, move to the current error. + +Acts like `first-error' other than when given no counts, goes +to the current error instead of the first, like in Vim's :cc +command." + :repeat nil + (interactive "<c>") + (if count + (first-error (if (eql 0 count) 1 count)) + (next-error 0))) + +(evil-define-command evil-buffer (buffer) + "Switches to another buffer." + :repeat nil + (interactive "<b>") + (cond + ;; no buffer given, switch to "other" buffer + ((null buffer) (switch-to-buffer (other-buffer))) + ;; we are given the name of an existing buffer + ((get-buffer buffer) (switch-to-buffer buffer)) + ;; try to complete the buffer + ((let ((all-buffers (internal-complete-buffer buffer nil t))) + (when (= (length all-buffers) 1) + (switch-to-buffer (car all-buffers))))) + (t + (when (y-or-n-p + (format "No buffer with name \"%s\" exists. Create new buffer? " + buffer)) + (switch-to-buffer buffer))))) + +(evil-define-command evil-next-buffer (&optional count) + "Goes to the `count'-th next buffer in the buffer list." + :repeat nil + (interactive "p") + (dotimes (_ (or count 1)) + (next-buffer))) + +(evil-define-command evil-prev-buffer (&optional count) + "Goes to the `count'-th prev buffer in the buffer list." + :repeat nil + (interactive "p") + (dotimes (_ (or count 1)) + (previous-buffer))) + +(evil-define-command evil-delete-buffer (buffer &optional bang) + "Deletes a buffer. +All windows currently showing this buffer will be closed except +for the last window in each frame." + (interactive "<b><!>") + (with-current-buffer (or buffer (current-buffer)) + (when bang + (set-buffer-modified-p nil) + (dolist (process (process-list)) + (when (eq (process-buffer process) (current-buffer)) + (set-process-query-on-exit-flag process nil)))) + ;; get all windows that show this buffer + (let ((wins (get-buffer-window-list (current-buffer) nil t))) + ;; if the buffer which was initiated by emacsclient, + ;; call `server-edit' from server.el to avoid + ;; "Buffer still has clients" message + (if (and (fboundp 'server-edit) + (boundp 'server-buffer-clients) + server-buffer-clients) + (server-edit) + (kill-buffer nil)) + ;; close all windows that showed this buffer + (mapc #'(lambda (w) + (condition-case nil + (delete-window w) + (error nil))) + wins)))) + +(evil-define-command evil-quit (&optional force) + "Closes the current window, current frame, Emacs. +If the current frame belongs to some client the client connection +is closed." + :repeat nil + (interactive "<!>") + (condition-case nil + (delete-window) + (error + (if (and (boundp 'server-buffer-clients) + (fboundp 'server-edit) + (fboundp 'server-buffer-done) + server-buffer-clients) + (if force + (server-buffer-done (current-buffer)) + (server-edit)) + (condition-case nil + (delete-frame) + (error + (if force + (kill-emacs) + (save-buffers-kill-emacs)))))))) + +(evil-define-command evil-quit-all (&optional bang) + "Exits Emacs, asking for saving." + :repeat nil + (interactive "<!>") + (if (null bang) + (save-buffers-kill-terminal) + (let ((proc (frame-parameter (selected-frame) 'client))) + (if proc + (with-no-warnings + (server-delete-client proc)) + (dolist (process (process-list)) + (set-process-query-on-exit-flag process nil)) + (kill-emacs))))) + +(evil-define-command evil-quit-all-with-error-code (&optional force) + "Exits Emacs without saving, returning an non-zero error code. +The FORCE argument is only there for compatibility and is ignored. +This function fails with an error if Emacs is run in server mode." + :repeat nil + (interactive "<!>") + (if (and (boundp 'server-buffer-clients) + (fboundp 'server-edit) + (fboundp 'server-buffer-done) + server-buffer-clients) + (user-error "Cannot exit client process with error code.") + (kill-emacs 1))) + +(evil-define-command evil-save-and-quit () + "Save all buffers and exit Emacs." + (save-buffers-kill-terminal t)) + +(evil-define-command evil-save-and-close (file &optional bang) + "Saves the current buffer and closes the window." + :repeat nil + (interactive "<f><!>") + (evil-write nil nil nil file bang) + (evil-quit)) + +(evil-define-command evil-save-modified-and-close (file &optional bang) + "Saves the current buffer and closes the window." + :repeat nil + (interactive "<f><!>") + (when (buffer-modified-p) + (evil-write nil nil nil file bang)) + (evil-quit)) + +(evil-define-operator evil-shell-command + (beg end type command &optional previous) + "Execute a shell command. +If BEG, END and TYPE is specified, COMMAND is executed on the region, +which is replaced with the command's output. Otherwise, the +output is displayed in its own buffer. If PREVIOUS is non-nil, +the previous shell command is executed instead." + (interactive "<R><sh><!>") + (if (not (evil-ex-p)) + (let ((evil-ex-initial-input + (if (and beg + (not (evil-visual-state-p)) + (not current-prefix-arg)) + (let ((range (evil-range beg end type))) + (evil-contract-range range) + ;; TODO: this is not exactly the same as Vim, which + ;; uses .,+count as range. However, this is easier + ;; to achieve with the current implementation and + ;; the very inconvenient range interface. + ;; + ;; TODO: the range interface really needs some + ;; rework! + (format + "%d,%d!" + (line-number-at-pos (evil-range-beginning range)) + (line-number-at-pos (evil-range-end range)))) + "!"))) + (call-interactively 'evil-ex)) + (when command + (setq command (evil-ex-replace-special-filenames command))) + (if (zerop (length command)) + (when previous (setq command evil-previous-shell-command)) + (setq evil-previous-shell-command command)) + (cond + ((zerop (length command)) + (if previous (user-error "No previous shell command") + (user-error "No shell command"))) + (evil-ex-range + (if (not evil-display-shell-error-in-message) + (shell-command-on-region beg end command nil t) + (let ((output-buffer (generate-new-buffer " *temp*")) + (error-buffer (generate-new-buffer " *temp*"))) + (unwind-protect + (if (zerop (shell-command-on-region beg end + command + output-buffer nil + error-buffer)) + (progn + (delete-region beg end) + (insert-buffer-substring output-buffer) + (goto-char beg) + (evil-first-non-blank)) + (display-message-or-buffer error-buffer)) + (kill-buffer output-buffer) + (kill-buffer error-buffer))))) + (t + (shell-command command))))) + +(evil-define-command evil-make (arg) + "Call a build command in the current directory. +If ARG is nil this function calls `recompile', otherwise it calls +`compile' passing ARG as build command." + (interactive "<sh>") + (if (and (fboundp 'recompile) + (not arg)) + (recompile) + (compile arg))) + +;; TODO: escape special characters (currently only \n) ... perhaps +;; there is some Emacs function doing this? +(evil-define-command evil-show-registers (registers) + "Shows the contents of REGISTERS, or all registers, if none supplied." + :repeat nil + (interactive "<a>") + (let* ((all-registers (evil-register-list)) + (reg-chars (string-to-list registers)) + (display-regs (if reg-chars + (cl-remove-if-not (lambda (r) (memq (car r) reg-chars)) + all-registers) + all-registers))) + (evil-with-view-list + :name "evil-registers" + :mode-name "Evil Registers" + :format + [("Register" 10 nil) + ("Value" 1000 nil)] + :entries + (cl-loop for (key . val) in display-regs + collect `(nil [,(char-to-string key) + ,(cond ((stringp val) + (replace-regexp-in-string "\n" "^J" val)) + ((vectorp val) + (key-description val)) + (t ""))]))))) + +(evil-define-command evil-show-marks (mrks) + "Shows all marks. +If MRKS is non-nil it should be a string and only registers +corresponding to the characters of this string are shown." + :repeat nil + (interactive "<a>") + ;; To get markers and positions, we can't rely on 'global-mark-ring' + ;; provided by Emacs (although it will be much simpler and faster), + ;; because 'global-mark-ring' does not store mark characters, but + ;; only buffer name and position. Instead, 'evil-markers-alist' is + ;; used; this is list maintained by Evil for each buffer. + (let ((all-markers + ;; get global and local marks + (append (cl-remove-if (lambda (m) + (or (evil-global-marker-p (car m)) + (not (markerp (cdr m))))) + evil-markers-alist) + (cl-remove-if (lambda (m) + (or (not (evil-global-marker-p (car m))) + (not (markerp (cdr m))))) + (default-value 'evil-markers-alist))))) + (when mrks + (setq mrks (string-to-list mrks)) + (setq all-markers (cl-delete-if (lambda (m) + (not (member (car m) mrks))) + all-markers))) + ;; map marks to list of 4-tuples (char row col file) + (setq all-markers + (mapcar (lambda (m) + (with-current-buffer (marker-buffer (cdr m)) + (save-excursion + (goto-char (cdr m)) + (list (car m) + (line-number-at-pos (point)) + (current-column) + (buffer-name))))) + all-markers)) + (evil-with-view-list + :name "evil-marks" + :mode-name "Evil Marks" + :format [("Mark" 8 nil) + ("Line" 8 nil) + ("Column" 8 nil) + ("Buffer" 1000 nil)] + :entries (cl-loop for m in (sort all-markers (lambda (a b) (< (car a) (car b)))) + collect `(nil [,(char-to-string (nth 0 m)) + ,(number-to-string (nth 1 m)) + ,(number-to-string (nth 2 m)) + (,(nth 3 m))])) + :select-action #'evil--show-marks-select-action))) + +(defun evil--show-marks-select-action (entry) + (kill-buffer) + (switch-to-buffer (car (elt entry 3))) + (evil-goto-mark (string-to-char (elt entry 0)))) + +(defun evil--parse-delmarks (to-be-parsed &optional parsed) + "Where TO-BE-PARSED can contain ranges in the form `x-y'. +PARSED is a list of characters whose marks should be deleted. +Like vim, on invalid input, preceeding valid input is still parsed." + (cl-destructuring-bind (&optional a b c &rest) to-be-parsed + (cond + ((null to-be-parsed) parsed) + ;; single mark... + ((and (not (eq ?- b)) (or (<= ?a a ?z) (<= ?A a ?Z) (<= ?0 a ?9) + (memq a '(?\" ?^ ?. ?\[ ?\] ?< ?>)))) + (evil--parse-delmarks (cdr to-be-parsed) (cons a parsed))) + ;; range of marks... + ((and (eq ?- b) c (or (<= ?a a c ?z) (<= ?A a c ?Z) (<= ?0 a c ?9))) + (evil--parse-delmarks (nthcdr 3 to-be-parsed) + (append parsed (number-sequence a c)))) + (t (progn (message "Invalid input: %s" (apply #'string (remove nil to-be-parsed))) + parsed))))) + +(evil-define-command evil-delete-marks (marks &optional force) + "MARKS is a string denoting all marks to be deleted. Mark names are +either single characters or a range of characters in the form `x-y'. +If FORCE is non-nil and MARKS is blank, all local marks except 0-9 are removed." + (interactive "<a><!>") + (let ((mark-chars (remove ?\s (append marks nil)))) + (cond + ((and force mark-chars) (message "Invalid input")) + (mark-chars + (let* ((delmarks (evil--parse-delmarks mark-chars)) + (delmarkp (lambda (m) (member (car m) delmarks)))) + ;; delete all parsed marks... + (setq evil-markers-alist + (cl-remove-if delmarkp evil-markers-alist)) + ;; ensure all parsed marks are deleted globally... + (set-default 'evil-markers-alist + (cl-remove-if delmarkp (default-value 'evil-markers-alist))))) + ;; delete local marks except 0-9... + (force (setq evil-markers-alist + (cl-remove-if-not (lambda (m) (<= ?0 (car m) ?9)) + evil-markers-alist)))))) + +(eval-when-compile (require 'ffap)) +(evil-define-command evil-find-file-at-point-with-line () + "Opens the file at point and goes to position if present." + (require 'ffap) + (let ((fname (with-no-warnings (ffap-file-at-point)))) + (unless fname + (user-error "File does not exist.")) + (let* ((line-number-pattern ":\\([0-9]+\\)\\=" ) + (line-and-column-numbers-pattern ":\\([0-9]+\\):\\([0-9]+\\)\\=") + (get-number (lambda (pattern match-number) + (save-excursion + (goto-char (cadr ffap-string-at-point-region)) + (and (re-search-backward pattern (line-beginning-position) t) + (string-to-number (match-string match-number)))))) + (line-number (or (funcall get-number line-and-column-numbers-pattern 1) + (funcall get-number line-number-pattern 1))) + (column-number (funcall get-number line-and-column-numbers-pattern 2))) + (message "line: %s, column: %s" line-number column-number) + (with-no-warnings (find-file-at-point fname)) + (when line-number + (goto-char (point-min)) + (forward-line (1- line-number)) + (when column-number + (move-to-column (1- column-number))))))) + +(evil-define-command evil-find-file-at-point-visual () + "Find the filename selected by the visual region. + Returns an error message if the file does not exist." + (require 'ffap) + (let ((region (buffer-substring (region-beginning) (region-end)))) + (if (file-exists-p region) + (find-file-at-point region) + (user-error (format "Can't find file \"%s\" in path" region))))) + +(evil-ex-define-argument-type state + "Defines an argument type which can take state names." + :collection + (lambda (arg predicate flag) + (let ((completions + (append '("nil") + (mapcar #'(lambda (state) + (format "%s" (car state))) + evil-state-properties)))) + (when arg + (cond + ((eq flag nil) + (try-completion arg completions predicate)) + ((eq flag t) + (all-completions arg completions predicate)) + ((eq flag 'lambda) + (test-completion arg completions predicate)) + ((eq (car-safe flag) 'boundaries) + (cons 'boundaries + (completion-boundaries arg + completions + predicate + (cdr flag))))))))) + +(evil-define-interactive-code "<state>" + "A valid evil state." + :ex-arg state + (list (when (and (evil-ex-p) evil-ex-argument) + (intern evil-ex-argument)))) + +;; TODO: should we merge this command with `evil-set-initial-state'? +(evil-define-command evil-ex-set-initial-state (state) + "Set the initial state for the current major mode to STATE. +This is the state the buffer comes up in. See `evil-set-initial-state'." + :repeat nil + (interactive "<state>") + (if (not (or (assq state evil-state-properties) + (null state))) + (user-error "State %s cannot be set as initial Evil state" state) + (let ((current-initial-state (evil-initial-state major-mode))) + (unless (eq current-initial-state state) + ;; only if we selected a new mode + (when (y-or-n-p (format "Major-mode `%s' has initial mode `%s'. \ +Change to `%s'? " + major-mode + (or current-initial-state "DEFAULT") + (or state "DEFAULT"))) + (evil-set-initial-state major-mode state) + (when (y-or-n-p "Save setting in customization file? ") + (dolist (s (list current-initial-state state)) + (when s + (let ((var (intern (format "evil-%s-state-modes" s)))) + (customize-save-variable var (symbol-value var))))))))))) + +(evil-define-command evil-force-normal-state () + "Switch to normal state without recording current command." + :repeat abort + :suppress-operator t + (evil-normal-state)) + +(evil-define-motion evil-ex-search-next (count) + "Goes to the next occurrence." + :jump t + :type exclusive + (evil-ex-search count)) + +(evil-define-motion evil-ex-search-previous (count) + "Goes the the previous occurrence." + :jump t + :type exclusive + (let ((evil-ex-search-direction + (if (eq evil-ex-search-direction 'backward) 'forward 'backward))) + (evil-ex-search count))) + +(defun evil-repeat-ex-search (flag) + "Called to record a search command. +FLAG is either 'pre or 'post if the function is called before +resp. after executing the command." + (cond + ((and (evil-operator-state-p) (eq flag 'pre)) + (evil-repeat-record (this-command-keys)) + (evil-clear-command-keys)) + ((and (evil-operator-state-p) (eq flag 'post)) + (evil-repeat-record (evil-ex-pattern-regex evil-ex-search-pattern)) + ;; If it weren't for the fact that `exit-minibuffer' throws an `exit' + ;; tag, which bypasses the source of `this-command-keys', we'd be able + ;; to capture the key(s) in the post-command of the operator as usual. + ;; Fortunately however, `last-input-event' can see the key (by default, `return') + (unless (append (this-command-keys) nil) + (evil-repeat-record (vector last-input-event)))) + (t (evil-repeat-motion flag)))) + +(evil-define-motion evil-ex-search-forward (count) + "Starts a forward search." + :jump t + :type exclusive + :repeat evil-repeat-ex-search + (evil-ex-start-search 'forward count)) + +(evil-define-motion evil-ex-search-backward (count) + "Starts a forward search." + :jump t + :repeat evil-repeat-ex-search + (evil-ex-start-search 'backward count)) + +(evil-define-motion evil-ex-search-word-forward (count &optional symbol) + "Search for the next occurrence of word under the cursor." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (evil-ex-start-word-search nil 'forward count symbol)) + +(evil-define-motion evil-ex-search-word-backward (count &optional symbol) + "Search for the next occurrence of word under the cursor." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (evil-ex-start-word-search nil 'backward count symbol)) + +(evil-define-motion evil-ex-search-unbounded-word-forward (count &optional symbol) + "Search for the next occurrence of word under the cursor." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (evil-ex-start-word-search t 'forward count symbol)) + +(evil-define-motion evil-ex-search-unbounded-word-backward (count &optional symbol) + "Search for the next occurrence of word under the cursor." + :jump t + :type exclusive + (interactive (list (prefix-numeric-value current-prefix-arg) + evil-symbol-word-search)) + (evil-ex-start-word-search t 'backward count symbol)) + +(defun evil-revert-reveal (open-spots) + "Unconditionally close overlays in OPEN-SPOTS in current window. +Modified version of `reveal-close-old-overlays' from +reveal.el. OPEN-SPOTS is a local version of `reveal-open-spots'." + (dolist (spot open-spots) + (let ((window (car spot)) + (ol (cdr spot))) + (unless (eq window (selected-window)) + (error "evil-revert-reveal: slot with wrong window")) + (let* ((inv (overlay-get ol 'reveal-invisible)) + (open (or (overlay-get ol 'reveal-toggle-invisible) + (get inv 'reveal-toggle-invisible) + (overlay-get ol 'isearch-open-invisible-temporary)))) + (if (and (overlay-start ol) ;Check it's still live. + open) + (condition-case err + (funcall open ol t) + (error (message "!!Reveal-hide (funcall %s %s t): %s !!" + open ol err))) + (overlay-put ol 'invisible inv)) + ;; Remove the overlay from the list of open spots. + (overlay-put ol 'reveal-invisible nil))))) + +(evil-define-operator evil-ex-substitute + (beg end pattern replacement flags) + "The Ex substitute command. +\[BEG,END]substitute/PATTERN/REPLACEMENT/FLAGS" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive "<r><s/>") + (evil-ex-nohighlight) + (unless pattern + (user-error "No pattern given")) + (setq replacement (or replacement "")) + (setq evil-ex-last-was-search nil) + (let* ((flags (append flags nil)) + (count-only (memq ?n flags)) + (confirm (and (memq ?c flags) (not count-only))) + (case-fold-search (evil-ex-pattern-ignore-case pattern)) + (case-replace case-fold-search) + (evil-ex-substitute-regex (evil-ex-pattern-regex pattern)) + (evil-ex-substitute-nreplaced 0) + (evil-ex-substitute-last-point (point)) + (whole-line (evil-ex-pattern-whole-line pattern)) + (evil-ex-substitute-overlay (make-overlay (point) (point))) + (orig-point-marker (move-marker (make-marker) (point))) + (end-marker (move-marker (make-marker) end)) + (use-reveal confirm) + reveal-open-spots + zero-length-match + match-contains-newline + transient-mark-mode) + (setq evil-ex-substitute-pattern pattern + evil-ex-substitute-replacement replacement + evil-ex-substitute-flags flags + isearch-string evil-ex-substitute-regex) + (isearch-update-ring evil-ex-substitute-regex t) + (unwind-protect + (progn + (evil-ex-hl-change 'evil-ex-substitute pattern) + (overlay-put evil-ex-substitute-overlay 'face 'isearch) + (overlay-put evil-ex-substitute-overlay 'priority 1001) + (goto-char beg) + (catch 'exit-search + (while (re-search-forward evil-ex-substitute-regex end-marker t) + (when (not (and query-replace-skip-read-only + (text-property-any (match-beginning 0) (match-end 0) 'read-only t))) + (let ((match-str (match-string 0)) + (match-beg (move-marker (make-marker) (match-beginning 0))) + (match-end (move-marker (make-marker) (match-end 0))) + (match-data (match-data))) + (goto-char match-beg) + (setq match-contains-newline + (string-match-p "\n" (buffer-substring-no-properties + match-beg match-end))) + (setq zero-length-match (= match-beg match-end)) + (when (and (= match-end end-marker) (not match-contains-newline) (bolp)) + ;; The range (beg end) includes the final newline which means + ;; end-marker is on one line down. + ;; With the exception of explicitly substituting newlines, + ;; we abort when the match ends here and it's an empty line + (throw 'exit-search t)) + (setq evil-ex-substitute-last-point match-beg) + (if confirm + (let ((prompt + (format "Replace %s with %s (y/n/a/q/l/^E/^Y)? " + match-str + (evil-match-substitute-replacement + evil-ex-substitute-replacement + (not case-replace)))) + (search-invisible t) + response) + (move-overlay evil-ex-substitute-overlay match-beg match-end) + ;; Simulate `reveal-mode'. `reveal-mode' uses + ;; `post-command-hook' but that won't work here. + (when use-reveal + (reveal-post-command)) + (catch 'exit-read-char + (while (setq response (read-char prompt)) + (when (member response '(?y ?a ?l)) + (unless count-only + (set-match-data match-data) + (evil-replace-match evil-ex-substitute-replacement + (not case-replace))) + (setq evil-ex-substitute-nreplaced + (1+ evil-ex-substitute-nreplaced)) + (evil-ex-hl-set-region 'evil-ex-substitute + (save-excursion + (forward-line) + (point)) + (evil-ex-hl-get-max + 'evil-ex-substitute))) + (cl-case response + ((?y ?n) (throw 'exit-read-char t)) + (?a (setq confirm nil) + (throw 'exit-read-char t)) + ((?q ?l ?\C-\[) (throw 'exit-search t)) + (?\C-e (evil-scroll-line-down 1)) + (?\C-y (evil-scroll-line-up 1)))))) + (setq evil-ex-substitute-nreplaced + (1+ evil-ex-substitute-nreplaced)) + (unless count-only + (set-match-data match-data) + (evil-replace-match evil-ex-substitute-replacement + (not case-replace)))) + (goto-char match-end) + (cond ((>= (point) end-marker) + ;; Don't want to perform multiple replacements at the end + ;; of the search region. + (throw 'exit-search t)) + ((and (not whole-line) + (not match-contains-newline)) + (forward-line) + ;; forward-line just moves to the end of the line on the + ;; last line of the buffer. + (when (or (eobp) + (> (point) end-marker)) + (throw 'exit-search t))) + ;; For zero-length matches check to see if point won't + ;; move next time. This is a problem when matching the + ;; regexp "$" because we can enter an infinite loop, + ;; repeatedly matching the same character + ((and zero-length-match + (let ((pnt (point))) + (save-excursion + (and + (re-search-forward + evil-ex-substitute-regex end-marker t) + (= pnt (point)))))) + (if (or (eobp) + (>= (point) end-marker)) + (throw 'exit-search t) + (forward-char))))))))) + (evil-ex-delete-hl 'evil-ex-substitute) + (delete-overlay evil-ex-substitute-overlay) + + (if count-only + (goto-char orig-point-marker) + (goto-char evil-ex-substitute-last-point)) + + (move-marker orig-point-marker nil) + (move-marker end-marker nil) + + (when use-reveal + (evil-revert-reveal reveal-open-spots))) + + (message "%s %d occurrence%s" + (if count-only "Found" "Replaced") + evil-ex-substitute-nreplaced + (if (/= evil-ex-substitute-nreplaced 1) "s" "")) + (evil-first-non-blank))) + +(evil-define-operator evil-ex-repeat-substitute + (beg end flags) + "Repeat last substitute command. +This is the same as :s//~/" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive "<r><a>") + (apply #'evil-ex-substitute beg end + (evil-ex-get-substitute-info (concat "//~/" flags)))) + +(evil-define-operator evil-ex-repeat-substitute-with-flags + (beg end flags) + "Repeat last substitute command with last flags. +This is the same as :s//~/&" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive "<r><a>") + (apply #'evil-ex-substitute beg end + (evil-ex-get-substitute-info (concat "//~/&" flags)))) + +(evil-define-operator evil-ex-repeat-substitute-with-search + (beg end flags) + "Repeat last substitute command with last search pattern. +This is the same as :s//~/r" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive "<r><a>") + (apply #'evil-ex-substitute beg end + (evil-ex-get-substitute-info (concat "//~/r" flags)))) + +(evil-define-operator evil-ex-repeat-substitute-with-search-and-flags + (beg end flags) + "Repeat last substitute command with last search pattern and last flags. +This is the same as :s//~/&r" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive "<r><a>") + (apply #'evil-ex-substitute beg end + (evil-ex-get-substitute-info (concat "//~/&r" flags)))) + +(evil-define-operator evil-ex-repeat-global-substitute () + "Repeat last substitute command on the whole buffer. +This is the same as :%s//~/&" + :repeat nil + :jump t + :move-point nil + :motion evil-line + (interactive) + (apply #'evil-ex-substitute (point-min) (point-max) + (evil-ex-get-substitute-info (concat "//~/&")))) + +(evil-define-operator evil-ex-global + (beg end pattern command &optional invert) + "The Ex global command. +\[BEG,END]global[!]/PATTERN/COMMAND" + :motion mark-whole-buffer + :move-point nil + (interactive "<r><g/><!>") + (unless pattern + (user-error "No pattern given")) + (unless command + (user-error "No command given")) + ;; TODO: `evil-ex-make-substitute-pattern' should be executed so + ;; :substitute can re-use :global's pattern depending on its `r' + ;; flag. This isn't supported currently but should be simple to add + (evil-with-single-undo + (let ((case-fold-search + (eq (evil-ex-regex-case pattern evil-ex-search-case) 'insensitive)) + (command-form (evil-ex-parse command)) + (transient-mark-mode transient-mark-mode) + (deactivate-mark deactivate-mark) + match markers) + (when (and pattern command) + (when evil-ex-search-vim-style-regexp + (setq pattern (evil-transform-vim-style-regexp pattern))) + (setq isearch-string pattern) + (isearch-update-ring pattern t) + (goto-char beg) + (evil-move-beginning-of-line) + (while (< (point) end) + (setq match (re-search-forward pattern (line-end-position) t)) + (when (or (and match (not invert)) + (and invert (not match))) + (push (move-marker (make-marker) + (or (and match (match-beginning 0)) + (line-beginning-position))) + markers)) + (forward-line)) + (setq markers (nreverse markers)) + (unwind-protect + (dolist (marker markers) + (goto-char marker) + (eval command-form)) + ;; ensure that all markers are deleted afterwards, + ;; even in the event of failure + (dolist (marker markers) + (set-marker marker nil))))))) + +(evil-define-operator evil-ex-global-inverted + (beg end pattern command &optional invert) + "The Ex vglobal command. +\[BEG,END]vglobal/PATTERN/COMMAND" + :motion mark-whole-buffer + :move-point nil + (interactive "<r><g/><!>") + (evil-ex-global beg end pattern command (not invert))) + +(evil-define-operator evil-ex-normal (beg end commands) + "The Ex normal command. +Execute the argument as normal command on each line in the +range. The given argument is passed straight to +`execute-kbd-macro'. The default is the current line." + :motion evil-line + (interactive "<r><a>") + (evil-with-single-undo + (let (markers evil-ex-current-buffer prefix-arg current-prefix-arg) + (goto-char beg) + (while + (and (< (point) end) + (progn + (push (move-marker (make-marker) (line-beginning-position)) + markers) + (and (= (forward-line) 0) (bolp))))) + (setq markers (nreverse markers)) + (deactivate-mark) + (evil-force-normal-state) + ;; replace ^[ by escape + (setq commands + (vconcat + (mapcar #'(lambda (ch) (if (equal ch ?) 'escape ch)) + (append commands nil)))) + (dolist (marker markers) + (goto-char marker) + (condition-case nil + (execute-kbd-macro commands) + (error nil)) + (evil-force-normal-state) + (set-marker marker nil))))) + +(evil-define-command evil-goto-char (position) + "Go to POSITION in the buffer. +Default position is the beginning of the buffer." + :jump t + (interactive "<N>") + (let ((position (evil-normalize-position + (or position (point-min))))) + (goto-char position))) + +(evil-define-operator evil-ex-line-number (beg end) + "Print the last line number." + :motion mark-whole-buffer + :move-point nil + (interactive "<r>") + (message "%d" (count-lines (point-min) end))) + +(evil-define-command evil-show-file-info () + "Shows basic file information." + (let* ((nlines (count-lines (point-min) (point-max))) + (curr (line-number-at-pos (point))) + (perc (if (> nlines 0) + (format "%d%%" (* (/ (float curr) (float nlines)) 100.0)) + "No lines in buffer")) + (file (buffer-file-name (buffer-base-buffer))) + (writable (and file (file-writable-p file))) + (readonly (if (and file (not writable)) "[readonly] " ""))) + (if file + (message "\"%s\" %d %slines --%s--" file nlines readonly perc) + (message "%d lines --%s--" nlines perc)))) + +(defvar sort-fold-case) +(evil-define-operator evil-ex-sort (beg end &optional options reverse) + "The Ex sort command. +\[BEG,END]sort[!] [i][u] +The following additional options are supported: + + * i ignore case + * u remove duplicate lines + +The 'bang' argument means to sort in reverse order." + :motion mark-whole-buffer + :move-point nil + (interactive "<r><a><!>") + (let ((beg (copy-marker beg)) + (end (copy-marker end)) + sort-fold-case uniq) + (dolist (opt (append options nil)) + (cond + ((eq opt ?i) (setq sort-fold-case t)) + ((eq opt ?u) (setq uniq t)) + (t (user-error "Unsupported sort option: %c" opt)))) + (sort-lines reverse beg end) + (when uniq + (let (line prev-line) + (goto-char beg) + (while (and (< (point) end) (not (eobp))) + (setq line (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + (if (and (stringp prev-line) + (eq t (compare-strings line nil nil + prev-line nil nil + sort-fold-case))) + (delete-region (progn (forward-line 0) (point)) + (progn (forward-line 1) (point))) + (setq prev-line line) + (forward-line 1))))) + (goto-char beg) + (set-marker beg nil) + (set-marker end nil))) + +;;; Window navigation + +(defmacro evil-save-side-windows (&rest body) + "Toggle side windows, evaluate BODY, restore side windows." + (declare (indent defun) (debug (&rest form))) + (let ((sides (make-symbol "sidesvar"))) + `(let ((,sides (and (functionp 'window-toggle-side-windows) + (window-with-parameter 'window-side)))) + (when ,sides + (window-toggle-side-windows)) + (unwind-protect + (progn ,@body) + (when ,sides + (window-toggle-side-windows)))))) + +(defun evil-resize-window (new-size &optional horizontal) + "Set the current window's width or height to NEW-SIZE. +If HORIZONTAL is non-nil the width of the window is changed, +otherwise its height is changed." + (let ((count (- new-size (if horizontal (window-width) (window-height))))) + (enlarge-window count horizontal))) + +(defun evil-move-window (side) + "Move the `selected-window' to SIDE. +The state of the `selected-window' is saved along with the state +of the window tree consisting of all the other windows. Then, all +windows are deleted, the remaining window is split according to +SIDE, the state of the window at SIDE is replaced with the saved +state of the `selected-window', and, finally, the state of the +saved window tree is reconstructed on the opposite side. + +SIDE has the same meaning as in `split-window'. + +Note, this function only operates on the window tree rooted in +the frame's main window and effectively preserves any side +windows \(i.e. windows with a valid window-side window +parameter\)." + (evil-save-side-windows + (unless (one-window-p) + (save-excursion + (let ((w (window-state-get (selected-window)))) + (delete-window) + (let ((wtree (window-state-get))) + (delete-other-windows) + (let ((subwin (selected-window)) + ;; NOTE: SIDE is new in Emacs 24 + (newwin (split-window nil nil side))) + (window-state-put wtree subwin) + (window-state-put w newwin) + (select-window newwin))))) + (balance-windows)))) + +(defun evil-alternate-buffer (&optional window) + "Return the last buffer WINDOW has displayed other than the +current one (equivalent to Vim's alternate buffer). + +Returns the first item in `window-prev-buffers' that isn't +`window-buffer' of WINDOW." + ;; If the last buffer visited has been killed, then `window-prev-buffers' + ;; returns a list with `current-buffer' at the head, we account for this + ;; possibility. + (let* ((prev-buffers (window-prev-buffers)) + (head (car prev-buffers))) + (if (eq (car head) (window-buffer window)) + (cadr prev-buffers) + head))) + +(evil-define-command evil-switch-to-windows-last-buffer () + "Switch to current windows last open buffer." + :repeat nil + (let ((previous-place (evil-alternate-buffer))) + (when previous-place + (switch-to-buffer (car previous-place)) + (goto-char (car (last previous-place)))))) + +(evil-define-command evil-window-delete () + "Deletes the current window. +If `evil-auto-balance-windows' is non-nil then all children of +the deleted window's parent window are rebalanced." + (let ((p (window-parent))) + (delete-window) + (when evil-auto-balance-windows + ;; balance-windows raises an error if the parent does not have + ;; any further children (then rebalancing is not necessary anyway) + (condition-case nil + (balance-windows p) + (error))))) + +(evil-define-command evil-window-split (&optional count file) + "Splits the current window horizontally, COUNT lines height, +editing a certain FILE. The new window will be created below +when `evil-split-window-below' is non-nil. If COUNT and +`evil-auto-balance-windows' are both non-nil then all children +of the parent of the splitted window are rebalanced." + :repeat nil + (interactive "P<f>") + (select-window + (split-window (selected-window) (when count (- count)) + (if evil-split-window-below 'below 'above))) + (when (and (not count) evil-auto-balance-windows) + (balance-windows (window-parent))) + (when file + (evil-edit file))) + +(evil-define-command evil-window-vsplit (&optional count file) + "Splits the current window vertically, COUNT columns width, +editing a certain FILE. The new window will be created to the +right when `evil-vsplit-window-right' is non-nil. If COUNT and +`evil-auto-balance-windows'are both non-nil then all children +of the parent of the splitted window are rebalanced." + :repeat nil + (interactive "P<f>") + (select-window + (split-window (selected-window) (when count (- count)) + (if evil-vsplit-window-right 'right 'left))) + (when (and (not count) evil-auto-balance-windows) + (balance-windows (window-parent))) + (when file + (evil-edit file))) + +(evil-define-command evil-split-buffer (buffer) + "Splits window and switches to another buffer." + :repeat nil + (interactive "<b>") + (evil-window-split) + (evil-buffer buffer)) + +(evil-define-command evil-split-next-buffer (&optional count) + "Splits the window and goes to the COUNT-th next buffer in the buffer list." + :repeat nil + (interactive "p") + (evil-window-split) + (evil-next-buffer count)) + +(evil-define-command evil-split-prev-buffer (&optional count) + "Splits window and goes to the COUNT-th prev buffer in the buffer list." + :repeat nil + (interactive "p") + (evil-window-split) + (evil-prev-buffer count)) + +(evil-define-command evil-window-left (count) + "Move the cursor to new COUNT-th window left of the current one." + :repeat nil + (interactive "p") + (dotimes (_ count) + (windmove-left))) + +(evil-define-command evil-window-right (count) + "Move the cursor to new COUNT-th window right of the current one." + :repeat nil + (interactive "p") + (dotimes (_ count) + (windmove-right))) + +(evil-define-command evil-window-up (count) + "Move the cursor to new COUNT-th window above the current one." + :repeat nil + (interactive "p") + (dotimes (_ (or count 1)) + (windmove-up))) + +(evil-define-command evil-window-down (count) + "Move the cursor to new COUNT-th window below the current one." + :repeat nil + (interactive "p") + (dotimes (_ (or count 1)) + (windmove-down))) + +(evil-define-command evil-window-bottom-right () + "Move the cursor to bottom-right window." + :repeat nil + (let ((last-sibling (frame-root-window))) + (while (and last-sibling (not (window-live-p last-sibling))) + (setq last-sibling (window-last-child last-sibling))) + (when last-sibling + (select-window last-sibling)))) + +(evil-define-command evil-window-top-left () + "Move the cursor to top-left window." + :repeat nil + (let ((first-child (window-child (frame-root-window)))) + (while (and first-child (not (window-live-p first-child))) + (setq first-child (window-child first-child))) + (when first-child + (select-window + first-child)))) + +(evil-define-command evil-window-mru () + "Move the cursor to the previous (last accessed) buffer in another window. +More precisely, it selects the most recently used buffer that is +shown in some other window, preferably of the current frame, and +is different from the current one." + :repeat nil + (catch 'done + (dolist (buf (buffer-list (selected-frame))) + (let ((win (get-buffer-window buf))) + (when (and (not (eq buf (current-buffer))) + win + (not (eq win (selected-window)))) + (select-window win) + (throw 'done nil)))))) + +(evil-define-command evil-window-next (count) + "Move the cursor to the next window in the cyclic order. +With COUNT go to the count-th window in the order starting from +top-left." + :repeat nil + (interactive "<c>") + (if (not count) + (select-window (next-window)) + (evil-window-top-left) + (other-window (1- count)))) + +(evil-define-command evil-window-prev (count) + "Move the cursor to the previous window in the cyclic order. +With COUNT go to the count-th window in the order starting from +top-left." + :repeat nil + (interactive "<c>") + (if (not count) + (select-window (previous-window)) + (evil-window-top-left) + (other-window (1- count)))) + +(evil-define-command evil-window-new (count file) + "Splits the current window horizontally +and opens a new buffer or edits a certain FILE." + :repeat nil + (interactive "P<f>") + (let ((new-window (split-window (selected-window) (when count (- count)) + (if evil-split-window-below 'below 'above)))) + (when (and (not count) evil-auto-balance-windows) + (balance-windows (window-parent))) + (let ((buffer (generate-new-buffer "*new*"))) + (set-window-buffer new-window buffer) + (select-window new-window) + (with-current-buffer buffer + (funcall (default-value 'major-mode)))) + (when file + (evil-edit file)))) + +(evil-define-command evil-window-vnew (count file) + "Splits the current window vertically +and opens a new buffer name or edits a certain FILE." + :repeat nil + (interactive "P<f>") + (let ((new-window (split-window (selected-window) (when count (- count)) + (if evil-vsplit-window-right 'right 'left)))) + (when (and (not count) evil-auto-balance-windows) + (balance-windows (window-parent))) + (let ((buffer (generate-new-buffer "*new*"))) + (set-window-buffer new-window buffer) + (select-window new-window) + (with-current-buffer buffer + (funcall (default-value 'major-mode)))) + (when file + (evil-edit file)))) + +(evil-define-command evil-buffer-new (count file) + "Creates a new buffer replacing the current window, optionally + editing a certain FILE" + :repeat nil + (interactive "P<f>") + (if file + (evil-edit file) + (let ((buffer (generate-new-buffer "*new*"))) + (set-window-buffer nil buffer) + (with-current-buffer buffer + (funcall (default-value 'major-mode)))))) + +(evil-define-command evil-window-increase-height (count) + "Increase current window height by COUNT." + :repeat nil + (interactive "p") + (evil-resize-window (+ (window-height) count))) + +(evil-define-command evil-window-decrease-height (count) + "Decrease current window height by COUNT." + :repeat nil + (interactive "p") + (evil-resize-window (- (window-height) count))) + +(evil-define-command evil-window-increase-width (count) + "Increase current window width by COUNT." + :repeat nil + (interactive "p") + (evil-resize-window (+ (window-width) count) t)) + +(evil-define-command evil-window-decrease-width (count) + "Decrease current window width by COUNT." + :repeat nil + (interactive "p") + (evil-resize-window (- (window-width) count) t)) + +(evil-define-command evil-window-set-height (count) + "Sets the height of the current window to COUNT." + :repeat nil + (interactive "<c>") + (evil-resize-window (or count (frame-height)) nil)) + +(evil-define-command evil-window-set-width (count) + "Sets the width of the current window to COUNT." + :repeat nil + (interactive "<c>") + (evil-resize-window (or count (frame-width)) t)) + +(evil-define-command evil-ex-resize (arg) + "The ex :resize command. + +If ARG is a signed positive integer, increase the current window +height by ARG. + +If ARG is a signed negative integer, decrease the current window +height by ARG. + +If ARG is a positive integer without explicit sign, set the current +window height to ARG. + +If ARG is empty, maximize the current window height." + (interactive "<a>") + (if (or (not arg) (= 0 (length arg))) + (evil-window-set-height nil) + (let ((n (string-to-number arg))) + (if (> n 0) + (if (= ?+ (aref arg 0)) + (evil-window-increase-height n) + (evil-window-set-height n)) + (evil-window-decrease-height (- n)))))) + +(evil-define-command evil-window-rotate-upwards () + "Rotates the windows according to the current cyclic ordering." + :repeat nil + (evil-save-side-windows + (let ((wlist (window-list)) + (slist (mapcar #'window-state-get (window-list)))) + (setq slist (append (cdr slist) (list (car slist)))) + (while (and wlist slist) + (window-state-put (car slist) (car wlist)) + (setq wlist (cdr wlist) + slist (cdr slist))) + (select-window (car (last (window-list))))))) + +(evil-define-command evil-window-rotate-downwards () + "Rotates the windows according to the current cyclic ordering." + :repeat nil + (evil-save-side-windows + (let ((wlist (window-list)) + (slist (mapcar #'window-state-get (window-list)))) + (setq slist (append (last slist) slist)) + (while (and wlist slist) + (window-state-put (car slist) (car wlist)) + (setq wlist (cdr wlist) + slist (cdr slist))) + (select-window (cadr (window-list)))))) + +(evil-define-command evil-window-move-very-top () + "Closes the current window, splits the upper-left one horizontally +and redisplays the current buffer there." + :repeat nil + (evil-move-window 'above)) + +(evil-define-command evil-window-move-far-left () + "Closes the current window, splits the upper-left one vertically +and redisplays the current buffer there." + :repeat nil + (evil-move-window 'left)) + +(evil-define-command evil-window-move-far-right () + "Closes the current window, splits the lower-right one vertically +and redisplays the current buffer there." + :repeat nil + (evil-move-window 'right)) + +(evil-define-command evil-window-move-very-bottom () + "Closes the current window, splits the lower-right one horizontally +and redisplays the current buffer there." + :repeat nil + (evil-move-window 'below)) + +;;; Mouse handling + +;; Large parts of this code are taken from mouse.el which is +;; distributed with GNU Emacs +(defun evil-mouse-drag-region (start-event) + "Set the region to the text that the mouse is dragged over. +Highlight the drag area as you move the mouse. +This must be bound to a button-down mouse event. + +If the click is in the echo area, display the `*Messages*' buffer. + +START-EVENT should be the event that started the drag." + (interactive "e") + ;; Give temporary modes such as isearch a chance to turn off. + (run-hooks 'mouse-leave-buffer-hook) + (evil-mouse-drag-track start-event t)) +(evil-set-command-property 'evil-mouse-drag-region :keep-visual t) + +(defun evil-mouse-drag-track (start-event &optional + do-mouse-drag-region-post-process) + "Track mouse drags by highlighting area between point and cursor. +The region will be defined with mark and point. +DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by +`mouse-drag-region'." + (mouse-minibuffer-check start-event) + (setq mouse-selection-click-count-buffer (current-buffer)) + (deactivate-mark) + (let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541). + (original-window (selected-window)) + ;; We've recorded what we needed from the current buffer and + ;; window, now let's jump to the place of the event, where things + ;; are happening. + (_ (mouse-set-point start-event)) + (echo-keystrokes 0) + (start-posn (event-start start-event)) + (start-point (posn-point start-posn)) + (start-window (posn-window start-posn)) + (start-window-start (window-start start-window)) + (start-hscroll (window-hscroll start-window)) + (bounds (window-edges start-window)) + (make-cursor-line-fully-visible nil) + (top (nth 1 bounds)) + (bottom (if (or (window-minibuffer-p start-window) + (not mode-line-format)) + (nth 3 bounds) + ;; Don't count the mode line. + (1- (nth 3 bounds)))) + (on-link (and mouse-1-click-follows-link + (or mouse-1-click-in-non-selected-windows + (eq start-window original-window)) + ;; Use start-point before the intangibility + ;; treatment, in case we click on a link inside an + ;; intangible text. + (mouse-on-link-p start-posn))) + (click-count (1- (event-click-count start-event))) + (remap-double-click (and on-link + (eq mouse-1-click-follows-link 'double) + (= click-count 1))) + ;; Suppress automatic hscrolling, because that is a nuisance + ;; when setting point near the right fringe (but see below). + (auto-hscroll-mode-saved auto-hscroll-mode) + (auto-hscroll-mode nil) + event end end-point) + + (setq mouse-selection-click-count click-count) + ;; In case the down click is in the middle of some intangible text, + ;; use the end of that text, and put it in START-POINT. + (if (< (point) start-point) + (goto-char start-point)) + (setq start-point (point)) + (if remap-double-click + (setq click-count 0)) + + (setq click-count (mod click-count 4)) + + ;; activate correct visual state + (let ((range (evil-mouse-start-end start-point start-point click-count))) + (set-mark (nth 0 range)) + (goto-char (nth 1 range))) + + (cond + ((= click-count 0) + (when (evil-visual-state-p) (evil-exit-visual-state))) + ((= click-count 1) + (evil-visual-char) + (evil-visual-post-command)) + ((= click-count 2) + (evil-visual-line) + (evil-visual-post-command)) + ((= click-count 3) + (evil-visual-block) + (evil-visual-post-command))) + + ;; Track the mouse until we get a non-movement event. + (track-mouse + (while (progn + (setq event (read-key)) + (or (mouse-movement-p event) + (memq (car-safe event) '(switch-frame select-window)))) + (unless (evil-visual-state-p) + (cond + ((= click-count 0) (evil-visual-char)) + ((= click-count 1) (evil-visual-char)) + ((= click-count 2) (evil-visual-line)) + ((= click-count 3) (evil-visual-block)))) + + (evil-visual-pre-command) + (unless (memq (car-safe event) '(switch-frame select-window)) + ;; Automatic hscrolling did not occur during the call to + ;; `read-event'; but if the user subsequently drags the + ;; mouse, go ahead and hscroll. + (let ((auto-hscroll-mode auto-hscroll-mode-saved)) + (redisplay)) + (setq end (event-end event) + end-point (posn-point end)) + (if (and (eq (posn-window end) start-window) + (integer-or-marker-p end-point)) + (evil-mouse--drag-set-mark-and-point start-point + end-point click-count) + (let ((mouse-row (cdr (cdr (mouse-position))))) + (cond + ((null mouse-row)) + ((< mouse-row top) + (mouse-scroll-subr start-window (- mouse-row top) + nil start-point)) + ((>= mouse-row bottom) + (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) + nil start-point)))))) + (evil-visual-post-command))) + + ;; Handle the terminating event if possible. + (when (consp event) + ;; Ensure that point is on the end of the last event. + (when (and (setq end-point (posn-point (event-end event))) + (eq (posn-window end) start-window) + (integer-or-marker-p end-point) + (/= start-point end-point)) + (evil-mouse--drag-set-mark-and-point start-point + end-point click-count)) + + ;; Find its binding. + (let* ((fun (key-binding (vector (car event)))) + (do-multi-click (and (> (event-click-count event) 0) + (functionp fun) + (not (memq fun '(mouse-set-point + mouse-set-region)))))) + (if (and (or (/= (mark) (point)) + (= click-count 1) ; word selection + (and (memq (evil-visual-type) '(line block)))) + (not do-multi-click)) + + ;; If point has moved, finish the drag. + (let (last-command this-command) + (and mouse-drag-copy-region + do-mouse-drag-region-post-process + (let (deactivate-mark) + (evil-visual-expand-region) + (copy-region-as-kill (mark) (point)) + (evil-visual-contract-region)))) + + ;; If point hasn't moved, run the binding of the + ;; terminating up-event. + (if do-multi-click + (goto-char start-point) + (deactivate-mark)) + (when (and (functionp fun) + (= start-hscroll (window-hscroll start-window)) + ;; Don't run the up-event handler if the window + ;; start changed in a redisplay after the + ;; mouse-set-point for the down-mouse event at + ;; the beginning of this function. When the + ;; window start has changed, the up-mouse event + ;; contains a different position due to the new + ;; window contents, and point is set again. + (or end-point + (= (window-start start-window) + start-window-start))) + (when (and on-link + (= start-point (point)) + (evil-mouse--remap-link-click-p start-event event)) + ;; If we rebind to mouse-2, reselect previous selected + ;; window, so that the mouse-2 event runs in the same + ;; situation as if user had clicked it directly. Fixes + ;; the bug reported by juri@jurta.org on 2005-12-27. + (if (or (vectorp on-link) (stringp on-link)) + (setq event (aref on-link 0)) + (select-window original-window) + (setcar event 'mouse-2) + ;; If this mouse click has never been done by the + ;; user, it doesn't have the necessary property to be + ;; interpreted correctly. + (put 'mouse-2 'event-kind 'mouse-click))) + (push event unread-command-events))))))) + +;; This function is a plain copy of `mouse--drag-set-mark-and-point', +;; which is only available in Emacs 24 +(defun evil-mouse--drag-set-mark-and-point (start click click-count) + (let* ((range (evil-mouse-start-end start click click-count)) + (beg (nth 0 range)) + (end (nth 1 range))) + (cond ((eq (mark) beg) + (goto-char end)) + ((eq (mark) end) + (goto-char beg)) + ((< click (mark)) + (set-mark end) + (goto-char beg)) + (t + (set-mark beg) + (goto-char end))))) + +;; This function is a plain copy of `mouse--remap-link-click-p', +;; which is only available in Emacs 23 +(defun evil-mouse--remap-link-click-p (start-event end-event) + (or (and (eq mouse-1-click-follows-link 'double) + (= (event-click-count start-event) 2)) + (and + (not (eq mouse-1-click-follows-link 'double)) + (= (event-click-count start-event) 1) + (= (event-click-count end-event) 1) + (or (not (integerp mouse-1-click-follows-link)) + (let ((t0 (posn-timestamp (event-start start-event))) + (t1 (posn-timestamp (event-end end-event)))) + (and (integerp t0) (integerp t1) + (if (> mouse-1-click-follows-link 0) + (<= (- t1 t0) mouse-1-click-follows-link) + (< (- t0 t1) mouse-1-click-follows-link)))))))) + +(defun evil-mouse-start-end (start end mode) + "Return a list of region bounds based on START and END according to MODE. +If MODE is not 1 then set point to (min START END), mark to (max +START END). If MODE is 1 then set point to start of word at (min +START END), mark to end of word at (max START END)." + (evil-sort start end) + (setq mode (mod mode 4)) + (if (/= mode 1) (list start end) + (list + (save-excursion + (goto-char (min (point-max) (1+ start))) + (if (zerop (forward-thing evil-mouse-word -1)) + (let ((bpnt (point))) + (forward-thing evil-mouse-word +1) + (if (> (point) start) bpnt (point))) + (point-min))) + (save-excursion + (goto-char end) + (1- + (if (zerop (forward-thing evil-mouse-word +1)) + (let ((epnt (point))) + (forward-thing evil-mouse-word -1) + (if (<= (point) end) epnt (point))) + (point-max))))))) + +;;; State switching + +(evil-define-command evil-exit-emacs-state (&optional buffer message) + "Exit Emacs state. +Changes the state to the previous state, or to Normal state +if the previous state was Emacs state." + :keep-visual t + :suppress-operator t + (interactive '(nil t)) + (with-current-buffer (or buffer (current-buffer)) + (when (evil-emacs-state-p) + (evil-change-to-previous-state buffer message) + (when (evil-emacs-state-p) + (evil-normal-state (and message 1)))))) + +(defvar evil-execute-normal-keys nil + "The keys used to invoke the current `evil-execute-in-normal-state'. +Can be used to detect if we are currently in that quasi-state. +With current bindings, it will be \\<evil-insert-state-map>\\[evil-execute-in-normal-state]") + +(evil-define-local-var evil--execute-normal-eol-pos nil + "Vim has special behaviour for executing in normal state at eol. +This var stores the eol position, so it can be restored when necessary.") + +(defun evil--restore-repeat-hooks () + "No insert-state repeat info is recorded after executing in normal state. +Restore the disabled repeat hooks on insert-state exit." + (evil-repeat-stop) + (add-hook 'pre-command-hook 'evil-repeat-pre-hook) + (add-hook 'post-command-hook 'evil-repeat-post-hook) + (remove-hook 'evil-insert-state-exit-hook 'evil--restore-repeat-hooks)) + +(defvar evil--execute-normal-return-state nil + "The state to return to after executing in normal state.") + +(defun evil-execute-in-normal-state () + "Execute the next command in Normal state." + (interactive) + (evil-delay '(not (memq this-command + '(nil + evil-execute-in-normal-state + evil-replace-state + evil-use-register + digit-argument + negative-argument + universal-argument + universal-argument-minus + universal-argument-more + universal-argument-other-key))) + `(progn + (with-current-buffer ,(current-buffer) + (when (and evil--execute-normal-eol-pos + (= (point) (1- evil--execute-normal-eol-pos)) + (not (memq this-command '(evil-insert + evil-goto-mark)))) + (forward-char)) + (unless (memq evil-state '(replace insert)) + (evil-change-state ',evil-state)) + (when (eq 'insert evil-state) + (remove-hook 'pre-command-hook 'evil-repeat-pre-hook) + (remove-hook 'post-command-hook 'evil-repeat-post-hook) + (add-hook 'evil-insert-state-exit-hook 'evil--restore-repeat-hooks)) + (setq evil-move-cursor-back ',evil-move-cursor-back + evil-move-beyond-eol ',evil-move-beyond-eol + evil-execute-normal-keys nil))) + 'post-command-hook) + (setq evil-insert-count nil + evil--execute-normal-return-state evil-state + evil--execute-normal-eol-pos (when (eolp) (point)) + evil-move-cursor-back nil + evil-execute-normal-keys (this-command-keys)) + (evil-normal-state) + (setq evil-move-beyond-eol t) + (evil-echo "Switched to Normal state for the next command ...")) + +(defun evil-stop-execute-in-emacs-state () + (when (and (not (eq this-command #'evil-execute-in-emacs-state)) + (not (minibufferp))) + (remove-hook 'post-command-hook 'evil-stop-execute-in-emacs-state) + (when (buffer-live-p evil-execute-in-emacs-state-buffer) + (with-current-buffer evil-execute-in-emacs-state-buffer + (if (and (eq evil-previous-state 'visual) + (not (use-region-p))) + (progn + (evil-change-to-previous-state) + (evil-exit-visual-state)) + (evil-change-to-previous-state)))) + (setq evil-execute-in-emacs-state-buffer nil))) + +(evil-define-command evil-execute-in-emacs-state () + "Execute the next command in Emacs state." + (add-hook 'post-command-hook #'evil-stop-execute-in-emacs-state t) + (setq evil-execute-in-emacs-state-buffer (current-buffer)) + (cond + ((evil-visual-state-p) + (let ((mrk (mark)) + (pnt (point))) + (evil-emacs-state) + (set-mark mrk) + (goto-char pnt))) + (t + (evil-emacs-state))) + (evil-echo "Switched to Emacs state for the next command ...")) + +(defun evil-exit-visual-and-repeat (event) + "Exit insert state and repeat event. +This special command should be used if some command called from +visual state should actually be called in normal-state. The main +reason for doing this is that the repeat system should *not* +record the visual state information for some command. This +command should be bound to exactly the same event in visual state +as the original command is bound in normal state. EVENT is the +event that triggered the execution of this command." + (interactive "e") + (when (evil-visual-state-p) + (evil-exit-visual-state) + (push event unread-command-events))) +(evil-declare-ignore-repeat 'evil-exit-visual-and-repeat) + +(provide 'evil-commands) + +;;; evil-commands.el ends here diff --git a/elpa/evil-20220510.2302/evil-commands.elc b/elpa/evil-20220510.2302/evil-commands.elc Binary files differnew file mode 100644 index 0000000..1945920 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-commands.elc diff --git a/elpa/evil-20220510.2302/evil-common.el b/elpa/evil-20220510.2302/evil-common.el new file mode 100644 index 0000000..6b9f694 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-common.el @@ -0,0 +1,4073 @@ +;;; evil-common.el --- Common functions and utilities -*- lexical-binding: t -*- +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-vars) +(require 'evil-digraphs) +(require 'rect) +(require 'thingatpt) +(require 'cl-lib) +(require 'calc) + +;;; Code: + +(declare-function evil-visual-state-p "evil-states") +(declare-function evil-visual-restore "evil-states") +(declare-function evil-motion-state "evil-states") +(declare-function evil-ex-p "evil-ex") +(declare-function evil-set-jump "evil-jumps") + +(condition-case nil + (require 'windmove) + (error + (message "evil: Could not load `windmove', \ +window commands not available.") + nil)) + +;;; Compatibility with different Emacs versions + +;; x-set-selection and x-get-selection have been deprecated since 25.1 +;; by gui-set-selection and gui-get-selection +(defalias 'evil-get-selection + (if (fboundp 'gui-get-selection) 'gui-get-selection 'x-get-selection)) +(defalias 'evil-set-selection + (if (fboundp 'gui-set-selection) 'gui-set-selection 'x-set-selection)) + +(defmacro evil-called-interactively-p () + "Wrapper for `called-interactively-p'. +In older versions of Emacs, `called-interactively-p' takes +no arguments. In Emacs 23.2 and newer, it takes one argument." + (called-interactively-p 'any)) +(make-obsolete 'evil-called-interactively-p + "please use (called-interactively-p 'any) instead." + "Git commit 222b791") + +;; macro helper +(eval-and-compile + (defun evil-unquote (exp) + "Return EXP unquoted." + (while (eq (car-safe exp) 'quote) + (setq exp (cadr exp))) + exp)) + +(defun evil-delay (condition form hook &optional append local name) + "Execute FORM when CONDITION becomes true, checking with HOOK. +NAME specifies the name of the entry added to HOOK. If APPEND is +non-nil, the entry is appended to the hook. If LOCAL is non-nil, +the buffer-local value of HOOK is modified." + (if (and (not (booleanp condition)) (eval condition)) + (eval form) + (let* ((name (or name (format "evil-delay-form-in-%s" hook))) + (fun (make-symbol name)) + (condition (or condition t))) + (fset fun `(lambda (&rest args) + (when ,condition + (remove-hook ',hook #',fun ',local) + ,form))) + (put fun 'permanent-local-hook t) + (add-hook hook fun append local)))) +(put 'evil-delay 'lisp-indent-function 2) + +;;; List functions + +(defmacro evil--add-to-alist (list-var &rest elements) + "Add the assocation of KEY and VAL to the value of LIST-VAR. +If the list already contains an entry for KEY, update that entry; +otherwise add at the end of the list. + +\(fn LIST-VAR KEY VAL &rest ELEMENTS)" + (when (eq (car-safe list-var) 'quote) + (setq list-var (cadr list-var))) + `(progn + ,@(if (version< emacs-version "26") + ;; TODO: Remove this path when support for Emacs 25 is dropped + (cl-loop for (key val) on elements by #'cddr + collect `(let* ((key ,key) + (val ,val) + (cell (assoc key ,list-var))) + (if cell + (setcdr cell val) + (push (cons key val) ,list-var)))) + (cl-loop for (key val) on elements by #'cddr + collect `(setf (alist-get ,key ,list-var nil nil #'equal) ,val))) + ,list-var)) + +(defun evil-add-to-alist (list-var key val &rest elements) + "Add the assocation of KEY and VAL to the value of LIST-VAR. +If the list already contains an entry for KEY, update that entry; +otherwise add at the end of the list." + (let ((tail (symbol-value list-var))) + (while (and tail (not (equal (car-safe (car-safe tail)) key))) + (setq tail (cdr tail))) + (if tail + (setcar tail (cons key val)) + (set list-var (append (symbol-value list-var) + (list (cons key val))))) + (if elements + (with-no-warnings + (apply #'evil-add-to-alist list-var elements)) + (symbol-value list-var)))) + +(make-obsolete 'evil-add-to-alist + "use `evil--add-to-alist' instead. You may need to recompile code with evil macros." + "1.13.1") + +;; custom version of `delete-if' +(defun evil-filter-list (predicate list &optional pointer) + "Delete by side-effect all items satisfying PREDICATE in LIST. +Stop when reaching POINTER. If the first item satisfies PREDICATE, +there is no way to remove it by side-effect; therefore, write +\(setq foo (evil-filter-list 'predicate foo)) to be sure of +changing the value of `foo'." + (let ((tail list) elt head) + (while (and tail (not (eq tail pointer))) + (setq elt (car tail)) + (cond + ((funcall predicate elt) + (setq tail (cdr tail)) + (if head + (setcdr head tail) + (setq list tail))) + (t + (setq head tail + tail (cdr tail))))) + list)) + +(defun evil-member-if (predicate list &optional pointer) + "Find the first item satisfying PREDICATE in LIST. +Stop when reaching POINTER, which should point at a link +in the list." + (let (elt) + (catch 'done + (while (and (consp list) (not (eq list pointer))) + (setq elt (car list)) + (if (funcall predicate elt) + (throw 'done elt) + (setq list (cdr list))))))) + +(defun evil-member-recursive-if (predicate tree) + "Find the first item satisfying PREDICATE in TREE." + (cond + ((funcall predicate tree) + tree) + ((listp tree) + (catch 'done + (dolist (elt tree) + (when (setq elt (evil-member-recursive-if predicate elt)) + (throw 'done elt))))))) + +(defun evil-concat-lists (&rest sequences) + "Concatenate lists, removing duplicates. +Elements are compared with `eq'." + (let (result) + (dolist (sequence sequences) + (dolist (elt sequence) + (push elt result))) + (nreverse (cl-remove-duplicates result :test #'eq)))) + +(defun evil-concat-alists (&rest sequences) + "Concatenate association lists, removing duplicates. +An alist is a list of cons cells (KEY . VALUE) where each key +may occur only once. Later values overwrite earlier values." + (let (result) + (dolist (sequence sequences) + (dolist (elt sequence) + (setq result (assq-delete-all (car-safe elt) result)) + (push elt result))) + (nreverse result))) + +(defun evil-concat-plists (&rest sequences) + "Concatenate property lists, removing duplicates. +A property list is a list (:KEYWORD1 VALUE1 :KEYWORD2 VALUE2...) +where each keyword may occur only once. Later values overwrite +earlier values." + (let (result) + (dolist (sequence sequences result) + (while sequence + (setq result + (plist-put result (pop sequence) (pop sequence))))))) + +(defun evil-concat-keymap-alists (&rest sequences) + "Concatenate keymap association lists, removing duplicates. +A keymap alist is a list of cons cells (VAR . MAP) where each keymap +may occur only once, but where the variables may be repeated +\(e.g., (VAR . MAP1) (VAR . MAP2) is allowed). The order matters, +with the highest priority keymaps being listed first." + (let (result) + (dolist (sequence sequences) + (dolist (elt sequence) + (unless (rassq (cdr-safe elt) result) + (push elt result)))) + (nreverse result))) + +(defun evil-plist-delete (prop plist) + "Delete by side effect the property PROP from PLIST. +If PROP is the first property in PLIST, there is no way +to remove it by side-effect; therefore, write +\(setq foo (evil-plist-delete :prop foo)) to be sure of +changing the value of `foo'." + (let ((tail plist) elt head) + (while tail + (setq elt (car tail)) + (cond + ((eq elt prop) + (setq tail (cdr (cdr tail))) + (if head + (setcdr (cdr head) tail) + (setq plist tail))) + (t + (setq head tail + tail (cdr (cdr tail)))))) + plist)) + +(defun evil-get-property (alist key &optional prop) + "Return property PROP for KEY in ALIST. +ALIST is an association list with entries of the form +\(KEY . PLIST), where PLIST is a property list. +If PROP is nil, return all properties for KEY. +If KEY is t, return an association list of keys +and their PROP values." + (cond + ((null prop) + (cdr (assq key alist))) + ((eq key t) + (let (result val) + (dolist (entry alist result) + (setq key (car entry) + val (cdr entry)) + (when (plist-member val prop) + (setq val (plist-get val prop)) + (push (cons key val) result))))) + (t + (plist-get (cdr (assq key alist)) prop)))) + +(defun evil-put-property (alist-var key prop val &rest properties) + "Set PROP to VAL for KEY in ALIST-VAR. +ALIST-VAR points to an association list with entries of the form +\(KEY . PLIST), where PLIST is a property list storing PROP and VAL." + (set alist-var + (let* ((alist (symbol-value alist-var)) + (plist (cdr (assq key alist)))) + (setq plist (plist-put plist prop val)) + (when properties + (setq plist (evil-concat-plists plist properties) + val (car (last properties)))) + (setq alist (assq-delete-all key alist)) + (push (cons key plist) alist))) + val) + +(defun evil-state-property (state prop &optional value) + "Return the value of property PROP for STATE. +PROP is a keyword as used by `evil-define-state'. +STATE is the state's symbolic name. +If VALUE is non-nil and the value is a variable, +return the value of that variable." + (let ((val (evil-get-property evil-state-properties state prop))) + (if (and value (symbolp val) (boundp val)) + (symbol-value val) + val))) + +(defmacro evil-swap (this that &rest vars) + "Swap the values of variables THIS and THAT. +If three or more arguments are given, the values are rotated. +E.g., (evil-swap A B C) sets A to B, B to C, and C to A." + `(progn + (setq ,this (prog1 ,that + (setq ,that ,this))) + ,@(when vars + `((evil-swap ,that ,@vars))))) + +(defmacro evil-sort (min max &rest vars) + "Place the smallest value in MIN and the largest in MAX. +If three or more arguments are given, place the smallest +value in the first argument and the largest in the last, +sorting in between." + (let ((sorted (make-symbol "sortvar"))) + `(let ((,sorted (sort (list ,min ,max ,@vars) '<))) + (setq ,min (pop ,sorted) + ,max (pop ,sorted) + ,@(apply #'append + (mapcar #'(lambda (var) + (list var `(pop ,sorted))) + vars)))))) + +(defun evil-vector-to-string (vector) + "Turns vector into a string, changing <escape> to '\\e'" + (mapconcat (lambda (c) + (if (equal c 'escape) + "\e" + (make-string 1 c))) + vector + "")) + +;;; Command properties + +(defmacro evil-define-command (command &rest body) + "Define a command COMMAND. + +\(fn COMMAND (ARGS...) DOC [[KEY VALUE]...] BODY...)" + (declare (indent defun) + (doc-string 3) + (debug (&define name + [&optional lambda-list] + [&optional stringp] + [&rest keywordp sexp] + [&optional ("interactive" [&rest form])] + def-body))) + (let ((interactive '(interactive)) + arg args doc doc-form key keys) + ;; collect arguments + (when (listp (car-safe body)) + (setq args (pop body))) + ;; collect docstring + (when (> (length body) 1) + (if (eq (car-safe (car-safe body)) 'format) + (setq doc-form (pop body)) + (when (stringp (car-safe body)) + (setq doc (pop body))))) + ;; collect keywords + (setq keys (plist-put keys :repeat t)) + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body)) + (unless nil ; TODO: add keyword check + (setq keys (plist-put keys key arg)))) + ;; collect `interactive' form + (when (and body (consp (car body)) + (eq (car (car body)) 'interactive)) + (let* ((iform (pop body)) + (result (apply #'evil-interactive-form (cdr iform))) + (form (car result)) + (attrs (cdr result))) + (setq interactive `(interactive ,form) + keys (evil-concat-plists keys attrs)))) + `(progn + ;; the compiler does not recognize `defun' inside `let' + ,(when (and command body) + `(defun ,command ,args + ,@(when doc `(,doc)) + ,interactive + (ignore ,@(cl-set-difference args '(&optional &rest))) + ,@body)) + ,(when (and command doc-form) + `(put ',command 'function-documentation ,doc-form)) + ;; set command properties for symbol or lambda function + (let ((func ',(if (and (null command) body) + `(lambda ,args + ,interactive + ,@body) + command))) + (apply #'evil-set-command-properties func ',keys) + func)))) + +;; If no Evil properties are defined for the command, several parts of +;; Evil apply certain default rules; e.g., the repeat system decides +;; whether the command is repeatable by monitoring buffer changes. +(defun evil-has-command-property-p (command property) + "Whether COMMAND has Evil PROPERTY. +See also `evil-has-command-properties-p'." + (plist-member (evil-get-command-properties command) property)) + +(defun evil-has-command-properties-p (command) + "Whether Evil properties are defined for COMMAND. +See also `evil-has-command-property-p'." + (and (evil-get-command-properties command) t)) + +(defun evil-get-command-property (command property &optional default) + "Return the value of Evil PROPERTY of COMMAND. +If the command does not have the property, return DEFAULT. +See also `evil-get-command-properties'." + (if (evil-has-command-property-p command property) + (evil-get-property evil-command-properties command property) + default)) + +(defun evil-get-command-properties (command) + "Return all Evil properties of COMMAND. +See also `evil-get-command-property'." + (evil-get-property evil-command-properties command)) + +(defun evil-set-command-property (command property value) + "Set PROPERTY to VALUE for COMMAND. +To set multiple properties at once, see +`evil-set-command-properties' and `evil-add-command-properties'." + (evil-put-property 'evil-command-properties command property value)) +(defalias 'evil-put-command-property 'evil-set-command-property) + +(defun evil-add-command-properties (command &rest properties) + "Add PROPERTIES to COMMAND. +PROPERTIES should be a property list. +To replace all properties at once, use `evil-set-command-properties'." + (apply #'evil-put-property + 'evil-command-properties command properties)) + +(defun evil-set-command-properties (command &rest properties) + "Replace all of COMMAND's properties with PROPERTIES. +PROPERTIES should be a property list. +This erases all previous properties; to only add properties, +use `evil-set-command-property'." + (setq evil-command-properties + (assq-delete-all command evil-command-properties)) + (when properties + (apply #'evil-add-command-properties command properties))) + +(defun evil-remove-command-properties (command &rest properties) + "Remove PROPERTIES from COMMAND. +PROPERTIES should be a list of properties (:PROP1 :PROP2 ...). +If PROPERTIES is the empty list, all properties are removed." + (let (plist) + (when properties + (setq plist (evil-get-command-properties command)) + (dolist (property properties) + (setq plist (evil-plist-delete property plist)))) + (apply #'evil-set-command-properties command plist))) + +(defun evil-yank-handler (&optional motion) + "Return the yank handler for MOTION. +MOTION defaults to the current motion." + (setq motion (or motion evil-this-motion)) + (evil-get-command-property motion :yank-handler)) + +(defun evil-declare-motion (command) + "Declare COMMAND to be a movement function. +This ensures that it behaves correctly in visual state." + (evil-add-command-properties command :keep-visual t :repeat 'motion)) + +(defun evil-declare-repeat (command) + "Declare COMMAND to be repeatable." + (evil-add-command-properties command :repeat t)) + +(defun evil-declare-not-repeat (command) + "Declare COMMAND to be nonrepeatable." + (evil-add-command-properties command :repeat nil)) + +(defun evil-declare-ignore-repeat (command) + "Declare COMMAND to be nonrepeatable." + (evil-add-command-properties command :repeat 'ignore)) + +(defun evil-declare-change-repeat (command) + "Declare COMMAND to be repeatable by buffer changes rather than +keystrokes." + (evil-add-command-properties command :repeat 'change)) + +(defun evil-declare-insert-at-point-repeat (command) + "Declare COMMAND to be repeatable by buffer changes." + (evil-add-command-properties command :repeat 'insert-at-point)) + +(defun evil-declare-abort-repeat (command) + "Declare COMMAND to be nonrepeatable." + (evil-add-command-properties command :repeat 'abort)) + +(defun evil-delimited-arguments (string &optional num) + "Parse STRING as a sequence of delimited arguments. +Returns a list of NUM strings, or as many arguments as +the string contains. The first non-blank character is +taken to be the delimiter. If some arguments are missing +from STRING, the resulting list is padded with nil values. +Two delimiters following directly after each other gives +an empty string." + (save-match-data + (let ((string (or string "")) + (count (or num -1)) (idx 0) + argument delim match result) + (when (string-match "^[[:space:]]*\\([^[:space:]]\\)" string) + (setq delim (match-string 1 string) + argument (format "%s\\(\\(?:[\\].\\|[^%s]\\)*\\)" + (regexp-quote delim) + delim)) + (while (and (/= count 0) (string-match argument string idx)) + (setq match (match-string 1 string) + idx (match-end 1) + count (1- count)) + (when (= count 0) + (unless (save-match-data + (string-match + (format "%s[[:space:]]*$" delim) string idx)) + (setq match (substring string (match-beginning 1))))) + (unless (and (zerop (length match)) + (zerop (length (substring string idx)))) + (push match result)))) + (when (and num (< (length result) num)) + (dotimes (_ (- num (length result))) + (push nil result))) + (nreverse result)))) + +(defun evil-concat-charsets (&rest sets) + "Concatenate character sets. +A character set is the part between [ and ] in a regular expression. +If any character set is complemented, the result is also complemented." + (let ((bracket "") (complement "") (hyphen "") result) + (save-match-data + (dolist (set sets) + (when (string-match-p "^\\^" set) + (setq set (substring set 1) + complement "^")) + (when (string-match-p "^]" set) + (setq set (substring set 1) + bracket "]")) + (when (string-match-p "^-" set) + (setq set (substring set 1) + hyphen "-")) + (setq result (concat result set))) + (format "%s%s%s%s" complement bracket hyphen result)))) + +;;; Key sequences + +(defun evil-keypress-parser (&optional input) + "Read from keyboard or INPUT and build a command description. +Returns (CMD COUNT), where COUNT is the numeric prefix argument. +Both COUNT and CMD may be nil." + (let (count negative) + (when input (setq unread-command-events (append input unread-command-events))) + (catch 'done + (while t + (let ((seq (read-key-sequence ""))) + (when seq + (let ((cmd (key-binding seq))) + (cond + ((null cmd) (throw 'done (list nil nil))) + ((arrayp cmd) ; keyboard macro, recursive call + (let ((cmd (evil-keypress-parser cmd))) + (throw 'done + (list (car cmd) + (if (or count (cadr cmd)) + (list (car cmd) (* (or count 1) + (or (cadr cmd) 1)))))))) + ((or (eq cmd #'digit-argument) + (and (equal seq "0") + count)) + (let* ((event (aref seq (- (length seq) 1))) + (char (or (when (characterp event) event) + (when (symbolp event) + (get event 'ascii-character)))) + (digit (if (or (characterp char) (integerp char)) + (- (logand char ?\177) ?0)))) + (setq count (+ (* 10 (or count 0)) digit)))) + ((eq cmd #'negative-argument) + (setq negative (not negative))) + (t + (throw 'done (list cmd + (and count + (* count + (if negative -1 1)))))))))))))) + +(defun evil-read-key (&optional prompt) + "Read a key from the keyboard. +Translates it according to the input method." + (let ((old-global-map (current-global-map)) + (new-global-map (make-sparse-keymap)) + (overriding-terminal-local-map nil) + (overriding-local-map evil-read-key-map) + seq char cmd) + (unwind-protect + (condition-case nil + (progn + (define-key new-global-map [menu-bar] + (lookup-key global-map [menu-bar])) + (define-key new-global-map [tab-bar] + (lookup-key global-map [tab-bar])) + (define-key new-global-map [tool-bar] + (lookup-key global-map [tool-bar])) + (setq new-global-map + (append new-global-map + (list (make-char-table 'display-table + 'self-insert-command)))) + (use-global-map new-global-map) + (setq seq (read-key-sequence prompt nil t) + char (aref seq 0) + cmd (key-binding seq)) + (while (arrayp cmd) + (setq char (aref cmd 0) + cmd (key-binding cmd))) + (cond + ((eq cmd 'self-insert-command) + char) + (cmd + (call-interactively cmd)) + (t + (user-error "No replacement character typed")))) + (quit + (when (fboundp 'evil-repeat-abort) + (evil-repeat-abort)) + (signal 'quit nil))) + (use-global-map old-global-map)))) + +(defun evil-read-quoted-char () + "Command that calls `read-quoted-char'. +This command can be used wherever `read-quoted-char' is required +as a command. Its main use is in the `evil-read-key-map'." + (interactive) + (read-quoted-char)) + +(defun evil-read-digraph-char-with-overlay (overlay) + "Read two chars, displaying the first in OVERLAY, replacing `?'. +Return the digraph from `evil-digraph', else return second char." + (interactive) + (let (char1 char2 string) + (unwind-protect + (progn + (overlay-put overlay 'invisible t) + ;; create overlay prompt + (setq string (propertize "?" + 'face 'minibuffer-prompt + 'cursor 1)) + (overlay-put overlay 'after-string string) + (setq char1 (read-key)) + (setq string (propertize (string char1) + 'face 'minibuffer-prompt + 'cursor 1)) + (overlay-put overlay 'after-string string) + (setq char2 (read-key))) + (delete-overlay overlay)) + (or (evil-digraph (list char1 char2)) + ;; use the last character if undefined + char2))) + +(defun evil-read-digraph-char (&optional hide-chars) + "Read two keys from keyboard forming a digraph. +This function creates an overlay at (point), hiding the next +HIDE-CHARS characters. HIDE-CHARS defaults to 1." + (interactive) + (let ((overlay (make-overlay (point) + (min (point-max) + (+ (or hide-chars 1) + (point)))))) + (evil-read-digraph-char-with-overlay overlay))) + +(defun evil-read-motion (&optional motion count type modifier) + "Read a MOTION, motion COUNT and motion TYPE from the keyboard. +The type may be overridden with MODIFIER, which may be a type +or a Visual selection as defined by `evil-define-visual-selection'. +Return a list (MOTION COUNT [TYPE])." + (let (command prefix) + (setq evil-this-type-modified nil) + (unless motion + (while (progn + (setq command (evil-keypress-parser) + motion (pop command) + prefix (pop command)) + (when prefix + (if count + (setq count (string-to-number + (concat (number-to-string count) + (number-to-string prefix)))) + (setq count prefix))) + ;; if the command is a type modifier, read more + (when (rassq motion evil-visual-alist) + (setq modifier + (or modifier + (car (rassq motion evil-visual-alist)))))))) + (when modifier + (setq type (or type (evil-type motion 'exclusive))) + (cond + ((eq modifier 'char) + ;; TODO: this behavior could be less hard-coded + (if (eq type 'exclusive) + (setq type 'inclusive) + (setq type 'exclusive))) + (t + (setq type modifier))) + (setq evil-this-type-modified type)) + (list motion count type))) + +(defun evil-mouse-events-p (keys) + "Returns non-nil iff KEYS contains a mouse event." + (catch 'done + (dotimes (i (length keys)) + (when (or (and (fboundp 'mouse-event-p) + (mouse-event-p (aref keys i))) + (mouse-movement-p (aref keys i))) + (throw 'done t))) + nil)) + +(defun evil-extract-count (keys) + "Splits the key-sequence KEYS into prefix-argument and the rest. +Returns the list (PREFIX CMD SEQ REST), where PREFIX is the +prefix count, CMD the command to be executed, SEQ the subsequence +calling CMD, and REST is all remaining events in the +key-sequence. PREFIX and REST may be nil if they do not exist. +If a command is bound to some keyboard macro, it is expanded +recursively." + (catch 'done + (let* ((len (length keys)) + (beg 0) + (end 1) + (found-prefix nil)) + (while (and (<= end len)) + (let* ((seq (substring keys beg end)) + (cmd (key-binding seq))) + (cond + ((memq cmd '(undefined nil)) + (user-error "No command bound to %s" seq)) + ((arrayp cmd) ; keyboard macro, replace command with macro + (setq keys (vconcat (substring keys 0 beg) + cmd + (substring keys end)) + end (1+ beg) + len (length keys))) + ((functionp cmd) + (if (or (memq cmd '(digit-argument negative-argument)) + (and found-prefix + (equal (vconcat seq) (vector ?0)))) + ;; skip those commands + (setq found-prefix t ; found at least one prefix argument + beg end + end (1+ end)) + ;; a real command, finish + (throw 'done + (list (unless (zerop beg) + (string-to-number + (concat (substring keys 0 beg)))) + cmd + seq + (when (< end len) + (substring keys end)))))) + (t ; append a further event + (setq end (1+ end)))))) + (user-error "Key sequence contains no complete binding")))) + +(defun evil-extract-append (file-or-append) + "Return an (APPEND . FILENAME) pair based on FILE-OR-APPEND. +FILE-OR-APPEND should either be a filename or a \">> FILE\" +directive. APPEND will be t if FILE-OR-APPEND is an append +directive and nil otherwise. FILENAME will be the extracted +filename." + (if (and (stringp file-or-append) + (string-match "\\(>> *\\)" file-or-append)) + (cons t (substring file-or-append(match-end 1))) + (cons nil file-or-append))) + +(defun evil-set-keymap-prompt (map prompt) + "Set the prompt-string of MAP to PROMPT." + (delq (keymap-prompt map) map) + (when prompt + (setcdr map (cons prompt (cdr map))))) + +(defun evil-lookup-key (map key) + "Returns non-nil value if KEY is bound in MAP." + (let ((definition (lookup-key map key))) + (if (numberp definition) ; in-band error + nil + definition))) + +;;; Display + +(defun evil-set-cursor (specs) + "Change the cursor's apperance according to SPECS. +SPECS may be a cursor type as per `cursor-type', a color +string as passed to `set-cursor-color', a zero-argument +function for changing the cursor, or a list of the above." + (unless (and (not (functionp specs)) + (listp specs) + (null (cdr-safe (last specs)))) + (setq specs (list specs))) + (dolist (spec specs) + (cond + ((functionp spec) + (condition-case nil + (funcall spec) + (error nil))) + ((stringp spec) + (evil-set-cursor-color spec)) + (t + (setq cursor-type spec))))) + +(defun evil-set-cursor-color (color) + "Set the cursor color to COLOR." + (unless (equal (frame-parameter nil 'cursor-color) color) + ;; `set-cursor-color' forces a redisplay, so only + ;; call it when the color actually changes + (set-cursor-color color))) + +(defun evil-refresh-cursor (&optional state buffer) + "Refresh the cursor for STATE in BUFFER. +BUFFER defaults to the current buffer. If STATE is nil the +cursor type is either `evil-force-cursor' or the current state." + (when (and (boundp 'evil-local-mode) evil-local-mode) + (let* ((state (or state evil-force-cursor evil-state 'normal)) + (default (or evil-default-cursor t)) + (cursor (evil-state-property state :cursor t)) + (color (or (and (stringp cursor) cursor) + (and (listp cursor) + (evil-member-if #'stringp cursor)) + (frame-parameter nil 'cursor-color)))) + (with-current-buffer (or buffer (current-buffer)) + ;; if both STATE and `evil-default-cursor' + ;; specify a color, don't set it twice + (when (and color (listp default)) + (setq default (evil-filter-list #'stringp default))) + (evil-set-cursor default) + (evil-set-cursor cursor))))) + +(defmacro evil-save-cursor (&rest body) + "Save the current cursor; execute BODY; restore the cursor." + (declare (indent defun) + (debug t)) + `(let ((cursor cursor-type) + (color (frame-parameter (selected-frame) 'cursor-color)) + (inhibit-quit t)) + (unwind-protect + (progn ,@body) + (evil-set-cursor cursor) + (evil-set-cursor color)))) + +(defun evil-echo (string &rest args) + "Display an unlogged message in the echo area. +That is, the message is not logged in the *Messages* buffer. +\(To log the message, just use `message'.)" + (unless evil-no-display + (let (message-log-max) + (apply #'message string args)))) + +(defun evil-echo-area-save () + "Save the current echo area in `evil-echo-area-message'." + (setq evil-echo-area-message (current-message))) + +(defun evil-echo-area-restore () + "Restore the echo area from `evil-echo-area-message'. +Does not restore if `evil-write-echo-area' is non-nil." + (unless evil-write-echo-area + (if evil-echo-area-message + (message "%s" evil-echo-area-message) + (message nil))) + (setq evil-echo-area-message nil + evil-write-echo-area nil)) + +;; toggleable version of `with-temp-message' +(defmacro evil-save-echo-area (&rest body) + "Save the echo area; execute BODY; restore the echo area. +Intermittent messages are not logged in the *Messages* buffer." + (declare (indent defun) + (debug t)) + `(let ((inhibit-quit t) + evil-echo-area-message + evil-write-echo-area) + (unwind-protect + (progn + (evil-echo-area-save) + ,@body) + (evil-echo-area-restore)))) + +(defmacro evil-without-display (&rest body) + "Execute BODY without Evil displays. +Inhibits echo area messages, mode line updates and cursor changes." + (declare (indent defun) + (debug t)) + `(let ((evil-no-display t)) + ,@body)) + +(defvar evil-cached-header-line-height nil + "Cached height of the header line. +Used for fallback implementation on older Emacsen.") + +(defun evil-header-line-height () + "Return the height of the header line. +If there is no header line, return 0. +Used as a fallback implementation of `window-header-line-height' on +older Emacsen." + (let ((posn (posn-at-x-y 0 0))) + (or (when (eq (posn-area posn) 'header-line) + (cdr (posn-object-width-height posn))) + 0))) + +(defun evil-posn-x-y (position) + "Return the x and y coordinates in POSITION. +This function returns y offset from the top of the buffer area including +the header line and the tab line (on Emacs 27 and later versions). + +On Emacs 24 and later versions, the y-offset returned by +`posn-at-point' is relative to the text area excluding the header +line and the tab line, while y offset taken by `posn-at-x-y' is relative to +the buffer area including the header line and the tab line. +This asymmetry is by design according to GNU Emacs team. +This function fixes the asymmetry between them. + +Learned from mozc.el." + (let ((xy (posn-x-y position))) + (when header-line-format + (setcdr xy (+ (cdr xy) + (or (and (fboundp 'window-header-line-height) + (window-header-line-height)) + evil-cached-header-line-height + (setq evil-cached-header-line-height (evil-header-line-height)))))) + (when (fboundp 'window-tab-line-height) + (setcdr xy (+ (cdr xy) (window-tab-line-height)))) + xy)) + +(defun evil-count-lines (beg end) + "Return absolute line-number-difference betweeen `beg` and `end`. +This should give the same results no matter where on the line `beg` +and `end` are." + (if (= beg end) + 0 + (let* ((last (max beg end)) + (end-at-bol (save-excursion (goto-char last) + (bolp)))) + (if end-at-bol + (count-lines beg end) + (1- (count-lines beg end)))))) + +;;; Movement + +(defun evil-normalize-position (pos) + "Return POS if it does not exceed the buffer boundaries. +If POS is less than `point-min', return `point-min'. +Is POS is more than `point-max', return `point-max'. +If POS is a marker, return its position." + (cond + ((not (number-or-marker-p pos)) + pos) + ((< pos (point-min)) + (point-min)) + ((> pos (point-max)) + (point-max)) + ((markerp pos) + (marker-position pos)) + (t + pos))) + +(defmacro evil-save-goal-column (&rest body) + "Restores the goal column after execution of BODY. +See also `evil-save-column'." + (declare (indent defun) + (debug t)) + `(let ((goal-column goal-column) + (temporary-goal-column temporary-goal-column)) + ,@body)) + +(defmacro evil-save-column (&rest body) + "Restores the column after execution of BODY. +See also `evil-save-goal-column'." + (declare (indent defun) + (debug t)) + `(let ((col (current-column))) + (evil-save-goal-column + ,@body + (move-to-column col)))) + +(defun evil--stick-to-eol-p () + "Called by vertical movement commands to help determine cursor position." + (let ((goal-col (or goal-column + (if (consp temporary-goal-column) + (car temporary-goal-column) + temporary-goal-column)))) + (and evil-track-eol + (= most-positive-fixnum goal-col) + (eq last-command 'next-line)))) + +(defun evil-eolp () + "Like `eolp' but accounts for `evil-move-beyond-eol' being nil." + (ignore-errors + (save-excursion + (unless (or evil-move-beyond-eol (memq evil-state '(insert replace))) + (forward-char)) + (eolp)))) + +(defmacro evil-ensure-column (&rest body) + "Execute BODY so that column after execution is correct. +If `evil-start-of-line' is nil, treat BODY as if it were a `next-line' command. +This mostly copies the approach of Emacs' `line-move-1', but is modified +so it is more compatible with evil's notions of eol & tracking." + (declare (indent defun) + (debug t)) + (let ((normalize-temporary-goal-column + `(if (consp temporary-goal-column) + ;; Ensure a negative value is never set for `temporary-goal-column' + ;; as it may have a negative component when both `whitespace-mode' + ;; and `display-line-numbers-mode' are enabled. + ;; See #1297 + (setq temporary-goal-column (max 0 (+ (car temporary-goal-column) + (cdr temporary-goal-column))))))) + `(progn + (unless evil-start-of-line (setq this-command 'next-line)) + ,normalize-temporary-goal-column + (if (not (memq last-command '(next-line previous-line))) + (setq temporary-goal-column + (if (and evil-track-eol + (evil-eolp) + (memq real-last-command '(move-end-of-line evil-end-of-line))) + most-positive-fixnum + (current-column)))) + ,@body + (if evil-start-of-line + (evil-first-non-blank) + ,normalize-temporary-goal-column + (line-move-to-column (truncate (or goal-column temporary-goal-column))))))) + +(defun evil-narrow (beg end) + "Restrict the buffer to BEG and END. +BEG or END may be nil, specifying a one-sided restriction including +`point-min' or `point-max'. See also `evil-with-restriction.'" + (setq beg (or (evil-normalize-position beg) (point-min))) + (setq end (or (evil-normalize-position end) (point-max))) + (narrow-to-region beg end)) + +(defmacro evil-with-restriction (beg end &rest body) + "Execute BODY with the buffer narrowed to BEG and END. +BEG or END may be nil as passed to `evil-narrow'; this creates +a one-sided restriction." + (declare (indent 2) + (debug t)) + `(save-restriction + (let ((evil-restriction-stack + (cons (cons (point-min) (point-max)) evil-restriction-stack))) + (evil-narrow ,beg ,end) + ,@body))) + +(defmacro evil-without-restriction (&rest body) + "Execute BODY with the top-most narrowing removed. +This works only if the previous narrowing has been generated by +`evil-with-restriction'." + (declare (indent defun) + (debug t)) + `(save-restriction + (widen) + (narrow-to-region (car (car evil-restriction-stack)) + (cdr (car evil-restriction-stack))) + (let ((evil-restriction-stack (cdr evil-restriction-stack))) + ,@body))) + +(defmacro evil-narrow-to-field (&rest body) + "Narrow to the current field." + (declare (indent defun) + (debug t)) + `(evil-with-restriction (field-beginning) (field-end) + ,@body)) + +(defun evil-move-beginning-of-line (&optional arg) + "Move to the beginning of the line as displayed. +Like `move-beginning-of-line', but retains the goal column." + (evil-save-goal-column + (move-beginning-of-line arg) + (beginning-of-line))) + +(defun evil-move-end-of-line (&optional arg) + "Move to the end of the line as displayed. +Like `move-end-of-line', but retains the goal column." + (evil-save-goal-column + (move-end-of-line arg) + (end-of-line))) + +(defun evil-adjust-cursor (&optional _) + "Move point one character back if at the end of a non-empty line. +This behavior is controled by `evil-move-beyond-eol'." + (when (and (eolp) + (not evil-move-beyond-eol) + (not (bolp)) + (= (point) + (save-excursion + (evil-move-end-of-line) + (point)))) + (evil-move-cursor-back t))) + +(defun evil-move-cursor-back (&optional force) + "Move point one character back within the current line. +Contingent on the variable `evil-move-cursor-back' or the FORCE +argument. Honors field boundaries, i.e., constrains the movement +to the current field as recognized by `line-beginning-position'." + (when (or evil-move-cursor-back force) + (unless (or (= (point) (line-beginning-position)) + (and (boundp 'visual-line-mode) + visual-line-mode + (= (point) (save-excursion + (beginning-of-visual-line) + (point))))) + (backward-char)))) + +(defun evil-line-position (line &optional column) + "Return the position of LINE. +If COLUMN is specified, return its position on the line. +A negative number means the end of the line." + (save-excursion + (when (fboundp 'evil-goto-line) + (evil-goto-line line)) + (if (numberp column) + (if (< column 0) + (beginning-of-line 2) + (move-to-column column)) + (beginning-of-line)) + (point))) + +(defun evil-column (&optional pos) + "Return the horizontal position of POS. +POS defaults to point." + (save-excursion + (when pos + (goto-char pos)) + (current-column))) + +(defun evil-move-to-column (column &optional dir force) + "Move point to column COLUMN in the current line. +Places point at left of the tab character (at the right if DIR +is non-nil) and returns point." + (interactive "p") + (move-to-column column force) + (unless force + (when (or (not dir) (and (numberp dir) (< dir 1))) + (when (> (current-column) column) + (evil-move-cursor-back)))) + (point)) + +(defmacro evil-loop (spec &rest body) + "Loop with countdown variable. +Evaluate BODY with VAR counting down from COUNT to 0. +COUNT can be negative, in which case VAR counts up instead. +The return value is the value of VAR when the loop +terminates, which is 0 if the loop completes successfully. +RESULT specifies a variable for storing this value. + +\(fn (VAR COUNT [RESULT]) BODY...)" + (declare (indent defun) + (debug dolist)) + (let* ((i (make-symbol "loopvar")) + (var (pop spec)) + (count (pop spec)) + (result (pop spec))) + (setq var (or (unless (eq var result) var) i) + result (or result var)) + `(let ((,var ,count)) + (setq ,result ,var) + (while (/= ,var 0) + ,@body + (if (> ,var 0) + (setq ,var (1- ,var)) + (setq ,var (1+ ,var))) + (setq ,result ,var)) + ,var))) + +;;; Motions + +(defmacro evil-motion-loop (spec &rest body) + "Loop a certain number of times. +Evaluate BODY repeatedly COUNT times with VAR bound to 1 or -1, +depending on the sign of COUNT. RESULT, if specified, holds +the number of unsuccessful iterations, which is 0 if the loop +completes successfully. This is also the return value. + +Each iteration must move point; if point does not change, +the loop immediately quits. See also `evil-loop'. + +\(fn (VAR COUNT [RESULT]) BODY...)" + (declare (indent defun) + (debug ((symbolp form &optional symbolp) body))) + (let* ((var (or (pop spec) (make-symbol "unitvar"))) + (countval (or (pop spec) 0)) + (result (pop spec)) + (i (make-symbol "loopvar")) + (count (make-symbol "countvar")) + (done (make-symbol "donevar")) + (orig (make-symbol "origvar"))) + `(let* ((,count ,countval) + (,var (if (< ,count 0) -1 1))) + (catch ',done + (evil-loop (,i ,count ,result) + (let ((,orig (point))) + ,@body + (when (= (point) ,orig) + (throw ',done ,i)))))))) + +(defmacro evil-signal-without-movement (&rest body) + "Catches errors provided point moves within this scope." + (declare (indent defun) + (debug t)) + `(let ((p (point))) + (condition-case err + (progn ,@body) + (error + (when (= p (point)) + (signal (car err) (cdr err))))))) + +(defun evil-signal-at-bob-or-eob (&optional count) + "Signals error if `point' is at boundaries. +If `point' is at bob and COUNT is negative this function signal +'beginning-of-buffer. If `point' is at eob and COUNT is positive +this function singal 'end-of-buffer. This function should be used +in motions. COUNT defaults to 1." + (setq count (or count 1)) + (cond + ((< count 0) (evil-signal-at-bob)) + ((> count 0) (evil-signal-at-eob)))) + +(defun evil-signal-at-bob () + "Signals 'beginning-of-buffer if `point' is at bob. +This function should be used in backward motions. If `point' is at +bob so that no further backward motion is possible the error +'beginning-of-buffer is raised." + (when (bobp) (signal 'beginning-of-buffer nil))) + +(defun evil-signal-at-eob () + "Signals 'end-of-buffer if `point' is at eob. +This function should be used in forward motions. If `point' is close +to eob so that no further forward motion is possible the error +'end-of-buffer is raised. This is the case if `point' is at +`point-max' or if is one position before `point-max', +`evil-move-beyond-eol' is nil and `point' is not at the end +of a line. The latter is necessary because `point' cannot be +moved to `point-max' if `evil-move-beyond-eol' is nil and +the last line in the buffer is not empty." + (when (or (eobp) + (and (not (eolp)) + (not evil-move-beyond-eol) + (save-excursion (forward-char) (eobp)))) + (signal 'end-of-buffer nil))) + +(defmacro evil-with-hproject-point-on-window (&rest body) + "Project point after BODY to current window. +If point is on a position left or right of the current window +then it is moved to the left and right boundary of the window, +respectively. If `auto-hscroll-mode' is non-nil then the left and +right positions are increased or decreased, respectively, by +`horizontal-margin' so that no automatic scrolling occurs." + (declare (indent defun) + (debug t)) + (let ((diff (make-symbol "diff")) + (left (make-symbol "left")) + (right (make-symbol "right"))) + `(let ((,diff (if auto-hscroll-mode (1+ hscroll-margin) 0)) + auto-hscroll-mode) + ,@body + (let* ((,left (+ (window-hscroll) ,diff)) + (,right (+ (window-hscroll) (window-width) (- ,diff) -1))) + (move-to-column (min (max (current-column) ,left) ,right)))))) + +(defun evil-goto-min (&rest positions) + "Go to the smallest position in POSITIONS. +Non-numerical elements are ignored. +See also `evil-goto-max'." + (when (setq positions (evil-filter-list + #'(lambda (elt) + (not (number-or-marker-p elt))) + positions)) + (goto-char (apply #'min positions)))) + +(defun evil-goto-max (&rest positions) + "Go to the largest position in POSITIONS. +Non-numerical elements are ignored. +See also `evil-goto-min'." + (when (setq positions (evil-filter-list + #'(lambda (elt) + (not (number-or-marker-p elt))) + positions)) + (goto-char (apply #'max positions)))) + +(defun evil-forward-not-thing (thing &optional count) + "Move point to the end or beginning of the complement of THING." + (evil-motion-loop (dir (or count 1)) + (let (bnd) + (cond + ((> dir 0) + (while (and (setq bnd (bounds-of-thing-at-point thing)) + (< (point) (cdr bnd))) + (goto-char (cdr bnd))) + ;; no thing at (point) + (if (zerop (forward-thing thing)) + ;; now at the end of the next thing + (let ((bnd (bounds-of-thing-at-point thing))) + (if (or (< (car bnd) (point)) ; end of a thing + (= (car bnd) (cdr bnd))) ; zero width thing + (goto-char (car bnd)) + ;; beginning of yet another thing, go back + (forward-thing thing -1))) + (goto-char (point-max)))) + (t + (while (and (not (bobp)) + (or (backward-char) t) + (setq bnd (bounds-of-thing-at-point thing)) + (< (point) (cdr bnd))) + (goto-char (car bnd))) + ;; either bob or no thing at point + (goto-char + (if (and (not (bobp)) + (zerop (forward-thing thing -1)) + (setq bnd (bounds-of-thing-at-point thing))) + (cdr bnd) + (point-min)))))))) + +(defun evil-bounds-of-not-thing-at-point (thing &optional which) + "Returns the bounds of a complement of THING at point. +If there is a THING at point nil is returned. Otherwise if WHICH +is nil or 0 a cons cell (BEG . END) is returned. If WHICH is +negative the beginning is returned. If WHICH is positive the END +is returned." + (let ((pnt (point))) + (let ((beg (save-excursion + (and (zerop (forward-thing thing -1)) + (forward-thing thing)) + (if (> (point) pnt) (point-min) (point)))) + (end (save-excursion + (and (zerop (forward-thing thing)) + (forward-thing thing -1)) + (if (< (point) pnt) (point-max) (point))))) + (when (and (<= beg (point)) (<= (point) end) (< beg end)) + (cond + ((or (not which) (zerop which)) (cons beg end)) + ((< which 0) beg) + ((> which 0) end)))))) + +(defun evil-forward-nearest (count &rest forwards) + "Moves point forward to the first of several motions. +FORWARDS is a list of forward motion functions (i.e. each moves +point forward to the next end of a text object (if passed a +1) +or backward to the preceeding beginning of a text object (if +passed a -1)). This function calls each of these functions once +and moves point to the nearest of the resulting positions. If +COUNT is positive point is moved forward COUNT times, if negative +point is moved backward -COUNT times." + (evil-motion-loop (dir (or count 1)) + (let ((pnt (point)) + (nxt (if (> dir 0) (point-max) (point-min)))) + (dolist (fwd forwards) + (goto-char pnt) + (condition-case nil + (evil-with-restriction + (and (< dir 0) + (save-excursion + (goto-char nxt) + (line-beginning-position 0))) + (and (> dir 0) + (save-excursion + (goto-char nxt) + (line-end-position 2))) + (if (and (zerop (funcall fwd dir)) + (/= (point) pnt) + (or (and (> dir 0) (< (point) nxt)) + (and (< dir 0) (> (point) nxt)))) + (setq nxt (point)))) + (error))) + (goto-char nxt)))) + +(defun bounds-of-evil-string-at-point (&optional state) + "Return the bounds of a string at point. +If STATE is given it used a parsing state at point." + (save-excursion + (let ((state (or state (syntax-ppss)))) + (and (nth 3 state) + (cons (nth 8 state) + (and (parse-partial-sexp (point) + (point-max) + nil + nil + state + 'syntax-table) + (point))))))) +(put 'evil-string 'bounds-of-thing-at-point #'bounds-of-evil-string-at-point) + +(defun bounds-of-evil-comment-at-point () + "Return the bounds of a string at point." + (save-excursion + (let ((state (syntax-ppss))) + (and (nth 4 state) + (cons (nth 8 state) + (and (parse-partial-sexp (point) + (point-max) + nil + nil + state + 'syntax-table) + (point))))))) +(put 'evil-comment 'bounds-of-thing-at-point #'bounds-of-evil-comment-at-point) + +;; The purpose of this function is to provide line motions which +;; preserve the column. This is how `previous-line' and `next-line' +;; work, but unfortunately the behaviour is hard-coded: if and only if +;; the last command was `previous-line' or `next-line', the column is +;; preserved. Furthermore, in contrast to Vim, when we cannot go +;; further, those motions move point to the beginning resp. the end of +;; the line (we never want point to leave its column). The code here +;; comes from simple.el, and I hope it will work in future. +(defun evil-line-move (count &optional noerror) + "A wrapper for line motions which conserves the column. +Signals an error at buffer boundaries unless NOERROR is non-nil." + (cond + (noerror + (condition-case nil + (evil-line-move count) + (error nil))) + (t + (evil-signal-without-movement + (setq this-command (if (>= count 0) + #'next-line + #'previous-line)) + (let ((opoint (point))) + (condition-case err + (with-no-warnings + (funcall this-command (abs count))) + ((beginning-of-buffer end-of-buffer) + (let ((col (or goal-column + (if (consp temporary-goal-column) + (car temporary-goal-column) + temporary-goal-column)))) + (if line-move-visual + (vertical-motion (cons col 0)) + (line-move-finish col opoint (< count 0))) + ;; Maybe we should just `ding'? + (signal (car err) (cdr err)))))))))) + +(defun evil-forward-syntax (syntax &optional count) + "Move point to the end or beginning of a sequence of characters in +SYNTAX. +Stop on reaching a character not in SYNTAX." + (let ((notsyntax (if (= (aref syntax 0) ?^) + (substring syntax 1) + (concat "^" syntax)))) + (evil-motion-loop (dir (or count 1)) + (cond + ((< dir 0) + (skip-syntax-backward notsyntax) + (skip-syntax-backward syntax)) + (t + (skip-syntax-forward notsyntax) + (skip-syntax-forward syntax)))))) + +(defun evil-forward-chars (chars &optional count) + "Move point to the end or beginning of a sequence of CHARS. +CHARS is a character set as inside [...] in a regular expression." + (let ((notchars (if (= (aref chars 0) ?^) + (substring chars 1) + (concat "^" chars)))) + (evil-motion-loop (dir (or count 1)) + (cond + ((< dir 0) + (skip-chars-backward notchars) + (skip-chars-backward chars)) + (t + (skip-chars-forward notchars) + (skip-chars-forward chars)))))) + +(defun evil-up-block (beg end &optional count) + "Move point to the end or beginning of text enclosed by BEG and END. +BEG and END should be regular expressions matching the opening +and closing delimiters, respectively. If COUNT is greater than +zero point is moved forward otherwise it is moved +backwards. Whenever an opening delimiter is found the COUNT is +increased by one, if a closing delimiter is found the COUNT is +decreased by one. The motion stops when COUNT reaches zero. The +match-data reflects the last successful match (that caused COUNT +to reach zero). The behaviour of this functions is similar to +`up-list'." + (let* ((count (or count 1)) + (forwardp (> count 0)) + (dir (if forwardp +1 -1))) + (catch 'done + (while (not (zerop count)) + (let* ((pnt (point)) + (cl (save-excursion + (and (re-search-forward (if forwardp end beg) nil t dir) + (or (/= pnt (point)) + (progn + ;; zero size match, repeat search from + ;; the next position + (forward-char dir) + (re-search-forward (if forwardp end beg) nil t dir))) + (point)))) + (match (match-data t)) + (op (save-excursion + (and (not (equal beg end)) + (re-search-forward (if forwardp beg end) cl t dir) + (or (/= pnt (point)) + (progn + ;; zero size match, repeat search from + ;; the next position + (forward-char dir) + (re-search-forward (if forwardp beg end) cl t dir))) + (point))))) + (cond + ((not cl) + (goto-char (if forwardp (point-max) (point-min))) + (set-match-data nil) + (throw 'done count)) + (t + (if op + (progn + (setq count (if forwardp (1+ count) (1- count))) + (goto-char op)) + (setq count (if forwardp (1- count) (1+ count))) + (if (zerop count) (set-match-data match)) + (goto-char cl)))))) + 0))) + +(defun evil-up-paren (open close &optional count) + "Move point to the end or beginning of balanced parentheses. +OPEN and CLOSE should be characters identifying the opening and +closing parenthesis, respectively. If COUNT is greater than zero +point is moved forward otherwise it is moved backwards. Whenever +an opening delimiter is found the COUNT is increased by one, if a +closing delimiter is found the COUNT is decreased by one. The +motion stops when COUNT reaches zero. The match-data reflects the +last successful match (that caused COUNT to reach zero)." + ;; Always use the default `forward-sexp-function'. This is important + ;; for modes that use a custom one like `python-mode'. + ;; (addresses #364) + (let (forward-sexp-function) + (with-syntax-table (copy-syntax-table (syntax-table)) + (modify-syntax-entry open (format "(%c" close)) + (modify-syntax-entry close (format ")%c" open)) + (let ((rest (evil-motion-loop (dir count) + (let ((pnt (point))) + (condition-case nil + (cond + ((> dir 0) + (while (progn + (up-list dir) + (/= (char-before) close)))) + (t + (while (progn + (up-list dir) + (/= (char-after) open))))) + (error (goto-char pnt))))))) + (cond + ((= rest count) (set-match-data nil)) + ((> count 0) (set-match-data (list (1- (point)) (point)))) + (t (set-match-data (list (point) (1+ (point)))))) + rest)))) + +(defun evil-up-xml-tag (&optional count) + "Move point to the end or beginning of balanced xml tags. +OPEN and CLOSE should be characters identifying the opening and +closing parenthesis, respectively. If COUNT is greater than zero +point is moved forward otherwise it is moved backwards. Whenever +an opening delimiter is found the COUNT is increased by one, if a +closing delimiter is found the COUNT is decreased by one. The +motion stops when COUNT reaches zero. The match-data reflects the +last successful match (that caused COUNT to reach zero)." + (let* ((dir (if (> (or count 1) 0) +1 -1)) + (count (abs (or count 1))) + (op (if (> dir 0) 1 2)) + (cl (if (> dir 0) 2 1)) + (orig (point)) + pnt tags match) + (catch 'done + (while (> count 0) + ;; find the previous opening tag + (while + (and (setq match + (re-search-forward + "<\\([^/ >\n]+\\)\\(?:=>?\\|[^\"/>]\\|\"[^\"]*\"\\)*?>\\|</\\([^>]+?\\)>" + nil t dir)) + (cond + ((match-beginning op) + (push (match-string op) tags)) + ((null tags) nil) ; free closing tag + ((and (< dir 0) + (string= (car tags) (match-string cl))) + ;; in backward direction we only accept matching + ;; tags. If the current tag is a free opener + ;; without matching closing tag, the subsequents + ;; test will make us ignore this tag + (pop tags)) + ((and (> dir 0)) + ;; non matching openers are considered free openers + (while (and tags + (not (string= (car tags) + (match-string cl)))) + (pop tags)) + (pop tags))))) + (unless (setq match (and match (match-data t))) + (setq match nil) + (throw 'done count)) + ;; found closing tag, look for corresponding opening tag + (cond + ((> dir 0) + (setq pnt (match-end 0)) + (goto-char (match-beginning 0))) + (t + (setq pnt (match-beginning 0)) + (goto-char (match-end 0)))) + (let* ((tag (match-string cl)) + (refwd (concat "<\\(/\\)?" + (regexp-quote tag) + "\\(?:>\\|[ \n]\\(?:[^\"/>]\\|\"[^\"]*\"\\)*?>\\)")) + (cnt 1)) + (while (and (> cnt 0) (re-search-backward refwd nil t dir)) + (setq cnt (+ cnt (if (match-beginning 1) dir (- dir))))) + (if (zerop cnt) (setq count (1- count) tags nil)) + (goto-char pnt))) + (if (> count 0) + (set-match-data nil) + (set-match-data match) + (goto-char (if (> dir 0) (match-end 0) (match-beginning 0))))) + ;; if not found, set to point-max/point-min + (unless (zerop count) + (set-match-data nil) + (goto-char (if (> dir 0) (point-max) (point-min))) + (if (/= (point) orig) (setq count (1- count)))) + (* dir count))) + +(defun evil-forward-quote (quote &optional count) + "Move point to the end or beginning of a string. +QUOTE is the character delimiting the string. If COUNT is greater +than zero point is moved forward otherwise it is moved +backwards." + (let (reset-parser) + (with-syntax-table (copy-syntax-table (syntax-table)) + (unless (= (char-syntax quote) ?\") + (modify-syntax-entry quote "\"") + (setq reset-parser t)) + ;; global parser state is out of state, use local one + (let* ((pnt (point)) + (state (save-excursion + (beginning-of-defun) + (parse-partial-sexp (point) pnt nil nil (syntax-ppss)))) + (bnd (bounds-of-evil-string-at-point state))) + (when (and bnd (< (point) (cdr bnd))) + ;; currently within a string + (if (> count 0) + (progn + (goto-char (cdr bnd)) + (setq count (1- count))) + (goto-char (car bnd)) + (setq count (1+ count)))) + ;; forward motions work with local parser state + (cond + ((> count 0) + ;; no need to reset global parser state because we only use + ;; the local one + (setq reset-parser nil) + (catch 'done + (while (and (> count 0) (not (eobp))) + (setq state (parse-partial-sexp (point) (point-max) + nil + nil + state + 'syntax-table)) + (cond + ((nth 3 state) + (setq bnd (bounds-of-thing-at-point 'evil-string)) + (goto-char (cdr bnd)) + (setq count (1- count))) + ((eobp) (goto-char pnt) (throw 'done nil)))))) + ((< count 0) + ;; need to update global cache because of backward motion + (setq reset-parser (and reset-parser (point))) + (save-excursion + (beginning-of-defun) + (syntax-ppss-flush-cache (point))) + (catch 'done + (while (and (< count 0) (not (bobp))) + (setq pnt (point)) + (while (and (not (bobp)) + (or (eobp) (/= (char-after) quote))) + (backward-char)) + (cond + ((setq bnd (bounds-of-thing-at-point 'evil-string)) + (goto-char (car bnd)) + (setq count (1+ count))) + ((bobp) (goto-char pnt) (throw 'done nil)) + (t (backward-char)))))) + (t (setq reset-parser nil))))) + (when reset-parser + ;; reset global cache + (save-excursion + (goto-char reset-parser) + (beginning-of-defun) + (syntax-ppss-flush-cache (point)))) + count)) + +;;; Thing-at-point motion functions for Evil text objects and motions +(defun forward-evil-empty-line (&optional count) + "Move forward COUNT empty lines." + (setq count (or count 1)) + (cond + ((> count 0) + (while (and (> count 0) (not (eobp))) + (when (and (bolp) (eolp)) + (setq count (1- count))) + (forward-line 1))) + (t + (while (and (< count 0) (not (bobp)) + (zerop (forward-line -1))) + (when (and (bolp) (eolp)) + (setq count (1+ count)))))) + count) + +(defun forward-evil-space (&optional count) + "Move forward COUNT whitespace sequences [[:space:]]+." + (evil-forward-chars "[:space:]" count)) + +(defun forward-evil-word (&optional count) + "Move forward COUNT words. +Moves point COUNT words forward or (- COUNT) words backward if +COUNT is negative. Point is placed after the end of the word (if +forward) or at the first character of the word (if backward). A +word is a sequence of word characters matching +\[[:word:]] (recognized by `forward-word'), a sequence of +non-whitespace non-word characters '[^[:word:]\\n\\r\\t\\f ]', or +an empty line matching ^$." + (evil-forward-nearest + count + #'(lambda (&optional cnt) + (let ((word-separating-categories evil-cjk-word-separating-categories) + (word-combining-categories evil-cjk-word-combining-categories) + (pnt (point))) + (forward-word cnt) + (if (= pnt (point)) cnt 0))) + #'(lambda (&optional cnt) + (evil-forward-chars "^[:word:]\n\r\t\f " cnt)) + #'forward-evil-empty-line)) + +(defun forward-evil-WORD (&optional count) + "Move forward COUNT \"WORDS\". +Moves point COUNT WORDS forward or (- COUNT) WORDS backward if +COUNT is negative. Point is placed after the end of the WORD (if +forward) or at the first character of the WORD (if backward). A +WORD is a sequence of non-whitespace characters +'[^\\n\\r\\t\\f ]', or an empty line matching ^$." + (evil-forward-nearest count + #'(lambda (&optional cnt) + (evil-forward-chars "^\n\r\t\f " cnt)) + #'forward-evil-empty-line)) + +(defun forward-evil-symbol (&optional count) + "Move forward COUNT symbols. +Moves point COUNT symbols forward or (- COUNT) symbols backward +if COUNT is negative. Point is placed after the end of the +symbol (if forward) or at the first character of the symbol (if +backward). A symbol is either determined by `forward-symbol', or +is a sequence of characters not in the word, symbol or whitespace +syntax classes." + (evil-forward-nearest + count + #'(lambda (&optional cnt) + (evil-forward-syntax "^w_->" cnt)) + #'(lambda (&optional cnt) + (let ((pnt (point))) + (forward-symbol cnt) + (if (= pnt (point)) cnt 0))) + #'forward-evil-empty-line)) + +(defun forward-evil-defun (&optional count) + "Move forward COUNT defuns. +Moves point COUNT defuns forward or (- COUNT) defuns backward +if COUNT is negative. A defun is defined by +`beginning-of-defun' and `end-of-defun' functions." + (evil-motion-loop (dir (or count 1)) + (if (> dir 0) (end-of-defun) (beginning-of-defun)))) + +(defun forward-evil-sentence (&optional count) + "Move forward COUNT sentences. +Moves point COUNT sentences forward or (- COUNT) sentences +backward if COUNT is negative. This function is the same as +`forward-sentence' but returns the number of sentences that could +NOT be moved over." + (evil-motion-loop (dir (or count 1)) + (condition-case nil + (forward-sentence dir) + (error)))) + +(defun forward-evil-paragraph (&optional count) + "Move forward COUNT paragraphs. +Moves point COUNT paragraphs forward or (- COUNT) paragraphs backward +if COUNT is negative. A paragraph is defined by +`start-of-paragraph-text' and `forward-paragraph' functions." + (evil-motion-loop (dir (or count 1)) + (cond + ((> dir 0) (forward-paragraph)) + ((not (bobp)) (start-of-paragraph-text) (beginning-of-line))))) + +(defvar evil-forward-quote-char ?\" + "The character to be used by `forward-evil-quote'.") + +(defun forward-evil-quote (&optional count) + "Move forward COUNT strings. +The quotation character is specified by the global variable +`evil-forward-quote-char'. This character is passed to +`evil-forward-quote'." + (evil-forward-quote evil-forward-quote-char count)) + +(defun forward-evil-quote-simple (&optional count) + "Move forward COUNT strings. +The quotation character is specified by the global variable +`evil-forward-quote-char'. This functions uses Vim's rules +parsing from the beginning of the current line for quotation +characters. It should only be used when looking for strings +within comments and buffer *must* be narrowed to the comment." + (let ((dir (if (> (or count 1) 0) 1 -1)) + (ch evil-forward-quote-char) + (pnt (point)) + (cnt 0)) + (beginning-of-line) + ;; count number of quotes before pnt + (while (< (point) pnt) + (when (= (char-after) ch) + (setq cnt (1+ cnt))) + (forward-char)) + (setq cnt (- (* 2 (abs count)) (mod cnt 2))) + (cond + ((> dir 0) + (while (and (not (eolp)) (not (zerop cnt))) + (when (= (char-after) ch) (setq cnt (1- cnt))) + (forward-char)) + (when (not (zerop cnt)) (goto-char (point-max)))) + (t + (while (and (not (bolp)) (not (zerop cnt))) + (when (= (char-before) ch) (setq cnt (1- cnt))) + (forward-char -1)) + (when (not (zerop cnt)) (goto-char (point-min))))) + (/ cnt 2))) + +;;; Motion functions +(defun evil-forward-beginning (thing &optional count) + "Move forward to beginning of THING. +The motion is repeated COUNT times." + (setq count (or count 1)) + (if (< count 0) + (forward-thing thing count) + (let ((bnd (bounds-of-thing-at-point thing)) + rest) + (when (and bnd (< (point) (cdr bnd))) + (goto-char (cdr bnd))) + (condition-case nil + (when (zerop (setq rest (forward-thing thing count))) + (when (and (bounds-of-thing-at-point thing) + (not (bobp)) + ;; handle final empty line + (not (and (bolp) (eobp)))) + (forward-char -1)) + (beginning-of-thing thing)) + (error)) + rest))) + +(defun evil-backward-beginning (thing &optional count) + "Move backward to beginning of THING. +The motion is repeated COUNT times. This is the same as calling +`evil-backward-beginning' with -COUNT." + (evil-forward-beginning thing (- (or count 1)))) + +(defun evil-forward-end (thing &optional count) + "Move forward to end of THING. +The motion is repeated COUNT times." + (setq count (or count 1)) + (cond + ((> count 0) + (unless (eobp) (forward-char)) + (prog1 (forward-thing thing count) + (unless (bobp) (forward-char -1)))) + (t + (let ((bnd (bounds-of-thing-at-point thing)) + rest) + (when (and bnd (< (point) (cdr bnd) )) + (goto-char (car bnd))) + (condition-case nil + (when (zerop (setq rest (forward-thing thing count))) + (end-of-thing thing) + (forward-char -1)) + (error)) + rest)))) + +(defun evil-backward-end (thing &optional count) + "Move backward to end of THING. +The motion is repeated COUNT times. This is the same as calling +`evil-backward-end' with -COUNT." + (evil-forward-end thing (- (or count 1)))) + +(defun evil-forward-word (&optional count) + "Move by words. +Moves point COUNT words forward or (- COUNT) words backward if +COUNT is negative. This function is the same as `forward-word' +but returns the number of words by which point could *not* be +moved." + (setq count (or count 1)) + (let* ((dir (if (>= count 0) +1 -1)) + (count (abs count))) + (while (and (> count 0) + (forward-word dir)) + (setq count (1- count))) + count)) + +(defun evil-in-comment-p (&optional pos) + "Checks if POS is within a comment according to current syntax. +If POS is nil, (point) is used. The return value is the beginning +position of the comment." + (setq pos (or pos (point))) + (let ((chkpos + (cond + ((eobp) pos) + ((= (char-syntax (char-after)) ?<) (1+ pos)) + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 16)))) + (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) + (lsh 1 17))))) + (+ pos 2)) + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 17)))) + (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) + (lsh 1 16))))) + (1+ pos)) + (t pos)))) + (let ((syn (save-excursion (syntax-ppss chkpos)))) + (and (nth 4 syn) (nth 8 syn))))) + +(defun evil-looking-at-start-comment (&optional move) + "Returns t if point is at the start of a comment. +point must be on one of the opening characters of a block comment +according to the current syntax table. Futhermore these +characters must been parsed as opening characters, i.e. they +won't be considered as comment starters inside a string or +possibly another comment. Point is moved to the first character +of the comment opener if MOVE is non-nil." + (cond + ;; one character opener + ((= (char-syntax (char-after)) ?<) + (equal (point) (evil-in-comment-p (1+ (point))))) + ;; two character opener on first char + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 16)))) + (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) + (lsh 1 17))))) + (equal (point) (evil-in-comment-p (+ 2 (point))))) + ;; two character opener on second char + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 17)))) + (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) + (lsh 1 16))))) + (and (equal (1- (point)) (evil-in-comment-p (1+ (point)))) + (prog1 t (when move (backward-char))))))) + +(defun evil-looking-at-end-comment (&optional move) + "Returns t if point is at the end of a comment. +point must be on one of the opening characters of a block comment +according to the current syntax table. Futhermore these +characters must been parsed as opening characters, i.e. they +won't be considered as comment starters inside a string or +possibly another comment. Point is moved right after the comment +closer if MOVE is non-nil." + (cond + ;; one char closer + ((= (char-syntax (char-after)) ?>) + (and (evil-in-comment-p) ; in comment + (not (evil-in-comment-p (1+ (point)))) + (prog1 t (when move (forward-char))))) + ;; two char closer on first char + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 18)))) + (not (zerop (logand (or (car (syntax-after (1+ (point)))) 0) + (lsh 1 19))))) + (and (evil-in-comment-p) + (not (evil-in-comment-p (+ (point) 2))) + (prog1 t (when move (forward-char 2))))) + ;; two char closer on second char + ((and (not (zerop (logand (car (syntax-after (point))) + (lsh 1 19)))) + (not (zerop (logand (or (car (syntax-after (1- (point)))) 0) + (lsh 1 18))))) + (and (evil-in-comment-p) + (not (evil-in-comment-p (1+ (point)))) + (prog1 t (when move (forward-char))))))) + +(defun evil-insert-newline-above () + "Inserts a new line above point and places point in that line +with regard to indentation." + (evil-narrow-to-field + (evil-move-beginning-of-line) + (insert (if use-hard-newlines hard-newline "\n")) + (forward-line -1) + (back-to-indentation))) + +(defun evil-insert-newline-below () + "Inserts a new line below point and places point in that line +with regard to indentation." + (evil-narrow-to-field + (evil-move-end-of-line) + (insert (if use-hard-newlines hard-newline "\n")) + (back-to-indentation))) + +;;; Markers + +(defun evil-global-marker-p (char) + "Whether CHAR denotes a global marker." + (or (and (>= char ?A) (<= char ?Z)) + (assq char (default-value 'evil-markers-alist)))) + +(defun evil-set-marker (char &optional pos advance) + "Set the marker denoted by CHAR to position POS. +POS defaults to the current position of point. +If ADVANCE is t, the marker advances when inserting text at it; +otherwise, it stays behind." + (interactive (list (read-char))) + (catch 'done + (let ((marker (evil-get-marker char t)) alist) + (unless (markerp marker) + (cond + ((and marker (symbolp marker) (boundp marker)) + (set marker (or (symbol-value marker) (make-marker))) + (setq marker (symbol-value marker))) + ((eq marker 'evil-jump-backward-swap) + (evil-set-jump) + (throw 'done nil)) + ((functionp marker) + (user-error "Cannot set special marker `%c'" char)) + ((evil-global-marker-p char) + (setq alist (default-value 'evil-markers-alist) + marker (make-marker)) + (evil--add-to-alist 'alist char marker) + (setq-default evil-markers-alist alist)) + (t + (setq marker (make-marker)) + (evil--add-to-alist 'evil-markers-alist char marker)))) + (add-hook 'kill-buffer-hook #'evil-swap-out-markers nil t) + (set-marker-insertion-type marker advance) + (set-marker marker (or pos (point)))))) + +(defun evil-get-marker (char &optional raw) + "Return the marker denoted by CHAR. +This is either a marker object as returned by `make-marker', +a number, a cons cell (FILE . POS) with FILE being a string +and POS a number, or nil. If RAW is non-nil, then the +return value may also be a variable, a movement function, +or a marker object pointing nowhere." + (let ((marker (if (evil-global-marker-p char) + (cdr-safe (assq char (default-value + 'evil-markers-alist))) + (cdr-safe (assq char evil-markers-alist))))) + (save-excursion + (if raw + marker + (when (and (symbolp marker) (boundp marker)) + (setq marker (symbol-value marker))) + (when (functionp marker) + (save-window-excursion + (funcall marker) + (setq marker (move-marker (make-marker) (point))))) + (when (markerp marker) + (if (eq (marker-buffer marker) (current-buffer)) + (setq marker (marker-position marker)) + (setq marker (and (marker-buffer marker) marker)))) + (when (or (numberp marker) + (markerp marker) + (and (consp marker) + (stringp (car marker)) + (numberp (cdr marker)))) + marker))))) + +(defun evil-swap-out-markers () + "Turn markers into file references when the buffer is killed." + (and buffer-file-name + (dolist (entry evil-markers-alist) + (and (markerp (cdr entry)) + (eq (marker-buffer (cdr entry)) (current-buffer)) + (setcdr entry (cons buffer-file-name + (marker-position (cdr entry)))))))) +(put 'evil-swap-out-markers 'permanent-local-hook t) + +(defun evil--eval-expr (input) + "Eval INPUT and return stringified result, if of a suitable type. +If INPUT starts with a number, +, -, or . use `calc-eval' instead." + (let* ((first-char (car (remove ?\s (string-to-list input)))) + (calcable-p (and first-char (or (<= ?0 first-char ?9) + (memq first-char '(?- ?+ ?.))))) + (result (if calcable-p + (let ((calc-multiplication-has-precedence nil)) + (calc-eval input)) + (eval (car (read-from-string input)))))) + (cond + (calcable-p result) + ((or (stringp result) + (numberp result) + (symbolp result)) + (format "%s" result)) + ((sequencep result) + (mapconcat (lambda (x) (format "%s" x)) result "\n")) + (t (user-error "Using %s as a string" (type-of result)))))) + +(defvar evil-paste-clear-minibuffer-first nil + "`evil-paste-before' cannot have `delete-minibuffer-contents' called before +it fetches certain registers becuase this would trigger various ex-updates, +sometimes moving point, so `C-a' `C-w' etc. would miss their intended target.") + +(defun evil-ex-remove-default () + "Remove the default text shown in the ex minibuffer. +When ex starts, the previous command is shown enclosed in +parenthesis. This function removes this text when the first key +is pressed." + (when (and (not (eq this-command 'exit-minibuffer)) + (/= (minibuffer-prompt-end) (point-max))) + (if (eq this-command 'evil-ex-delete-backward-char) + (setq this-command 'ignore)) + (if (eq this-original-command 'evil-paste-from-register) + (setq evil-paste-clear-minibuffer-first t) + (delete-minibuffer-contents))) + (remove-hook 'pre-command-hook #'evil-ex-remove-default)) +(put 'evil-ex-remove-default 'permanent-local-hook t) + +(defun evil-get-register (register &optional noerror) + "Return contents of REGISTER. +Signal an error if empty, unless NOERROR is non-nil. + +The following special registers are supported. + \" the unnamed register + * the clipboard contents + + the clipboard contents + <C-w> the word at point (ex mode only) + <C-a> the WORD at point (ex mode only) + <C-o> the symbol at point (ex mode only) + <C-f> the current file at point (ex mode only) + % the current file name (read only) + # the alternate file name (read only) + / the last search pattern (read only) + : the last command line (read only) + . the last inserted text (read only) + - the last small (less than a line) delete + _ the black hole register + = the expression register (read only)" + (condition-case err + (when (characterp register) + (or (cond + ((eq register ?\") + (current-kill 0)) + ((<= ?1 register ?9) + (let ((reg (- register ?1))) + (and (< reg (length kill-ring)) + (current-kill reg t)))) + ((memq register '(?* ?+)) + ;; the following code is modified from + ;; `x-selection-value-internal' + (let ((what (if (eq register ?*) 'PRIMARY 'CLIPBOARD)) + (request-type (or (and (boundp 'x-select-request-type) + x-select-request-type) + '(UTF8_STRING COMPOUND_TEXT STRING))) + text) + (unless (consp request-type) + (setq request-type (list request-type))) + (while (and request-type (not text)) + (condition-case nil + (setq text (evil-get-selection what (pop request-type))) + (error nil))) + (when text + (remove-text-properties 0 (length text) '(foreign-selection nil) text)) + text)) + ((eq register ?\C-W) + (unless (evil-ex-p) + (user-error "Register <C-w> only available in ex state")) + (with-current-buffer evil-ex-current-buffer + (thing-at-point 'evil-word))) + ((eq register ?\C-A) + (unless (evil-ex-p) + (user-error "Register <C-a> only available in ex state")) + (with-current-buffer evil-ex-current-buffer + (thing-at-point 'evil-WORD))) + ((eq register ?\C-O) + (unless (evil-ex-p) + (user-error "Register <C-o> only available in ex state")) + (with-current-buffer evil-ex-current-buffer + (thing-at-point 'evil-symbol))) + ((eq register ?\C-F) + (unless (evil-ex-p) + (user-error "Register <C-f> only available in ex state")) + (with-current-buffer evil-ex-current-buffer + (thing-at-point 'filename))) + ((eq register ?\C-L) + (unless (evil-ex-p) + (user-error "Register <C-l> only available in ex state")) + (with-current-buffer evil-ex-current-buffer + (replace-regexp-in-string "\n\\'" "" (thing-at-point 'line)))) + ((eq register ?%) + (or (buffer-file-name (and (evil-ex-p) + (minibufferp) + evil-ex-current-buffer)) + (user-error "No file name"))) + ((= register ?#) + (or (with-current-buffer (other-buffer) (buffer-file-name)) + (user-error "No file name"))) + ((eq register ?/) + (or (car-safe + (or (and (boundp 'evil-search-module) + (eq evil-search-module 'evil-search) + evil-ex-search-history) + (and isearch-regexp regexp-search-ring) + search-ring)) + (user-error "No previous regular expression"))) + ((eq register ?:) + (or (car-safe evil-ex-history) + (user-error "No previous command line"))) + ((eq register ?.) + evil-last-insertion) + ((eq register ?-) + evil-last-small-deletion) + ((eq register ?=) + (let ((enable-recursive-minibuffers t)) + (setq evil-last-=-register-input + (minibuffer-with-setup-hook + (lambda () (when evil-last-=-register-input + (add-hook 'pre-command-hook #'evil-ex-remove-default))) + (read-from-minibuffer + "=" + (and evil-last-=-register-input + (propertize evil-last-=-register-input 'face 'shadow)) + evil-eval-map + nil + 'evil-eval-history + evil-last-=-register-input + t))) + (evil--eval-expr evil-last-=-register-input))) + ((eq register ?_) ; the black hole register + "") + (t + (setq register (downcase register)) + (get-register register))) + (user-error "Register `%c' is empty" register))) + (error (unless noerror (signal (car err) (cdr err)))))) + +(defun evil-append-register (register text) + "Append TEXT to the contents of register REGISTER." + (let ((content (get-register register))) + (cond + ((not content) + (set-register register text)) + ((not (stringp content)) + ;; if the register does not contain a string treat it as a vector + (set-register register (vconcat content text))) + ((or (text-property-not-all 0 (length content) + 'yank-handler nil + content) + (text-property-not-all 0 (length text) + 'yank-handler nil + text)) + ;; some non-trivial yank-handler -> always switch to line handler + ;; ensure complete lines + (when (and (> (length content) 0) + (/= (aref content (1- (length content))) ?\n)) + (setq content (concat content "\n"))) + (when (and (> (length text) 0) + (/= (aref text (1- (length text))) ?\n)) + (setq text (concat text "\n"))) + (setq text (concat content text)) + (remove-list-of-text-properties 0 (length text) '(yank-handler) text) + (setq text (propertize text 'yank-handler '(evil-yank-line-handler))) + (set-register register text)) + (t + (set-register register (concat content text)))))) + +(defun evil-set-register (register text) + "Set the contents of register REGISTER to TEXT. +If REGISTER is an upcase character then text is appended to that +register instead of replacing its content." + (cond + ((not (characterp register)) + (user-error "Invalid register")) + ;; don't allow modification of read-only registers + ((member register '(?: ?. ?%)) + (user-error "Can't modify read-only register")) + ((eq register ?\") + (kill-new text)) + ((and (<= ?1 register) (<= register ?9)) + (if (null kill-ring) + (kill-new text) + (let ((kill-ring-yank-pointer kill-ring-yank-pointer) + interprogram-paste-function + interprogram-cut-function) + (current-kill (- register ?1)) + (setcar kill-ring-yank-pointer text)))) + ((eq register ?*) + (evil-set-selection 'PRIMARY text)) + ((eq register ?+) + (evil-set-selection 'CLIPBOARD text)) + ((eq register ?-) + (setq evil-last-small-deletion text)) + ((eq register ?_) ; the black hole register + nil) + ((and (<= ?A register) (<= register ?Z)) + (evil-append-register (downcase register) text)) + (t + (set-register register text)))) + +(defun evil-register-list () + "Returns an alist of all registers, but only those named +with number or character. Registers with symbol or string in names are ignored +to keep Vim compatibility with register jumps." + (sort (append (mapcar #'(lambda (reg) + (cons reg (evil-get-register reg t))) + '(?\" ?* ?+ ?% ?# ?/ ?: ?. ?- + ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) + (list (cons ?= evil-last-=-register-input)) + (cl-remove-if-not (lambda (reg) (number-or-marker-p (car reg))) register-alist) + nil) + #'(lambda (reg1 reg2) (< (car reg1) (car reg2))))) + +(defsubst evil-kbd-macro-suppress-motion-error () + "Returns non-nil if a motion error should be suppressed. +Whether the motion error should be suppressed depends on the +variable `evil-kbd-macro-suppress-motion-error'." + (or (and defining-kbd-macro + (memq evil-kbd-macro-suppress-motion-error '(t record))) + (and executing-kbd-macro + (memq evil-kbd-macro-suppress-motion-error '(t replay))))) + +;;; Region + +;; `set-mark' does too much at once +(defun evil-move-mark (pos) + "Set buffer's mark to POS. +If POS is nil, delete the mark." + (when pos + (setq pos (evil-normalize-position pos))) + (set-marker (mark-marker) pos)) + +(defun evil-save-transient-mark-mode () + "Save Transient Mark mode and make it buffer-local. +Any changes to Transient Mark mode are now local to the current +buffer, until `evil-restore-transient-mark-mode' is called. + +Variables pertaining to Transient Mark mode are listed in +`evil-transient-vars', and their values are stored in +`evil-transient-vals'." + (dolist (var evil-transient-vars) + (when (and (boundp var) + (not (assq var evil-transient-vals))) + (push (list var (symbol-value var) + (local-variable-p var)) + evil-transient-vals) + (make-variable-buffer-local var) + (put var 'permanent-local t)))) + +(defun evil-restore-transient-mark-mode () + "Restore Transient Mark mode. +This presupposes that `evil-save-transient-mark-mode' has been +called earlier. If Transient Mark mode was disabled before but +enabled in the meantime, this function disables it; if it was +enabled before but disabled in the meantime, this function +enables it. + +The earlier settings of Transient Mark mode are stored in +`evil-transient-vals'." + (let (entry local var val) + (while (setq entry (pop evil-transient-vals)) + (setq var (pop entry) + val (pop entry) + local (pop entry)) + (unless local + (kill-local-variable var)) + (unless (equal (symbol-value var) val) + (if (fboundp var) + (funcall var (if val 1 -1)) + (setq var val)))))) + +(defun evil-save-mark () + "Save the current mark, including whether it is transient. +See also `evil-restore-mark'." + (unless evil-visual-previous-mark + (setq evil-visual-previous-mark (mark t)) + (evil-save-transient-mark-mode))) + +(defun evil-restore-mark () + "Restore the mark, including whether it was transient. +See also `evil-save-mark'." + (when evil-visual-previous-mark + (evil-restore-transient-mark-mode) + (evil-move-mark evil-visual-previous-mark) + (setq evil-visual-previous-mark nil))) + +;; In theory, an active region implies Transient Mark mode, and +;; disabling Transient Mark mode implies deactivating the region. +;; In practice, Emacs never clears `mark-active' except in Transient +;; Mark mode, so we define our own toggle functions to make things +;; more predictable. +(defun evil-transient-mark (&optional arg) + "Toggle Transient Mark mode. +Ensure that the region is properly deactivated. +Enable with positive ARG, disable with negative ARG." + (unless (numberp arg) + (setq arg (if transient-mark-mode -1 1))) + (cond + ((< arg 1) + (evil-active-region -1) + ;; Transient Mark mode cannot be disabled + ;; while CUA mode is enabled + (when (fboundp 'cua-mode) + (cua-mode -1)) + (when transient-mark-mode + (transient-mark-mode -1))) + (t + (unless transient-mark-mode + (evil-active-region -1) + (transient-mark-mode 1))))) + +(defun evil-active-region (&optional arg) + "Toggle active region. +Ensure that Transient Mark mode is properly enabled. +Enable with positive ARG, disable with negative ARG." + (unless (numberp arg) + (setq arg (if (region-active-p) -1 1))) + (cond + ((and (< arg 1)) + (when (or transient-mark-mode mark-active) + (setq mark-active nil + deactivate-mark nil) + (when (boundp 'cua--explicit-region-start) + (setq cua--explicit-region-start nil)) + (run-hooks 'deactivate-mark-hook))) + (t + (evil-transient-mark 1) + (when deactivate-mark + (setq deactivate-mark nil)) + (unless (mark t) + (evil-move-mark (point))) + (unless (region-active-p) + (set-mark (mark t))) + (when (boundp 'cua--explicit-region-start) + (setq cua--explicit-region-start t))))) + +(defmacro evil-with-transient-mark-mode (&rest body) + "Execute BODY with Transient Mark mode. +Then restore Transient Mark mode to its previous setting." + (declare (indent defun) + (debug t)) + `(let ((inhibit-quit t) + evil-transient-vals) + (unwind-protect + (progn + (evil-save-transient-mark-mode) + (evil-transient-mark 1) + ,@body) + (evil-restore-transient-mark-mode)))) + +(defmacro evil-with-active-region (beg end &rest body) + "Execute BODY with an active region from BEG to END." + (declare (indent 2) + (debug t)) + `(let ((beg ,beg) (end ,end) + evil-transient-vals) + (evil-with-transient-mark-mode + (save-excursion + (evil-active-region 1) + (evil-move-mark beg) + (goto-char end) + ,@body)))) + +(defun evil-exchange-point-and-mark () + "Exchange point and mark without activating the region." + (let* ((point (point)) + (mark (or (mark t) point))) + (set-marker (mark-marker) point) + (goto-char mark))) + +(defun evil-apply-on-block (func beg end pass-columns &rest args) + "Call FUNC for each line of a block selection. +The selection is specified by the region BEG and END. FUNC must +take at least two arguments, the beginning and end of each +line. If PASS-COLUMNS is non-nil, these values are the columns, +otherwise they are buffer positions. Extra arguments to FUNC may +be passed via ARGS." + (let ((eol-col (and (memq last-command '(next-line previous-line)) + (numberp temporary-goal-column) + temporary-goal-column)) + startcol startpt endcol endpt) + (save-excursion + (goto-char beg) + (setq startcol (current-column)) + (beginning-of-line) + (setq startpt (point)) + (goto-char end) + (setq endcol (current-column)) + (forward-line 1) + (setq endpt (point-marker)) + ;; ensure the start column is the left one. + (evil-sort startcol endcol) + ;; maybe find maximal column + (when eol-col + (setq eol-col 0) + (goto-char startpt) + (while (< (point) endpt) + (setq eol-col (max eol-col + (evil-column (line-end-position)))) + (forward-line 1)) + (setq endcol (max endcol + (min eol-col + (1+ (min (1- most-positive-fixnum) + (truncate temporary-goal-column))))))) + ;; start looping over lines + (goto-char startpt) + (while (< (point) endpt) + (if pass-columns + (apply func startcol endcol args) + (apply func + (save-excursion (evil-move-to-column startcol)) + (save-excursion (evil-move-to-column endcol t)) + args)) + (forward-line 1))))) + +(defun evil-apply-on-rectangle (function start end &rest args) + "Like `apply-on-rectangle' but maybe extends to eol. +If `temporary-goal-column' is set to a big number, then the +region of each line is extended to the end of each line. The end +column is set to the maximal column in all covered lines." + (apply #'evil-apply-on-block function start end t args)) + +;;; Insertion + +(defun evil-concat-ranges (ranges) + "Concatenate RANGES. +RANGES must be a list of ranges. They must be ordered so that +successive ranges share their boundaries. The return value is a +single range of disjoint union of the ranges or nil if the +disjoint union is not a single range." + (let ((range (car-safe ranges)) (ranges (cdr ranges)) r) + (while (and range (setq r (car-safe ranges))) + (setq range + (cond ((and (= (cdr r) (car range))) (cons (car r) (cdr range))) + ((and (= (cdr range) (car r))) (cons (car range) (cdr r))))) + (setq ranges (cdr ranges))) + range)) + +(defun evil-track-last-insertion (beg end len) + "Track the last insertion range and its text. +The insertion range is stored as a pair of buffer positions in +`evil-current-insertion'. If a subsequent change is compatible, +then the current range is modified, otherwise it is replaced by a +new range. Compatible changes are changes that do not create a +disjoin range." + ;; deletion + (when (> len 0) + (if (and evil-current-insertion + (>= beg (car evil-current-insertion)) + (<= (+ beg len) (cdr evil-current-insertion))) + (setcdr evil-current-insertion + (- (cdr evil-current-insertion) len)) + (setq evil-current-insertion nil))) + ;; insertion + (if (and evil-current-insertion + (>= beg (car evil-current-insertion)) + (<= beg (cdr evil-current-insertion))) + (setcdr evil-current-insertion + (+ (- end beg) + (cdr evil-current-insertion))) + (setq evil-current-insertion (cons beg end)))) +(put 'evil-track-last-insertion 'permanent-local-hook t) + +(defun evil-start-track-last-insertion () + "Start tracking the last insertion." + (setq evil-current-insertion nil) + (add-hook 'after-change-functions #'evil-track-last-insertion nil t)) + +(defun evil-stop-track-last-insertion () + "Stop tracking the last insertion. +The tracked insertion is set to `evil-last-insertion'." + (setq evil-last-insertion + (and evil-current-insertion + ;; Check whether the insertion range is a valid buffer + ;; range. If a buffer modification is done from within + ;; another change hook or modification-hook (yasnippet + ;; does this using overlay modification-hooks), then the + ;; insertion information may be invalid. There is no way + ;; to detect this situation, but at least we should + ;; ensure that no error occurs (see bug #272). + (>= (car evil-current-insertion) (point-min)) + (<= (cdr evil-current-insertion) (point-max)) + (buffer-substring-no-properties (car evil-current-insertion) + (cdr evil-current-insertion)))) + (remove-hook 'after-change-functions #'evil-track-last-insertion t)) + +;;; Paste + +(defun evil-yank-characters (beg end &optional register yank-handler) + "Saves the characters defined by the region BEG and END in the kill-ring." + (let ((text (filter-buffer-substring beg end))) + (when yank-handler + (setq text (propertize text 'yank-handler (list yank-handler)))) + (when register + (evil-set-register register text)) + (when evil-was-yanked-without-register + (evil-set-register ?0 text)) ; "0 register contains last yanked text + (unless (eq register ?_) + (kill-new text)))) + +(defun evil-yank-lines (beg end &optional register yank-handler) + "Saves the lines in the region BEG and END into the kill-ring." + (let* ((text (filter-buffer-substring beg end)) + (yank-handler (list (or yank-handler + #'evil-yank-line-handler) + nil + t))) + ;; Ensure the text ends with a newline. This is required + ;; if the deleted lines were the last lines in the buffer. + (when (or (zerop (length text)) + (/= (aref text (1- (length text))) ?\n)) + (setq text (concat text "\n"))) + (setq text (propertize text 'yank-handler yank-handler)) + (when register + (evil-set-register register text)) + (when evil-was-yanked-without-register + (evil-set-register ?0 text)) ; "0 register contains last yanked text + (unless (eq register ?_) + (kill-new text)))) + +(defun evil-yank-rectangle (beg end &optional register yank-handler) + "Saves the rectangle defined by region BEG and END into the kill-ring." + (let ((lines (list nil))) + (evil-apply-on-rectangle #'extract-rectangle-line beg end lines) + ;; We remove spaces from the beginning and the end of the next. + ;; Spaces are inserted explicitly in the yank-handler in order to + ;; NOT insert lines full of spaces. + (setq lines (nreverse (cdr lines))) + ;; `text' is used as default insert text when pasting this rectangle + ;; in another program, e.g., using the X clipboard. + (let* ((yank-handler (list (or yank-handler + #'evil-yank-block-handler) + lines + t + 'evil-delete-yanked-rectangle)) + (text (propertize (mapconcat #'identity lines "\n") + 'yank-handler yank-handler))) + (when register + (evil-set-register register text)) + (when evil-was-yanked-without-register + (evil-set-register ?0 text)) ; "0 register contains last yanked text + (unless (eq register ?_) + (kill-new text)) + text))) + +(defun evil-remove-yank-excluded-properties (text) + "Removes `yank-excluded-properties' from TEXT." + (if (eq yank-excluded-properties t) + (set-text-properties 0 (length text) nil text) + (remove-list-of-text-properties 0 (length text) + yank-excluded-properties text))) + +(defun evil-yank-line-handler (text) + "Inserts the current text linewise." + (let ((text (apply #'concat (make-list (or evil-paste-count 1) text))) + (opoint (point))) + (evil-remove-yank-excluded-properties text) + (cond + ((eq this-command 'evil-paste-before) + (evil-move-beginning-of-line) + (evil-move-mark (point)) + (insert text) + (setq evil-last-paste + (list 'evil-paste-before + evil-paste-count + opoint + (mark t) + (point))) + (evil-set-marker ?\[ (mark)) + (evil-set-marker ?\] (1- (point))) + (evil-exchange-point-and-mark) + (back-to-indentation)) + ((eq this-command 'evil-paste-after) + (evil-move-end-of-line) + (evil-move-mark (point)) + (insert "\n") + (insert text) + (evil-set-marker ?\[ (1+ (mark))) + (evil-set-marker ?\] (1- (point))) + (delete-char -1) ; delete the last newline + (setq evil-last-paste + (list 'evil-paste-after + evil-paste-count + opoint + (mark t) + (point))) + (evil-move-mark (1+ (mark t))) + (evil-exchange-point-and-mark) + (back-to-indentation)) + (t + (insert text))))) + +(defun evil-yank-block-handler (lines) + "Inserts the current text as block." + (let ((count (or evil-paste-count 1)) + (col (if (eq this-command 'evil-paste-after) + (1+ (current-column)) + (current-column))) + (current-line (line-number-at-pos (point))) + (opoint (point)) + epoint) + (dolist (line lines) + ;; concat multiple copies according to count + (setq line (apply #'concat (make-list count line))) + ;; strip whitespaces at beginning and end + (string-match "^ *\\(.*?\\) *$" line) + (let ((text (match-string 1 line)) + (begextra (match-beginning 1)) + (endextra (- (match-end 0) (match-end 1)))) + ;; maybe we have to insert a new line at eob + (while (< (line-number-at-pos (point)) + current-line) + (goto-char (point-max)) + (insert "\n")) + (setq current-line (1+ current-line)) + ;; insert text unless we insert an empty line behind eol + (unless (and (< (evil-column (line-end-position)) col) + (zerop (length text))) + ;; if we paste behind eol, it may be sufficient to insert tabs + (if (< (evil-column (line-end-position)) col) + (move-to-column (+ col begextra) t) + (move-to-column col t) + (insert (make-string begextra ?\s))) + (evil-remove-yank-excluded-properties text) + (insert text) + (unless (eolp) + ;; text follows, so we have to insert spaces + (insert (make-string endextra ?\s))) + (setq epoint (point))) + (forward-line 1))) + (setq evil-last-paste + (list this-command + evil-paste-count + opoint + (length lines) ; number of rows + (* count (length (car lines))))) ; number of colums + (evil-set-marker ?\[ opoint) + (evil-set-marker ?\] (1- epoint)) + (goto-char opoint) + (when (and (eq this-command 'evil-paste-after) + (not (eolp))) + (forward-char)))) + +(defun evil-delete-yanked-rectangle (nrows ncols) + "Special function to delete the block yanked by a previous paste command. +Supplied as the `undo' element of a yank handler." + (let ((opoint (point)) + (col (if (eq last-command 'evil-paste-after) + (1+ (current-column)) + (current-column)))) + (dotimes (_ nrows) + (delete-region (save-excursion + (move-to-column col) + (point)) + (save-excursion + (move-to-column (+ col ncols)) + (point))) + (unless (eobp) (forward-line))) + (goto-char opoint))) + +;; TODO: if undoing is disabled in the current buffer, paste-pop won't +;; work. Although this is probably not a big problem, because usually +;; buffers where `evil-paste-pop' may be useful have undoing enabled. +;; A solution would be to temporarily enable undo when pasting and +;; store the undo information in a special variable that does not +;; interfere with `buffer-undo-list'. +(defun evil-paste-pop (count) + "Replace the just-yanked stretch of killed text with a different stretch. +This command is allowed only immediatly after a `yank', +`evil-paste-before', `evil-paste-after' or `evil-paste-pop'. +This command uses the same paste command as before, i.e., when +used after `evil-paste-after' the new text is also yanked using +`evil-paste-after', used with the same paste-count argument. + +The COUNT argument inserts the COUNTth previous kill. If COUNT +is negative this is a more recent kill." + (interactive "p") + (unless (memq last-command + '(evil-paste-after + evil-paste-before + evil-visual-paste)) + (user-error "Previous command was not an evil-paste: %s" last-command)) + (unless evil-last-paste + (user-error "Previous paste command used a register")) + (evil-undo-pop) + (when (eq last-command 'evil-visual-paste) + (evil-swap evil-visual-previous-mark evil-visual-mark) + (evil-swap evil-visual-previous-point evil-visual-point)) + (goto-char (nth 2 evil-last-paste)) + (setq this-command (nth 0 evil-last-paste)) + ;; use temporary kill-ring, so the paste cannot modify it + (let ((kill-ring (list (current-kill + (if (and (> count 0) (nth 5 evil-last-paste)) + ;; if was visual paste then skip the + ;; text that has been replaced + (1+ count) + count)))) + (kill-ring-yank-pointer kill-ring)) + (when (eq last-command 'evil-visual-paste) + (let ((evil-no-display t)) + (evil-visual-restore))) + (funcall (nth 0 evil-last-paste) (nth 1 evil-last-paste)) + ;; if this was a visual paste, then mark the last paste as NOT + ;; being the first visual paste + (when (eq last-command 'evil-visual-paste) + (setcdr (nthcdr 4 evil-last-paste) nil)))) + +(defun evil-paste-pop-next (count) + "Same as `evil-paste-pop' but with negative argument." + (interactive "p") + (evil-paste-pop (- count))) + +;;; Interactive forms + +(defun evil-match-interactive-code (interactive &optional pos) + "Match an interactive code at position POS in string INTERACTIVE. +Returns the first matching entry in `evil-interactive-alist', or nil." + (let ((length (length interactive)) + (pos (or pos 0))) + (catch 'done + (dolist (entry evil-interactive-alist) + (let* ((string (car entry)) + (end (+ (length string) pos))) + (when (and (<= end length) + (string= string + (substring interactive pos end))) + (throw 'done entry))))))) + +(defun evil-concatenate-interactive-forms (&rest forms) + "Concatenate interactive list expressions FORMS. +Returns a single expression where successive expressions +are joined, if possible." + (let (result) + (when forms + (while (cdr forms) + (cond + ((null (car forms)) + (pop forms)) + ((and (eq (car (car forms)) 'list) + (eq (car (cadr forms)) 'list)) + (setq forms (cons (append (car forms) + (cdr (cadr forms))) + (cdr (cdr forms))))) + (t + (push (pop forms) result)))) + (when (car forms) + (push (pop forms) result)) + (setq result (nreverse result)) + (cond + ((null result)) + ((null (cdr result)) + (car result)) + (t + `(append ,@result)))))) + +(defun evil-interactive-string (string) + "Evaluate the interactive string STRING. +The string may contain extended interactive syntax. +The return value is a cons cell (FORM . PROPERTIES), +where FORM is a single list-expression to be passed to +a standard `interactive' statement, and PROPERTIES is a +list of command properties as passed to `evil-define-command'." + (let ((length (length string)) + (pos 0) + code expr forms match plist prompt properties) + (while (< pos length) + (if (eq (aref string pos) ?\n) + (setq pos (1+ pos)) + (setq match (evil-match-interactive-code string pos)) + (if (null match) + (user-error "Unknown interactive code: `%s'" + (substring string pos)) + (setq code (car match) + expr (car (cdr match)) + plist (cdr (cdr match)) + pos (+ pos (length code))) + (when (functionp expr) + (setq prompt + (substring string pos + (or (string-match "\n" string pos) + length)) + pos (+ pos (length prompt)) + expr `(funcall ,expr ,prompt))) + (setq forms (append forms (list expr)) + properties (append properties plist))))) + (cons `(append ,@forms) properties))) + +(defun evil-interactive-form (&rest args) + "Evaluate interactive forms ARGS. +The return value is a cons cell (FORM . PROPERTIES), +where FORM is a single list-expression to be passed to +a standard `interactive' statement, and PROPERTIES is a +list of command properties as passed to `evil-define-command'." + (let (forms properties) + (dolist (arg args) + (if (not (stringp arg)) + (setq forms (append forms (list arg))) + (setq arg (evil-interactive-string arg) + forms (append forms (cdr (car arg))) + properties (append properties (cdr arg))))) + (cons (apply #'evil-concatenate-interactive-forms forms) + properties))) + +;;; Types + +(defun evil-type (object &optional default) + "Return the type of OBJECT, or DEFAULT if none." + (let (type) + (cond + ((overlayp object) + (setq type (overlay-get object :type))) + ((evil-range-p object) + (setq type (nth 2 object))) + ((listp object) + (setq type (plist-get object :type))) + ((commandp object) + (setq type (evil-get-command-property object :type))) + ((symbolp object) + (setq type (get object 'type)))) + (setq type (or type default)) + (and (evil-type-p type) type))) + +(defun evil-set-type (object type) + "Set the type of OBJECT to TYPE. +For example, (evil-set-type 'next-line 'line) +will make `line' the type of the `next-line' command." + (cond + ((overlayp object) + (overlay-put object :type type)) + ((evil-range-p object) + (evil-set-range-type object type)) + ((listp object) + (plist-put object :type type)) + ((commandp object) + (evil-set-command-property object :type type)) + ((symbolp object) + (put object 'type type))) + object) + +(defun evil-type-property (type prop) + "Return property PROP for TYPE." + (evil-get-property evil-type-properties type prop)) + +(defun evil-type-p (sym) + "Whether SYM is the name of a type." + (assq sym evil-type-properties)) + +(defun evil-expand (beg end type &rest properties) + "Expand BEG and END as TYPE with PROPERTIES. +Returns a list (BEG END TYPE PROPERTIES ...), where the tail +may contain a property list." + (apply #'evil-transform + ;; don't expand if already expanded + (unless (plist-get properties :expanded) :expand) + beg end type properties)) + +(defun evil-contract (beg end type &rest properties) + "Contract BEG and END as TYPE with PROPERTIES. +Returns a list (BEG END TYPE PROPERTIES ...), where the tail +may contain a property list." + (apply #'evil-transform :contract beg end type properties)) + +(defun evil-normalize (beg end type &rest properties) + "Normalize BEG and END as TYPE with PROPERTIES. +Returns a list (BEG END TYPE PROPERTIES ...), where the tail +may contain a property list." + (apply #'evil-transform :normalize beg end type properties)) + +(defun evil-transform (transform beg end type &rest properties) + "Apply TRANSFORM on BEG and END with PROPERTIES. +Returns a list (BEG END TYPE PROPERTIES ...), where the tail +may contain a property list. If TRANSFORM is undefined, +return positions unchanged." + (let* ((type (or type (evil-type properties))) + (transform (when (and type transform) + (evil-type-property type transform)))) + (if transform + (apply transform beg end properties) + (apply #'evil-range beg end type properties)))) + +(defun evil-describe (beg end type &rest properties) + "Return description of BEG and END with PROPERTIES. +If no description is available, return the empty string." + (let* ((type (or type (evil-type properties))) + (properties (plist-put properties :type type)) + (describe (evil-type-property type :string))) + (or (when describe + (apply describe beg end properties)) + ""))) + +;;; Ranges + +(defun evil-range (beg end &optional type &rest properties) + "Return a list (BEG END [TYPE] PROPERTIES...). +BEG and END are buffer positions (numbers or markers), +TYPE is a type as per `evil-type-p', and PROPERTIES is +a property list." + (let ((beg (evil-normalize-position beg)) + (end (evil-normalize-position end))) + (when (and (numberp beg) (numberp end)) + (append (list (min beg end) (max beg end)) + (when (evil-type-p type) + (list type)) + properties)))) + +(defun evil-range-p (object) + "Whether OBJECT is a range." + (and (listp object) + (>= (length object) 2) + (numberp (nth 0 object)) + (numberp (nth 1 object)))) + +(defun evil-range-beginning (range) + "Return beginning of RANGE." + (when (evil-range-p range) + (let ((beg (evil-normalize-position (nth 0 range))) + (end (evil-normalize-position (nth 1 range)))) + (min beg end)))) + +(defun evil-range-end (range) + "Return end of RANGE." + (when (evil-range-p range) + (let ((beg (evil-normalize-position (nth 0 range))) + (end (evil-normalize-position (nth 1 range)))) + (max beg end)))) + +(defun evil-range-properties (range) + "Return properties of RANGE." + (when (evil-range-p range) + (if (evil-type range) + (nthcdr 3 range) + (nthcdr 2 range)))) + +(defun evil-copy-range (range) + "Return a copy of RANGE." + (copy-sequence range)) + +(defun evil-set-range (range &optional beg end type &rest properties) + "Set RANGE to have beginning BEG and end END. +The TYPE and additional PROPERTIES may also be specified. +If an argument is nil, it's not used; the previous value is retained. +See also `evil-set-range-beginning', `evil-set-range-end', +`evil-set-range-type' and `evil-set-range-properties'." + (when (evil-range-p range) + (let ((beg (or (evil-normalize-position beg) + (evil-range-beginning range))) + (end (or (evil-normalize-position end) + (evil-range-end range))) + (type (or type (evil-type range))) + (plist (evil-range-properties range))) + (evil-sort beg end) + (setq plist (evil-concat-plists plist properties)) + (evil-set-range-beginning range beg) + (evil-set-range-end range end) + (evil-set-range-type range type) + (evil-set-range-properties range plist) + range))) + +(defun evil-set-range-beginning (range beg &optional copy) + "Set RANGE's beginning to BEG. +If COPY is non-nil, return a copy of RANGE." + (when copy + (setq range (evil-copy-range range))) + (setcar range beg) + range) + +(defun evil-set-range-end (range end &optional copy) + "Set RANGE's end to END. +If COPY is non-nil, return a copy of RANGE." + (when copy + (setq range (evil-copy-range range))) + (setcar (cdr range) end) + range) + +(defun evil-set-range-type (range type &optional copy) + "Set RANGE's type to TYPE. +If COPY is non-nil, return a copy of RANGE." + (when copy + (setq range (evil-copy-range range))) + (if type + (setcdr (cdr range) + (cons type (evil-range-properties range))) + (setcdr (cdr range) (evil-range-properties range))) + range) + +(defun evil-set-range-properties (range properties &optional copy) + "Set RANGE's properties to PROPERTIES. +If COPY is non-nil, return a copy of RANGE." + (when copy + (setq range (evil-copy-range range))) + (if (evil-type range) + (setcdr (cdr (cdr range)) properties) + (setcdr (cdr range) properties)) + range) + +(defun evil-range-union (range1 range2 &optional type) + "Return the union of the ranges RANGE1 and RANGE2. +If the ranges have conflicting types, use RANGE1's type. +This can be overridden with TYPE." + (when (and (evil-range-p range1) + (evil-range-p range2)) + (evil-range (min (evil-range-beginning range1) + (evil-range-beginning range2)) + (max (evil-range-end range1) + (evil-range-end range2)) + (or type + (evil-type range1) + (evil-type range2))))) + +(defun evil-subrange-p (range1 range2) + "Whether RANGE1 is contained within RANGE2." + (and (evil-range-p range1) + (evil-range-p range2) + (<= (evil-range-beginning range2) + (evil-range-beginning range1)) + (>= (evil-range-end range2) + (evil-range-end range1)))) + +(defun evil-select-inner-unrestricted-object (thing beg end type &optional count line) + "Return an inner text object range of COUNT objects. +If COUNT is positive, return objects following point; if COUNT is +negative, return objects preceding point. If one is unspecified, +the other is used with a negative argument. THING is a symbol +understood by `thing-at-point'. BEG, END and TYPE specify the +current selection. If LINE is non-nil, the text object should be +linewise, otherwise it is character wise." + (let* ((count (or count 1)) + (bnd (or (let ((b (bounds-of-thing-at-point thing))) + (and b (< (point) (cdr b)) b)) + (evil-bounds-of-not-thing-at-point thing)))) + ;; check if current object is selected + (when (or (not beg) (not end) + (> beg (car bnd)) + (< end (cdr bnd)) + (and (eq type 'inclusive) + (= (1+ beg) end))) ; empty region does not count + (when (or (not beg) (< (car bnd) beg)) (setq beg (car bnd))) + (when (or (not end) (> (cdr bnd) end)) (setq end (cdr bnd))) + (setq count (if (> count 0) (1- count) (1+ count)))) + (goto-char (if (< count 0) beg end)) + (evil-forward-nearest count + #'(lambda (cnt) (forward-thing thing cnt)) + #'(lambda (cnt) (evil-forward-not-thing thing cnt))) + (evil-range (if (>= count 0) beg (point)) + (if (< count 0) end (point)) + (if line 'line type) + :expanded t))) + +(defun evil-select-inner-object (thing beg end type &optional count line) + "Return an inner text object range of COUNT objects. +Selection is restricted to the current line. +If COUNT is positive, return objects following point; if COUNT is +negative, return objects preceding point. If one is unspecified, +the other is used with a negative argument. THING is a symbol +understood by `thing-at-point'. BEG, END and TYPE specify the +current selection. If LINE is non-nil, the text object should be +linewise, otherwise it is character wise." + (save-restriction + (narrow-to-region (save-excursion (beginning-of-line) (point)) + (save-excursion (end-of-line) (point))) + (evil-select-inner-unrestricted-object thing beg end type count line))) + +(defun evil-select-an-unrestricted-object (thing beg end type count &optional line) + "Return an outer text object range of COUNT objects. +If COUNT is positive, return objects following point; if COUNT is +negative, return objects preceding point. If one is unspecified, +the other is used with a negative argument. THING is a symbol +understood by thing-at-point. BEG, END and TYPE specify the +current selection. If LINE is non-nil, the text object should be +linewise, otherwise it is character wise." + (let* ((dir (if (> (or count 1) 0) +1 -1)) + (count (abs (or count 1))) + (objbnd (let ((b (bounds-of-thing-at-point thing))) + (and b (< (point) (cdr b)) b))) + (bnd (or objbnd (evil-bounds-of-not-thing-at-point thing))) + addcurrent other) + ;; check if current object is not selected + (when (or (not beg) (not end) + (> beg (car bnd)) + (< end (cdr bnd)) + (and (eq type 'inclusive) + (= (1+ beg) end))) ; empty region does not count + ;; if not, enlarge selection + (when (or (not beg) (< (car bnd) beg)) (setq beg (car bnd))) + (when (or (not end) (> (cdr bnd) end)) (setq end (cdr bnd))) + (if objbnd (setq addcurrent t))) + ;; make other and (point) reflect the selection + (cond + ((> dir 0) (goto-char end) (setq other beg)) + (t (goto-char beg) (setq other end))) + (cond + ;; do nothing more than only current is selected + ((not (and (= beg (car bnd)) (= end (cdr bnd))))) + ;; current match is thing, add whitespace + (objbnd + (let ((wsend (evil-with-restriction + ;; restrict to current line if we do non-line selection + (and (not line) (line-beginning-position)) + (and (not line) (line-end-position)) + (evil-bounds-of-not-thing-at-point thing dir)))) + (cond + (wsend + ;; add whitespace at end + (goto-char wsend) + (setq addcurrent t)) + (t + ;; no whitespace at end, try beginning + (save-excursion + (goto-char other) + (setq wsend + (evil-with-restriction + ;; restrict to current line if we do non-line selection + (and (not line) (line-beginning-position)) + (and (not line) (line-end-position)) + (evil-bounds-of-not-thing-at-point thing (- dir)))) + (when wsend (setq other wsend addcurrent t))))))) + ;; current match is whitespace, add thing + (t + (forward-thing thing dir) + (setq addcurrent t))) + ;; possibly count current object as selection + (if addcurrent (setq count (1- count))) + ;; move + (dotimes (_ count) + (let ((wsend (evil-bounds-of-not-thing-at-point thing dir))) + (if (and wsend (/= wsend (point))) + ;; start with whitespace + (forward-thing thing dir) + ;; start with thing + (forward-thing thing dir) + (setq wsend (evil-bounds-of-not-thing-at-point thing dir)) + (when wsend (goto-char wsend))))) + ;; return range + (evil-range (if (> dir 0) other (point)) + (if (< dir 0) other (point)) + (if line 'line type) + :expanded t))) + +(defun evil-select-an-object (thing beg end type &optional count line) + "Return an outer text object range of COUNT objects. +Selection is restricted to the current line. +If COUNT is positive, return objects following point; if COUNT is +negative, return objects preceding point. If one is unspecified, +the other is used with a negative argument. THING is a symbol +understood by thing-at-point. BEG, END and TYPE specify the +current selection. If LINE is non-nil, the text object should be +linewise, otherwise it is character wise." + (save-restriction + (narrow-to-region (save-excursion (beginning-of-line) (point)) + (save-excursion (end-of-line) (point))) + (evil-select-an-unrestricted-object thing beg end type count line))) + +(defun evil--get-block-range (op cl selection-type) + "Return the exclusive range of a visual selection. +OP and CL are pairs of buffer positions for the opening and +closing delimiter of a range. SELECTION-TYPE is the desired type +of selection. It is a symbol that determines which parts of the +block are selected. If it is 'inclusive or t the returned range +is \(cons (car OP) (cdr CL)). If it is 'exclusive or nil the +returned range is (cons (cdr OP) (car CL)). If it is +'exclusive-line the returned range will skip whitespace at the +end of the line of OP and at the beginning of the line of CL." + (cond + ((memq selection-type '(inclusive t)) (cons (car op) (cdr cl))) + ((memq selection-type '(exclusive nil)) (cons (cdr op) (car cl))) + ((eq selection-type 'exclusive-line) + (let ((beg (cdr op)) + (end (car cl))) + (save-excursion + (goto-char beg) + (when (and (eolp) (not (eobp))) + (setq beg (line-beginning-position 2))) + (goto-char end) + (skip-chars-backward " \t") + (when (bolp) + (setq end (point)) + (goto-char beg) + (when (and (not (bolp)) (< beg end)) + (setq end (1- end))))) + (cons beg end))) + (t + (user-error "Unknown selection-type %s" selection-type)))) + +(defun evil-select-block (thing beg end type count + &optional + selection-type + countcurrent + fixedscan) + "Return a range (BEG END) of COUNT delimited text objects. +BEG END TYPE are the currently selected (visual) range. The +delimited object must be given by THING-up function (see +`evil-up-block'). + +SELECTION-TYPE is symbol that determines which parts of the block +are selected. If it is 'inclusive or t OPEN and CLOSE are +included in the range. If it is 'exclusive or nil the delimiters +are not contained. If it is 'exclusive-line the delimiters are +not included as well as adjacent whitespace until the beginning +of the next line or the end of the previous line. If the +resulting selection consists of complete lines only and visual +state is not active, the returned selection is linewise. + +If COUNTCURRENT is non-nil an objected is counted if the current +selection matches that object exactly. + +Usually scanning for the surrounding block starts at (1+ beg) +and (1- end). If this might fail due to the behavior of THING +then FIXEDSCAN can be set to t. In this case the scan starts at +BEG and END. One example where this might fail is if BEG and END +are the delimiters of a string or comment." + (save-excursion + (save-match-data + (let* ((orig-beg beg) + (orig-end end) + (beg (or beg (point))) + (end (or end (point))) + (count (abs (or count 1))) + op cl op-end cl-end) + ;; We always assume at least one selected character. + (if (= beg end) (setq end (1+ end))) + ;; We scan twice: starting at (1+ beg) forward and at (1- end) + ;; backward. The resulting selection is the smaller one. + (goto-char (if fixedscan beg (1+ beg))) + (when (and (zerop (funcall thing +1)) (match-beginning 0)) + (setq cl (cons (match-beginning 0) (match-end 0))) + (goto-char (car cl)) + (when (and (zerop (funcall thing -1)) (match-beginning 0)) + (setq op (cons (match-beginning 0) (match-end 0))))) + ;; start scanning from end + (goto-char (if fixedscan end (1- end))) + (when (and (zerop (funcall thing -1)) (match-beginning 0)) + (setq op-end (cons (match-beginning 0) (match-end 0))) + (goto-char (cdr op-end)) + (when (and (zerop (funcall thing +1)) (match-beginning 0)) + (setq cl-end (cons (match-beginning 0) (match-end 0))))) + ;; Bug #607: use the tightest selection that contains the + ;; original selection. If non selection contains the original, + ;; use the larger one. + (cond + ((and (not op) (not cl-end)) + (error "No surrounding delimiters found")) + ((or (not op) ; first not found + (and cl-end ; second found + (>= (car op-end) (car op)) ; second smaller + (<= (cdr cl-end) (cdr cl)) + (<= (car op-end) beg) ; second contains orig + (>= (cdr cl-end) end))) + (setq op op-end cl cl-end))) + (setq op-end op cl-end cl) ; store copy + ;; if the current selection contains the surrounding + ;; delimiters, they do not count as new selection + (let ((cnt (if (and orig-beg orig-end (not countcurrent)) + (let ((sel (evil--get-block-range op cl selection-type))) + (if (and (<= orig-beg (car sel)) + (>= orig-end (cdr sel))) + count + (1- count))) + (1- count)))) + ;; starting from the innermost surrounding delimiters + ;; increase selection + (when (> cnt 0) + (setq op (progn + (goto-char (car op-end)) + (funcall thing (- cnt)) + (if (match-beginning 0) + (cons (match-beginning 0) (match-end 0)) + op)) + cl (progn + (goto-char (cdr cl-end)) + (funcall thing cnt) + (if (match-beginning 0) + (cons (match-beginning 0) (match-end 0)) + cl))))) + (let ((sel (evil--get-block-range op cl selection-type))) + (setq op (car sel) + cl (cdr sel))) + (cond + ((and (equal op orig-beg) (equal cl orig-end) + (or (not countcurrent) + (and countcurrent (/= count 1)))) + (error "No surrounding delimiters found")) + ((save-excursion + (and (not (evil-visual-state-p)) + (eq type 'inclusive) + (progn (goto-char op) (bolp)) + (progn (goto-char cl) (bolp)))) + (evil-range op cl 'line :expanded t)) + (t + (evil-range op cl type :expanded t))))))) + +(defun evil-select-paren (open close beg end type count &optional inclusive) + "Return a range (BEG END) of COUNT delimited text objects. +OPEN and CLOSE specify the opening and closing delimiter, +respectively. BEG END TYPE are the currently selected (visual) +range. If INCLUSIVE is non-nil, OPEN and CLOSE are included in +the range; otherwise they are excluded. + +The types of OPEN and CLOSE specify which kind of THING is used +for parsing with `evil-select-block'. If OPEN and CLOSE are +characters `evil-up-paren' is used. Otherwise OPEN and CLOSE +must be regular expressions and `evil-up-block' is used. + +If the selection is exclusive, whitespace at the end or at the +beginning of the selection until the end-of-line or beginning-of-line +is ignored." + ;; we need special linewise exclusive selection + (unless inclusive (setq inclusive 'exclusive-line)) + (cond + ((and (characterp open) (characterp close)) + (let ((thing #'(lambda (&optional cnt) + (evil-up-paren open close cnt))) + (bnd (or (bounds-of-thing-at-point 'evil-string) + (bounds-of-thing-at-point 'evil-comment) + ;; If point is at the opening quote of a string, + ;; this must be handled as if point is within the + ;; string, i.e. the selection must be extended + ;; around the string. Otherwise + ;; `evil-select-block' might do the wrong thing + ;; because it accidentally moves point inside the + ;; string (for inclusive selection) when looking + ;; for the current surrounding block. (re #364) + (and (= (point) (or beg (point))) + (save-excursion + (goto-char (1+ (or beg (point)))) + (or (bounds-of-thing-at-point 'evil-string) + (bounds-of-thing-at-point 'evil-comment))))))) + (if (not bnd) + (evil-select-block thing beg end type count inclusive) + (or (evil-with-restriction (car bnd) (cdr bnd) + (condition-case nil + (evil-select-block thing beg end type count inclusive) + (error nil))) + (save-excursion + (setq beg (or beg (point)) + end (or end (point))) + (goto-char (car bnd)) + (let ((extbeg (min beg (car bnd))) + (extend (max end (cdr bnd)))) + (evil-select-block thing + extbeg extend + type + count + inclusive + (or (< extbeg beg) (> extend end)) + t))))))) + (t + (evil-select-block #'(lambda (&optional cnt) + (evil-up-block open close cnt)) + beg end type count inclusive)))) + +(defun evil-select-quote-thing (thing beg end _type count &optional inclusive) + "Selection THING as if it described a quoted object. +THING is typically either 'evil-quote or 'evil-chars. This +function is called from `evil-select-quote'." + (save-excursion + (let* ((count (or count 1)) + (dir (if (> count 0) 1 -1)) + (bnd (let ((b (bounds-of-thing-at-point thing))) + (and b (< (point) (cdr b)) b))) + addcurrent + wsboth) + (if inclusive (setq inclusive t) + (when (= (abs count) 2) + (setq count dir) + (setq inclusive 'quote-only)) + ;; never extend with exclusive selection + (setq beg nil end nil)) + ;; check if the previously selected range does not contain a + ;; string + (unless (and beg end + (save-excursion + (goto-char (if (> dir 0) beg end)) + (forward-thing thing dir) + (and (<= beg (point)) (< (point) end)))) + ;; if so forget the range + (setq beg nil end nil)) + ;; check if there is a current object, if not fetch one + (when (not bnd) + (unless (and (zerop (forward-thing thing dir)) + (setq bnd (bounds-of-thing-at-point thing))) + (error "No quoted string found")) + (if (> dir 0) + (setq end (point)) + (setq beg (point))) + (setq addcurrent t)) + ;; check if current object is not selected + (when (or (not beg) (not end) (> beg (car bnd)) (< end (cdr bnd))) + ;; if not, enlarge selection + (when (or (not beg) (< (car bnd) beg)) (setq beg (car bnd))) + (when (or (not end) (> (cdr bnd) end)) (setq end (cdr bnd))) + (setq addcurrent t wsboth t)) + ;; maybe count current element + (when addcurrent + (setq count (if (> dir 0) (1- count) (1+ count)))) + ;; enlarge selection + (goto-char (if (> dir 0) end beg)) + (when (and (not addcurrent) + (= count (forward-thing thing count))) + (error "No quoted string found")) + (if (> dir 0) (setq end (point)) (setq beg (point))) + ;; add whitespace + (cond + ((not inclusive) (setq beg (1+ beg) end (1- end))) + ((not (eq inclusive 'quote-only)) + ;; try to add whitespace in forward direction + (goto-char (if (> dir 0) end beg)) + (if (setq bnd (bounds-of-thing-at-point 'evil-space)) + (if (> dir 0) (setq end (cdr bnd)) (setq beg (car bnd))) + ;; if not found try backward direction + (goto-char (if (> dir 0) beg end)) + (if (and wsboth (setq bnd (bounds-of-thing-at-point 'evil-space))) + (if (> dir 0) (setq beg (car bnd)) (setq end (cdr bnd))))))) + (evil-range beg end + ;; HACK: fixes #583 + ;; When not in visual state, an empty range is + ;; possible. However, this cannot be achieved with + ;; inclusive ranges, hence we use exclusive ranges + ;; in this case. In visual state the range must be + ;; inclusive because otherwise the selection would + ;; be wrong. + (if (evil-visual-state-p) 'inclusive 'exclusive) + :expanded t)))) + +(defun evil-select-quote (quote beg end type count &optional inclusive) + "Return a range (BEG END) of COUNT quoted text objects. +QUOTE specifies the quotation delimiter. BEG END TYPE are the +currently selected (visual) range. + +If INCLUSIVE is nil the previous selection is ignore. If there is +quoted string at point this object will be selected, otherwise +the following (if (> COUNT 0)) or preceeding object (if (< COUNT +0)) is selected. If (/= (abs COUNT) 2) the delimiting quotes are not +contained in the range, otherwise they are contained in the range. + +If INCLUSIVE is non-nil the selection depends on the previous +selection. If the currently selection contains at least one +character that is contained in a quoted string then the selection +is extended, otherwise it is thrown away. If there is a +non-selected object at point then this object is added to the +selection. Otherwise the selection is extended to the +following (if (> COUNT 0)) or preceeding object (if (< COUNT +0)). Any whitespace following (or preceeding if (< COUNT 0)) the +new selection is added to the selection. If no such whitespace +exists and the selection contains only one quoted string then the +preceeding (or following) whitespace is added to the range. " + (let ((evil-forward-quote-char quote)) + (or (let ((bnd (or (bounds-of-thing-at-point 'evil-comment) + (bounds-of-thing-at-point 'evil-string)))) + (when (and bnd (< (point) (cdr bnd)) + (/= (char-after (car bnd)) quote) + (/= (char-before (cdr bnd)) quote)) + (evil-with-restriction (car bnd) (cdr bnd) + (condition-case nil + (evil-select-quote-thing 'evil-quote-simple + beg end type + count + inclusive) + (error nil))))) + (let ((evil-forward-quote-char quote)) + (evil-select-quote-thing 'evil-quote + beg end type + count + inclusive))))) + +(defun evil-select-xml-tag (beg end type &optional count inclusive) + "Return a range (BEG END) of COUNT matching XML tags. +If INCLUSIVE is non-nil, the tags themselves are included +from the range." + (cond + ((and (not inclusive) (= (abs (or count 1)) 1)) + (let ((rng (evil-select-block #'evil-up-xml-tag beg end type count nil t))) + (if (or (and beg (= beg (evil-range-beginning rng)) + end (= end (evil-range-end rng))) + (= (evil-range-beginning rng) (evil-range-end rng))) + (evil-select-block #'evil-up-xml-tag beg end type count t) + rng))) + (t + (evil-select-block #'evil-up-xml-tag beg end type count inclusive)))) + +(defun evil-expand-range (range &optional copy) + "Expand RANGE according to its type. +Return a new range if COPY is non-nil." + (when copy + (setq range (evil-copy-range range))) + (unless (plist-get (evil-range-properties range) :expanded) + (setq range (evil-transform-range :expand range))) + range) + +(defun evil-contract-range (range &optional copy) + "Contract RANGE according to its type. +Return a new range if COPY is non-nil." + (evil-transform-range :contract range copy)) + +(defun evil-normalize-range (range &optional copy) + "Normalize RANGE according to its type. +Return a new range if COPY is non-nil." + (evil-transform-range :normalize range copy)) + +(defun evil-transform-range (transform range &optional copy) + "Apply TRANSFORM to RANGE according to its type. +Return a new range if COPY is non-nil." + (when copy + (setq range (evil-copy-range range))) + (when (evil-type range) + (apply #'evil-set-range range + (apply #'evil-transform transform range))) + range) + +(defun evil-describe-range (range) + "Return description of RANGE. +If no description is available, return the empty string." + (apply #'evil-describe range)) + +;;; Undo + +(defun evil-start-undo-step (&optional continue) + "Start a undo step. +All following buffer modifications are grouped together as a +single action. If CONTINUE is non-nil, preceding modifications +are included. The step is terminated with `evil-end-undo-step'." + (when (and (listp buffer-undo-list) + (not evil-in-single-undo)) + (if evil-undo-list-pointer + (evil-refresh-undo-step) + (unless (or continue (null (car-safe buffer-undo-list))) + (undo-boundary)) + (setq evil-undo-list-pointer (or buffer-undo-list t))))) + +(defun evil-end-undo-step (&optional continue) + "End a undo step started with `evil-start-undo-step'. +Adds an undo boundary unless CONTINUE is specified." + (when (and (listp buffer-undo-list) + evil-undo-list-pointer + (not evil-in-single-undo)) + (evil-refresh-undo-step) + (unless (or continue (null (car-safe buffer-undo-list))) + (undo-boundary)) + (setq evil-undo-list-pointer nil))) + +(defun evil-refresh-undo-step () + "Refresh `buffer-undo-list' entries for current undo step. +Undo boundaries until `evil-undo-list-pointer' are removed to +make the entries undoable as a single action. See +`evil-start-undo-step'." + (when evil-undo-list-pointer + (setq buffer-undo-list + (evil-filter-list #'null buffer-undo-list evil-undo-list-pointer)) + (setq evil-undo-list-pointer (or buffer-undo-list t)))) + +(defmacro evil-with-undo (&rest body) + "Execute BODY with enabled undo. +If undo is disabled in the current buffer, the undo information +is stored in `evil-temporary-undo' instead of `buffer-undo-list'." + (declare (indent defun) + (debug t)) + `(unwind-protect + (let (buffer-undo-list) + (unwind-protect + (progn ,@body) + (setq evil-temporary-undo buffer-undo-list) + ;; ensure evil-temporary-undo starts with exactly one undo + ;; boundary marker, i.e. nil + (unless (null (car-safe evil-temporary-undo)) + (push nil evil-temporary-undo)))) + (unless (eq buffer-undo-list t) + ;; undo is enabled, so update the global buffer undo list + (setq buffer-undo-list + ;; prepend new undos (if there are any) + (if (cdr evil-temporary-undo) + (nconc evil-temporary-undo buffer-undo-list) + buffer-undo-list) + evil-temporary-undo nil)))) + +(defmacro evil-with-single-undo (&rest body) + "Execute BODY as a single undo step." + (declare (indent defun) + (debug t)) + `(let (evil-undo-list-pointer) + (evil-with-undo + (unwind-protect + (progn + (evil-start-undo-step) + (let ((evil-in-single-undo t)) + ,@body)) + (evil-end-undo-step))))) + +(defun evil-undo-pop () + "Undo the last buffer change. +Removes the last undo information from `buffer-undo-list'. +If undo is disabled in the current buffer, use the information +in `evil-temporary-undo' instead." + (let ((paste-undo (list nil))) + (let ((undo-list (if (eq buffer-undo-list t) + evil-temporary-undo + buffer-undo-list))) + (when (or (not undo-list) (car undo-list)) + (user-error "Can't undo previous change")) + (while (and undo-list (null (car undo-list))) + (pop undo-list)) ; remove nil + (while (and undo-list (car undo-list)) + (push (pop undo-list) paste-undo)) + (let ((buffer-undo-list (nreverse paste-undo))) + (evil-save-echo-area + (undo))) + (if (eq buffer-undo-list t) + (setq evil-temporary-undo nil) + (setq buffer-undo-list undo-list))))) + +;;; Search +(defun evil-transform-regexp (regexp replacements-alist) + (replace-regexp-in-string + "\\\\+[^\\\\]" + #'(lambda (txt) + (let* ((b (match-beginning 0)) + (e (match-end 0)) + (ch (aref txt (1- e))) + (repl (assoc ch replacements-alist))) + (if (and repl (zerop (mod (length txt) 2))) + (concat (substring txt b (- e 2)) + (cdr repl)) + txt))) + regexp nil t)) + +(defun evil-transform-magic (str magic quote transform &optional _start) + "Transforms STR with magic characters. +MAGIC is a regexp that matches all potential magic +characters. Each occurence of CHAR as magic character within str +is replaced by the result of calling the associated TRANSFORM +function. TRANSFORM is a function taking two arguments, the +character to be transformed and the rest of string after the +character. The function should return a triple (REPLACEMENT REST +. STOP) where REPLACEMENT is the replacement and REST is the rest +of the string that has not been transformed. If STOP is non-nil +then the substitution stops immediately. The replacement starts +at position START, everything before that position is returned +literally. The result is a pair (RESULT . REST). RESULT is a +list containing the transformed parts in order. If two +subsequents parts are both strings, they are concatenated. REST +is the untransformed rest string (usually \"\" but may be more if +TRANSFORM stopped the substitution). Which characters are +considered as magic characters (i.e. the transformation happens +if the character is NOT preceeded by a backslash) is determined +by `evil-magic'. The special tokens \\v, \\V, \\m and \\M have +always a special meaning (like in Vim) and should not be +contained in TRANSFORMS, otherwise their meaning is overwritten. + +The parameter QUOTE is a quoting function applied to literal +transformations, usually `regexp-quote' or `replace-quote'." + (save-match-data + (let ((regexp (concat "\\(?:\\`\\|[^\\]\\)\\(\\\\\\(?:\\(" magic "\\)\\|\\(.\\)\\)\\|\\(" magic "\\)\\)")) + (magic-chars (evil-get-magic evil-magic)) + (evil-magic evil-magic) + (quote (or quote #'identity)) + result stop) + (while (and (not stop) str (string-match regexp str)) + (unless (zerop (match-beginning 1)) + (push (substring str 0 (match-beginning 1)) result)) + (let ((char (or (match-string 2 str) + (match-string 3 str) + (match-string 4 str))) + (rest (substring str (match-end 0)))) + (cond + ((match-beginning 4) + ;; magic character without backslash + (if (string-match magic-chars char) + ;; magic, do transform + (let ((trans (funcall transform (aref char 0) rest))) + (push (car trans) result) + (setq str (cadr trans) stop (nthcdr 2 trans))) + ;; non-magic, literal transformation + (push (funcall quote char) result) + (setq str rest))) + ((match-beginning 2) + ;; magic character with backslash + (if (not (string-match magic-chars char)) + ;; non-magic, do transform + (let ((trans (funcall transform (aref char 0) rest))) + (push (car trans) result) + (setq str (cadr trans) stop (nthcdr 2 trans))) + ;; magic, literal transformation + (push (funcall quote char) result) + (setq str rest))) + ((memq (aref char 0) '(?m ?M ?v ?V)) + (setq evil-magic (cdr (assq (aref char 0) + '((?m . t) + (?M . nil) + (?v . very-magic) + (?V . very-nomagic))))) + (setq magic-chars (evil-get-magic evil-magic)) + (setq str rest)) + (t + ;; non-magic char with backslash, literal transformation + (push (funcall quote char) result) + (setq str rest))))) + (cond + ((and str (not stop)) + (push str result) + (setq str "")) + ((not str) + (setq str ""))) + ;; concatenate subsequent strings + ;; note that result is in reverse order + (let (repl) + (while result + (cond + ((and (stringp (car result)) + (zerop (length (car result)))) + (pop result)) + ((and (stringp (car result)) + (stringp (cadr result))) + (setq result (cons (concat (cadr result) + (car result)) + (nthcdr 2 result)))) + (t + (push (pop result) repl)))) + (cons repl str))))) + +(defconst evil-vim-regexp-replacements + '((?n . "\n") (?r . "\r") + (?t . "\t") (?b . "\b") + (?s . "[[:space:]]") (?S . "[^[:space:]]") + (?d . "[[:digit:]]") (?D . "[^[:digit:]]") + (?x . "[[:xdigit:]]") (?X . "[^[:xdigit:]]") + (?o . "[0-7]") (?O . "[^0-7]") + (?a . "[[:alpha:]]") (?A . "[^[:alpha:]]") + (?l . "[a-z]") (?L . "[^a-z]") + (?u . "[A-Z]") (?U . "[^A-Z]") + (?y . "\\s") (?Y . "\\S") + (?\( . "\\(") (?\) . "\\)") + (?{ . "\\{") (?} . "\\}") + (?\[ . "[") (?\] . "]") + (?< . "\\<") (?> . "\\>") + (?_ . "\\_") + (?* . "*") (?+ . "+") + (?? . "?") (?= . "?") + (?. . ".") + (?` . "`") (?^ . "^") + (?$ . "$") (?| . "\\|"))) + +(defconst evil-regexp-magic "[][(){}<>_dDsSxXoOaAlLuUwWyY.*+?=^$`|nrtb]") + +(defun evil-transform-vim-style-regexp (regexp) + "Transforms vim-style backslash codes to Emacs regexp. +This includes the backslash codes \\d, \\D, \\s, \\S, \\x, \\X, +\\o, \\O, \\a, \\A, \\l, \\L, \\u, \\U and \\w, \\W. The new +codes \\y and \\Y can be used instead of the Emacs code \\s and +\\S which have a different meaning in Vim-style." + (car + (car + (evil-transform-magic + regexp evil-regexp-magic #'regexp-quote + #'(lambda (char rest) + (let ((repl (assoc char evil-vim-regexp-replacements))) + (if repl + (list (cdr repl) rest) + (list (concat "\\" (char-to-string char)) rest)))))))) + +;;; Substitute + +(defun evil-downcase-first (str) + "Return STR with the first letter downcased." + (if (zerop (length str)) + str + (concat (downcase (substring str 0 1)) + (substring str 1)))) + +(defun evil-upcase-first (str) + "Return STR with the first letter upcased." + (if (zerop (length str)) + str + (concat (upcase (substring str 0 1)) + (substring str 1)))) + +(defun evil-get-magic (magic) + "Returns a regexp matching the magic characters according to MAGIC. +Depending on the value of MAGIC the following characters are +considered magic. + t [][{}*+?.&~$^ + nil [][{}*+?$^ + 'very-magic not 0-9A-Za-z_ + 'very-nomagic empty." + (cond + ((eq magic t) "[][}{*+?.&~$^]") + ((eq magic 'very-magic) "[^0-9A-Za-z_]") + ((eq magic 'very-nomagic) "\\\\") + (t "[][}{*+?$^]"))) + +;; TODO: support magic characters in patterns +(defconst evil-replacement-magic "[eElLuU0-9&#,rnbt=]" + "All magic characters in a replacement string") + +(defun evil-compile-subreplacement (to &optional start) + "Convert a regexp replacement TO to Lisp from START until \\e or \\E. +Returns a pair (RESULT . REST). RESULT is a list suitable for +`perform-replace' if necessary, the original string if not. +REST is the unparsed remainder of TO." + (let ((result + (evil-transform-magic + to evil-replacement-magic #'replace-quote + #'(lambda (char rest) + (cond + ((eq char ?#) + (list '(number-to-string replace-count) rest)) + ((eq char ?r) (list "\r" rest)) + ((eq char ?n) (list "\n" rest)) + ((eq char ?b) (list "\b" rest)) + ((eq char ?t) (list "\t" rest)) + ((memq char '(?e ?E)) + `("" ,rest . t)) + ((memq char '(?l ?L ?u ?U)) + (let ((result (evil-compile-subreplacement rest)) + (func (cdr (assoc char + '((?l . evil-downcase-first) + (?L . downcase) + (?u . evil-upcase-first) + (?U . upcase)))))) + (list `(,func + (replace-quote + (evil-match-substitute-replacement + ,(car result) + (not case-replace)))) + (cdr result)))) + ((eq char ?=) + (when (or (zerop (length rest)) + (not (eq (aref rest 0) ?@))) + (user-error "Expected @ after \\=")) + (when (< (length rest) 2) + (user-error "Expected register after \\=@")) + (list (evil-get-register (aref rest 1)) + (substring rest 2))) + ((eq char ?,) + (let* ((obj (read-from-string rest)) + (result `(replace-quote ,(car obj))) + (end + ;; swallow a space after a symbol + (if (and (or (symbolp (car obj)) + ;; swallow a space after 'foo, + ;; but not after (quote foo) + (and (eq (car-safe (car obj)) 'quote) + (not (= ?\( (aref rest 0))))) + (eq (string-match " " rest (cdr obj)) + (cdr obj))) + (1+ (cdr obj)) + (cdr obj)))) + (list result (substring rest end)))) + ((eq char ?0) + (list "\\&" rest)) + (t + (list (concat "\\" (char-to-string char)) rest)))) + start))) + (let ((rest (cdr result)) + (result (car result))) + (replace-match-string-symbols result) + (cons (if (cdr result) + (cons 'concat result) + (or (car result) "")) + rest)))) + +(defun evil-compile-replacement (to) + "Maybe convert a regexp replacement TO to Lisp. +Returns a list suitable for `perform-replace' if necessary, the +original string if not. Currently the following magic characters +in replacements are supported: 0-9&#lLuUrnbt, +The magic character , (comma) start an Emacs-lisp expression." + (when (stringp to) + (save-match-data + (cons 'replace-eval-replacement + (car (evil-compile-subreplacement to)))))) + +(defun evil-replace-match (replacement &optional fixedcase string) + "Replace text match by last search with REPLACEMENT. +If REPLACEMENT is an expression it will be evaluated to compute +the replacement text, otherwise the function behaves as +`replace-match'." + (if (stringp replacement) + (replace-match replacement fixedcase nil string) + (replace-match (funcall (car replacement) + (cdr replacement) + 0) + fixedcase nil string))) + +(defun evil-match-substitute-replacement (replacement &optional fixedcase string) + "Return REPLACEMENT as it will be inserted by `evil-replace-match'." + (if (stringp replacement) + (match-substitute-replacement replacement fixedcase nil string) + (match-substitute-replacement (funcall (car replacement) + (cdr replacement) + 0) + fixedcase nil string))) + +;;; Alignment + +(defun evil-justify-lines (beg end justify position) + "Justifes all lines in a range. +BEG and END specify the range of those lines to be +justified. JUSTIFY is either 'left, 'right or 'center according +to the justification type. POSITION is the maximal text width for +right and center justification or the column at which the lines +should be left-aligned for left justification." + (let ((fill-column position) + adaptive-fill-mode fill-prefix) + (evil-with-restriction + (save-excursion + (goto-char beg) + (line-beginning-position)) + (save-excursion + (goto-char end) + (if (bolp) + (line-end-position 0) + (line-end-position))) + (goto-char (point-min)) + (while (progn + (if (eq justify 'left) + (indent-line-to position) + (when (re-search-forward "^[[:space:]]*" nil t) + (delete-region (match-beginning 0) + (match-end 0))) + (justify-current-line justify nil t)) + (and (zerop (forward-line)) (bolp)))) + (goto-char (point-min)) + (back-to-indentation)))) + +;;; View helper + +(defvar-local evil-list-view-select-action nil) +(put 'evil-list-view-select-action 'permanent-local t) + +(define-derived-mode evil-list-view-mode tabulated-list-mode + "Evil List View" + (tabulated-list-init-header) + (tabulated-list-print)) + +(defun evil-list-view-goto-entry () + (interactive) + (when (and evil-list-view-select-action + (not (eobp))) + (let* ((line (line-number-at-pos (point))) + (entry (elt tabulated-list-entries (1- line)))) + (funcall evil-list-view-select-action (nth 1 entry))))) + +(defun evil-list-view-quit () + (interactive) + (quit-window 'kill)) + +(define-key evil-list-view-mode-map (kbd "q") #'evil-list-view-quit) +(define-key evil-list-view-mode-map [follow-link] nil) ;; allows mouse-1 to be activated +(define-key evil-list-view-mode-map [mouse-1] #'evil-list-view-goto-entry) +(define-key evil-list-view-mode-map [return] #'evil-list-view-goto-entry) + +(defmacro evil-with-view-list (&rest properties) + "Opens new list view buffer. + +PROPERTIES is a property-list which supports the following properties: + +:name (required) The name of the buffer. +:mode-name (required) The name for the mode line. +:format (required) The value for `tabulated-list-format'. +:entries (required) The value for `tabulated-list-entries'. +:select-action (optional) A function for row selection. + It takes in a single parameter, which is the selected row's + vector value that is passed into `:entries'. +" + (declare (indent defun) (debug t)) + `(let ((bufname (concat "*" ,(plist-get properties :name) "*")) + (inhibit-read-only t)) + (and (get-buffer bufname) + (kill-buffer bufname)) + (let ((buf (get-buffer-create bufname))) + (with-current-buffer buf + (setq tabulated-list-format ,(plist-get properties :format)) + (setq tabulated-list-entries ,(plist-get properties :entries)) + (setq evil-list-view-select-action ,(plist-get properties :select-action)) + (evil-list-view-mode) + (setq mode-name ,(plist-get properties :mode-name)) + (evil-motion-state)) + (switch-to-buffer-other-window buf)))) + +(provide 'evil-common) + +;;; evil-common.el ends here diff --git a/elpa/evil-20220510.2302/evil-common.elc b/elpa/evil-20220510.2302/evil-common.elc Binary files differnew file mode 100644 index 0000000..9c2006f --- /dev/null +++ b/elpa/evil-20220510.2302/evil-common.elc diff --git a/elpa/evil-20220510.2302/evil-core.el b/elpa/evil-20220510.2302/evil-core.el new file mode 100644 index 0000000..cf75497 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-core.el @@ -0,0 +1,1392 @@ +;;; evil-core.el --- Core functionality -*- lexical-binding: t -*- +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Evil is defined as a globalized minor mode, enabled with the toggle +;; function `evil-mode'. This in turn enables `evil-local-mode' in +;; every buffer, which sets up the buffer's state. +;; +;; Each state has its own keymaps, and these keymaps have status as +;; "emulation keymaps" with priority over regular keymaps. Emacs +;; maintains the following keymap hierarchy (highest priority first): +;; +;; * Overriding keymaps/overlay keymaps... +;; * Emulation mode keymaps... +;; - Evil keymaps... +;; * Minor mode keymaps... +;; * Local keymap (`local-set-key') +;; * Global keymap (`global-set-key') +;; +;; Within this hierarchy, Evil arranges the keymaps for the current +;; state as shown below: +;; +;; * Intercept keymaps... +;; * Local state keymap +;; * Minor-mode keymaps... +;; * Auxiliary keymaps... +;; * Overriding keymaps... +;; * Global state keymap +;; * Keymaps for other states... +;; +;; These keymaps are listed in `evil-mode-map-alist', which is listed +;; in `emulation-mode-map-alist'. +;; +;; Most of the key bindings for a state are stored in its global +;; keymap, which has a name such as `evil-normal-state-map'. (See the +;; file evil-maps.el, which contains all the default key bindings.) A +;; state also has a local keymap (`evil-normal-state-local-map'), +;; which may contain user customizations for the current buffer. +;; Furthermore, any Emacs mode may be assigned state bindings of its +;; own by passing the mode's keymap to the function `evil-define-key' +;; or `evil-define-minor-mode-key'. The former uses a specific map to +;; define the key in while the latter associates the key with a +;; particular mode. These mode-specific bindings are ultimately stored +;; in so-called auxiliary and minor-mode keymaps respectively, which +;; are sandwiched between the local keymap and the global keymap. +;; Finally, the state may also activate the keymaps of other states +;; (e.g., Normal state inherits bindings from Motion state). +;; +;; For integration purposes, a regular Emacs keymap may be "elevated" +;; to emulation status by passing it to `evil-make-intercept-map' or +;; `evil-make-overriding-map'. An "intercept" keymap has priority over +;; all other Evil keymaps. (Evil uses this facility when debugging and +;; for handling the "ESC" key in the terminal.) More common is the +;; "overriding" keymap, which only has priority over the global state +;; keymap. (This is useful for adapting key-heavy modes such as Dired, +;; where all but a few keys should be left as-is and should not be +;; shadowed by Evil's default bindings.) +;; +;; States are defined with the macro `evil-define-state', which +;; creates a command for switching to the state. This command, +;; for example `evil-normal-state' for Normal state, performs +;; the following tasks: +;; +;; * Setting `evil-state' to the new state. +;; * Refreshing the keymaps in `evil-mode-map-alist'. +;; * Updating the mode line. +;; - Normal state depends on `evil-normal-state-tag'. +;; * Adjusting the cursor's appearance. +;; - Normal state depends on `evil-normal-state-cursor'. +;; * Displaying a message in the echo area. +;; - Normal state depends on `evil-normal-state-message'. +;; * Running hooks. +;; - Normal state runs `evil-normal-state-entry-hook' when +;; entering, and `evil-normal-state-exit-hook' when exiting. +;; +;; The various properties of a state can be accessed through their +;; respective variables, or by passing a keyword and the state's name +;; to the `evil-state-property' function. Evil defines the states +;; Normal state ("normal"), Insert state ("insert"), Visual state +;; ("visual"), Replace state ("replace"), Operator-Pending state +;; ("operator"), Motion state ("motion") and Emacs state ("emacs"). + +(require 'evil-common) + +;;; Code: + +(declare-function evil-emacs-state-p "evil-states") +(declare-function evil-ex-p "evil-ex") +(defvar evil-mode-buffers) + +(define-minor-mode evil-local-mode + "Minor mode for setting up Evil in a single buffer." + :init-value nil + (cond + ((evil-disabled-buffer-p) + ;; Don't leave the mode variable on in buffers where evil disabled, because + ;; functions that check this variable will get an incorrect result (e.g., + ;; evil-refresh-cursor). + (setq evil-local-mode nil)) + (evil-local-mode + (setq emulation-mode-map-alists + (evil-concat-lists '(evil-mode-map-alist) + emulation-mode-map-alists)) + (evil-initialize-local-keymaps) + ;; restore the proper value of `major-mode' in Fundamental buffers + (when (eq major-mode 'turn-on-evil-mode) + (setq major-mode 'fundamental-mode)) + (when (minibufferp) + (setq-local evil-default-state 'insert) + (setq-local evil-echo-state nil)) + ;; The initial state is usually setup by `evil-initialize' when + ;; the major-mode in a buffer changes. This preliminary + ;; initialization is only for the case when `evil-local-mode' is + ;; called directly for the first time in a buffer. + (unless evil-state (evil-initialize-state)) + (add-hook 'input-method-activate-hook 'evil-activate-input-method t t) + (add-hook 'input-method-deactivate-hook 'evil-deactivate-input-method t t) + (add-hook 'activate-mark-hook 'evil-visual-activate-hook nil t) + (add-hook 'pre-command-hook 'evil-repeat-pre-hook) + (add-hook 'post-command-hook 'evil-repeat-post-hook)) + (t + (evil-refresh-mode-line) + (remove-hook 'activate-mark-hook 'evil-visual-activate-hook t) + (remove-hook 'input-method-activate-hook 'evil-activate-input-method t) + (remove-hook 'input-method-deactivate-hook 'evil-deactivate-input-method t) + (evil-change-state nil)))) + +;; Make the variable permanent local. This is particular useful in +;; conjunction with nXhtml/mumamo because mumamo does not touch these +;; variables. +(put 'evil-local-mode 'permanent-local t) + +(defun turn-on-evil-mode (&optional arg) + "Turn on Evil in the current buffer." + (interactive) + (evil-local-mode (or arg 1))) + +(defun turn-off-evil-mode (&optional arg) + "Turn off Evil in the current buffer." + (interactive) + (evil-local-mode (or arg -1))) + +;; The function `evil-initialize' should only be used to initialize +;; `evil-local-mode' from the globalized minor-mode `evil-mode'. It is +;; called whenever evil is enabled in a buffer for the first time or +;; when evil is active and the major-mode of the buffer changes. In +;; addition to enabling `evil-local-mode' it also sets the initial +;; evil-state according to the major-mode. +(defun evil-initialize () + "Enable Evil in the current buffer, if appropriate. +To enable Evil globally, do (evil-mode 1)." + (unless (and (minibufferp) (not evil-want-minibuffer)) + (evil-local-mode 1) + (evil-initialize-state))) + +;;;###autoload (autoload 'evil-mode "evil" nil t) +(define-globalized-minor-mode evil-mode + evil-local-mode evil-initialize) + +;; No hooks are run in Fundamental buffers, so other measures are +;; necessary to initialize Evil in these buffers. When Evil is +;; enabled globally, the default value of `major-mode' is set to +;; `turn-on-evil-mode', so that Evil is enabled in Fundamental +;; buffers as well. Then, the buffer-local value of `major-mode' is +;; changed back to `fundamental-mode'. (Since the `evil-mode' function +;; is created by a macro, we use `defadvice' to augment it.) +(defadvice evil-mode (after start-evil activate) + "Enable Evil in Fundamental mode." + (if evil-mode + (progn + (when (eq (default-value 'major-mode) 'fundamental-mode) + ;; changed back by `evil-local-mode' + (setq-default major-mode 'turn-on-evil-mode)) + (ad-enable-regexp "^evil") + (ad-activate-regexp "^evil") + (with-no-warnings (evil-esc-mode 1))) + (when (eq (default-value 'major-mode) 'turn-on-evil-mode) + (setq-default major-mode 'fundamental-mode)) + (ad-disable-regexp "^evil") + (ad-update-regexp "^evil") + (with-no-warnings (evil-esc-mode -1)))) + +(defun evil-change-state (state &optional message) + "Change the state to STATE. +If STATE is nil, disable all states." + (let ((func (evil-state-property (or state evil-state) :toggle))) + (when (and (functionp func) + (or message (not (eq state evil-state)))) + (funcall func (if state (and message 1) -1))))) + +(defmacro evil-save-state (&rest body) + "Save the current state; execute BODY; restore the state." + (declare (indent defun) + (debug t)) + `(let* ((evil-state evil-state) + (evil-previous-state evil-previous-state) + (evil-previous-state-alist (copy-tree evil-previous-state-alist)) + (evil-next-state evil-next-state) + (old-state evil-state) + (inhibit-quit t) + (buf (current-buffer))) + (unwind-protect + (progn ,@body) + (when (buffer-live-p buf) + (with-current-buffer buf + (evil-change-state old-state)))))) + +(defmacro evil-with-state (state &rest body) + "Change to STATE and execute BODY without refreshing the display. +Restore the previous state afterwards." + (declare (indent defun) + (debug t)) + `(evil-without-display + (evil-save-state + (evil-change-state ',state) + ,@body))) + +(defun evil-initializing-p (&optional buffer) + "Whether Evil is in the process of being initialized." + (memq (or buffer (current-buffer)) evil-mode-buffers)) + +(defun evil-initialize-state (&optional state buffer) + "Set up the initial state for BUFFER. +BUFFER defaults to the current buffer. +Uses STATE if specified, or calls `evil-initial-state-for-buffer'. +See also `evil-set-initial-state'." + (with-current-buffer (or buffer (current-buffer)) + (if state (evil-change-state state) + (evil-change-to-initial-state buffer)))) +(put 'evil-initialize-state 'permanent-local-hook t) + +(defun evil-initial-state-for-buffer-name (&optional name default) + "Return the initial Evil state to use for a buffer with name NAME. +Matches the name against the regular expressions in +`evil-buffer-regexps'. If none matches, returns DEFAULT." + (let ((name (if (stringp name) name (buffer-name name))) + regexp state) + (when (stringp name) + (catch 'done + (dolist (entry evil-buffer-regexps default) + (setq regexp (car entry) + state (cdr entry)) + (when (string-match regexp name) + (throw 'done state))))))) + +(defun evil-disabled-buffer-p (&optional buffer) + "Whether Evil should be disabled in BUFFER." + (null (evil-initial-state-for-buffer-name buffer 'undefined))) + +(defun evil-initial-state-for-buffer (&optional buffer default) + "Return the initial Evil state to use for BUFFER. +BUFFER defaults to the current buffer. Returns DEFAULT +if no initial state is associated with BUFFER. +See also `evil-initial-state'." + (with-current-buffer (or buffer (current-buffer)) + (or (evil-initial-state-for-buffer-name (buffer-name)) + (catch 'done + (dolist (mode minor-mode-map-alist) + (setq mode (car-safe mode)) + (when (and (boundp mode) (symbol-value mode)) + (when (setq mode (evil-initial-state mode)) + (throw 'done mode))))) + (evil-initial-state major-mode nil t) + default))) + +(defun evil-initial-state (mode &optional default follow-parent checked-modes) + "Return the Evil state to use for MODE or its alias. +Returns DEFAULT if no initial state is associated with MODE. +The initial state for a mode can be set with +`evil-set-initial-state'. + +If FOLLOW-PARENT is non-nil, also check parent modes of MODE and +its alias. CHECKED-MODES is used internally and should not be set +initially." + (cond + ((and mode (symbolp mode) (memq mode checked-modes)) + (error "Circular reference detected in ancestors of %s\n%s" + major-mode checked-modes)) + ((and mode (symbolp mode)) + (let ((mode-alias (let ((func (symbol-function mode))) + (when (symbolp func) + func))) + state modes) + (or + (catch 'done + (dolist (entry (evil-state-property t :modes) default) + (setq state (car entry) + modes (symbol-value (cdr entry))) + (when (or (memq mode modes) + (and mode-alias + (memq mode-alias modes))) + (throw 'done state)))) + (when follow-parent + (evil-initial-state (get mode 'derived-mode-parent) + nil t (cons mode checked-modes))) + (when follow-parent + (evil-initial-state (get mode-alias 'derived-mode-parent) + nil t (cons mode-alias checked-modes)))))))) + +(defun evil-set-initial-state (mode state) + "Set the initial state for major mode MODE to STATE. +This is the state the buffer comes up in." + (dolist (modes (evil-state-property t :modes)) + (setq modes (cdr-safe modes)) + (set modes (delq mode (symbol-value modes)))) + (when state + (add-to-list (evil-state-property state :modes) mode))) + +(evil-define-command evil-change-to-initial-state + (&optional buffer message) + "Change the state of BUFFER to its initial state. +This is the state the buffer came up in. If Evil is not activated +then this function does nothing." + :keep-visual t + :suppress-operator t + (with-current-buffer (or buffer (current-buffer)) + (when evil-local-mode + (evil-change-state (evil-initial-state-for-buffer + buffer (or evil-default-state 'normal)) + message)))) + +(evil-define-command evil-change-to-previous-state + (&optional buffer message) + "Change the state of BUFFER to its previous state." + :keep-visual t + :repeat abort + :suppress-operator t + (with-current-buffer (or buffer (current-buffer)) + (let ((prev-state evil-previous-state) + (prev-prev-state (cdr-safe (assoc evil-previous-state + evil-previous-state-alist)))) + (evil-change-state nil) + (when prev-prev-state + (setq evil-previous-state prev-prev-state)) + (evil-change-state (or prev-state evil-default-state 'normal) + message)))) + +;; When a buffer is created in a low-level way, it is invisible to +;; Evil (as well as other globalized minor modes) because no hooks are +;; run. This is appropriate since many buffers are used for throwaway +;; purposes. Passing the buffer to `set-window-buffer' indicates +;; otherwise, though, so advise this function to initialize Evil. +(defadvice set-window-buffer (before evil) + "Initialize Evil in the displayed buffer." + (when evil-mode + (when (get-buffer (ad-get-arg 1)) + (with-current-buffer (ad-get-arg 1) + (unless evil-local-mode + (evil-local-mode 1)))))) + +;; Refresh cursor color. +;; Cursor color can only be set for each frame but not for each buffer. +(add-hook 'window-configuration-change-hook 'evil-refresh-cursor) +(defadvice select-window (after evil activate) + (evil-refresh-cursor)) + +(defun evil-generate-mode-line-tag (&optional state) + "Generate the evil mode-line tag for STATE." + (let ((tag (evil-state-property state :tag t))) + (when (functionp tag) + (setq tag (funcall tag))) + ;; prepare mode-line: add tooltip + (if (stringp tag) + (propertize tag + 'help-echo (evil-state-property state :name) + 'mouse-face 'mode-line-highlight) + tag))) + +(defun evil-refresh-mode-line (&optional state) + "Refresh mode line tag." + (when (listp mode-line-format) + (setq evil-mode-line-tag (evil-generate-mode-line-tag state)) + ;; refresh mode line data structure + ;; first remove evil from mode-line + (setq mode-line-format (delq 'evil-mode-line-tag mode-line-format)) + (let ((mlpos mode-line-format) + pred which where) + ;; determine before/after which symbol the tag should be placed + (cond + ((eq evil-mode-line-format 'before) + (setq where 'after which 'mode-line-position)) + ((eq evil-mode-line-format 'after) + (setq where 'after which 'mode-line-modes)) + ((consp evil-mode-line-format) + (setq where (car evil-mode-line-format) + which (cdr evil-mode-line-format)))) + ;; find the cons-cell of the symbol before/after which the tag + ;; should be placed + (while (and mlpos + (let ((sym (or (car-safe (car mlpos)) (car mlpos)))) + (not (eq which sym)))) + (setq pred mlpos + mlpos (cdr mlpos))) + ;; put evil tag at the right position in the mode line + (cond + ((not mlpos)) ;; position not found, so do not add the tag + ((eq where 'before) + (if pred + (setcdr pred (cons 'evil-mode-line-tag mlpos)) + (setq mode-line-format + (cons 'evil-mode-line-tag mode-line-format)))) + ((eq where 'after) + (setcdr mlpos (cons 'evil-mode-line-tag (cdr mlpos))))) + (force-mode-line-update)))) + +;; input methods should be disabled in non-insertion states +(defun evil-activate-input-method () + "Enable input method in states with :input-method non-nil." + (let (input-method-activate-hook + input-method-deactivate-hook) + (when (and evil-local-mode evil-state) + (setq evil-input-method current-input-method) + (unless (evil-state-property evil-state :input-method) + (deactivate-input-method))))) +(put 'evil-activate-input-method 'permanent-local-hook t) + +(defun evil-deactivate-input-method () + "Disable input method in all states." + (let (input-method-activate-hook + input-method-deactivate-hook) + (when (and evil-local-mode evil-state) + (setq evil-input-method nil)))) +(put 'evil-deactivate-input-method 'permanent-local-hook t) + +(defmacro evil-without-input-method-hooks (&rest body) + "Execute body with evil's activate/deactivate-input-method hooks deactivated. + +This allows input methods to be used in normal-state." + `(unwind-protect + (progn + (remove-hook 'input-method-activate-hook 'evil-activate-input-method t) + (remove-hook 'input-method-deactivate-hook + 'evil-deactivate-input-method t) + ,@body) + (progn + (add-hook 'input-method-activate-hook 'evil-activate-input-method nil t) + (add-hook 'input-method-deactivate-hook + 'evil-deactivate-input-method nil t)))) + +(defadvice toggle-input-method (around evil) + "Refresh `evil-input-method'." + (cond + ((not evil-local-mode) + ad-do-it) + ((evil-state-property evil-state :input-method) + ad-do-it) + (t + (let ((current-input-method evil-input-method)) + ad-do-it)))) + +;; Local keymaps are implemented using buffer-local variables. +;; However, unless a buffer-local value already exists, +;; `define-key' acts on the variable's default (global) value. +;; So we need to initialize the variable whenever we enter a +;; new buffer or when the buffer-local values are reset. +(defun evil-initialize-local-keymaps () + "Initialize a buffer-local value for local keymaps as necessary. +The initial value is that of `make-sparse-keymap'." + (dolist (entry evil-local-keymaps-alist) + (let ((map (cdr entry))) + (unless (and (keymapp (symbol-value map)) + (local-variable-p map)) + (set map (make-sparse-keymap)))))) + +(defun evil-make-overriding-map (keymap &optional state copy) + "Give KEYMAP precedence over the global keymap of STATE. +The keymap will have lower precedence than custom STATE bindings. +If STATE is nil, give it precedence over all states. +If COPY is t, create a copy of KEYMAP and give that +higher precedence. See also `evil-make-intercept-map'." + (let ((key [override-state])) + (if (not copy) + (define-key keymap key (or state 'all)) + (unless (keymapp copy) + (setq copy (assq-delete-all 'menu-bar (copy-keymap keymap)))) + (define-key copy key (or state 'all)) + (define-key keymap key copy)))) + +(defun evil-make-intercept-map (keymap &optional state aux) + "Give KEYMAP precedence over all Evil keymaps in STATE. +If STATE is nil, give it precedence over all states. If AUX is non-nil, make the +auxiliary keymap corresponding to KEYMAP in STATE an intercept keymap instead of +KEYMAP itself. See also `evil-make-overriding-map'." + (let ((key [intercept-state]) + (keymap (if aux + (evil-get-auxiliary-keymap keymap state t t) + keymap))) + (define-key keymap key (or state 'all)))) + +(defmacro evil-define-keymap (keymap doc &rest body) + "Define a keymap KEYMAP listed in `evil-mode-map-alist'. +That means it will have precedence over regular keymaps. + +DOC is the documentation for the variable. BODY, if specified, +is executed after toggling the mode. Optional keyword arguments +may be specified before the body code: + +:mode VAR Mode variable. If unspecified, the variable + is based on the keymap name. +:local BOOLEAN Whether the keymap should be buffer-local, that is, + reinitialized for each buffer. +:func BOOLEAN Create a toggle function even if BODY is empty. + +\(fn KEYMAP DOC [[KEY VAL]...] BODY...)" + (declare (indent defun) + (doc-string 2) + (debug (&define name + [&optional stringp] + [&rest [keywordp sexp]] + def-body))) + (let ((func t) + arg intercept key local mode overriding) + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body)) + (cond + ((eq key :mode) + (setq mode arg)) + ((eq key :local) + (setq local arg)) + ((eq key :func) + (setq func arg)) + ((eq key :intercept) + (setq intercept arg)) + ((eq key :overriding) + (setq overriding arg)))) + (setq mode (or mode + (intern (replace-regexp-in-string + "\\(?:-\\(?:mode-\\)?\\(?:key\\)?map\\)?$" + "-mode" + (symbol-name keymap))))) + `(progn + (defvar ,keymap ,(unless local '(make-sparse-keymap))) + (unless (get ',keymap 'variable-documentation) + (put ',keymap 'variable-documentation ,doc)) + (defvar ,mode nil) + (unless (get ',mode 'variable-documentation) + (put ',mode 'variable-documentation ,doc)) + (make-variable-buffer-local ',mode) + (put ',mode 'permanent-local t) + (when ,intercept + (evil-make-intercept-map ,keymap)) + (when ,overriding + (evil-make-overriding-map ,keymap)) + ,@(if local + `((make-variable-buffer-local ',keymap) + (put ',keymap 'permanent-local t) + (evil--add-to-alist 'evil-local-keymaps-alist + ',mode ',keymap)) + `((evil--add-to-alist 'evil-global-keymaps-alist + ',mode ',keymap) + (evil--add-to-alist 'evil-mode-map-alist + ',mode ,keymap))) + ,(when (or body func) + `(defun ,mode (&optional arg) + ,@(when doc `(,doc)) + (interactive) + (cond + ((numberp arg) + (setq ,mode (> arg 0))) + (t + (setq ,mode (not ,mode)))) + ,@body)) + ',keymap))) + +;; The ESC -> escape translation code has been provided by Stefan +;; Monnier in the discussion of GNU Emacs bug #13793. +(defun evil-esc-mode (&optional arg) + "Toggle interception of \\e (escape). +Enable with positive ARG and disable with negative ARG. + +When enabled, `evil-esc-mode' modifies the entry of \\e in +`input-decode-map'. If such an event arrives, it is translated to +a plain 'escape event if no further event occurs within +`evil-esc-delay' seconds. Otherwise no translation happens and +the ESC prefix map (i.e. the map originally bound to \\e in +`input-decode-map`) is returned." + (cond + ((or (null arg) (eq arg 0)) + (evil-esc-mode (if evil-esc-mode -1 +1))) + ((> arg 0) + (unless evil-esc-mode + (setq evil-esc-mode t) + (add-hook 'after-make-frame-functions #'evil-init-esc) + (mapc #'evil-init-esc (frame-list)))) + ((< arg 0) + (when evil-esc-mode + (remove-hook 'after-make-frame-functions #'evil-init-esc) + (mapc #'evil-deinit-esc (frame-list)) + (setq evil-esc-mode nil))))) + +(defun evil-init-esc (frame) + "Update `input-decode-map' in terminal." + (with-selected-frame frame + (let ((term (frame-terminal frame))) + (when (and + (or (eq evil-intercept-esc 'always) + (and evil-intercept-esc + (eq (terminal-live-p term) t))) ; only patch tty + (not (terminal-parameter term 'evil-esc-map))) + (let ((evil-esc-map (lookup-key input-decode-map [?\e]))) + (set-terminal-parameter term 'evil-esc-map evil-esc-map) + (define-key input-decode-map [?\e] + `(menu-item "" ,evil-esc-map :filter ,#'evil-esc))))))) + +(defun evil-deinit-esc (frame) + "Restore `input-decode-map' in terminal." + (with-selected-frame frame + (let ((term (frame-terminal frame))) + (when (terminal-live-p term) + (let ((evil-esc-map (terminal-parameter term 'evil-esc-map))) + (when evil-esc-map + (define-key input-decode-map [?\e] evil-esc-map) + (set-terminal-parameter term 'evil-esc-map nil))))))) + +(defun evil-esc (map) + "Translate \\e to 'escape if no further event arrives. +This function is used to translate a \\e event either to 'escape +or to the standard ESC prefix translation map. If \\e arrives, +this function waits for `evil-esc-delay' seconds for another +event. If no other event arrives, the event is translated to +'escape, otherwise it is translated to the standard ESC prefix +map stored in `input-decode-map'. If `evil-inhibit-esc' is +non-nil or if evil is in emacs state, the event is always +translated to the ESC prefix. + +The translation to 'escape happens only if the current command +has indeed been triggered by \\e. In other words, this will only +happen when the keymap is accessed from `read-key-sequence'. In +particular, if it is access from `define-key' the returned +mapping will always be the ESC prefix map." + (if (and (not evil-inhibit-esc) + (or evil-local-mode (evil-ex-p) + (active-minibuffer-window)) + (not (evil-emacs-state-p)) + (let ((keys (this-single-command-keys))) + (and (> (length keys) 0) + (= (aref keys (1- (length keys))) ?\e))) + (sit-for evil-esc-delay)) + (prog1 [escape] + (when defining-kbd-macro + (end-kbd-macro) + (setq last-kbd-macro (vconcat last-kbd-macro [escape])) + (start-kbd-macro t t))) + map)) + +(defun evil-state-p (sym) + "Whether SYM is the name of a state." + (assq sym evil-state-properties)) + +(defun evil-state-keymaps (state &rest excluded) + "Return a keymap alist of keymaps activated by STATE. +If STATE references other states in its :enable property, +these states are recursively processed and added to the list. +\(The EXCLUDED argument is an internal safeguard against +infinite recursion, keeping track of processed states.)" + (let* ((state (or state evil-state)) + (enable (evil-state-property state :enable)) + (map (cons + (evil-state-property state :mode) + (evil-state-property state :keymap t))) + (local-map (cons + (evil-state-property state :local) + (evil-state-property state :local-keymap t))) + (minor-mode-maps (evil-state-minor-mode-keymaps state)) + (aux-maps (evil-state-auxiliary-keymaps state)) + (overriding-maps + (evil-state-overriding-keymaps state)) + (intercept-maps + (evil-state-intercept-keymaps state)) + (result `(,intercept-maps)) + (remove-duplicates (null excluded))) + (unless (memq state enable) + (setq enable (cons state enable))) + ;; process STATE's :enable property + (dolist (entry enable) + (cond + ((memq entry excluded)) + ;; the keymaps for STATE + ((eq entry state) + (setq result `(,@result + (,local-map) + ,minor-mode-maps + ,aux-maps + ,overriding-maps + (,map))) + (push state excluded)) + ;; the keymaps for another state: call `evil-state-keymaps' + ;; recursively, but keep track of processed states + ((evil-state-p entry) + (setq result `(,@result + ,(apply #'evil-state-keymaps entry excluded)))) + ;; a single keymap + ((or (keymapp entry) + (and (keymapp (symbol-value entry)) + (setq entry (symbol-value entry))) + (setq entry (evil-keymap-for-mode entry))) + (setq result `(,@result + ((,(evil-mode-for-keymap entry t) . + ,entry))))))) + ;; postpone the expensive filtering of duplicates to the top level + (if remove-duplicates + (apply #'evil-concat-keymap-alists result) + (apply #'append result)))) + +(defun evil-normalize-keymaps (&optional state) + "Create a buffer-local value for `evil-mode-map-alist'. +This is a keymap alist, determined by the current state +\(or by STATE if specified)." + (let ((state (or state evil-state)) + (excluded '(nil t)) + map mode temp) + ;; initialize buffer-local keymaps as necessary + (evil-initialize-local-keymaps) + ;; deactivate keymaps of previous state + (dolist (entry evil-mode-map-alist) + (setq mode (car-safe entry) + map (cdr-safe entry)) + ;; don't deactivate overriding keymaps; + ;; they are toggled by their associated mode + (if (or (memq mode excluded) + (evil-intercept-keymap-p map) + (evil-overriding-keymap-p map) + (evil-auxiliary-keymap-p map) + (evil-minor-mode-keymap-p map)) + (push mode excluded) + (when (and (fboundp mode) (symbol-value mode)) + (funcall mode -1)) + (set mode nil))) + (setq evil-mode-map-alist nil) + ;; activate keymaps of current state + (when state + (setq temp (evil-state-keymaps state)) + (dolist (entry temp) + (setq mode (car entry) + map (cdr entry)) + (unless (or (and (boundp mode) (symbol-value mode)) + ;; the minor-mode keymaps include modes that are not + ;; necessarily active + (evil-minor-mode-keymap-p map)) + (when (fboundp mode) + (funcall mode 1)) + (set mode t)) + ;; refresh the keymap in case it has changed + ;; (e.g., `evil-operator-shortcut-map' is + ;; reset on toggling) + (if (or (memq mode excluded) + (evil-intercept-keymap-p map) + (evil-overriding-keymap-p map) + (evil-auxiliary-keymap-p map) + (evil-minor-mode-keymap-p map)) + (push mode excluded) + (setcdr entry (or (evil-keymap-for-mode mode) map)))) + ;; update `evil-mode-map-alist' + (setq evil-mode-map-alist temp)))) + +(defun evil-mode-for-keymap (keymap &optional default) + "Return the minor mode associated with KEYMAP. +Returns DEFAULT if no mode is found. +See also `evil-keymap-for-mode'." + (let ((map (if (keymapp keymap) keymap (symbol-value keymap))) + (var (when (symbolp keymap) keymap))) + ;; Check Evil variables first for speed purposes. + ;; If all else fails, check `minor-mode-map-alist'. + (or (when var + (or (car (rassq var evil-global-keymaps-alist)) + (car (rassq var evil-local-keymaps-alist)))) + (car (rassq map (mapcar #'(lambda (e) + ;; from (MODE-VAR . MAP-VAR) + ;; to (MODE-VAR . MAP) + (cons (car-safe e) + (symbol-value (cdr-safe e)))) + (append evil-global-keymaps-alist + evil-local-keymaps-alist)))) + (car (rassq map minor-mode-map-alist)) + default))) + +(defun evil-keymap-for-mode (mode &optional variable) + "Return the keymap associated with MODE. +Return the keymap variable if VARIABLE is non-nil. +See also `evil-mode-for-keymap'." + (let* ((var (or (cdr (assq mode evil-global-keymaps-alist)) + (cdr (assq mode evil-local-keymaps-alist)))) + (map (or (symbol-value var) + (cdr (assq mode minor-mode-map-alist))))) + (if variable var map))) + +(defun evil-state-auxiliary-keymaps (state) + "Return a keymap alist of auxiliary keymaps for STATE." + (let ((state (or state evil-state)) + aux result) + (dolist (map (current-active-maps) result) + (when (setq aux (evil-get-auxiliary-keymap map state)) + (push (cons (evil-mode-for-keymap map t) aux) result))) + (nreverse result))) + +(defun evil-state-minor-mode-keymaps (state) + "Return a keymap alist of minor-mode keymaps for STATE." + (let* ((state (or state evil-state)) + (state-entry (assq state evil-minor-mode-keymaps-alist))) + (when state-entry + (cdr state-entry)))) + +(defun evil-state-overriding-keymaps (&optional state) + "Return a keymap alist of overriding keymaps for STATE." + (let* ((state (or state evil-state)) + result) + (dolist (map (current-active-maps)) + (when (setq map (evil-overriding-keymap-p map state)) + (push (cons (evil-mode-for-keymap map t) map) result))) + (nreverse result))) + +(defun evil-state-intercept-keymaps (&optional state) + "Return a keymap alist of intercept keymaps for STATE." + (let* ((state (or state evil-state)) + result) + (dolist (map (current-active-maps)) + (when (setq map (or (evil-intercept-keymap-p map state) + (evil-intercept-keymap-p + (evil-get-auxiliary-keymap map state) state))) + (push (cons (evil-mode-for-keymap map t) map) result))) + (setq result (nreverse result)) + result)) + +(defun evil-set-auxiliary-keymap (map state &optional aux) + "Set the auxiliary keymap for MAP in STATE to AUX. +If AUX is nil, create a new auxiliary keymap." + (unless (keymapp aux) + (setq aux (make-sparse-keymap))) + (unless (evil-auxiliary-keymap-p aux) + (evil-set-keymap-prompt + aux (format "Auxiliary keymap for %s" + (or (evil-state-property state :name) + (format "%s state" state))))) + (define-key map + (vconcat (list (intern (format "%s-state" state)))) aux) + aux) +(put 'evil-set-auxiliary-keymap 'lisp-indent-function 'defun) + +(defun evil-get-auxiliary-keymap (map state &optional create ignore-parent) + "Get the auxiliary keymap for MAP in STATE. +If CREATE is non-nil, create an auxiliary keymap +if MAP does not have one. If CREATE and +IGNORE-PARENT are non-nil then a new auxiliary +keymap is created even if the parent of MAP has +one already." + (when state + (let* ((key (vconcat (list (intern (format "%s-state" state))))) + (parent-aux (when (and ignore-parent + (keymap-parent map)) + (lookup-key (keymap-parent map) key))) + (aux (lookup-key map key))) + (cond + ((and ignore-parent + (equal parent-aux aux) + create) + (evil-set-auxiliary-keymap map state)) + ((evil-auxiliary-keymap-p aux) + aux) + (create + (evil-set-auxiliary-keymap map state)))))) + +(defun evil-get-minor-mode-keymap (state mode) + "Get the auxiliary keymap for MODE in STATE, creating one if it +does not already exist." + (let ((state-entry (assq state evil-minor-mode-keymaps-alist))) + (if (and state-entry + (assq mode state-entry)) + (cdr (assq mode state-entry)) + (let ((map (make-sparse-keymap))) + (evil-set-keymap-prompt + map (format "Minor-mode keymap for %s in %s" + (symbol-name mode) + (or (evil-state-property state :name) + (format "%s state" state)))) + (if state-entry + (setcdr state-entry + (append (list (cons mode map)) (cdr state-entry))) + (push (cons state (list (cons mode map))) + evil-minor-mode-keymaps-alist)) + map)))) + +(defun evil-auxiliary-keymap-p (map) + "Whether MAP is an auxiliary keymap." + (and (keymapp map) + (string-match-p "Auxiliary keymap" + (or (keymap-prompt map) "")) t)) + +(defun evil-minor-mode-keymap-p (map) + "Whether MAP is a minor-mode keymap." + (and (keymapp map) + (string-match-p "Minor-mode keymap" + (or (keymap-prompt map) "")) t)) + +(defun evil-intercept-keymap-p (map &optional state) + "Whether MAP is an intercept keymap for STATE. +If STATE is nil, it means any state." + (let ((entry (and (keymapp map) + (lookup-key map [intercept-state])))) + (cond + ((null entry) + nil) + ((null state) + map) + ((eq entry state) + map) + ((eq entry 'all) + map)))) + +(defun evil-overriding-keymap-p (map &optional state) + "Whether MAP is an overriding keymap for STATE. +If STATE is nil, it means any state." + (let ((entry (and (keymapp map) + (lookup-key map [override-state])))) + (cond + ((null entry) + nil) + ((keymapp entry) + (evil-overriding-keymap-p entry state)) + ((null state) + map) + ((eq entry state) + map) + ((eq entry 'all) + map)))) + +(defun evil-intercept-keymap-state (map) + "Return the state for the intercept keymap MAP. +A return value of t means all states." + (let ((state (lookup-key map [intercept-state] map))) + (cond + ((keymapp state) + (evil-intercept-keymap-state state)) + ((eq state 'all) + t) + (t + state)))) + +(defun evil-overriding-keymap-state (map) + "Return the state for the overriding keymap MAP. +A return value of t means all states." + (let ((state (lookup-key map [override-state] map))) + (cond + ((keymapp state) + (evil-overriding-keymap-state state)) + ((eq state 'all) + t) + (t + state)))) + +(defun evil-send-leader () + "Put symbol leader in `unread-command-events' to trigger any +<leader> bindings." + (interactive) + (setq prefix-arg current-prefix-arg) + (push '(t . leader) unread-command-events)) + +(defun evil-send-localleader () + "Put symbol localleader in `unread-command-events' to trigger any +<localleader> bindings." + (interactive) + (setq prefix-arg current-prefix-arg) + (push '(t . localleader) unread-command-events)) + +(defun evil-set-leader (state key &optional localleader) + "Set KEY to trigger leader bindings in STATE. +KEY should be in the form produced by `kbd'. STATE is one of +`normal', `insert', `visual', `replace', `operator', `motion', +`emacs', a list of one or more of these, or `nil', which means +all of the above. If LOCALLEADER is non-nil, set the local leader +instead." + (let* ((all-states '(normal insert visual replace operator motion emacs)) + (states (cond ((listp state) state) + ((member state all-states) (list state)) + ((null state) all-states) + ;; Maybe throw error here + (t (list state)))) + (binding (if localleader 'evil-send-localleader 'evil-send-leader))) + (dolist (state states) + (evil-global-set-key state key binding)))) + +(defmacro evil-define-key (state keymap key def &rest bindings) + "Create a STATE binding from KEY to DEF for KEYMAP. +STATE is one of `normal', `insert', `visual', `replace', +`operator', `motion', `emacs', or a list of one or more of +these. Omitting a state by using `nil' corresponds to a standard +Emacs binding using `define-key'. The remaining arguments are +like those of `define-key'. For example: + + (evil-define-key 'normal foo-map \"a\" 'bar) + +This creates a binding from `a' to `bar' in normal state, which +is active whenever `foo-map' is active. Using nil for the state, +the following lead to identical bindings: + + (evil-define-key nil foo-map \"a\" 'bar) + (define-key foo-map \"a\" 'bar) + +It is possible to specify multiple states and/or bindings at +once: + + (evil-define-key '(normal visual) foo-map + \"a\" 'bar + \"b\" 'foo) + +If `foo-map' has not been initialized yet, this macro adds an +entry to `after-load-functions', delaying execution as necessary. + +KEYMAP may also be a quoted symbol. If the symbol is `global', the +global evil keymap corresponding to the state(s) is used, meaning +the following lead to identical bindings: + + (evil-define-key 'normal 'global \"a\" 'bar) + (evil-global-set-key 'normal \"a\" 'bar) + +The symbol `local' may also be used, which corresponds to using +`evil-local-set-key'. If a quoted symbol is used that is not +`global' or `local', it is assumed to be the name of a minor +mode, in which case `evil-define-minor-mode-key' is used." + (declare (indent defun)) + (cond ((member keymap '('global 'local)) + `(evil-define-key* ,state ,keymap ,key ,def ,@bindings)) + ((and (consp keymap) (eq (car keymap) 'quote)) + `(evil-define-minor-mode-key ,state ,keymap ,key ,def ,@bindings)) + (t + `(evil-delay ',(if (symbolp keymap) + `(and (boundp ',keymap) (keymapp ,keymap)) + `(keymapp ,keymap)) + '(condition-case-unless-debug err + (evil-define-key* ,state ,keymap ,key ,def ,@bindings) + (error + (message "error in evil-define-key: %s" + (error-message-string err)))) + 'after-load-functions t nil + (format "evil-define-key-in-%s" + ',(if (symbolp keymap) keymap 'keymap)))))) +(defalias 'evil-declare-key 'evil-define-key) + +(defun evil-define-key* (state keymap key def &rest bindings) + "Create a STATE binding from KEY to DEF for KEYMAP. +STATE is one of normal, insert, visual, replace, operator, +motion, emacs, or a list of one or more of these. Omitting a +state by using nil corresponds to a standard Emacs binding using +`define-key' The remaining arguments are like those of +`define-key'. For example: + + (evil-define-key* 'normal foo-map \"a\" 'bar) + +This creates a binding from \"a\" to bar in Normal state, which +is active whenever foo-map is active. Using nil for the state, +the following are equivalent: + + (evil-define-key* nil foo-map \"a\" 'bar) + + (define-key foo-map \"a\" 'bar) + + It is possible to specify multiple states and/or bindings at + once: + + (evil-define-key* '(normal visual) foo-map + \"a\" 'bar + \"b\" 'foo) + +KEYMAP may also be a quoted symbol. If the symbol is global, the +global evil keymap corresponding to the state(s) is used, meaning +the following are equivalent: + + (evil-define-key* 'normal 'global \"a\" 'bar) + + (evil-global-set-key 'normal \"a\" 'bar) + +The symbol local may also be used, which corresponds to using +`evil-local-set-key'. + +The use is nearly identical to `evil-define-key' with the +exception that this is a function and not a macro (and so will +not be expanded when compiled which can have unintended +consequences). `evil-define-key*' also does not defer any +bindings like `evil-define-key' does using `evil-delay'. This +allows errors in the bindings to be caught immediately, and makes +its behavior more predictable." + (declare (indent defun)) + (let ((maps + (if state + (mapcar + (lambda (st) + (cond ((eq keymap 'global) + (evil-state-property st :keymap t)) + ((eq keymap 'local) + (evil-state-property st :local-keymap t)) + (t + (evil-get-auxiliary-keymap keymap st t t)))) + (if (listp state) state (list state))) + (list + (cond ((eq keymap 'global) + global-map) + ((eq keymap 'local) + ;; see `local-set-key' + (or (current-local-map) + (let ((map (make-sparse-keymap))) + (use-local-map map) + map))) + (t + keymap)))))) + (while key + (dolist (map maps) + (define-key map key def)) + (setq key (pop bindings) + def (pop bindings))) + ;; ensure the prompt string comes first + (dolist (map maps) + (evil-set-keymap-prompt map (keymap-prompt map))))) + +(defun evil-define-minor-mode-key (state mode key def &rest bindings) + "Similar to `evil-define-key' but the bindings are associated +with the minor-mode symbol MODE instead of a particular map. +Associating bindings with a mode symbol instead of a map allows +evil to use Emacs' built-in mechanisms to enable the bindings +automatically when MODE is active without relying on calling +`evil-normalize-keymaps'. Another less significant difference is +that the bindings can be created immediately, because this +function only uses the symbol MODE and does not rely on its +value. + +See `evil-define-key' for the usage of STATE, KEY, DEF and +BINDINGS." + (declare (indent defun)) + (let ((maps (mapcar + (lambda (st) + (evil-get-minor-mode-keymap st mode)) + (if (listp state) state (list state))))) + (while key + (dolist (map maps) + (define-key map key def)) + (setq key (pop bindings) + def (pop bindings))))) + +(defmacro evil-add-hjkl-bindings (keymap &optional state &rest bindings) + "Add \"h\", \"j\", \"k\", \"l\" bindings to KEYMAP in STATE. +Add additional BINDINGS if specified." + (declare (indent defun)) + `(evil-define-key ,state ,keymap + "h" (lookup-key evil-motion-state-map "h") + "j" (lookup-key evil-motion-state-map "j") + "k" (lookup-key evil-motion-state-map "k") + "l" (lookup-key evil-motion-state-map "l") + ":" (lookup-key evil-motion-state-map ":") + ,@bindings)) + +;; may be useful for programmatic purposes +(defun evil-global-set-key (state key def) + "Bind KEY to DEF in STATE." + (define-key (evil-state-property state :keymap t) key def)) + +(defun evil-local-set-key (state key def) + "Bind KEY to DEF in STATE in the current buffer." + (define-key (evil-state-property state :local-keymap t) key def)) + +;; Advise these functions as they may activate an overriding keymap or +;; a keymap with state bindings; if so, refresh `evil-mode-map-alist'. +(defadvice use-global-map (after evil activate) + "Refresh Evil keymaps." + (evil-normalize-keymaps)) + +(defadvice use-local-map (after evil activate) + "Refresh Evil keymaps." + (evil-normalize-keymaps)) + +(defmacro evil-define-state (state doc &rest body) + "Define an Evil state STATE. +DOC is a general description and shows up in all docstrings; +the first line of the string should be the full name of the state. + +BODY is executed each time the state is enabled or disabled. + +Optional keyword arguments: +- `:tag' - the mode line indicator, e.g. \"<T>\". +- `:message' - string shown in the echo area when the state is + activated. +- `:cursor' - default cursor specification. +- `:enable' - list of other state keymaps to enable when in this + state. +- `:entry-hook' - list of functions to run when entering this state. +- `:exit-hook' - list of functions to run when exiting this state. +- `:suppress-keymap' - if non-nil, effectively disables bindings to + `self-insert-command' by making `evil-suppress-map' the parent of + the global state keymap. + +The global keymap of this state will be `evil-test-state-map', +the local keymap will be `evil-test-state-local-map', and so on. + +\(fn STATE DOC [[KEY VAL]...] BODY...)" + (declare (indent defun) + (doc-string 2) + (debug (&define name + [&optional stringp] + [&rest [keywordp sexp]] + def-body))) + (let* ((name (and (string-match "^\\(.+\\)\\(\\(?:.\\|\n\\)*\\)" doc) + (match-string 1 doc))) + (doc (match-string 2 doc)) + (name (and (string-match "^\\(.+?\\)\\.?$" name) + (match-string 1 name))) + (doc (if (or (null doc) (string= doc "")) "" + (format "\n%s" doc))) + (toggle (intern (format "evil-%s-state" state))) + (mode (intern (format "%s-minor-mode" toggle))) + (keymap (intern (format "%s-map" toggle))) + (local (intern (format "%s-local-minor-mode" toggle))) + (local-keymap (intern (format "%s-local-map" toggle))) + (tag (intern (format "%s-tag" toggle))) + (message (intern (format "%s-message" toggle))) + (cursor (intern (format "%s-cursor" toggle))) + (entry-hook (intern (format "%s-entry-hook" toggle))) + (exit-hook (intern (format "%s-exit-hook" toggle))) + (modes (intern (format "%s-modes" toggle))) + (predicate (intern (format "%s-p" toggle))) + arg cursor-value enable entry-hook-value exit-hook-value + input-method key message-value suppress-keymap tag-value) + ;; collect keywords + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body)) + (cond + ((eq key :tag) + (setq tag-value arg)) + ((eq key :message) + (setq message-value arg)) + ((eq key :cursor) + (setq cursor-value arg)) + ((eq key :entry-hook) + (setq entry-hook-value arg) + (unless (listp entry-hook-value) + (setq entry-hook-value (list entry-hook-value)))) + ((eq key :exit-hook) + (setq exit-hook-value arg) + (unless (listp exit-hook-value) + (setq exit-hook-value (list exit-hook-value)))) + ((eq key :enable) + (setq enable arg)) + ((eq key :input-method) + (setq input-method arg)) + ((eq key :suppress-keymap) + (setq suppress-keymap arg)))) + + ;; macro expansion + `(progn + ;; Save the state's properties in `evil-state-properties' for + ;; runtime lookup. Among other things, this information is used + ;; to determine what keymaps should be activated by the state + ;; (and, when processing :enable, what keymaps are activated by + ;; other states). We cannot know this at compile time because + ;; it depends on the current buffer and its active keymaps + ;; (to which we may have assigned state bindings), as well as + ;; states whose definitions may not have been processed yet. + (evil-put-property + 'evil-state-properties ',state + :name ',name + :toggle ',toggle + :mode (defvar ,mode nil + ,(format "Non-nil if %s is enabled. +Use the command `%s' to change this variable." name toggle)) + :keymap (defvar ,keymap (make-sparse-keymap) + ,(format "Keymap for %s." name)) + :local (defvar ,local nil + ,(format "Non-nil if %s is enabled. +Use the command `%s' to change this variable." name toggle)) + :local-keymap (defvar ,local-keymap nil + ,(format "Buffer-local keymap for %s." name)) + :tag (defvar ,tag ,tag-value + ,(format "Mode line tag for %s." name)) + :message (defvar ,message ,message-value + ,(format "Echo area message for %s." name)) + :cursor (defvar ,cursor ',cursor-value + ,(format "Cursor for %s. +May be a cursor type as per `cursor-type', a color string as passed +to `set-cursor-color', a zero-argument function for changing the +cursor, or a list of the above." name)) + :entry-hook (defvar ,entry-hook nil + ,(format "Hooks to run when entering %s." name)) + :exit-hook (defvar ,exit-hook nil + ,(format "Hooks to run when exiting %s." name)) + :modes (defvar ,modes nil + ,(format "Modes that should come up in %s." name)) + :input-method ',input-method + :predicate ',predicate + :enable ',enable) + + ,@(when suppress-keymap + `((set-keymap-parent ,keymap evil-suppress-map))) + + (dolist (func ',entry-hook-value) + (add-hook ',entry-hook func)) + + (dolist (func ',exit-hook-value) + (add-hook ',exit-hook func)) + + (defun ,predicate (&optional state) + ,(format "Whether the current state is %s. +\(That is, whether `evil-state' is `%s'.)" name state) + (and evil-local-mode + (eq (or state evil-state) ',state))) + + ;; define state function + (defun ,toggle (&optional arg) + ,(format "Enable %s. Disable with negative ARG. +If ARG is nil, don't display a message in the echo area.%s" name doc) + (interactive) + (cond + ((and (numberp arg) (< arg 1)) + (setq evil-previous-state evil-state + evil-state nil) + (let ((evil-state ',state)) + (run-hooks ',exit-hook) + (setq evil-state nil) + (evil-normalize-keymaps) + ,@body)) + (t + (unless evil-local-mode + (evil-local-mode 1)) + (let ((evil-next-state ',state) + input-method-activate-hook + input-method-deactivate-hook) + (evil-change-state nil) + (setq evil-state ',state) + (evil--add-to-alist 'evil-previous-state-alist + ',state evil-previous-state) + (let ((evil-state ',state)) + (evil-normalize-keymaps) + (if ',input-method + (activate-input-method evil-input-method) + ;; BUG #475: Deactivate the current input method only + ;; if there is a function to deactivate it, otherwise + ;; an error would be raised. This strange situation + ;; should not arise in general and there should + ;; probably be a better way to handle this situation. + (if deactivate-current-input-method-function + (deactivate-input-method))) + (unless evil-no-display + (evil-refresh-cursor ',state) + (evil-refresh-mode-line ',state) + (when (called-interactively-p 'any) + (redisplay))) + ,@body + (run-hooks ',entry-hook) + (when (and evil-echo-state + arg (not evil-no-display) ,message) + (if (functionp ,message) + (funcall ,message) + (evil-echo "%s" ,message)))))))) + + (evil-set-command-property ',toggle :keep-visual t) + (evil-set-command-property ',toggle :suppress-operator t) + + (evil-define-keymap ,keymap nil + :mode ,mode + :func nil) + + (evil-define-keymap ,local-keymap nil + :mode ,local + :local t + :func nil) + + ',state))) + +(provide 'evil-core) + +;;; evil-core.el ends here diff --git a/elpa/evil-20220510.2302/evil-core.elc b/elpa/evil-20220510.2302/evil-core.elc Binary files differnew file mode 100644 index 0000000..7f3b55c --- /dev/null +++ b/elpa/evil-20220510.2302/evil-core.elc diff --git a/elpa/evil-20220510.2302/evil-development.el b/elpa/evil-20220510.2302/evil-development.el new file mode 100644 index 0000000..60da92d --- /dev/null +++ b/elpa/evil-20220510.2302/evil-development.el @@ -0,0 +1,50 @@ +;;; evil-development.el --- Useful features for Evil developers -*- lexical-binding: t -*- + +;; Author: Justin Burkett <justin at burkett dot cc> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Code: + +;;; Teach imenu about evil macros + +(with-eval-after-load 'lisp-mode + (when (boundp 'lisp-imenu-generic-expression) + (dolist (macro '("interactive-code" + "type" + "text-object" + "motion" + "command" + "operator")) + (let ((macro-name (format "evil-%s" macro))) + (unless (assoc macro-name lisp-imenu-generic-expression) + (push (list + macro-name + (format "^\\s-*(evil-define-%s\\s-+\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)" + macro) + 1) + lisp-imenu-generic-expression)))))) + +(provide 'evil-development) + +;;; evil-development.el ends here diff --git a/elpa/evil-20220510.2302/evil-development.elc b/elpa/evil-20220510.2302/evil-development.elc Binary files differnew file mode 100644 index 0000000..0e5ed7a --- /dev/null +++ b/elpa/evil-20220510.2302/evil-development.elc diff --git a/elpa/evil-20220510.2302/evil-digraphs.el b/elpa/evil-20220510.2302/evil-digraphs.el new file mode 100644 index 0000000..9baef3d --- /dev/null +++ b/elpa/evil-20220510.2302/evil-digraphs.el @@ -0,0 +1,1729 @@ +;;; evil-digraphs.el --- Digraphs -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-vars) + +;;; Code: + +(defgroup evil-digraphs nil + "Digraph support based on RFC 1345." + :group 'evil + :prefix "evil-digraph-") + +(defcustom evil-digraphs-table-user nil + "List of user-defined digraphs. +Entries have the form ((?CHAR1 ?CHAR2) . ?DIGRAPH). That is, +a cons cell of the digraph and its character replacement, +where the digraph is a list of two characters. +See also `evil-digraphs-table'." + :type '(alist :key-type (list character character) + :value-type character) + :require 'evil-digraphs + :group 'evil-digraphs) + +(defconst evil-digraphs-table + '(((?N ?U) . ?\x00) + ((?S ?H) . ?\x01) + ((?S ?X) . ?\x02) + ((?E ?X) . ?\x03) + ((?E ?T) . ?\x04) + ((?E ?Q) . ?\x05) + ((?A ?K) . ?\x06) + ((?B ?L) . ?\x07) + ((?B ?S) . ?\x08) + ((?H ?T) . ?\x09) + ((?L ?F) . ?\x0a) + ((?V ?T) . ?\x0b) + ((?F ?F) . ?\x0c) + ((?C ?R) . ?\x0d) + ((?S ?O) . ?\x0e) + ((?S ?I) . ?\x0f) + ((?D ?L) . ?\x10) + ((?D ?1) . ?\x11) + ((?D ?2) . ?\x12) + ((?D ?3) . ?\x13) + ((?D ?4) . ?\x14) + ((?N ?K) . ?\x15) + ((?S ?Y) . ?\x16) + ((?E ?B) . ?\x17) + ((?C ?N) . ?\x18) + ((?E ?M) . ?\x19) + ((?S ?B) . ?\x1a) + ((?E ?C) . ?\x1b) + ((?F ?S) . ?\x1c) + ((?G ?S) . ?\x1d) + ((?R ?S) . ?\x1e) + ((?U ?S) . ?\x1f) + ((?S ?P) . ?\x20) + ((?N ?b) . ?\x23) + ((?D ?O) . ?\x24) + ((?A ?t) . ?\x40) + ((?< ?\() . ?\x5b) + ((?/ ?/) . ?\x5c) + ((?\) ?>) . ?\x5d) + ((?' ?>) . ?\x5e) + ((?' ?!) . ?\x60) + ((?\( ?!) . ?\x7b) + ((?! ?!) . ?\x7c) + ((?! ?\)) . ?\x7d) + ((?' ??) . ?\x7e) + ((?D ?T) . ?\x7f) + ((?P ?A) . ?\x80) + ((?H ?O) . ?\x81) + ((?B ?H) . ?\x82) + ((?N ?H) . ?\x83) + ((?I ?N) . ?\x84) + ((?N ?L) . ?\x85) + ((?S ?A) . ?\x86) + ((?E ?S) . ?\x87) + ((?H ?S) . ?\x88) + ((?H ?J) . ?\x89) + ((?V ?S) . ?\x8a) + ((?P ?D) . ?\x8b) + ((?P ?U) . ?\x8c) + ((?R ?I) . ?\x8d) + ((?S ?2) . ?\x8e) + ((?S ?3) . ?\x8f) + ((?D ?C) . ?\x90) + ((?P ?1) . ?\x91) + ((?P ?2) . ?\x92) + ((?T ?S) . ?\x93) + ((?C ?C) . ?\x94) + ((?M ?W) . ?\x95) + ((?S ?G) . ?\x96) + ((?E ?G) . ?\x97) + ((?S ?S) . ?\x98) + ((?G ?C) . ?\x99) + ((?S ?C) . ?\x9a) + ((?C ?I) . ?\x9b) + ((?S ?T) . ?\x9c) + ((?O ?C) . ?\x9d) + ((?P ?M) . ?\x9e) + ((?A ?C) . ?\x9f) + ((?N ?S) . ?\xa0) + ((?! ?I) . ?\xa1) + ((?C ?t) . ?\xa2) + ((?P ?d) . ?\xa3) + ((?C ?u) . ?\xa4) + ((?Y ?e) . ?\xa5) + ((?B ?B) . ?\xa6) + ((?S ?E) . ?\xa7) + ((?' ?:) . ?\xa8) + ((?C ?o) . ?\xa9) + ((?- ?a) . ?\xaa) + ((?< ?<) . ?\xab) + ((?N ?O) . ?\xac) + ((?- ?-) . ?\xad) + ((?R ?g) . ?\xae) + ((?' ?m) . ?\xaf) + ((?D ?G) . ?\xb0) + ((?+ ?-) . ?\xb1) + ((?2 ?S) . ?\xb2) + ((?3 ?S) . ?\xb3) + ((?' ?') . ?\xb4) + ((?M ?y) . ?\xb5) + ((?P ?I) . ?\xb6) + ((?. ?M) . ?\xb7) + ((?' ?,) . ?\xb8) + ((?1 ?S) . ?\xb9) + ((?- ?o) . ?\xba) + ((?> ?>) . ?\xbb) + ((?1 ?4) . ?\xbc) + ((?1 ?2) . ?\xbd) + ((?3 ?4) . ?\xbe) + ((?? ?I) . ?\xbf) + ((?A ?!) . ?\xc0) + ((?A ?') . ?\xc1) + ((?A ?>) . ?\xc2) + ((?A ??) . ?\xc3) + ((?A ?:) . ?\xc4) + ((?A ?A) . ?\xc5) + ((?A ?E) . ?\xc6) + ((?C ?,) . ?\xc7) + ((?E ?!) . ?\xc8) + ((?E ?') . ?\xc9) + ((?E ?>) . ?\xca) + ((?E ?:) . ?\xcb) + ((?I ?!) . ?\xcc) + ((?I ?') . ?\xcd) + ((?I ?>) . ?\xce) + ((?I ?:) . ?\xcf) + ((?D ?-) . ?\xd0) + ((?N ??) . ?\xd1) + ((?O ?!) . ?\xd2) + ((?O ?') . ?\xd3) + ((?O ?>) . ?\xd4) + ((?O ??) . ?\xd5) + ((?O ?:) . ?\xd6) + ((?* ?X) . ?\xd7) + ((?O ?/) . ?\xd8) + ((?U ?!) . ?\xd9) + ((?U ?') . ?\xda) + ((?U ?>) . ?\xdb) + ((?U ?:) . ?\xdc) + ((?Y ?') . ?\xdd) + ((?T ?H) . ?\xde) + ((?s ?s) . ?\xdf) + ((?a ?!) . ?\xe0) + ((?a ?') . ?\xe1) + ((?a ?>) . ?\xe2) + ((?a ??) . ?\xe3) + ((?a ?:) . ?\xe4) + ((?a ?a) . ?\xe5) + ((?a ?e) . ?\xe6) + ((?c ?,) . ?\xe7) + ((?e ?!) . ?\xe8) + ((?e ?') . ?\xe9) + ((?e ?>) . ?\xea) + ((?e ?:) . ?\xeb) + ((?i ?!) . ?\xec) + ((?i ?') . ?\xed) + ((?i ?>) . ?\xee) + ((?i ?:) . ?\xef) + ((?d ?-) . ?\xf0) + ((?n ??) . ?\xf1) + ((?o ?!) . ?\xf2) + ((?o ?') . ?\xf3) + ((?o ?>) . ?\xf4) + ((?o ??) . ?\xf5) + ((?o ?:) . ?\xf6) + ((?- ?:) . ?\xf7) + ((?o ?/) . ?\xf8) + ((?u ?!) . ?\xf9) + ((?u ?') . ?\xfa) + ((?u ?>) . ?\xfb) + ((?u ?:) . ?\xfc) + ((?y ?') . ?\xfd) + ((?t ?h) . ?\xfe) + ((?y ?:) . ?\xff) + ((?A ?-) . ?\x0100) + ((?a ?-) . ?\x0101) + ((?A ?\() . ?\x0102) + ((?a ?\() . ?\x0103) + ((?A ?\;) . ?\x0104) + ((?a ?\;) . ?\x0105) + ((?C ?') . ?\x0106) + ((?c ?') . ?\x0107) + ((?C ?>) . ?\x0108) + ((?c ?>) . ?\x0109) + ((?C ?.) . ?\x010a) + ((?c ?.) . ?\x010b) + ((?C ?<) . ?\x010c) + ((?c ?<) . ?\x010d) + ((?D ?<) . ?\x010e) + ((?d ?<) . ?\x010f) + ((?D ?/) . ?\x0110) + ((?d ?/) . ?\x0111) + ((?E ?-) . ?\x0112) + ((?e ?-) . ?\x0113) + ((?E ?\() . ?\x0114) + ((?e ?\() . ?\x0115) + ((?E ?.) . ?\x0116) + ((?e ?.) . ?\x0117) + ((?E ?\;) . ?\x0118) + ((?e ?\;) . ?\x0119) + ((?E ?<) . ?\x011a) + ((?e ?<) . ?\x011b) + ((?G ?>) . ?\x011c) + ((?g ?>) . ?\x011d) + ((?G ?\() . ?\x011e) + ((?g ?\() . ?\x011f) + ((?G ?.) . ?\x0120) + ((?g ?.) . ?\x0121) + ((?G ?,) . ?\x0122) + ((?g ?,) . ?\x0123) + ((?H ?>) . ?\x0124) + ((?h ?>) . ?\x0125) + ((?H ?/) . ?\x0126) + ((?h ?/) . ?\x0127) + ((?I ??) . ?\x0128) + ((?i ??) . ?\x0129) + ((?I ?-) . ?\x012a) + ((?i ?-) . ?\x012b) + ((?I ?\() . ?\x012c) + ((?i ?\() . ?\x012d) + ((?I ?\;) . ?\x012e) + ((?i ?\;) . ?\x012f) + ((?I ?.) . ?\x0130) + ((?i ?.) . ?\x0131) + ((?I ?J) . ?\x0132) + ((?i ?j) . ?\x0133) + ((?J ?>) . ?\x0134) + ((?j ?>) . ?\x0135) + ((?K ?,) . ?\x0136) + ((?k ?,) . ?\x0137) + ((?k ?k) . ?\x0138) + ((?L ?') . ?\x0139) + ((?l ?') . ?\x013a) + ((?L ?,) . ?\x013b) + ((?l ?,) . ?\x013c) + ((?L ?<) . ?\x013d) + ((?l ?<) . ?\x013e) + ((?L ?.) . ?\x013f) + ((?l ?.) . ?\x0140) + ((?L ?/) . ?\x0141) + ((?l ?/) . ?\x0142) + ((?N ?') . ?\x0143) + ((?n ?') . ?\x0144) + ((?N ?,) . ?\x0145) + ((?n ?,) . ?\x0146) + ((?N ?<) . ?\x0147) + ((?n ?<) . ?\x0148) + ((?' ?n) . ?\x0149) + ((?N ?G) . ?\x014a) + ((?n ?g) . ?\x014b) + ((?O ?-) . ?\x014c) + ((?o ?-) . ?\x014d) + ((?O ?\() . ?\x014e) + ((?o ?\() . ?\x014f) + ((?O ?\") . ?\x0150) + ((?o ?\") . ?\x0151) + ((?O ?E) . ?\x0152) + ((?o ?e) . ?\x0153) + ((?R ?') . ?\x0154) + ((?r ?') . ?\x0155) + ((?R ?,) . ?\x0156) + ((?r ?,) . ?\x0157) + ((?R ?<) . ?\x0158) + ((?r ?<) . ?\x0159) + ((?S ?') . ?\x015a) + ((?s ?') . ?\x015b) + ((?S ?>) . ?\x015c) + ((?s ?>) . ?\x015d) + ((?S ?,) . ?\x015e) + ((?s ?,) . ?\x015f) + ((?S ?<) . ?\x0160) + ((?s ?<) . ?\x0161) + ((?T ?,) . ?\x0162) + ((?t ?,) . ?\x0163) + ((?T ?<) . ?\x0164) + ((?t ?<) . ?\x0165) + ((?T ?/) . ?\x0166) + ((?t ?/) . ?\x0167) + ((?U ??) . ?\x0168) + ((?u ??) . ?\x0169) + ((?U ?-) . ?\x016a) + ((?u ?-) . ?\x016b) + ((?U ?\() . ?\x016c) + ((?u ?\() . ?\x016d) + ((?U ?0) . ?\x016e) + ((?u ?0) . ?\x016f) + ((?U ?\") . ?\x0170) + ((?u ?\") . ?\x0171) + ((?U ?\;) . ?\x0172) + ((?u ?\;) . ?\x0173) + ((?W ?>) . ?\x0174) + ((?w ?>) . ?\x0175) + ((?Y ?>) . ?\x0176) + ((?y ?>) . ?\x0177) + ((?Y ?:) . ?\x0178) + ((?Z ?') . ?\x0179) + ((?z ?') . ?\x017a) + ((?Z ?.) . ?\x017b) + ((?z ?.) . ?\x017c) + ((?Z ?<) . ?\x017d) + ((?z ?<) . ?\x017e) + ((?O ?9) . ?\x01a0) + ((?o ?9) . ?\x01a1) + ((?O ?I) . ?\x01a2) + ((?o ?i) . ?\x01a3) + ((?y ?r) . ?\x01a6) + ((?U ?9) . ?\x01af) + ((?u ?9) . ?\x01b0) + ((?Z ?/) . ?\x01b5) + ((?z ?/) . ?\x01b6) + ((?E ?D) . ?\x01b7) + ((?A ?<) . ?\x01cd) + ((?a ?<) . ?\x01ce) + ((?I ?<) . ?\x01cf) + ((?i ?<) . ?\x01d0) + ((?O ?<) . ?\x01d1) + ((?o ?<) . ?\x01d2) + ((?U ?<) . ?\x01d3) + ((?u ?<) . ?\x01d4) + ((?A ?1) . ?\x01de) + ((?a ?1) . ?\x01df) + ((?A ?7) . ?\x01e0) + ((?a ?7) . ?\x01e1) + ((?A ?3) . ?\x01e2) + ((?a ?3) . ?\x01e3) + ((?G ?/) . ?\x01e4) + ((?g ?/) . ?\x01e5) + ((?G ?<) . ?\x01e6) + ((?g ?<) . ?\x01e7) + ((?K ?<) . ?\x01e8) + ((?k ?<) . ?\x01e9) + ((?O ?\;) . ?\x01ea) + ((?o ?\;) . ?\x01eb) + ((?O ?1) . ?\x01ec) + ((?o ?1) . ?\x01ed) + ((?E ?Z) . ?\x01ee) + ((?e ?z) . ?\x01ef) + ((?j ?<) . ?\x01f0) + ((?G ?') . ?\x01f4) + ((?g ?') . ?\x01f5) + ((?\; ?S) . ?\x02bf) + ((?' ?<) . ?\x02c7) + ((?' ?\() . ?\x02d8) + ((?' ?.) . ?\x02d9) + ((?' ?0) . ?\x02da) + ((?' ?\;) . ?\x02db) + ((?' ?\") . ?\x02dd) + ((?A ?%) . ?\x0386) + ((?E ?%) . ?\x0388) + ((?Y ?%) . ?\x0389) + ((?I ?%) . ?\x038a) + ((?O ?%) . ?\x038c) + ((?U ?%) . ?\x038e) + ((?W ?%) . ?\x038f) + ((?i ?3) . ?\x0390) + ((?A ?*) . ?\x0391) + ((?B ?*) . ?\x0392) + ((?G ?*) . ?\x0393) + ((?D ?*) . ?\x0394) + ((?E ?*) . ?\x0395) + ((?Z ?*) . ?\x0396) + ((?Y ?*) . ?\x0397) + ((?H ?*) . ?\x0398) + ((?I ?*) . ?\x0399) + ((?K ?*) . ?\x039a) + ((?L ?*) . ?\x039b) + ((?M ?*) . ?\x039c) + ((?N ?*) . ?\x039d) + ((?C ?*) . ?\x039e) + ((?O ?*) . ?\x039f) + ((?P ?*) . ?\x03a0) + ((?R ?*) . ?\x03a1) + ((?S ?*) . ?\x03a3) + ((?T ?*) . ?\x03a4) + ((?U ?*) . ?\x03a5) + ((?F ?*) . ?\x03a6) + ((?X ?*) . ?\x03a7) + ((?Q ?*) . ?\x03a8) + ((?W ?*) . ?\x03a9) + ((?J ?*) . ?\x03aa) + ((?V ?*) . ?\x03ab) + ((?a ?%) . ?\x03ac) + ((?e ?%) . ?\x03ad) + ((?y ?%) . ?\x03ae) + ((?i ?%) . ?\x03af) + ((?u ?3) . ?\x03b0) + ((?a ?*) . ?\x03b1) + ((?b ?*) . ?\x03b2) + ((?g ?*) . ?\x03b3) + ((?d ?*) . ?\x03b4) + ((?e ?*) . ?\x03b5) + ((?z ?*) . ?\x03b6) + ((?y ?*) . ?\x03b7) + ((?h ?*) . ?\x03b8) + ((?i ?*) . ?\x03b9) + ((?k ?*) . ?\x03ba) + ((?l ?*) . ?\x03bb) + ((?m ?*) . ?\x03bc) + ((?n ?*) . ?\x03bd) + ((?c ?*) . ?\x03be) + ((?o ?*) . ?\x03bf) + ((?p ?*) . ?\x03c0) + ((?r ?*) . ?\x03c1) + ((?* ?s) . ?\x03c2) + ((?s ?*) . ?\x03c3) + ((?t ?*) . ?\x03c4) + ((?u ?*) . ?\x03c5) + ((?f ?*) . ?\x03c6) + ((?x ?*) . ?\x03c7) + ((?q ?*) . ?\x03c8) + ((?w ?*) . ?\x03c9) + ((?j ?*) . ?\x03ca) + ((?v ?*) . ?\x03cb) + ((?o ?%) . ?\x03cc) + ((?u ?%) . ?\x03cd) + ((?w ?%) . ?\x03ce) + ((?' ?G) . ?\x03d8) + ((?, ?G) . ?\x03d9) + ((?T ?3) . ?\x03da) + ((?t ?3) . ?\x03db) + ((?M ?3) . ?\x03dc) + ((?m ?3) . ?\x03dd) + ((?K ?3) . ?\x03de) + ((?k ?3) . ?\x03df) + ((?P ?3) . ?\x03e0) + ((?p ?3) . ?\x03e1) + ((?' ?%) . ?\x03f4) + ((?j ?3) . ?\x03f5) + ((?I ?O) . ?\x0401) + ((?D ?%) . ?\x0402) + ((?G ?%) . ?\x0403) + ((?I ?E) . ?\x0404) + ((?D ?S) . ?\x0405) + ((?I ?I) . ?\x0406) + ((?Y ?I) . ?\x0407) + ((?J ?%) . ?\x0408) + ((?L ?J) . ?\x0409) + ((?N ?J) . ?\x040a) + ((?T ?s) . ?\x040b) + ((?K ?J) . ?\x040c) + ((?V ?%) . ?\x040e) + ((?D ?Z) . ?\x040f) + ((?A ?=) . ?\x0410) + ((?B ?=) . ?\x0411) + ((?V ?=) . ?\x0412) + ((?G ?=) . ?\x0413) + ((?D ?=) . ?\x0414) + ((?E ?=) . ?\x0415) + ((?Z ?%) . ?\x0416) + ((?Z ?=) . ?\x0417) + ((?I ?=) . ?\x0418) + ((?J ?=) . ?\x0419) + ((?K ?=) . ?\x041a) + ((?L ?=) . ?\x041b) + ((?M ?=) . ?\x041c) + ((?N ?=) . ?\x041d) + ((?O ?=) . ?\x041e) + ((?P ?=) . ?\x041f) + ((?R ?=) . ?\x0420) + ((?S ?=) . ?\x0421) + ((?T ?=) . ?\x0422) + ((?U ?=) . ?\x0423) + ((?F ?=) . ?\x0424) + ((?H ?=) . ?\x0425) + ((?C ?=) . ?\x0426) + ((?C ?%) . ?\x0427) + ((?S ?%) . ?\x0428) + ((?S ?c) . ?\x0429) + ((?= ?\") . ?\x042a) + ((?Y ?=) . ?\x042b) + ((?% ?\") . ?\x042c) + ((?J ?E) . ?\x042d) + ((?J ?U) . ?\x042e) + ((?J ?A) . ?\x042f) + ((?a ?=) . ?\x0430) + ((?b ?=) . ?\x0431) + ((?v ?=) . ?\x0432) + ((?g ?=) . ?\x0433) + ((?d ?=) . ?\x0434) + ((?e ?=) . ?\x0435) + ((?z ?%) . ?\x0436) + ((?z ?=) . ?\x0437) + ((?i ?=) . ?\x0438) + ((?j ?=) . ?\x0439) + ((?k ?=) . ?\x043a) + ((?l ?=) . ?\x043b) + ((?m ?=) . ?\x043c) + ((?n ?=) . ?\x043d) + ((?o ?=) . ?\x043e) + ((?p ?=) . ?\x043f) + ((?r ?=) . ?\x0440) + ((?s ?=) . ?\x0441) + ((?t ?=) . ?\x0442) + ((?u ?=) . ?\x0443) + ((?f ?=) . ?\x0444) + ((?h ?=) . ?\x0445) + ((?c ?=) . ?\x0446) + ((?c ?%) . ?\x0447) + ((?s ?%) . ?\x0448) + ((?s ?c) . ?\x0449) + ((?= ?') . ?\x044a) + ((?y ?=) . ?\x044b) + ((?% ?') . ?\x044c) + ((?j ?e) . ?\x044d) + ((?j ?u) . ?\x044e) + ((?j ?a) . ?\x044f) + ((?i ?o) . ?\x0451) + ((?d ?%) . ?\x0452) + ((?g ?%) . ?\x0453) + ((?i ?e) . ?\x0454) + ((?d ?s) . ?\x0455) + ((?i ?i) . ?\x0456) + ((?y ?i) . ?\x0457) + ((?j ?%) . ?\x0458) + ((?l ?j) . ?\x0459) + ((?n ?j) . ?\x045a) + ((?t ?s) . ?\x045b) + ((?k ?j) . ?\x045c) + ((?v ?%) . ?\x045e) + ((?d ?z) . ?\x045f) + ((?Y ?3) . ?\x0462) + ((?y ?3) . ?\x0463) + ((?O ?3) . ?\x046a) + ((?o ?3) . ?\x046b) + ((?F ?3) . ?\x0472) + ((?f ?3) . ?\x0473) + ((?V ?3) . ?\x0474) + ((?v ?3) . ?\x0475) + ((?C ?3) . ?\x0480) + ((?c ?3) . ?\x0481) + ((?G ?3) . ?\x0490) + ((?g ?3) . ?\x0491) + ((?A ?+) . ?\x05d0) + ((?B ?+) . ?\x05d1) + ((?G ?+) . ?\x05d2) + ((?D ?+) . ?\x05d3) + ((?H ?+) . ?\x05d4) + ((?W ?+) . ?\x05d5) + ((?Z ?+) . ?\x05d6) + ((?X ?+) . ?\x05d7) + ((?T ?j) . ?\x05d8) + ((?J ?+) . ?\x05d9) + ((?K ?%) . ?\x05da) + ((?K ?+) . ?\x05db) + ((?L ?+) . ?\x05dc) + ((?M ?%) . ?\x05dd) + ((?M ?+) . ?\x05de) + ((?N ?%) . ?\x05df) + ((?N ?+) . ?\x05e0) + ((?S ?+) . ?\x05e1) + ((?E ?+) . ?\x05e2) + ((?P ?%) . ?\x05e3) + ((?P ?+) . ?\x05e4) + ((?Z ?j) . ?\x05e5) + ((?Z ?J) . ?\x05e6) + ((?Q ?+) . ?\x05e7) + ((?R ?+) . ?\x05e8) + ((?S ?h) . ?\x05e9) + ((?T ?+) . ?\x05ea) + ((?, ?+) . ?\x060c) + ((?\; ?+) . ?\x061b) + ((?? ?+) . ?\x061f) + ((?H ?') . ?\x0621) + ((?a ?M) . ?\x0622) + ((?a ?H) . ?\x0623) + ((?w ?H) . ?\x0624) + ((?a ?h) . ?\x0625) + ((?y ?H) . ?\x0626) + ((?a ?+) . ?\x0627) + ((?b ?+) . ?\x0628) + ((?t ?m) . ?\x0629) + ((?t ?+) . ?\x062a) + ((?t ?k) . ?\x062b) + ((?g ?+) . ?\x062c) + ((?h ?k) . ?\x062d) + ((?x ?+) . ?\x062e) + ((?d ?+) . ?\x062f) + ((?d ?k) . ?\x0630) + ((?r ?+) . ?\x0631) + ((?z ?+) . ?\x0632) + ((?s ?+) . ?\x0633) + ((?s ?n) . ?\x0634) + ((?c ?+) . ?\x0635) + ((?d ?d) . ?\x0636) + ((?t ?j) . ?\x0637) + ((?z ?H) . ?\x0638) + ((?e ?+) . ?\x0639) + ((?i ?+) . ?\x063a) + ((?+ ?+) . ?\x0640) + ((?f ?+) . ?\x0641) + ((?q ?+) . ?\x0642) + ((?k ?+) . ?\x0643) + ((?l ?+) . ?\x0644) + ((?m ?+) . ?\x0645) + ((?n ?+) . ?\x0646) + ((?h ?+) . ?\x0647) + ((?w ?+) . ?\x0648) + ((?j ?+) . ?\x0649) + ((?y ?+) . ?\x064a) + ((?: ?+) . ?\x064b) + ((?\" ?+) . ?\x064c) + ((?= ?+) . ?\x064d) + ((?/ ?+) . ?\x064e) + ((?' ?+) . ?\x064f) + ((?1 ?+) . ?\x0650) + ((?3 ?+) . ?\x0651) + ((?0 ?+) . ?\x0652) + ((?a ?S) . ?\x0670) + ((?p ?+) . ?\x067e) + ((?v ?+) . ?\x06a4) + ((?g ?f) . ?\x06af) + ((?0 ?a) . ?\x06f0) + ((?1 ?a) . ?\x06f1) + ((?2 ?a) . ?\x06f2) + ((?3 ?a) . ?\x06f3) + ((?4 ?a) . ?\x06f4) + ((?5 ?a) . ?\x06f5) + ((?6 ?a) . ?\x06f6) + ((?7 ?a) . ?\x06f7) + ((?8 ?a) . ?\x06f8) + ((?9 ?a) . ?\x06f9) + ((?B ?.) . ?\x1e02) + ((?b ?.) . ?\x1e03) + ((?B ?_) . ?\x1e06) + ((?b ?_) . ?\x1e07) + ((?D ?.) . ?\x1e0a) + ((?d ?.) . ?\x1e0b) + ((?D ?_) . ?\x1e0e) + ((?d ?_) . ?\x1e0f) + ((?D ?,) . ?\x1e10) + ((?d ?,) . ?\x1e11) + ((?F ?.) . ?\x1e1e) + ((?f ?.) . ?\x1e1f) + ((?G ?-) . ?\x1e20) + ((?g ?-) . ?\x1e21) + ((?H ?.) . ?\x1e22) + ((?h ?.) . ?\x1e23) + ((?H ?:) . ?\x1e26) + ((?h ?:) . ?\x1e27) + ((?H ?,) . ?\x1e28) + ((?h ?,) . ?\x1e29) + ((?K ?') . ?\x1e30) + ((?k ?') . ?\x1e31) + ((?K ?_) . ?\x1e34) + ((?k ?_) . ?\x1e35) + ((?L ?_) . ?\x1e3a) + ((?l ?_) . ?\x1e3b) + ((?M ?') . ?\x1e3e) + ((?m ?') . ?\x1e3f) + ((?M ?.) . ?\x1e40) + ((?m ?.) . ?\x1e41) + ((?N ?.) . ?\x1e44) + ((?n ?.) . ?\x1e45) + ((?N ?_) . ?\x1e48) + ((?n ?_) . ?\x1e49) + ((?P ?') . ?\x1e54) + ((?p ?') . ?\x1e55) + ((?P ?.) . ?\x1e56) + ((?p ?.) . ?\x1e57) + ((?R ?.) . ?\x1e58) + ((?r ?.) . ?\x1e59) + ((?R ?_) . ?\x1e5e) + ((?r ?_) . ?\x1e5f) + ((?S ?.) . ?\x1e60) + ((?s ?.) . ?\x1e61) + ((?T ?.) . ?\x1e6a) + ((?t ?.) . ?\x1e6b) + ((?T ?_) . ?\x1e6e) + ((?t ?_) . ?\x1e6f) + ((?V ??) . ?\x1e7c) + ((?v ??) . ?\x1e7d) + ((?W ?!) . ?\x1e80) + ((?w ?!) . ?\x1e81) + ((?W ?') . ?\x1e82) + ((?w ?') . ?\x1e83) + ((?W ?:) . ?\x1e84) + ((?w ?:) . ?\x1e85) + ((?W ?.) . ?\x1e86) + ((?w ?.) . ?\x1e87) + ((?X ?.) . ?\x1e8a) + ((?x ?.) . ?\x1e8b) + ((?X ?:) . ?\x1e8c) + ((?x ?:) . ?\x1e8d) + ((?Y ?.) . ?\x1e8e) + ((?y ?.) . ?\x1e8f) + ((?Z ?>) . ?\x1e90) + ((?z ?>) . ?\x1e91) + ((?Z ?_) . ?\x1e94) + ((?z ?_) . ?\x1e95) + ((?h ?_) . ?\x1e96) + ((?t ?:) . ?\x1e97) + ((?w ?0) . ?\x1e98) + ((?y ?0) . ?\x1e99) + ((?A ?2) . ?\x1ea2) + ((?a ?2) . ?\x1ea3) + ((?E ?2) . ?\x1eba) + ((?e ?2) . ?\x1ebb) + ((?E ??) . ?\x1ebc) + ((?e ??) . ?\x1ebd) + ((?I ?2) . ?\x1ec8) + ((?i ?2) . ?\x1ec9) + ((?O ?2) . ?\x1ece) + ((?o ?2) . ?\x1ecf) + ((?U ?2) . ?\x1ee6) + ((?u ?2) . ?\x1ee7) + ((?Y ?!) . ?\x1ef2) + ((?y ?!) . ?\x1ef3) + ((?Y ?2) . ?\x1ef6) + ((?y ?2) . ?\x1ef7) + ((?Y ??) . ?\x1ef8) + ((?y ??) . ?\x1ef9) + ((?\; ?') . ?\x1f00) + ((?, ?') . ?\x1f01) + ((?\; ?!) . ?\x1f02) + ((?, ?!) . ?\x1f03) + ((?? ?\;) . ?\x1f04) + ((?? ?,) . ?\x1f05) + ((?! ?:) . ?\x1f06) + ((?? ?:) . ?\x1f07) + ((?1 ?N) . ?\x2002) + ((?1 ?M) . ?\x2003) + ((?3 ?M) . ?\x2004) + ((?4 ?M) . ?\x2005) + ((?6 ?M) . ?\x2006) + ((?1 ?T) . ?\x2009) + ((?1 ?H) . ?\x200a) + ((?- ?1) . ?\x2010) + ((?- ?N) . ?\x2013) + ((?- ?M) . ?\x2014) + ((?- ?3) . ?\x2015) + ((?! ?2) . ?\x2016) + ((?= ?2) . ?\x2017) + ((?' ?6) . ?\x2018) + ((?' ?9) . ?\x2019) + ((?. ?9) . ?\x201a) + ((?9 ?') . ?\x201b) + ((?\" ?6) . ?\x201c) + ((?\" ?9) . ?\x201d) + ((?: ?9) . ?\x201e) + ((?9 ?\") . ?\x201f) + ((?/ ?-) . ?\x2020) + ((?/ ?=) . ?\x2021) + ((?. ?.) . ?\x2025) + ((?% ?0) . ?\x2030) + ((?1 ?') . ?\x2032) + ((?2 ?') . ?\x2033) + ((?3 ?') . ?\x2034) + ((?1 ?\") . ?\x2035) + ((?2 ?\") . ?\x2036) + ((?3 ?\") . ?\x2037) + ((?C ?a) . ?\x2038) + ((?< ?1) . ?\x2039) + ((?> ?1) . ?\x203a) + ((?: ?X) . ?\x203b) + ((?' ?-) . ?\x203e) + ((?/ ?f) . ?\x2044) + ((?0 ?S) . ?\x2070) + ((?4 ?S) . ?\x2074) + ((?5 ?S) . ?\x2075) + ((?6 ?S) . ?\x2076) + ((?7 ?S) . ?\x2077) + ((?8 ?S) . ?\x2078) + ((?9 ?S) . ?\x2079) + ((?+ ?S) . ?\x207a) + ((?- ?S) . ?\x207b) + ((?= ?S) . ?\x207c) + ((?\( ?S) . ?\x207d) + ((?\) ?S) . ?\x207e) + ((?n ?S) . ?\x207f) + ((?0 ?s) . ?\x2080) + ((?1 ?s) . ?\x2081) + ((?2 ?s) . ?\x2082) + ((?3 ?s) . ?\x2083) + ((?4 ?s) . ?\x2084) + ((?5 ?s) . ?\x2085) + ((?6 ?s) . ?\x2086) + ((?7 ?s) . ?\x2087) + ((?8 ?s) . ?\x2088) + ((?9 ?s) . ?\x2089) + ((?+ ?s) . ?\x208a) + ((?- ?s) . ?\x208b) + ((?= ?s) . ?\x208c) + ((?\( ?s) . ?\x208d) + ((?\) ?s) . ?\x208e) + ((?L ?i) . ?\x20a4) + ((?P ?t) . ?\x20a7) + ((?W ?=) . ?\x20a9) + ((?= ?e) . ?\x20ac) + ((?E ?u) . ?\x20ac) + ((?o ?C) . ?\x2103) + ((?c ?o) . ?\x2105) + ((?o ?F) . ?\x2109) + ((?N ?0) . ?\x2116) + ((?P ?O) . ?\x2117) + ((?R ?x) . ?\x211e) + ((?S ?M) . ?\x2120) + ((?T ?M) . ?\x2122) + ((?O ?m) . ?\x2126) + ((?A ?O) . ?\x212b) + ((?1 ?3) . ?\x2153) + ((?2 ?3) . ?\x2154) + ((?1 ?5) . ?\x2155) + ((?2 ?5) . ?\x2156) + ((?3 ?5) . ?\x2157) + ((?4 ?5) . ?\x2158) + ((?1 ?6) . ?\x2159) + ((?5 ?6) . ?\x215a) + ((?1 ?8) . ?\x215b) + ((?3 ?8) . ?\x215c) + ((?5 ?8) . ?\x215d) + ((?7 ?8) . ?\x215e) + ((?1 ?R) . ?\x2160) + ((?2 ?R) . ?\x2161) + ((?3 ?R) . ?\x2162) + ((?4 ?R) . ?\x2163) + ((?5 ?R) . ?\x2164) + ((?6 ?R) . ?\x2165) + ((?7 ?R) . ?\x2166) + ((?8 ?R) . ?\x2167) + ((?9 ?R) . ?\x2168) + ((?a ?R) . ?\x2169) + ((?b ?R) . ?\x216a) + ((?c ?R) . ?\x216b) + ((?1 ?r) . ?\x2170) + ((?2 ?r) . ?\x2171) + ((?3 ?r) . ?\x2172) + ((?4 ?r) . ?\x2173) + ((?5 ?r) . ?\x2174) + ((?6 ?r) . ?\x2175) + ((?7 ?r) . ?\x2176) + ((?8 ?r) . ?\x2177) + ((?9 ?r) . ?\x2178) + ((?a ?r) . ?\x2179) + ((?b ?r) . ?\x217a) + ((?c ?r) . ?\x217b) + ((?< ?-) . ?\x2190) + ((?- ?!) . ?\x2191) + ((?- ?>) . ?\x2192) + ((?- ?v) . ?\x2193) + ((?< ?>) . ?\x2194) + ((?U ?D) . ?\x2195) + ((?< ?=) . ?\x21d0) + ((?= ?>) . ?\x21d2) + ((?= ?=) . ?\x21d4) + ((?F ?A) . ?\x2200) + ((?d ?P) . ?\x2202) + ((?T ?E) . ?\x2203) + ((?/ ?0) . ?\x2205) + ((?D ?E) . ?\x2206) + ((?N ?B) . ?\x2207) + ((?\( ?-) . ?\x2208) + ((?- ?\)) . ?\x220b) + ((?* ?P) . ?\x220f) + ((?+ ?Z) . ?\x2211) + ((?- ?2) . ?\x2212) + ((?- ?+) . ?\x2213) + ((?* ?-) . ?\x2217) + ((?O ?b) . ?\x2218) + ((?S ?b) . ?\x2219) + ((?R ?T) . ?\x221a) + ((?0 ?\() . ?\x221d) + ((?0 ?0) . ?\x221e) + ((?- ?L) . ?\x221f) + ((?- ?V) . ?\x2220) + ((?P ?P) . ?\x2225) + ((?A ?N) . ?\x2227) + ((?O ?R) . ?\x2228) + ((?\( ?U) . ?\x2229) + ((?\) ?U) . ?\x222a) + ((?I ?n) . ?\x222b) + ((?D ?I) . ?\x222c) + ((?I ?o) . ?\x222e) + ((?. ?:) . ?\x2234) + ((?: ?.) . ?\x2235) + ((?: ?R) . ?\x2236) + ((?: ?:) . ?\x2237) + ((?? ?1) . ?\x223c) + ((?C ?G) . ?\x223e) + ((?? ?-) . ?\x2243) + ((?? ?=) . ?\x2245) + ((?? ?2) . ?\x2248) + ((?= ??) . ?\x224c) + ((?H ?I) . ?\x2253) + ((?! ?=) . ?\x2260) + ((?= ?3) . ?\x2261) + ((?= ?<) . ?\x2264) + ((?> ?=) . ?\x2265) + ((?< ?*) . ?\x226a) + ((?* ?>) . ?\x226b) + ((?! ?<) . ?\x226e) + ((?! ?>) . ?\x226f) + ((?\( ?C) . ?\x2282) + ((?\) ?C) . ?\x2283) + ((?\( ?_) . ?\x2286) + ((?\) ?_) . ?\x2287) + ((?0 ?.) . ?\x2299) + ((?0 ?2) . ?\x229a) + ((?- ?T) . ?\x22a5) + ((?. ?P) . ?\x22c5) + ((?: ?3) . ?\x22ee) + ((?. ?3) . ?\x22ef) + ((?E ?h) . ?\x2302) + ((?< ?7) . ?\x2308) + ((?> ?7) . ?\x2309) + ((?7 ?<) . ?\x230a) + ((?7 ?>) . ?\x230b) + ((?N ?I) . ?\x2310) + ((?\( ?A) . ?\x2312) + ((?T ?R) . ?\x2315) + ((?I ?u) . ?\x2320) + ((?I ?l) . ?\x2321) + ((?< ?/) . ?\x2329) + ((?/ ?>) . ?\x232a) + ((?V ?s) . ?\x2423) + ((?1 ?h) . ?\x2440) + ((?3 ?h) . ?\x2441) + ((?2 ?h) . ?\x2442) + ((?4 ?h) . ?\x2443) + ((?1 ?j) . ?\x2446) + ((?2 ?j) . ?\x2447) + ((?3 ?j) . ?\x2448) + ((?4 ?j) . ?\x2449) + ((?1 ?.) . ?\x2488) + ((?2 ?.) . ?\x2489) + ((?3 ?.) . ?\x248a) + ((?4 ?.) . ?\x248b) + ((?5 ?.) . ?\x248c) + ((?6 ?.) . ?\x248d) + ((?7 ?.) . ?\x248e) + ((?8 ?.) . ?\x248f) + ((?9 ?.) . ?\x2490) + ((?h ?h) . ?\x2500) + ((?H ?H) . ?\x2501) + ((?v ?v) . ?\x2502) + ((?V ?V) . ?\x2503) + ((?3 ?-) . ?\x2504) + ((?3 ?_) . ?\x2505) + ((?3 ?!) . ?\x2506) + ((?3 ?/) . ?\x2507) + ((?4 ?-) . ?\x2508) + ((?4 ?_) . ?\x2509) + ((?4 ?!) . ?\x250a) + ((?4 ?/) . ?\x250b) + ((?d ?r) . ?\x250c) + ((?d ?R) . ?\x250d) + ((?D ?r) . ?\x250e) + ((?D ?R) . ?\x250f) + ((?d ?l) . ?\x2510) + ((?d ?L) . ?\x2511) + ((?D ?l) . ?\x2512) + ((?L ?D) . ?\x2513) + ((?u ?r) . ?\x2514) + ((?u ?R) . ?\x2515) + ((?U ?r) . ?\x2516) + ((?U ?R) . ?\x2517) + ((?u ?l) . ?\x2518) + ((?u ?L) . ?\x2519) + ((?U ?l) . ?\x251a) + ((?U ?L) . ?\x251b) + ((?v ?r) . ?\x251c) + ((?v ?R) . ?\x251d) + ((?V ?r) . ?\x2520) + ((?V ?R) . ?\x2523) + ((?v ?l) . ?\x2524) + ((?v ?L) . ?\x2525) + ((?V ?l) . ?\x2528) + ((?V ?L) . ?\x252b) + ((?d ?h) . ?\x252c) + ((?d ?H) . ?\x252f) + ((?D ?h) . ?\x2530) + ((?D ?H) . ?\x2533) + ((?u ?h) . ?\x2534) + ((?u ?H) . ?\x2537) + ((?U ?h) . ?\x2538) + ((?U ?H) . ?\x253b) + ((?v ?h) . ?\x253c) + ((?v ?H) . ?\x253f) + ((?V ?h) . ?\x2542) + ((?V ?H) . ?\x254b) + ((?F ?D) . ?\x2571) + ((?B ?D) . ?\x2572) + ((?T ?B) . ?\x2580) + ((?L ?B) . ?\x2584) + ((?F ?B) . ?\x2588) + ((?l ?B) . ?\x258c) + ((?R ?B) . ?\x2590) + ((?. ?S) . ?\x2591) + ((?: ?S) . ?\x2592) + ((?? ?S) . ?\x2593) + ((?f ?S) . ?\x25a0) + ((?O ?S) . ?\x25a1) + ((?R ?O) . ?\x25a2) + ((?R ?r) . ?\x25a3) + ((?R ?F) . ?\x25a4) + ((?R ?Y) . ?\x25a5) + ((?R ?H) . ?\x25a6) + ((?R ?Z) . ?\x25a7) + ((?R ?K) . ?\x25a8) + ((?R ?X) . ?\x25a9) + ((?s ?B) . ?\x25aa) + ((?S ?R) . ?\x25ac) + ((?O ?r) . ?\x25ad) + ((?U ?T) . ?\x25b2) + ((?u ?T) . ?\x25b3) + ((?P ?R) . ?\x25b6) + ((?T ?r) . ?\x25b7) + ((?D ?t) . ?\x25bc) + ((?d ?T) . ?\x25bd) + ((?P ?L) . ?\x25c0) + ((?T ?l) . ?\x25c1) + ((?D ?b) . ?\x25c6) + ((?D ?w) . ?\x25c7) + ((?L ?Z) . ?\x25ca) + ((?0 ?m) . ?\x25cb) + ((?0 ?o) . ?\x25ce) + ((?0 ?M) . ?\x25cf) + ((?0 ?L) . ?\x25d0) + ((?0 ?R) . ?\x25d1) + ((?S ?n) . ?\x25d8) + ((?I ?c) . ?\x25d9) + ((?F ?d) . ?\x25e2) + ((?B ?d) . ?\x25e3) + ((?* ?2) . ?\x2605) + ((?* ?1) . ?\x2606) + ((?< ?H) . ?\x261c) + ((?> ?H) . ?\x261e) + ((?0 ?u) . ?\x263a) + ((?0 ?U) . ?\x263b) + ((?S ?U) . ?\x263c) + ((?F ?m) . ?\x2640) + ((?M ?l) . ?\x2642) + ((?c ?S) . ?\x2660) + ((?c ?H) . ?\x2661) + ((?c ?D) . ?\x2662) + ((?c ?C) . ?\x2663) + ((?M ?d) . ?\x2669) + ((?M ?8) . ?\x266a) + ((?M ?2) . ?\x266b) + ((?M ?b) . ?\x266d) + ((?M ?x) . ?\x266e) + ((?M ?X) . ?\x266f) + ((?O ?K) . ?\x2713) + ((?X ?X) . ?\x2717) + ((?- ?X) . ?\x2720) + ((?I ?S) . ?\x3000) + ((?, ?_) . ?\x3001) + ((?. ?_) . ?\x3002) + ((?+ ?\") . ?\x3003) + ((?+ ?_) . ?\x3004) + ((?* ?_) . ?\x3005) + ((?\; ?_) . ?\x3006) + ((?0 ?_) . ?\x3007) + ((?< ?+) . ?\x300a) + ((?> ?+) . ?\x300b) + ((?< ?') . ?\x300c) + ((?> ?') . ?\x300d) + ((?< ?\") . ?\x300e) + ((?> ?\") . ?\x300f) + ((?\( ?\") . ?\x3010) + ((?\) ?\") . ?\x3011) + ((?= ?T) . ?\x3012) + ((?= ?_) . ?\x3013) + ((?\( ?') . ?\x3014) + ((?\) ?') . ?\x3015) + ((?\( ?I) . ?\x3016) + ((?\) ?I) . ?\x3017) + ((?- ??) . ?\x301c) + ((?A ?5) . ?\x3041) + ((?a ?5) . ?\x3042) + ((?I ?5) . ?\x3043) + ((?i ?5) . ?\x3044) + ((?U ?5) . ?\x3045) + ((?u ?5) . ?\x3046) + ((?E ?5) . ?\x3047) + ((?e ?5) . ?\x3048) + ((?O ?5) . ?\x3049) + ((?o ?5) . ?\x304a) + ((?k ?a) . ?\x304b) + ((?g ?a) . ?\x304c) + ((?k ?i) . ?\x304d) + ((?g ?i) . ?\x304e) + ((?k ?u) . ?\x304f) + ((?g ?u) . ?\x3050) + ((?k ?e) . ?\x3051) + ((?g ?e) . ?\x3052) + ((?k ?o) . ?\x3053) + ((?g ?o) . ?\x3054) + ((?s ?a) . ?\x3055) + ((?z ?a) . ?\x3056) + ((?s ?i) . ?\x3057) + ((?z ?i) . ?\x3058) + ((?s ?u) . ?\x3059) + ((?z ?u) . ?\x305a) + ((?s ?e) . ?\x305b) + ((?z ?e) . ?\x305c) + ((?s ?o) . ?\x305d) + ((?z ?o) . ?\x305e) + ((?t ?a) . ?\x305f) + ((?d ?a) . ?\x3060) + ((?t ?i) . ?\x3061) + ((?d ?i) . ?\x3062) + ((?t ?U) . ?\x3063) + ((?t ?u) . ?\x3064) + ((?d ?u) . ?\x3065) + ((?t ?e) . ?\x3066) + ((?d ?e) . ?\x3067) + ((?t ?o) . ?\x3068) + ((?d ?o) . ?\x3069) + ((?n ?a) . ?\x306a) + ((?n ?i) . ?\x306b) + ((?n ?u) . ?\x306c) + ((?n ?e) . ?\x306d) + ((?n ?o) . ?\x306e) + ((?h ?a) . ?\x306f) + ((?b ?a) . ?\x3070) + ((?p ?a) . ?\x3071) + ((?h ?i) . ?\x3072) + ((?b ?i) . ?\x3073) + ((?p ?i) . ?\x3074) + ((?h ?u) . ?\x3075) + ((?b ?u) . ?\x3076) + ((?p ?u) . ?\x3077) + ((?h ?e) . ?\x3078) + ((?b ?e) . ?\x3079) + ((?p ?e) . ?\x307a) + ((?h ?o) . ?\x307b) + ((?b ?o) . ?\x307c) + ((?p ?o) . ?\x307d) + ((?m ?a) . ?\x307e) + ((?m ?i) . ?\x307f) + ((?m ?u) . ?\x3080) + ((?m ?e) . ?\x3081) + ((?m ?o) . ?\x3082) + ((?y ?A) . ?\x3083) + ((?y ?a) . ?\x3084) + ((?y ?U) . ?\x3085) + ((?y ?u) . ?\x3086) + ((?y ?O) . ?\x3087) + ((?y ?o) . ?\x3088) + ((?r ?a) . ?\x3089) + ((?r ?i) . ?\x308a) + ((?r ?u) . ?\x308b) + ((?r ?e) . ?\x308c) + ((?r ?o) . ?\x308d) + ((?w ?A) . ?\x308e) + ((?w ?a) . ?\x308f) + ((?w ?i) . ?\x3090) + ((?w ?e) . ?\x3091) + ((?w ?o) . ?\x3092) + ((?n ?5) . ?\x3093) + ((?v ?u) . ?\x3094) + ((?\" ?5) . ?\x309b) + ((?0 ?5) . ?\x309c) + ((?* ?5) . ?\x309d) + ((?+ ?5) . ?\x309e) + ((?a ?6) . ?\x30a1) + ((?A ?6) . ?\x30a2) + ((?i ?6) . ?\x30a3) + ((?I ?6) . ?\x30a4) + ((?u ?6) . ?\x30a5) + ((?U ?6) . ?\x30a6) + ((?e ?6) . ?\x30a7) + ((?E ?6) . ?\x30a8) + ((?o ?6) . ?\x30a9) + ((?O ?6) . ?\x30aa) + ((?K ?a) . ?\x30ab) + ((?G ?a) . ?\x30ac) + ((?K ?i) . ?\x30ad) + ((?G ?i) . ?\x30ae) + ((?K ?u) . ?\x30af) + ((?G ?u) . ?\x30b0) + ((?K ?e) . ?\x30b1) + ((?G ?e) . ?\x30b2) + ((?K ?o) . ?\x30b3) + ((?G ?o) . ?\x30b4) + ((?S ?a) . ?\x30b5) + ((?Z ?a) . ?\x30b6) + ((?S ?i) . ?\x30b7) + ((?Z ?i) . ?\x30b8) + ((?S ?u) . ?\x30b9) + ((?Z ?u) . ?\x30ba) + ((?S ?e) . ?\x30bb) + ((?Z ?e) . ?\x30bc) + ((?S ?o) . ?\x30bd) + ((?Z ?o) . ?\x30be) + ((?T ?a) . ?\x30bf) + ((?D ?a) . ?\x30c0) + ((?T ?i) . ?\x30c1) + ((?D ?i) . ?\x30c2) + ((?T ?U) . ?\x30c3) + ((?T ?u) . ?\x30c4) + ((?D ?u) . ?\x30c5) + ((?T ?e) . ?\x30c6) + ((?D ?e) . ?\x30c7) + ((?T ?o) . ?\x30c8) + ((?D ?o) . ?\x30c9) + ((?N ?a) . ?\x30ca) + ((?N ?i) . ?\x30cb) + ((?N ?u) . ?\x30cc) + ((?N ?e) . ?\x30cd) + ((?N ?o) . ?\x30ce) + ((?H ?a) . ?\x30cf) + ((?B ?a) . ?\x30d0) + ((?P ?a) . ?\x30d1) + ((?H ?i) . ?\x30d2) + ((?B ?i) . ?\x30d3) + ((?P ?i) . ?\x30d4) + ((?H ?u) . ?\x30d5) + ((?B ?u) . ?\x30d6) + ((?P ?u) . ?\x30d7) + ((?H ?e) . ?\x30d8) + ((?B ?e) . ?\x30d9) + ((?P ?e) . ?\x30da) + ((?H ?o) . ?\x30db) + ((?B ?o) . ?\x30dc) + ((?P ?o) . ?\x30dd) + ((?u ?R) . ?\x2515) + ((?U ?r) . ?\x2516) + ((?U ?R) . ?\x2517) + ((?u ?l) . ?\x2518) + ((?u ?L) . ?\x2519) + ((?U ?l) . ?\x251a) + ((?U ?L) . ?\x251b) + ((?v ?r) . ?\x251c) + ((?v ?R) . ?\x251d) + ((?V ?r) . ?\x2520) + ((?V ?R) . ?\x2523) + ((?v ?l) . ?\x2524) + ((?v ?L) . ?\x2525) + ((?V ?l) . ?\x2528) + ((?V ?L) . ?\x252b) + ((?d ?h) . ?\x252c) + ((?d ?H) . ?\x252f) + ((?D ?h) . ?\x2530) + ((?D ?H) . ?\x2533) + ((?u ?h) . ?\x2534) + ((?u ?H) . ?\x2537) + ((?U ?h) . ?\x2538) + ((?U ?H) . ?\x253b) + ((?v ?h) . ?\x253c) + ((?v ?H) . ?\x253f) + ((?V ?h) . ?\x2542) + ((?V ?H) . ?\x254b) + ((?F ?D) . ?\x2571) + ((?B ?D) . ?\x2572) + ((?T ?B) . ?\x2580) + ((?L ?B) . ?\x2584) + ((?F ?B) . ?\x2588) + ((?l ?B) . ?\x258c) + ((?R ?B) . ?\x2590) + ((?. ?S) . ?\x2591) + ((?: ?S) . ?\x2592) + ((?? ?S) . ?\x2593) + ((?f ?S) . ?\x25a0) + ((?O ?S) . ?\x25a1) + ((?R ?O) . ?\x25a2) + ((?R ?r) . ?\x25a3) + ((?R ?F) . ?\x25a4) + ((?R ?Y) . ?\x25a5) + ((?R ?H) . ?\x25a6) + ((?R ?Z) . ?\x25a7) + ((?R ?K) . ?\x25a8) + ((?R ?X) . ?\x25a9) + ((?s ?B) . ?\x25aa) + ((?S ?R) . ?\x25ac) + ((?O ?r) . ?\x25ad) + ((?U ?T) . ?\x25b2) + ((?u ?T) . ?\x25b3) + ((?P ?R) . ?\x25b6) + ((?T ?r) . ?\x25b7) + ((?D ?t) . ?\x25bc) + ((?d ?T) . ?\x25bd) + ((?P ?L) . ?\x25c0) + ((?T ?l) . ?\x25c1) + ((?D ?b) . ?\x25c6) + ((?D ?w) . ?\x25c7) + ((?L ?Z) . ?\x25ca) + ((?0 ?m) . ?\x25cb) + ((?0 ?o) . ?\x25ce) + ((?0 ?M) . ?\x25cf) + ((?0 ?L) . ?\x25d0) + ((?0 ?R) . ?\x25d1) + ((?S ?n) . ?\x25d8) + ((?I ?c) . ?\x25d9) + ((?F ?d) . ?\x25e2) + ((?B ?d) . ?\x25e3) + ((?* ?2) . ?\x2605) + ((?* ?1) . ?\x2606) + ((?< ?H) . ?\x261c) + ((?> ?H) . ?\x261e) + ((?0 ?u) . ?\x263a) + ((?0 ?U) . ?\x263b) + ((?S ?U) . ?\x263c) + ((?F ?m) . ?\x2640) + ((?M ?l) . ?\x2642) + ((?c ?S) . ?\x2660) + ((?c ?H) . ?\x2661) + ((?c ?D) . ?\x2662) + ((?c ?C) . ?\x2663) + ((?M ?d) . ?\x2669) + ((?M ?8) . ?\x266a) + ((?M ?2) . ?\x266b) + ((?M ?b) . ?\x266d) + ((?M ?x) . ?\x266e) + ((?M ?X) . ?\x266f) + ((?O ?K) . ?\x2713) + ((?X ?X) . ?\x2717) + ((?- ?X) . ?\x2720) + ((?I ?S) . ?\x3000) + ((?, ?_) . ?\x3001) + ((?. ?_) . ?\x3002) + ((?+ ?\") . ?\x3003) + ((?+ ?_) . ?\x3004) + ((?* ?_) . ?\x3005) + ((?\; ?_) . ?\x3006) + ((?0 ?_) . ?\x3007) + ((?< ?+) . ?\x300a) + ((?> ?+) . ?\x300b) + ((?< ?') . ?\x300c) + ((?> ?') . ?\x300d) + ((?< ?\") . ?\x300e) + ((?> ?\") . ?\x300f) + ((?\( ?\") . ?\x3010) + ((?\) ?\") . ?\x3011) + ((?= ?T) . ?\x3012) + ((?= ?_) . ?\x3013) + ((?\( ?') . ?\x3014) + ((?\) ?') . ?\x3015) + ((?\( ?I) . ?\x3016) + ((?\) ?I) . ?\x3017) + ((?- ??) . ?\x301c) + ((?A ?5) . ?\x3041) + ((?a ?5) . ?\x3042) + ((?I ?5) . ?\x3043) + ((?i ?5) . ?\x3044) + ((?U ?5) . ?\x3045) + ((?u ?5) . ?\x3046) + ((?E ?5) . ?\x3047) + ((?e ?5) . ?\x3048) + ((?O ?5) . ?\x3049) + ((?o ?5) . ?\x304a) + ((?k ?a) . ?\x304b) + ((?g ?a) . ?\x304c) + ((?k ?i) . ?\x304d) + ((?g ?i) . ?\x304e) + ((?k ?u) . ?\x304f) + ((?g ?u) . ?\x3050) + ((?k ?e) . ?\x3051) + ((?g ?e) . ?\x3052) + ((?k ?o) . ?\x3053) + ((?g ?o) . ?\x3054) + ((?s ?a) . ?\x3055) + ((?z ?a) . ?\x3056) + ((?s ?i) . ?\x3057) + ((?z ?i) . ?\x3058) + ((?s ?u) . ?\x3059) + ((?z ?u) . ?\x305a) + ((?s ?e) . ?\x305b) + ((?z ?e) . ?\x305c) + ((?s ?o) . ?\x305d) + ((?z ?o) . ?\x305e) + ((?t ?a) . ?\x305f) + ((?d ?a) . ?\x3060) + ((?t ?i) . ?\x3061) + ((?d ?i) . ?\x3062) + ((?t ?U) . ?\x3063) + ((?t ?u) . ?\x3064) + ((?d ?u) . ?\x3065) + ((?t ?e) . ?\x3066) + ((?d ?e) . ?\x3067) + ((?t ?o) . ?\x3068) + ((?d ?o) . ?\x3069) + ((?n ?a) . ?\x306a) + ((?n ?i) . ?\x306b) + ((?n ?u) . ?\x306c) + ((?n ?e) . ?\x306d) + ((?n ?o) . ?\x306e) + ((?h ?a) . ?\x306f) + ((?b ?a) . ?\x3070) + ((?p ?a) . ?\x3071) + ((?h ?i) . ?\x3072) + ((?b ?i) . ?\x3073) + ((?p ?i) . ?\x3074) + ((?h ?u) . ?\x3075) + ((?b ?u) . ?\x3076) + ((?p ?u) . ?\x3077) + ((?h ?e) . ?\x3078) + ((?b ?e) . ?\x3079) + ((?p ?e) . ?\x307a) + ((?h ?o) . ?\x307b) + ((?b ?o) . ?\x307c) + ((?p ?o) . ?\x307d) + ((?m ?a) . ?\x307e) + ((?m ?i) . ?\x307f) + ((?m ?u) . ?\x3080) + ((?m ?e) . ?\x3081) + ((?m ?o) . ?\x3082) + ((?y ?A) . ?\x3083) + ((?y ?a) . ?\x3084) + ((?y ?U) . ?\x3085) + ((?y ?u) . ?\x3086) + ((?y ?O) . ?\x3087) + ((?y ?o) . ?\x3088) + ((?r ?a) . ?\x3089) + ((?r ?i) . ?\x308a) + ((?r ?u) . ?\x308b) + ((?r ?e) . ?\x308c) + ((?r ?o) . ?\x308d) + ((?w ?A) . ?\x308e) + ((?w ?a) . ?\x308f) + ((?w ?i) . ?\x3090) + ((?w ?e) . ?\x3091) + ((?w ?o) . ?\x3092) + ((?n ?5) . ?\x3093) + ((?v ?u) . ?\x3094) + ((?\" ?5) . ?\x309b) + ((?0 ?5) . ?\x309c) + ((?* ?5) . ?\x309d) + ((?+ ?5) . ?\x309e) + ((?a ?6) . ?\x30a1) + ((?A ?6) . ?\x30a2) + ((?i ?6) . ?\x30a3) + ((?I ?6) . ?\x30a4) + ((?u ?6) . ?\x30a5) + ((?U ?6) . ?\x30a6) + ((?e ?6) . ?\x30a7) + ((?E ?6) . ?\x30a8) + ((?o ?6) . ?\x30a9) + ((?O ?6) . ?\x30aa) + ((?K ?a) . ?\x30ab) + ((?G ?a) . ?\x30ac) + ((?K ?i) . ?\x30ad) + ((?G ?i) . ?\x30ae) + ((?K ?u) . ?\x30af) + ((?G ?u) . ?\x30b0) + ((?K ?e) . ?\x30b1) + ((?G ?e) . ?\x30b2) + ((?K ?o) . ?\x30b3) + ((?G ?o) . ?\x30b4) + ((?S ?a) . ?\x30b5) + ((?Z ?a) . ?\x30b6) + ((?S ?i) . ?\x30b7) + ((?Z ?i) . ?\x30b8) + ((?S ?u) . ?\x30b9) + ((?Z ?u) . ?\x30ba) + ((?S ?e) . ?\x30bb) + ((?Z ?e) . ?\x30bc) + ((?S ?o) . ?\x30bd) + ((?Z ?o) . ?\x30be) + ((?T ?a) . ?\x30bf) + ((?D ?a) . ?\x30c0) + ((?T ?i) . ?\x30c1) + ((?D ?i) . ?\x30c2) + ((?T ?U) . ?\x30c3) + ((?T ?u) . ?\x30c4) + ((?D ?u) . ?\x30c5) + ((?T ?e) . ?\x30c6) + ((?D ?e) . ?\x30c7) + ((?T ?o) . ?\x30c8) + ((?D ?o) . ?\x30c9) + ((?N ?a) . ?\x30ca) + ((?N ?i) . ?\x30cb) + ((?N ?u) . ?\x30cc) + ((?N ?e) . ?\x30cd) + ((?N ?o) . ?\x30ce) + ((?H ?a) . ?\x30cf) + ((?B ?a) . ?\x30d0) + ((?P ?a) . ?\x30d1) + ((?H ?i) . ?\x30d2) + ((?B ?i) . ?\x30d3) + ((?P ?i) . ?\x30d4) + ((?H ?u) . ?\x30d5) + ((?B ?u) . ?\x30d6) + ((?P ?u) . ?\x30d7) + ((?H ?e) . ?\x30d8) + ((?B ?e) . ?\x30d9) + ((?P ?e) . ?\x30da) + ((?H ?o) . ?\x30db) + ((?B ?o) . ?\x30dc) + ((?P ?o) . ?\x30dd) + ((?M ?a) . ?\x30de) + ((?M ?i) . ?\x30df) + ((?M ?u) . ?\x30e0) + ((?M ?e) . ?\x30e1) + ((?M ?o) . ?\x30e2) + ((?Y ?A) . ?\x30e3) + ((?Y ?a) . ?\x30e4) + ((?Y ?U) . ?\x30e5) + ((?Y ?u) . ?\x30e6) + ((?Y ?O) . ?\x30e7) + ((?Y ?o) . ?\x30e8) + ((?R ?a) . ?\x30e9) + ((?R ?i) . ?\x30ea) + ((?R ?u) . ?\x30eb) + ((?R ?e) . ?\x30ec) + ((?R ?o) . ?\x30ed) + ((?W ?A) . ?\x30ee) + ((?W ?a) . ?\x30ef) + ((?W ?i) . ?\x30f0) + ((?W ?e) . ?\x30f1) + ((?W ?o) . ?\x30f2) + ((?N ?6) . ?\x30f3) + ((?V ?u) . ?\x30f4) + ((?K ?A) . ?\x30f5) + ((?K ?E) . ?\x30f6) + ((?V ?a) . ?\x30f7) + ((?V ?i) . ?\x30f8) + ((?V ?e) . ?\x30f9) + ((?V ?o) . ?\x30fa) + ((?. ?6) . ?\x30fb) + ((?- ?6) . ?\x30fc) + ((?* ?6) . ?\x30fd) + ((?+ ?6) . ?\x30fe) + ((?b ?4) . ?\x3105) + ((?p ?4) . ?\x3106) + ((?m ?4) . ?\x3107) + ((?f ?4) . ?\x3108) + ((?d ?4) . ?\x3109) + ((?t ?4) . ?\x310a) + ((?n ?4) . ?\x310b) + ((?l ?4) . ?\x310c) + ((?g ?4) . ?\x310d) + ((?k ?4) . ?\x310e) + ((?h ?4) . ?\x310f) + ((?j ?4) . ?\x3110) + ((?q ?4) . ?\x3111) + ((?x ?4) . ?\x3112) + ((?z ?h) . ?\x3113) + ((?c ?h) . ?\x3114) + ((?s ?h) . ?\x3115) + ((?r ?4) . ?\x3116) + ((?z ?4) . ?\x3117) + ((?c ?4) . ?\x3118) + ((?s ?4) . ?\x3119) + ((?a ?4) . ?\x311a) + ((?o ?4) . ?\x311b) + ((?e ?4) . ?\x311c) + ((?a ?i) . ?\x311e) + ((?e ?i) . ?\x311f) + ((?a ?u) . ?\x3120) + ((?o ?u) . ?\x3121) + ((?a ?n) . ?\x3122) + ((?e ?n) . ?\x3123) + ((?a ?N) . ?\x3124) + ((?e ?N) . ?\x3125) + ((?e ?r) . ?\x3126) + ((?i ?4) . ?\x3127) + ((?u ?4) . ?\x3128) + ((?i ?u) . ?\x3129) + ((?v ?4) . ?\x312a) + ((?n ?G) . ?\x312b) + ((?g ?n) . ?\x312c) + ((?1 ?c) . ?\x3220) + ((?2 ?c) . ?\x3221) + ((?3 ?c) . ?\x3222) + ((?4 ?c) . ?\x3223) + ((?5 ?c) . ?\x3224) + ((?6 ?c) . ?\x3225) + ((?7 ?c) . ?\x3226) + ((?8 ?c) . ?\x3227) + ((?9 ?c) . ?\x3228) + ((?\s ?\s) . ?\xe000) + ((?/ ?c) . ?\xe001) + ((?U ?A) . ?\xe002) + ((?U ?B) . ?\xe003) + ((?\" ?3) . ?\xe004) + ((?\" ?1) . ?\xe005) + ((?\" ?!) . ?\xe006) + ((?\" ?') . ?\xe007) + ((?\" ?>) . ?\xe008) + ((?\" ??) . ?\xe009) + ((?\" ?-) . ?\xe00a) + ((?\" ?\() . ?\xe00b) + ((?\" ?.) . ?\xe00c) + ((?\" ?:) . ?\xe00d) + ((?\" ?0) . ?\xe00e) + ((?\" ?\") . ?\xe00f) + ((?\" ?<) . ?\xe010) + ((?\" ?,) . ?\xe011) + ((?\" ?\;) . ?\xe012) + ((?\" ?_) . ?\xe013) + ((?\" ?=) . ?\xe014) + ((?\" ?/) . ?\xe015) + ((?\" ?i) . ?\xe016) + ((?\" ?d) . ?\xe017) + ((?\" ?p) . ?\xe018) + ((?\; ?\;) . ?\xe019) + ((?, ?,) . ?\xe01a) + ((?b ?3) . ?\xe01b) + ((?C ?i) . ?\xe01c) + ((?f ?\() . ?\xe01d) + ((?e ?d) . ?\xe01e) + ((?a ?m) . ?\xe01f) + ((?p ?m) . ?\xe020) + ((?F ?l) . ?\xe023) + ((?G ?F) . ?\xe024) + ((?> ?V) . ?\xe025) + ((?! ?*) . ?\xe026) + ((?? ?*) . ?\xe027) + ((?J ?<) . ?\xe028) + ((?f ?f) . ?\xfb00) + ((?f ?i) . ?\xfb01) + ((?f ?l) . ?\xfb02) + ((?f ?t) . ?\xfb05) + ((?s ?t) . ?\xfb06) + ((?~ ?!) . ?\x00a1) + ((?c ?|) . ?\x00a2) + ((?$ ?$) . ?\x00a3) + ((?o ?x) . ?\x00a4) + ((?Y ?-) . ?\x00a5) + ((?| ?|) . ?\x00a6) + ((?c ?O) . ?\x00a9) + ((?- ?,) . ?\x00ac) + ((?- ?=) . ?\x00af) + ((?~ ?o) . ?\x00b0) + ((?2 ?2) . ?\x00b2) + ((?3 ?3) . ?\x00b3) + ((?p ?p) . ?\x00b6) + ((?~ ?.) . ?\x00b7) + ((?1 ?1) . ?\x00b9) + ((?~ ??) . ?\x00bf) + ((?A ?`) . ?\x00c0) + ((?A ?^) . ?\x00c2) + ((?A ?~) . ?\x00c3) + ((?A ?\") . ?\x00c4) + ((?A ?@) . ?\x00c5) + ((?E ?`) . ?\x00c8) + ((?E ?^) . ?\x00ca) + ((?E ?\") . ?\x00cb) + ((?I ?`) . ?\x00cc) + ((?I ?^) . ?\x00ce) + ((?I ?\") . ?\x00cf) + ((?N ?~) . ?\x00d1) + ((?O ?`) . ?\x00d2) + ((?O ?^) . ?\x00d4) + ((?O ?~) . ?\x00d5) + ((?/ ?\\) . ?\x00d7) + ((?U ?`) . ?\x00d9) + ((?U ?^) . ?\x00db) + ((?I ?p) . ?\x00de) + ((?a ?`) . ?\x00e0) + ((?a ?^) . ?\x00e2) + ((?a ?~) . ?\x00e3) + ((?a ?\") . ?\x00e4) + ((?a ?@) . ?\x00e5) + ((?e ?`) . ?\x00e8) + ((?e ?^) . ?\x00ea) + ((?e ?\") . ?\x00eb) + ((?i ?`) . ?\x00ec) + ((?i ?^) . ?\x00ee) + ((?n ?~) . ?\x00f1) + ((?o ?`) . ?\x00f2) + ((?o ?^) . ?\x00f4) + ((?o ?~) . ?\x00f5) + ((?u ?`) . ?\x00f9) + ((?u ?^) . ?\x00fb) + ((?y ?\") . ?\x00ff)) + "Table of default digraphs. +This includes all digraphs defined in RFC 1345, +as well as miscellaneous digraphs for multi-byte characters. +See also `evil-digraphs-table-user'.") + +(defun evil-digraph (digraph) + "Convert DIGRAPH to character or list representation. +If DIGRAPH is a list (CHAR1 CHAR2), return the corresponding character; +if DIGRAPH is a character, return the corresponding list. +Searches in `evil-digraphs-table-user' and `evil-digraphs-table'." + (if (listp digraph) + (let* ((char1 (car digraph)) + (char2 (cadr digraph))) + (or (cdr (assoc (list char1 char2) evil-digraphs-table-user)) + (cdr (assoc (list char1 char2) evil-digraphs-table)) + (unless (eq char1 char2) + (or (cdr (assoc (list char2 char1) evil-digraphs-table-user)) + (cdr (assoc (list char2 char1) evil-digraphs-table)))))) + (or (car (rassoc digraph evil-digraphs-table-user)) + (car (rassoc digraph evil-digraphs-table))))) + +(provide 'evil-digraphs) + +;;; evil-digraphs.el ends here diff --git a/elpa/evil-20220510.2302/evil-digraphs.elc b/elpa/evil-20220510.2302/evil-digraphs.elc Binary files differnew file mode 100644 index 0000000..529ff54 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-digraphs.elc diff --git a/elpa/evil-20220510.2302/evil-ex.el b/elpa/evil-20220510.2302/evil-ex.el new file mode 100644 index 0000000..3120e79 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-ex.el @@ -0,0 +1,1195 @@ +;;; evil-ex.el --- Ex-mode -*- lexical-binding: nil -*- + +;; Author: Frank Fischer <frank fischer at mathematik.tu-chemnitz.de> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Ex is implemented as an extensible minilanguage, whose grammar +;; is stored in `evil-ex-grammar'. Ex commands are defined with +;; `evil-ex-define-cmd', which creates a binding from a string +;; to an interactive function. It is also possible to define key +;; sequences which execute a command immediately when entered: +;; such shortcuts go in `evil-ex-map'. +;; +;; To provide buffer and filename completion, as well as interactive +;; feedback, Ex defines the concept of an argument handler, specified +;; with `evil-ex-define-argument-type'. In the case of the +;; substitution command (":s/foo/bar"), the handler incrementally +;; highlights matches in the buffer as the substitution is typed. + +(require 'evil-common) +(require 'evil-states) +(require 'evil-types) +(require 'shell) + +;;; Code: + +(defconst evil-ex-grammar + '((expression + (count command argument #'evil-ex-call-command) + ((\? range) command argument #'evil-ex-call-command) + (line #'evil-goto-line) + (sexp #'eval-expression)) + (count + number) + (command #'evil-ex-parse-command) + (binding + "[~&*@<>=:]+\\|[[:alpha:]_]+\\|!") + (emacs-binding + "[[:alpha:]-][[:alnum:][:punct:]-]+") + (bang + (\? (! space) "!" #'$1)) + (argument + ((\? space) (\? "\\(?:.\\|\n\\)+") #'$2)) + (range + ("%" #'(evil-ex-full-range)) + ("*" #'(evil-ex-last-visual-range)) + ((alt "," ";") line #'(evil-ex-range (evil-ex-current-line) $2)) + (line ";" line #'(let ((tmp1 $1)) + (save-excursion + (goto-line tmp1) + (evil-ex-range tmp1 $3)))) + (line "," line #'(evil-ex-range $1 $3)) + (line #'(evil-ex-range $1 nil)) + ("`" marker-name ",`" marker-name + #'(evil-ex-char-marker-range $2 $4))) + (line + (base (\? offset) search (\? offset) + #'(let ((tmp (evil-ex-line $1 $2))) + (save-excursion + (goto-line tmp) + (evil-ex-line $3 $4)))) + ((\? base) offset search (\? offset) + #'(let ((tmp (evil-ex-line $1 $2))) + (save-excursion + (goto-line tmp) + (evil-ex-line $3 $4)))) + (base (\? offset) #'evil-ex-line) + ((\? base) offset #'evil-ex-line)) + (base + number + marker + search + ("\\^" #'(evil-ex-first-line)) + ("\\$" #'(evil-ex-last-line)) + ("\\." #'(evil-ex-current-line))) + (offset + (+ signed-number #'+)) + (marker + ("'" marker-name #'(evil-ex-marker $2))) + (search + forward + backward + next + prev + subst) + (forward + ("/" "\\(?:[\\].\\|[^/,; ]\\)+" (! "/") + #'(evil-ex-re-fwd $2)) + ("/" "\\(?:[\\].\\|[^/]\\)+" "/" + #'(evil-ex-re-fwd $2))) + (backward + ("\\?" "\\(?:[\\].\\|[^?,; ]\\)+" (! "\\?") + #'(evil-ex-re-bwd $2)) + ("\\?" "\\(?:[\\].\\|[^?]\\)+" "\\?" + #'(evil-ex-re-bwd $2))) + (marker-name + "[]\\[-a-zA-Z_<>'}{)(]") + (next + "\\\\/" #'(evil-ex-prev-search)) + (prev + "\\\\\\?" #'(evil-ex-prev-search)) + (subst + "\\\\&" #'(evil-ex-prev-search)) + (signed-number + (sign (\? number) #'evil-ex-signed-number)) + (sign + "\\+\\|-" #'intern) + (number + "[0-9]+" #'string-to-number) + (space + "[ ]+") + (sexp + "(.*)" #'(car-safe (read-from-string $1)))) + "Grammar for Ex. +An association list of syntactic symbols and their definitions. +The first entry is the start symbol. A symbol's definition may +reference other symbols, but the grammar cannot contain +left recursion. See `evil-parser' for a detailed explanation +of the syntax.") + +(defvar evil-ex-echo-overlay nil + "Overlay used for displaying info messages during ex.") + +(defun evil-ex-p () + "Whether Ex is currently active." + (and evil-ex-current-buffer t)) + +(evil-define-command evil-ex (&optional initial-input) + "Enter an Ex command. +The ex command line is initialized with the value of +INITIAL-INPUT. If the command is called interactively the initial +input depends on the current state. If the current state is +normal state and no count argument is given then the initial +input is empty. If a prefix count is given the initial input is +.,.+count. If the current state is visual state then the initial +input is the visual region '<,'> or `<,`>. If the value of the +global variable `evil-ex-initial-input' is non-nil, its content +is appended to the line." + :keep-visual t + :repeat abort + (interactive + (list + (let ((s (concat + (cond + ((and (evil-visual-state-p) + evil-ex-visual-char-range + (memq (evil-visual-type) '(inclusive exclusive))) + "`<,`>") + ((evil-visual-state-p) + "'<,'>") + (current-prefix-arg + (let ((arg (prefix-numeric-value current-prefix-arg))) + (cond ((< arg 0) (setq arg (1+ arg))) + ((> arg 0) (setq arg (1- arg)))) + (if (= arg 0) "." + (format ".,.%+d" arg))))) + evil-ex-initial-input))) + (and (> (length s) 0) s)))) + (let ((evil-ex-current-buffer (current-buffer)) + (evil-ex-previous-command (unless initial-input + (car-safe evil-ex-history))) + evil-ex-argument-handler + evil-ex-info-string + result) + (minibuffer-with-setup-hook + (if initial-input #'evil-ex-setup-and-update #'evil-ex-setup) + (setq result + (read-from-minibuffer + ":" + (or initial-input + (and evil-ex-previous-command + evil-want-empty-ex-last-command + (propertize evil-ex-previous-command 'face 'shadow))) + evil-ex-completion-map + nil + 'evil-ex-history + (when evil-want-empty-ex-last-command + evil-ex-previous-command) + t))) + (evil-ex-execute result))) + +(defun evil-ex-execute (result) + "Execute RESULT as an ex command on `evil-ex-current-buffer'." + ;; empty input means repeating the previous command + (when (and (zerop (length result)) + evil-want-empty-ex-last-command) + (setq result evil-ex-previous-command)) + ;; parse data + (evil-ex-update nil nil nil result) + ;; execute command + (unless (zerop (length result)) + (if evil-ex-expression + (eval evil-ex-expression) + (user-error "Ex: syntax error")))) + +(defun evil-ex-delete-backward-char () + "Close the minibuffer if it is empty. +Otherwise behaves like `delete-backward-char'." + (interactive) + (call-interactively + (if (zerop (length (minibuffer-contents))) + #'abort-recursive-edit + #'delete-backward-char))) + +(defun evil-ex-abort () + "Cancel ex state when another buffer is selected." + (unless (or (minibufferp) + (memq this-command '(mouse-drag-region choose-completion))) + (abort-recursive-edit))) + +(defun evil-ex-command-window-execute (config result) + (select-window (active-minibuffer-window) t) + (set-window-configuration config) + (delete-minibuffer-contents) + (insert result) + (exit-minibuffer)) + +(defun evil-ex-elisp-completion-at-point () + "Complete an `evil-ex' Elisp expression." + (when (and (fboundp 'elisp-completion-at-point) + (string-prefix-p "(" (minibuffer-contents-no-properties))) + (elisp-completion-at-point))) + +(defun evil-ex-setup () + "Initialize Ex minibuffer. +This function registers several hooks that are used for the +interactive actions during ex state." + (add-hook 'post-command-hook #'evil-ex-abort) + (add-hook 'after-change-functions #'evil-ex-update nil t) + (add-hook 'minibuffer-exit-hook #'evil-ex-teardown nil t) + (when evil-ex-previous-command + (add-hook 'pre-command-hook #'evil-ex-remove-default)) + (remove-hook 'minibuffer-setup-hook #'evil-ex-setup) + (with-no-warnings + (make-variable-buffer-local 'completion-at-point-functions)) + (setq completion-at-point-functions + '(evil-ex-elisp-completion-at-point + evil-ex-command-completion-at-point + evil-ex-argument-completion-at-point))) +(put 'evil-ex-setup 'permanent-local-hook t) + +(defun evil-ex-setup-and-update () + "Initialize Ex minibuffer with `evil-ex-setup', then call `evil-ex-update'." + (evil-ex-setup) + (evil-ex-update)) + +(defun evil-ex-teardown () + "Deinitialize Ex minibuffer. +Clean up everything set up by `evil-ex-setup'." + (remove-hook 'post-command-hook #'evil-ex-abort) + (remove-hook 'minibuffer-exit-hook #'evil-ex-teardown t) + (remove-hook 'after-change-functions #'evil-ex-update t) + (when evil-ex-argument-handler + (let ((runner (evil-ex-argument-handler-runner + evil-ex-argument-handler))) + (when runner + (funcall runner 'stop))))) +(put 'evil-ex-teardown 'permanent-local-hook t) + +(defun evil-ex-update (&optional beg end len string) + "Update Ex variables when the minibuffer changes. +This function is usually called from `after-change-functions' +hook. If BEG is non-nil (which is the case when called from +`after-change-functions'), then an error description is shown +in case of incomplete or unknown commands." + (let* ((prompt (minibuffer-prompt-end)) + (string (or string (buffer-substring prompt (point-max)))) + arg bang cmd count expr func handler range tree type) + (cond + ((and (eq this-command #'self-insert-command) + (commandp (setq cmd (lookup-key evil-ex-map string)))) + (setq evil-ex-expression `(call-interactively #',cmd)) + (when (minibufferp) + (exit-minibuffer))) + (t + (setq cmd nil) + ;; store the buffer position of each character + ;; as the `ex-index' text property + (dotimes (i (length string)) + (add-text-properties + i (1+ i) (list 'ex-index (+ i prompt)) string)) + (with-current-buffer evil-ex-current-buffer + (setq tree (evil-ex-parse string t) + expr (evil-ex-parse string)) + (when (eq (car-safe expr) 'evil-ex-call-command) + (setq count (eval (nth 1 expr)) + cmd (eval (nth 2 expr)) + arg (eval (nth 3 expr)) + range (cond + ((evil-range-p count) + count) + ((numberp count) + (evil-ex-range count count))) + bang (and (save-match-data (string-match ".!$" cmd)) t)))) + (setq evil-ex-tree tree + evil-ex-expression expr + evil-ex-range range + evil-ex-cmd cmd + evil-ex-bang bang + evil-ex-argument arg) + ;; test the current command + (when (and cmd (minibufferp)) + (setq func (evil-ex-completed-binding cmd t)) + (cond + ;; update argument-handler + (func + (when (setq type (evil-get-command-property + func :ex-arg)) + (setq handler (cdr-safe + (assoc type + evil-ex-argument-types)))) + (unless (eq handler evil-ex-argument-handler) + (let ((runner (and evil-ex-argument-handler + (evil-ex-argument-handler-runner + evil-ex-argument-handler)))) + (when runner (funcall runner 'stop))) + (setq evil-ex-argument-handler handler) + (let ((runner (and evil-ex-argument-handler + (evil-ex-argument-handler-runner + evil-ex-argument-handler)))) + (when runner (funcall runner 'start evil-ex-argument)))) + (let ((runner (and evil-ex-argument-handler + (evil-ex-argument-handler-runner + evil-ex-argument-handler)))) + (when runner (funcall runner 'update evil-ex-argument)))) + (beg + ;; show error message only when called from `after-change-functions' + (let ((n (length (all-completions cmd (evil-ex-completion-table))))) + (cond + ((> n 1) (evil-ex-echo "Incomplete command")) + ((= n 0) (evil-ex-echo "Unknown command"))))))))))) +(put 'evil-ex-update 'permanent-local-hook t) + +(defun evil-ex-echo (string &rest args) + "Display a message after the current Ex command." + (with-selected-window (minibuffer-window) + (with-current-buffer (window-buffer (minibuffer-window)) + (unless (or evil-no-display + (zerop (length string))) + (let ((string (format " [%s]" (apply #'format string args))) + (ov (or evil-ex-echo-overlay + (setq evil-ex-echo-overlay (make-overlay (point-min) (point-max) nil t t)))) + after-change-functions before-change-functions) + (put-text-property 0 (length string) 'face 'evil-ex-info string) + ;; The following 'trick' causes point to be shown before the + ;; message instead behind. It is shamelessly stolen from the + ;; implementation of `minibuffer-message`. + (put-text-property 0 1 'cursor t string) + (move-overlay ov (point-max) (point-max)) + (overlay-put ov 'after-string string) + (add-hook 'pre-command-hook #'evil--ex-remove-echo-overlay nil t)))))) + +(defun evil--ex-remove-echo-overlay () + "Remove echo overlay from ex minibuffer." + (when evil-ex-echo-overlay + (delete-overlay evil-ex-echo-overlay) + (setq evil-ex-echo-overlay nil)) + (remove-hook 'pre-command-hook 'evil--ex-remove-echo-overlay t)) + +(defun evil-ex-completion () + "Completes the current ex command or argument." + (interactive) + (let (after-change-functions) + (evil-ex-update) + (completion-at-point) + (remove-text-properties (minibuffer-prompt-end) (point-max) '(face nil evil)))) + +(defun evil-ex-command-completion-at-point () + (let ((beg (or (get-text-property 0 'ex-index evil-ex-cmd) + (point))) + (end (point))) + (list beg end (evil-ex-completion-table) :exclusive 'no))) + +(defun evil-ex-completion-table () + (cond + ((eq evil-ex-complete-emacs-commands nil) + #'evil-ex-command-collection) + ((eq evil-ex-complete-emacs-commands 'in-turn) + (completion-table-in-turn + #'evil-ex-command-collection + #'(lambda (str pred flag) + (completion-table-with-predicate + obarray #'commandp t str pred flag)))) + (t + #'(lambda (str pred flag) + (evil-completion-table-concat + #'evil-ex-command-collection + #'(lambda (str pred flag) + (completion-table-with-predicate + obarray #'commandp t str pred flag)) + str pred flag))))) + +(defun evil-completion-table-concat (table1 table2 string pred flag) + (cond + ((eq flag nil) + (let ((result1 (try-completion string table1 pred)) + (result2 (try-completion string table2 pred))) + (cond + ((null result1) result2) + ((null result2) result1) + ((and (eq result1 t) (eq result2 t)) t) + (t result1)))) + ((eq flag t) + (delete-dups + (append (all-completions string table1 pred) + (all-completions string table2 pred)))) + ((eq flag 'lambda) + (and (or (eq t (test-completion string table1 pred)) + (eq t (test-completion string table2 pred))) + t)) + ((eq (car-safe flag) 'boundaries) + (or (completion-boundaries string table1 pred (cdr flag)) + (completion-boundaries string table2 pred (cdr flag)))) + ((eq flag 'metadata) + '(metadata (display-sort-function . evil-ex-sort-completions))))) + +(defun evil-ex-sort-completions (completions) + (sort completions + #'(lambda (str1 str2) + (let ((p1 (eq 'evil-ex-commands (get-text-property 0 'face str1))) + (p2 (eq 'evil-ex-commands (get-text-property 0 'face str2)))) + (if (equal p1 p2) + (string< str1 str2) + p1))))) + +(defun evil-ex-command-collection (cmd predicate flag) + "Called to complete a command." + (let (commands) + ;; append ! to all commands that may take a bang argument + (dolist (cmd (mapcar #'car evil-ex-commands)) + (push cmd commands) + (if (evil-ex-command-force-p cmd) + (push (concat cmd "!") commands))) + (when (eq evil-ex-complete-emacs-commands t) + (setq commands + (mapcar #'(lambda (str) (propertize str 'face 'evil-ex-commands)) + commands))) + (cond + ((eq flag nil) (try-completion cmd commands predicate)) + ((eq flag t) (all-completions cmd commands predicate)) + ((eq flag 'lambda) (test-completion cmd commands)) + ((eq (car-safe flag) 'boundaries) + `(boundaries 0 . ,(length (cdr flag))))))) + +(defun evil-ex-argument-completion-at-point () + (let ((context (evil-ex-syntactic-context (1- (point))))) + (when (memq 'argument context) + ;; if it's an autoload, load the function; this allows external + ;; packages to register autoloaded ex commands which will be + ;; loaded when ex argument completion is triggered + (let ((binding-definition (symbol-function (evil-ex-binding evil-ex-cmd)))) + (when (autoloadp binding-definition) + (autoload-do-load binding-definition))) + + (let* ((beg (or (and evil-ex-argument + (get-text-property 0 'ex-index evil-ex-argument)) + (point))) + (end (1+ (or (and evil-ex-argument + (get-text-property (1- (length evil-ex-argument)) + 'ex-index + evil-ex-argument)) + (1- (point))))) + (binding (evil-ex-completed-binding evil-ex-cmd)) + (arg-type (evil-get-command-property binding :ex-arg)) + (arg-handler (assoc arg-type evil-ex-argument-types)) + (completer (and arg-handler + (evil-ex-argument-handler-completer + (cdr arg-handler))))) + (when completer + (if (eq (car completer) 'collection) + (list beg end (cdr completer)) + (save-restriction + (narrow-to-region beg (point-max)) + (funcall (cdr completer))))))))) + +(defun evil-ex-define-cmd (cmd function) + "Binds the function FUNCTION to the command CMD." + (save-match-data + (if (string-match "^[^][]*\\(\\[\\(.*\\)\\]\\)[^][]*$" cmd) + (let ((abbrev (replace-match "" nil t cmd 1)) + (full (replace-match "\\2" nil nil cmd 1))) + (evil--add-to-alist 'evil-ex-commands full function) + (evil--add-to-alist 'evil-ex-commands abbrev full)) + (evil--add-to-alist 'evil-ex-commands cmd function)))) + +(defun evil-ex-make-argument-handler (runner completer) + (list runner completer)) + +(defun evil-ex-argument-handler-runner (arg-handler) + (car arg-handler)) + +(defun evil-ex-argument-handler-completer (arg-handler) + (cadr arg-handler)) + +(defmacro evil-ex-define-argument-type (arg-type doc &rest body) + "Defines a new handler for argument-type ARG-TYPE. +DOC is the documentation string. It is followed by a list of +keywords and function: + +:collection COLLECTION + + A collection for completion as required by `all-completions'. + +:completion-at-point FUNC + + Function to be called to initialize a potential + completion. FUNC must match the requirements as described for + the variable `completion-at-point-functions'. When FUNC is + called the minibuffer content is narrowed to exactly match the + argument. + +:runner FUNC + + Function to be called when the type of the current argument + changes or when the content of this argument changes. This + function should take one obligatory argument FLAG followed by + an optional argument ARG. FLAG is one of three symbol 'start, + 'stop or 'update. When the argument type is recognized for the + first time and this handler is started the FLAG is 'start. If + the argument type changes to something else or ex state + finished the handler FLAG is 'stop. If the content of the + argument has changed FLAG is 'update. If FLAG is either 'start + or 'update then ARG is the current value of this argument. If + FLAG is 'stop then arg is nil." + (declare (indent defun) + (doc-string 2) + (debug (&define name + [&optional stringp] + [&rest [keywordp function-form]]))) + (unless (stringp doc) (push doc body)) + (let (runner completer) + (while (keywordp (car-safe body)) + (let ((key (pop body)) + (func (pop body))) + (cond + ((eq key :runner) + (setq runner func)) + ((eq key :collection) + (setq completer (cons 'collection func))) + ((eq key :completion-at-point) + (setq completer (cons 'completion-at-point func)))))) + `(eval-and-compile + (evil--add-to-alist + 'evil-ex-argument-types + ',arg-type + '(,runner ,completer))))) + +(evil-ex-define-argument-type file + "Handles a file argument." + :collection read-file-name-internal) + +(evil-ex-define-argument-type buffer + "Called to complete a buffer name argument." + :collection internal-complete-buffer) + +(declare-function shell-completion-vars "shell" ()) + +(defun evil-ex-init-shell-argument-completion (flag &optional arg) + "Prepares the current minibuffer for completion of shell commands. +This function must be called from the :runner function of some +argument handler that requires shell completion." + (when (and (eq flag 'start) + (not evil-ex-shell-argument-initialized)) + (set (make-local-variable 'evil-ex-shell-argument-initialized) t) + (cond + ;; Emacs 24 + ((fboundp 'comint-completion-at-point) + (shell-completion-vars)) + (t + (set (make-local-variable 'minibuffer-default-add-function) + 'minibuffer-default-add-shell-commands))) + (setq completion-at-point-functions + '(evil-ex-command-completion-at-point + evil-ex-argument-completion-at-point)))) + +(define-obsolete-function-alias + 'evil-ex-shell-command-completion-at-point + 'comint-completion-at-point "1.2.13") + +(evil-ex-define-argument-type shell + "Shell argument type, supports completion." + :completion-at-point comint-completion-at-point + :runner evil-ex-init-shell-argument-completion) + +(defun evil-ex-file-or-shell-command-completion-at-point () + (if (and (< (point-min) (point-max)) + (= (char-after (point-min)) ?!)) + (save-restriction + (narrow-to-region (1+ (point-min)) (point-max)) + (comint-completion-at-point)) + (list (point-min) (point-max) #'read-file-name-internal))) + +(evil-ex-define-argument-type file-or-shell + "File or shell argument type. +If the current argument starts with a ! the rest of the argument +is considered a shell command, otherwise a file-name. Completion +works accordingly." + :completion-at-point evil-ex-file-or-shell-command-completion-at-point + :runner evil-ex-init-shell-argument-completion) + +(defun evil-ex-binding (command &optional noerror) + "Returns the final binding of COMMAND." + (save-match-data + (let ((binding command)) + (when binding + (string-match "^\\(.+?\\)\\!?$" binding) + (setq binding (match-string 1 binding)) + (while (progn + (setq binding (cdr (assoc binding evil-ex-commands))) + (stringp binding))) + (unless binding + (setq binding (intern command))) + (if (commandp binding) + ;; check for remaps + (or (command-remapping binding) binding) + (unless noerror + (user-error "Unknown command: `%s'" command))))))) + +(defun evil-ex-completed-binding (command &optional noerror) + "Returns the final binding of the completion of COMMAND." + (let ((completion (try-completion command evil-ex-commands))) + (evil-ex-binding (if (eq completion t) command + (or completion command)) + noerror))) + +;;; TODO: extensions likes :p :~ <cfile> ... +(defun evil-ex-replace-special-filenames (file-name) + "Replace special symbols in FILE-NAME. +Replaces % by the current file-name, +Replaces # by the alternate file-name in FILE-NAME." + (let ((remote (file-remote-p file-name)) + (current-fname (buffer-file-name)) + (alternate-fname (and (other-buffer) + (buffer-file-name (other-buffer))))) + (setq file-name (or (file-remote-p file-name 'localname) file-name)) + (when current-fname + (setq current-fname (or (file-remote-p current-fname 'localname) + current-fname)) + (setq file-name + (replace-regexp-in-string "\\(^\\|[^\\\\]\\)\\(%\\)" + current-fname file-name + t t 2))) + (when alternate-fname + (setq alternate-fname (or (file-remote-p alternate-fname 'localname) + alternate-fname)) + (setq file-name + (replace-regexp-in-string "\\(^\\|[^\\\\]\\)\\(#\\)" + alternate-fname file-name + t t 2))) + (setq file-name + (replace-regexp-in-string "\\\\\\([#%]\\)" + "\\1" file-name t)) + (setq file-name (concat remote file-name))) + file-name) + +(defun evil-ex-file-arg () + "Returns the current Ex argument as a file name. +This function interprets special file names like # and %." + (unless (zerop (length evil-ex-argument)) + (evil-ex-replace-special-filenames evil-ex-argument))) + +(defun evil-ex-repeat (count) + "Repeats the last ex command." + (interactive "P") + (when count + (goto-char (point-min)) + (forward-line (1- count))) + (let ((evil-ex-current-buffer (current-buffer)) + (hist evil-ex-history)) + (while hist + (let ((evil-ex-last-cmd (pop hist))) + (when evil-ex-last-cmd + (evil-ex-update nil nil nil evil-ex-last-cmd) + (let ((binding (evil-ex-binding evil-ex-cmd))) + (unless (eq binding #'evil-ex-repeat) + (setq hist nil) + (if evil-ex-expression + (eval evil-ex-expression) + (user-error "Ex: syntax error"))))))))) + +(defun evil-ex-call-command (range command argument) + "Execute the given command COMMAND." + (let* ((count (when (numberp range) range)) + (range (when (evil-range-p range) range)) + (bang (and (save-match-data (string-match ".!$" command)) t)) + (evil-ex-point (point)) + (evil-ex-range + (or range (and count (evil-ex-range count count)))) + (evil-ex-command (evil-ex-completed-binding command)) + (restore-point (when (evil-get-command-property evil-ex-command :restore-point) + (min (point) (or (mark) most-positive-fixnum)))) + (evil-ex-bang (and bang t)) + (evil-ex-argument (copy-sequence argument)) + (evil-this-type (evil-type evil-ex-range)) + (current-prefix-arg count) + (prefix-arg current-prefix-arg)) + (when (stringp evil-ex-argument) + (set-text-properties + 0 (length evil-ex-argument) nil evil-ex-argument)) + (let ((buf (current-buffer))) + (unwind-protect + (cond + ((not evil-ex-range) + (setq this-command evil-ex-command) + (evil-exit-visual-state) + (run-hooks 'pre-command-hook) + (call-interactively evil-ex-command) + (run-hooks 'post-command-hook)) + (t + ;; set visual selection to match the region if an explicit + ;; range has been specified + (let ((ex-range (evil-copy-range evil-ex-range)) + beg end) + (evil-expand-range ex-range) + (setq beg (evil-range-beginning ex-range) + end (evil-range-end ex-range)) + (evil-sort beg end) + (setq this-command evil-ex-command) + (run-hooks 'pre-command-hook) + (set-mark end) + (goto-char beg) + (activate-mark) + (call-interactively evil-ex-command) + (run-hooks 'post-command-hook) + (when restore-point (goto-char restore-point))))) + (when (buffer-live-p buf) + (with-current-buffer buf + (deactivate-mark))))))) + +(defun evil-ex-line (base &optional offset) + "Return the line number of BASE plus OFFSET." + (+ (or base (line-number-at-pos)) + (or offset 0))) + +(defun evil-ex-first-line () + "Return the line number of the first line." + (line-number-at-pos (point-min))) + +(defun evil-ex-current-line () + "Return the line number of the current line." + (line-number-at-pos (point))) + +(defun evil-ex-last-line () + "Return the line number of the last line." + (save-excursion + (goto-char (point-max)) + (when (bolp) + (forward-line -1)) + (line-number-at-pos))) + +(defun evil-ex-range (beg-line &optional end-line) + "Returns the first and last position of the current range." + (evil-range + (evil-line-position beg-line) + (evil-line-position (or end-line beg-line) -1) + 'line + :expanded t)) + +(defun evil-ex-full-range () + "Return a range encompassing the whole buffer." + (evil-range (point-min) (point-max) 'line)) + +(defun evil-ex-last-visual-range () + "Return a linewise range of the last visual selection." + (evil-line-expand evil-visual-mark evil-visual-point)) + +(defun evil-ex-marker (marker) + "Return MARKER's line number in the current buffer. +Signal an error if MARKER is in a different buffer." + (when (stringp marker) + (setq marker (aref marker 0))) + (setq marker (evil-get-marker marker)) + (if (numberp marker) + (line-number-at-pos marker) + (user-error "Ex does not support markers in other files"))) + +(defun evil-ex-char-marker-range (beg end) + (when (stringp beg) (setq beg (aref beg 0))) + (when (stringp end) (setq end (aref end 0))) + (setq beg (evil-get-marker beg) + end (evil-get-marker end)) + (if (and (numberp beg) (numberp end)) + (evil-expand-range + (evil-range beg end + (if (evil-visual-state-p) + (evil-visual-type) + 'inclusive))) + (user-error "Ex does not support markers in other files"))) + +(defun evil-ex-re-fwd (pattern) + "Search forward for PATTERN. +Returns the line number of the match." + (condition-case err + (save-match-data + (save-excursion + (set-text-properties 0 (length pattern) nil pattern) + (evil-move-end-of-line) + (if (re-search-forward pattern nil t) + (line-number-at-pos (1- (match-end 0))) + (goto-char (point-min)) + (and (re-search-forward pattern nil t) + (line-number-at-pos (1- (match-end 0))))))) + (invalid-regexp + (evil-ex-echo (cadr err)) + nil))) + +(defun evil-ex-re-bwd (pattern) + "Search backward for PATTERN. +Returns the line number of the match." + (condition-case err + (save-match-data + (save-excursion + (set-text-properties 0 (length pattern) nil pattern) + (evil-move-beginning-of-line) + (if (re-search-backward pattern nil t) + (line-number-at-pos (match-beginning 0)) + (goto-char (point-max)) + (and (re-search-backward pattern nil t) + (line-number-at-pos (match-beginning 0)))))) + (invalid-regexp + (evil-ex-echo (cadr err)) + nil))) + +(defun evil-ex-prev-search () + (error "Previous search not yet implemented")) + +(defun evil-ex-signed-number (sign &optional number) + "Return a signed number like -3 and +1. +NUMBER defaults to 1." + (funcall sign (or number 1))) + +;; function `evil-ex-eval' has been superseded by `evil-ex-parse' plus `eval' +(make-obsolete 'evil-ex-eval 'evil-ex-parse "1.2.14") + +(defun evil-ex-parse (string &optional syntax start) + "Parse STRING as an Ex expression and return an evaluation tree. +If SYNTAX is non-nil, return a syntax tree instead. +START is the start symbol, which defaults to `expression'." + (let* ((start (or start (car-safe (car-safe evil-ex-grammar)))) + (match (evil-parser + string start evil-ex-grammar t syntax))) + (car-safe match))) + +(defun evil-ex-parse-command (string) + "Parse STRING as an Ex binding." + (let ((result (evil-parser string 'binding evil-ex-grammar)) + bang command) + (when result + (setq command (car-safe result) + string (cdr-safe result)) + ;; check whether the parsed command is followed by a slash, dash + ;; or number and either the part before is NOT known to be a binding, + ;; or the complete string IS known to be a binding + (when (and (> (length string) 0) + (string-match-p "^[-/[:digit:]]" string) + (or (evil-ex-binding (concat command string) t) + (not (evil-ex-binding command t)))) + (setq result (evil-parser (concat command string) + 'emacs-binding + evil-ex-grammar) + command (car-safe result) + string (cdr-safe result))) + ;; parse a following "!" as bang only if + ;; the command has the property :ex-bang t + (when (evil-ex-command-force-p command) + (setq result (evil-parser string 'bang evil-ex-grammar) + bang (or (car-safe result) "") + string (cdr-safe result) + command (concat command bang))) + (cons command string)))) + +(defun evil-ex-command-force-p (command) + "Whether COMMAND accepts the bang argument." + (let ((binding (evil-ex-completed-binding command t))) + (when binding + (evil-get-command-property binding :ex-bang)))) + +(defun evil-flatten-syntax-tree (tree) + "Find all paths from the root of TREE to its leaves. +TREE is a syntax tree, i.e., all its leave nodes are strings. +The `nth' element in the result is the syntactic context +for the corresponding string index (counted from zero)." + (let* ((result nil) + (traverse nil) + (traverse + #'(lambda (tree path) + (if (stringp tree) + (dotimes (char (length tree)) + (push path result)) + (let ((path (cons (car tree) path))) + (dolist (subtree (cdr tree)) + (funcall traverse subtree path))))))) + (funcall traverse tree nil) + (nreverse result))) + +(defun evil-ex-syntactic-context (&optional pos) + "Return the syntactical context of the character at POS. +POS defaults to the current position of point." + (let* ((contexts (evil-flatten-syntax-tree evil-ex-tree)) + (length (length contexts)) + (pos (- (or pos (point)) (minibuffer-prompt-end)))) + (when (>= pos length) + (setq pos (1- length))) + (when (< pos 0) + (setq pos 0)) + (when contexts + (nth pos contexts)))) + +(defun evil-parser--dexp (obj) + "Parse a numerical dollar-sign symbol. +Given e.g. $4, return 4." + (when (symbolp obj) + (let ((str (symbol-name obj))) + (save-match-data + (when (string-match "\\$\\([0-9]+\\)" str) + (string-to-number (match-string 1 str))))))) + +(defun evil-parser--dval (obj result) + "Substitute all dollar-sign symbols in OBJ. +Each dollar-sign symbol is replaced with the corresponding +element in RESULT, so that $1 becomes the first element, etc. +The special value $0 is substituted with the whole list RESULT. +If RESULT is not a list, all dollar-sign symbols are substituted with +RESULT." + (if (listp obj) + (mapcar (lambda (obj) (evil-parser--dval obj result)) obj) + (let ((num (evil-parser--dexp obj))) + (if num + (if (not (listp result)) + result + (if (eq num 0) + `(list ,@result) + (nth (1- num) result))) + obj)))) + +(defun evil-parser (string symbol grammar &optional greedy syntax) + "Parse STRING as a SYMBOL in GRAMMAR. +If GREEDY is non-nil, the whole of STRING must match. +If the parse succeeds, the return value is a cons cell +\(RESULT . TAIL), where RESULT is a parse tree and TAIL is +the remainder of STRING. Otherwise, the return value is nil. + +GRAMMAR is an association list of symbols and their definitions. +A definition is either a list of production rules, which are +tried in succession, or a #'-quoted function, which is called +to parse the input. + +A production rule can be one of the following: + + nil matches the empty string. + A regular expression matches a substring. + A symbol matches a production for that symbol. + (X Y) matches X followed by Y. + (\\? X) matches zero or one of X. + (* X) matches zero or more of X. + (+ X) matches one or more of X. + (& X) matches X, but does not consume. + (! X) matches anything but X, but does not consume. + +Thus, a simple grammar may look like: + + ((plus \"\\\\+\") ; plus <- \"+\" + (minus \"-\") ; minus <- \"-\" + (operator plus minus)) ; operator <- plus / minus + +All input-consuming rules have a value. A regular expression evaluates +to the text matched, while a list evaluates to a list of values. +The value of a list may be overridden with a semantic action, which is +specified with a #'-quoted expression at the end: + + (X Y #'foo) + +The value of this rule is the result of calling foo with the values +of X and Y as arguments. Alternatively, the function call may be +specified explicitly: + + (X Y #'(foo $1 $2)) + +Here, $1 refers to X and $2 refers to Y. $0 refers to the whole list. +Dollar expressions can also be used directly: + + (X Y #'$1) + +This matches X followed by Y, but ignores the value of Y; +the value of the list is the same as the value of X. + +If the SYNTAX argument is non-nil, then all semantic actions +are ignored, and a syntax tree is constructed instead. The +syntax tree obeys the property that all the leave nodes are +parts of the input string. Thus, by traversing the syntax tree, +one can determine how each character was parsed. + +The following symbols have reserved meanings within a grammar: +`\\?', `*', `+', `&', `!', `function', `alt', `seq' and nil." + (let ((string (or string "")) + func pair result rules tail) + (cond + ;; epsilon + ((member symbol '("" nil)) + (setq pair (cons (if syntax "" nil) string))) + ;; token + ((stringp symbol) + (save-match-data + (when (or (eq (string-match symbol string) 0) + ;; ignore leading whitespace + (and (eq (string-match "^[ \f\t\n\r\v]+" string) 0) + (eq (match-end 0) + (string-match + symbol string (match-end 0))))) + (setq result (match-string 0 string) + tail (substring string (match-end 0)) + pair (cons result tail)) + (when (and syntax pair) + (setq result (substring string 0 + (- (length string) + (length tail)))) + (setcar pair result))))) + ;; symbol + ((symbolp symbol) + (let ((context symbol)) + (setq rules (cdr-safe (assq symbol grammar))) + (setq pair (evil-parser string `(alt ,@rules) + grammar greedy syntax)) + (when (and syntax pair) + (setq result (car pair)) + (if (and (listp result) (sequencep (car result))) + (setq result `(,symbol ,@result)) + (setq result `(,symbol ,result))) + (setcar pair result)))) + ;; function + ((eq (car-safe symbol) 'function) + (setq symbol (cadr symbol) + pair (funcall symbol string)) + (when (and syntax pair) + (setq tail (or (cdr pair) "") + result (substring string 0 + (- (length string) + (length tail)))) + (setcar pair result))) + ;; list + ((listp symbol) + (setq rules symbol + symbol (car-safe rules)) + (if (memq symbol '(& ! \? * + alt seq)) + (setq rules (cdr rules)) + (setq symbol 'seq)) + (when (and (memq symbol '(+ alt seq)) + (> (length rules) 1)) + (setq func (car (last rules))) + (if (eq (car-safe func) 'function) + (setq rules (delq func (copy-sequence rules)) + func (cadr func)) + (setq func nil))) + (cond + ;; positive lookahead + ((eq symbol '&) + (when (evil-parser string rules grammar greedy syntax) + (setq pair (evil-parser string nil grammar nil syntax)))) + ;; negative lookahead + ((eq symbol '!) + (unless (evil-parser string rules grammar greedy syntax) + (setq pair (evil-parser string nil grammar nil syntax)))) + ;; zero or one + ((eq symbol '\?) + (setq rules (if (> (length rules) 1) + `(alt ,rules nil) + `(alt ,@rules nil)) + pair (evil-parser string rules grammar greedy syntax))) + ;; zero or more + ((eq symbol '*) + (setq rules `(alt (+ ,@rules) nil) + pair (evil-parser string rules grammar greedy syntax))) + ;; one or more + ((eq symbol '+) + (let (current results) + (catch 'done + (while (setq current (evil-parser + string rules grammar nil syntax)) + (setq result (car-safe current) + tail (or (cdr-safe current) "") + results (append results (if syntax result + (cdr-safe result)))) + ;; stop if stuck + (if (equal string tail) + (throw 'done nil) + (setq string tail)))) + (when results + (setq func (or func 'list) + pair (cons results tail))))) + ;; alternatives + ((eq symbol 'alt) + (catch 'done + (dolist (rule rules) + (when (setq pair (evil-parser + string rule grammar greedy syntax)) + (throw 'done pair))))) + ;; sequence + (t + (setq func (or func 'list)) + (let ((last (car-safe (last rules))) + current results rule) + (catch 'done + (while rules + (setq rule (pop rules) + current (evil-parser string rule grammar + (when greedy + (null rules)) + syntax)) + (cond + ((null current) + (setq results nil) + (throw 'done nil)) + (t + (setq result (car-safe current) + tail (cdr-safe current)) + (unless (memq (car-safe rule) '(& !)) + (if (and syntax + (or (null result) + (and (listp result) + (listp rule) + ;; splice in single-element + ;; (\? ...) expressions + (not (and (eq (car-safe rule) '\?) + (eq (length rule) 2)))))) + (setq results (append results result)) + (setq results (append results (list result))))) + (setq string (or tail "")))))) + (when results + (setq pair (cons results tail)))))) + ;; semantic action + (when (and pair func (not syntax)) + (setq result (car pair)) + (cond + ((null func) + (setq result nil)) + ;; lambda function + ((eq (car-safe func) 'lambda) + (if (memq symbol '(+ seq)) + (setq result `(funcall ,func ,@result)) + (setq result `(funcall ,func ,result)))) + ;; string replacement + ((or (stringp func) (stringp (car-safe func))) + (let* ((symbol (or (car-safe (cdr-safe func)) + (and (boundp 'context) context) + (car-safe (car-safe grammar)))) + (string (if (stringp func) func (car-safe func)))) + (setq result (car-safe (evil-parser string symbol grammar + greedy syntax))))) + ;; dollar expression + ((evil-parser--dexp func) + (setq result (evil-parser--dval func result))) + ;; function call + ((listp func) + (setq result (evil-parser--dval func result))) + ;; symbol + (t + (if (memq symbol '(+ seq)) + (setq result `(,func ,@result)) + (setq result `(,func ,result))))) + (setcar pair result)))) + ;; weed out incomplete matches + (when pair + (if (not greedy) pair + (if (null (cdr pair)) pair + ;; ignore trailing whitespace + (when (save-match-data (string-match "^[ \f\t\n\r\v]*$" (cdr pair))) + (unless syntax (setcdr pair nil)) + pair)))))) + +(provide 'evil-ex) + +;;; evil-ex.el ends here diff --git a/elpa/evil-20220510.2302/evil-ex.elc b/elpa/evil-20220510.2302/evil-ex.elc Binary files differnew file mode 100644 index 0000000..b3a1118 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-ex.elc diff --git a/elpa/evil-20220510.2302/evil-integration.el b/elpa/evil-20220510.2302/evil-integration.el new file mode 100644 index 0000000..03fc3cf --- /dev/null +++ b/elpa/evil-20220510.2302/evil-integration.el @@ -0,0 +1,511 @@ +;;; evil-integration.el --- Integrate Evil with other modules -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This provides evil integration for various emacs modes. +;; Additional keybindings (or default state) should go into evil-keybindings.el. + +;;; Code: + +(require 'evil-maps) +(require 'evil-core) +(require 'evil-macros) +(require 'evil-types) +(require 'evil-repeat) + +;;; Evilize some commands + +;; unbound keys should be ignored +(evil-declare-ignore-repeat 'undefined) + +(mapc #'(lambda (cmd) + (evil-set-command-property cmd :keep-visual t) + (evil-declare-not-repeat cmd)) + '(digit-argument + negative-argument + universal-argument + universal-argument-minus + universal-argument-more + universal-argument-other-key)) +(mapc #'evil-declare-not-repeat + '(what-cursor-position)) +(mapc #'evil-declare-change-repeat + '(dabbrev-expand + hippie-expand + quoted-insert)) +(mapc #'evil-declare-abort-repeat + '(balance-windows + eval-expression + execute-extended-command + exit-minibuffer + compile + delete-window + delete-other-windows + find-file-at-point + ffap-other-window + recompile + redo + save-buffer + split-window + split-window-horizontally + split-window-vertically + undo + undo-tree-redo + undo-tree-undo)) + +(evil-set-type #'previous-line 'line) +(evil-set-type #'next-line 'line) + +(dolist (cmd '(keyboard-quit keyboard-escape-quit)) + (evil-set-command-property cmd :suppress-operator t)) + +;;; Mouse +(evil-declare-insert-at-point-repeat 'mouse-yank-primary) +(evil-declare-insert-at-point-repeat 'mouse-yank-secondary) + +;;; key-binding + +;; Calling `keyboard-quit' should cancel repeat +(defadvice keyboard-quit (before evil activate) + (when (fboundp 'evil-repeat-abort) + (evil-repeat-abort))) + +(eval-after-load 'wdired + '(progn + (add-hook 'wdired-mode-hook #'evil-change-to-initial-state) + (defadvice wdired-change-to-dired-mode (after evil activate) + (evil-change-to-initial-state nil t)))) + +;;; Parentheses + +(defadvice show-paren-function (around evil disable) + "Match parentheses in Normal state." + (if (if (memq 'not evil-highlight-closing-paren-at-point-states) + (memq evil-state evil-highlight-closing-paren-at-point-states) + (not (memq evil-state evil-highlight-closing-paren-at-point-states))) + ad-do-it + (let ((pos (point)) syntax narrow) + (setq pos + (catch 'end + (dotimes (var (1+ (* 2 evil-show-paren-range))) + (if (zerop (mod var 2)) + (setq pos (+ pos var)) + (setq pos (- pos var))) + (setq syntax (syntax-class (syntax-after pos))) + (cond + ((eq syntax 4) + (setq narrow pos) + (throw 'end pos)) + ((eq syntax 5) + (throw 'end (1+ pos))))))) + (if pos + (save-excursion + (goto-char pos) + (save-restriction + (when narrow + (narrow-to-region narrow (point-max))) + ad-do-it)) + ;; prevent the preceding pair from being highlighted + (dolist (ov '(show-paren--overlay + show-paren--overlay-1 + show-paren-overlay + show-paren-overlay-1)) + (let ((ov (and (boundp ov) (symbol-value ov)))) + (when (overlayp ov) (delete-overlay ov)))))))) + +;;; Undo tree +(eval-after-load 'undo-tree + '(with-no-warnings + (defadvice undo-tree-visualize (after evil activate) + "Initialize Evil in the visualization buffer." + (when evil-local-mode + (evil-initialize-state))) + + (when (fboundp 'undo-tree-visualize) + (evil-ex-define-cmd "undol[ist]" 'undo-tree-visualize) + (evil-ex-define-cmd "ul" 'undo-tree-visualize)) + + (when (boundp 'undo-tree-visualizer-mode-map) + (define-key undo-tree-visualizer-mode-map + [remap evil-backward-char] 'undo-tree-visualize-switch-branch-left) + (define-key undo-tree-visualizer-mode-map + [remap evil-forward-char] 'undo-tree-visualize-switch-branch-right) + (define-key undo-tree-visualizer-mode-map + [remap evil-next-line] 'undo-tree-visualize-redo) + (define-key undo-tree-visualizer-mode-map + [remap evil-previous-line] 'undo-tree-visualize-undo) + (define-key undo-tree-visualizer-mode-map + [remap evil-ret] 'undo-tree-visualizer-set)) + + (when (boundp 'undo-tree-visualizer-selection-mode-map) + (define-key undo-tree-visualizer-selection-mode-map + [remap evil-backward-char] 'undo-tree-visualizer-select-left) + (define-key undo-tree-visualizer-selection-mode-map + [remap evil-forward-char] 'undo-tree-visualizer-select-right) + (define-key undo-tree-visualizer-selection-mode-map + [remap evil-next-line] 'undo-tree-visualizer-select-next) + (define-key undo-tree-visualizer-selection-mode-map + [remap evil-previous-line] 'undo-tree-visualizer-select-previous) + (define-key undo-tree-visualizer-selection-mode-map + [remap evil-ret] 'undo-tree-visualizer-set)))) + +;;; Auto-complete +(eval-after-load 'auto-complete + '(progn + (evil-add-command-properties 'auto-complete :repeat 'evil-ac-repeat) + (evil-add-command-properties 'ac-complete :repeat 'evil-ac-repeat) + (evil-add-command-properties 'ac-expand :repeat 'evil-ac-repeat) + (evil-add-command-properties 'ac-next :repeat 'ignore) + (evil-add-command-properties 'ac-previous :repeat 'ignore) + + (defvar evil-ac-prefix-len nil + "The length of the prefix of the current item to be completed.") + + (defvar ac-prefix) + (defun evil-ac-repeat (flag) + "Record the changes for auto-completion." + (cond + ((eq flag 'pre) + (setq evil-ac-prefix-len (length ac-prefix)) + (evil-repeat-start-record-changes)) + ((eq flag 'post) + ;; Add change to remove the prefix + (evil-repeat-record-change (- evil-ac-prefix-len) + "" + evil-ac-prefix-len) + ;; Add change to insert the full completed text + (evil-repeat-record-change + (- evil-ac-prefix-len) + (buffer-substring-no-properties (- evil-repeat-pos + evil-ac-prefix-len) + (point)) + 0) + ;; Finish repeation + (evil-repeat-finish-record-changes)))))) + +;;; Company +(eval-after-load 'company + '(progn + (mapc #'evil-declare-change-repeat + '(company-complete-mouse + company-complete-number + company-complete-selection + company-complete-common)) + + (mapc #'evil-declare-ignore-repeat + '(company-abort + company-select-next + company-select-previous + company-select-next-or-abort + company-select-previous-or-abort + company-select-mouse + company-show-doc-buffer + company-show-location + company-search-candidates + company-filter-candidates)))) + +;; Eval last sexp +(cond + ((version< emacs-version "25") + (defadvice preceding-sexp (around evil activate) + "In normal-state or motion-state, last sexp ends at point." + (if (and (not evil-move-beyond-eol) + (or (evil-normal-state-p) (evil-motion-state-p))) + (save-excursion + (unless (or (eobp) (eolp)) (forward-char)) + ad-do-it) + ad-do-it)) + + (defadvice pp-last-sexp (around evil activate) + "In normal-state or motion-state, last sexp ends at point." + (if (and (not evil-move-beyond-eol) + (or (evil-normal-state-p) (evil-motion-state-p))) + (save-excursion + (unless (or (eobp) (eolp)) (forward-char)) + ad-do-it) + ad-do-it))) + (t + (defun evil--preceding-sexp (command &rest args) + "In normal-state or motion-state, last sexp ends at point." + (if (and (not evil-move-beyond-eol) + (or (evil-normal-state-p) (evil-motion-state-p))) + (save-excursion + (unless (or (eobp) (eolp)) (forward-char)) + (apply command args)) + (apply command args))) + + (advice-add 'elisp--preceding-sexp :around 'evil--preceding-sexp '((name . evil))) + (advice-add 'pp-last-sexp :around 'evil--preceding-sexp '((name . evil))))) + +;; Show key +(defadvice quail-show-key (around evil activate) + "Temporarily go to Emacs state" + (evil-with-state emacs ad-do-it)) + +(defadvice describe-char (around evil activate) + "Temporarily go to Emacs state" + (evil-with-state emacs ad-do-it)) + +;; ace-jump-mode +(declare-function ace-jump-char-mode "ext:ace-jump-mode") +(declare-function ace-jump-word-mode "ext:ace-jump-mode") +(declare-function ace-jump-line-mode "ext:ace-jump-mode") +(defvar ace-jump-mode-scope) + +(defvar evil-ace-jump-active nil) + +(defmacro evil-enclose-ace-jump-for-motion (&rest body) + "Enclose ace-jump to make it suitable for motions. +This includes restricting `ace-jump-mode' to the current window +in visual and operator state, deactivating visual updates, saving +the mark and entering `recursive-edit'." + (declare (indent defun) + (debug t)) + `(let ((old-mark (mark)) + (ace-jump-mode-scope + (if (and (not (memq evil-state '(visual operator))) + (boundp 'ace-jump-mode-scope)) + ace-jump-mode-scope + 'window))) + (remove-hook 'pre-command-hook #'evil-visual-pre-command t) + (remove-hook 'post-command-hook #'evil-visual-post-command t) + (unwind-protect + (let ((evil-ace-jump-active 'prepare)) + (add-hook 'ace-jump-mode-end-hook + #'evil-ace-jump-exit-recursive-edit) + ,@body + (when evil-ace-jump-active + (setq evil-ace-jump-active t) + (recursive-edit))) + (remove-hook 'post-command-hook + #'evil-ace-jump-exit-recursive-edit) + (remove-hook 'ace-jump-mode-end-hook + #'evil-ace-jump-exit-recursive-edit) + (if (evil-visual-state-p) + (progn + (add-hook 'pre-command-hook #'evil-visual-pre-command nil t) + (add-hook 'post-command-hook #'evil-visual-post-command nil t) + (set-mark old-mark)) + (push-mark old-mark))))) + +(eval-after-load 'ace-jump-mode + `(defadvice ace-jump-done (after evil activate) + (when evil-ace-jump-active + (add-hook 'post-command-hook #'evil-ace-jump-exit-recursive-edit)))) + +(defun evil-ace-jump-exit-recursive-edit () + "Exit a recursive edit caused by an evil jump." + (cond + ((eq evil-ace-jump-active 'prepare) + (setq evil-ace-jump-active nil)) + (evil-ace-jump-active + (remove-hook 'post-command-hook #'evil-ace-jump-exit-recursive-edit) + (exit-recursive-edit)))) + +(evil-define-motion evil-ace-jump-char-mode (count) + "Jump visually directly to a char using ace-jump." + :type inclusive + (evil-without-repeat + (let ((pnt (point)) + (buf (current-buffer))) + (evil-enclose-ace-jump-for-motion + (call-interactively 'ace-jump-char-mode)) + ;; if we jump backwards, motion type is exclusive, analogously + ;; to `evil-find-char-backward' + (when (and (equal buf (current-buffer)) + (< (point) pnt)) + (setq evil-this-type + (cond + ((eq evil-this-type 'exclusive) 'inclusive) + ((eq evil-this-type 'inclusive) 'exclusive))))))) + +(evil-define-motion evil-ace-jump-char-to-mode (count) + "Jump visually to the char in front of a char using ace-jump." + :type inclusive + (evil-without-repeat + (let ((pnt (point)) + (buf (current-buffer))) + (evil-enclose-ace-jump-for-motion + (call-interactively 'ace-jump-char-mode)) + (if (and (equal buf (current-buffer)) + (< (point) pnt)) + (progn + (or (eobp) (forward-char)) + (setq evil-this-type + (cond + ((eq evil-this-type 'exclusive) 'inclusive) + ((eq evil-this-type 'inclusive) 'exclusive)))) + (backward-char))))) + +(evil-define-motion evil-ace-jump-line-mode (count) + "Jump visually to the beginning of a line using ace-jump." + :type line + :repeat abort + (evil-without-repeat + (evil-enclose-ace-jump-for-motion + (call-interactively 'ace-jump-line-mode)))) + +(evil-define-motion evil-ace-jump-word-mode (count) + "Jump visually to the beginning of a word using ace-jump." + :type exclusive + :repeat abort + (evil-without-repeat + (evil-enclose-ace-jump-for-motion + (call-interactively 'ace-jump-word-mode)))) + +(define-key evil-motion-state-map [remap ace-jump-char-mode] #'evil-ace-jump-char-mode) +(define-key evil-motion-state-map [remap ace-jump-line-mode] #'evil-ace-jump-line-mode) +(define-key evil-motion-state-map [remap ace-jump-word-mode] #'evil-ace-jump-word-mode) + +;;; avy +(declare-function avy-goto-word-or-subword-1 "ext:avy") +(declare-function avy-goto-line "ext:avy") +(declare-function avy-goto-char "ext:avy") +(declare-function avy-goto-char-2 "ext:avy") +(declare-function avy-goto-char-2-above "ext:avy") +(declare-function avy-goto-char-2-below "ext:avy") +(declare-function avy-goto-char-in-line "ext:avy") +(declare-function avy-goto-word-0 "ext:avy") +(declare-function avy-goto-word-1 "ext:avy") +(declare-function avy-goto-word-1-above "ext:avy") +(declare-function avy-goto-word-1-below "ext:avy") +(declare-function avy-goto-subword-0 "ext:avy") +(declare-function avy-goto-subword-1 "ext:avy") +(declare-function avy-goto-char-timer "ext:avy") +(defvar avy-all-windows) + +(defmacro evil-enclose-avy-for-motion (&rest body) + "Enclose avy to make it suitable for motions. +Based on `evil-enclose-ace-jump-for-motion'." + (declare (indent defun) + (debug t)) + `(let ((avy-all-windows + (if (and (not (memq evil-state '(visual operator))) + (boundp 'avy-all-windows)) + avy-all-windows + nil))) + ,@body)) + +(defmacro evil-define-avy-motion (command type) + (declare (indent defun) + (debug t)) + (let ((name (intern (format "evil-%s" command)))) + `(evil-define-motion ,name (count) + ,(format "Evil motion for `%s'." command) + :type ,type + :jump t + :repeat abort + (evil-without-repeat + (evil-enclose-avy-for-motion + (call-interactively ',command)))))) + +;; define evil-avy-* motion commands for avy-* commands +(evil-define-avy-motion avy-goto-char inclusive) +(evil-define-avy-motion avy-goto-char-2 inclusive) +(evil-define-avy-motion avy-goto-char-2-above inclusive) +(evil-define-avy-motion avy-goto-char-2-below inclusive) +(evil-define-avy-motion avy-goto-char-in-line inclusive) +(evil-define-avy-motion avy-goto-char-timer inclusive) +(evil-define-avy-motion avy-goto-line line) +(evil-define-avy-motion avy-goto-line-above line) +(evil-define-avy-motion avy-goto-line-below line) +(evil-define-avy-motion avy-goto-subword-0 exclusive) +(evil-define-avy-motion avy-goto-subword-1 exclusive) +(evil-define-avy-motion avy-goto-symbol-1 exclusive) +(evil-define-avy-motion avy-goto-symbol-1-above exclusive) +(evil-define-avy-motion avy-goto-symbol-1-below exclusive) +(evil-define-avy-motion avy-goto-word-0 exclusive) +(evil-define-avy-motion avy-goto-word-1 exclusive) +(evil-define-avy-motion avy-goto-word-1-above exclusive) +(evil-define-avy-motion avy-goto-word-1-below exclusive) +(evil-define-avy-motion avy-goto-word-or-subword-1 exclusive) + +;; remap avy-* commands to evil-avy-* commands +(dolist (command '(avy-goto-char + avy-goto-char-2 + avy-goto-char-2-above + avy-goto-char-2-below + avy-goto-char-in-line + avy-goto-char-timer + avy-goto-line + avy-goto-line-above + avy-goto-line-below + avy-goto-subword-0 + avy-goto-subword-1 + avy-goto-symbol-1 + avy-goto-symbol-1-above + avy-goto-symbol-1-below + avy-goto-word-0 + avy-goto-word-1 + avy-goto-word-1-above + avy-goto-word-1-below + avy-goto-word-or-subword-1)) + (define-key evil-motion-state-map + (vector 'remap command) (intern-soft (format "evil-%s" command)))) + +;;; nXhtml/mumamo +;; ensure that mumamo does not toggle evil through its globalized mode +(eval-after-load 'mumamo + '(with-no-warnings + (push 'evil-mode-cmhh mumamo-change-major-mode-no-nos))) + +;; visual-line-mode integration +(when evil-respect-visual-line-mode + (evil-define-minor-mode-key 'motion 'visual-line-mode + "j" 'evil-next-visual-line + "gj" 'evil-next-line + "k" 'evil-previous-visual-line + "gk" 'evil-previous-line + "0" 'evil-beginning-of-visual-line + "g0" 'evil-beginning-of-line + "$" 'evil-end-of-visual-line + "g$" 'evil-end-of-line + "V" 'evil-visual-screen-line)) + +;;; abbrev.el +(defun evil-maybe-expand-abbrev () + (when (and abbrev-mode evil-want-abbrev-expand-on-insert-exit) + (expand-abbrev))) + +(eval-after-load 'abbrev + '(add-hook 'evil-insert-state-exit-hook 'evil-maybe-expand-abbrev)) + +;;; ElDoc +(eval-after-load 'eldoc + '(when (fboundp 'eldoc-add-command-completions) + (eldoc-add-command-completions "evil-window-"))) + +;;; XRef +(eval-after-load 'xref + '(progn + (evil-set-command-property 'xref-find-definitions :jump t) + (evil-set-command-property 'xref-find-references :jump t))) + +(provide 'evil-integration) + +;;; evil-integration.el ends here diff --git a/elpa/evil-20220510.2302/evil-integration.elc b/elpa/evil-20220510.2302/evil-integration.elc Binary files differnew file mode 100644 index 0000000..fbf91bd --- /dev/null +++ b/elpa/evil-20220510.2302/evil-integration.elc diff --git a/elpa/evil-20220510.2302/evil-jumps.el b/elpa/evil-20220510.2302/evil-jumps.el new file mode 100644 index 0000000..fea2e43 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-jumps.el @@ -0,0 +1,354 @@ +;;; evil-jumps.el --- Jump list implementation -*- lexical-binding: t -*- + +;; Author: Bailey Ling <bling at live.ca> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'cl-lib) +(require 'evil-core) +(require 'evil-states) + +;;; Code: + +(defgroup evil-jumps nil + "Evil jump list configuration options." + :prefix "evil-jumps" + :group 'evil) + +(defcustom evil-jumps-cross-buffers t + "When non-nil, the jump commands can cross borders between buffers, otherwise the jump commands act only within the current buffer." + :type 'boolean + :group 'evil-jumps) + +(defcustom evil-jumps-max-length 100 + "The maximum number of jumps to keep track of." + :type 'integer + :group 'evil-jumps) + +(defcustom evil-jumps-pre-jump-hook nil + "Hooks to run just before jumping to a location in the jump list." + :type 'hook + :group 'evil-jumps) + +(defcustom evil-jumps-post-jump-hook nil + "Hooks to run just after jumping to a location in the jump list." + :type 'hook + :group 'evil-jumps) + +(defcustom evil-jumps-ignored-file-patterns '("COMMIT_EDITMSG$" "TAGS$") + "A list of pattern regexps to match on the file path to exclude from being included in the jump list." + :type '(repeat string) + :group 'evil-jumps) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar savehist-additional-variables) + +(defvar evil--jumps-jumping nil) + +(defvar evil--jumps-jumping-backward nil + "Set by `evil--jump-backward', used and cleared in the +`post-command-hook' by `evil--jump-handle-buffer-crossing'") + +(eval-when-compile (defvar evil--jumps-debug nil)) + +(defvar evil--jumps-buffer-targets "\\*\\(new\\|scratch\\)\\*" + "Regexp to match against `buffer-name' to determine whether it's a valid jump target.") + +(defvar evil--jumps-window-jumps (make-hash-table) + "Hashtable which stores all jumps on a per window basis.") + +(defvar evil-jumps-history nil + "History of `evil-mode' jumps that are persisted with `savehist'.") + +(cl-defstruct evil-jumps-struct + ring + (idx -1) + previous-pos) + +;; Is inlining this really worth it? +(defsubst evil--jumps-message (format &rest args) + (when (eval-when-compile evil--jumps-debug) + (with-current-buffer (get-buffer-create "*evil-jumps*") + (goto-char (point-max)) + (insert (apply #'format format args) "\n")))) + +(defun evil--jumps-get-current (&optional window) + (unless window + (setq window (frame-selected-window))) + (let* ((jump-struct (gethash window evil--jumps-window-jumps))) + (unless jump-struct + (setq jump-struct (make-evil-jumps-struct)) + (puthash window jump-struct evil--jumps-window-jumps)) + jump-struct)) + +(defun evil--jumps-get-jumps (struct) + (let ((ring (evil-jumps-struct-ring struct))) + (unless ring + (setq ring (make-ring evil-jumps-max-length)) + (setf (evil-jumps-struct-ring struct) ring)) + ring)) + +(defun evil--jumps-get-window-jump-list () + (let ((struct (evil--jumps-get-current))) + (evil--jumps-get-jumps struct))) + +(defun evil--jumps-savehist-load () + (add-to-list 'savehist-additional-variables 'evil-jumps-history) + (let ((ring (make-ring evil-jumps-max-length))) + (cl-loop for jump in (reverse evil-jumps-history) + do (ring-insert ring jump)) + (setf (evil-jumps-struct-ring (evil--jumps-get-current)) ring)) + (add-hook 'savehist-save-hook #'evil--jumps-savehist-sync) + (remove-hook 'savehist-mode-hook #'evil--jumps-savehist-load)) + +(defun evil--jumps-savehist-sync () + "Updates the printable value of window jumps for `savehist'." + (setq evil-jumps-history + (delq nil (mapcar #'(lambda (jump) + (let* ((mark (car jump)) + (pos (if (markerp mark) + (marker-position mark) + mark)) + (file-name (cadr jump))) + (when (and (not (file-remote-p file-name)) + (file-exists-p file-name) + pos) + (list pos file-name)))) + (ring-elements (evil--jumps-get-window-jump-list)))))) + +(defun evil--jumps-jump (idx shift) + (let ((target-list (evil--jumps-get-window-jump-list))) + (evil--jumps-message "jumping from %s by %s" idx shift) + (evil--jumps-message "target list = %s" target-list) + (setq idx (+ idx shift)) + (let* ((current-file-name (or (buffer-file-name) (buffer-name))) + (size (ring-length target-list))) + (unless evil-jumps-cross-buffers + ;; skip jump marks pointing to other buffers + (while (and (< idx size) (>= idx 0) + (not (string= current-file-name (cadr (ring-ref target-list idx))))) + (setq idx (+ idx shift)))) + (when (and (< idx size) (>= idx 0)) + ;; actual jump + (run-hooks 'evil-jumps-pre-jump-hook) + (let* ((place (ring-ref target-list idx)) + (pos (car place)) + (file-name (cadr place))) + (setq evil--jumps-jumping t) + (unless (string= current-file-name file-name) + (if (string-match-p evil--jumps-buffer-targets file-name) + (switch-to-buffer file-name) + (find-file file-name))) + (setq evil--jumps-jumping nil) + (goto-char pos) + (setf (evil-jumps-struct-idx (evil--jumps-get-current)) idx) + (run-hooks 'evil-jumps-post-jump-hook)))))) + +(defun evil--jumps-push () + "Pushes the current cursor/file position to the jump list." + (let ((target-list (evil--jumps-get-window-jump-list))) + (let ((file-name (buffer-file-name)) + (buffer-name (buffer-name)) + (current-pos (point-marker)) + (first-pos nil) + (first-file-name nil) + (excluded nil)) + (when (and (not file-name) + (string-match-p evil--jumps-buffer-targets buffer-name)) + (setq file-name buffer-name)) + (when file-name + (dolist (pattern evil-jumps-ignored-file-patterns) + (when (string-match-p pattern file-name) + (setq excluded t))) + (unless excluded + (unless (ring-empty-p target-list) + (setq first-pos (car (ring-ref target-list 0))) + (setq first-file-name (car (cdr (ring-ref target-list 0))))) + (unless (and (equal first-pos current-pos) + (equal first-file-name file-name)) + (evil--jumps-message "pushing %s on %s" current-pos file-name) + (ring-insert target-list `(,current-pos ,file-name)))))) + (evil--jumps-message "%s %s" + (selected-window) + (and (not (ring-empty-p target-list)) + (ring-ref target-list 0))))) + +(evil-define-command evil-show-jumps () + "Display the contents of the jump list." + :repeat nil + (evil-with-view-list + :name "evil-jumps" + :mode "Evil Jump List" + :format [("Jump" 5 nil) + ("Marker" 8 nil) + ("File/text" 1000 t)] + :entries (let* ((jumps (evil--jumps-savehist-sync)) + (count 0)) + (cl-loop for jump in jumps + collect `(nil [,(number-to-string (cl-incf count)) + ,(number-to-string (car jump)) + (,(cadr jump))]))) + :select-action #'evil--show-jumps-select-action)) + +(defun evil--show-jumps-select-action (jump) + (let ((position (string-to-number (elt jump 1))) + (file (car (elt jump 2)))) + (kill-buffer) + (switch-to-buffer (find-file file)) + (goto-char position))) + +(defun evil-set-jump (&optional pos) + "Set jump point at POS. +POS defaults to point." + (save-excursion + (when (markerp pos) + (set-buffer (marker-buffer pos))) + + (unless (or (region-active-p) (evil-visual-state-p)) + (push-mark pos t)) + + (unless evil--jumps-jumping + ;; clear out intermediary jumps when a new one is set + (let* ((struct (evil--jumps-get-current)) + (target-list (evil--jumps-get-jumps struct)) + (idx (evil-jumps-struct-idx struct))) + (cl-loop repeat idx + do (ring-remove target-list)) + (setf (evil-jumps-struct-idx struct) -1)) + (when pos + (goto-char pos)) + (evil--jumps-push)))) + +(defun evil--jump-backward (count) + (setq evil--jumps-jumping-backward t) + (let ((count (or count 1))) + (evil-motion-loop (nil count) + (let* ((struct (evil--jumps-get-current)) + (idx (evil-jumps-struct-idx struct))) + (evil--jumps-message "jumping back %s" idx) + (when (= idx -1) + (setq idx 0) + (setf (evil-jumps-struct-idx struct) 0) + (evil--jumps-push)) + (evil--jumps-jump idx 1))))) + +(defun evil--jump-forward (count) + (let ((count (or count 1))) + (evil-motion-loop (nil count) + (let* ((struct (evil--jumps-get-current)) + (idx (evil-jumps-struct-idx struct))) + (when (= idx -1) + (setq idx 0) + (setf (evil-jumps-struct-idx struct) 0) + (evil--jumps-push)) + (evil--jumps-jump idx -1))))) + +(defun evil--jumps-window-configuration-hook (&rest _args) + (let* ((window-list (window-list-1 nil nil t)) + (existing-window (selected-window)) + (new-window (previous-window))) + (when (and (not (eq existing-window new-window)) + (> (length window-list) 1)) + (let* ((target-jump-struct (evil--jumps-get-current new-window))) + (if (not (ring-empty-p (evil--jumps-get-jumps target-jump-struct))) + (evil--jumps-message "target window %s already has %s jumps" new-window + (ring-length (evil--jumps-get-jumps target-jump-struct))) + (evil--jumps-message "new target window detected; copying %s to %s" existing-window new-window) + (let* ((source-jump-struct (evil--jumps-get-current existing-window)) + (source-list (evil--jumps-get-jumps source-jump-struct))) + (when (= (ring-length (evil--jumps-get-jumps target-jump-struct)) 0) + (setf (evil-jumps-struct-previous-pos target-jump-struct) (evil-jumps-struct-previous-pos source-jump-struct)) + (setf (evil-jumps-struct-idx target-jump-struct) (evil-jumps-struct-idx source-jump-struct)) + (setf (evil-jumps-struct-ring target-jump-struct) (ring-copy source-list))))))) + ;; delete obsolete windows + (maphash (lambda (key _val) + (unless (member key window-list) + (evil--jumps-message "removing %s" key) + (remhash key evil--jumps-window-jumps))) + evil--jumps-window-jumps))) + +(defun evil--jump-hook (&optional command) + "`pre-command-hook' for evil-jumps. +Set jump point if COMMAND has a non-nil `:jump' property. Otherwise, +save the current position in case the command being executed will +change the current buffer." + (setq command (or command this-command)) + (if (evil-get-command-property command :jump) + (evil-set-jump) + (setf (evil-jumps-struct-previous-pos (evil--jumps-get-current)) + (point-marker)))) + +(defun evil--jump-handle-buffer-crossing () + (let ((jumping-backward evil--jumps-jumping-backward)) + (setq evil--jumps-jumping-backward nil) + (dolist (frame (frame-list)) + (dolist (window (window-list frame)) + (let* ((struct (evil--jumps-get-current window)) + (previous-pos (evil-jumps-struct-previous-pos struct))) + (when previous-pos + (setf (evil-jumps-struct-previous-pos struct) nil) + (if (and + ;; `evil-jump-backward' (and other backward jumping + ;; commands) needs to be handled specially. When + ;; jumping backward multiple times, calling + ;; `evil-set-jump' is always wrong: If you jump back + ;; twice and we call `evil-set-jump' after the second + ;; time, we clear the forward jump list and + ;; `evil--jump-forward' won't work. + + ;; The first time you jump backward, setting a jump + ;; point is sometimes correct. But we don't do it + ;; here because this function is called after + ;; `evil--jump-backward' has updated our position in + ;; the jump list so, again, `evil-set-jump' would + ;; break `evil--jump-forward'. + (not jumping-backward) + (let ((previous-buffer (marker-buffer previous-pos))) + (and previous-buffer + (not (eq previous-buffer (window-buffer window)))))) + (evil-set-jump previous-pos) + (set-marker previous-pos nil)))))))) + +(if (bound-and-true-p savehist-loaded) + (evil--jumps-savehist-load) + (add-hook 'savehist-mode-hook #'evil--jumps-savehist-load)) + +(defun evil--jumps-install-or-uninstall () + (if evil-local-mode + (progn + (add-hook 'pre-command-hook #'evil--jump-hook nil t) + (add-hook 'post-command-hook #'evil--jump-handle-buffer-crossing nil t) + (add-hook 'next-error-hook #'evil-set-jump nil t) + (add-hook 'window-configuration-change-hook #'evil--jumps-window-configuration-hook nil t)) + (remove-hook 'pre-command-hook #'evil--jump-hook t) + (remove-hook 'post-command-hook #'evil--jump-handle-buffer-crossing t) + (remove-hook 'next-error-hook #'evil-set-jump t) + (remove-hook 'window-configuration-change-hook #'evil--jumps-window-configuration-hook t) + (evil--jump-handle-buffer-crossing))) + +(add-hook 'evil-local-mode-hook #'evil--jumps-install-or-uninstall) + +(provide 'evil-jumps) + +;;; evil-jumps.el ends here diff --git a/elpa/evil-20220510.2302/evil-jumps.elc b/elpa/evil-20220510.2302/evil-jumps.elc Binary files differnew file mode 100644 index 0000000..bb988b8 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-jumps.elc diff --git a/elpa/evil-20220510.2302/evil-keybindings.el b/elpa/evil-20220510.2302/evil-keybindings.el new file mode 100644 index 0000000..baafaf8 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-keybindings.el @@ -0,0 +1,124 @@ +;;; evil-keybindings.el --- Add some Evil keybindings to other modules -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This provides a set of keybindings for other emacs modes. This also includes +;; setting up the initial evil state of those other modes. + +;;; Code: + +(require 'evil-maps) +(require 'evil-core) +(require 'evil-macros) +(require 'evil-types) +(require 'evil-repeat) + +;; etags-select +;; FIXME: probably etags-select should be recomended in docs +(eval-after-load 'etags-select + '(progn + (define-key evil-motion-state-map "g]" 'etags-select-find-tag-at-point))) + +;;; Buffer-menu + +(evil-add-hjkl-bindings Buffer-menu-mode-map 'motion) + +;; dictionary.el + +(evil-add-hjkl-bindings dictionary-mode-map 'motion + "?" 'dictionary-help ; "h" + "C-o" 'dictionary-previous) ; "l" + +;;; Dired + +(eval-after-load 'dired + '(progn + ;; use the standard Dired bindings as a base + (defvar dired-mode-map) + (evil-make-overriding-map dired-mode-map 'normal) + (evil-add-hjkl-bindings dired-mode-map 'normal + "J" 'dired-goto-file ; "j" + "K" 'dired-do-kill-lines ; "k" + "r" 'dired-do-redisplay ; "l" + ;; ":d", ":v", ":s", ":e" + ";" (lookup-key dired-mode-map ":")))) + +;;; ERT + +(evil-add-hjkl-bindings ert-results-mode-map 'motion) + +;;; Info + +(evil-add-hjkl-bindings Info-mode-map 'motion + "0" 'evil-beginning-of-line + (kbd "\M-h") 'Info-help ; "h" + "\C-t" 'Info-history-back ; "l" + "\C-o" 'Info-history-back + " " 'Info-scroll-up + "\C-]" 'Info-follow-nearest-node + (kbd "DEL") 'Info-scroll-down) + +;;; Speedbar + +(evil-add-hjkl-bindings speedbar-key-map 'motion + "h" 'backward-char + "j" 'speedbar-next + "k" 'speedbar-prev + "l" 'forward-char + "i" 'speedbar-item-info + "r" 'speedbar-refresh + "u" 'speedbar-up-directory + "o" 'speedbar-toggle-line-expansion + (kbd "RET") 'speedbar-edit-line) + +;; Ibuffer +(eval-after-load 'ibuffer + '(progn + (defvar ibuffer-mode-map) + (evil-make-overriding-map ibuffer-mode-map 'normal) + (evil-define-key 'normal ibuffer-mode-map + "j" 'evil-next-line + "k" 'evil-previous-line + "RET" 'ibuffer-visit-buffer))) + +;;; ag.el +(eval-after-load 'ag + '(progn + (defvar ag-mode-map) + (add-to-list 'evil-motion-state-modes 'ag-mode) + (evil-add-hjkl-bindings ag-mode-map 'motion))) + +;;; ELP + +(eval-after-load 'elp + '(defadvice elp-results (after evil activate) + (evil-motion-state))) + +(provide 'evil-keybindings) + +;;; evil-keybindings.el ends here diff --git a/elpa/evil-20220510.2302/evil-keybindings.elc b/elpa/evil-20220510.2302/evil-keybindings.elc Binary files differnew file mode 100644 index 0000000..738c977 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-keybindings.elc diff --git a/elpa/evil-20220510.2302/evil-macros.el b/elpa/evil-20220510.2302/evil-macros.el new file mode 100644 index 0000000..71bf122 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-macros.el @@ -0,0 +1,817 @@ +;;; evil-macros.el --- Macros -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-common) +(require 'evil-states) +(require 'evil-repeat) + +;;; Code: + +(declare-function evil-ex-p "evil-ex") + +;; set some error codes +(put 'beginning-of-line 'error-conditions '(beginning-of-line error)) +(put 'beginning-of-line 'error-message "Beginning of line") +(put 'end-of-line 'error-conditions '(end-of-line error)) +(put 'end-of-line 'error-message "End of line") + +(defun evil-motion-range (motion &optional count type) + "Execute a motion and return the buffer positions. +The return value is a list (BEG END TYPE)." + (let ((opoint (point)) + (omark (mark t)) + (obuffer (current-buffer)) + (evil-motion-marker (move-marker (make-marker) (point))) + range) + (evil-with-transient-mark-mode + (evil-narrow-to-field + (unwind-protect + (let ((current-prefix-arg count) + ;; Store type in global variable `evil-this-type'. + ;; If necessary, motions can change their type + ;; during execution by setting this variable. + (evil-this-type + (or type (evil-type motion 'exclusive)))) + (condition-case err + (let ((repeat-type (evil-repeat-type motion t))) + (if (functionp repeat-type) + (funcall repeat-type 'pre)) + (unless (with-local-quit + (setq range (call-interactively motion)) + t) + (evil-repeat-abort) + (setq quit-flag t)) + (if (functionp repeat-type) + (funcall repeat-type 'post))) + (error (prog1 nil + (evil-repeat-abort) + ;; some operators depend on succeeding + ;; motions, in particular for + ;; `evil-forward-char' (e.g., used by + ;; `evil-substitute'), therefore we let + ;; end-of-line and end-of-buffer pass + (if (not (memq (car err) '(end-of-line end-of-buffer))) + (signal (car err) (cdr err)) + (message (error-message-string err)))))) + (cond + ;; the motion returned a range + ((evil-range-p range)) + ;; the motion made a Visual selection + ((evil-visual-state-p) + (setq range (evil-visual-range))) + ;; the motion made an active region + ((region-active-p) + (setq range (evil-range (region-beginning) + (region-end) + evil-this-type))) + ;; default: range from previous position to current + (t + (setq range (evil-expand-range + (evil-normalize evil-motion-marker + (point) + evil-this-type))))) + (unless (or (null type) (eq (evil-type range) type)) + (evil-set-type range type) + (evil-expand-range range)) + (evil-set-range-properties range nil) + range) + ;; restore point and mark like `save-excursion', + ;; but only if the motion hasn't disabled the operator + (unless evil-inhibit-operator + (set-buffer obuffer) + (evil-move-mark omark) + (goto-char opoint)) + ;; delete marker so it doesn't slow down editing + (move-marker evil-motion-marker nil)))))) + +(defmacro evil-define-motion (motion args &rest body) + "Define a motion command MOTION. +ARGS is a list of arguments. Motions can have any number of +arguments, but the first (if any) has the predefined meaning of +count. BODY must execute the motion by moving point. + +Optional keyword arguments are: +- `:type' - determines how the motion works after an operator (one of + `inclusive', `line', `block' and `exclusive', or a self-defined + motion type) +- `:jump' - if non-nil, the previous position is stored in the jump + list, so that it can be restored with \ +\\<evil-motion-state-map>\\[evil-jump-backward] + +\(fn MOTION (COUNT ARGS...) DOC [[KEY VALUE]...] BODY...)" + (declare (indent defun) + (doc-string 3) + (debug (&define name lambda-list + [&optional stringp] + [&rest keywordp sexp] + [&optional ("interactive" [&rest form])] + def-body))) + (let (arg doc interactive key keys) + (when args + (setq args `(&optional ,@(delq '&optional args)) + ;; the count is either numerical or nil + interactive '("<c>"))) + ;; collect docstring + (when (and (> (length body) 1) + (or (eq (car-safe (car-safe body)) 'format) + (stringp (car-safe body)))) + (setq doc (pop body))) + ;; collect keywords + (setq keys (plist-put keys :repeat 'motion)) + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body) + keys (plist-put keys key arg))) + ;; collect `interactive' specification + (when (eq (car-safe (car-safe body)) 'interactive) + (setq interactive (cdr (pop body)))) + ;; macro expansion + `(progn + ;; refresh echo area in Eldoc mode + (when ',motion + (eval-after-load 'eldoc + '(and (fboundp 'eldoc-add-command) + (eldoc-add-command ',motion)))) + (evil-define-command ,motion (,@args) + ,@(when doc `(,doc)) ; avoid nil before `interactive' + ,@keys + :keep-visual t + (interactive ,@interactive) + ,@body)))) + +(defmacro evil-narrow-to-line (&rest body) + "Narrow BODY to the current line. +BODY will signal the errors 'beginning-of-line or 'end-of-line +upon reaching the beginning or end of the current line. + +\(fn [[KEY VAL]...] BODY...)" + (declare (indent defun) + (debug t)) + `(let* ((range (evil-expand (point) (point) 'line)) + (beg (evil-range-beginning range)) + (end (evil-range-end range)) + (min (point-min)) + (max (point-max))) + (when (save-excursion (goto-char end) (bolp)) + (setq end (max beg (1- end)))) + ;; don't include the newline in Normal state + (when (and (not evil-move-beyond-eol) + (not (evil-visual-state-p)) + (not (evil-operator-state-p))) + (setq end (max beg (1- end)))) + (evil-with-restriction beg end + (evil-signal-without-movement + (condition-case err + (progn ,@body) + (beginning-of-buffer + (if (= beg min) + (signal (car err) (cdr err)) + (signal 'beginning-of-line nil))) + (end-of-buffer + (if (= end max) + (signal (car err) (cdr err)) + (signal 'end-of-line nil)))))))) + +;; we don't want line boundaries to trigger the debugger +;; when `debug-on-error' is t +(add-to-list 'debug-ignored-errors "^Beginning of line$") +(add-to-list 'debug-ignored-errors "^End of line$") + +(defun evil-eobp (&optional pos) + "Whether point is at end-of-buffer with regard to end-of-line." + (save-excursion + (when pos (goto-char pos)) + (cond + ((eobp)) + ;; the rest only pertains to Normal state + ((not (evil-normal-state-p)) + nil) + ;; at the end of the last line + ((eolp) + (forward-char) + (eobp)) + ;; at the last character of the last line + (t + (forward-char) + (cond + ((eobp)) + ((eolp) + (forward-char) + (eobp))))))) + +(defun evil-move-beginning (count forward &optional backward) + "Move to the beginning of the COUNT next object. +If COUNT is negative, move to the COUNT previous object. +FORWARD is a function which moves to the end of the object, and +BACKWARD is a function which moves to the beginning. +If one is unspecified, the other is used with a negative argument." + (let* ((count (or count 1)) + (backward (or backward + #'(lambda (count) + (funcall forward (- count))))) + (forward (or forward + #'(lambda (count) + (funcall backward (- count))))) + (opoint (point))) + (cond + ((< count 0) + (when (bobp) + (signal 'beginning-of-buffer nil)) + (unwind-protect + (evil-motion-loop (nil count count) + (funcall backward 1)) + (unless (zerop count) + (goto-char (point-min))))) + ((> count 0) + (when (evil-eobp) + (signal 'end-of-buffer nil)) + ;; Do we need to move past the current object? + (when (<= (save-excursion + (funcall forward 1) + (funcall backward 1) + (point)) + opoint) + (setq count (1+ count))) + (unwind-protect + (evil-motion-loop (nil count count) + (funcall forward 1)) + (if (zerop count) + ;; go back to beginning of object + (funcall backward 1) + (goto-char (point-max))))) + (t + count)))) + +(defun evil-move-end (count forward &optional backward inclusive) + "Move to the end of the COUNT next object. +If COUNT is negative, move to the COUNT previous object. +FORWARD is a function which moves to the end of the object, and +BACKWARD is a function which moves to the beginning. +If one is unspecified, the other is used with a negative argument. +If INCLUSIVE is non-nil, then point is placed at the last character +of the object; otherwise it is placed at the end of the object." + (let* ((count (or count 1)) + (backward (or backward + #'(lambda (count) + (funcall forward (- count))))) + (forward (or forward + #'(lambda (count) + (funcall backward (- count))))) + (opoint (point))) + (cond + ((< count 0) + (when (bobp) + (signal 'beginning-of-buffer nil)) + ;; Do we need to move past the current object? + (when (>= (save-excursion + (funcall backward 1) + (funcall forward 1) + (point)) + (if inclusive + (1+ opoint) + opoint)) + (setq count (1- count))) + (unwind-protect + (evil-motion-loop (nil count count) + (funcall backward 1)) + (if (not (zerop count)) + (goto-char (point-min)) + ;; go to end of object + (funcall forward 1) + (when inclusive + (unless (bobp) (backward-char))) + (when (or (evil-normal-state-p) + (evil-motion-state-p)) + (evil-adjust-cursor))))) + ((> count 0) + (when (evil-eobp) + (signal 'end-of-buffer nil)) + (when inclusive + (forward-char)) + (unwind-protect + (evil-motion-loop (nil count count) + (funcall forward 1)) + (if (not (zerop count)) + (goto-char (point-max)) + (when inclusive + (unless (bobp) (backward-char))) + (when (or (evil-normal-state-p) + (evil-motion-state-p)) + (evil-adjust-cursor))))) + (t + count)))) + +(defun evil-text-object-make-linewise (range) + "Turn the text object selection RANGE to linewise. +The selection is adjusted in a sensible way so that the selected +lines match the user intent. In particular, whitespace-only parts +at the first and last lines are omitted. This function returns +the new range." + ;; Bug #607 + ;; If new type is linewise and the selection of the + ;; first line consists of whitespace only, the + ;; beginning is moved to the start of the next line. If + ;; the selections of the last line consists of + ;; whitespace only, the end is moved to the end of the + ;; previous line. + (if (eq (evil-type range) 'line) + range + (let ((expanded (plist-get (evil-range-properties range) :expanded)) + (newrange (evil-expand-range range t))) + (save-excursion + ;; skip whitespace at the beginning + (goto-char (evil-range-beginning newrange)) + (skip-chars-forward " \t") + (when (and (not (bolp)) (eolp)) + (evil-set-range-beginning newrange (1+ (point)))) + ;; skip whitepsace at the end + (goto-char (evil-range-end newrange)) + (skip-chars-backward " \t") + (when (and (not (eolp)) (bolp)) + (evil-set-range-end newrange (1- (point)))) + ;; only modify range if result is not empty + (if (> (evil-range-beginning newrange) + (evil-range-end newrange)) + range + (unless expanded + (evil-contract-range newrange)) + newrange))))) + +(defmacro evil-define-text-object (object args &rest body) + "Define a text object command OBJECT. +BODY should return a range (BEG END) to the right of point +if COUNT is positive, and to the left of it if negative. + +Optional keyword arguments: +- `:type' - determines how the range applies after an operator + (`inclusive', `line', `block', and `exclusive', or a self-defined + motion type). +- `:extend-selection' - if non-nil (default), the text object always + enlarges the current selection. Otherwise, it replaces the current + selection. + +\(fn OBJECT (COUNT) DOC [[KEY VALUE]...] BODY...)" + (declare (indent defun) + (doc-string 3) + (debug (&define name lambda-list + [&optional stringp] + [&rest keywordp sexp] + def-body))) + (let* ((args (delq '&optional args)) + (count (or (pop args) 'count)) + (args (when args `(&optional ,@args))) + (interactive '((interactive "<c><v>"))) + arg doc key keys) + ;; collect docstring + (when (stringp (car-safe body)) + (setq doc (pop body))) + ;; collect keywords + (setq keys (plist-put keys :extend-selection t)) + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body) + keys (plist-put keys key arg))) + ;; interactive + (when (eq (car-safe (car-safe body)) 'interactive) + (setq interactive (list (pop body)))) + ;; macro expansion + `(evil-define-motion ,object (,count ,@args) + ,@(when doc `(,doc)) + ,@keys + ,@interactive + (setq ,count (or ,count 1)) + (when (/= ,count 0) + (let ((type (evil-type ',object evil-visual-char)) + (extend (and (evil-visual-state-p) + (evil-get-command-property + ',object :extend-selection + ',(plist-get keys :extend-selection)))) + (dir evil-visual-direction) + mark point range selection) + (cond + ;; Visual state: extend the current selection + ((and (evil-visual-state-p) + (called-interactively-p 'any)) + ;; if we are at the beginning of the Visual selection, + ;; go to the left (negative COUNT); if at the end, + ;; go to the right (positive COUNT) + (setq dir evil-visual-direction + ,count (* ,count dir)) + (setq range (progn ,@body)) + (when (evil-range-p range) + (setq range (evil-expand-range range)) + (evil-set-type range (evil-type range type)) + (setq range (evil-contract-range range)) + ;; the beginning is mark and the end is point + ;; unless the selection goes the other way + (setq mark (evil-range-beginning range) + point (evil-range-end range) + type (evil-type + (if evil-text-object-change-visual-type + range + (evil-visual-range)))) + (when (and (eq type 'line) + (not (eq type (evil-type range)))) + (let ((newrange (evil-text-object-make-linewise range))) + (setq mark (evil-range-beginning newrange) + point (evil-range-end newrange)))) + (when (< dir 0) + (evil-swap mark point)) + ;; select the union + (evil-visual-make-selection mark point type))) + ;; not Visual state: return a pair of buffer positions + (t + (setq range (progn ,@body)) + (unless (evil-range-p range) + (setq ,count (- ,count) + range (progn ,@body))) + (when (evil-range-p range) + (setq selection (evil-range (point) (point) type)) + (if extend + (setq range (evil-range-union range selection)) + (evil-set-type range (evil-type range type))) + ;; possibly convert to linewise + (when (eq evil-this-type-modified 'line) + (setq range (evil-text-object-make-linewise range))) + (evil-set-range-properties range nil) + range)))))))) + +(defmacro evil-define-operator (operator args &rest body) + "Define an operator command OPERATOR. +The operator acts on the range of characters BEG through +END. BODY must execute the operator by potentially manipulating +the buffer contents, or otherwise causing side effects to happen. + +Optional keyword arguments are: +- `:type' - force the input range to be of a given type (`inclusive', + `line', `block', and `exclusive', or a self-defined motion type). +- `:motion' - use a predetermined motion instead of waiting for one + from the keyboard. This does not affect the behavior in visual + state, where selection boundaries are always used. +- `:repeat' - if non-nil (default), then \ + \\<evil-normal-state-map>\\[evil-repeat] will repeat the + operator. +- `:move-point' - if non-nil (default), the cursor will be moved to + the beginning of the range before the body executes +- `:keep-visual' - if non-nil, the selection is not disabled when the + operator is executed in visual state. By default, visual state is + exited automatically. +- `:restore-point' - if non-nil, point is restored when the + operator is executed from ex. + +\(fn OPERATOR (BEG END ARGS...) DOC [[KEY VALUE]...] BODY...)" + (declare (indent defun) + (doc-string 3) + (debug (&define name lambda-list + [&optional stringp] + [&rest keywordp sexp] + [&optional ("interactive" [&rest form])] + def-body))) + (let* ((args (delq '&optional args)) + (interactive (if (> (length args) 2) '("<R>") '("<r>"))) + (args (if (> (length args) 2) + `(,(nth 0 args) ,(nth 1 args) + &optional ,@(nthcdr 2 args)) + args)) + arg doc key keys visual) + ;; collect docstring + (when (and (> (length body) 1) + (or (eq (car-safe (car-safe body)) 'format) + (stringp (car-safe body)))) + (setq doc (pop body))) + ;; collect keywords + (setq keys (plist-put keys :move-point t)) + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body)) + (cond + ((eq key :keep-visual) + (setq visual arg)) + (t + (setq keys (plist-put keys key arg))))) + ;; collect `interactive' specification + (when (eq (car-safe (car-safe body)) 'interactive) + (setq interactive (cdr-safe (pop body)))) + ;; transform extended interactive specs + (setq interactive (apply #'evil-interactive-form interactive)) + (setq keys (evil-concat-plists keys (cdr-safe interactive)) + interactive (car-safe interactive)) + ;; macro expansion + `(evil-define-command ,operator ,args + ,@(when doc `(,doc)) + ,@keys + :keep-visual t + :suppress-operator t + (interactive + (let* ((evil-operator-range-motion + (when (evil-has-command-property-p ',operator :motion) + ;; :motion nil is equivalent to :motion undefined + (or (evil-get-command-property ',operator :motion) + #'undefined))) + (evil-operator-range-type + (evil-get-command-property ',operator :type)) + (orig (point)) + evil-operator-range-beginning + evil-operator-range-end + evil-inhibit-operator) + (setq evil-inhibit-operator-value nil + evil-this-operator this-command) + (setq evil-operator-start-col (current-column)) + (prog1 ,interactive + (setq orig (point) + evil-inhibit-operator-value evil-inhibit-operator) + (if ,visual + (when (evil-visual-state-p) + (evil-visual-expand-region)) + (when (or (evil-visual-state-p) (region-active-p)) + (setq deactivate-mark t))) + (cond + ((evil-visual-state-p) + (evil-visual-rotate 'upper-left)) + ((evil-get-command-property ',operator :move-point) + (goto-char (or evil-operator-range-beginning orig))) + (t + (goto-char orig)))))) + (unwind-protect + (let ((evil-inhibit-operator evil-inhibit-operator-value)) + (unless (and evil-inhibit-operator + (called-interactively-p 'any)) + ,@body)) + (setq evil-inhibit-operator-value nil))))) + +;; this is used in the `interactive' specification of an operator command +(defun evil-operator-range (&optional return-type) + "Read a motion from the keyboard and return its buffer positions. +The return value is a list (BEG END), or (BEG END TYPE) if +RETURN-TYPE is non-nil." + (let* ((evil-ex-p (and (not (minibufferp)) (evil-ex-p))) + (motion (or evil-operator-range-motion + (when evil-ex-p 'evil-line))) + (type evil-operator-range-type) + (range (evil-range (point) (point))) + command count) + (setq evil-this-type-modified nil) + (evil-save-echo-area + (cond + ;; Ex mode + ((and evil-ex-p evil-ex-range) + (setq range evil-ex-range)) + ;; Visual selection + ((and (not evil-ex-p) (evil-visual-state-p)) + (setq range (evil-visual-range))) + ;; active region + ((and (not evil-ex-p) (region-active-p)) + (setq range (evil-range (region-beginning) + (region-end) + (or evil-this-type 'exclusive)))) + (t + ;; motion + (evil-save-state + (unless motion + (evil-change-state 'operator) + ;; Make linewise operator shortcuts. E.g., "d" yields the + ;; shortcut "dd", and "g?" yields shortcuts "g??" and "g?g?". + (let ((keys (nth 2 (evil-extract-count (this-command-keys))))) + (setq keys (listify-key-sequence keys)) + (dotimes (var (length keys)) + (define-key evil-operator-shortcut-map + (vconcat (nthcdr var keys)) 'evil-line-or-visual-line))) + ;; read motion from keyboard + (setq command (evil-read-motion motion) + motion (nth 0 command) + count (nth 1 command) + type (or type (nth 2 command)))) + (cond + ((eq motion #'undefined) + (setq range (if return-type '(nil nil nil) '(nil nil)) + motion nil)) + ((or (null motion) ; keyboard-quit + (evil-get-command-property motion :suppress-operator)) + (when (fboundp 'evil-repeat-abort) + (evil-repeat-abort)) + (setq quit-flag t + motion nil)) + (evil-repeat-count + (setq count evil-repeat-count + ;; only the first operator's count is overwritten + evil-repeat-count nil)) + ((or count current-prefix-arg) + ;; multiply operator count and motion count together + (setq count + (* (prefix-numeric-value count) + (prefix-numeric-value current-prefix-arg))))) + (when motion + (let ((evil-state 'operator) + mark-active) + ;; calculate motion range + (setq range (evil-motion-range + motion + count + type)))) + ;; update global variables + (setq evil-this-motion motion + evil-this-motion-count count + type (evil-type range type) + evil-this-type type)))) + (when (evil-range-p range) + (unless (or (null type) (eq (evil-type range) type)) + (evil-contract-range range) + (evil-set-type range type) + (evil-expand-range range)) + (evil-set-range-properties range nil) + (unless return-type + (evil-set-type range nil)) + (setq evil-operator-range-beginning (evil-range-beginning range) + evil-operator-range-end (evil-range-end range) + evil-operator-range-type (evil-type range))) + range))) + +(defmacro evil-define-type (type doc &rest body) + "Define type TYPE. +DOC is a general description and shows up in all docstrings. + +Optional keyword arguments: +- `:expand' - expansion function. This function should accept two + positions in the current buffer, BEG and END,and return a pair of + expanded buffer positions. +- `:contract' - the opposite of `:expand'. Optional. +- `:one-to-one' - non-nil if expansion is one-to-one. This means that + `:expand' followed by `:contract' always return the original range. +- `:normalize' - normalization function. This function should accept + two unexpanded positions and adjust them before expansion. May be + used to deal with buffer boundaries. +- `:string' - description function. Takes two buffer positions and + returns a human-readable string. For example \"2 lines\" + +If further keywords and functions are specified, they are assumed to +be transformations on buffer positions, like `:expand' and `:contract'. + +\(fn TYPE DOC [[KEY FUNC]...])" + (declare (indent defun) + (doc-string 2) + (debug (&define name + [&optional stringp] + [&rest [keywordp function-form]]))) + (let (args defun-forms func key name plist string sym val) + ;; standard values + (setq plist (plist-put plist :one-to-one t)) + ;; keywords + (while (keywordp (car-safe body)) + (setq key (pop body) + val (pop body)) + (if (plist-member plist key) ; not a function + (setq plist (plist-put plist key val)) + (setq func val + sym (intern (replace-regexp-in-string + "^:" "" (symbol-name key))) + name (intern (format "evil-%s-%s" type sym)) + args (car (cdr-safe func)) + string (car (cdr (cdr-safe func))) + string (if (stringp string) + (format "%s\n\n" string) "") + plist (plist-put plist key `',name)) + (push + (cond + ((eq key :string) + `(defun ,name (beg end &rest properties) + ,(format "Return size of %s from BEG to END \ +with PROPERTIES.\n\n%s%s" type string doc) + (let ((beg (evil-normalize-position beg)) + (end (evil-normalize-position end)) + (type ',type) + plist range) + (when (and beg end) + (save-excursion + (evil-sort beg end) + (unless (plist-get properties :expanded) + (setq range (apply #'evil-expand + beg end type properties) + beg (evil-range-beginning range) + end (evil-range-end range) + type (evil-type range type) + plist (evil-range-properties range)) + (setq properties + (evil-concat-plists properties plist))) + (or (apply #',func beg end + (when ,(> (length args) 2) + properties)) + "")))))) + (t + `(defun ,name (beg end &rest properties) + ,(format "Perform %s transformation on %s from BEG to END \ +with PROPERTIES.\n\n%s%s" sym type string doc) + (let ((beg (evil-normalize-position beg)) + (end (evil-normalize-position end)) + (type ',type) + plist range) + (when (and beg end) + (save-excursion + (evil-sort beg end) + (when (memq ,key '(:expand :contract)) + (setq properties + (plist-put properties + :expanded + ,(eq key :expand)))) + (setq range (or (apply #',func beg end + (when ,(> (length args) 2) + properties)) + (apply #'evil-range + beg end type properties)) + beg (evil-range-beginning range) + end (evil-range-end range) + type (evil-type range type) + plist (evil-range-properties range)) + (setq properties + (evil-concat-plists properties plist)) + (apply #'evil-range beg end type properties))))))) + defun-forms))) + ;; :one-to-one requires both or neither of :expand and :contract + (when (plist-get plist :expand) + (setq plist (plist-put plist :one-to-one + (and (plist-get plist :contract) + (plist-get plist :one-to-one))))) + `(progn + (evil-put-property 'evil-type-properties ',type ,@plist) + ,@defun-forms + ',type))) + +(defmacro evil-define-interactive-code (code &rest body) + "Define an interactive code. +PROMPT, if given, is the remainder of the interactive string +up to the next newline. Command properties may be specified +via KEY-VALUE pairs. BODY should evaluate to a list of values. + +\(fn CODE (PROMPT) [[KEY VALUE]...] BODY...)" + (declare (indent defun)) + (let* ((args (when (and (> (length body) 1) + (listp (car-safe body))) + (pop body))) + (doc (when (stringp (car-safe body)) (pop body))) + func properties) + (while (keywordp (car-safe body)) + (setq properties + (append properties (list (pop body) (pop body))))) + (cond + (args + (setq func `(lambda ,args + ,@(when doc `(,doc)) + ,@body))) + ((> (length body) 1) + (setq func `(progn ,@body))) + (t + (setq func (car body)))) + `(eval-and-compile + (let* ((code ,code) + (entry (assoc code evil-interactive-alist)) + (value (cons ',func ',properties))) + (if entry + (setcdr entry value) + (push (cons code value) evil-interactive-alist)) + code)))) + +;;; Highlighting + +(when (fboundp 'font-lock-add-keywords) + (font-lock-add-keywords + 'emacs-lisp-mode + ;; Match all `evil-define-' forms except `evil-define-key'. + ;; (In the interests of speed, this expression is incomplete + ;; and does not match all three-letter words.) + '(("(\\(evil-\\(?:ex-\\)?define-\ +\\(?:[^ k][^ e][^ y]\\|[-[:word:]]\\{4,\\}\\)\\)\ +\\>[ \f\t\n\r\v]*\\(\\(?:\\sw\\|\\s_\\)+\\)?" + (1 font-lock-keyword-face) + (2 font-lock-function-name-face nil t)) + ("(\\(evil-\\(?:delay\\|narrow\\|signal\\|save\\|with\\(?:out\\)?\\)\ +\\(?:-[-[:word:]]+\\)?\\)\\>\[ \f\t\n\r\v]+" + 1 font-lock-keyword-face) + ("(\\(evil-\\(?:[-[:word:]]\\)*loop\\)\\>[ \f\t\n\r\v]+" + 1 font-lock-keyword-face)))) + +(provide 'evil-macros) + +;;; evil-macros.el ends here diff --git a/elpa/evil-20220510.2302/evil-macros.elc b/elpa/evil-20220510.2302/evil-macros.elc Binary files differnew file mode 100644 index 0000000..c1999ee --- /dev/null +++ b/elpa/evil-20220510.2302/evil-macros.elc diff --git a/elpa/evil-20220510.2302/evil-maps.el b/elpa/evil-20220510.2302/evil-maps.el new file mode 100644 index 0000000..2166d9a --- /dev/null +++ b/elpa/evil-20220510.2302/evil-maps.el @@ -0,0 +1,643 @@ +;;; evil-maps.el --- Default keymaps -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-states) +(require 'evil-ex) +(require 'evil-commands) +(require 'evil-command-window) +(require 'evil-common) + +;;; Code: + +;;; Normal state + +(define-key evil-normal-state-map "a" 'evil-append) +(define-key evil-normal-state-map "A" 'evil-append-line) +(define-key evil-normal-state-map "c" 'evil-change) +(define-key evil-normal-state-map "C" 'evil-change-line) +(define-key evil-normal-state-map "d" 'evil-delete) +(define-key evil-normal-state-map "D" 'evil-delete-line) +(define-key evil-normal-state-map "i" 'evil-insert) +(define-key evil-normal-state-map (kbd "<insert>") 'evil-insert) +(define-key evil-normal-state-map (kbd "<insertchar>") 'evil-insert) +(define-key evil-normal-state-map "I" 'evil-insert-line) +(define-key evil-normal-state-map "J" 'evil-join) +(define-key evil-normal-state-map "m" 'evil-set-marker) +(define-key evil-normal-state-map "o" 'evil-open-below) +(define-key evil-normal-state-map "O" 'evil-open-above) +(define-key evil-normal-state-map "p" 'evil-paste-after) +(define-key evil-normal-state-map "P" 'evil-paste-before) +(define-key evil-normal-state-map "q" 'evil-record-macro) +(define-key evil-normal-state-map "r" 'evil-replace) +(define-key evil-normal-state-map "R" 'evil-replace-state) +(define-key evil-normal-state-map "s" 'evil-substitute) +(define-key evil-normal-state-map "S" 'evil-change-whole-line) +(define-key evil-normal-state-map "x" 'evil-delete-char) +(define-key evil-normal-state-map "X" 'evil-delete-backward-char) +(define-key evil-normal-state-map [deletechar] 'evil-delete-char) +(define-key evil-normal-state-map "y" 'evil-yank) +(define-key evil-normal-state-map "Y" 'evil-yank-line) +(define-key evil-normal-state-map "&" 'evil-ex-repeat-substitute) +(define-key evil-normal-state-map "g&" 'evil-ex-repeat-global-substitute) +(define-key evil-normal-state-map "g8" 'what-cursor-position) +(define-key evil-normal-state-map "ga" 'what-cursor-position) +(define-key evil-normal-state-map "gi" 'evil-insert-resume) +(define-key evil-normal-state-map "gI" 'evil-insert-0-line) +(define-key evil-normal-state-map "gJ" 'evil-join-whitespace) +(define-key evil-normal-state-map "gq" 'evil-fill-and-move) +(define-key evil-normal-state-map "gw" 'evil-fill) +(define-key evil-normal-state-map "gu" 'evil-downcase) +(define-key evil-normal-state-map "gU" 'evil-upcase) +(define-key evil-normal-state-map "gf" 'find-file-at-point) +(define-key evil-normal-state-map "]f" 'find-file-at-point) +(define-key evil-normal-state-map "[f" 'find-file-at-point) +(define-key evil-normal-state-map "gF" 'evil-find-file-at-point-with-line) +(define-key evil-normal-state-map "]F" 'evil-find-file-at-point-with-line) +(define-key evil-normal-state-map "[F" 'evil-find-file-at-point-with-line) +(define-key evil-normal-state-map "gx" 'browse-url-at-point) +(define-key evil-normal-state-map "g?" 'evil-rot13) +(define-key evil-normal-state-map "g~" 'evil-invert-case) +(define-key evil-normal-state-map "zo" 'evil-open-fold) +(define-key evil-normal-state-map "zO" 'evil-open-fold-rec) +(define-key evil-normal-state-map "zc" 'evil-close-fold) +(define-key evil-normal-state-map "za" 'evil-toggle-fold) +(define-key evil-normal-state-map "zr" 'evil-open-folds) +(define-key evil-normal-state-map "zm" 'evil-close-folds) +(define-key evil-normal-state-map "z=" 'ispell-word) +(define-key evil-normal-state-map "\C-n" 'evil-paste-pop-next) +(define-key evil-normal-state-map "\C-p" 'evil-paste-pop) +(define-key evil-normal-state-map "\C-t" 'pop-tag-mark) +(define-key evil-normal-state-map (kbd "C-.") 'evil-repeat-pop) +(define-key evil-normal-state-map (kbd "M-.") 'evil-repeat-pop-next) +(define-key evil-normal-state-map "." 'evil-repeat) +(define-key evil-normal-state-map "@" 'evil-execute-macro) +(define-key evil-normal-state-map "\"" 'evil-use-register) +(define-key evil-normal-state-map "~" 'evil-invert-char) +(define-key evil-normal-state-map "=" 'evil-indent) +(define-key evil-normal-state-map "<" 'evil-shift-left) +(define-key evil-normal-state-map ">" 'evil-shift-right) +(define-key evil-normal-state-map "ZZ" 'evil-save-modified-and-close) +(define-key evil-normal-state-map "ZQ" 'evil-quit) +(define-key evil-normal-state-map (kbd "DEL") 'evil-backward-char) +(define-key evil-normal-state-map [escape] 'evil-force-normal-state) +(define-key evil-normal-state-map [remap cua-paste-pop] 'evil-paste-pop) +(define-key evil-normal-state-map [remap yank-pop] 'evil-paste-pop) + +(when (featurep 'tab-bar) + (define-key evil-normal-state-map "gt" 'tab-bar-switch-to-next-tab) + (define-key evil-normal-state-map "gT" 'tab-bar-switch-to-prev-tab)) + +;; go to last change +(define-key evil-normal-state-map "g;" 'goto-last-change) +(define-key evil-normal-state-map "g," 'goto-last-change-reverse) + +;; undo +(define-key evil-normal-state-map "u" 'evil-undo) +(define-key evil-normal-state-map "\C-r" 'evil-redo) + +;; window commands +(define-prefix-command 'evil-window-map) +(define-key evil-window-map "b" 'evil-window-bottom-right) +(define-key evil-window-map "c" 'evil-window-delete) +(define-key evil-window-map "h" 'evil-window-left) +(define-key evil-window-map "H" 'evil-window-move-far-left) +(define-key evil-window-map "j" 'evil-window-down) +(define-key evil-window-map "J" 'evil-window-move-very-bottom) +(define-key evil-window-map "k" 'evil-window-up) +(define-key evil-window-map "K" 'evil-window-move-very-top) +(define-key evil-window-map "l" 'evil-window-right) +(define-key evil-window-map "L" 'evil-window-move-far-right) +(define-key evil-window-map "n" 'evil-window-new) +(define-key evil-window-map "o" 'delete-other-windows) +(define-key evil-window-map "p" 'evil-window-mru) +(define-key evil-window-map "q" 'evil-quit) +(define-key evil-window-map "r" 'evil-window-rotate-downwards) +(define-key evil-window-map "R" 'evil-window-rotate-upwards) +(define-key evil-window-map "s" 'evil-window-split) +(define-key evil-window-map "S" 'evil-window-split) +(define-key evil-window-map "t" 'evil-window-top-left) +(define-key evil-window-map "v" 'evil-window-vsplit) +(define-key evil-window-map "w" 'evil-window-next) +(define-key evil-window-map "W" 'evil-window-prev) +(define-key evil-window-map "+" 'evil-window-increase-height) +(define-key evil-window-map "-" 'evil-window-decrease-height) +(define-key evil-window-map "_" 'evil-window-set-height) +(define-key evil-window-map "<" 'evil-window-decrease-width) +(define-key evil-window-map ">" 'evil-window-increase-width) +(define-key evil-window-map "=" 'balance-windows) +(define-key evil-window-map "|" 'evil-window-set-width) +(define-key evil-window-map "\C-b" 'evil-window-bottom-right) +(define-key evil-window-map "\C-c" 'evil-window-delete) +(define-key evil-window-map (kbd "C-S-h") 'evil-window-move-far-left) +(define-key evil-window-map (kbd "C-S-j") 'evil-window-move-very-bottom) +(define-key evil-window-map (kbd "C-S-k") 'evil-window-move-very-top) +(define-key evil-window-map (kbd "C-S-l") 'evil-window-move-far-right) +(define-key evil-window-map "\C-n" 'evil-window-new) +(define-key evil-window-map "\C-o" 'delete-other-windows) +(define-key evil-window-map "\C-p" 'evil-window-mru) +(define-key evil-window-map "\C-r" 'evil-window-rotate-downwards) +(define-key evil-window-map (kbd "C-S-r") 'evil-window-rotate-upwards) +(define-key evil-window-map "\C-s" 'evil-window-split) +(define-key evil-window-map (kbd "C-S-s") 'evil-window-split) +(define-key evil-window-map "\C-t" 'evil-window-top-left) +(define-key evil-window-map "\C-v" 'evil-window-vsplit) +(define-key evil-window-map "\C-w" 'evil-window-next) +(define-key evil-window-map (kbd "C-S-W") 'evil-window-prev) +(define-key evil-window-map "\C-_" 'evil-window-set-height) +(define-key evil-window-map "\C-f" 'ffap-other-window) + +;;; Motion state + +;; "0" is a special command when called first +(define-key evil-motion-state-map "0" 'evil-beginning-of-line) +(define-key evil-motion-state-map "1" 'digit-argument) +(define-key evil-motion-state-map "2" 'digit-argument) +(define-key evil-motion-state-map "3" 'digit-argument) +(define-key evil-motion-state-map "4" 'digit-argument) +(define-key evil-motion-state-map "5" 'digit-argument) +(define-key evil-motion-state-map "6" 'digit-argument) +(define-key evil-motion-state-map "7" 'digit-argument) +(define-key evil-motion-state-map "8" 'digit-argument) +(define-key evil-motion-state-map "9" 'digit-argument) +(define-key evil-motion-state-map "b" 'evil-backward-word-begin) +(define-key evil-motion-state-map "B" 'evil-backward-WORD-begin) +(define-key evil-motion-state-map "e" 'evil-forward-word-end) +(define-key evil-motion-state-map "E" 'evil-forward-WORD-end) +(define-key evil-motion-state-map "f" 'evil-find-char) +(define-key evil-motion-state-map "F" 'evil-find-char-backward) +(define-key evil-motion-state-map "G" 'evil-goto-line) +(define-key evil-motion-state-map "h" 'evil-backward-char) +(define-key evil-motion-state-map "H" 'evil-window-top) +(define-key evil-motion-state-map "j" 'evil-next-line) +(define-key evil-motion-state-map "k" 'evil-previous-line) +(define-key evil-motion-state-map "l" 'evil-forward-char) +(define-key evil-motion-state-map " " 'evil-forward-char) +(define-key evil-motion-state-map "K" 'evil-lookup) +(define-key evil-motion-state-map "L" 'evil-window-bottom) +(define-key evil-motion-state-map "M" 'evil-window-middle) +(define-key evil-motion-state-map "n" 'evil-search-next) +(define-key evil-motion-state-map "N" 'evil-search-previous) +(define-key evil-motion-state-map "t" 'evil-find-char-to) +(define-key evil-motion-state-map "T" 'evil-find-char-to-backward) +(define-key evil-motion-state-map "w" 'evil-forward-word-begin) +(define-key evil-motion-state-map "W" 'evil-forward-WORD-begin) +(define-key evil-motion-state-map "y" 'evil-yank) +(define-key evil-motion-state-map "Y" 'evil-yank-line) +(define-key evil-motion-state-map "gd" 'evil-goto-definition) +(define-key evil-motion-state-map "ge" 'evil-backward-word-end) +(define-key evil-motion-state-map "gE" 'evil-backward-WORD-end) +(define-key evil-motion-state-map "gg" 'evil-goto-first-line) +(define-key evil-motion-state-map "gj" 'evil-next-visual-line) +(define-key evil-motion-state-map (vconcat "g" [down]) 'evil-next-visual-line) +(define-key evil-motion-state-map "gk" 'evil-previous-visual-line) +(define-key evil-motion-state-map (vconcat "g" [up]) 'evil-previous-visual-line) +(define-key evil-motion-state-map "g0" 'evil-beginning-of-visual-line) +(define-key evil-motion-state-map "g_" 'evil-last-non-blank) +(define-key evil-motion-state-map "g^" 'evil-first-non-blank-of-visual-line) +(define-key evil-motion-state-map (vconcat "g" [home]) 'evil-first-non-blank-of-visual-line) +(define-key evil-motion-state-map "gm" 'evil-middle-of-visual-line) +(define-key evil-motion-state-map "gM" 'evil-percentage-of-line) +(define-key evil-motion-state-map "go" 'evil-goto-char) +(define-key evil-motion-state-map "g$" 'evil-end-of-visual-line) +(define-key evil-motion-state-map (vconcat "g" [end]) 'evil-end-of-visual-line) +(define-key evil-motion-state-map "g\C-]" 'evil-jump-to-tag) +(define-key evil-motion-state-map "{" 'evil-backward-paragraph) +(define-key evil-motion-state-map "}" 'evil-forward-paragraph) +(define-key evil-motion-state-map "#" 'evil-search-word-backward) +(define-key evil-motion-state-map "g#" 'evil-search-unbounded-word-backward) +(define-key evil-motion-state-map "$" 'evil-end-of-line) +(define-key evil-motion-state-map [end] 'evil-end-of-line) +(define-key evil-motion-state-map [home] 'evil-beginning-of-line) +(define-key evil-motion-state-map "%" 'evil-jump-item) +(define-key evil-motion-state-map "`" 'evil-goto-mark) +(define-key evil-motion-state-map "'" 'evil-goto-mark-line) +(define-key evil-motion-state-map "(" 'evil-backward-sentence-begin) +(define-key evil-motion-state-map ")" 'evil-forward-sentence-begin) +(define-key evil-motion-state-map "]]" 'evil-forward-section-begin) +(define-key evil-motion-state-map "][" 'evil-forward-section-end) +(define-key evil-motion-state-map "[[" 'evil-backward-section-begin) +(define-key evil-motion-state-map "[]" 'evil-backward-section-end) +(define-key evil-motion-state-map "[(" 'evil-previous-open-paren) +(define-key evil-motion-state-map "])" 'evil-next-close-paren) +(define-key evil-motion-state-map "[{" 'evil-previous-open-brace) +(define-key evil-motion-state-map "]}" 'evil-next-close-brace) +(define-key evil-motion-state-map "]'" 'evil-next-mark-line) +(define-key evil-motion-state-map "]`" 'evil-next-mark) +(define-key evil-motion-state-map "['" 'evil-previous-mark-line) +(define-key evil-motion-state-map "[`" 'evil-previous-mark) +(define-key evil-motion-state-map "]s" 'evil-next-flyspell-error) +(define-key evil-motion-state-map "[s" 'evil-prev-flyspell-error) +(define-key evil-motion-state-map "*" 'evil-search-word-forward) +(define-key evil-motion-state-map "g*" 'evil-search-unbounded-word-forward) +(define-key evil-motion-state-map "," 'evil-repeat-find-char-reverse) +(define-key evil-motion-state-map "/" 'evil-search-forward) +(define-key evil-motion-state-map ";" 'evil-repeat-find-char) +(define-key evil-motion-state-map "?" 'evil-search-backward) +(define-key evil-motion-state-map "|" 'evil-goto-column) +(define-key evil-motion-state-map "^" 'evil-first-non-blank) +(define-key evil-motion-state-map "+" 'evil-next-line-first-non-blank) +(define-key evil-motion-state-map "_" 'evil-next-line-1-first-non-blank) +(define-key evil-motion-state-map "-" 'evil-previous-line-first-non-blank) +(define-key evil-motion-state-map "\C-w" 'evil-window-map) +(define-key evil-motion-state-map (kbd "C-6") 'evil-switch-to-windows-last-buffer) +(define-key evil-motion-state-map "\C-]" 'evil-jump-to-tag) +(define-key evil-motion-state-map (kbd "C-b") 'evil-scroll-page-up) +(define-key evil-motion-state-map (kbd "C-e") 'evil-scroll-line-down) +(define-key evil-motion-state-map (kbd "C-f") 'evil-scroll-page-down) +(define-key evil-motion-state-map (kbd "C-o") 'evil-jump-backward) +(define-key evil-motion-state-map (kbd "C-y") 'evil-scroll-line-up) +(define-key evil-motion-state-map (kbd "RET") 'evil-ret) +(define-key evil-motion-state-map "\\" 'evil-execute-in-emacs-state) +(define-key evil-motion-state-map "z^" 'evil-scroll-top-line-to-bottom) +(define-key evil-motion-state-map "z+" 'evil-scroll-bottom-line-to-top) +(define-key evil-motion-state-map "zt" 'evil-scroll-line-to-top) +;; TODO: z RET has an advanced form taking an count before the RET +;; but this requires again a special state with a single command +;; bound to RET +(define-key evil-motion-state-map (vconcat "z" [return]) "zt^") +(define-key evil-motion-state-map (kbd "z RET") (vconcat "z" [return])) +(define-key evil-motion-state-map "zz" 'evil-scroll-line-to-center) +(define-key evil-motion-state-map "z." "zz^") +(define-key evil-motion-state-map "zb" 'evil-scroll-line-to-bottom) +(define-key evil-motion-state-map "z-" "zb^") +(define-key evil-motion-state-map "v" 'evil-visual-char) +(define-key evil-motion-state-map "V" 'evil-visual-line) +(define-key evil-motion-state-map "\C-v" 'evil-visual-block) +(define-key evil-motion-state-map "gv" 'evil-visual-restore) +(define-key evil-motion-state-map (kbd "C-^") 'evil-buffer) +(define-key evil-motion-state-map [left] 'evil-backward-char) +(define-key evil-motion-state-map [right] 'evil-forward-char) +(define-key evil-motion-state-map [up] 'evil-previous-line) +(define-key evil-motion-state-map [down] 'evil-next-line) +(define-key evil-motion-state-map "zl" 'evil-scroll-column-right) +(define-key evil-motion-state-map [?z right] "zl") +(define-key evil-motion-state-map "zh" 'evil-scroll-column-left) +(define-key evil-motion-state-map [?z left] "zh") +(define-key evil-motion-state-map "zL" 'evil-scroll-right) +(define-key evil-motion-state-map "zH" 'evil-scroll-left) +(define-key evil-motion-state-map + (read-kbd-macro evil-toggle-key) 'evil-emacs-state) + +;; text objects +(define-key evil-outer-text-objects-map "w" 'evil-a-word) +(define-key evil-outer-text-objects-map "W" 'evil-a-WORD) +(define-key evil-outer-text-objects-map "s" 'evil-a-sentence) +(define-key evil-outer-text-objects-map "p" 'evil-a-paragraph) +(define-key evil-outer-text-objects-map "b" 'evil-a-paren) +(define-key evil-outer-text-objects-map "(" 'evil-a-paren) +(define-key evil-outer-text-objects-map ")" 'evil-a-paren) +(define-key evil-outer-text-objects-map "[" 'evil-a-bracket) +(define-key evil-outer-text-objects-map "]" 'evil-a-bracket) +(define-key evil-outer-text-objects-map "B" 'evil-a-curly) +(define-key evil-outer-text-objects-map "{" 'evil-a-curly) +(define-key evil-outer-text-objects-map "}" 'evil-a-curly) +(define-key evil-outer-text-objects-map "<" 'evil-an-angle) +(define-key evil-outer-text-objects-map ">" 'evil-an-angle) +(define-key evil-outer-text-objects-map "'" 'evil-a-single-quote) +(define-key evil-outer-text-objects-map "\"" 'evil-a-double-quote) +(define-key evil-outer-text-objects-map "`" 'evil-a-back-quote) +(define-key evil-outer-text-objects-map "t" 'evil-a-tag) +(define-key evil-outer-text-objects-map "o" 'evil-a-symbol) +(define-key evil-inner-text-objects-map "w" 'evil-inner-word) +(define-key evil-inner-text-objects-map "W" 'evil-inner-WORD) +(define-key evil-inner-text-objects-map "s" 'evil-inner-sentence) +(define-key evil-inner-text-objects-map "p" 'evil-inner-paragraph) +(define-key evil-inner-text-objects-map "b" 'evil-inner-paren) +(define-key evil-inner-text-objects-map "(" 'evil-inner-paren) +(define-key evil-inner-text-objects-map ")" 'evil-inner-paren) +(define-key evil-inner-text-objects-map "[" 'evil-inner-bracket) +(define-key evil-inner-text-objects-map "]" 'evil-inner-bracket) +(define-key evil-inner-text-objects-map "B" 'evil-inner-curly) +(define-key evil-inner-text-objects-map "{" 'evil-inner-curly) +(define-key evil-inner-text-objects-map "}" 'evil-inner-curly) +(define-key evil-inner-text-objects-map "<" 'evil-inner-angle) +(define-key evil-inner-text-objects-map ">" 'evil-inner-angle) +(define-key evil-inner-text-objects-map "'" 'evil-inner-single-quote) +(define-key evil-inner-text-objects-map "\"" 'evil-inner-double-quote) +(define-key evil-inner-text-objects-map "`" 'evil-inner-back-quote) +(define-key evil-inner-text-objects-map "t" 'evil-inner-tag) +(define-key evil-inner-text-objects-map "o" 'evil-inner-symbol) +(define-key evil-motion-state-map "gn" 'evil-next-match) +(define-key evil-motion-state-map "gN" 'evil-previous-match) + +(when evil-want-C-i-jump + (define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward)) + +(when evil-want-C-u-scroll + (define-key evil-motion-state-map (kbd "C-u") 'evil-scroll-up)) + +(when evil-want-C-d-scroll + (define-key evil-motion-state-map (kbd "C-d") 'evil-scroll-down)) + +(when evil-want-C-g-bindings + (define-key evil-motion-state-map "g\C-g" 'count-words)) + +;;; Visual state + +(define-key evil-visual-state-map "A" 'evil-append) +(define-key evil-visual-state-map "I" 'evil-insert) +(define-key evil-visual-state-map "o" 'exchange-point-and-mark) +(define-key evil-visual-state-map "O" 'evil-visual-exchange-corners) +(define-key evil-visual-state-map "R" 'evil-change-whole-line) +(define-key evil-visual-state-map "u" 'evil-downcase) +(define-key evil-visual-state-map "U" 'evil-upcase) +(define-key evil-visual-state-map "z=" 'ispell-word) +(define-key evil-visual-state-map "a" evil-outer-text-objects-map) +(define-key evil-visual-state-map "i" evil-inner-text-objects-map) +(define-key evil-visual-state-map (kbd "<insert>") 'undefined) +(define-key evil-visual-state-map (kbd "<insertchar>") 'undefined) +(define-key evil-visual-state-map [remap evil-repeat] 'undefined) +(define-key evil-visual-state-map [escape] 'evil-exit-visual-state) +(define-key evil-visual-state-map "gf" 'evil-find-file-at-point-visual) + +;;; Operator-Pending state + +(define-key evil-operator-state-map "a" evil-outer-text-objects-map) +(define-key evil-operator-state-map "i" evil-inner-text-objects-map) +;; (define-key evil-operator-state-map [escape] 'keyboard-quit) + +;;; Insert state + +(defvar evil-insert-state-bindings + `(([insert] . evil-replace-state) + ("\C-q" . evil-quoted-insert) + ("\C-v" . evil-quoted-insert) + ("\C-k" . evil-insert-digraph) + ("\C-o" . evil-execute-in-normal-state) + ("\C-r" . evil-paste-from-register) + ("\C-y" . evil-copy-from-above) + ("\C-e" . evil-copy-from-below) + ("\C-n" . evil-complete-next) ;; Completion commands + ("\C-p" . evil-complete-previous) ;; don't yet behave correctly + ("\C-x\C-n" . evil-complete-next-line) ;; in replace state + ("\C-x\C-p" . evil-complete-previous-line) ;; TODO - fix this + ("\C-t" . evil-shift-right-line) + ("\C-d" . evil-shift-left-line) + ("\C-a" . evil-paste-last-insertion) + ("\C-@" . evil-paste-last-insertion-and-stop-insert) + ([remap delete-backward-char] . evil-delete-backward-char-and-join) + ,(if evil-want-C-w-delete + '("\C-w" . evil-delete-backward-word) + '("\C-w" . evil-window-map)) + ,@(when evil-want-C-u-delete + '(("\C-u" . evil-delete-back-to-indentation))) + ,@(when evil-want-C-h-delete + '(("\C-h" . evil-delete-backward-char-and-join))) + ([mouse-2] . mouse-yank-primary)) + "Evil's bindings for insert & replace states. +Used in `evil-insert-state-map' and `evil-replace-state-map', +excluding <delete>, <escape>, and `evil-toggle-key'.") + +(defun evil-update-insert-state-bindings (&optional _option-name remove force) + "Update bindings in `evil-insert-state-map'. +If no arguments are given add the bindings specified in +`evil-insert-state-bindings'. If REMOVE is non nil, remove only +these bindings. Unless FORCE is non nil, this will not +overwriting existing bindings, which means bindings will not be +added if one already exists for a key and only default bindings +are removed. + +Note that <delete>, <escape> and `evil-toggle-key' are not +included in `evil-insert-state-bindings' by default." + (interactive) + (dolist (binding evil-insert-state-bindings) + (cond + ((and remove + (or force + ;; Only remove if the default binding has not changed + (eq (evil-lookup-key evil-insert-state-map (car binding)) + (cdr binding)))) + (define-key evil-insert-state-map (car binding) nil)) + ((and (null remove) + (or force + ;; Check to see that nothing is bound here before adding + (not (evil-lookup-key evil-insert-state-map (car binding))))) + (define-key evil-insert-state-map (car binding) (cdr binding)))))) + +(define-key evil-insert-state-map [delete] 'delete-char) +(define-key evil-insert-state-map [escape] 'evil-normal-state) +(define-key evil-insert-state-map + (read-kbd-macro evil-toggle-key) 'evil-emacs-state) + +;;; Replace state + +(dolist (binding evil-insert-state-bindings) + (define-key evil-replace-state-map (car binding) (cdr binding))) +(define-key evil-replace-state-map (kbd "DEL") 'evil-replace-backspace) +(when evil-want-C-h-delete + (define-key evil-replace-state-map "\C-h" 'evil-replace-backspace)) +(define-key evil-replace-state-map [escape] 'evil-normal-state) +(define-key evil-replace-state-map [insert] 'evil-append) + +;;; Emacs state + +(define-key evil-emacs-state-map + (read-kbd-macro evil-toggle-key) 'evil-exit-emacs-state) + +(when evil-want-C-w-in-emacs-state + (define-key evil-emacs-state-map "\C-w" 'evil-window-map)) + +;;; Mouse +(define-key evil-motion-state-map [down-mouse-1] 'evil-mouse-drag-region) +(define-key evil-visual-state-map [mouse-2] 'evil-exit-visual-and-repeat) +(define-key evil-normal-state-map [mouse-2] 'mouse-yank-primary) + +;; Ex +(define-key evil-motion-state-map ":" 'evil-ex) +(define-key evil-motion-state-map "!" 'evil-shell-command) + +(evil-ex-define-cmd "e[dit]" 'evil-edit) +(evil-ex-define-cmd "w[rite]" 'evil-write) +(evil-ex-define-cmd "up[date]" 'evil-update) +(evil-ex-define-cmd "wa[ll]" 'evil-write-all) +(evil-ex-define-cmd "sav[eas]" 'evil-save) +(evil-ex-define-cmd "r[ead]" 'evil-read) +(evil-ex-define-cmd "b[uffer]" 'evil-buffer) +(evil-ex-define-cmd "bn[ext]" 'evil-next-buffer) +(evil-ex-define-cmd "bp[revious]" 'evil-prev-buffer) +(evil-ex-define-cmd "bN[ext]" "bprevious") +(evil-ex-define-cmd "sb[uffer]" 'evil-split-buffer) +(evil-ex-define-cmd "sbn[ext]" 'evil-split-next-buffer) +(evil-ex-define-cmd "sbp[revious]" 'evil-split-prev-buffer) +(evil-ex-define-cmd "sbN[ext]" "sbprevious") +(evil-ex-define-cmd "buffers" 'buffer-menu) +(evil-ex-define-cmd "files" 'evil-show-files) +(evil-ex-define-cmd "ls" "buffers") + +(evil-ex-define-cmd "c[hange]" 'evil-change) +(evil-ex-define-cmd "co[py]" 'evil-copy) +(evil-ex-define-cmd "t" "copy") +(evil-ex-define-cmd "m[ove]" 'evil-move) +(evil-ex-define-cmd "d[elete]" 'evil-ex-delete) +(evil-ex-define-cmd "y[ank]" 'evil-ex-yank) +(evil-ex-define-cmd "pu[t]" 'evil-ex-put) +(evil-ex-define-cmd "go[to]" 'evil-goto-char) +(evil-ex-define-cmd "j[oin]" 'evil-ex-join) +(evil-ex-define-cmd "le[ft]" 'evil-align-left) +(evil-ex-define-cmd "ri[ght]" 'evil-align-right) +(evil-ex-define-cmd "ce[nter]" 'evil-align-center) +(evil-ex-define-cmd "sp[lit]" 'evil-window-split) +(evil-ex-define-cmd "vs[plit]" 'evil-window-vsplit) +(evil-ex-define-cmd "new" 'evil-window-new) +(evil-ex-define-cmd "ene[w]" 'evil-buffer-new) +(evil-ex-define-cmd "vne[w]" 'evil-window-vnew) +(evil-ex-define-cmd "clo[se]" 'evil-window-delete) +(evil-ex-define-cmd "on[ly]" 'delete-other-windows) +(evil-ex-define-cmd "q[uit]" 'evil-quit) +(evil-ex-define-cmd "wq" 'evil-save-and-close) +(evil-ex-define-cmd "quita[ll]" 'evil-quit-all) +(evil-ex-define-cmd "qa[ll]" "quitall") +(evil-ex-define-cmd "cq[uit]" 'evil-quit-all-with-error-code) +(evil-ex-define-cmd "wqa[ll]" 'evil-save-and-quit) +(evil-ex-define-cmd "xa[ll]" "wqall") +(evil-ex-define-cmd "x[it]" 'evil-save-modified-and-close) +(evil-ex-define-cmd "exi[t]" 'evil-save-modified-and-close) +(evil-ex-define-cmd "bd[elete]" 'evil-delete-buffer) +(evil-ex-define-cmd "bw[ipeout]" 'evil-delete-buffer) +(evil-ex-define-cmd "g[lobal]" 'evil-ex-global) +(evil-ex-define-cmd "v[global]" 'evil-ex-global-inverted) +(evil-ex-define-cmd "norm[al]" 'evil-ex-normal) +(evil-ex-define-cmd "s[ubstitute]" 'evil-ex-substitute) +(evil-ex-define-cmd "&" 'evil-ex-repeat-substitute) +(evil-ex-define-cmd "&&" 'evil-ex-repeat-substitute-with-flags) +(evil-ex-define-cmd "~" 'evil-ex-repeat-substitute-with-search) +(evil-ex-define-cmd "~&" 'evil-ex-repeat-substitute-with-search-and-flags) +(evil-ex-define-cmd "registers" 'evil-show-registers) +(evil-ex-define-cmd "di[splay]" "registers") +(evil-ex-define-cmd "ma[rk]" 'evil-set-col-0-mark) +(evil-ex-define-cmd "marks" 'evil-show-marks) +(evil-ex-define-cmd "delm[arks]" 'evil-delete-marks) +(evil-ex-define-cmd "ju[mps]" 'evil-show-jumps) +(evil-ex-define-cmd "noh[lsearch]" 'evil-ex-nohighlight) +(evil-ex-define-cmd "f[ile]" 'evil-show-file-info) +(evil-ex-define-cmd "<" 'evil-shift-left) +(evil-ex-define-cmd ">" 'evil-shift-right) +(evil-ex-define-cmd "=" 'evil-ex-line-number) +(evil-ex-define-cmd "!" 'evil-shell-command) +(evil-ex-define-cmd "@:" 'evil-ex-repeat) +(evil-ex-define-cmd "mak[e]" 'evil-make) +(evil-ex-define-cmd "cc" 'evil-goto-error) +(evil-ex-define-cmd "cfir[st]" 'first-error) +(evil-ex-define-cmd "cr[ewind]" 'first-error) +(evil-ex-define-cmd "cn[ext]" 'next-error) +(evil-ex-define-cmd "cp[revious]" 'previous-error) +(evil-ex-define-cmd "set-initial-state" 'evil-ex-set-initial-state) +(evil-ex-define-cmd "show-digraphs" 'evil-ex-show-digraphs) +(evil-ex-define-cmd "sor[t]" 'evil-ex-sort) +(evil-ex-define-cmd "res[ize]" 'evil-ex-resize) +(evil-ex-define-cmd "u[ndo]" 'evil-undo) +(evil-ex-define-cmd "red[o]" 'evil-redo) + +(when (featurep 'tab-bar) + (evil-ex-define-cmd "tabnew" 'tab-bar-new-tab) + (evil-ex-define-cmd "tabc[lose]" 'tab-bar-close-tab) + (evil-ex-define-cmd "tabo[nly]" 'tab-bar-close-other-tabs) + (evil-ex-define-cmd "tabn[ext]" 'tab-bar-switch-to-next-tab) + (evil-ex-define-cmd "tabp[revious]" 'tab-bar-switch-to-prev-tab)) + +;; search command line +(define-key evil-ex-search-keymap "\d" #'evil-ex-delete-backward-char) +(define-key evil-ex-search-keymap "\C-b" 'move-beginning-of-line) +(define-key evil-ex-search-keymap "\C-c" 'abort-recursive-edit) +(define-key evil-ex-search-keymap "\C-g" 'abort-recursive-edit) +(define-key evil-ex-search-keymap "\C-k" 'evil-insert-digraph) +(define-key evil-ex-search-keymap "\C-f" 'evil-ex-search-command-window) +(define-key evil-ex-search-keymap "\C-r" 'evil-paste-from-register) +(define-key evil-ex-search-keymap "\C-n" 'next-history-element) +(define-key evil-ex-search-keymap "\C-p" 'previous-history-element) +(define-key evil-ex-search-keymap "\C-u" 'evil-delete-whole-line) +(define-key evil-ex-search-keymap "\C-v" #'quoted-insert) +(define-key evil-ex-search-keymap "\C-w" 'backward-kill-word) + +;; ex command line +(define-key evil-ex-completion-map "\d" #'evil-ex-delete-backward-char) +(define-key evil-ex-completion-map "\t" #'evil-ex-completion) +(define-key evil-ex-completion-map [tab] #'evil-ex-completion) +(define-key evil-ex-completion-map [remap completion-at-point] #'evil-ex-completion) +(define-key evil-ex-completion-map "\C-a" 'evil-ex-completion) +(define-key evil-ex-completion-map "\C-b" 'move-beginning-of-line) +(define-key evil-ex-completion-map "\C-c" 'abort-recursive-edit) +(define-key evil-ex-completion-map "\C-d" 'evil-ex-completion) +(define-key evil-ex-completion-map "\C-f" 'evil-ex-command-window) +(define-key evil-ex-completion-map "\C-g" 'abort-recursive-edit) +(define-key evil-ex-completion-map "\C-k" 'evil-insert-digraph) +(define-key evil-ex-completion-map "\C-l" 'evil-ex-completion) +(define-key evil-ex-completion-map "\C-p" #'previous-complete-history-element) +(define-key evil-ex-completion-map "\C-r" 'evil-paste-from-register) +(define-key evil-ex-completion-map "\C-n" #'next-complete-history-element) +(define-key evil-ex-completion-map "\C-u" 'evil-delete-whole-line) +(define-key evil-ex-completion-map "\C-v" #'quoted-insert) +(define-key evil-ex-completion-map "\C-w" 'backward-kill-word) +(define-key evil-ex-completion-map [escape] 'abort-recursive-edit) +(define-key evil-ex-completion-map [S-left] 'backward-word) +(define-key evil-ex-completion-map [S-right] 'forward-word) +(define-key evil-ex-completion-map [up] 'previous-complete-history-element) +(define-key evil-ex-completion-map [down] 'next-complete-history-element) +(define-key evil-ex-completion-map [prior] 'previous-history-element) +(define-key evil-ex-completion-map [next] 'next-history-element) +(define-key evil-ex-completion-map [return] 'exit-minibuffer) +(define-key evil-ex-completion-map (kbd "RET") 'exit-minibuffer) + +;; eval prompt (the `=' register) +(define-key evil-eval-map "\C-b" 'move-beginning-of-line) +(define-key evil-eval-map "\C-c" 'abort-recursive-edit) +(define-key evil-eval-map "\C-g" 'abort-recursive-edit) +(define-key evil-eval-map "\C-k" 'evil-insert-digraph) +(define-key evil-eval-map "\C-p" #'previous-complete-history-element) +(define-key evil-eval-map "\C-r" 'evil-paste-from-register) +(define-key evil-eval-map "\C-n" #'next-complete-history-element) +(define-key evil-eval-map "\C-u" 'evil-delete-whole-line) +(define-key evil-eval-map "\C-v" #'quoted-insert) +(define-key evil-eval-map "\C-w" 'backward-kill-word) +(define-key evil-eval-map [escape] 'abort-recursive-edit) +(define-key evil-eval-map [S-left] 'backward-word) +(define-key evil-eval-map [S-right] 'forward-word) +(define-key evil-eval-map [up] 'previous-complete-history-element) +(define-key evil-eval-map [down] 'next-complete-history-element) +(define-key evil-eval-map [prior] 'previous-history-element) +(define-key evil-eval-map [next] 'next-history-element) +(define-key evil-eval-map [return] 'exit-minibuffer) +(define-key evil-eval-map (kbd "RET") 'exit-minibuffer) + +;; evil-read-key +(define-key evil-read-key-map (kbd "ESC") #'keyboard-quit) +(define-key evil-read-key-map (kbd "C-]") #'keyboard-quit) +(define-key evil-read-key-map (kbd "C-g") #'keyboard-quit) +(define-key evil-read-key-map (kbd "C-q") #'evil-read-quoted-char) +(define-key evil-read-key-map (kbd "C-v") #'evil-read-quoted-char) +(define-key evil-read-key-map (kbd "C-k") #'evil-read-digraph-char) +(define-key evil-read-key-map "\r" "\n") + +;; command line window +(evil-define-key 'normal + evil-command-window-mode-map (kbd "RET") 'evil-command-window-execute) +(evil-define-key 'insert + evil-command-window-mode-map (kbd "RET") 'evil-command-window-execute) + +(provide 'evil-maps) + +;;; evil-maps.el ends here diff --git a/elpa/evil-20220510.2302/evil-maps.elc b/elpa/evil-20220510.2302/evil-maps.elc Binary files differnew file mode 100644 index 0000000..01fd9aa --- /dev/null +++ b/elpa/evil-20220510.2302/evil-maps.elc diff --git a/elpa/evil-20220510.2302/evil-pkg.el b/elpa/evil-20220510.2302/evil-pkg.el new file mode 100644 index 0000000..f08aee4 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-pkg.el @@ -0,0 +1,12 @@ +(define-package "evil" "20220510.2302" "Extensible Vi layer for Emacs." + '((emacs "24.1") + (goto-chg "1.6") + (cl-lib "0.5")) + :commit "5a9cfbc443219c4063b17853b7828ec0a00d2736" :maintainer + '("Tom Dalziel" . "tom.dalziel@gmail.com") + :keywords + '("emulation" "vim") + :url "https://github.com/emacs-evil/evil") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/evil-20220510.2302/evil-repeat.el b/elpa/evil-20220510.2302/evil-repeat.el new file mode 100644 index 0000000..f305704 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-repeat.el @@ -0,0 +1,646 @@ +;;; evil-repeat.el --- Repeat system -*- lexical-binding: t -*- + +;; Author: Frank Fischer <frank.fischer at mathematik.tu-chemnitz.de> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; A repeat begins when leaving Normal state; it ends when re-entering +;; Normal state. The diagram below shows possible routes between +;; Normal state (N), Insert state (I), Visual state (V), +;; Operator-Pending state (O) and Replace state (R). (Emacs state +;; is an exception: nothing is repeated in that state.) +;; ___ +;; / \ +;; | R | +;; \___/ +;; ^ | +;; | | +;; ___ |___V ___ +;; / \ <------- / \ -------> / \ +;; | V | | N | | O | +;; \___/ -------> \___/ <------- \___/ +;; | | ^ | +;; | | | | +;; | V___| | +;; | / \ | +;; +--------> | I | <--------+ +;; \___/ +;; +;; The recording of a repeat is started in one of two cases: Either a +;; command is about to be executed (in pre-command-hook) or normal +;; state is exited. The recording is stopped whenever a command has +;; been completed and evil is in normal state afterwards. Therefore, +;; a non-inserting command in normal-state is recorded as a single +;; repeat unit. In contrast, if the command leaves normal state and +;; starts insert-state, all commands that are executed until +;; insert-state is left and normal state is reactivated are recorded +;; together in one repeat unit. In other words, a repeat unit consists +;; of all commands that are executed starting and ending in normal +;; state. +;; +;; Not all commands are recorded. There are several commands that are +;; completely ignored and other commands that even abort the currently +;; active recording, e.g., commands that switch buffer. +;; +;; During recording the repeat information is appended to the variable +;; `evil-repeat-info', which is cleared when the recording +;; starts. This accumulated repeat information is put into the +;; `evil-repeat-ring' when the recording is finished. The dot command, +;; `\[evil-repeat]' (`evil-repeat') replays the most recent entry in +;; the ring, preceeding repeats can be replayed using +;; `\[evil-repeat-pop]' (`evil-repeat-pop'). +;; +;; Repeat information can be stored in almost arbitrary form. How the +;; repeat information for each single command is recored is determined +;; by the :repeat property of the command. This property has the +;; following interpretation: +;; +;; t record commands by storing the key-sequence that invoked it +;; nil ignore this command completely +;; ignore synonym to nil +;; motion command is recorded by storing the key-sequence but only in +;; insert state, otherwise it is ignored. +;; abort stop recording of repeat information immediately +;; change record commands by storing buffer changes +;; SYMBOL if SYMBOL is contained as key in `evil-repeat-types' +;; call the corresponding (function-)value, otherwise +;; call the function associated with SYMBOL. In both +;; cases the function should take exactly one argument +;; which is either 'pre or 'post depending on whether +;; the function is called before or after the execution +;; of the command. +;; +;; Therefore, using a certain SYMBOL one can write specific repeation +;; functions for each command. +;; +;; Each value of ring `evil-repeat-info', i.e., each single repeat +;; information must be one of the following two possibilities: +;; If element is a sequence, it is regarded as a key-sequence to +;; be repeated. Otherwise the element must be a list +;; (FUNCTION PARAMS ...) which will be called using +;; (apply FUNCTION PARAMS) whenever this repeat is being executed. +;; +;; A user supplied repeat function can use the functions +;; `evil-record-repeat' to append further repeat-information of the +;; form described above to `evil-repeat-info'. See the implementation +;; of `evil-repeat-keystrokes' and `evil-repeat-changes' for examples. +;; Those functions are called in different situations before and after +;; the execution of a command. Each function should take one argument +;; which can be either 'pre, 'post, 'pre-operator or 'post-operator +;; specifying when the repeat function has been called. If the command +;; is a usual command the function is called with 'pre before the +;; command is executed and with 'post after the command has been +;; executed. +;; +;; The repeat information is executed with `evil-execute-repeat-info', +;; which passes key-sequence elements to `execute-kbd-macro' and +;; executes other elements as defined above. A special version is +;; `evil-execute-repeat-info-with-count'. This function works as +;; `evil-execute-repeat-info', but replaces the count of the first +;; command. This is done by parsing the key-sequence, ignoring all +;; calls to `digit-prefix-argument' and `negative-argument', and +;; prepending the count as a string to the vector of the remaining +;; key-sequence. + +(require 'evil-states) + +;;; Code: + +(declare-function evil-visual-state-p "evil-visual") +(declare-function evil-visual-range "evil-visual") +(declare-function evil-visual-char "evil-visual") +(declare-function evil-visual-line "evil-visual") +(declare-function evil-visual-block "evil-visual") + +(defmacro evil-without-repeat (&rest body) + (declare (indent defun) + (debug t)) + `(let ((pre-command-hook (remq 'evil-repeat-pre-hook pre-command-hook)) + (post-command-hook (remq 'evil-repeat-post-hook post-command-hook))) + ,@body + (evil-repeat-abort))) + +(defsubst evil-repeat-recording-p () + "Returns non-nil iff a recording is in progress." + (eq evil-recording-repeat t)) + +(defun evil-repeat-start () + "Start recording a new repeat into `evil-repeat-info'." + (evil-repeat-reset t) + (evil-repeat-record-buffer) + (when (evil-visual-state-p) + (let* ((range (evil-visual-range)) + (beg (evil-range-beginning range)) + (end (1- (evil-range-end range))) + (nfwdlines (evil-count-lines beg end))) + (evil-repeat-record + (cond + ((eq evil-visual-selection 'char) + (list #'evil-repeat-visual-char + nfwdlines + (- end + (if (zerop nfwdlines) + beg + (save-excursion + (goto-char end) + (line-beginning-position)))))) + ((eq evil-visual-selection 'line) + (list #'evil-repeat-visual-line nfwdlines)) + ((eq evil-visual-selection 'block) + (list #'evil-repeat-visual-block + nfwdlines + (abs (- (evil-column beg) (evil-column end)))))))))) + +(defun evil-repeat-stop () + "Stop recording a repeat. +Update `evil-repeat-ring' with the accumulated changes +in `evil-repeat-info' and clear variables." + (unwind-protect + (when (evil-repeat-recording-p) + (setq evil-repeat-info + (evil-normalize-repeat-info evil-repeat-info)) + (when (and evil-repeat-info evil-repeat-ring) + (ring-insert evil-repeat-ring evil-repeat-info))) + (evil-repeat-reset nil))) + +(defun evil-repeat-abort () + "Abort current repeation." + (evil-repeat-reset 'abort)) + +(defun evil-repeat-reset (flag) + "Clear all repeat recording variables. +Set `evil-recording-repeat' to FLAG." + (setq evil-recording-repeat flag + evil-repeat-info nil + evil-repeat-buffer nil)) + +(defsubst evil-repeat-record-position (&optional pos) + "Set `evil-repeat-pos' to POS or point." + (setq evil-repeat-pos (or pos (point)))) + +(defun evil-repeat-record-buffer () + "Set `evil-repeat-buffer' to the current buffer." + (unless (minibufferp) + (setq evil-repeat-buffer (current-buffer)))) + +(defmacro evil-save-repeat-info (&rest body) + "Execute BODY, protecting the values of repeat variables." + (declare (indent defun) + (debug t)) + `(let (evil-repeat-ring + evil-recording-repeat + evil-recording-current-command + evil-repeat-info + evil-repeat-changes + evil-repeat-pos + evil-repeat-keys + evil-repeat-buffer + this-command + last-command) + ,@body)) + +(defun evil-repeat-different-buffer-p (&optional strict) + "Whether the buffer has changed in a repeat. +If STRICT is non-nil, returns t if the previous buffer +is unknown; otherwise returns t only if the previous +buffer is known and different from the current buffer." + (and (or (buffer-live-p evil-repeat-buffer) strict) + (not (minibufferp)) + (not (eq (current-buffer) evil-repeat-buffer)))) + +(defun evil-repeat-type (command &optional default) + "Return the :repeat property of COMMAND. +If COMMAND doesn't have this property, return DEFAULT." + (when (functionp command) ; ignore keyboard macros + (let* ((type (evil-get-command-property command :repeat default)) + (repeat-type (assq type evil-repeat-types))) + (if repeat-type (cdr repeat-type) type)))) + +(defun evil-repeat-force-abort-p (repeat-type) + "Returns non-nil iff the current command should abort the recording of repeat information." + (or (evil-repeat-different-buffer-p) ; ... buffer changed + (eq repeat-type 'abort) ; ... explicitely forced + (eq evil-recording-repeat 'abort) ; ... already aborted + (evil-emacs-state-p) ; ... in Emacs state + (and (evil-mouse-events-p (this-command-keys)) ; ... mouse events + (eq repeat-type nil)) + (minibufferp))) ; ... minibuffer activated + +(defun evil-repeat-record (info) + "Add INFO to the end of `evil-repeat-info'." + (when (evil-repeat-recording-p) + (setq evil-repeat-info (nconc evil-repeat-info (list info))))) + +;; called from `evil-normal-state-exit-hook' +(defun evil-repeat-start-hook () + "Record a new repeat when exiting Normal state. +Does not record in Emacs state or if the current command +has :repeat nil." + (when (and (eq (evil-repeat-type this-command t) t) + (not (evil-emacs-state-p))) + (evil-repeat-start))) + +;; called from `pre-command-hook' +(defun evil-repeat-pre-hook () + "Prepare the current command for recording the repeation." + (when evil-local-mode + (let ((repeat-type (evil-repeat-type this-command t))) + (cond + ;; abort the repeat + ((evil-repeat-force-abort-p repeat-type) + ;; We mark the current record as being aborted, because there + ;; may be further pre-hooks following before the post-hook is + ;; called. + (evil-repeat-abort)) + ;; ignore those commands completely + ((or (null repeat-type) + (evil-mouse-events-p (this-command-keys)))) + ;; record command + (t + ;; In normal-state or visual state, each command is a single + ;; repeation, therefore start a new repeation. + (when (or (evil-normal-state-p) + (evil-visual-state-p)) + (evil-repeat-start)) + (setq evil-recording-current-command t) + (funcall repeat-type 'pre)))))) +(put 'evil-repeat-pre-hook 'permanent-local-hook t) + +;; called from `post-command-hook' +(defun evil-repeat-post-hook () + "Finish recording of repeat-information for the current-command." + (when (and evil-local-mode evil-recording-repeat) + (let ((repeat-type (evil-repeat-type this-command t))) + (cond + ;; abort the repeat + ((evil-repeat-force-abort-p repeat-type) + ;; The command has been aborted but is complete, so just reset + ;; the recording state. + (evil-repeat-reset nil)) + ;; ignore if command should not be recorded or the current + ;; command is not being recorded + ((or (null repeat-type) + (not evil-recording-current-command))) + ;; record command + (t + (funcall repeat-type 'post) + ;; In normal state, the repeat sequence is complete, so record it. + (when (evil-normal-state-p) + (evil-repeat-stop))))) + ;; done with recording the current command + (setq evil-recording-current-command nil))) +(put 'evil-repeat-post-hook 'permanent-local-hook t) + +(defun evil-clear-command-keys () + "Clear `this-command-keys' and all information about the current command keys. +Calling this function prevents further recording of the keys that +invoked the current command" + (clear-this-command-keys t) + (setq evil-repeat-keys "")) + +(defun evil-this-command-keys (&optional post-cmd) + "Version of `this-command-keys' with finer control over prefix args." + (let ((arg (if post-cmd current-prefix-arg prefix-arg))) + (vconcat + (when (and (numberp arg) + ;; Only add prefix if no repeat info recorded yet + (null evil-repeat-info)) + (string-to-vector (number-to-string arg))) + (this-single-command-keys)))) + +(defun evil-repeat-keystrokes (flag) + "Repeation recording function for commands that are repeated by keystrokes." + (cond + ((eq flag 'pre) + (when evil-this-register + (evil-repeat-record + `(set evil-this-register ,evil-this-register))) + (setq evil-repeat-keys (evil-this-command-keys))) + ((eq flag 'post) + (evil-repeat-record (if (zerop (length (evil-this-command-keys t))) + evil-repeat-keys + (evil-this-command-keys t))) + ;; erase commands keys to prevent double recording + (evil-clear-command-keys)))) + +(defun evil-repeat-motion (flag) + "Repeation for motions. Motions are recorded by keystroke but only in insert state." + (when (memq evil-state '(insert replace)) + (evil-repeat-keystrokes flag))) + +(defun evil-repeat-changes (flag) + "Repeation recording function for commands that are repeated by buffer changes." + (cond + ((eq flag 'pre) + (add-hook 'after-change-functions #'evil-repeat-change-hook nil t) + (evil-repeat-start-record-changes)) + ((eq flag 'post) + (remove-hook 'after-change-functions #'evil-repeat-change-hook t) + (evil-repeat-finish-record-changes)))) + +;; called from the `after-change-functions' hook +(defun evil-repeat-change-hook (beg end length) + "Record change information for current command." + (let ((repeat-type (evil-repeat-type this-command t))) + (when (and (evil-repeat-recording-p) + (eq repeat-type 'evil-repeat-changes) + (not (evil-emacs-state-p)) + (not (evil-repeat-different-buffer-p t)) + evil-state) + (unless (evil-repeat-recording-p) + (evil-repeat-start)) + (evil-repeat-record-change (- beg evil-repeat-pos) + (buffer-substring beg end) + length)))) +(put 'evil-repeat-change-hook 'permanent-local-hook t) + +(defun evil-repeat-record-change (relpos ins ndel) + "Record the current buffer changes during a repeat. +If CHANGE is specified, it is added to `evil-repeat-changes'." + (when (evil-repeat-recording-p) + (setq evil-repeat-changes + (nconc evil-repeat-changes (list (list relpos ins ndel)))))) + +(defun evil-repeat-start-record-changes () + "Starts the recording of a new set of buffer changes." + (setq evil-repeat-changes nil) + (evil-repeat-record-position)) + +(defun evil-repeat-finish-record-changes () + "Finishes the recording of buffer changes and records them as repeat." + (when (evil-repeat-recording-p) + (evil-repeat-record `(evil-execute-change + ,evil-repeat-changes + ,(- (point) evil-repeat-pos))) + (setq evil-repeat-changes nil))) + +(defun evil-repeat-insert-at-point (flag) + "Repeation recording function for commands that insert text in region. +For example `mouse-yank-primary'. This records text insertion when a command +inserts some text in a buffer between (point) and (mark)." + (cond + ((eq flag 'pre) + (add-hook 'after-change-functions #'evil-repeat-insert-at-point-hook nil t)) + ((eq flag 'post) + (remove-hook 'after-change-functions #'evil-repeat-insert-at-point-hook t)))) + +(defun evil-repeat-insert-at-point-hook (beg end _length) + (let ((repeat-type (evil-repeat-type this-command t))) + (when (and (evil-repeat-recording-p) + (eq repeat-type 'evil-repeat-insert-at-point) + (not (evil-emacs-state-p)) + (not (evil-repeat-different-buffer-p t)) + evil-state) + (setq evil-repeat-pos beg) + (evil-repeat-record (list 'insert (buffer-substring beg end)))))) +(put 'evil-repeat-insert-at-point-hook 'permanent-local-hook t) + +(defun evil-normalize-repeat-info (repeat-info) + "Concatenate consecutive arrays in REPEAT-INFO. +Returns a single array." + (let* ((result (cons nil nil)) + (result-last result) + cur cur-last) + (dolist (rep repeat-info) + (cond + ((null rep)) + ((arrayp rep) + (setq rep (listify-key-sequence rep)) + (cond + (cur + (setcdr cur-last (cons rep nil)) + (setq cur-last (cdr cur-last))) + (t + (setq cur (cons rep nil)) + (setq cur-last cur)))) + (t + (when cur + (setcdr result-last (cons (apply #'vconcat cur) nil)) + (setq result-last (cdr result-last)) + (setq cur nil)) + (setcdr result-last (cons rep nil)) + (setq result-last (cdr result-last))))) + (when cur + (setcdr result-last (cons (apply #'vconcat cur) nil))) + (cdr result))) + +(defun evil-repeat-visual-char (nfwdlines nfwdchars) + "Restores a character visual selection. +If the selection is in a single line, the restored visual +selection covers the same number of characters. If the selection +covers several lines, the restored selection covers the same +number of lines and the same number of characters in the last +line as the original selection." + (evil-visual-char) + (when (> nfwdlines 0) + (forward-line nfwdlines)) + (forward-char nfwdchars)) + +(defun evil-repeat-visual-line (nfwdlines) + "Restores a character visual selection. +If the selection is in a single line, the restored visual +selection covers the same number of characters. If the selection +covers several lines, the restored selection covers the same +number of lines and the same number of characters in the last +line as the original selection." + (evil-visual-line) + (forward-line nfwdlines)) + +(defun evil-repeat-visual-block (nfwdlines nfwdchars) + "Restores a character visual selection. +If the selection is in a single line, the restored visual +selection covers the same number of characters. If the selection +covers several lines, the restored selection covers the same +number of lines and the same number of characters in the last +line as the original selection." + (evil-visual-block) + (let ((col (current-column))) + (forward-line nfwdlines) + (move-to-column (+ col nfwdchars) t))) + +(defun evil-execute-change (changes rel-point) + "Executes as list of changes. + +CHANGES is a list of triples (REL-BEG INSERT-TEXT NDEL). +REL-BEG is the relative position (to point) where the change +takes place. INSERT-TEXT is the text to be inserted at that +position and NDEL the number of characters to be deleted at that +position before insertion. + +REL-POINT is the relative position to point before the changed +where point should be placed after all changes." + (evil-save-repeat-info + (let ((point (point))) + (dolist (change changes) + (goto-char (+ point (nth 0 change))) + (delete-char (nth 2 change)) + (insert (nth 1 change))) + (goto-char (+ point rel-point))))) + +(defun evil-execute-repeat-info (repeat-info) + "Executes a repeat-information REPEAT-INFO." + (evil-save-repeat-info + (dolist (rep repeat-info) + (cond + ((or (arrayp rep) (stringp rep)) + (let ((input-method current-input-method) + (evil-input-method nil)) + (deactivate-input-method) + (unwind-protect + (execute-kbd-macro rep) + (activate-input-method input-method)))) + ((consp rep) + (when (and (= 3 (length rep)) + (eq (nth 0 rep) 'set) + (eq (nth 1 rep) 'evil-this-register) + (>= (nth 2 rep) ?0) + (< (nth 2 rep) ?9)) + (setcar (nthcdr 2 rep) (1+ (nth 2 rep)))) + (apply (car rep) (cdr rep))) + (t + (error "Unexpected repeat-info: %S" rep)))))) + +;; TODO: currently we prepend the replacing count before the +;; key-sequence that calls the command. Can we use direct +;; modification of prefix-arg instead? Does it work in +;; conjunction with `execute-kbd-macro'? +(defun evil-execute-repeat-info-with-count (count repeat-info) + "Repeat the repeat-information REPEAT-INFO with the count of +the first command replaced by COUNT. The count is replaced if +and only if COUNT is non-nil." + (evil-save-repeat-info + (cond + ;; do nothing (zero repeating) + ((and count (zerop count))) + ;; replace count + (count + (let ((evil-repeat-count count) + done) + (while (and repeat-info + (arrayp (car repeat-info)) + (not done)) + (let* ((count-and-cmd (evil-extract-count (pop repeat-info)))) + (push (vconcat (number-to-string count) + (nth 2 count-and-cmd) + (nth 3 count-and-cmd)) + repeat-info) + (setq done t))) + (evil-execute-repeat-info repeat-info))) + ;; repeat with original count + (t + (evil-execute-repeat-info repeat-info))))) + +;; Keep the compiler happy - this is a buffer local var +(defvar evil--execute-normal-return-state) + +(evil-define-command evil-repeat (count &optional save-point) + "Repeat the last editing command with count replaced by COUNT. +If SAVE-POINT is non-nil, do not move point." + :repeat ignore + :suppress-operator t + (interactive (list current-prefix-arg + (not evil-repeat-move-cursor))) + (cond + ((null evil-repeat-ring) + (error "Already executing repeat")) + (save-point + (save-excursion + (evil-repeat count))) + (t + (unwind-protect + (let ((evil-last-find-temp evil-last-find) + (confirm-kill-emacs t) + (kill-buffer-hook + (cons #'(lambda () + (user-error "Cannot delete buffer in repeat command")) + kill-buffer-hook)) + (undo-pointer buffer-undo-list)) + (evil-with-single-undo + (setq evil-last-repeat (list (point) count undo-pointer)) + (evil-execute-repeat-info-with-count + count (ring-ref evil-repeat-ring 0)) + (setq evil-last-find evil-last-find-temp))) + (if (eq 'evil-execute-in-normal-state last-command) + (evil-change-state evil--execute-normal-return-state) + (evil-normal-state)))))) + +;; TODO: the same issue concering disabled undos as for `evil-paste-pop' +(evil-define-command evil-repeat-pop (count &optional save-point) + "Replace the just repeated command with a previously executed command. +Only allowed after `evil-repeat', `evil-repeat-pop' or +`evil-repeat-pop-next'. Uses the same repeat count that +was used for the first repeat. + +The COUNT argument inserts the COUNT-th previous kill. +If COUNT is negative, this is a more recent kill." + :repeat nil + :suppress-operator t + (interactive (list (prefix-numeric-value current-prefix-arg) + (not evil-repeat-move-cursor))) + (cond + ((not (and (eq last-command #'evil-repeat) + evil-last-repeat)) + (user-error "Previous command was not evil-repeat: %s" last-command)) + (save-point + (save-excursion + (evil-repeat-pop count))) + (t + (unless (eq buffer-undo-list (nth 2 evil-last-repeat)) + (evil-undo-pop)) + (goto-char (car evil-last-repeat)) + ;; rotate the repeat-ring + (while (> count 0) + (when evil-repeat-ring + (ring-insert-at-beginning evil-repeat-ring + (ring-remove evil-repeat-ring 0))) + (setq count (1- count))) + (while (< count 0) + (when evil-repeat-ring + (ring-insert evil-repeat-ring + (ring-remove evil-repeat-ring))) + (setq count (1+ count))) + (setq this-command #'evil-repeat) + (evil-repeat (cadr evil-last-repeat))))) + +(evil-define-command evil-repeat-pop-next (count &optional save-point) + "Same as `evil-repeat-pop', but with negative COUNT." + :repeat nil + :suppress-operator t + (interactive (list (prefix-numeric-value current-prefix-arg) + (not evil-repeat-move-cursor))) + (evil-repeat-pop (- count) save-point)) + +(defadvice read-key-sequence (before evil activate) + "Record `this-command-keys' before it is reset." + (when (and (evil-repeat-recording-p) + evil-recording-current-command) + (let ((repeat-type (evil-repeat-type this-command t))) + (if (functionp repeat-type) + (funcall repeat-type 'post))))) + +(provide 'evil-repeat) + +;;; evil-repeat.el ends here diff --git a/elpa/evil-20220510.2302/evil-repeat.elc b/elpa/evil-20220510.2302/evil-repeat.elc Binary files differnew file mode 100644 index 0000000..895645f --- /dev/null +++ b/elpa/evil-20220510.2302/evil-repeat.elc diff --git a/elpa/evil-20220510.2302/evil-search.el b/elpa/evil-20220510.2302/evil-search.el new file mode 100644 index 0000000..0cc9c1b --- /dev/null +++ b/elpa/evil-20220510.2302/evil-search.el @@ -0,0 +1,1336 @@ +;;; evil-search.el --- Search and substitute -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-core) +(require 'evil-common) +(require 'evil-ex) + +;;; Code: + +(defun evil-select-search-module (option module) + "Change the search module according to MODULE. +If MODULE is `isearch', then Emacs' isearch module is used. +If MODULE is `evil-search', then Evil's own interactive +search module is used." + (let ((search-functions + '(forward + backward + word-forward + word-backward + unbounded-word-forward + unbounded-word-backward + next + previous))) + (dolist (fun search-functions) + (let ((isearch (intern (format "evil-search-%s" fun))) + (evil-search (intern (format "evil-ex-search-%s" fun)))) + (if (eq module 'isearch) + (substitute-key-definition + evil-search isearch evil-motion-state-map) + (substitute-key-definition + isearch evil-search evil-motion-state-map))))) + (set-default option module)) + +;; this customization is here because it requires +;; the knowledge of `evil-select-search-mode' +(defcustom evil-search-module 'isearch + "The search module to be used. May be either `isearch', for +Emacs' isearch module, or `evil-search', for Evil's own +interactive search module. N.b. changing this will not affect keybindings. +To swap out relevant keybindings, see `evil-select-search-module' function." + :type '(radio (const :tag "Emacs built-in isearch." :value isearch) + (const :tag "Evil interactive search." :value evil-search)) + :group 'evil + :set 'evil-select-search-module + :initialize 'evil-custom-initialize-pending-reset) + +(defun evil-push-search-history (string forward) + "Push STRING into the appropriate search history (determined by FORWARD)." + (let* ((history-var (if forward + 'evil-search-forward-history + 'evil-search-backward-history)) + (history (symbol-value history-var))) + (unless (equal (car-safe history) string) + (set history-var (cons string history))))) + +(defun evil-search-incrementally (forward regexp-p) + "Search incrementally for user-entered text." + (let ((evil-search-prompt (evil-search-prompt forward)) + (isearch-search-fun-function 'evil-isearch-function) + (point (point)) + search-nonincremental-instead) + (setq isearch-forward forward) + (evil-save-echo-area + (evil-without-input-method-hooks + ;; set the input method locally rather than globally to ensure that + ;; isearch clears the input method when it's finished + (setq current-input-method evil-input-method) + (if forward + (isearch-forward regexp-p) + (isearch-backward regexp-p)) + (evil-push-search-history isearch-string forward) + (setq current-input-method nil)) + (when (/= (point) point) + ;; position the point at beginning of the match only if the call to + ;; `isearch' has really moved the point. `isearch' doesn't move the + ;; point only if "C-g" is hit twice to exit the search, in which case we + ;; shouldn't move the point either. + (when (and forward isearch-other-end) + (goto-char isearch-other-end)) + (when (and (eq point (point)) + (not (string= isearch-string ""))) + (if forward + (isearch-repeat-forward) + (isearch-repeat-backward)) + (isearch-exit) + (when (and forward isearch-other-end) + (goto-char isearch-other-end))) + (evil-flash-search-pattern + (evil-search-message isearch-string forward)))))) + +(defun evil-flash-search-pattern (string &optional all) + "Flash last search matches for duration of `evil-flash-delay'. +If ALL is non-nil, flash all matches. STRING is a message +to display in the echo area." + (let ((lazy-highlight-initial-delay 0) + (isearch-search-fun-function 'evil-isearch-function) + (isearch-case-fold-search case-fold-search) + (disable #'(lambda (&optional _arg) (evil-flash-hook t)))) + (when evil-flash-timer + (cancel-timer evil-flash-timer)) + (unless (or (null string) + (string= string "")) + (evil-echo-area-save) + (evil-echo "%s" string) + (isearch-highlight (match-beginning 0) (match-end 0)) + (when all + (setq isearch-lazy-highlight-wrapped nil + isearch-lazy-highlight-start (point) + isearch-lazy-highlight-end (point)) + (isearch-lazy-highlight-new-loop) + (unless isearch-lazy-highlight-overlays + (isearch-lazy-highlight-update))) + (add-hook 'pre-command-hook #'evil-flash-hook nil t) + (add-hook 'evil-operator-state-exit-hook #'evil-flash-hook nil t) + (add-hook 'pre-command-hook #'evil-clean-isearch-overlays nil t) + (setq evil-flash-timer + (run-at-time evil-flash-delay nil disable))))) + +(defun evil-clean-isearch-overlays () + "Clean isearch overlays unless `this-command' is search." + (remove-hook 'pre-command-hook #'evil-clean-isearch-overlays t) + (unless (memq this-command + '(evil-search-backward + evil-search-forward + evil-search-next + evil-search-previous + evil-search-word-backward + evil-search-word-forward)) + (isearch-clean-overlays))) +(put 'evil-clean-isearch-overlays 'permanent-local-hook t) + +(defun evil-flash-hook (&optional force) + "Disable hightlighting if `this-command' is not search. +Disable anyway if FORCE is t." + (when (or force + ;; to avoid flicker, don't disable highlighting + ;; if the next command is also a search command + (not (memq this-command + '(evil-search-backward + evil-search-forward + evil-search-next + evil-search-previous + evil-search-word-backward + evil-search-word-forward)))) + (evil-echo-area-restore) + (isearch-dehighlight) + (setq isearch-lazy-highlight-last-string nil) + (lazy-highlight-cleanup t) + (when evil-flash-timer + (cancel-timer evil-flash-timer))) + (remove-hook 'pre-command-hook #'evil-flash-hook t) + (remove-hook 'evil-operator-state-exit-hook #'evil-flash-hook t)) +(put 'evil-flash-hook 'permanent-local-hook t) + +(defun evil-search-with-predicate (search-fun pred string bound noerror count) + "Execute a search with a predicate function. +SEARCH-FUN is a search function (e.g. `re-search-forward') and +PREDICATE is a two-argument function satisfying the interface of +`isearch-filter-predicate', or `nil'. STRING, BOUND, NOERROR and +COUNT are passed unchanged to SEARCH-FUN. The first match +satisfying the predicate (or `nil') is returned." + (catch 'done + (while t + (let ((result (funcall search-fun string bound noerror count))) + (cond + ((not result) (throw 'done nil)) + ((not pred) (throw 'done result)) + ((funcall pred (match-beginning 0) (match-end 0)) (throw 'done result))))))) + +(defun evil-search-function (&optional forward regexp-p wrap predicate) + "Return a search function. +If FORWARD is nil, search backward, otherwise forward. +If REGEXP-P is non-nil, the input is a regular expression. +If WRAP is non-nil, the search wraps around the top or bottom +of the buffer. +If PREDICATE is non-nil, it must be a function accepting two +arguments: the bounds of a match, returning non-nil if that match is +acceptable." + `(lambda (string &optional bound noerror count) + (let ((start (point)) + (search-fun ',(if regexp-p + (if forward + 're-search-forward + 're-search-backward) + (if forward + 'search-forward + 'search-backward))) + result) + (setq result (evil-search-with-predicate + search-fun ,predicate string + bound ,(if wrap t 'noerror) count)) + (when (and ,wrap (null result)) + (goto-char ,(if forward '(point-min) '(point-max))) + (unwind-protect + (setq result (evil-search-with-predicate + search-fun ,predicate string bound noerror count)) + (unless result + (goto-char start)))) + result))) + +(defun evil-isearch-function () + "Return a search function for use with isearch. +Based on `isearch-regexp' and `isearch-forward'." + (evil-search-function isearch-forward evil-regexp-search evil-search-wrap 'isearch-filter-predicate)) + +(defun evil-search (string forward &optional regexp-p start) + "Search for STRING and highlight matches. +If FORWARD is nil, search backward, otherwise forward. +If REGEXP-P is non-nil, STRING is taken to be a regular expression. +START is the position to search from; if unspecified, it is +one more than the current position." + (when (and (stringp string) + (not (string= string ""))) + (let* ((orig (point)) + (start (or start + (if forward + (min (point-max) (1+ orig)) + orig))) + (isearch-regexp regexp-p) + (isearch-forward forward) + (case-fold-search + (unless (and search-upper-case + (not (isearch-no-upper-case-p string nil))) + case-fold-search)) + (search-func (evil-search-function + forward regexp-p evil-search-wrap 'isearch-filter-predicate))) + ;; no text properties, thank you very much + (set-text-properties 0 (length string) nil string) + ;; position to search from + (goto-char start) + (setq isearch-string string) + (isearch-update-ring string regexp-p) + (condition-case nil + (funcall search-func string) + (search-failed + (goto-char orig) + (user-error "\"%s\": %s not found" + string (if regexp-p "pattern" "string")))) + ;; always position point at the beginning of the match + (goto-char (match-beginning 0)) + ;; determine message for echo area + (cond + ((and forward (< (point) start)) + (when evil-search-wrap-ring-bell (ding)) + (setq string "Search wrapped around BOTTOM of buffer")) + ((and (not forward) (> (point) start)) + (when evil-search-wrap-ring-bell (ding)) + (setq string "Search wrapped around TOP of buffer")) + (t + (setq string (evil-search-message string forward)))) + (evil-flash-search-pattern string t)))) + +(defun evil-search-word (forward unbounded symbol) + "Search for word near point. +If FORWARD is nil, search backward, otherwise forward. If SYMBOL +is non-nil then the functions searches for the symbol at point, +otherwise for the word at point." + (let ((string (car-safe regexp-search-ring))) + (setq isearch-forward forward) + (cond + ((and (memq last-command + '(evil-search-word-forward + evil-search-word-backward)) + (stringp string) + (not (string= string ""))) + (evil-search string forward t)) + (t + (setq string (evil-find-thing forward (if symbol 'symbol 'evil-word))) + (cond + ((null string) + (user-error "No word under point")) + (unbounded + (setq string (regexp-quote string))) + (t + (setq string + (format (if symbol "\\_<%s\\_>" "\\<%s\\>") + (regexp-quote string))))) + (evil-push-search-history string forward) + (evil-search string forward t))))) + +(defun evil--find-thing (forward thing) + "Return a cons of THING near point as a string and its position. +THING should be a symbol understood by `thing-at-point', +e.g. 'symbol or 'word. If FORWARD is nil, search backward, +otherwise forward. Returns nil if nothing is found." + (let ((move (if forward #'forward-char #'backward-char)) + (end (if forward #'eobp #'bobp)) + string) + (save-excursion + (setq string (thing-at-point thing)) + ;; if there's nothing under point, go forwards + ;; (or backwards) to find it + (while (and (null string) (not (funcall end))) + (funcall move) + (setq string (thing-at-point thing))) + (when (stringp string) + (set-text-properties 0 (length string) nil string)) + (when (> (length string) 0) + (cons string (point)))))) + +(defun evil-find-thing (forward thing) + "Return a THING near point as a string. +THING should be a symbol understood by `thing-at-point', +e.g. 'symbol or 'word. If FORWARD is nil, search backward, +otherwise forward. Returns nil if nothing is found." + (car (evil--find-thing forward thing))) + +(defun evil-find-word (forward) + "Return word near point as a string. +If FORWARD is nil, search backward, otherwise forward. Returns +nil if nothing is found." + (evil-find-thing forward 'word)) + +(defun evil-find-symbol (forward) + "Return word near point as a string. +If FORWARD is nil, search backward, otherwise forward. Returns +nil if nothing is found." + (evil-find-thing forward 'symbol)) + +(defun evil-search-prompt (forward) + "Return the search prompt for the given direction." + (if forward "/" "?")) + +(defun evil-search-message (string forward) + "Prefix STRING with the search prompt." + (format "%s%s" (evil-search-prompt forward) string)) + +(defadvice isearch-message-prefix (around evil activate) + "Use `evil-search-prompt'." + (if evil-search-prompt + (setq ad-return-value evil-search-prompt) + ad-do-it)) + +(defadvice isearch-delete-char (around evil activate) + "Exit search if no search string." + (cond + ((and evil-search-prompt (string= isearch-string "")) + (let (search-nonincremental-instead) + (setq isearch-success nil) + (isearch-exit))) + (t + ad-do-it))) + +(defadvice isearch-lazy-highlight-search (around evil activate) + "Never wrap the search in this context." + (let (evil-search-wrap) + ad-do-it)) + +;;; Ex search + +(defun evil-ex-regex-without-case (re) + "Return the regular expression without all occurrences of \\c and \\C." + (evil-transform-regexp re '((?c . "") (?C . "")))) + +(defun evil-ex-regex-case (re default-case) + "Return the case as implied by \\c or \\C in regular expression RE. +If \\c appears anywhere in the pattern, the pattern is case +insensitive. If \\C appears, the pattern is case sensitive. +Only the first occurrence of \\c or \\C is used, all others are +ignored. If neither \\c nor \\C appears in the pattern, the case +specified by DEFAULT-CASE is used. DEFAULT-CASE should be either +`sensitive', `insensitive' or `smart'. In the latter case, the pattern +will be case-sensitive if and only if it contains an upper-case +letter, otherwise it will be case-insensitive." + (cond + ((string-match "\\(?:^\\|[^\\\\]\\)\\(?:\\\\\\\\\\)*\\\\\\([cC]\\)" re) + (if (eq (aref (match-string 1 re) 0) ?c) 'insensitive 'sensitive)) + ((eq default-case 'smart) + (if (isearch-no-upper-case-p re t) + 'insensitive + 'sensitive)) + (t default-case))) + +;; a pattern +(defun evil-ex-make-substitute-pattern (regexp flags) + "Creates a PATTERN for substitution with FLAGS. +This function respects the values of `evil-ex-substitute-case' +and `evil-ex-substitute-global'." + (evil-ex-make-pattern regexp + (cond + ((memq ?i flags) 'insensitive) + ((memq ?I flags) 'sensitive) + ((not evil-ex-substitute-case) + evil-ex-search-case) + (t evil-ex-substitute-case)) + (or (and evil-ex-substitute-global + (not (memq ?g flags))) + (and (not evil-ex-substitute-global) + (memq ?g flags))))) + +(defun evil-ex-make-search-pattern (regexp) + "Creates a PATTERN for search. +This function respects the values of `evil-ex-search-case'." + (evil-ex-make-pattern regexp evil-ex-search-case t)) + +(defun evil-ex-make-pattern (regexp case whole-line) + "Create a new search pattern. +REGEXP is the regular expression to be searched for. CASE should +be either 'sensitive, 'insensitive for case-sensitive and +case-insensitive search, respectively, or anything else. In the +latter case the pattern is smart-case, i.e. it is automatically +sensitive of the pattern contains one upper case letter, +otherwise it is insensitive. The input REGEXP is considered a +Vim-style regular expression if `evil-ex-search-vim-style-regexp' +is non-nil, in which case it is transformed to an Emacs style +regular expression (i.e. certain backslash-codes are +transformed. Otherwise REGEXP must be an Emacs style regular +expression and is not transformed." + (let ((re (evil-ex-regex-without-case regexp)) + (ignore-case (eq (evil-ex-regex-case regexp case) 'insensitive))) + ;; possibly transform regular expression from vim-style to + ;; Emacs-style. + (if (and evil-ex-search-vim-style-regexp + (not (or (string-match-p "\\`\\\\_?<" regexp) + (string-match-p "\\\\_?>\\'" regexp)))) + (setq re (evil-transform-vim-style-regexp re)) + ;; Even for Emacs regular expressions we translate certain + ;; whitespace sequences + (setq re (evil-transform-regexp re + '((?t . "\t") + (?n . "\n") + (?r . "\r"))))) + (list re ignore-case whole-line))) + +(defun evil-ex-pattern-regex (pattern) + "Return the regular expression of a search PATTERN." + (nth 0 pattern)) + +(defun evil-ex-pattern-ignore-case (pattern) + "Return t if and only if PATTERN should ignore case." + (nth 1 pattern)) + +(defun evil-ex-pattern-whole-line (pattern) + "Return t if and only if PATTERN should match all occurences of a line. +Otherwise PATTERN matches only the first occurence." + (nth 2 pattern)) + +;; Highlight +(defun evil-ex-make-hl (name &rest args) + "Create a new highlight object with name NAME and properties ARGS. +The following properties are supported: +:face The face to be used for the highlighting overlays. +:win The window in which the highlighting should be shown. + Note that the highlight will be visible in all windows showing + the corresponding buffer, but only the matches visible in the + specified window will actually be highlighted. If :win is nil, + the matches in all windows will be highlighted. +:min The minimal buffer position for highlighted matches. +:max The maximal buffer position for highlighted matches. +:match-hook A hook to be called once for each highlight. + The hook must take two arguments, the highlight and + the overlay for that highlight. +:update-hook A hook called once after updating the highlighting + with two arguments, the highlight and a message string + describing the current match status." + (unless (symbolp name) + (user-error "Expected symbol as name of highlight")) + (let ((face 'evil-ex-lazy-highlight) + (win (selected-window)) + min max match-hook update-hook) + (while args + (let ((key (pop args)) + (val (pop args))) + (cond + ((eq key :face) (setq face val)) + ((eq key :win) (setq win val)) + ((eq key :min) (setq min val)) + ((eq key :max) (setq max val)) + ((eq key :match-hook) (setq match-hook val)) + ((eq key :update-hook) (setq update-hook val)) + (t (user-error "Unexpected keyword: %s" key))))) + (when (assoc name evil-ex-active-highlights-alist) + (evil-ex-delete-hl name)) + (when (null evil-ex-active-highlights-alist) + (add-hook 'window-scroll-functions + #'evil-ex-hl-update-highlights-scroll nil t) + (add-hook 'window-size-change-functions + #'evil-ex-hl-update-highlights-resize nil)) + (push (cons name (vector name + nil + face + win + min + max + match-hook + update-hook + nil)) + evil-ex-active-highlights-alist))) + +(defun evil-ex-hl-name (hl) + "Return the name of the highlight HL." + (aref hl 0)) + +(defun evil-ex-hl-pattern (hl) + "Return the pattern of the highlight HL." + (aref hl 1)) + +(defun evil-ex-hl-set-pattern (hl pattern) + "Set the pattern of the highlight HL to PATTERN." + (aset hl 1 pattern)) + +(defun evil-ex-hl-face (hl) + "Return the face of the highlight HL." + (aref hl 2)) + +(defun evil-ex-hl-window (hl) + "Return the window of the highlight HL." + (aref hl 3)) + +(defun evil-ex-hl-min (hl) + "Return the minimal buffer position of the highlight HL." + (aref hl 4)) + +(defun evil-ex-hl-set-min (hl min) + "Set the minimal buffer position of the highlight HL to MIN." + (aset hl 4 min)) + +(defun evil-ex-hl-max (hl) + "Return the maximal buffer position of the highlight HL." + (aref hl 5)) + +(defun evil-ex-hl-set-max (hl max) + "Set the minimal buffer position of the highlight HL to MAX." + (aset hl 5 max)) + +(defun evil-ex-hl-match-hook (hl) + "Return the match-hook of the highlight HL." + (aref hl 6)) + +(defun evil-ex-hl-update-hook (hl) + "Return the update-hook of the highlight HL." + (aref hl 7)) + +(defun evil-ex-hl-overlays (hl) + "Return the list of active overlays of the highlight HL." + (aref hl 8)) + +(defun evil-ex-hl-set-overlays (hl overlays) + "Set the list of active overlays of the highlight HL to OVERLAYS." + (aset hl 8 overlays)) + +(defun evil-ex-delete-hl (name) + "Remove the highlighting object with a certain NAME." + (let ((hl (cdr-safe (assoc name evil-ex-active-highlights-alist)))) + (when hl + (mapc #'delete-overlay (evil-ex-hl-overlays hl)) + (setq evil-ex-active-highlights-alist + (assq-delete-all name evil-ex-active-highlights-alist)) + (evil-ex-hl-update-highlights)) + (when (null evil-ex-active-highlights-alist) + (remove-hook 'window-scroll-functions + #'evil-ex-hl-update-highlights-scroll t) + (remove-hook 'window-size-change-functions + #'evil-ex-hl-update-highlights-resize)))) + +(defun evil-ex-hl-active-p (name) + "Whether the highlight with a certain NAME is active." + (and (assoc name evil-ex-active-highlights-alist) t)) + +(defun evil-ex-hl-change (name pattern) + "Set the regular expression of highlight NAME to PATTERN." + (let ((hl (cdr-safe (assoc name evil-ex-active-highlights-alist)))) + (when hl + (evil-ex-hl-set-pattern hl + (if (zerop (length pattern)) + nil + pattern)) + (evil-ex-hl-idle-update)))) + +(defun evil-ex-hl-set-region (name beg end &optional _type) + "Set minimal and maximal position of highlight NAME to BEG and END." + (let ((hl (cdr-safe (assoc name evil-ex-active-highlights-alist)))) + (when hl + (evil-ex-hl-set-min hl beg) + (evil-ex-hl-set-max hl end) + (evil-ex-hl-idle-update)))) + +(defun evil-ex-hl-get-max (name) + "Return the maximal position of the highlight with name NAME." + (let ((hl (cdr-safe (assoc name evil-ex-active-highlights-alist)))) + (and hl (evil-ex-hl-max hl)))) + +(defun evil-ex-hl-update-highlights () + "Update the overlays of all active highlights." + (dolist (hl (mapcar #'cdr evil-ex-active-highlights-alist)) + (let* ((old-ovs (evil-ex-hl-overlays hl)) + new-ovs + (pattern (evil-ex-hl-pattern hl)) + (case-fold-search (evil-ex-pattern-ignore-case pattern)) + (case-replace case-fold-search) + (face (evil-ex-hl-face hl)) + (match-hook (evil-ex-hl-match-hook hl)) + result) + (if pattern + ;; collect all visible ranges + (let (ranges sranges) + (dolist (win (if (eq evil-ex-interactive-search-highlight + 'all-windows) + (get-buffer-window-list (current-buffer) nil t) + (list (evil-ex-hl-window hl)))) + (when (window-live-p win) + (let ((beg (max (window-start win) + (or (evil-ex-hl-min hl) (point-min)))) + (end (min (window-end win) + (or (evil-ex-hl-max hl) (point-max))))) + (when (< beg end) + (push (cons beg end) ranges))))) + (setq ranges + (sort ranges #'(lambda (r1 r2) (< (car r1) (car r2))))) + (while ranges + (let ((r1 (pop ranges)) + (r2 (pop ranges))) + (cond + ;; last range + ((null r2) + (push r1 sranges)) + ;; ranges overlap, union + ((>= (cdr r1) (car r2)) + (push (cons (car r1) + (max (cdr r1) (cdr r2))) + ranges)) + ;; ranges distinct + (t + (push r1 sranges) + (push r2 ranges))))) + + ;; run through all ranges + (condition-case lossage + (save-match-data + (dolist (r sranges) + (let ((beg (car r)) + (end (cdr r))) + (save-excursion + (goto-char beg) + ;; set the overlays for the current highlight, + ;; reusing old overlays (if possible) + (while (and (not (eobp)) + (evil-ex-search-find-next-pattern pattern) + (<= (match-end 0) end) + (not (and (= (match-end 0) end) + (string= (evil-ex-pattern-regex pattern) + "^")))) + (let ((ov (or (pop old-ovs) (make-overlay 0 0)))) + (move-overlay ov (match-beginning 0) (match-end 0)) + (overlay-put ov 'face face) + (overlay-put ov 'evil-ex-hl (evil-ex-hl-name hl)) + (overlay-put ov 'priority 1000) + (push ov new-ovs) + (when match-hook (funcall match-hook hl ov))) + (cond + ((and (not (evil-ex-pattern-whole-line pattern)) + (not (string-match-p "\n" (buffer-substring-no-properties + (match-beginning 0) + (match-end 0))))) + (forward-line)) + ((= (match-beginning 0) (match-end 0)) + (forward-char)) + (t (goto-char (match-end 0)))))))) + (mapc #'delete-overlay old-ovs) + (evil-ex-hl-set-overlays hl new-ovs) + (if (or (null pattern) new-ovs) + (setq result t) + ;; Maybe the match could just not be found somewhere else? + (save-excursion + (goto-char (or (evil-ex-hl-min hl) (point-min))) + (if (and (evil-ex-search-find-next-pattern pattern) + (< (match-end 0) (or (evil-ex-hl-max hl) + (point-max)))) + (setq result (format "Match in line %d" + (line-number-at-pos + (match-beginning 0)))) + (setq result "No match"))))) + + (invalid-regexp + (setq result (cadr lossage))) + + (search-failed + (setq result (nth 2 lossage))) + + (error + (setq result (format "%s" (cadr lossage)))) + + (user-error + (setq result (format "%s" (cadr lossage)))))) + ;; no pattern, remove all highlights + (mapc #'delete-overlay old-ovs) + (evil-ex-hl-set-overlays hl new-ovs)) + (when (evil-ex-hl-update-hook hl) + (funcall (evil-ex-hl-update-hook hl) hl result))))) + +(defun evil-ex-search-find-next-pattern (pattern &optional direction) + "Look for the next occurrence of PATTERN in a certain DIRECTION. +Note that this function ignores the whole-line property of PATTERN." + (setq direction (or direction 'forward)) + (let ((case-fold-search (evil-ex-pattern-ignore-case pattern))) + (cond + ((eq direction 'forward) + (re-search-forward (evil-ex-pattern-regex pattern) nil t)) + ((eq direction 'backward) + (let* ((pnt (point)) + (ret (re-search-backward (evil-ex-pattern-regex pattern) nil t)) + (m (and ret (match-data)))) + (if ret + (forward-char) + (goto-char (point-min))) + (let ((fwdret + (re-search-forward (evil-ex-pattern-regex pattern) nil t))) + (cond + ((and fwdret (< (match-beginning 0) pnt)) + (setq ret fwdret) + (goto-char (match-beginning 0))) + (ret + (set-match-data m) + (goto-char (match-beginning 0))) + (t + (goto-char pnt) + ret))))) + (t + (user-error "Unknown search direction: %s" direction))))) + +(defun evil-ex-hl-idle-update () + "Triggers the timer to update the highlights in the current buffer." + (when (and evil-ex-interactive-search-highlight + evil-ex-active-highlights-alist) + (when evil-ex-hl-update-timer + (cancel-timer evil-ex-hl-update-timer)) + (setq evil-ex-hl-update-timer + (run-at-time evil-ex-hl-update-delay nil + #'evil-ex-hl-do-update-highlight + (current-buffer))))) + +(defun evil-ex-hl-do-update-highlight (&optional buffer) + "Timer function for updating the highlights." + (when (buffer-live-p buffer) + (with-current-buffer buffer + (evil-ex-hl-update-highlights))) + (setq evil-ex-hl-update-timer nil)) + +(defun evil-ex-hl-update-highlights-scroll (win _beg) + "Update highlights after scrolling in some window." + (with-current-buffer (window-buffer win) + (evil-ex-hl-idle-update))) +(put 'evil-ex-hl-update-highlights-scroll 'permanent-local-hook t) + +(defun evil-ex-hl-update-highlights-resize (frame) + "Update highlights after resizing a window." + (let ((buffers (delete-dups (mapcar #'window-buffer (window-list frame))))) + (dolist (buf buffers) + (with-current-buffer buf + (evil-ex-hl-idle-update))))) +(put 'evil-ex-hl-update-highlights-resize 'permanent-local-hook t) + +;; interactive search +(defun evil-ex-search-activate-highlight (pattern) + "Activate highlighting of the search pattern set to PATTERN. +This function does nothing if `evil-ex-search-interactive' or +`evil-ex-search-highlight-all' is nil. " + (when (and evil-ex-search-interactive evil-ex-search-highlight-all) + (with-current-buffer (or evil-ex-current-buffer (current-buffer)) + (unless (evil-ex-hl-active-p 'evil-ex-search) + (evil-ex-make-hl 'evil-ex-search + :win (or (minibuffer-selected-window) (selected-window)))) + (if pattern + (evil-ex-hl-change 'evil-ex-search pattern))))) + +(defun evil-ex-search (&optional count) + "Search forward or backward COUNT times for the current ex search pattern. +The search pattern is determined by `evil-ex-search-pattern' and +the direcion is determined by `evil-ex-search-direction'." + (setq evil-ex-search-start-point (point) + evil-ex-last-was-search t + count (or count 1)) + (let ((orig (point)) + wrapped) + (dotimes (_ (or count 1)) + (when (eq evil-ex-search-direction 'forward) + (unless (eobp) (forward-char)) + ;; maybe skip end-of-line + (when (and (not evil-move-beyond-eol) (eolp) (not (eobp))) + (forward-char))) + (let ((res (evil-ex-find-next nil nil (not evil-search-wrap)))) + (cond + ((not res) + (goto-char orig) + (signal 'search-failed + (list (evil-ex-pattern-regex evil-ex-search-pattern)))) + ((eq res 'wrapped) (setq wrapped t))))) + (if wrapped + (let (message-log-max) + (message "Search wrapped"))) + (goto-char (match-beginning 0)) + (setq evil-ex-search-match-beg (match-beginning 0) + evil-ex-search-match-end (match-end 0)) + (evil-ex-search-goto-offset evil-ex-search-offset) + (evil-ex-search-activate-highlight evil-ex-search-pattern))) + +(defun evil-ex-find-next (&optional pattern direction nowrap) + "Search for the next occurrence of the PATTERN in DIRECTION. +PATTERN must be created using `evil-ex-make-pattern', DIRECTION +is either 'forward or 'backward. If NOWRAP is non nil, the search +does not wrap at buffer boundaries. Furthermore this function +only searches invisible text if `search-invisible' is t. If +PATTERN is not specified the current global pattern +`evil-ex-search-pattern' and if DIRECTION is not specified the +current global direction `evil-ex-search-direction' is used. +This function returns t if the search was successful, nil if it +was unsuccessful and 'wrapped if the search was successful but +has been wrapped at the buffer boundaries." + (setq pattern (or pattern evil-ex-search-pattern) + direction (or direction evil-ex-search-direction)) + (unless (and pattern (evil-ex-pattern-regex pattern)) + (signal 'search-failed (list "No search pattern"))) + (catch 'done + (let (wrapped) + (while t + (let ((search-result (evil-ex-search-find-next-pattern pattern + direction))) + (cond + ((and search-result + (or (eq search-invisible t) + (not (isearch-range-invisible + (match-beginning 0) (match-end 0))))) + ;; successful search and not invisible + (throw 'done (if wrapped 'wrapped t))) + ((not search-result) + ;; unsuccessful search + (if nowrap + (throw 'done nil) + (setq nowrap t + wrapped t) + (goto-char (if (eq direction 'forward) + (point-min) + (point-max))))))))))) + +(defun evil-ex-search-update (pattern offset beg end message) + "Update the highlighting and info-message for the search pattern. +PATTERN is the search pattern and OFFSET the associated offset. +BEG and END specifiy the current match, MESSAGE is the info +message to be shown. This function does nothing if +`evil-ex-search-interactive' is nil." + (when evil-ex-search-interactive + (cond + ((and beg end) + ;; update overlay + (if evil-ex-search-overlay + (move-overlay evil-ex-search-overlay beg end) + (setq evil-ex-search-overlay + (make-overlay beg end)) + (overlay-put evil-ex-search-overlay 'priority 1001) + (overlay-put evil-ex-search-overlay 'face 'evil-ex-search)) + ;; move point + (goto-char beg) + (evil-ex-search-goto-offset offset) + ;; update highlights + (when evil-ex-search-highlight-all + (evil-ex-hl-change 'evil-ex-search pattern))) + (t + ;; no match + (when evil-ex-search-overlay + ;; remove overlay + (delete-overlay evil-ex-search-overlay) + (setq evil-ex-search-overlay nil)) + ;; no highlights + (when evil-ex-search-highlight-all + (evil-ex-hl-change 'evil-ex-search nil)) + ;; and go to initial position + (goto-char evil-ex-search-start-point))) + (when (stringp message) + (evil-ex-echo "%s" message)))) + +(defun evil-ex-search-start-session () + "Initialize Ex for interactive search." + (remove-hook 'minibuffer-setup-hook #'evil-ex-search-start-session) + (when evil-ex-search-incremental + (add-hook 'after-change-functions #'evil-ex-search-update-pattern nil t)) + (add-hook 'minibuffer-exit-hook #'evil-ex-search-stop-session) + (add-hook 'mouse-leave-buffer-hook #'evil-ex-search-exit) + (evil-ex-search-activate-highlight nil)) +(put 'evil-ex-search-start-session 'permanent-local-hook t) + +(defun evil-ex-search-stop-session () + "Stop interactive search." + (with-current-buffer evil-ex-current-buffer + ;; TODO: This is a bad fix to remove duplicates. The duplicates + ;; exist because `isearch-range-invisible' may add a single + ;; overlay multiple times if we are in an unlucky situation + ;; of overlapping overlays. This happens in our case because + ;; of the overlays that are used for (lazy) highlighting. + ;; Perhaps it would be better to disable those overlays + ;; temporarily before calling `isearch-range-invisible'. + (setq isearch-opened-overlays (delete-dups isearch-opened-overlays)) + (isearch-clean-overlays)) + (remove-hook 'minibuffer-exit-hook #'evil-ex-search-stop-session) + (remove-hook 'mouse-leave-buffer-hook #'evil-ex-search-exit) + (remove-hook 'after-change-functions #'evil-ex-search-update-pattern t) + (when evil-ex-search-overlay + (delete-overlay evil-ex-search-overlay) + (setq evil-ex-search-overlay nil))) +(put 'evil-ex-search-stop-session 'permanent-local-hook t) + +(defun evil-ex-split-search-pattern (pattern direction) + "Split PATTERN in regexp, offset and next-pattern parts. +Returns a triple (regexp offset next-search)." + (save-match-data + (if (or (and (eq direction 'forward) + (string-match "\\(?:^\\|[^\\\\]\\)\\(?:\\\\\\\\\\)*\\(/\\([^;]*\\)\\(?:;\\([/?].*\\)?\\)?\\)?$" + pattern)) + (and (eq direction 'backward) + (string-match "\\(?:^\\|[^\\\\]\\)\\(?:\\\\\\\\\\)*\\(\\?\\([^;]*\\)\\(?:;\\([/?].*\\)?\\)?\\)?$" + pattern))) + (list (substring pattern 0 (match-beginning 1)) + (match-string 2 pattern) + (match-string 3 pattern)) + (list pattern nil nil)))) + +(defun evil-ex-search-full-pattern (pattern-string count direction) + "Search for a full search pattern PATTERN-STRING in DIRECTION. +This function split PATTERN-STRING in +pattern/offset/;next-pattern parts and performs the search in +DIRECTION which must be either 'forward or 'backward. The first +search is repeated COUNT times. If the pattern part of +PATTERN-STRING is empty, the last global pattern stored in +`evil-ex-search-pattern' is used instead if in addition the +offset part is nil (i.e. no pattern/offset separator), the last +global offset stored in `evil-ex-search-offset' is used as +offset. The current match data will correspond to the last +successful match. This function returns a triple (RESULT PATTERN +OFFSET) where RESULT is + + t the search has been successful without wrap + 'wrap the search has been successful with wrap + 'empty-pattern the last pattern has been empty + nil the search has not been successful + +and PATTERN and OFFSET are the last pattern and offset this +function searched for. Note that this function does not handle +any error conditions." + (setq count (or count 1)) + (catch 'done + (while t + (let* ((res (evil-ex-split-search-pattern pattern-string direction)) + (pat (pop res)) + (offset (pop res)) + (next-pat (pop res)) + (orig-pat pat)) + ;; use last pattern if no new pattern has been specified + (if (not (zerop (length pat))) + (setq pat (evil-ex-make-search-pattern pat)) + (setq pat evil-ex-search-pattern + offset (or offset evil-ex-search-offset))) + (when (zerop (length pat)) + (throw 'done (list 'empty-pattern pat offset))) + (let (new-dir repeat-last search-result) + (while (> count 0) + (let ((result (evil-ex-find-next pat direction + (not evil-search-wrap)))) + (if (not result) (setq search-result nil count 0) + (setq search-result + (if (or (eq result 'wrap) + (eq search-result 'wrap)) + 'wrap t) + count (1- count))))) + (cond + ;; search failed + ((not search-result) (throw 'done (list nil pat offset))) + ;; no next pattern, search complete + ((zerop (length next-pat)) + (evil-ex-search-goto-offset offset) + (throw 'done (list search-result pat offset))) + ;; single `?' or `/' means repeat last pattern and finish + ((= 1 (length next-pat)) + (evil-ex-search-goto-offset offset) + (setq new-dir (if (string= "/" next-pat) 'forward 'backward) + count (if (eq direction new-dir) 1 2) + pattern-string orig-pat + direction new-dir)) + ;; next non-empty pattern, next search iteration + (t + (evil-ex-search-goto-offset offset) + (setq new-dir (if (= (aref next-pat 0) ?/) 'forward 'backward) + repeat-last (and (<= 2 (length next-pat)) + (member (substring next-pat 0 2) '("//" "??"))) + count (if (or (eq direction new-dir) (not repeat-last)) 1 2) + pattern-string (if repeat-last + (concat orig-pat (substring next-pat 1)) + (substring next-pat 1)) + direction new-dir)))))))) + +(defun evil-ex-search-update-pattern (_beg _end _range) + "Update the current search pattern." + (save-match-data + (let ((pattern-string (minibuffer-contents))) + (with-current-buffer evil-ex-current-buffer + (with-selected-window (minibuffer-selected-window) + (goto-char (1+ evil-ex-search-start-point)) + (condition-case err + (let* ((result (evil-ex-search-full-pattern pattern-string + (or evil-ex-search-count 1) + evil-ex-search-direction)) + (success (pop result)) + (pattern (pop result)) + (offset (pop result))) + (cond + ((eq success 'wrap) + (evil-ex-search-update pattern offset + (match-beginning 0) (match-end 0) + "Wrapped")) + ((eq success 'empty-pattern) + (evil-ex-search-update nil nil nil nil nil)) + (success + (evil-ex-search-update pattern offset + (match-beginning 0) (match-end 0) + nil)) + (t + (evil-ex-search-update nil nil + nil nil + "search failed")))) + (invalid-regexp + (evil-ex-search-update nil nil nil nil (cadr err))) + (error + (evil-ex-search-update nil nil nil nil (format "%s" err))))))))) +(put 'evil-ex-search-update-pattern 'permanent-local-hook t) + +(defun evil-ex-search-exit () + "Exit interactive search, keeping lazy highlighting active." + (interactive) + (evil-ex-search-stop-session) + (exit-minibuffer)) + +(defun evil-ex-search-abort () + "Abort interactive search, disabling lazy highlighting." + (interactive) + (evil-ex-search-stop-session) + (evil-ex-delete-hl 'evil-ex-search) + (abort-recursive-edit)) + +(defun evil-ex-search-goto-offset (offset) + "Move point according to search OFFSET and set `evil-this-type' accordingly. +This function assumes that the current match data represents the +current search result." + (unless (zerop (length offset)) + (let ((beg (match-beginning 0)) + (end (match-end 0))) + (save-match-data + (unless + (string-match + "^\\([esb]\\)?\\(\\([-+]\\)?\\([0-9]*\\)\\)$" + offset) + (user-error "Invalid search offset: %s" offset)) + (let ((count (if (= (match-beginning 4) (match-end 4)) + (cond + ((not (match-beginning 3)) 0) + ((= (aref offset (match-beginning 3)) ?+) +1) + (t -1)) + (string-to-number (match-string 2 offset))))) + (cond + ((not (match-beginning 1)) + (setq evil-this-type 'line) + (forward-line count)) + ((= (aref offset (match-beginning 1)) ?e) + (goto-char (+ end count -1)) + (setq evil-this-type 'inclusive)) + ((memq (aref offset (match-beginning 1)) '(?s ?b)) + (goto-char (+ beg count)) + (setq evil-this-type 'inclusive)))))))) + +(defun evil-ex-search-setup () + "Hook to initialize the minibuffer for ex search." + (add-hook 'pre-command-hook #'evil-ex-remove-default)) + +(defun evil-ex-start-search (direction count) + "Start a new search in a certain DIRECTION." + ;; store buffer and window where the search started + (let ((evil-ex-current-buffer (current-buffer))) + (setq evil-ex-search-count count + evil-ex-search-direction direction + evil-ex-search-start-point (point) + evil-ex-last-was-search t) + (progn + ;; ensure minibuffer is initialized accordingly + (add-hook 'minibuffer-setup-hook #'evil-ex-search-start-session) + ;; read the search string + (let* ((minibuffer-local-map evil-ex-search-keymap) + (search-string + (condition-case err + (minibuffer-with-setup-hook + #'evil-ex-search-setup + (read-string (if (eq evil-ex-search-direction 'forward) + "/" "?") + (and evil-ex-search-history + (propertize + (car evil-ex-search-history) + 'face 'shadow)) + 'evil-ex-search-history)) + (quit + (evil-ex-search-stop-session) + (evil-ex-delete-hl 'evil-ex-search) + (goto-char evil-ex-search-start-point) + (signal (car err) (cdr err)))))) + ;; pattern entered successful + (goto-char (if (eq evil-ex-search-direction 'forward) + (1+ evil-ex-search-start-point) + (1- evil-ex-search-start-point))) + (let* ((result + (evil-ex-search-full-pattern search-string + evil-ex-search-count + evil-ex-search-direction)) + (success (pop result)) + (pattern (pop result)) + (offset (pop result))) + (setq evil-ex-search-pattern pattern + evil-ex-search-offset offset) + (cond + ((memq success '(t wrap)) + (goto-char (match-beginning 0)) + (setq evil-ex-search-match-beg (match-beginning 0) + evil-ex-search-match-end (match-end 0)) + (evil-ex-search-goto-offset offset) + (evil-push-search-history search-string (eq direction 'forward)) + (when (and (not evil-ex-search-incremental) evil-ex-search-highlight-all) + (evil-ex-search-activate-highlight pattern)) + (when (and evil-ex-search-incremental (not evil-ex-search-persistent-highlight)) + (evil-ex-delete-hl 'evil-ex-search))) + (t + (goto-char evil-ex-search-start-point) + (evil-ex-delete-hl 'evil-ex-search) + (signal 'search-failed (list search-string))))))))) + +(defun evil-ex-start-word-search (unbounded direction count &optional symbol) + "Search for the symbol under point. +The search matches the COUNT-th occurrence of the word. If the +UNBOUNDED argument is nil, the search matches only at symbol +boundaries, otherwise it matches anywhere. The DIRECTION +argument should be either `forward' or `backward', determining +the search direction. If SYMBOL is non-nil then the functions +searches for the symbol at point, otherwise for the word at +point." + (let ((string (evil-find-thing (eq direction 'forward) + (if symbol 'symbol 'word)))) + (if (null string) + (user-error "No word under point") + (let ((regex (if unbounded + (regexp-quote string) + (format (if symbol "\\_<%s\\_>" "\\<%s\\>") + (regexp-quote string))))) + (setq evil-ex-search-count count + evil-ex-search-direction direction + evil-ex-search-pattern + (let (evil-ex-search-vim-style-regexp) + (evil-ex-make-search-pattern regex)) + evil-ex-search-offset nil + evil-ex-last-was-search t) + ;; update search history unless this pattern equals the + ;; previous pattern + (unless (equal (car-safe evil-ex-search-history) regex) + (push regex evil-ex-search-history)) + (evil-push-search-history regex (eq direction 'forward))) + (evil-ex-delete-hl 'evil-ex-search) + (when (fboundp 'evil-ex-search-next) + (evil-ex-search-next count))))) + +;; substitute +(evil-ex-define-argument-type substitution + "A substitution pattern argument /pattern/replacement/flags. +This handler highlights the pattern of the current substitution." + :runner + (lambda (flag &optional arg) + (with-selected-window (minibuffer-selected-window) + (with-current-buffer evil-ex-current-buffer + (cond + ((eq flag 'start) + (evil-ex-make-hl + 'evil-ex-substitute + :face 'evil-ex-substitute-matches + :update-hook #'evil-ex-pattern-update-ex-info + :match-hook (and evil-ex-substitute-interactive-replace + #'evil-ex-pattern-update-replacement)) + (setq flag 'update)) + + ((eq flag 'stop) + (evil-ex-delete-hl 'evil-ex-substitute)))) + + (when (and (eq flag 'update) + evil-ex-substitute-highlight-all + (not (zerop (length arg)))) + (condition-case lossage + (let* ((result (evil-ex-get-substitute-info arg t)) + (pattern (pop result)) + (replacement (pop result)) + (range (or (evil-copy-range evil-ex-range) + (evil-range (line-beginning-position) + (line-end-position) + 'line + :expanded t)))) + (setq evil-ex-substitute-current-replacement replacement) + (evil-expand-range range) + (evil-ex-hl-set-region 'evil-ex-substitute + (evil-range-beginning range) + (evil-range-end range)) + (evil-ex-hl-change 'evil-ex-substitute pattern)) + (end-of-file + (evil-ex-pattern-update-ex-info nil + "incomplete replacement")) + (user-error + (evil-ex-pattern-update-ex-info nil + (format "%s" lossage)))))))) + +(defun evil-ex-pattern-update-ex-info (_hl result) + "Update the Ex info string." + (when (stringp result) + (evil-ex-echo "%s" result))) + +(defun evil-ex-pattern-update-replacement (_hl overlay) + "Update the replacement display." + (when (fboundp 'match-substitute-replacement) + (let ((fixedcase (not case-replace)) + repl) + (setq repl (if evil-ex-substitute-current-replacement + (evil-match-substitute-replacement + evil-ex-substitute-current-replacement + fixedcase) + "")) + (put-text-property 0 (length repl) + 'face 'evil-ex-substitute-replacement + repl) + (overlay-put overlay 'after-string repl)))) + +(defun evil-ex-parse-global (string) + "Parse STRING as a global argument." + (let* ((pattern (nth 0 (evil-delimited-arguments string 2))) + (command (and pattern + (>= (- (length string) (length pattern)) 2) + (substring string (+ (length pattern) 2))))) + ;; use last pattern if none given + (when (zerop (length pattern)) + (setq pattern + (cond + ((and (eq evil-search-module 'evil-search) evil-ex-search-pattern) + (evil-ex-pattern-regex evil-ex-search-pattern)) + ((and (eq evil-search-module 'isearch) (not (zerop (length isearch-string)))) + isearch-string) + (t (user-error "No previous pattern"))))) + (list pattern command))) + +(defun evil-ex-get-substitute-info (string &optional implicit-r) + "Returns the substitution info of command line STRING. +This function returns a three-element list \(PATTERN REPLACEMENT +FLAGS) consisting of the substitution parts of STRING. PATTERN is +a ex-pattern (see `evil-ex-make-pattern') and REPLACEMENT in a +compiled replacement expression (see `evil-compile-replacement'). +The information returned is the actual substitution information +w.r.t. to special situations like empty patterns or repetition of +previous substitution commands. If IMPLICIT-R is non-nil, then +the flag 'r' is assumed, i.e. in the case of an empty pattern the +last search pattern is used. This will be used when called from +a :substitute command with arguments." + (let (pattern replacement flags) + (cond + ((or (null string) (string-match "^[a-zA-Z]" string)) + ;; starts with letter so there is no pattern because the + ;; separator must not be a letter repeat last substitute + (setq replacement evil-ex-substitute-replacement) + ;; flags are everything that is not a white space + (when (and string (string-match "[^[:space:]]+" string)) + (setq flags (match-string 0 string)))) + (t + (let ((args (evil-delimited-arguments string 3))) + (setq pattern (pop args) + replacement (pop args) + flags (pop args)) + ;; if replacment equals "~" use previous replacement + (if (equal replacement "~") + (setq replacement evil-ex-substitute-replacement) + (setq replacement (evil-compile-replacement replacement))) + ;; append implicit "r" flag if required + (when (and implicit-r (not (memq ?r (append flags nil)))) + (setq flags (concat flags "r")))))) + ;; if flags equals "&" add previous flags + (if (and (not (zerop (length flags))) + (= (aref flags 0) ?&)) + (setq flags (append (substring flags 1) + evil-ex-substitute-flags)) + (setq flags (append flags nil))) + ;; if no pattern, use previous pattern, either search or + ;; substitute pattern depending on `evil-ex-last-was-search' and + ;; the r flag + (when (zerop (length pattern)) + (setq pattern + (if (eq evil-search-module 'evil-search) + (if (and evil-ex-last-was-search (memq ?r flags)) + (and evil-ex-search-pattern + (evil-ex-pattern-regex evil-ex-search-pattern)) + (and evil-ex-substitute-pattern + (evil-ex-pattern-regex evil-ex-substitute-pattern))) + (if (eq case-fold-search t) + isearch-string + (concat isearch-string "\\C"))) + flags (remq ?r flags))) + ;; generate pattern + (when pattern + (setq pattern (evil-ex-make-substitute-pattern pattern flags))) + (list pattern replacement flags))) + +(defun evil-ex-nohighlight () + "Disable the active search highlightings." + (interactive) + (evil-ex-delete-hl 'evil-ex-substitute) + (evil-ex-delete-hl 'evil-ex-search)) + +(provide 'evil-search) + +;;; evil-search.el ends here diff --git a/elpa/evil-20220510.2302/evil-search.elc b/elpa/evil-20220510.2302/evil-search.elc Binary files differnew file mode 100644 index 0000000..1acb664 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-search.elc diff --git a/elpa/evil-20220510.2302/evil-states.el b/elpa/evil-20220510.2302/evil-states.el new file mode 100644 index 0000000..a2e0e6e --- /dev/null +++ b/elpa/evil-20220510.2302/evil-states.el @@ -0,0 +1,937 @@ +;;; evil-states.el --- States -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +(require 'evil-core) + +;;; Code: + +;;; Normal state + +(evil-define-state normal + "Normal state. +AKA \"Command\" state." + :tag " <N> " + :enable (motion) + :exit-hook (evil-repeat-start-hook) + (cond + ((evil-normal-state-p) + (overwrite-mode -1) + (add-hook 'post-command-hook #'evil-normal-post-command nil t)) + (t + (remove-hook 'post-command-hook #'evil-normal-post-command t)))) + +(defun evil-normal-post-command (&optional command) + "Reset command loop variables in Normal state. +Also prevent point from reaching the end of the line. +If the region is activated, enter Visual state." + (unless (or (evil-initializing-p) + (null this-command)) + (setq command (or command this-command)) + (when (evil-normal-state-p) + (setq evil-this-type nil + evil-this-operator nil + evil-this-motion nil + evil-this-motion-count nil + evil-inhibit-operator nil + evil-inhibit-operator-value nil) + (unless (memq command '(evil-use-register + digit-argument + negative-argument + universal-argument + universal-argument-minus + universal-argument-more + universal-argument-other-key)) + (setq evil-this-register nil)) + (evil-adjust-cursor)))) +(put 'evil-normal-post-command 'permanent-local-hook t) + +;;; Insert state + +(defun evil-maybe-remove-spaces (&optional do-remove) + "Remove space from newly opened empty line. +This function removes (indentation) spaces that have been +inserted by opening a new empty line. The behavior depends on the +variable `evil-maybe-remove-spaces'. If this variable is nil the +function does nothing. Otherwise the behavior depends on +DO-REMOVE. If DO-REMOVE is non-nil the spaces are +removed. Otherwise `evil-maybe-remove-spaces' is set to nil +unless the last command opened yet another new line. + +This function should be added as a post-command-hook to track +commands opening a new line." + (cond + ((not evil-maybe-remove-spaces) + (remove-hook 'post-command-hook #'evil-maybe-remove-spaces)) + (do-remove + (when (save-excursion + (beginning-of-line) + (looking-at "^\\s-*$")) + (delete-region (line-beginning-position) + (line-end-position))) + (setq evil-maybe-remove-spaces nil) + (remove-hook 'post-command-hook #'evil-maybe-remove-spaces)) + ((not (memq this-command + '(evil-open-above + evil-open-below + evil-append + evil-append-line + evil-change-whole-line + newline + newline-and-indent + indent-and-newline))) + (setq evil-maybe-remove-spaces nil) + (remove-hook 'post-command-hook #'evil-maybe-remove-spaces)))) + +(evil-define-state insert + "Insert state." + :tag " <I> " + :cursor (bar . 2) + :message "-- INSERT --" + :entry-hook (evil-start-track-last-insertion) + :exit-hook (evil-cleanup-insert-state evil-stop-track-last-insertion) + :input-method t + (cond + ((evil-insert-state-p) + (add-hook 'post-command-hook #'evil-maybe-remove-spaces) + (add-hook 'pre-command-hook #'evil-insert-repeat-hook) + (setq evil-maybe-remove-spaces t) + (unless (eq evil-want-fine-undo t) + (evil-start-undo-step))) + (t + (remove-hook 'post-command-hook #'evil-maybe-remove-spaces) + (remove-hook 'pre-command-hook #'evil-insert-repeat-hook) + (evil-maybe-remove-spaces t) + (setq evil-insert-repeat-info evil-repeat-info) + (evil-set-marker ?^ nil t) + (unless (eq evil-want-fine-undo t) + (evil-end-undo-step)) + (when (or (evil-normal-state-p evil-next-state) + (evil-motion-state-p evil-next-state)) + (evil-move-cursor-back + (and (eolp) (not evil-move-beyond-eol))))))) + +(defun evil-insert-repeat-hook () + "Record insertion keys in `evil-insert-repeat-info'." + (setq evil-insert-repeat-info (last evil-repeat-info)) + (remove-hook 'pre-command-hook #'evil-insert-repeat-hook)) +(put 'evil-insert-repeat-hook 'permanent-local-hook t) + +(defun evil-cleanup-insert-state () + "Called when Insert state is about to be exited. +Handles the repeat-count of the insertion command." + (when evil-insert-count + (dotimes (_ (1- evil-insert-count)) + (when evil-insert-lines + (evil-insert-newline-below) + (when evil-auto-indent + (indent-according-to-mode))) + (when (fboundp 'evil-execute-repeat-info) + (evil-execute-repeat-info + (cdr evil-insert-repeat-info))))) + (when evil-insert-vcount + (let ((buffer-invisibility-spec buffer-invisibility-spec)) + ;; make all lines hidden by hideshow temporarily visible + (when (listp buffer-invisibility-spec) + (setq buffer-invisibility-spec + (evil-filter-list + #'(lambda (x) + (or (eq x 'hs) + (eq (car-safe x) 'hs))) + buffer-invisibility-spec))) + (let ((line (nth 0 evil-insert-vcount)) + (col (nth 1 evil-insert-vcount)) + (vcount (nth 2 evil-insert-vcount))) + (save-excursion + (dotimes (v (1- vcount)) + (goto-char (point-min)) + (forward-line (+ line v)) + (when (or (not evil-insert-skip-empty-lines) + (not (integerp col)) + (save-excursion + (evil-move-end-of-line) + (>= (current-column) col))) + (if (integerp col) + (move-to-column col t) + (funcall col)) + (dotimes (_ (or evil-insert-count 1)) + (when (fboundp 'evil-execute-repeat-info) + (evil-execute-repeat-info + (cdr evil-insert-repeat-info))))))))))) + +;;; Visual state + +;; Visual selections are implemented in terms of types, and are +;; compatible with the Emacs region. This is achieved by "translating" +;; the region to the selected text right before a command is executed. +;; If the command is a motion, the translation is postponed until a +;; non-motion command is invoked (distinguished by the :keep-visual +;; command property). +;; +;; Visual state activates the region, enabling Transient Mark mode if +;; not already enabled. This is only temporay: if Transient Mark mode +;; was disabled before entering Visual state, it is disabled when +;; exiting Visual state. This allows Visual state to harness the +;; "transient" behavior of many commands without overriding the user's +;; preferences in other states. + +(defmacro evil-define-visual-selection (selection doc &rest body) + "Define a Visual selection SELECTION. +Creates a command evil-visual-SELECTION for enabling the selection. +DOC is the function's documentation string. The following keywords +may be specified in BODY: + +:message STRING Status message when enabling the selection. +:type TYPE Type to use (defaults to SELECTION). + +Following the keywords is optional code which is executed each time +the selection is enabled. + +\(fn SELECTION DOC [[KEY VAL]...] BODY...)" + (declare (indent defun) + (doc-string 2) + (debug (&define name stringp + [&rest keywordp sexp] + def-body))) + (let* ((name (intern (format "evil-visual-%s" selection))) + (message (intern (format "%s-message" name))) + (tagvar (intern (format "%s-tag" name))) + (type selection) + (tag " <V> ") + arg key string) + ;; collect keywords + (while (keywordp (car-safe body)) + (setq key (pop body) + arg (pop body)) + (cond + ((eq key :message) + (setq string arg)) + ((eq key :type) + (setq type arg)) + ((eq key :tag) + (setq tag arg)))) + ;; macro expansion + `(progn + (add-to-list 'evil-visual-alist (cons ',selection ',name)) + (defvar ,name ',type ,(format "*%s" doc)) + (defvar ,message ,string ,doc) + (defvar ,tagvar ,tag ,doc) + (evil-define-command ,name (&optional mark point type message) + ,@(when doc `(,doc)) + :keep-visual t + :repeat nil + (interactive + (list nil nil + (if (and (evil-visual-state-p) + (eq evil-visual-selection ',selection)) + 'exit ,name) t)) + (if (eq type 'exit) + (evil-exit-visual-state) + (setq type (or type ,name) + evil-visual-selection ',selection) + (evil-visual-make-region mark point type message) + ,@body)) + ',selection))) + +(evil-define-visual-selection char + "Characterwise selection." + :type inclusive + :message "-- VISUAL --" + :tag " <V> ") + +(evil-define-visual-selection line + "Linewise selection." + :message "-- VISUAL LINE --" + :tag " <Vl> ") + +(evil-define-visual-selection screen-line + "Linewise selection in `visual-line-mode'." + :message "-- SCREEN LINE --" + :tag " <Vs> ") + +(evil-define-visual-selection block + "Blockwise selection." + :message "-- VISUAL BLOCK --" + :tag " <Vb> " + (evil-transient-mark -1) + ;; refresh the :corner property + (setq evil-visual-properties + (plist-put evil-visual-properties :corner + (evil-visual-block-corner 'upper-left)))) + +(evil-define-state visual + "Visual state." + :tag 'evil-visual-tag + :enable (motion normal) + :message 'evil-visual-message + (cond + ((evil-visual-state-p) + (evil-save-transient-mark-mode) + (setq select-active-regions nil) + (cond + ((region-active-p) + (if (< (evil-visual-direction) 0) + (evil-visual-select (region-beginning) (region-end) + evil-visual-char + (evil-visual-direction)) + (evil-visual-make-selection (mark t) (point) + evil-visual-char)) + (evil-visual-highlight)) + (t + (evil-visual-make-region (point) (point) evil-visual-char))) + (add-hook 'pre-command-hook #'evil-visual-pre-command nil t) + (add-hook 'post-command-hook #'evil-visual-post-command nil t) + (add-hook 'deactivate-mark-hook #'evil-visual-deactivate-hook nil t)) + (t + ;; Postpone deactivation of region if next state is Insert. + ;; This gives certain insertion commands (auto-pairing characters, + ;; for example) an opportunity to access the region. + (if (and (eq evil-next-state 'insert) + (eq evil-visual-selection 'char)) + (add-hook 'evil-normal-state-entry-hook + #'evil-visual-deactivate-hook nil t) + (evil-visual-deactivate-hook)) + (setq evil-visual-region-expanded nil) + (remove-hook 'pre-command-hook #'evil-visual-pre-command t) + (remove-hook 'post-command-hook #'evil-visual-post-command t) + (remove-hook 'deactivate-mark-hook #'evil-visual-deactivate-hook t) + (evil-visual-highlight -1)))) + +(defun evil-visual-pre-command (&optional command) + "Run before each COMMAND in Visual state. +Expand the region to the selection unless COMMAND is a motion." + (when (evil-visual-state-p) + (setq command (or command this-command)) + (when evil-visual-x-select-timer + (cancel-timer evil-visual-x-select-timer)) + (unless (evil-get-command-property command :keep-visual) + (evil-visual-update-x-selection) + (evil-visual-expand-region + ;; exclude final newline from linewise selection + ;; unless the command has real need of it + (and (eq (evil-visual-type) 'line) + (evil-get-command-property command :exclude-newline)))))) + +(put 'evil-visual-pre-command 'permanent-local-hook t) + +(defun evil-visual-post-command (&optional command) + "Run after each COMMAND in Visual state. +If COMMAND is a motion, refresh the selection; +otherwise exit Visual state." + (when (evil-visual-state-p) + (setq command (or command this-command)) + (if (or quit-flag + (eq command #'keyboard-quit) + ;; Is `mark-active' nil for an unexpanded region? + deactivate-mark + (and (not evil-visual-region-expanded) + (not (region-active-p)) + (not (eq evil-visual-selection 'block)))) + (progn + (evil-exit-visual-state) + (evil-adjust-cursor)) + (if evil-visual-region-expanded + (evil-visual-contract-region) + (evil-visual-refresh)) + (setq evil-visual-x-select-timer + (run-with-idle-timer evil-visual-x-select-timeout nil + #'evil-visual-update-x-selection + (current-buffer))) + (evil-visual-highlight)))) +(put 'evil-visual-post-command 'permanent-local-hook t) + +(defun evil-visual-update-x-selection (&optional buffer) + "Update the X selection with the current visual region of BUFFER." + (let ((buf (or buffer (current-buffer)))) + (when (and evil-visual-update-x-selection-p + (buffer-live-p buf) + (evil-visual-state-p) + (display-selections-p) + (not (eq evil-visual-selection 'block))) + (with-current-buffer buf + (evil-set-selection 'PRIMARY (buffer-substring-no-properties + evil-visual-beginning + evil-visual-end)))))) + +(defun evil-visual-activate-hook (&optional _command) + "Enable Visual state if the region is activated." + (unless (evil-visual-state-p) + (evil-delay nil + ;; the activation may only be momentary, so re-check + ;; in `post-command-hook' before entering Visual state + '(unless (or (evil-visual-state-p) + (evil-insert-state-p) + (evil-emacs-state-p)) + (when (and (region-active-p) + (not deactivate-mark)) + (evil-visual-state))) + 'post-command-hook nil t + "evil-activate-visual-state"))) +(put 'evil-visual-activate-hook 'permanent-local-hook t) + +(defun evil-visual-deactivate-hook (&optional command) + "Deactivate the region and restore Transient Mark mode." + (setq command (or command this-command)) + (remove-hook 'deactivate-mark-hook + #'evil-visual-deactivate-hook t) + (remove-hook 'evil-normal-state-entry-hook + #'evil-visual-deactivate-hook t) + (cond + ((and (evil-visual-state-p) command + (not (evil-get-command-property command :keep-visual))) + (setq evil-visual-region-expanded nil) + (evil-exit-visual-state)) + ((not (evil-visual-state-p)) + (evil-active-region -1) + (evil-restore-transient-mark-mode)))) +(put 'evil-visual-deactivate-hook 'permanent-local-hook t) + +(evil-define-command evil-exit-visual-state (&optional later buffer) + "Exit from Visual state to the previous state. +If LATER is non-nil, exit after the current command." + :keep-visual t + :repeat abort + (with-current-buffer (or buffer (current-buffer)) + (when (evil-visual-state-p) + (if later + (setq deactivate-mark t) + (when evil-visual-region-expanded + (evil-visual-contract-region)) + (evil-change-to-previous-state))))) + +(defun evil-visual-tag (&optional selection) + "Return a mode-line tag for SELECTION. +SELECTION is a kind of selection as defined by +`evil-define-visual-selection', such as `char', `line' +or `block'." + (setq selection (or selection evil-visual-selection)) + (when selection + (symbol-value (intern (format "evil-visual-%s-tag" selection))))) + +(defun evil-visual-message (&optional selection) + "Create an echo area message for SELECTION. +SELECTION is a kind of selection as defined by +`evil-define-visual-selection', such as `char', `line' +or `block'." + (let (message) + (setq selection (or selection evil-visual-selection)) + (when selection + (setq message + (symbol-value (intern (format "evil-visual-%s-message" + selection)))) + (cond + ((functionp message) + (funcall message)) + ((stringp message) + (evil-echo "%s" message)))))) + +(defun evil-visual-select (beg end &optional type dir message) + "Create a Visual selection of type TYPE from BEG to END. +Point and mark are positioned so that the resulting selection +has the specified boundaries. If DIR is negative, point precedes mark, +otherwise it succedes it. To specify point and mark directly, +use `evil-visual-make-selection'." + (let* ((range (evil-contract beg end type)) + (mark (evil-range-beginning range)) + (point (evil-range-end range)) + (dir (or dir 1))) + (when (< dir 0) + (evil-swap mark point)) + (evil-visual-make-selection mark point type message))) + +(defun evil-visual-make-selection (mark point &optional type message) + "Create a Visual selection with point at POINT and mark at MARK. +The boundaries of the selection are inferred from these +and the current TYPE. To specify the boundaries and infer +mark and point, use `evil-visual-select' instead." + (let* ((selection (evil-visual-selection-for-type type)) + (func (evil-visual-selection-function selection)) + (prev (and (evil-visual-state-p) evil-visual-selection)) + (mark (evil-normalize-position mark)) + (point (evil-normalize-position point)) + (state evil-state)) + (unless (evil-visual-state-p) + (evil-visual-state)) + (setq evil-visual-selection selection) + (funcall func mark point type + ;; signal a message when changing the selection + (when (or (not (evil-visual-state-p state)) + (not (eq selection prev))) + message)))) + +(defun evil-visual-make-region (mark point &optional type message) + "Create an active region from MARK to POINT. +If TYPE is given, also set the Visual type. +If MESSAGE is given, display it in the echo area." + (interactive) + (let* ((point (evil-normalize-position + (or point (point)))) + (mark (evil-normalize-position + (or mark + (when (or (evil-visual-state-p) + (region-active-p)) + (mark t)) + point)))) + (unless (evil-visual-state-p) + (evil-visual-state)) + (evil-active-region 1) + (setq evil-visual-region-expanded nil) + (evil-visual-refresh mark point type) + (cond + ((null evil-echo-state)) + ((stringp message) + (evil-echo "%s" message)) + (message + (cond + ((stringp evil-visual-state-message) + (evil-echo "%s" evil-visual-state-message)) + ((functionp evil-visual-state-message) + (funcall evil-visual-state-message))))))) + +(defun evil-visual-expand-region (&optional exclude-newline) + "Expand the region to the Visual selection. +If EXCLUDE-NEWLINE is non-nil and the selection ends with a newline, +exclude that newline from the region." + (when (and (evil-visual-state-p) + (not evil-visual-region-expanded)) + (let ((mark evil-visual-beginning) + (point evil-visual-end)) + (when (< evil-visual-direction 0) + (evil-swap mark point)) + (setq evil-visual-region-expanded t) + (evil-visual-refresh mark point) + (when (and exclude-newline + (save-excursion + (goto-char evil-visual-end) + (and (bolp) (not (bobp))))) + (if (< evil-visual-direction 0) + (evil-move-mark (max point (1- (mark)))) + (goto-char (max mark (1- (point))))))))) + +(defun evil-visual-contract-region () + "The inverse of `evil-visual-expand-region'. +Create a Visual selection that expands to the current region." + (evil-visual-refresh) + (setq evil-visual-region-expanded nil) + (evil-visual-refresh evil-visual-mark evil-visual-point)) + +(defun evil-visual-refresh (&optional mark point type &rest properties) + "Refresh point, mark and Visual variables. +Refreshes `evil-visual-beginning', `evil-visual-end', +`evil-visual-mark', `evil-visual-point', `evil-visual-selection', +`evil-visual-direction', `evil-visual-properties' and `evil-this-type'." + (let* ((point (or point (point))) + (mark (or mark (mark t) point)) + (dir (evil-visual-direction)) + (type (or type (evil-visual-type evil-visual-selection) + (evil-visual-type))) + range) + (evil-move-mark mark) + (goto-char point) + (setq evil-visual-beginning + (or evil-visual-beginning + (let ((marker (make-marker))) + (move-marker marker (min point mark)))) + evil-visual-end + (or evil-visual-end + (let ((marker (make-marker))) + (set-marker-insertion-type marker t) + (move-marker marker (max point mark)))) + evil-visual-mark + (or evil-visual-mark + (let ((marker (make-marker))) + (move-marker marker mark))) + evil-visual-point + (or evil-visual-point + (let ((marker (make-marker))) + (move-marker marker point)))) + (setq evil-visual-properties + (evil-concat-plists evil-visual-properties properties)) + (cond + (evil-visual-region-expanded + (setq type (or (evil-visual-type) type)) + (move-marker evil-visual-beginning (min point mark)) + (move-marker evil-visual-end (max point mark)) + ;; if the type is one-to-one, we can safely refresh + ;; the unexpanded positions as well + (when (evil-type-property type :one-to-one) + (setq range (apply #'evil-contract point mark type + evil-visual-properties) + mark (evil-range-beginning range) + point (evil-range-end range)) + (when (< dir 0) + (evil-swap mark point)) + (move-marker evil-visual-mark mark) + (move-marker evil-visual-point point))) + (t + (setq range (apply #'evil-expand point mark type + evil-visual-properties) + type (evil-type range type)) + (move-marker evil-visual-beginning (evil-range-beginning range)) + (move-marker evil-visual-end (evil-range-end range)) + (move-marker evil-visual-mark mark) + (move-marker evil-visual-point point))) + (setq evil-visual-direction dir + evil-this-type type))) + +(defun evil-visual-highlight (&optional arg) + "Highlight Visual selection, depending on the Visual type. +With negative ARG, disable highlighting." + (cond + ((and (numberp arg) (< arg 1)) + (when evil-visual-overlay + (delete-overlay evil-visual-overlay) + (setq evil-visual-overlay nil)) + (when evil-visual-block-overlays + (mapc #'delete-overlay evil-visual-block-overlays) + (setq evil-visual-block-overlays nil))) + ((eq evil-visual-selection 'block) + (when evil-visual-overlay + (evil-visual-highlight -1)) + (evil-visual-highlight-block + evil-visual-beginning + evil-visual-end)) + (t + (when evil-visual-block-overlays + (evil-visual-highlight -1)) + (if evil-visual-overlay + (move-overlay evil-visual-overlay + evil-visual-beginning evil-visual-end) + (setq evil-visual-overlay + (make-overlay evil-visual-beginning evil-visual-end))) + (overlay-put evil-visual-overlay 'face 'region) + (overlay-put evil-visual-overlay 'priority 99)))) + +(defun evil-visual-highlight-block (beg end &optional overlays) + "Highlight rectangular region from BEG to END. +Do this by putting an overlay on each line within the rectangle. +Each overlay extends across all the columns of the rectangle. +Reuse overlays where possible to prevent flicker." + (let* ((point (point)) + (overlays (or overlays 'evil-visual-block-overlays)) + (old (symbol-value overlays)) + (eol-col (and (memq this-command '(next-line previous-line)) + (numberp temporary-goal-column) + (1+ (min (round temporary-goal-column) + (1- most-positive-fixnum))))) + beg-col end-col new nlines overlay window-beg window-end) + (save-excursion + ;; calculate the rectangular region represented by BEG and END, + ;; but put BEG in the upper-left corner and END in the + ;; lower-right if not already there + (setq beg-col (evil-column beg) + end-col (evil-column end)) + (when (>= beg-col end-col) + (if (= beg-col end-col) + (setq end-col (1+ end-col)) + (evil-sort beg-col end-col)) + (setq beg (save-excursion + (goto-char beg) + (evil-move-to-column beg-col)) + end (save-excursion + (goto-char end) + (evil-move-to-column end-col 1)))) + ;; update end column with eol-col (extension to eol). + (when (and eol-col (> eol-col end-col)) + (setq end-col eol-col)) + ;; force a redisplay so we can do reliable window + ;; BEG/END calculations + (sit-for 0) + (setq window-beg (max (window-start) beg) + window-end (min (window-end) (1+ end)) + nlines (count-lines window-beg + (min window-end (point-max)))) + ;; iterate over those lines of the rectangle which are + ;; visible in the currently selected window + (goto-char window-beg) + (dotimes (_ nlines) + (let (before after row-beg row-end) + ;; beginning of row + (evil-move-to-column beg-col) + (when (< (current-column) beg-col) + ;; prepend overlay with virtual spaces if unable to + ;; move directly to the first column + (setq before + (propertize + (make-string + (- beg-col (current-column)) ?\s) + 'face + (or (get-text-property (1- (point)) 'face) + 'default)))) + (setq row-beg (point)) + ;; end of row + (evil-move-to-column end-col) + (when (and (not (eolp)) + (< (current-column) end-col)) + ;; append overlay with virtual spaces if unable to + ;; move directly to the last column + (setq after + (propertize + (make-string + (if (= (point) row-beg) + (- end-col beg-col) + (- end-col (current-column))) + ?\s) 'face 'region)) + ;; place cursor on one of the virtual spaces + (if (= point row-beg) + (put-text-property + 0 (min (length after) 1) + 'cursor t after) + (put-text-property + (max 0 (1- (length after))) (length after) + 'cursor t after))) + (setq row-end (min (point) (line-end-position))) + ;; trim old leading overlays + (while (and old + (setq overlay (car old)) + (< (overlay-start overlay) row-beg) + (/= (overlay-end overlay) row-end)) + (delete-overlay overlay) + (setq old (cdr old))) + ;; reuse an overlay if possible, otherwise create one + (cond + ((and old (setq overlay (car old)) + (or (= (overlay-start overlay) row-beg) + (= (overlay-end overlay) row-end))) + (move-overlay overlay row-beg row-end) + (overlay-put overlay 'before-string before) + (overlay-put overlay 'after-string after) + (setq new (cons overlay new) + old (cdr old))) + (t + (setq overlay (make-overlay row-beg row-end)) + (overlay-put overlay 'before-string before) + (overlay-put overlay 'after-string after) + (setq new (cons overlay new))))) + (forward-line 1)) + ;; display overlays + (dolist (overlay new) + (overlay-put overlay 'face 'region) + (overlay-put overlay 'priority 99)) + ;; trim old overlays + (dolist (overlay old) + (delete-overlay overlay)) + (set overlays (nreverse new))))) + +(defun evil-visual-range () + "Return the Visual selection as a range. +This is a list (BEG END TYPE PROPERTIES...), where BEG is the +beginning of the selection, END is the end of the selection, +TYPE is the selection's type, and PROPERTIES is a property list +of miscellaneous selection attributes." + (apply #'evil-range + evil-visual-beginning evil-visual-end + (evil-visual-type) + :expanded t + evil-visual-properties)) + +(defun evil-visual-direction () + "Return direction of Visual selection. +The direction is -1 if point precedes mark and 1 otherwise. +See also the variable `evil-visual-direction', which holds +the direction of the last selection." + (let* ((point (point)) + (mark (or (mark t) point))) + (if (< point mark) -1 1))) + +(defun evil-visual-type (&optional selection) + "Return the type of the Visual selection. +If SELECTION is specified, return the type of that instead." + (if (and (null selection) (evil-visual-state-p)) + (or evil-this-type (evil-visual-type evil-visual-selection)) + (setq selection (or selection evil-visual-selection)) + (symbol-value (cdr-safe (assq selection evil-visual-alist))))) + +(defun evil-visual-goto-end () + "Go to the last line of the Visual selection. +This position may differ from `evil-visual-end' depending on +the selection type, and is contained in the selection." + (let ((range (evil-contract-range (evil-visual-range)))) + (goto-char (evil-range-end range)))) + +(defun evil-visual-alist () + "Return an association list from types to selection symbols." + (mapcar #'(lambda (e) + (cons (symbol-value (cdr-safe e)) (cdr-safe e))) + evil-visual-alist)) + +(defun evil-visual-selection-function (selection) + "Return a selection function for TYPE. +Default to `evil-visual-make-region'." + (or (cdr-safe (assq selection evil-visual-alist)) + ;; generic selection function + 'evil-visual-make-region)) + +(defun evil-visual-selection-for-type (type) + "Return a Visual selection for TYPE." + (catch 'done + (dolist (selection evil-visual-alist) + (when (eq (symbol-value (cdr selection)) type) + (throw 'done (car selection)))))) + +(defun evil-visual-block-corner (&optional corner point mark) + "Block corner corresponding to POINT, with MARK in opposite corner. +Depending on POINT and MARK, the return value is `upper-left', +`upper-right', `lower-left' or `lower-right': + + upper-left +---+ upper-right + | | + lower-left +---+ lower-right + +One-column or one-row blocks are ambiguous. In such cases, +the horizontal or vertical component of CORNER is used. +CORNER defaults to `upper-left'." + (let* ((point (or point (point))) + (mark (or mark (mark t))) + (corner (symbol-name + (or corner + (and (overlayp evil-visual-overlay) + (overlay-get evil-visual-overlay + :corner)) + 'upper-left))) + (point-col (evil-column point)) + (mark-col (evil-column mark)) + horizontal vertical) + (cond + ((= point-col mark-col) + (setq horizontal + (or (and (string-match "left\\|right" corner) + (match-string 0 corner)) + "left"))) + ((< point-col mark-col) + (setq horizontal "left")) + ((> point-col mark-col) + (setq horizontal "right"))) + (cond + ((= (line-number-at-pos point) + (line-number-at-pos mark)) + (setq vertical + (or (and (string-match "upper\\|lower" corner) + (match-string 0 corner)) + "upper"))) + ((< point mark) + (setq vertical "upper")) + ((> point mark) + (setq vertical "lower"))) + (intern (format "%s-%s" vertical horizontal)))) + +;;; Operator-Pending state + +(evil-define-state operator + "Operator-Pending state." + :tag " <O> " + :cursor evil-half-cursor + :enable (evil-operator-shortcut-map operator motion normal)) + +(evil-define-keymap evil-operator-shortcut-map + "Keymap for Operator-Pending shortcuts like \"dd\" and \"gqq\"." + :local t + (setq evil-operator-shortcut-map (make-sparse-keymap)) + (evil-initialize-local-keymaps)) + +;; the half-height "Operator-Pending cursor" cannot be specified +;; as a static `cursor-type' value, since its height depends on +;; the current font size +(defun evil-half-cursor () + "Change cursor to a half-height box. +\(This is really just a thick horizontal bar.)" + (let ((height (/ (window-pixel-height) (* (window-height) 2)))) + (setq cursor-type (cons 'hbar height)))) + +;;; Replace state + +(evil-define-state replace + "Replace state." + :tag " <R> " + :cursor hbar + :message "-- REPLACE --" + :input-method t + (cond + ((evil-replace-state-p) + (overwrite-mode 1) + (add-hook 'pre-command-hook #'evil-replace-pre-command nil t) + (unless (eq evil-want-fine-undo t) + (evil-start-undo-step))) + (t + (overwrite-mode -1) + (remove-hook 'pre-command-hook #'evil-replace-pre-command t) + (unless (eq evil-want-fine-undo t) + (evil-end-undo-step)) + (evil-move-cursor-back))) + (setq evil-replace-alist nil)) + +(defun evil-replace-pre-command () + "Remember the character under point." + (when (evil-replace-state-p) + (unless (assq (point) evil-replace-alist) + (add-to-list 'evil-replace-alist + (cons (point) + (unless (eolp) + (char-after))))))) +(put 'evil-replace-pre-command 'permanent-local-hook t) + +(defun evil-replace-backspace () + "Restore character under cursor." + (interactive) + (let (char) + (backward-char) + (when (assq (point) evil-replace-alist) + (setq char (cdr (assq (point) evil-replace-alist))) + (save-excursion + (delete-char 1) + (when char + (insert char)))))) + +(defun evil-update-replace-alist (opoint count chars-to-delete &optional offset) + "Add CHARS-TO-DELETE chars to evil-replace-alist, starting at OPOINT. +If COUNT is greater than CHARS-TO-DELETE, pad the alist with nils. +Decrement recorded position by optional offset, or 0." + (when (evil-replace-state-p) + (dotimes (c count) + (let ((pos (+ c opoint))) + (add-to-list 'evil-replace-alist + (cons (- pos (or offset 0)) (when (< c chars-to-delete) + (char-after pos)))))))) + +;;; Motion state + +(evil-define-state motion + "Motion state." + :tag " <M> " + :suppress-keymap t) + +;;; Emacs state + +(evil-define-state emacs + "Emacs state." + :tag " <E> " + :message "-- EMACS --" + :input-method t + :intercept-esc nil) + +(provide 'evil-states) + +;;; evil-states.el ends here diff --git a/elpa/evil-20220510.2302/evil-states.elc b/elpa/evil-20220510.2302/evil-states.elc Binary files differnew file mode 100644 index 0000000..5d49059 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-states.elc diff --git a/elpa/evil-20220510.2302/evil-types.el b/elpa/evil-20220510.2302/evil-types.el new file mode 100644 index 0000000..a230b3c --- /dev/null +++ b/elpa/evil-20220510.2302/evil-types.el @@ -0,0 +1,460 @@ +;;; evil-types.el --- Type system -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; A type defines a transformation on a pair of buffer positions. +;; Types are used by Visual state (character/line/block selection) +;; and Operator-Pending state (character/line/block motions). +;; +;; The basic transformation is "expansion". For example, the `line' +;; type "expands" a pair of positions to whole lines by moving the +;; first position to the beginning of the line and the last position +;; to the end of the line. That expanded selection is what the rest +;; of Emacs sees and acts on. +;; +;; An optional transformation is "contraction", which is the opposite +;; of expansion. If the transformation is one-to-one, expansion +;; followed by contraction always returns the original range. +;; (The `line' type is not one-to-one, as it may expand multiple +;; positions to the same lines.) +;; +;; Another optional transformation is "normalization", which takes +;; two unexpanded positions and adjusts them before expansion. +;; This is useful for cleaning up "invalid" positions. +;; +;; Types are defined at the end of this file using the macro +;; `evil-define-type'. + +(require 'evil-common) +(require 'evil-macros) + +;;; Code: + +;;; Type definitions + +(evil-define-type exclusive + "Return the positions unchanged, with some exceptions. +If the end position is at the beginning of a line, then: + +* If the beginning position is at or before the first non-blank + character on the line, return `line' (expanded). + +* Otherwise, move the end position to the end of the previous + line and return `inclusive' (expanded)." + :normalize (lambda (beg end) + (cond + ((progn + (goto-char end) + (and (/= beg end) (bolp))) + (setq end (max beg (1- end))) + (cond + ((progn + (goto-char beg) + (looking-back "^[ \f\t\v]*" (line-beginning-position))) + (evil-expand beg end 'line)) + (t + (unless evil-cross-lines + (setq end (max beg (1- end)))) + (evil-expand beg end 'inclusive)))) + (t + (evil-range beg end)))) + :string (lambda (beg end) + (let ((width (- end beg))) + (format "%s character%s" width + (if (= width 1) "" "s"))))) + +(evil-define-type inclusive + "Include the character under point. +Handling for `evil-want-visual-char-semi-exclusive' is deprecated, +and will be removed in a future version." + :expand (lambda (beg end) + (if (and evil-want-visual-char-semi-exclusive + (evil-visual-state-p) + (< beg end) + (save-excursion + (goto-char end) + (or (bolp) (eolp)))) + (evil-range beg end 'exclusive) + (evil-range beg (1+ end)))) + :contract (lambda (beg end) + (evil-range beg (max beg (1- end)))) + :normalize (lambda (beg end) + (goto-char end) + (when (eq (char-after) ?\n) + (setq end (max beg (1- end)))) + (evil-range beg end)) + :string (lambda (beg end) + (let ((width (- end beg))) + (format "%s character%s" width + (if (= width 1) "" "s"))))) + +(evil-define-type line + "Include whole lines." + :one-to-one nil + :expand (lambda (beg end) + (evil-range + (progn + (goto-char beg) + (min (line-beginning-position) + (progn + ;; move to beginning of line as displayed + (evil-move-beginning-of-line) + (line-beginning-position)))) + (progn + (goto-char end) + (max (line-beginning-position 2) + (progn + ;; move to end of line as displayed + (evil-move-end-of-line) + (line-beginning-position 2)))))) + :contract (lambda (beg end) + (evil-range beg (max beg (1- end)))) + :string (lambda (beg end) + (let ((height (count-lines beg end))) + (format "%s line%s" height + (if (= height 1) "" "s"))))) + +(evil-define-type screen-line + "Include whole lines, being aware of `visual-line-mode' +when `evil-respect-visual-line-mode' is non-nil." + :one-to-one nil + :expand (lambda (beg end) + (if (or (not evil-respect-visual-line-mode) + (not visual-line-mode)) + (evil-line-expand beg end) + (evil-range + (progn + (goto-char beg) + (save-excursion + (beginning-of-visual-line))) + (progn + (goto-char end) + (save-excursion + ;; `beginning-of-visual-line' reverts to the beginning of the + ;; last visual line if the end of the last line is the end of + ;; the buffer. This would prevent selecting the last screen + ;; line. + (if (= (line-beginning-position 2) (point-max)) + (point-max) + (beginning-of-visual-line 2))))))) + :contract (lambda (beg end) + (evil-range beg (max beg (1- end)))) + :string (lambda (beg end) + (let ((height (count-screen-lines beg end))) + (format "%s screen line%s" height + (if (= height 1) "" "s"))))) + +(evil-define-type block + "Like `inclusive', but for rectangles: +the last column is included." + :expand (lambda (beg end &rest properties) + (let ((beg-col (evil-column beg)) + (end-col (evil-column end)) + (corner (plist-get properties :corner))) + ;; Since blocks are implemented as a pair of buffer + ;; positions, expansion is restricted to what the buffer + ;; allows. In the case of a one-column block, there are + ;; two ways to expand it (either move the upper corner + ;; beyond the lower corner, or the lower beyond the + ;; upper), so try out both possibilities when + ;; encountering the end of the line. + (cond + ((= beg-col end-col) + (goto-char end) + (cond + ((eolp) + (goto-char beg) + (if (eolp) + (evil-range beg end) + (evil-range (1+ beg) end))) + ((memq corner '(lower-right upper-right right)) + (evil-range (1+ beg) end)) + (t + (evil-range beg (1+ end))))) + ((< beg-col end-col) + (goto-char end) + (if (eolp) + (evil-range beg end) + (evil-range beg (1+ end)))) + (t + (goto-char beg) + (if (eolp) + (evil-range beg end) + (evil-range (1+ beg) end)))))) + :contract (lambda (beg end) + (let ((beg-col (evil-column beg)) + (end-col (evil-column end))) + (if (> beg-col end-col) + (evil-range (1- beg) end) + (evil-range beg (max beg (1- end)))))) + :string (lambda (beg end) + (let ((height (count-lines + beg + (progn + (goto-char end) + (if (and (bolp) (not (eobp))) + (1+ end) + end)))) + (width (abs (- (evil-column beg) + (evil-column end))))) + (format "%s row%s and %s column%s" + height + (if (= height 1) "" "s") + width + (if (= width 1) "" "s")))) + :rotate (lambda (beg end &rest properties) + "Rotate block according to :corner property. +:corner can be one of `upper-left',``upper-right', `lower-left' +and `lower-right'." + (let ((left (evil-column beg)) + (right (evil-column end)) + (corner (or (plist-get properties :corner) + 'upper-left))) + (evil-sort left right) + (goto-char beg) + (if (memq corner '(upper-right lower-left)) + (move-to-column right) + (move-to-column left)) + (setq beg (point)) + (goto-char end) + (if (memq corner '(upper-right lower-left)) + (move-to-column left) + (move-to-column right)) + (setq end (point)) + (setq properties (plist-put properties + :corner corner)) + (apply #'evil-range beg end properties)))) + +(evil-define-type rectangle + "Like `exclusive', but for rectangles: +the last column is excluded." + :expand (lambda (beg end) + ;; select at least one column + (if (= (evil-column beg) (evil-column end)) + (evil-expand beg end 'block) + (evil-range beg end 'block)))) + +;;; Standard interactive codes + +(evil-define-interactive-code "*" + "Signal error if the buffer is read-only." + (when buffer-read-only + (signal 'buffer-read-only nil))) + +(evil-define-interactive-code "b" (prompt) + "Name of existing buffer." + (list (read-buffer prompt (current-buffer) t))) + +(evil-define-interactive-code "c" + "Read character." + (list (read-char))) + +(evil-define-interactive-code "p" + "Prefix argument converted to number." + (list (prefix-numeric-value current-prefix-arg))) + +(evil-define-interactive-code "P" + "Prefix argument in raw form." + (list current-prefix-arg)) + +;;; Custom interactive codes + +(evil-define-interactive-code "<c>" + "Count." + (list (when current-prefix-arg + (prefix-numeric-value + current-prefix-arg)))) + +(evil-define-interactive-code "<vc>" + "Count, but only in visual state. +This should be used by an operator taking a count. In normal +state the count should not be handled by the operator but by the +motion that defines the operator's range. In visual state the +range is specified by the visual region and the count is not used +at all. Thus in the case the operator may use the count +directly." + (list (when (and (evil-visual-state-p) current-prefix-arg) + (prefix-numeric-value + current-prefix-arg)))) + +(evil-define-interactive-code "<C>" + "Character read through `evil-read-key'." + (list + (if (evil-operator-state-p) + (evil-without-restriction (evil-read-key)) + (evil-read-key)))) + +(evil-define-interactive-code "<r>" + "Untyped motion range (BEG END)." + (evil-operator-range)) + +(evil-define-interactive-code "<R>" + "Typed motion range (BEG END TYPE)." + (evil-operator-range t)) + +(evil-define-interactive-code "<v>" + "Typed motion range of visual range(BEG END TYPE). +If visual state is inactive then those values are nil." + (if (evil-visual-state-p) + (let ((range (evil-visual-range))) + (list (car range) + (cadr range) + (evil-type range))) + (list nil nil nil))) + +(evil-define-interactive-code "<x>" + "Current register." + (list evil-this-register)) + +(evil-define-interactive-code "<y>" + "Current yank-handler." + (list (evil-yank-handler))) + +(evil-define-interactive-code "<a>" + "Ex argument." + :ex-arg t + (list (when (evil-ex-p) evil-ex-argument))) + +(evil-define-interactive-code "<N>" () + "Prefix argument or ex-arg, converted to number" + (list (cond + (current-prefix-arg (prefix-numeric-value current-prefix-arg)) + ((and evil-ex-argument (evil-ex-p)) (string-to-number evil-ex-argument)) + ((evil-ex-p) nil) + (t 1)))) + +(evil-define-interactive-code "<f>" + "Ex file argument." + :ex-arg file + (list (when (evil-ex-p) (evil-ex-file-arg)))) + +(evil-define-interactive-code "<b>" + "Ex buffer argument." + :ex-arg buffer + (list (when (evil-ex-p) evil-ex-argument))) + +(evil-define-interactive-code "<sh>" + "Ex shell command argument." + :ex-arg shell + (list (when (evil-ex-p) evil-ex-argument))) + +(evil-define-interactive-code "<fsh>" + "Ex file or shell command argument." + :ex-arg file-or-shell + (list (when (evil-ex-p) evil-ex-argument))) + +(evil-define-interactive-code "<sym>" + "Ex symbolic argument." + :ex-arg sym + (list (when (and (evil-ex-p) evil-ex-argument) + (intern evil-ex-argument)))) + +(evil-define-interactive-code "<addr>" + "Ex line number." + (list + (and (evil-ex-p) + (let ((expr (evil-ex-parse evil-ex-argument))) + (if (eq (car expr) 'evil-goto-line) + (save-excursion + (goto-char evil-ex-point) + (eval (cadr expr))) + (user-error "Invalid address")))))) + +(evil-define-interactive-code "<!>" + "Ex bang argument." + :ex-bang t + (list (when (evil-ex-p) evil-ex-bang))) + +(evil-define-interactive-code "</>" + "Ex delimited argument." + (when (evil-ex-p) + (evil-delimited-arguments evil-ex-argument))) + +(evil-define-interactive-code "<g/>" + "Ex global argument." + (when (evil-ex-p) + (evil-ex-parse-global evil-ex-argument))) + +(evil-define-interactive-code "<s/>" + "Ex substitution argument." + :ex-arg substitution + (when (evil-ex-p) + (evil-ex-get-substitute-info evil-ex-argument t))) + +(evil-define-interactive-code "<xc/>" + "Ex register and count argument, both optional. +Can be used for commands such as :delete [REGISTER] [COUNT] where the +command can be called with either zero, one or two arguments. When the +argument is one, if it's numeric it's treated as a COUNT, otherwise - +REGISTER" + (when (evil-ex-p) + (evil-ex-get-optional-register-and-count evil-ex-argument))) + +(defun evil-ex-get-optional-register-and-count (string) + "Parse STRING as an ex arg with both optional REGISTER and COUNT. +Returns a list (REGISTER COUNT)." + (let* ((split-args (split-string (or string ""))) + (arg-count (length split-args)) + (arg0 (car split-args)) + (arg1 (cadr split-args)) + (number-regex "^-?[1-9][0-9]*$") + (register nil) + (count nil)) + (cond + ;; :command REGISTER or :command COUNT + ((= arg-count 1) + (if (string-match-p number-regex arg0) + (setq count arg0) + (setq register arg0))) + ;; :command REGISTER COUNT + ((eq arg-count 2) + (setq register arg0 + count arg1)) + ;; more than 2 args aren't allowed + ((> arg-count 2) + (user-error "Invalid use"))) + + ;; if register is given, check it's valid + (when register + (unless (= (length register) 1) + (user-error "Invalid register")) + (setq register (string-to-char register))) + + ;; if count is given, check it's valid + (when count + (unless (string-match-p number-regex count) + (user-error "Invalid count")) + (setq count (string-to-number count)) + (unless (> count 0) + (user-error "Invalid count"))) + + (list register count))) + +(provide 'evil-types) + +;;; evil-types.el ends here diff --git a/elpa/evil-20220510.2302/evil-types.elc b/elpa/evil-20220510.2302/evil-types.elc Binary files differnew file mode 100644 index 0000000..bc6336d --- /dev/null +++ b/elpa/evil-20220510.2302/evil-types.elc diff --git a/elpa/evil-20220510.2302/evil-vars.el b/elpa/evil-20220510.2302/evil-vars.el new file mode 100644 index 0000000..5bf1d17 --- /dev/null +++ b/elpa/evil-20220510.2302/evil-vars.el @@ -0,0 +1,2102 @@ +;;; evil-vars.el --- Settings and variables -*- lexical-binding: t -*- + +;; Author: Vegard Øye <vegard_oye at hotmail.com> +;; Maintainer: Vegard Øye <vegard_oye at hotmail.com> + +;; Version: 1.15.0 + +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Code: + +(declare-function evil-add-command-properties "evil-common" + (command &rest properties)) +(declare-function evil-update-insert-state-bindings "evil-maps" + (&optional _option-name remove force)) + +;;; Hooks + +(defvar evil-after-load-hook nil + "Functions to be run when loading of Evil is finished. +This hook can be used the execute some initialization routines +when Evil is completely loaded.") + +(defcustom evil-goto-definition-functions + '(evil-goto-definition-imenu + evil-goto-definition-semantic + evil-goto-definition-xref + evil-goto-definition-search) + "List of functions run until success by `evil-goto-definition'." + :type 'hook + :group 'evil) + +;;; Initialization + +(defvar evil-pending-custom-initialize nil + "A list of pending initializations for custom variables. +Each element is a triple (FUNC VAR VALUE). When Evil is +completely loaded then the functions (funcall FUNC VAR VALUE) is +called for each element. FUNC should be a function suitable for +the :initialize property of `defcustom'.") + +(defun evil-custom-initialize-pending-reset (var value) + "Add a pending customization with `custom-initialize-reset'." + (push (list 'custom-initialize-reset var value) + evil-pending-custom-initialize)) + +(defun evil-run-pending-custom-initialize () + "Executes the pending initializations. +See `evil-pending-custom-initialize'." + (dolist (init evil-pending-custom-initialize) + (apply (car init) (cdr init))) + (remove-hook 'evil-after-load-hook 'evil-run-pending-custom-initialize)) +(add-hook 'evil-after-load-hook 'evil-run-pending-custom-initialize) + +;;; Setters + +(defun evil-set-toggle-key (key) + "Set `evil-toggle-key' to KEY. +KEY must be readable by `read-kbd-macro'." + (let ((old-key (read-kbd-macro + (if (boundp 'evil-toggle-key) + evil-toggle-key + "C-z"))) + (key (read-kbd-macro key))) + (with-no-warnings + (dolist (pair '((evil-motion-state-map evil-emacs-state) + (evil-insert-state-map evil-emacs-state) + (evil-emacs-state-map evil-exit-emacs-state))) + (when (boundp (car pair)) + (let ((map (symbol-value (car pair))) + (fun (cadr pair))) + (when (keymapp map) + (define-key map key fun) + (define-key map old-key nil)))))))) + +(defun evil-set-custom-state-maps (var pending-var key _make newlist) + "Changes the list of special keymaps. +VAR is the variable containing the list of keymaps. +PENDING-VAR is the variable containing the list of the currently pending + keymaps. +KEY the special symbol to be stored in the keymaps. +MAKE the creation function of the special keymaps. +NEWLIST the list of new special keymaps." + (set-default pending-var newlist) + (when (default-boundp var) + (dolist (map (default-value var)) + (when (and (boundp (car map)) + (keymapp (default-value (car map)))) + (define-key (default-value (car map)) (vector key) nil)))) + (set-default var newlist) + (evil-update-pending-maps)) + +(defun evil-update-pending-maps (&optional _file) + "Tries to set pending special keymaps. +This function should be called from an `after-load-functions' +hook." + (let ((maps '((evil-make-overriding-map . evil-pending-overriding-maps) + (evil-make-intercept-map . evil-pending-intercept-maps)))) + (while maps + (let* ((map (pop maps)) + (make (car map)) + (pending-var (cdr map)) + (pending (symbol-value pending-var)) + newlist) + (while pending + (let* ((map (pop pending)) + (kmap (and (boundp (car map)) + (keymapp (symbol-value (car map))) + (symbol-value (car map)))) + (state (cdr map))) + (if kmap + (funcall make kmap state) + (push map newlist)))) + (set-default pending-var newlist))))) + +(defun evil-set-visual-newline-commands (var value) + "Set the value of `evil-visual-newline-commands'. +Setting this variable changes the properties of the appropriate +commands." + (with-no-warnings + (when (default-boundp var) + (dolist (cmd (default-value var)) + (evil-set-command-property cmd :exclude-newline nil))) + (set-default var value) + (dolist (cmd (default-value var)) + (evil-set-command-property cmd :exclude-newline t)))) + +(defun evil-set-custom-motions (var values) + "Sets the list of motion commands." + (with-no-warnings + (when (default-boundp var) + (dolist (motion (default-value var)) + (evil-add-command-properties motion :keep-visual nil :repeat nil))) + (set-default var values) + (mapc #'evil-declare-motion (default-value var)))) + +;;; Customization group + +(defgroup evil nil + "Extensible vi layer." + :group 'emulations + :prefix 'evil-) + +(defcustom evil-auto-indent t + "\\<evil-normal-state-map> +Whether to auto-indent when opening lines with \\[evil-open-below] \ +and \\[evil-open-above]." + :type 'boolean + :group 'evil) +(make-variable-buffer-local 'evil-auto-indent) + +(defcustom evil-shift-width 4 + "\\<evil-normal-state-map> +The number of columns by which a line is shifted. +This applies to the shifting operators \\[evil-shift-right] and \ +\\[evil-shift-left]." + :type 'integer + :group 'evil) +(make-variable-buffer-local 'evil-shift-width) + +(defcustom evil-shift-round t + "\\<evil-normal-state-map> +Whether shifting rounds to the nearest multiple. +If non-nil, \\[evil-shift-right] and \\[evil-shift-left] adjust line +indentation to the nearest multiple of `evil-shift-width'." + :type 'boolean + :group 'evil) +(make-variable-buffer-local 'evil-shift-round) + +(defcustom evil-indent-convert-tabs t + "\\<evil-normal-state-map> +If non-nil, the \\[evil-indent] operator converts between leading tabs and spaces. +Whether tabs are converted to spaces or vice versa depends on the +value of `indent-tabs-mode'." + :type 'boolean + :group 'evil) + +(defcustom evil-default-cursor t + "The default cursor. +May be a cursor type as per `cursor-type', a color string as passed +to `set-cursor-color', a zero-argument function for changing the +cursor, or a list of the above." + :type '(set symbol (cons symbol symbol) string function) + :group 'evil) + +(defvar evil-force-cursor nil + "Overwrite the current states default cursor.") + +(defcustom evil-start-of-line nil + "Analogue of vim's `startofline'. +If nil, preserve column when making relevant movements of the cursor. +Otherwise, move the cursor to the start of the line." + :type 'boolean + :group 'evil) + +(defcustom evil-repeat-move-cursor t + "\\<evil-normal-state-map> +Whether repeating commands with \\[evil-repeat] may move the cursor. +If nil, the original cursor position is preserved, even if the command +normally would have moved the cursor." + :type 'boolean + :group 'evil) + +(defcustom evil-cross-lines nil + "\\<evil-motion-state-map> +Whether horizontal motions may move to other lines. If non-nil, +certain motions that conventionally operate in a single line may move +the cursor to other lines. Otherwise, they are restricted to the +current line. This applies to \\[evil-backward-char], \ +\\[evil-forward-char], \\[evil-find-char], \ +\\[evil-find-char-backward], \\[evil-find-char-to], \ +\\[evil-find-char-to-backward], \ +\\<evil-normal-state-map>\\[evil-invert-char]." + :type 'boolean + :group 'evil) + +(defcustom evil-backspace-join-lines t + "Whether backward delete in insert state may join lines." + :type 'boolean + :group 'evil) + +(defcustom evil-move-cursor-back t + "Whether the cursor is moved backwards when exiting insert state. +If non-nil, the cursor moves \"backwards\" when exiting insert state, +so that it ends up on the character to the left. Otherwise it remains +in place, on the character to the right. + +See also `evil-move-beyond-eol'." + :type 'boolean + :group 'evil) + +(defcustom evil-move-beyond-eol nil + "Whether the cursor can move past the end of the line. +If non-nil, the cursor is allowed to move one character past the +end of the line, as in Emacs." + :type 'boolean + :group 'evil) + +(defcustom evil-respect-visual-line-mode nil + "\\<evil-motion-state-map> +Whether movement commands respect `visual-line-mode'. +If non-nil, `visual-line-mode' is generally respected when it is +on. In this case, motions such as \\[evil-next-line] and +\\[evil-previous-line] navigate by visual lines (on the screen) rather +than \"physical\" lines (defined by newline characters). If nil, +the setting of `visual-line-mode' is ignored. + +This variable must be set before Evil is loaded." + :type 'boolean + :group 'evil) + +(defcustom evil-repeat-find-to-skip-next t + "Whether a repeat of t or T should skip an adjacent character." + :type 'boolean + :group 'evil) + +(defcustom evil-kbd-macro-suppress-motion-error nil + "\\<evil-motion-state-map> +Whether left/right motions signal errors in keyboard macros. +This variable only affects beginning-of-line or end-of-line errors +regarding the motions \\[evil-backward-char] and \\[evil-forward-char] +respectively. This may be desired since such errors cause macro +definition or execution to be terminated. There are four +possibilities: + +- `record': errors are suppressed when recording macros, but not when + replaying them. +- `replay': errors are suppressed when replaying macros, but not when + recording them. +- `t': errors are suppressed in both cases. +- `nil': errors are never suppressed." + :type '(radio (const :tag "No" :value nil) + (const :tag "Record" :value record) + (const :tag "Replay" :value replay) + (const :tag "Both" :value t)) + :group 'evil) + +(defcustom evil-track-eol t + "\\<evil-motion-state-map> +Whether \\[evil-end-of-line] \"sticks\" the cursor to the end of the line. +If non-nil, vertical motions after \\[evil-end-of-line] maintain the cursor at the +end of the line, even if the target line is longer. This is analogous +to `track-eol', but respects Evil's interpretation of end-of-line." + :type 'boolean + :group 'evil) + +(defcustom evil-mode-line-format 'before + "The position of the state tag in the mode line. +If set to `before' or `after', the tag is placed at the beginning +or the end of the mode-line, respectively. If nil, there is no +tag. Otherwise it should be a cons cell (WHERE . WHICH), where +WHERE is either `before' or `after', and WHICH is a symbol in +`mode-line-format'. The tag is then placed before or after that +symbol, respectively." + :type '(radio :value 'before + (const before) + (const after) + (cons :tag "Next to symbol" + (choice :value after + (const before) + (const after)) + symbol)) + :group 'evil) + +(defcustom evil-mouse-word 'evil-word + "The thing-at-point symbol for double click selection. +The double-click starts visual state in a special word selection +mode. This symbol is used to determine the words to be +selected. Possible values are `evil-word' or `evil-WORD'." + :type 'symbol + :group 'evil) + +(defcustom evil-bigword "^ \t\r\n" + "The set of characters to be interpreted as WORD boundaries. +This is enclosed with square brackets and used as a regular +expression. By default, whitespace characters are considered +WORD boundaries." + :type 'string + :group 'evil) +(make-variable-buffer-local 'evil-bigword) + +(defcustom evil-want-fine-undo nil + "Whether actions are undone in several steps. +There are two possible choices: nil (\"no\") means that all +changes made during insert state, including a possible delete +after a change operation, are collected in a single undo step. +Non-nil (\"yes\") means that undo steps are determined according +to Emacs heuristics, and no attempt is made to aggregate changes. + +For backward compatibility purposes, the value `fine' is +interpreted as `nil'. This option was removed because it did not +work consistently." + :type '(radio (const :tag "No" :value nil) + (const :tag "Fine (obsolete)" :value fine) + (const :tag "Yes" :value t)) + :group 'evil) + +(defcustom evil-regexp-search t + "\\<evil-motion-state-map> +Whether to use regular expressions for searching in \ +\\[evil-search-forward] and \\[evil-search-backward]." + :type 'boolean + :group 'evil) + +(defcustom evil-search-wrap t + "\\<evil-motion-state-map> +Whether search with \\[evil-search-forward] and \ +\\[evil-search-backward] wraps around the buffer. +If this is non-nil, search stops at the buffer boundaries." + :type 'boolean + :group 'evil) + +(defcustom evil-flash-delay 2 + "\\<evil-motion-state-map> +Time in seconds to flash search matches after \\[evil-search-next] and \ +\\[evil-search-previous]." + :type 'number + :group 'evil) + +(defcustom evil-auto-balance-windows t + "If non-nil window creation and deletion trigger rebalancing." + :type 'boolean + :group 'evil) + +(defcustom evil-split-window-below nil + "If non-nil split windows are created below." + :type 'boolean + :group 'evil) + +(defcustom evil-vsplit-window-right nil + "If non-nil vertically split windows with are created to the right." + :type 'boolean + :group 'evil) + +(defcustom evil-esc-delay 0.01 + "The time, in seconds, to wait for another key after escape. +If no further event arrives during this time, the event is +translated to `ESC'. Otherwise, it is translated according to +`input-decode-map'. This does not apply in Emacs state, and may +also be inhibited by setting `evil-inhibit-esc'." + :type 'number + :group 'evil) + +(defvar evil-esc-mode nil + "Non-nil if `evil-esc-mode' is enabled.") + +(defvar evil-esc-map nil + "Original ESC prefix map in `input-decode-map'. +Used by `evil-esc-mode'.") + +(defvar evil-inhibit-esc nil + "If non-nil, the \\e event will never be translated to 'escape.") + +(defcustom evil-intercept-esc 'always + "Whether Evil should intercept the escape key. +In the terminal, escape and a meta key sequence both generate the +same event. In order to distingush these, Evil uses +`input-decode-map'. It is not necessary to do this in a graphical +Emacs session. However, if you prefer to use `C-[' as escape (which +is identical to the terminal escape key code), this interception must +also happen in graphical Emacs sessions. Set this variable to +`always', t (only in the terminal) or nil (never intercept)." + :type '(radio (const :tag "Never" :value nil) + (const :tag "In terminal only" :value t) + (const :tag "Always" :value always)) + :group 'evil) + +(defcustom evil-show-paren-range 0 + "The minimal distance between point and a parenthesis +which causes the parenthesis to be highlighted." + :type 'integer + :group 'evil) + +(defcustom evil-ex-hl-update-delay 0.02 + "Time in seconds of idle before updating search highlighting. +Setting this to a period shorter than that of keyboard's repeat +rate allows highlights to update while scrolling." + :type 'number + :group 'evil) + +(defcustom evil-highlight-closing-paren-at-point-states + '(not emacs insert replace) + "The states in which the closing parenthesis at point should be highlighted. +All states listed here highlight the closing parenthesis at +point (which is Vim's default behavior). All others highlight the +parenthesis before point (which is Emacs default behavior). If +this list contains the symbol `not' then its meaning is inverted, +i.e. all states listed here highlight the closing parenthesis +before point." + :type '(repeat symbol) + :group 'evil) + +(defcustom evil-kill-on-visual-paste t + "Whether pasting in visual state adds the replaced text to the +kill ring, making it the default for the next paste. The default, +replicates the default Vim behavior." + :type 'boolean + :group 'evil) + +(defcustom evil-want-C-i-jump t + "Whether `C-i' jumps forward in the jump list (like Vim). +Otherwise, `C-i' inserts a tab character." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (boundp 'evil-motion-state-map) + (cond + ((and (not value) + (eq (lookup-key evil-motion-state-map (kbd "C-i")) + 'evil-jump-forward)) + (define-key evil-motion-state-map (kbd "C-i") nil)) + ((and value + (not (lookup-key evil-motion-state-map (kbd "C-i")))) + (define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward)))))) + +(defcustom evil-want-C-u-scroll nil + "Whether `C-u' scrolls up (like Vim). +Otherwise, `C-u' applies a prefix argument. The binding of +`C-u' mirrors Emacs behaviour by default due to the relative +ubiquity of prefix arguments." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (boundp 'evil-motion-state-map) + (cond + ((and (not value) + (eq (lookup-key evil-motion-state-map (kbd "C-u")) + 'evil-scroll-up)) + (define-key evil-motion-state-map (kbd "C-u") nil)) + ((and value + (not (lookup-key evil-motion-state-map (kbd "C-u")))) + (define-key evil-motion-state-map (kbd "C-u") 'evil-scroll-up)))))) + +(defcustom evil-want-C-d-scroll t + "Whether `C-d' scrolls down (like Vim)." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (boundp 'evil-motion-state-map) + (cond + ((and (not value) + (eq (lookup-key evil-motion-state-map (kbd "C-d")) + 'evil-scroll-down)) + (define-key evil-motion-state-map (kbd "C-d") nil)) + ((and value + (not (lookup-key evil-motion-state-map (kbd "C-d")))) + (define-key evil-motion-state-map (kbd "C-d") 'evil-scroll-down)))))) + +(defcustom evil-want-C-u-delete nil + "Whether `C-u' deletes back to indentation in insert state. +Otherwise, `C-u' applies a prefix argument. The binding of +`C-u' mirrors Emacs behaviour by default due to the relative +ubiquity of prefix arguments." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) + (cond + ((and (not value) + (eq (lookup-key evil-insert-state-map (kbd "C-u")) + 'evil-delete-back-to-indentation)) + (define-key evil-insert-state-map (kbd "C-u") nil) + (define-key evil-replace-state-map (kbd "C-u") nil)) + ((and value + (not (lookup-key evil-insert-state-map (kbd "C-u")))) + (define-key evil-insert-state-map (kbd "C-u") 'evil-delete-back-to-indentation) + (define-key evil-replace-state-map (kbd "C-u") 'evil-delete-back-to-indentation)))))) + +(defcustom evil-want-C-w-delete t + "Whether `C-w' deletes a word in Insert state." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) + (cond + ((and (not value) + (eq (lookup-key evil-insert-state-map (kbd "C-w")) + 'evil-delete-backward-word)) + (define-key evil-insert-state-map (kbd "C-w") 'evil-window-map) + (define-key evil-replace-state-map (kbd "C-w") 'evil-window-map)) + ((and value + (eq (lookup-key evil-insert-state-map (kbd "C-w")) + 'evil-window-map)) + (define-key evil-insert-state-map (kbd "C-w") 'evil-delete-backward-word) + (define-key evil-replace-state-map (kbd "C-w") 'evil-delete-backward-word)))))) + +(defcustom evil-want-C-h-delete nil + "Whether `C-h' deletes a char in Insert state." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) + (cond + ((and (not value) + (eq (lookup-key evil-insert-state-map (kbd "C-h")) + 'evil-delete-backward-char-and-join)) + (define-key evil-insert-state-map (kbd "C-h") nil) + (define-key evil-replace-state-map (kbd "C-h") nil)) + ((and value + (not (lookup-key evil-insert-state-map (kbd "C-h")))) + (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join) + (define-key evil-replace-state-map (kbd "C-h") 'evil-replace-backspace)))))) + +(defcustom evil-want-C-g-bindings nil + "Whether `C-g' postfix can be used in bindings." + :type 'boolean + :group 'evil) + +(defcustom evil-want-C-w-in-emacs-state nil + "Whether `C-w' prefixes windows commands in Emacs state." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (boundp 'evil-emacs-state-map) + (cond + ((and (not value) + (eq (lookup-key evil-emacs-state-map (kbd "C-w")) + 'evil-window-map)) + (define-key evil-emacs-state-map (kbd "C-w") nil)) + ((and value + (not (lookup-key evil-emacs-state-map (kbd "C-w")))) + (define-key evil-emacs-state-map (kbd "C-w") 'evil-window-map)))))) + +(defcustom evil-want-change-word-to-end t + "Whether `cw' behaves like `ce'." + :type 'boolean + :group 'evil) + +(defcustom evil-want-Y-yank-to-eol nil + "Whether `Y' yanks to the end of the line. +The default behavior is to yank the whole line, like Vim." + :group 'evil + :type 'boolean + :initialize #'evil-custom-initialize-pending-reset + :set #'(lambda (sym value) + (set-default sym value) + (evil-add-command-properties + 'evil-yank-line + :motion (if value + 'evil-end-of-line-or-visual-line + 'evil-line-or-visual-line)))) + +(defcustom evil-disable-insert-state-bindings nil + "Whether insert state bindings should be used. +Bindings for escape, delete and `evil-toggle-key' are always +available. If this is non-nil, default Emacs bindings are by and +large accessible in insert state." + :group 'evil + :type 'boolean + :initialize #'evil-custom-initialize-pending-reset + :set #'(lambda (sym value) + (set-default sym value) + (evil-update-insert-state-bindings sym value))) + +(defcustom evil-echo-state t + "Whether to signal the current state in the echo area." + :type 'boolean + :group 'evil) + +(defcustom evil-complete-all-buffers t + "\\<evil-insert-state-map> +Whether completion looks for matches in all buffers. +This applies to \\[evil-complete-next] and \\[evil-complete-previous] \ +in insert state." + :type 'boolean + :group 'evil) + +(defcustom evil-search-wrap-ring-bell nil + "Whether to ring the bell when search wraps around the buffer." + :type 'boolean + :group 'evil) + +(defvar dabbrev-search-these-buffers-only) +(defvar dabbrev-case-distinction) +(defcustom evil-complete-next-func + #'(lambda (arg) + (require 'dabbrev) + (let ((dabbrev-search-these-buffers-only + (unless evil-complete-all-buffers + (list (current-buffer)))) + dabbrev-case-distinction) + (condition-case nil + (if (eq last-command this-command) + (dabbrev-expand nil) + (dabbrev-expand (- (abs (or arg 1))))) + (error (dabbrev-expand nil))))) + "Completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-next]." + :type 'function + :group 'evil) + +(defcustom evil-complete-previous-func + #'(lambda (arg) + (require 'dabbrev) + (let ((dabbrev-search-these-buffers-only + (unless evil-complete-all-buffers + (list (current-buffer)))) + dabbrev-case-distinction) + (dabbrev-expand arg))) + "Completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-previous]." + :type 'function + :group 'evil) + +(defcustom evil-complete-next-minibuffer-func 'minibuffer-complete + "Minibuffer completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-next]." + :type 'function + :group 'evil) + +(defcustom evil-complete-previous-minibuffer-func 'minibuffer-complete + "Minibuffer completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-previous]." + :type 'function + :group 'evil) + +(defcustom evil-complete-next-line-func + #'(lambda (arg) + (let ((hippie-expand-try-functions-list + '(try-expand-line + try-expand-line-all-buffers))) + (hippie-expand arg))) + "Minibuffer completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-next-line]." + :type 'function + :group 'evil) + +(defcustom evil-complete-previous-line-func + evil-complete-next-line-func + "Minibuffer completion function used by \ +\\<evil-insert-state-map>\\[evil-complete-previous-line]." + :type 'function + :group 'evil) + +(defcustom evil-lookup-func #'woman + "Lookup function used by \ +\"\\<evil-motion-state-map>\\[evil-lookup]\"." + :type 'function + :group 'evil) + +(defcustom evil-toggle-key "C-z" + "The key used to change to and from Emacs state. +Must be readable by `read-kbd-macro'. For example: \"C-z\"." + :type 'string + :group 'evil + :set #'(lambda (sym value) + (evil-set-toggle-key value) + (set-default sym value))) + +(defcustom evil-default-state 'normal + "The default Evil state. +This is the state a buffer starts in when it is not otherwise +configured (see `evil-set-initial-state' and +`evil-buffer-regexps'). The value may be one of `normal', +`insert', `visual', `replace', `operator', `motion' and `emacs'." + :type 'symbol + :group 'evil) + +(defcustom evil-buffer-regexps + '(("^ \\*load\\*" . nil)) + "Regular expressions determining the initial state for a buffer. +Entries have the form (REGEXP . STATE), where REGEXP is a regular +expression matching the buffer's name and STATE is one of `normal', +`insert', `visual', `replace', `operator', `motion', `emacs' and +`nil'. If STATE is `nil', Evil is disabled in the buffer." + :type '(alist :key-type string :value-type symbol) + :group 'evil) + +(defcustom evil-emacs-state-modes + '(5x5-mode + archive-mode + bbdb-mode + biblio-selection-mode + blackbox-mode + bookmark-bmenu-mode + bookmark-edit-annotation-mode + browse-kill-ring-mode + bs-mode + bubbles-mode + bzr-annotate-mode + calc-mode + cfw:calendar-mode + completion-list-mode + Custom-mode + custom-theme-choose-mode + debugger-mode + delicious-search-mode + desktop-menu-blist-mode + desktop-menu-mode + doc-view-mode + dun-mode + dvc-bookmarks-mode + dvc-diff-mode + dvc-info-buffer-mode + dvc-log-buffer-mode + dvc-revlist-mode + dvc-revlog-mode + dvc-status-mode + dvc-tips-mode + ediff-mode + ediff-meta-mode + efs-mode + Electric-buffer-menu-mode + emms-browser-mode + emms-mark-mode + emms-metaplaylist-mode + emms-playlist-mode + ess-help-mode + etags-select-mode + fj-mode + gc-issues-mode + gdb-breakpoints-mode + gdb-disassembly-mode + gdb-frames-mode + gdb-locals-mode + gdb-memory-mode + gdb-registers-mode + gdb-threads-mode + gist-list-mode + git-rebase-mode + gnus-article-mode + gnus-browse-mode + gnus-group-mode + gnus-server-mode + gnus-summary-mode + gomoku-mode + google-maps-static-mode + ibuffer-mode + jde-javadoc-checker-report-mode + magit-cherry-mode + magit-diff-mode + magit-log-mode + magit-log-select-mode + magit-popup-mode + magit-popup-sequence-mode + magit-process-mode + magit-reflog-mode + magit-refs-mode + magit-revision-mode + magit-stash-mode + magit-stashes-mode + magit-status-mode + mh-folder-mode + monky-mode + mpuz-mode + mu4e-main-mode + mu4e-headers-mode + mu4e-view-mode + notmuch-hello-mode + notmuch-search-mode + notmuch-show-mode + notmuch-tree-mode + occur-mode + org-agenda-mode + package-menu-mode + pdf-outline-buffer-mode + pdf-view-mode + proced-mode + rcirc-mode + rebase-mode + recentf-dialog-mode + reftex-select-bib-mode + reftex-select-label-mode + reftex-toc-mode + sldb-mode + slime-inspector-mode + slime-thread-control-mode + slime-xref-mode + snake-mode + solitaire-mode + sr-buttons-mode + sr-mode + sr-tree-mode + sr-virtual-mode + tar-mode + tetris-mode + tla-annotate-mode + tla-archive-list-mode + tla-bconfig-mode + tla-bookmarks-mode + tla-branch-list-mode + tla-browse-mode + tla-category-list-mode + tla-changelog-mode + tla-follow-symlinks-mode + tla-inventory-file-mode + tla-inventory-mode + tla-lint-mode + tla-logs-mode + tla-revision-list-mode + tla-revlog-mode + tla-tree-lint-mode + tla-version-list-mode + twittering-mode + urlview-mode + vc-annotate-mode + vc-dir-mode + vc-git-log-view-mode + vc-hg-log-view-mode + vc-svn-log-view-mode + vm-mode + vm-summary-mode + w3m-mode + wab-compilation-mode + xgit-annotate-mode + xgit-changelog-mode + xgit-diff-mode + xgit-revlog-mode + xhg-annotate-mode + xhg-log-mode + xhg-mode + xhg-mq-mode + xhg-mq-sub-mode + xhg-status-extra-mode) + "Modes that should come up in Emacs state." + :type '(repeat symbol) + :group 'evil) + +(defcustom evil-insert-state-modes + '(comint-mode + erc-mode + eshell-mode + geiser-repl-mode + gud-mode + inferior-apl-mode + inferior-caml-mode + inferior-emacs-lisp-mode + inferior-j-mode + inferior-python-mode + inferior-scheme-mode + inferior-sml-mode + internal-ange-ftp-mode + haskell-interactive-mode + prolog-inferior-mode + reb-mode + shell-mode + slime-repl-mode + term-mode + utop-mode + wdired-mode) + "Modes that should come up in Insert state." + :type '(repeat symbol) + :group 'evil) + +(defcustom evil-motion-state-modes + '(apropos-mode + Buffer-menu-mode + calendar-mode + color-theme-mode + command-history-mode + compilation-mode + dictionary-mode + ert-results-mode + help-mode + Info-mode + Man-mode + speedbar-mode + undo-tree-visualizer-mode + woman-mode) + "Modes that should come up in Motion state." + :type '(repeat symbol) + :group 'evil) + +(defvar evil-pending-overriding-maps nil + "An alist of pending overriding maps.") + +(defvar evil-pending-intercept-maps nil + "An alist of pending intercept maps.") + +(defcustom evil-overriding-maps '() + "Keymaps that should override Evil maps. +Entries have the form (MAP-VAR . STATE), where MAP-VAR is +a keymap variable and STATE is the state whose bindings +should be overridden. If STATE is nil, all states are +overridden." + :type '(alist :key-type symbol :value-type symbol) + :group 'evil + :set #'(lambda (var values) + (set-default var values) + (evil-set-custom-state-maps 'evil-overriding-maps + 'evil-pending-overriding-maps + 'override-state + 'evil-make-overriding-map + values)) + :initialize 'evil-custom-initialize-pending-reset) + +(add-hook 'after-load-functions #'evil-update-pending-maps) + +(defcustom evil-intercept-maps + '((edebug-mode-map . nil)) + "Keymaps that should intercept Evil maps. +Entries have the form (MAP-VAR . STATE), where MAP-VAR is +a keymap variable and STATE is the state whose bindings +should be intercepted. If STATE is nil, all states are +intercepted." + :type '(alist :key-type symbol :value-type symbol) + :group 'evil + :set #'(lambda (var values) + (set-default var values) + (evil-set-custom-state-maps 'evil-intercept-maps + 'evil-pending-intercept-maps + 'intercept-state + 'evil-make-intercept-map + values)) + :initialize 'evil-custom-initialize-pending-reset) + +(defcustom evil-motions + '(back-to-indentation + backward-char + backward-list + backward-paragraph + backward-sentence + backward-sexp + backward-up-list + backward-word + beginning-of-buffer + beginning-of-defun + beginning-of-line + beginning-of-visual-line + c-beginning-of-defun + c-end-of-defun + diff-file-next + diff-file-prev + diff-hunk-next + diff-hunk-prev + down-list + end-of-buffer + end-of-defun + end-of-line + end-of-visual-line + exchange-point-and-mark + forward-char + forward-list + forward-paragraph + forward-sentence + forward-sexp + forward-word + goto-last-change + ibuffer-backward-line + ibuffer-forward-line + isearch-abort + isearch-cancel + isearch-complete + isearch-del-char + isearch-delete-char + isearch-edit-string + isearch-exit + isearch-highlight-regexp + isearch-occur + isearch-other-control-char + isearch-other-meta-char + isearch-printing-char + isearch-query-replace + isearch-query-replace-regexp + isearch-quote-char + isearch-repeat-backward + isearch-repeat-forward + isearch-ring-advance + isearch-ring-retreat + isearch-toggle-case-fold + isearch-toggle-input-method + isearch-toggle-regexp + isearch-toggle-specified-input-method + isearch-toggle-word + isearch-yank-char + isearch-yank-kill + isearch-yank-line + isearch-yank-word-or-char + keyboard-quit + left-char + left-word + mouse-drag-region + mouse-save-then-kill + mouse-set-point + mouse-set-region + mwheel-scroll + move-beginning-of-line + move-end-of-line + next-error + next-line + paredit-backward + paredit-backward-down + paredit-backward-up + paredit-forward + paredit-forward-down + paredit-forward-up + pop-global-mark + pop-tag-mark + pop-to-mark-command + previous-error + previous-line + right-char + right-word + scroll-down + scroll-down-command + scroll-up + scroll-up-command + sgml-skip-tag-backward + sgml-skip-tag-forward + up-list) + "Non-Evil commands to initialize to motions." + :type '(repeat symbol) + :group 'evil + :set 'evil-set-custom-motions + :initialize 'evil-custom-initialize-pending-reset) + +(defcustom evil-visual-newline-commands + '(LaTeX-section + TeX-font) + "Commands excluding the trailing newline of a Visual Line selection. +These commands work better without this newline." + :type '(repeat symbol) + :group 'evil + :set 'evil-set-visual-newline-commands + :initialize 'evil-custom-initialize-pending-reset) + +(defcustom evil-want-visual-char-semi-exclusive nil + "DEPRECATED. Will be removed in a future version. +Prefer to set `evil-v$-excludes-newline' to non-nil. + +Visual character selection to beginning/end of line is exclusive. +If non nil then an inclusive visual character selection which +ends at the beginning or end of a line is turned into an +exclusive selection. Thus if the selected (inclusive) range ends +at the beginning of a line it is changed to not include the first +character of that line, and if the selected range ends at the end +of a line it is changed to not include the newline character of +that line." + :type 'boolean + :group 'evil) +(make-obsolete-variable + evil-want-visual-char-semi-exclusive + "Semi-exclusivity prevents selecting text + 1st char of next line, +without having to introduce new niche functionality. +Prefer to set `evil-v$-excludes-newline' to non-nil." + "1.15.0") + +(defcustom evil-v$-excludes-newline nil + "If non-nil, `evil-end-of-line' does not move as far as to include +the `\n' char at eol. This makes `v$' consistent with `$' used as a +motion (e.g. `v$y' is consistent with `y$' in normal state)." + :type 'boolean + :group 'evil) + +(defcustom evil-text-object-change-visual-type t + "Text objects change the current visual state type. +If non-nil then a text-object changes the type of the visual state to +its default selection type (e.g. a word object always changes to +charwise visual state). Otherwise the current visual state type is +preserved." + :type 'boolean + :group 'evil) + +(defgroup evil-cjk nil + "CJK support" + :prefix "evil-cjk-" + :group 'evil) + +(defcustom evil-cjk-emacs-word-boundary nil + "Determine word boundary exactly the same way as Emacs does." + :type 'boolean + :group 'evil-cjk) + +(defcustom evil-cjk-word-separating-categories + '(;; Kanji + (?C . ?H) (?C . ?K) (?C . ?k) (?C . ?A) (?C . ?G) + ;; Hiragana + (?H . ?C) (?H . ?K) (?H . ?k) (?H . ?A) (?H . ?G) + ;; Katakana + (?K . ?C) (?K . ?H) (?K . ?k) (?K . ?A) (?K . ?G) + ;; half-width Katakana + (?k . ?C) (?k . ?H) (?k . ?K) ; (?k . ?A) (?k . ?G) + ;; full-width alphanumeric + (?A . ?C) (?A . ?H) (?A . ?K) ; (?A . ?k) (?A . ?G) + ;; full-width Greek + (?G . ?C) (?G . ?H) (?G . ?K) ; (?G . ?k) (?G . ?A) + ) + "List of pair (cons) of categories to determine word boundary +used in `evil-cjk-word-boundary-p'. See the documentation of +`word-separating-categories'. Use `describe-categories' to see +the list of categories." + :type '(alist :key-type (choice character (const nil)) + :value-type (choice character (const nil))) + :group 'evil-cjk) + +(defcustom evil-cjk-word-combining-categories + '(;; default value in word-combining-categories + (nil . ?^) (?^ . nil) + ;; Roman + (?r . ?k) (?r . ?A) (?r . ?G) + ;; half-width Katakana + (?k . ?r) (?k . ?A) (?k . ?G) + ;; full-width alphanumeric + (?A . ?r) (?A . ?k) (?A . ?G) + ;; full-width Greek + (?G . ?r) (?G . ?k) (?G . ?A) + ) + "List of pair (cons) of categories to determine word boundary +used in `evil-cjk-word-boundary-p'. See the documentation of +`word-combining-categories'. Use `describe-categories' to see the +list of categories." + :type '(alist :key-type (choice character (const nil)) + :value-type (choice character (const nil))) + :group 'evil-cjk) + +(defcustom evil-ex-complete-emacs-commands 'in-turn + "TAB-completion for Emacs commands in ex command line. +This variable determines when Emacs commands are considered for +completion, always, never, or only if no Evil ex command is +available for completion." + :group 'evil + :type '(radio (const :tag "Only if no ex-command." :value in-turn) + (const :tag "Never" :value nil) + (const :tag "Always" :value t))) + +(defface evil-ex-commands '(( nil + :underline t + :slant italic)) + "Face for the Evil command in completion in ex mode." + :group 'evil) + +(defface evil-ex-info '(( ((supports :slant)) + :slant italic + :foreground "red")) + "Face for the info message in ex mode." + :group 'evil) + +(defcustom evil-ex-visual-char-range nil + "Type of default ex range in visual char state. +If non-nil the default range when starting an ex command from +character visual state is `<,`> otherwise it is '<,'>. In the +first case the ex command will be passed a region covering only +the visual selection. In the second case the passed region will +be extended to contain full lines." + :group 'evil + :type 'boolean) + +;; Searching +(defcustom evil-symbol-word-search nil + "If nil then * and # search for words otherwise for symbols." + :group 'evil + :type 'boolean) +(make-variable-buffer-local 'evil-symbol-word-search) + +(defcustom evil-magic t + "Meaning which characters in a pattern are magic. +The meaning of those values is the same as in Vim. Note that it +only has influence if the Evil search module is chosen in +`evil-search-module'." + :group 'evil + :type '(radio (const :tag "Very magic." :value very-magic) + (const :tag "Magic" :value t) + (const :tag "Nomagic" :value nil) + (const :tag "Very nomagic" :value very-nomagic))) + +(defcustom evil-ex-search-vim-style-regexp nil + "If non-nil Vim-style backslash codes are supported in search patterns. +See `evil-transform-vim-style-regexp' for the supported backslash +codes. Note that this only affects the search command if +`evil-search-module' is set to 'evil-search. The isearch module +always uses plain Emacs regular expressions." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-interactive-search-highlight 'all-windows + "Determine in which windows the interactive highlighting should be shown." + :type '(radio (const :tag "All windows." all-windows) + (const :tag "Selected window." selected-window) + (const :tag "Disable highlighting." nil)) + :group 'evil) + +(defcustom evil-ex-search-persistent-highlight t + "If non-nil matches remain highlighted when the search ends." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-search-case 'smart + "The case behaviour of the search command. +Smart case means that the pattern is case sensitive if and only +if it contains an upper case letter, otherwise it is case +insensitive." + :type '(radio (const :tag "Case sensitive." sensitive) + (const :tag "Case insensitive." insensitive) + (const :tag "Smart case." smart)) + :group 'evil) + +(defcustom evil-ex-substitute-case nil + "The case behaviour of the search command. +Smart case means that the pattern is case sensitive if and only +if it contains an upper case letter, otherwise it is case +insensitive. If nil then the setting of `evil-ex-search-case' is +used." + :type '(radio (const :tag "Same as interactive search." nil) + (const :tag "Case sensitive." sensitive) + (const :tag "Case insensitive." insensitive) + (const :tag "Smart case." smart)) + :group 'evil) + +(defcustom evil-ex-search-interactive t + "If t search is interactive." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-search-incremental t + "If t, use incremental search. Note that this only affects the +search command if `evil-search-module' is set to 'evil-search." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-search-highlight-all t + "If t and interactive search is enabled, all matches are +highlighted." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-substitute-highlight-all t + "If t all matches for the substitute pattern are highlighted." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-substitute-interactive-replace t + "If t and substitute patterns are highlighted, +the replacement is shown interactively." + :type 'boolean + :group 'evil) + +(defcustom evil-ex-substitute-global nil + "If non-nil substitute patterns are global by default. +Usually (if this variable is nil) a substitution works only on +the first match of a pattern in a line unless the 'g' flag is +given, in which case the substitution happens on all matches in a +line. If this option is non-nil, this behaviour is reversed: the +substitution works on all matches unless the 'g' pattern is +specified, then is works only on the first match." + :type 'boolean + :group 'evil) + +(defface evil-ex-search '((t :inherit isearch)) + "Face for interactive search." + :group 'evil) + +(defface evil-ex-lazy-highlight '((t :inherit lazy-highlight)) + "Face for highlighting all matches in interactive search." + :group 'evil) + +(defface evil-ex-substitute-matches '((t :inherit lazy-highlight)) + "Face for interactive substitute matches." + :group 'evil) + +(defface evil-ex-substitute-replacement '((((supports :underline)) + :underline t + :foreground "red")) + "Face for interactive replacement text." + :group 'evil) + +(defcustom evil-command-window-height 8 + "Height (in lines) of the command line window. +Set to 0 to use the default height for `split-window'." + :type 'integer + :group 'evil) + +(defcustom evil-display-shell-error-in-message nil + "Show error output of a shell command in the error buffer. +If this variable is non-nil the error output of a shell command +goes to the messages buffer instead of being mixed with the +regular output. This happens only if the exit status of the +command is non-zero." + :type 'boolean + :group 'evil) + +(defcustom evil-want-abbrev-expand-on-insert-exit t + "If non-nil abbrevs will be expanded when leaving insert state +like in Vim, if `abbrev-mode' is on." + :type 'boolean + :group 'evil) + +;;; Variables + +(defmacro evil-define-local-var (symbol &optional initvalue docstring) + "Define SYMBOL as permanent buffer local variable, and return SYMBOL. +The parameters are the same as for `defvar', but the variable +SYMBOL is made permanent buffer local." + (declare (indent defun) + (doc-string 3) + (debug (symbolp &optional form stringp))) + `(progn + (defvar ,symbol ,initvalue ,docstring) + (make-variable-buffer-local ',symbol) + (put ',symbol 'permanent-local t))) + +(evil-define-local-var evil-scroll-count 0 + "Holds last used prefix for `evil-scroll-up' +and `evil-scroll-down'. +Determines how many lines should be scrolled. +Default value is 0 - scroll half the screen.") + +(evil-define-local-var evil-state nil + "The current Evil state. +To change the state, use `evil-change-state' +or call the state function (e.g., `evil-normal-state').") + +;; these may be used inside `evil-define-state' +(evil-define-local-var evil-next-state nil + "The Evil state being switched to.") + +(evil-define-local-var evil-previous-state-alist nil + "For Each evil state the Evil state being switched from.") + +(evil-define-local-var evil-previous-state nil + "The Evil state being switched from.") + +(defvar evil-execute-in-emacs-state-buffer nil + "The buffer of the latest `evil-execute-in-emacs-state'. +When this command is being executed the current buffer is stored +in this variable. This is necessary in case the Emacs-command to +be called changes the current buffer.") + +(evil-define-local-var evil-mode-line-tag nil + "Mode-Line indicator for the current state.") +(put 'evil-mode-line-tag 'risky-local-variable t) + +(defvar evil-global-keymaps-alist nil + "Association list of keymap variables. +Entries have the form (MODE . KEYMAP), where KEYMAP +is the variable containing the keymap for MODE.") + +(defvar evil-local-keymaps-alist nil + "Association list of keymap variables that must be +reinitialized in each buffer. Entries have the form +\(MODE . KEYMAP), where KEYMAP is the variable containing +the keymap for MODE.") + +(defvar evil-minor-mode-keymaps-alist nil + "Association list of Evil states to minor-mode keymap alists. +Entries have the form (STATE . MODE-MAP-ALIST), where +MODE-MAP-ALIST is an alist taking the form of +`minor-mode-map-alist'.") + +(defvar evil-state-properties nil + "Specifications made by `evil-define-state'. +Entries have the form (STATE . PLIST), where PLIST is a property +list specifying various aspects of the state. To access a property, +use `evil-state-property'.") + +(evil-define-local-var evil-mode-map-alist nil + "Association list of keymaps to use for Evil modes. +Elements have the form (MODE . KEYMAP), with the first keymaps +having higher priority.") + +(defvar evil-command-properties nil + "Specifications made by `evil-define-command'.") + +(defvar evil-change-commands '(evil-change) + "Commands that wrap or replace `evil-change'. +This list exists to apply an inconsistency with vim's change command +to commands that wrap or redefine it. See emacs-evil/evil#916.") + +(defvar evil-transient-vars '(cua-mode transient-mark-mode select-active-regions) + "List of variables pertaining to Transient Mark mode.") + +(defvar evil-transient-vals nil + "Association list of old values for Transient Mark mode variables. +Entries have the form (VARIABLE VALUE LOCAL), where LOCAL is +whether the variable was previously buffer-local.") + +(evil-define-local-var evil-no-display nil + "If non-nil, various Evil displays are inhibited. +Use the macro `evil-without-display' to set this variable.") + +(defvar evil-type-properties nil + "Specifications made by `evil-define-type'. +Entries have the form (TYPE . PLIST), where PLIST is a property +list specifying functions for handling the type: expanding it, +describing it, etc.") + +(defvar evil-interactive-alist nil + "Association list of Evil-specific interactive codes.") + +(evil-define-local-var evil-motion-marker nil + "Marker for storing the starting position of a motion.") + +(evil-define-local-var evil-this-type nil + "Current motion type.") + +(evil-define-local-var evil-this-type-modified nil + "Non-nil iff current motion type has been modified by the user. +If the type has been modified, this variable contains the new +type.") + +(evil-define-local-var evil-this-register nil + "Current register.") + +(defvar evil-last-=-register-input nil + "Most recent input from the `=' register. A string.") + +(defvar evil-this-macro nil + "Current macro register.") + +(evil-define-local-var evil-this-operator nil + "Current operator.") + +(evil-define-local-var evil-this-motion nil + "Current motion.") + +(evil-define-local-var evil-this-motion-count nil + "Current motion count.") + +(defvar evil-last-register nil + "The last executed register.") + +(defvar evil-inhibit-operator nil + "Inhibit current operator. +If an operator calls a motion and the motion sets this variable +to t, the operator code is not executed.") + +(defvar evil-inhibit-operator-value nil + "This variable is used to transfer the value +of `evil-inhibit-operator' from one local scope to another.") + +;; used by `evil-define-operator' +(defvar evil-operator-range-beginning nil + "Beginning of `evil-operator-range'.") + +(defvar evil-operator-range-end nil + "End of `evil-operator-range'.") + +(defvar evil-operator-range-type nil + "Type of `evil-operator-range'.") + +(defvar evil-operator-range-motion nil + "Motion of `evil-operator-range'.") + +(defvar evil-operator-start-col nil + "Used to restore column (where possible) after an operator has moved it.") + +(defvar evil-restriction-stack nil + "List of previous restrictions. +Using `evil-with-restriction' stores the previous values of +`point-min' and `point-max' as a pair in this list.") + +(evil-define-local-var evil-markers-alist + '((?\( . evil-backward-sentence-begin) + (?\) . evil-forward-sentence-begin) + (?{ . evil-backward-paragraph) + (?} . evil-forward-paragraph) + (?' . evil-jump-backward-swap) + (?` . evil-jump-backward-swap) + (?< . evil-visual-beginning) + (?> . evil-visual-goto-end) + (?. . (lambda () + (let (last-command) + (goto-last-change nil))))) + "Association list for markers. +Entries have the form (CHAR . DATA), where CHAR is the marker's +name and DATA is either a marker object as returned by `make-marker', +a variable, a movement function, or a cons cell (STRING NUMBER), +where STRING is a file path and NUMBER is a buffer position. +The global value of this variable holds markers available from +every buffer, while the buffer-local value holds markers available +only in the current buffer.") + +(defconst evil-suppress-map (make-keymap) + "Full keymap disabling default bindings to `self-insert-command'.") +(suppress-keymap evil-suppress-map t) + +(defvar evil-read-key-map (make-sparse-keymap) + "Keymap active during `evil-read-key'. +This keymap can be used to bind some commands during the +execution of `evil-read-key' which is usually used to read a +character argument for some commands, e.g. `evil-replace'.") + +;; TODO: customize size of ring +(defvar evil-repeat-ring (make-ring 10) + "A ring of repeat-informations to repeat the last command.") + +(defvar evil-repeat-types + '((t . evil-repeat-keystrokes) + (change . evil-repeat-changes) + (motion . evil-repeat-motion) + (insert-at-point . evil-repeat-insert-at-point) + (ignore . nil)) + "An alist of defined repeat-types.") + +(defvar evil-recording-repeat nil + "Whether we are recording a repeat.") + +(defvar evil-recording-current-command nil + "Whether we are recording the current command for repeat.") + +(defvar evil-repeat-changes nil + "Accumulated buffer changes for changed-based commands.") + +(defvar evil-repeat-info nil + "Information accumulated during current repeat.") + +(defvar evil-repeat-buffer nil + "The buffer in which the repeat started. +If the buffer is changed, the repeat is cancelled.") + +(defvar evil-repeat-pos nil + "The position of point at the beginning of an change-tracking + editing command.") + +(defvar evil-repeat-keys nil + "The keys that invoked the current command.") + +(defvar evil-last-repeat nil + "Information about the latest repeat command. +This is a list of three elements (POINT COUNT UNDO-POINTER), +where POINT is the position of point before the latest repeat, +COUNT the count-argument of the latest repeat command and +UNDO-POINTER the head of the undo-list before the last command +has been repeated.") + +(defvar evil-repeat-count nil + "The explicit count when repeating a command.") + +(defvar evil-maybe-remove-spaces nil + "Flag to determine if newly inserted spaces should be removed. +See the function `evil-maybe-remove-spaces'.") + +(evil-define-local-var evil-insert-count nil + "The explicit count passed to an command starting Insert state.") + +(evil-define-local-var evil-insert-vcount nil + "The information about the number of following lines the +insertion should be repeated. This is list (LINE COLUMN COUNT) +where LINE is the line-number where the original insertion +started and COLUMN is either a number or function determining the +column where the repeated insertions should take place. COUNT is +number of repeats (including the original insertion).") + +(defvar evil-insert-skip-empty-lines nil + "Non-nil of the current insertion should not take place on + lines at which the insertion point is behind the end of the + line.") + +(evil-define-local-var evil-insert-lines nil + "Non-nil if the current insertion command is a line-insertion +command o or O.") + +(evil-define-local-var evil-insert-repeat-info nil + "Repeat information accumulated during an insertion.") + +(evil-define-local-var evil-replace-alist nil + "Association list of characters overwritten in Replace state. +The format is (POS . CHAR).") + +(evil-define-local-var evil-echo-area-message nil + "Previous value of `current-message'.") + +(defvar evil-write-echo-area nil + "If set to t inside `evil-save-echo-area', then the echo area +is not restored.") + +(defvar evil-last-find nil + "A pair (FUNCTION . CHAR) describing the lastest character + search command.") + +(defvar evil-last-paste nil + "Information about the latest paste. +This should be a list (CMD COUNT POINT BEG END FIRSTVISUAL) where +CMD is the last paste-command (`evil-paste-before', +`evil-paste-after' or `evil-visual-paste'), COUNT is the repeat +count of the paste, POINT is the position of point before the +paste, BEG end END are the region of the inserted +text. FIRSTVISUAL is t if and only if the previous command was +the first visual paste (i.e. before any paste-pop).") + +(evil-define-local-var evil-last-undo-entry nil + "Information about the latest undo entry in the buffer. +This should be a pair (OBJ . CONS) where OBJ is the entry as an +object, and CONS is a copy of the entry.") + +(evil-define-local-var evil-current-insertion nil + "Information about the latest insertion in insert state. +This should be a pair (BEG . END) that describes the +buffer-region of the newly inserted text.") + +(defvar evil-last-insertion nil + "The last piece of inserted text.") + +(defvar evil-last-small-deletion nil + "The last piece of deleted text. +The text should be less than a line.") + +(defvar evil-was-yanked-without-register t + "Whether text being saved to the numbered-register ring was +not deleted and not yanked to a specific register.") + +(defvar evil-paste-count nil + "The count argument of the current paste command.") + +(defvar evil-temporary-undo nil + "When undo is disabled in current buffer. +Certain commands depending on undo use this variable +instead of `buffer-undo-list'.") + +(evil-define-local-var evil-undo-list-pointer nil + "Everything up to this mark is united in the undo-list.") + +(defvar evil-in-single-undo nil + "Set to non-nil if the current undo steps are connected.") + +(defvar evil-flash-timer nil + "Timer for flashing search results.") + +(defvar evil-search-prompt nil + "String to use for search prompt.") + +(defvar evil-search-forward-history nil + "History of forward searches.") + +(defvar evil-search-backward-history nil + "History of backward searches.") + +(defvar evil-inner-text-objects-map (make-sparse-keymap) + "Keymap for inner text objects.") + +(defvar evil-outer-text-objects-map (make-sparse-keymap) + "Keymap for outer text objects.") + +(defvar evil-window-map (make-sparse-keymap) + "Keymap for window-related commands.") + +(evil-define-local-var evil-input-method nil + "Input method used in Insert state and Emacs state.") + +;;; Visual state + +(evil-define-local-var evil-visual-beginning nil + "The beginning of the Visual selection, a marker.") + +(evil-define-local-var evil-visual-end nil + "The end of the Visual selection, a marker.") + +(evil-define-local-var evil-visual-point nil + "The position of point in Visual state, a marker.") + +(evil-define-local-var evil-visual-previous-point nil + "The position of point before Visual state, a marker.") + +(evil-define-local-var evil-visual-mark nil + "The position of mark in Visual state, a marker.") + +(evil-define-local-var evil-visual-previous-mark nil + "The position of mark before Visual state, a marker.") + +(evil-define-local-var evil-visual-selection nil + "The kind of Visual selection. +This is a selection as defined by `evil-define-visual-selection'.") + +;; we could infer the direction by comparing `evil-visual-mark' +;; and `evil-visual-point', but destructive operations may +;; displace the markers +(evil-define-local-var evil-visual-direction 0 + "Whether point follows mark in Visual state. +Negative if point precedes mark, otherwise positive. +See also the function `evil-visual-direction'.") + +(evil-define-local-var evil-visual-properties nil + "Property list of miscellaneous Visual properties.") + +(evil-define-local-var evil-visual-region-expanded nil + "Whether the region matches the Visual selection. +That is, whether the positions of point and mark have been +expanded to coincide with the selection's boundaries. +This makes the selection available to functions acting +on Emacs' region.") + +(evil-define-local-var evil-visual-overlay nil + "Overlay for highlighting the Visual selection. +Not used for blockwise selections, in which case +see `evil-visual-block-overlays'.") + +(evil-define-local-var evil-visual-block-overlays nil + "Overlays for Visual Block selection, one for each line. +They are reused to minimize flicker.") + +(defvar evil-visual-alist nil + "Association list of Visual selection functions. +Elements have the form (NAME . FUNCTION).") + +(evil-define-local-var evil-visual-x-select-timer nil + "Timer for updating the X selection in visual state.") + +(defvar evil-visual-x-select-timeout 0.1 + "Time in seconds for the update of the X selection.") + +(declare-function origami-open-all-nodes "ext:origami.el") +(declare-function origami-close-all-nodes "ext:origami.el") +(declare-function origami-toggle-node "ext:origami.el") +(declare-function origami-open-node "ext:origami.el") +(declare-function origami-open-node-recursively "ext:origami.el") +(declare-function origami-close-node "ext:origami.el") + +(defvar evil-fold-list + `(((vdiff-mode) + :open-all vdiff-open-all-folds + :close-all vdiff-close-all-folds + :toggle ,(lambda () (call-interactively 'vdiff-toggle-fold)) + :open ,(lambda () (call-interactively 'vdiff-open-fold)) + :open-rec ,(lambda () (call-interactively 'vdiff-open-fold)) + :close ,(lambda () (call-interactively 'vdiff-close-fold))) + ((vdiff-3way-mode) + :open-all vdiff-open-all-folds + :close-all vdiff-close-all-folds + :toggle ,(lambda () (call-interactively 'vdiff-toggle-fold)) + :open ,(lambda () (call-interactively 'vdiff-open-fold)) + :open-rec ,(lambda () (call-interactively 'vdiff-open-fold)) + :close ,(lambda () (call-interactively 'vdiff-close-fold))) + ((hs-minor-mode) + :open-all hs-show-all + :close-all hs-hide-all + :toggle hs-toggle-hiding + :open hs-show-block + :open-rec nil + :close hs-hide-block) + ((hide-ifdef-mode) + :open-all show-ifdefs + :close-all hide-ifdefs + :toggle nil + :open show-ifdef-block + :open-rec nil + :close hide-ifdef-block) + ((outline-mode + outline-minor-mode + org-mode + markdown-mode) + :open-all show-all + :close-all ,(lambda () + (with-no-warnings (hide-sublevels 1))) + :toggle outline-toggle-children + :open ,(lambda () + (with-no-warnings + (show-entry) + (show-children))) + :open-rec show-subtree + :close hide-subtree) + ((origami-mode) + :open-all ,(lambda () (origami-open-all-nodes (current-buffer))) + :close-all ,(lambda () (origami-close-all-nodes (current-buffer))) + :toggle ,(lambda () (origami-toggle-node (current-buffer) (point))) + :open ,(lambda () (origami-open-node (current-buffer) (point))) + :open-rec ,(lambda () (origami-open-node-recursively (current-buffer) (point))) + :close ,(lambda () (origami-close-node (current-buffer) (point))))) + "Actions to be performed for various folding operations. + +The value should be a list of fold handlers, were a fold handler has +the format: + + ((MODES) PROPERTIES) + +MODES acts as a predicate, containing the symbols of all major or +minor modes for which the handler should match. For example: + + '((outline-minor-mode org-mode) ...) + +would match for either outline-minor-mode or org-mode, even though the +former is a minor mode and the latter is a major. + +PROPERTIES specifies possible folding actions and the functions to be +applied in the event of a match on one (or more) of the MODES; the +supported properties are: + + - `:open-all' + Open all folds. + - `:close-all' + Close all folds. + - `:toggle' + Toggle the display of the fold at point. + - `:open' + Open the fold at point. + - `:open-rec' + Open the fold at point recursively. + - `:close' + Close the fold at point. + +Each value must be a function. A value of `nil' will cause the action +to be ignored for that respective handler. For example: + + `((org-mode) + :close-all nil + :open ,(lambda () + (show-entry) + (show-children)) + :close hide-subtree) + +would ignore `:close-all' actions and invoke the provided functions on +`:open' or `:close'.") + +;;; Ex + +(defvar evil-ex-map (make-sparse-keymap) + "Keymap for Ex. +Key sequences bound in this map are immediately executed.") + +(defvar evil-ex-completion-map (make-sparse-keymap) + "Completion keymap for Ex.") + +(defvar evil-ex-initial-input nil + "Additional initial content of the ex command line. +This content of this variable is appended to the ex command line +if ex is started interactively.") + +(defvar evil-ex-shell-argument-initialized nil + "This variable is set to t if shell command completion has been initialized. +See `evil-ex-init-shell-argument-completion'.") + +(defvar evil-ex-commands nil + "Association list of command bindings and functions.") + +(defvar evil-ex-history nil + "History of Ex commands.") + +(defvar evil-ex-current-buffer nil + "The buffer from which Ex was started.") + +(defvar evil-ex-expression nil + "The evaluation tree.") + +(defvar evil-ex-tree nil + "The syntax tree.") + +(defvar evil-ex-command nil + "The current Ex command.") + +(defvar evil-ex-previous-command nil + "The previously executed Ex command.") + +(defvar evil-ex-cmd nil + "The current Ex command string.") + +(defvar evil-ex-point nil + "The position of `point' when the ex command has been called.") + +(defvar evil-ex-range nil + "The current range of the Ex command.") + +(defvar evil-ex-bang nil + "The \"!\" argument of the current Ex command.") + +(defvar evil-ex-argument nil + "The current argument of the Ex command.") + +(defvar evil-ex-argument-handler nil + "The argument handler for the current Ex command.") + +(defvar evil-ex-argument-types nil + "Association list of argument handlers.") + +(defvar evil-previous-shell-command nil + "The last shell command.") + +;; Eval +(defvar evil-eval-history nil + "History of eval input, from the `=' register.") + +(defvar evil-eval-map (make-sparse-keymap) + "Keymap for eval input.") + +;; Searching +(defvar evil-ex-search-history nil + "The history for the search command.") + +(defvar evil-ex-search-direction nil + "The direction of the current search, either 'forward or 'backward.") + +(defvar evil-ex-search-count nil + "The count if the current search.") + +(defvar evil-ex-search-start-point nil + "The point where the search started.") + +(defvar evil-ex-search-overlay nil + "The overlay for the current search result.") + +(defvar evil-ex-search-pattern nil + "The last search pattern.") + +(defvar evil-ex-search-offset nil + "The last search offset.") + +(defvar evil-ex-search-match-beg nil + "The beginning position of the last match.") + +(defvar evil-ex-search-match-end nil + "The end position of the last match.") + +(defvar evil-ex-substitute-pattern nil + "The last substitute pattern.") + +(defvar evil-ex-substitute-replacement nil + "The last substitute replacement.") + +(defvar evil-ex-substitute-flags nil + "The last substitute flags.") + +(defvar evil-ex-substitute-current-replacement nil + "The actual replacement.") + +(defvar evil-ex-last-was-search nil + "Non-nil if the previous was a search. +Otherwise the previous command is assumed as substitute.") + +;;; Command line window + +(defvar evil-command-window-current-buffer nil + "The buffer from which the command line window was called.") + +(evil-define-local-var evil-command-window-execute-fn nil + "The command to execute when exiting the command line window.") + +(evil-define-local-var evil-command-window-cmd-key nil + "The key for the command that opened the command line window (:, /, or ?).") + +;; The lazy-highlighting framework. +(evil-define-local-var evil-ex-active-highlights-alist nil + "An alist of currently active highlights.") + +(evil-define-local-var evil-ex-hl-update-timer nil + "Time used for updating highlights.") + +(defvar evil-ex-search-keymap (make-sparse-keymap) + "Keymap used in ex-search-mode.") +(define-key evil-ex-search-keymap [escape] 'abort-recursive-edit) +(set-keymap-parent evil-ex-search-keymap minibuffer-local-map) + +(defcustom evil-want-empty-ex-last-command t + "Whether to default to evil-ex-previous-command at empty ex prompt." + :type 'boolean + :group 'evil) + +(defconst evil-version + (eval-when-compile + (with-temp-buffer + (let ((dir (file-name-directory (or load-file-name + byte-compile-current-file)))) + ;; git repository + (if (and (file-exists-p (concat dir "/.git")) + (ignore-errors + (zerop (call-process "git" nil '(t nil) nil + "rev-parse" + "--short" "HEAD")))) + (progn + (goto-char (point-min)) + (concat "evil-git-" + (buffer-substring (point-min) + (line-end-position)))) + ;; no repo, use plain version + "1.15.0")))) + "The current version of Evil") + +(defcustom evil-want-integration t + "Whether to load evil-integration.el. +This variable must be set before Evil is loaded." + :type 'boolean + :group 'evil) + +(defcustom evil-want-keybinding t + "Whether to load evil-keybindings.el. + +This loads a set of keybindings for evil in other modes as well as +setting the initial evil state in those modes. + +This variable must be set before evil is loaded." + :type 'boolean + :group 'evil) + +(defcustom evil-want-minibuffer nil + "Whether to enable Evil in minibuffer(s)." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (if value + (add-hook 'minibuffer-setup-hook 'evil-initialize) + (remove-hook 'minibuffer-setup-hook 'evil-initialize)))) + +(defun evil--redo-placeholder (_count) + (user-error "Customize `evil-undo-system' for redo functionality.")) + +(defvar evil-undo-function 'undo + "Function to be used by `evil-undo'. +Customized via `evil-undo-system'.") + +(defvar evil-redo-function 'evil--redo-placeholder + "Function to be used by 'evil-redo'. +Customized via `evil-undo-system'.") + +(defun evil-set-undo-system (system) + "Set `evil-undo-function' and `evil-redo-function` by SYSTEM." + (cond + ((not system) + (setq evil-undo-function 'undo + evil-redo-function 'evil--redo-placeholder)) + ((eq system 'undo-redo) + (setq evil-undo-function 'undo-only + evil-redo-function 'undo-redo)) + ((eq system 'undo-tree) + (setq evil-undo-function 'undo-tree-undo + evil-redo-function 'undo-tree-redo)) + ((eq system 'undo-fu) + (setq evil-undo-function 'undo-fu-only-undo + evil-redo-function 'undo-fu-only-redo)) + (t + (error "Unknown undo system %s" system)))) + +(defcustom evil-undo-system nil + "Undo system Evil should use. If equal to `undo-tree' or +`undo-fu', those packages must be installed. If equal to +`undo-tree', `undo-tree-mode' must also be activated. If equal +to `undo-redo', Evil uses commands natively available in Emacs 28." + :type '(choice (const :tag "Vanilla undo" nil) + (const undo-redo) + (const undo-tree) + (const undo-fu)) + :group 'evil + :set #'(lambda (sym value) + (evil-set-undo-system value) + (set-default sym value))) + +(defcustom evil-visual-update-x-selection-p t + "Whether to update the X PRIMARY selection with the current visual region automatically." + :type 'boolean + :group 'evil) + +(defun evil-version () + (interactive) + (message "Evil version %s" evil-version)) + +(provide 'evil-vars) + +;;; evil-vars.el ends here diff --git a/elpa/evil-20220510.2302/evil-vars.elc b/elpa/evil-20220510.2302/evil-vars.elc Binary files differnew file mode 100644 index 0000000..2e355ad --- /dev/null +++ b/elpa/evil-20220510.2302/evil-vars.elc diff --git a/elpa/evil-20220510.2302/evil.el b/elpa/evil-20220510.2302/evil.el new file mode 100644 index 0000000..8a8a3f3 --- /dev/null +++ b/elpa/evil-20220510.2302/evil.el @@ -0,0 +1,158 @@ +;;; evil.el --- extensible vi layer + +;; The following list of authors was kept up to date until the beginning of +;; 2017, when evil moved under new maintainers. For authors since then, please +;; consult the git logs. + +;; Alessandro Piras <laynor at gmail.com> +;; Alexander Baier <alexander.baier at mailbox.org> +;; Antono Vasiljev <antono.vasiljev at gmail.com> +;; Bailey Ling <bling at live.ca> +;; Barry O'Reilly <gundaetiapo at gmail.com> +;; Christoph Lange <langec at web.de> +;; Daniel Reiter <danieltreiter at gmail.com> +;; Eivind Fonn <evfonn at gmail.com> +;; Emanuel Evans <emanuel.evans at gmail.com> +;; Eric Siegel <siegel.eric at gmail.com> +;; Eugene Yaremenko <w3techplayground at gmail.com> +;; Frank Fischer <frank-fischer at shadow-soft.de> +;; Frank Terbeck <ft at bewatermyfriend.org> +;; Gordon Gustafson <gordon3.14 at gmail.com> +;; Herbert Jones <jones.herbert at gmail.com> +;; Jonas Bernoulli <jonas at bernoul.li> +;; Jonathan Claggett <jclaggett at lonocloud.com> +;; José A. Romero L. <escherdragon at gmail.com> +;; Justin Burkett <justin at burkett.cc> +;; Lars Andersen <expez at expez.com> +;; Lintaro Ina <tarao.gnn at gmail.com> +;; Lukasz Wrzosek <wrzoski at mail.com> +;; Marian Schubert <maio at netsafe.cz> +;; Matthew Malcomson <> +;; Michael Markert <markert.michael at googlemail.com> +;; Mike Gerwitz <mikegerwitz at gnu.org> +;; Nikolai Weibull <now at bitwi.se> +;; phaebz <phaebz at gmail.com> +;; ralesi <scio62 at gmail.com> +;; Rodrigo Setti <rodrigosetti at gmail.com> +;; Sanel Zukan <sanelz at gmail.com> +;; Sarah Brofeldt <sarah at thinkmonster.(none)> +;; Simon Hafner <hafnersimon at gmail.com> +;; Stefan Wehr <mail at stefanwehr.de> +;; Sune Simonsen <sune.simonsen at jayway.com> +;; Thomas Hisch <thomas at opentech.at> +;; Tim Harper <timcharper at gmail.com> +;; Tom Willemse <tom at ryuslash.org> +;; Trevor Murphy <trevor.m.murphy at gmail.com> +;; Ulrich Müller <ulm at gentoo.org> +;; Vasilij Schneidermann <v.schneidermann at gmail.com> +;; Vegard Øye <vegard_oye at hotmail.com> +;; Winfred Lu <winfred.lu at gmail.com> +;; Wolfgang Jenkner <wjenkner at inode.at> +;; Xiao Hanyu <xiaohanyu1988 at gmail.com> +;; York Zhao <yzhao at telecor.com> + +;; The following line is included for NonGNU ELPA's build script: +;; Maintainer: Tom Dalziel <tom.dalziel@gmail.com> + +;; Maintainers: The emacs-evil team. <https://github.com/orgs/emacs-evil/people> +;; To get in touch, please use the bug tracker or the +;; mailing list (see below). +;; Created: 2011-03-01 +;; Version: 1.15.0 +;; Keywords: emulation, vim +;; URL: https://github.com/emacs-evil/evil +;; Repository: https://github.com/emacs-evil/evil.git +;; EmacsWiki: http://www.emacswiki.org/emacs/Evil +;; Bug tracker: https://github.com/emacs-evil/evil/issues +;; If you have bug reports, suggestions or patches, please +;; create an issue at the bug tracker (open for everyone). +;; Other discussions (tips, extensions) go to the mailing list. +;; Mailing list: <implementations-list at lists.ourproject.org> +;; Subscribe: http://tinyurl.com/implementations-list +;; Newsgroup: nntp://news.gmane.org/gmane.emacs.vim-emulation +;; Archives: http://dir.gmane.org/gmane.emacs.vim-emulation +;; You don't have to subscribe to post; we usually reply +;; within a few days and CC our replies back to you. +;; +;; This file is NOT part of GNU Emacs. + +;;; License: + +;; This file is part of Evil. +;; +;; Evil is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; Evil is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Evil. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Evil is an extensible vi layer for Emacs. It emulates the main +;; features of Vim, and provides facilities for writing custom +;; extensions. +;; +;; Evil lives in a Git repository. To obtain Evil, do +;; +;; git clone git://github.com/emacs-evil/evil.git +;; +;; Move Evil to ~/.emacs.d/evil (or somewhere else in the `load-path'). +;; Then add the following lines to ~/.emacs: +;; +;; (add-to-list 'load-path "~/.emacs.d/evil") +;; (require 'evil) +;; (evil-mode 1) +;; +;; Evil requires undo-redo (Emacs 28), undo-fu or undo-tree for redo +;; functionality. Otherwise, Evil uses regular Emacs undo. +;; +;; https://gitlab.com/ideasman42/emacs-undo-fu +;; https://melpa.org/#/undo-fu +;; https://gitlab.com/tsc25/undo-tree +;; https://elpa.gnu.org/packages/undo-tree.html +;; +;; Evil requires `goto-last-change' and `goto-last-change-reverse' +;; function for the corresponding motions g; g, as well as the +;; last-change-register `.'. One package providing these functions is +;; goto-chg.el: +;; +;; https://github.com/emacs-evil/goto-chg +;; https://melpa.org/#/goto-chg +;; https://elpa.nongnu.org/nongnu/goto-chg.html +;; +;; Without this package the corresponding motions will raise an error. + +;;; Code: + +(require 'evil-vars) +(require 'evil-common) +(require 'evil-core) +(require 'evil-states) +(require 'evil-repeat) +(require 'evil-macros) +(require 'evil-search) +(require 'evil-ex) +(require 'evil-digraphs) +(require 'evil-types) +(require 'evil-commands) +(require 'evil-jumps) +(require 'evil-maps) + +(when evil-want-integration + (require 'evil-integration)) + +(when evil-want-keybinding + (require 'evil-keybindings)) + +(run-hooks 'evil-after-load-hook) + +(provide 'evil) + +;;; evil.el ends here diff --git a/elpa/evil-20220510.2302/evil.elc b/elpa/evil-20220510.2302/evil.elc Binary files differnew file mode 100644 index 0000000..28c49c2 --- /dev/null +++ b/elpa/evil-20220510.2302/evil.elc diff --git a/elpa/evil-20220510.2302/evil.info b/elpa/evil-20220510.2302/evil.info new file mode 100644 index 0000000..96e70f8 --- /dev/null +++ b/elpa/evil-20220510.2302/evil.info @@ -0,0 +1,2235 @@ +This is evil.info, produced by makeinfo version 6.7 from evil.texi. + + Evil 1.15.0, Jan 07, 2022 + + Eivind Fonn, Frank Fischer, Vegard Øye + + Copyright © 2011-2019, Eivind Fonn, Frank Fischer, Vegard Øye + +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* evil: (evil.info). Extensible vi layer for Emacs +END-INFO-DIR-ENTRY + + + Generated by Sphinx 4.3.2. + + +File: evil.info, Node: Top, Next: Overview, Up: (dir) + +Evil documentation +****************** + + Evil 1.15.0, Jan 07, 2022 + + Eivind Fonn, Frank Fischer, Vegard Øye + + Copyright © 2011-2019, Eivind Fonn, Frank Fischer, Vegard Øye + +* Menu: + +* Overview:: +* Settings:: +* Keymaps:: +* Hooks:: +* Extension:: +* Frequently Asked Questions:: +* Internals:: +* The GNU Free Documentation License:: +* Emacs lisp functions and variables:: + + — The Detailed Node Listing — + +Overview + +* Installation via package.el: Installation via package el. +* Manual installation:: +* Modes and states:: + +Settings + +* The initial state:: +* Keybindings and other behaviour:: +* Search:: +* Indentation:: +* Cursor movement:: +* Cursor display:: +* Window management:: +* Parenthesis highlighting:: +* Miscellaneous:: + +Keymaps + +* evil-define-key:: +* Leader keys:: + +Extension + +* Motions:: +* Operators:: +* Text objects:: +* Range types:: +* States:: + +Frequently Asked Questions + +* Problems with the escape key in the terminal:: +* Underscore is not a word character:: + +Internals + +* Command properties:: + + + +File: evil.info, Node: Overview, Next: Settings, Prev: Top, Up: Top + +1 Overview +********** + +Evil is an extensible vi layer for Emacs. It emulates the main features +of Vim, (1) turning Emacs into a modal editor. Like Emacs in general, +Evil is extensible in Emacs Lisp. + +* Menu: + +* Installation via package.el: Installation via package el. +* Manual installation:: +* Modes and states:: + + ---------- Footnotes ---------- + + (1) (1) Vim is the most popular version of `vi', a modal text editor +with many implementations. Vim also adds some functions of its own, +like visual selection and text objects. For more information see the +official Vim website (https://vim.org). + + +File: evil.info, Node: Installation via package el, Next: Manual installation, Up: Overview + +1.1 Installation via package.el +=============================== + +Evil is available as a package from MELPA stable, MELPA unstable and +NonGNU ELPA. This is the recommended way of installing Evil. + +To set up ‘package.el’ to work with one of the MELPA repositories, you +can follow the instructions on melpa.org(1). + +Alternatively you can use NonGNU ELPA. It is part of the default package +archives as of Emacs 28. For older Emacs versions you’ll need to add it +yourself: + + (add-to-list 'package-archives + (cons "nongnu" (format "http%s://elpa.nongnu.org/nongnu/" + (if (gnutls-available-p) "s" "")))) + +Once that is done, you can execute the following commands: + + M-x package-refresh-contents + M-x package-install RET evil RET + +Finally, add the following lines to your Emacs init file: + + (require 'evil) + (evil-mode 1) + + ---------- Footnotes ---------- + + (1) https://melpa.org/#/getting-started + + +File: evil.info, Node: Manual installation, Next: Modes and states, Prev: Installation via package el, Up: Overview + +1.2 Manual installation +======================= + +First, install ‘goto-chg’ and ‘cl-lib’. If you have an Emacs version of +24.3 or newer, you should already have ‘cl-lib’. + +Evil lives in a git repository. To download Evil, do: + + git clone --depth 1 https://github.com/emacs-evil/evil.git + +Then add the following lines to your Emacs init file: + + (add-to-list 'load-path "path/to/evil") + (require 'evil) + (evil-mode 1) + +Ensure that your replace ‘path/to/evil’ with the actual path to where +you cloned Evil. + + +File: evil.info, Node: Modes and states, Prev: Manual installation, Up: Overview + +1.3 Modes and states +==================== + +The next time Emacs is started, it will come up in `normal state', +denoted by ‘<N>’ in the mode line. This is where the main vi bindings +are defined. Note that you can always disable normal state with ‘C-z’, +which switches to an “Emacs state” (denoted by ‘<E>’) in which vi keys +are completely disabled. Press ‘C-z’ again to switch back to normal +state. + +state + + Evil uses the term `state' for what is called a “mode” in regular + vi usage, because `modes' are understood in Emacs terms to mean + something else. + +Evil defines a number of states by default: + +normal state (‘<N>’) + + This is the default “resting state” of Evil, in which the main body + of vi bindings are defined. + +insert state (‘<I>’) + + This is the state for insertion of text, where non-modified keys + will insert the corresponding character in the buffer. + +visual state (‘<V>’) + + A state for selecting text regions. Motions are available for + modifying the selected region, and operators are available for + acting on it. + +replace state (‘<R>’) + + A special state mostly similar to insert state, except it replaces + text instead of inserting. + +operator-pending state (‘<O>’) + + A special state entered after launching an operator, but before + specifying the corresponding motion or text object. + +motion state (‘<M>’) + + A special state useful for buffers that are read-only, where + motions are available but editing operations are not. + +Emacs state (‘<E>’) + + A state that as closely as possible mimics default Emacs behaviour, + by eliminating all vi bindings, except for ‘C-z’, to re-enter + normal state. + + +File: evil.info, Node: Settings, Next: Keymaps, Prev: Overview, Up: Top + +2 Settings +********** + +Evil’s behaviour can be adjusted by setting some variables. The list of +all available variables and their current values can be inspected by +doing: + + M-x customize-group RET evil RET + +To change the value of a variable, you can use this interface, or add a +‘setq’ form to your Emacs init file, preferably before Evil is loaded. +(1) + + (setq evil-shift-width 0) + ;; Load Evil + (require 'evil) + +What follows is a non-exhaustive list of the most relevant customization +options. + +* Menu: + +* The initial state:: +* Keybindings and other behaviour:: +* Search:: +* Indentation:: +* Cursor movement:: +* Cursor display:: +* Window management:: +* Parenthesis highlighting:: +* Miscellaneous:: + + ---------- Footnotes ---------- + + (1) (1) Strictly speaking, the order only matters if the variable +affects the way Evil is loaded. This is the case with some variables. + + +File: evil.info, Node: The initial state, Next: Keybindings and other behaviour, Up: Settings + +2.1 The initial state +===================== + +The initial state of a buffer is determined by its major mode. Evil +maintains an association between major modes and their corresponding +states, which is most easily modified using the function *note +evil-set-initial-state: 30. + + -- Emacs Lisp Autofunction: (evil-set-initial-state MODE STATE) + + Set the initial state for major mode `MODE' to `STATE'. This is the + state the buffer comes up in. + +If no state can be found, Evil uses the default initial state. + + -- Emacs Lisp Autovariable: evil-default-state + + The default Evil state. This is the state a buffer starts in when + it is not otherwise configured (see *note evil-set-initial-state: + 30. and *note evil-buffer-regexps: 5.). The value may be one of + ‘normal’, ‘insert’, ‘visual’, ‘replace’, ‘operator’, ‘motion’ and + ‘emacs’. + + Default: ‘normal’ + +Alternatively, it is possible to select the initial state based on the +buffer `name' rather than its major mode. This is checked first, so it +takes precedence over the other methods for setting the state. + + -- Emacs Lisp Autovariable: evil-buffer-regexps + + Regular expressions determining the initial state for a buffer. + Entries have the form ‘(REGEXP . STATE)’, where `REGEXP' is a + regular expression matching the buffer’s name and `STATE' is one of + ‘normal’, ‘insert’, ‘visual’, ‘replace’, ‘operator’, ‘motion’, + ‘emacs’ and ‘nil’. If `STATE' is ‘nil’, Evil is disabled in the + buffer. + + Default: ‘(("^ \\*load\\*"))’ + + +File: evil.info, Node: Keybindings and other behaviour, Next: Search, Prev: The initial state, Up: Settings + +2.2 Keybindings and other behaviour +=================================== + +Evil comes with a rich system for modifying its key bindings *note +Keymaps: 4f. For the most common tweaks, the following variables are +available. + + -- Emacs Lisp Autovariable: evil-toggle-key + + The key used to change to and from Emacs state. Must be readable + by ‘read-kbd-macro’. For example: “C-z”. + + Default: ‘"C-z"’ + + -- Emacs Lisp Autovariable: evil-want-C-i-jump + + Whether ‘C-i’ jumps forward in the jump list (like Vim). + Otherwise, ‘C-i’ inserts a tab character. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-want-C-u-delete + + Whether ‘C-u’ deletes back to indentation in insert state. + Otherwise, ‘C-u’ applies a prefix argument. The binding of ‘C-u’ + mirrors Emacs behaviour by default due to the relative ubiquity of + prefix arguments. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-want-C-u-scroll + + Whether ‘C-u’ scrolls up (like Vim). Otherwise, ‘C-u’ applies a + prefix argument. The binding of ‘C-u’ mirrors Emacs behaviour by + default due to the relative ubiquity of prefix arguments. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-want-C-d-scroll + + Whether ‘C-d’ scrolls down (like Vim). + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-want-C-w-delete + + Whether ‘C-w’ deletes a word in Insert state. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-want-C-w-in-emacs-state + + Whether ‘C-w’ prefixes windows commands in Emacs state. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-want-Y-yank-to-eol + + Whether ‘Y’ yanks to the end of the line. The default behavior is + to yank the whole line, like Vim. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-disable-insert-state-bindings + + Whether insert state bindings should be used. Bindings for escape, + delete and *note evil-toggle-key: 37. are always available. If + this is non-nil, default Emacs bindings are by and large accessible + in insert state. + + Default: ‘nil’ + + +File: evil.info, Node: Search, Next: Indentation, Prev: Keybindings and other behaviour, Up: Settings + +2.3 Search +========== + + -- Emacs Lisp Autovariable: evil-search-module + + The search module to be used. May be either ‘isearch’, for Emacs’ + isearch module, or ‘evil-search’, for Evil’s own interactive search + module. N.b. changing this will not affect keybindings. To swap + out relevant keybindings, see ‘evil-select-search-module’ function. + + Default: ‘isearch’ + + -- Emacs Lisp Autovariable: evil-regexp-search + + Whether to use regular expressions for searching in ‘/’ and ‘?’. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-search-wrap + + Whether search with ‘/’ and ‘?’ wraps around the buffer. If this + is non-nil, search stops at the buffer boundaries. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-flash-delay + + Time in seconds to flash search matches after ‘n’ and ‘N’. + + Default: ‘2’ + + -- Emacs Lisp Autovariable: evil-ex-hl-update-delay + + Time in seconds of idle before updating search highlighting. + Setting this to a period shorter than that of keyboard’s repeat + rate allows highlights to update while scrolling. + + Default: ‘0.02’ + + +File: evil.info, Node: Indentation, Next: Cursor movement, Prev: Search, Up: Settings + +2.4 Indentation +=============== + + -- Emacs Lisp Autovariable: evil-auto-indent + + Whether to auto-indent when opening lines with ‘o’ and ‘O’. + + Default: ‘t’, buffer-local + + -- Emacs Lisp Autovariable: evil-shift-width + + The number of columns by which a line is shifted. This applies to + the shifting operators ‘>’ and ‘<’. + + Default: ‘4’, buffer-local + + -- Emacs Lisp Autovariable: evil-shift-round + + Whether shifting rounds to the nearest multiple. If non-nil, ‘>’ + and ‘<’ adjust line indentation to the nearest multiple of *note + evil-shift-width: 33. + + Default: ‘t’, buffer-local + + -- Emacs Lisp Autovariable: evil-indent-convert-tabs + + If non-nil, the ‘=’ operator converts between leading tabs and + spaces. Whether tabs are converted to spaces or vice versa depends + on the value of ‘indent-tabs-mode’. + + Default: ‘t’ + + +File: evil.info, Node: Cursor movement, Next: Cursor display, Prev: Indentation, Up: Settings + +2.5 Cursor movement +=================== + +In standard Emacs terms, the cursor is generally understood to be +located between two characters. In Vim, and therefore also Evil, this +is the case in insert state, but in other states the cursor is +understood to be `on' a character, and that this character is not a +newline. + +Forcing this behaviour in Emacs is the source of some potentially +surprising results (especially for traditional Emacs users—users used to +Vim may find the default behavior to their satisfaction). Many of them +can be tweaked using the following variables. + + -- Emacs Lisp Autovariable: evil-repeat-move-cursor + + Whether repeating commands with ‘.’ may move the cursor. If nil, + the original cursor position is preserved, even if the command + normally would have moved the cursor. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-move-cursor-back + + Whether the cursor is moved backwards when exiting insert state. + If non-nil, the cursor moves “backwards” when exiting insert state, + so that it ends up on the character to the left. Otherwise it + remains in place, on the character to the right. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-move-beyond-eol + + Whether the cursor can move past the end of the line. If non-nil, + the cursor is allowed to move one character past the end of the + line, as in Emacs. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-cross-lines + + Whether horizontal motions may move to other lines. If non-nil, + certain motions that conventionally operate in a single line may + move the cursor to other lines. Otherwise, they are restricted to + the current line. This applies to ‘h’, ‘SPC’, ‘f’, ‘F’, ‘t’, ‘T’, + ‘~’. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-respect-visual-line-mode + + Whether movement commands respect ‘visual-line-mode’. If non-nil, + ‘visual-line-mode’ is generally respected when it is on. In this + case, motions such as ‘j’ and ‘k’ navigate by visual lines (on the + screen) rather than “physical” lines (defined by newline + characters). If nil, the setting of ‘visual-line-mode’ is ignored. + + This variable must be set before Evil is loaded. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-track-eol + + Whether ‘$’ “sticks” the cursor to the end of the line. If + non-nil, vertical motions after ‘$’ maintain the cursor at the end + of the line, even if the target line is longer. This is analogous + to ‘track-eol’, but respects Evil’s interpretation of end-of-line. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-start-of-line + + Analogue of vim’s ‘startofline’. If nil, preserve column when + making relevant movements of the cursor. Otherwise, move the + cursor to the start of the line. + + Default: ‘nil’ + + +File: evil.info, Node: Cursor display, Next: Window management, Prev: Cursor movement, Up: Settings + +2.6 Cursor display +================== + +A state may change the appearance of the cursor. Use the variable *note +evil-default-cursor: c. to set the default cursor, and the variables +‘evil-normal-state-cursor’, ‘evil-insert-state-cursor’ etc. to set the +cursors for specific states. The acceptable values for all of them are +the same. + + -- Emacs Lisp Autovariable: evil-default-cursor + + The default cursor. May be a cursor type as per ‘cursor-type’, a + color string as passed to ‘set-cursor-color’, a zero-argument + function for changing the cursor, or a list of the above. + + Default: ‘t’ + + +File: evil.info, Node: Window management, Next: Parenthesis highlighting, Prev: Cursor display, Up: Settings + +2.7 Window management +===================== + + -- Emacs Lisp Autovariable: evil-auto-balance-windows + + If non-nil window creation and deletion trigger rebalancing. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-split-window-below + + If non-nil split windows are created below. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-vsplit-window-right + + If non-nil vertically split windows with are created to the right. + + Default: ‘nil’ + + +File: evil.info, Node: Parenthesis highlighting, Next: Miscellaneous, Prev: Window management, Up: Settings + +2.8 Parenthesis highlighting +============================ + +These settings concern the integration between Evil and +‘show-paren-mode’. They take no effect if this mode is not enabled. + + -- Emacs Lisp Autovariable: evil-show-paren-range + + The minimal distance between point and a parenthesis which causes + the parenthesis to be highlighted. + + Default: ‘0’ + + -- Emacs Lisp Autovariable: + evil-highlight-closing-paren-at-point-states + + The states in which the closing parenthesis at point should be + highlighted. All states listed here highlight the closing + parenthesis at point (which is Vim’s default behavior). All others + highlight the parenthesis before point (which is Emacs default + behavior). If this list contains the symbol ‘not’ then its meaning + is inverted, i.e. all states listed here highlight the closing + parenthesis before point. + + Default: ‘(not emacs insert replace)’ + + +File: evil.info, Node: Miscellaneous, Prev: Parenthesis highlighting, Up: Settings + +2.9 Miscellaneous +================= + + -- Emacs Lisp Autovariable: evil-want-fine-undo + + Whether actions are undone in several steps. There are two + possible choices: nil (“no”) means that all changes made during + insert state, including a possible delete after a change operation, + are collected in a single undo step. Non-nil (“yes”) means that + undo steps are determined according to Emacs heuristics, and no + attempt is made to aggregate changes. + + For backward compatibility purposes, the value ‘fine’ is + interpreted as ‘nil’. This option was removed because it did not + work consistently. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-undo-system + + Undo system Evil should use. If equal to ‘undo-tree’ or ‘undo-fu’, + those packages must be installed. If equal to ‘undo-tree’, + ‘undo-tree-mode’ must also be activated. If equal to ‘undo-redo’, + Evil uses commands natively available in Emacs 28. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-backspace-join-lines + + Whether backward delete in insert state may join lines. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-kbd-macro-suppress-motion-error + + Whether left/right motions signal errors in keyboard macros. This + variable only affects beginning-of-line or end-of-line errors + regarding the motions ‘h’ and ‘SPC’ respectively. This may be + desired since such errors cause macro definition or execution to be + terminated. There are four possibilities: + + - ‘record’: errors are suppressed when recording macros, but not + when replaying them. + + - ‘replay’: errors are suppressed when replaying macros, but not + when recording them. + + - ‘t’: errors are suppressed in both cases. + + - ‘nil’: errors are never suppressed. + + Default: ‘nil’ + + -- Emacs Lisp Autovariable: evil-mode-line-format + + The position of the state tag in the mode line. If set to ‘before’ + or ‘after’, the tag is placed at the beginning or the end of the + mode-line, respectively. If nil, there is no tag. Otherwise it + should be a cons cell ‘(WHERE . WHICH)’, where `WHERE' is either + ‘before’ or ‘after’, and `WHICH' is a symbol in ‘mode-line-format’. + The tag is then placed before or after that symbol, respectively. + + Default: ‘before’ + + -- Emacs Lisp Autovariable: evil-mouse-word + + The `thing-at-point' symbol for double click selection. The + double-click starts visual state in a special word selection mode. + This symbol is used to determine the words to be selected. + Possible values are ‘evil-word’ or ‘evil-WORD’. + + Default: ‘evil-word’ + + -- Emacs Lisp Autovariable: evil-bigword + + The set of characters to be interpreted as WORD boundaries. This + is enclosed with square brackets and used as a regular expression. + By default, whitespace characters are considered WORD boundaries. + + Default: ‘"^ \t\r\n"’, buffer-local + + -- Emacs Lisp Autovariable: evil-esc-delay + + The time, in seconds, to wait for another key after escape. If no + further event arrives during this time, the event is translated to + ‘ESC’. Otherwise, it is translated according to + ‘input-decode-map’. This does not apply in Emacs state, and may + also be inhibited by setting ‘evil-inhibit-esc’. + + Default: ‘0.01’ + + -- Emacs Lisp Autovariable: evil-intercept-esc + + Whether Evil should intercept the escape key. In the terminal, + escape and a meta key sequence both generate the same event. In + order to distingush these, Evil uses ‘input-decode-map’. It is not + necessary to do this in a graphical Emacs session. However, if you + prefer to use ‘C-[’ as escape (which is identical to the terminal + escape key code), this interception must also happen in graphical + Emacs sessions. Set this variable to ‘always’, t (only in the + terminal) or nil (never intercept). + + Default: ‘always’ + + -- Emacs Lisp Autovariable: evil-kill-on-visual-paste + + Whether pasting in visual state adds the replaced text to the kill + ring, making it the default for the next paste. The default, + replicates the default Vim behavior. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-echo-state + + Whether to signal the current state in the echo area. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-complete-all-buffers + + Whether completion looks for matches in all buffers. This applies + to ‘C-n’ and ‘C-p’ in insert state. + + Default: ‘t’ + + -- Emacs Lisp Autovariable: evil-want-empty-ex-last-command + + Whether to default to evil-ex-previous-command at empty ex prompt. + + Default: ‘t’ + + +File: evil.info, Node: Keymaps, Next: Hooks, Prev: Settings, Up: Top + +3 Keymaps +********* + +Evil’s key bindings are stored in a number of different keymaps. Each +state has a `global keymap', where the default bindings for that state +are stored. They are named ‘evil-normal-state-map’, +‘evil-insert-state-map’, and so on. The bindings in these maps are +visible in all buffers currently in the corresponding state. + +These keymaps function like ordinary Emacs keymaps and may be modified +using the Emacs function ‘define-key’: + + (define-key evil-normal-state-map (kbd "w") 'some-function) + +This binds the key ‘w’ to the command ‘some-function’ in normal state. +The use of ‘kbd’ is optional for simple key sequences, like this one, +but recommended in general. + +Most of Evil’s bindings are defined in the file ‘evil-maps.el’. + +To facilitate shared keybindings between states, some states may +activate keybindings from other states as well. For example, motion +state bindings are visible in normal and visual state, and normal state +bindings are also visible in visual state. + +Each state also has a `buffer-local keymap' which is specific to the +current buffer, and which takes precedence over the global keymap. +These maps are most suitably modified by a mode hook. They are named +‘evil-normal-state-local-map’, ‘evil-insert-state-local-map’, and so on. + + (add-hook 'some-mode-hook + (lambda () + (define-key evil-normal-state-local-map + (kbd "w") 'some-function))) + +For convenience, the functions *note evil-global-set-key: 1c. and *note +evil-local-set-key: 22. are available for setting global and local state +keys. + + -- Emacs Lisp Autofunction: (evil-global-set-key STATE KEY DEF) + + Bind `KEY' to `DEF' in `STATE'. + + -- Emacs Lisp Autofunction: (evil-local-set-key STATE KEY DEF) + + Bind `KEY' to `DEF' in `STATE' in the current buffer. + +The above examples could therefore have been written as follows: + + (evil-global-set-key 'normal (kbd "w") 'some-function) + + (add-hook 'some-mode-hook + (lambda () + (evil-local-set-key 'normal (kbd "w") 'some-function))) + +* Menu: + +* evil-define-key:: +* Leader keys:: + + +File: evil.info, Node: evil-define-key, Next: Leader keys, Up: Keymaps + +3.1 evil-define-key +=================== + +Evil provides the macro *note evil-define-key: f. for adding state +bindings to ordinary keymaps. It is quite powerful, and is the +preferred method for fine-tuning bindings to activate in specific +circumstances. + + -- Emacs Lisp Autofunction: (evil-define-key STATE KEYMAP KEY DEF + [BINDINGS...]) + + Create a `STATE' binding from `KEY' to `DEF' for `KEYMAP'. `STATE' + is one of ‘normal’, ‘insert’, ‘visual’, ‘replace’, ‘operator’, + ‘motion’, ‘emacs’, or a list of one or more of these. Omitting a + state by using ‘nil’ corresponds to a standard Emacs binding using + ‘define-key’. The remaining arguments are like those of + ‘define-key’. For example: + + (evil-define-key 'normal foo-map "a" 'bar) + + This creates a binding from ‘a’ to ‘bar’ in normal state, which is + active whenever ‘foo-map’ is active. Using nil for the state, the + following lead to identical bindings: + + (evil-define-key nil foo-map "a" 'bar) + (define-key foo-map "a" 'bar) + + It is possible to specify multiple states and/or bindings at once: + + (evil-define-key '(normal visual) foo-map + "a" 'bar + "b" 'foo) + + If ‘foo-map’ has not been initialized yet, this macro adds an entry + to ‘after-load-functions’, delaying execution as necessary. + + `KEYMAP' may also be a quoted symbol. If the symbol is ‘global’, + the global evil keymap corresponding to the state(s) is used, + meaning the following lead to identical bindings: + + (evil-define-key 'normal 'global "a" 'bar) + (evil-global-set-key 'normal "a" 'bar) + + The symbol ‘local’ may also be used, which corresponds to using + *note evil-local-set-key: 22. If a quoted symbol is used that is + not ‘global’ or ‘local’, it is assumed to be the name of a minor + mode, in which case ‘evil-define-minor-mode-key’ is used. + +There follows a brief overview of the main functions of this macro. + + - Define a binding in a given state + + (evil-define-key 'state 'global (kbd "key") 'target) + + - Define a binding in a given state in the current buffer + + (evil-define-key 'state 'local (kbd "key") 'target) + + - Define a binding in a given state under the `foo-mode' major mode. + + (evil-define-key 'state foo-mode-map (kbd "key") 'target) + + Note that ‘foo-mode-map’ is unquoted, and that this form is safe + before ‘foo-mode-map’ is loaded. + + - Define a binding in a given state under the `bar-mode' minor mode. + + (evil-define-key 'state 'bar-mode (kbd "key") 'target) + + Note that ‘bar-mode’ is quoted, and that this form is safe before + ‘bar-mode’ is loaded. + +The macro *note evil-define-key: f. can be used to augment existing +modes with state bindings, as well as creating packages with custom +bindings. For example, the following will create a minor mode +‘foo-mode’ with normal state bindings for the keys ‘w’ and ‘e’: + + (define-minor-mode foo-mode + "Foo mode." + :keymap (make-sparse-keymap)) + + (evil-define-key 'normal 'foo-mode "w" 'bar) + (evil-define-key 'normal 'foo-mode "e" 'baz) + +This minor mode can then be enabled in any buffers where the custom +bindings are desired: + + (add-hook 'text-mode-hook 'foo-mode) ; enable alongside text-mode + + +File: evil.info, Node: Leader keys, Prev: evil-define-key, Up: Keymaps + +3.2 Leader keys +=============== + +Evil supports a simple implementation of Vim’s `leader' keys. To bind a +function to a leader key you can use the expression ‘<leader>’ in a key +mapping, e.g. + + (evil-define-key 'normal 'global (kbd "<leader>fs") 'save-buffer) + +Likewise, you can use the expression ‘<localleader>’ to mimic Vim’s +local leader, which is designed for mode-specific key bindings. + +You can use the function *note evil-set-leader: 31. to designate which +key acts as the leader and the local leader. + + -- Emacs Lisp Autofunction: (evil-set-leader STATE KEY [LOCALLEADER]) + + Set `KEY' to trigger leader bindings in `STATE'. `KEY' should be in + the form produced by ‘kbd’. `STATE' is one of ‘normal’, ‘insert’, + ‘visual’, ‘replace’, ‘operator’, ‘motion’, ‘emacs’, a list of one + or more of these, or ‘nil’, which means all of the above. If + `LOCALLEADER' is non-nil, set the local leader instead. + + +File: evil.info, Node: Hooks, Next: Extension, Prev: Keymaps, Up: Top + +4 Hooks +******* + +A `hook' is a list of functions that are executed when certain events +happen. Hooks are modified with the Emacs function ‘add-hook’. Evil +provides entry and exit hooks for all its states. For example, when +switching from normal state to insert state, all functions in +‘evil-normal-state-exit-hook’ and ‘evil-insert-state-entry-hook’ are +executed. + +It is guaranteed that the exit hook will be executed before the entry +hook on all state switches. + +During the hook execution, the variables ‘evil-next-state’ and +‘evil-previous-state’ contain information about the states being +switched to and from, respectively. + + +File: evil.info, Node: Extension, Next: Frequently Asked Questions, Prev: Hooks, Up: Top + +5 Extension +*********** + +The main functionality of Evil is implemented in terms of reusable +macros. Package writers can use these to define new commands. + +* Menu: + +* Motions:: +* Operators:: +* Text objects:: +* Range types:: +* States:: + + +File: evil.info, Node: Motions, Next: Operators, Up: Extension + +5.1 Motions +=========== + +A `motion' is a command which moves the cursor, such as ‘w’ or ‘e’. +Motions are defined with the macro *note evil-define-motion: 10. +Motions not defined in this way should be declared with *note +evil-declare-motion: 9. + + -- Emacs Lisp Autofunction: (evil-declare-motion COMMAND) + + Declare `COMMAND' to be a movement function. This ensures that it + behaves correctly in visual state. + + -- Emacs Lisp Autofunction: (evil-define-motion MOTION (COUNT ARGS...) + DOC [[KEY VALUE]...] BODY...) + + Define a motion command `MOTION'. `ARGS' is a list of arguments. + Motions can have any number of arguments, but the first (if any) + has the predefined meaning of count. `BODY' must execute the + motion by moving point. + + Optional keyword arguments are: + + - ‘:type’ - determines how the motion works after an operator + (one of ‘inclusive’, ‘line’, ‘block’ and ‘exclusive’, or a + self-defined motion type) + + - ‘:jump’ - if non-nil, the previous position is stored in the + jump list, so that it can be restored with ‘C-o’ + +For example, this is a motion that moves the cursor forward by a number +of characters: + + (evil-define-motion foo-forward (count) + "Move to the right by COUNT characters." + :type inclusive + (forward-char (or count 1))) + +The `type' of a motion determines how it works when used together with +an operator. Inclusive motions include the endpoint in the range being +operated on, while exclusive motions do not. Line motions extend the +whole range to linewise positions, effectively behaving as if the +endpoint were really at the end of the line. Blockwise ranges behave as +a “rectangle” on screen rather than a contiguous range of characters. + + +File: evil.info, Node: Operators, Next: Text objects, Prev: Motions, Up: Extension + +5.2 Operators +============= + +An operator is a command that acts on the text moved over by a motion, +such as ‘c’ (change), ‘d’ (delete) or ‘y’ (yank or copy, not to be +confused with “yank” in Emacs terminology which means `paste'). + + -- Emacs Lisp Autofunction: (evil-define-operator OPERATOR (BEG END + ARGS...) DOC [[KEY VALUE]...] BODY...) + + Define an operator command `OPERATOR'. The operator acts on the + range of characters `BEG' through `END'. `BODY' must execute the + operator by potentially manipulating the buffer contents, or + otherwise causing side effects to happen. + + Optional keyword arguments are: + + - ‘:type’ - force the input range to be of a given type + (‘inclusive’, ‘line’, ‘block’, and ‘exclusive’, or a + self-defined motion type). + + - ‘:motion’ - use a predetermined motion instead of waiting for + one from the keyboard. This does not affect the behavior in + visual state, where selection boundaries are always used. + + - ‘:repeat’ - if non-nil (default), then ‘.’ will repeat the + operator. + + - ‘:move-point’ - if non-nil (default), the cursor will be moved + to the beginning of the range before the body executes + + - ‘:keep-visual’ - if non-nil, the selection is not disabled + when the operator is executed in visual state. By default, + visual state is exited automatically. + +For example, this is an operator that performs ROT13 encryption on the +text under consideration: + + (evil-define-operator evil-rot13 (beg end) + "ROT13 encrypt text." + (rot13-region beg end)) + +Binding this to ‘g?’ (where it is by default) will cause a key sequence +such as ‘g?w’ to encrypt from the current cursor to the end of the word. + + +File: evil.info, Node: Text objects, Next: Range types, Prev: Operators, Up: Extension + +5.3 Text objects +================ + +Text objects are like motions in that they define a range over which an +operator may act. Unlike motions, text objects can set both a beginning +and an endpoint. In visual state, text objects alter both ends of the +selection. + +Text objects are not directly usable in normal state. Instead, they are +bound in the two keymaps ‘evil-inner-text-ojects-map’ and +‘evil-outer-text-objects-map’, which are available in visual and +operator-pending state under the keys ‘i’ and ‘a’ respectively. + + -- Emacs Lisp Autofunction: (evil-define-text-object OBJECT (COUNT) DOC + [[KEY VALUE]...] BODY...) + + Define a text object command `OBJECT'. `BODY' should return a range + ‘(BEG END)’ to the right of point if `COUNT' is positive, and to + the left of it if negative. + + Optional keyword arguments: + + - ‘:type’ - determines how the range applies after an operator + (‘inclusive’, ‘line’, ‘block’, and ‘exclusive’, or a + self-defined motion type). + + - ‘:extend-selection’ - if non-nil (default), the text object + always enlarges the current selection. Otherwise, it replaces + the current selection. + +For eample, this is a text object which selects the next three +characters after the current location: + + (evil-define-text-object foo (count) + "Select three characters." + (list (point) (+ 3 (point)))) + +For convenience, Evil provides several functions returning a list of +positions which can be used for defining text objects. All of them +follow the convention that a positive `count' selects text after the +current location, while negative `count' selects text before it. + + Note: The `thingatpt' library is used quite extensively in Evil to + define text objects, and this dependency leaks through in the + following functions. A `thing' in this context is any symbol for + which there is a function called ‘forward-THING’ (1) which moves + past a number of `things'. + + -- Emacs Lisp Autofunction: (evil-select-inner-object THING BEG END + TYPE [COUNT LINE]) + + Return an inner text object range of `COUNT' objects. If `COUNT' + is positive, return objects following point; if `COUNT' is + negative, return objects preceding point. If one is unspecified, + the other is used with a negative argument. `THING' is a symbol + understood by `thing-at-point'. `BEG', `END' and `TYPE' specify + the current selection. If `LINE' is non-nil, the text object + should be linewise, otherwise it is character wise. + + -- Emacs Lisp Autofunction: (evil-select-an-object THING BEG END TYPE + COUNT [LINE]) + + Return an outer text object range of `COUNT' objects. If `COUNT' + is positive, return objects following point; if `COUNT' is + negative, return objects preceding point. If one is unspecified, + the other is used with a negative argument. `THING' is a symbol + understood by `thing-at-point'. `BEG', `END' and `TYPE' specify + the current selection. If `LINE' is non-nil, the text object + should be linewise, otherwise it is character wise. + + -- Emacs Lisp Autofunction: (evil-select-paren OPEN CLOSE BEG END TYPE + COUNT [INCLUSIVE]) + + Return a range ‘(BEG END)’ of `COUNT' delimited text objects. + `OPEN' and `CLOSE' specify the opening and closing delimiter, + respectively. `BEG' `END' `TYPE' are the currently selected + (visual) range. If `INCLUSIVE' is non-nil, `OPEN' and `CLOSE' are + included in the range; otherwise they are excluded. + + The types of `OPEN' and `CLOSE' specify which kind of THING is used + for parsing with ‘evil-select-block’. If `OPEN' and `CLOSE' are + characters ‘evil-up-paren’ is used. Otherwise `OPEN' and `CLOSE' + must be regular expressions and ‘evil-up-block’ is used. + + If the selection is exclusive, whitespace at the end or at the + beginning of the selection until the end-of-line or + beginning-of-line is ignored. + + ---------- Footnotes ---------- + + (1) (1) There are many more ways that a `thing' can be defined, but +the definition of ‘forward-THING’ is perhaps the most straightforward +way to go about it. + + +File: evil.info, Node: Range types, Next: States, Prev: Text objects, Up: Extension + +5.4 Range types +=============== + +A `type' is a transformation acting on a pair of buffer positions. Evil +defines the types ‘inclusive’, ‘line’, ‘block’ and ‘exclusive’, which +are used for motion ranges and visual selection. New types may be +defined with the macro `evil-define-type'. + + -- Emacs Lisp Autofunction: (evil-define-type TYPE DOC [[KEY FUNC]...]) + + Define type `TYPE'. `DOC' is a general description and shows up in + all docstrings. + + Optional keyword arguments: + + - ‘:expand’ - expansion function. This function should accept + two positions in the current buffer, BEG and END,and return a + pair of expanded buffer positions. + + - ‘:contract’ - the opposite of ‘:expand’. Optional. + + - ‘:one-to-one’ - non-nil if expansion is one-to-one. This + means that ‘:expand’ followed by ‘:contract’ always return the + original range. + + - ‘:normalize’ - normalization function. This function should + accept two unexpanded positions and adjust them before + expansion. May be used to deal with buffer boundaries. + + - ‘:string’ - description function. Takes two buffer positions + and returns a human-readable string. For example “2 lines” + + If further keywords and functions are specified, they are assumed + to be transformations on buffer positions, like ‘:expand’ and + ‘:contract’. + + +File: evil.info, Node: States, Prev: Range types, Up: Extension + +5.5 States +========== + +States are defined with the macro *note evil-define-state: 12, which +takes care to define the necessary hooks, keymaps and variables, as well +as a toggle function ‘evil-NAME-state’ and a predicate function +‘evil-NAME-state-p’ for checking whether the state is active. + + -- Emacs Lisp Autofunction: (evil-define-state STATE DOC [[KEY VAL]...] + BODY...) + + Define an Evil state `STATE'. `DOC' is a general description and + shows up in all docstrings; the first line of the string should be + the full name of the state. + + `BODY' is executed each time the state is enabled or disabled. + + Optional keyword arguments: + + - ‘:tag’ - the mode line indicator, e.g. “<T>”. + + - ‘:message’ - string shown in the echo area when the state is + activated. + + - ‘:cursor’ - default cursor specification. + + - ‘:enable’ - list of other state keymaps to enable when in this + state. + + - ‘:entry-hook’ - list of functions to run when entering this + state. + + - ‘:exit-hook’ - list of functions to run when exiting this + state. + + - ‘:suppress-keymap’ - if non-nil, effectively disables bindings + to ‘self-insert-command’ by making ‘evil-suppress-map’ the + parent of the global state keymap. + + The global keymap of this state will be ‘evil-test-state-map’, the + local keymap will be ‘evil-test-state-local-map’, and so on. + +For example: + + (evil-define-state test + "Test state." + :tag " <T> " + (message (if (evil-test-state-p) + "Enabling test state." + "Disabling test state."))) + + +File: evil.info, Node: Frequently Asked Questions, Next: Internals, Prev: Extension, Up: Top + +6 Frequently Asked Questions +**************************** + +* Menu: + +* Problems with the escape key in the terminal:: +* Underscore is not a word character:: + + +File: evil.info, Node: Problems with the escape key in the terminal, Next: Underscore is not a word character, Up: Frequently Asked Questions + +6.1 Problems with the escape key in the terminal +================================================ + +A common problem when using Evil in terminal mode is a certain delay +after pressing the escape key. Even more, when pressing the escape key +followed quickly by another key the command is recognized as ‘M-<key>’ +instead of two separate keys: ‘ESC’ followed by ‘<key>’. In fact, it is +perfectly valid to simulate ‘M-<key>’ by pressing ‘ESC <key>’ quickly +(but see below). + +The reason for this is that in terminal mode a key sequence involving +the meta key (or alt key) always generates a so called “escape +sequence”, i.e. a sequence of two events sent to Emacs, the first being +‘ESC’ and the second the key pressed simultaneously. The problem is +that pressing the escape key itself also generates the ‘ESC’ event. +Thus, if Emacs (and therefore Evil) receives an ‘ESC’ event there is no +way to tell whether the escape key has been pressed (and no further +event will arrive) or a ‘M-<key>’ combination has been pressed (and the +‘<key>’ event will arrive soon). In order to distinguish both +situations Evil does the following. After receiving an ‘ESC’ event Evil +waits for a short time period (specified by the variable *note +evil-esc-delay: 17. which defaults to 0.01 seconds) for another event. +If no other event arrives Evil assumes that the plain escape key has +been pressed, otherwise it assumes a ‘M-<key>’ combination has been +pressed and combines the ‘ESC’ event with the second one. Because a +‘M-<key>’ sequence usually generates both events in very quick +succession, 0.01 seconds are usually enough and the delay is hardly +noticeable by the user. + +If you use a terminal multiplexer like `tmux' or `screen' the situation +may be worse. These multiplexers have exactly the same problem +recognizing ‘M-<key>’ sequences and often introduce their own delay for +the ‘ESC’ key. There is no way for Evil to influence this delay. In +order to reduce it you must reconfigure your terminal multiplexer. + +Note that this problem should not arise when using Evil in graphical +mode. The reason is that in this case the escape key itself generates a +different command, namely ‘escape’ (a symbol) and hence Evil can +distinguish whether the escape key or a ‘M-<key>’ combination has been +pressed. But this also implies that pressing ‘ESC’ followed by <key> +cannot be used to simulate ‘M-<key>’ in graphical mode! + + +File: evil.info, Node: Underscore is not a word character, Prev: Problems with the escape key in the terminal, Up: Frequently Asked Questions + +6.2 Underscore is not a word character +====================================== + +An underscore ‘_’ is a word character in Vim. This means that word +motions like ‘w’ skip over underlines in a sequence of letters as if it +was a letter itself. In contrast, in Evil the underscore is often a +non-word character like operators, e.g. ‘+’. + +The reason is that Evil uses Emacs’ definition of a word and this +definition does often not include the underscore. In Emacs word +characters are determined by the syntax-class of the buffer. The +syntax-class usually depends on the major-mode of this buffer. This has +the advantage that the definition of a “word” may be adapted to the +particular type of document being edited. Evil uses Emacs’ definition +and does not simply use Vim’s definition in order to be consistent with +other Emacs functions. For example, word characters are exactly those +characters that are matched by the regular expression character class +‘[:word:]’. + +If you would be satisfied by having the ‘*’ and ‘#’ searches use symbols +instead of words, this can be achieved by setting the +‘evil-symbol-word-search’ variable to ‘t’. + +If you want the underscore to be recognised as word character for other +motions, you can modify its entry in the syntax-table: + + (modify-syntax-entry ?_ "w") + +This gives the underscore the ‘word’ syntax class. You can use a +mode-hook to modify the syntax-table in all buffers of some mode, e.g.: + + (add-hook 'c-mode-common-hook + (lambda () (modify-syntax-entry ?_ "w"))) + +This gives the underscore the word syntax-class in all C-like buffers. + +Similarly to Emacs’ definition of a word, the definition of a “symbol” +is also dependent on the syntax-class of the buffer, which often +includes the underscore. The default text objects keymap associates +kbd::‘o’ with the symbol object, making kbd::‘cio’ a good alternative to +Vim’s kbd::‘ciw’, for example. The following will swap between the word +and symbol objects in the keymap: + + (define-key evil-outer-text-objects-map "w" 'evil-a-symbol) + (define-key evil-inner-text-objects-map "w" 'evil-inner-symbol) + (define-key evil-outer-text-objects-map "o" 'evil-a-word) + (define-key evil-inner-text-objects-map "o" 'evil-inner-word) + +This will not change the motion keys, however. One way to make word +motions operate as symbol motions is to alias the ‘evil-word’ `thing' +(1) to the ‘evil-symbol’ thing: + + (defalias 'forward-evil-word 'forward-evil-symbol) + + ---------- Footnotes ---------- + + (1) (1) Many of Evil’s text objects and motions are defined in terms +of the `thingatpt' library, which in this case are defined entirely in +terms of ‘forward-THING’ functions. Thus aliasing one to another should +make all motions and text objects implemented in terms of that `thing' +behave the same. + + +File: evil.info, Node: Internals, Next: The GNU Free Documentation License, Prev: Frequently Asked Questions, Up: Top + +7 Internals +*********** + +* Menu: + +* Command properties:: + + +File: evil.info, Node: Command properties, Up: Internals + +7.1 Command properties +====================== + +Evil defines `command properties' to store information about commands +(1), such as whether they should be repeated. A command property is a +‘:keyword’ with an associated value, e.g. ‘:repeat nil’. + + -- Emacs Lisp Autofunction: (evil-add-command-properties COMMAND + [PROPERTIES...]) + + Add `PROPERTIES' to `COMMAND'. `PROPERTIES' should be a property + list. To replace all properties at once, use *note + evil-set-command-properties: 2f. + + -- Emacs Lisp Autofunction: (evil-set-command-properties COMMAND + [PROPERTIES...]) + + Replace all of `COMMAND'’s properties with `PROPERTIES'. + `PROPERTIES' should be a property list. This erases all previous + properties; to only add properties, use + ‘evil-set-command-property’. + + -- Emacs Lisp Autofunction: (evil-get-command-properties COMMAND) + + Return all Evil properties of `COMMAND'. See also *note + evil-get-command-property: 1b. + + -- Emacs Lisp Autofunction: (evil-get-command-property COMMAND PROPERTY + [DEFAULT]) + + Return the value of Evil `PROPERTY' of `COMMAND'. If the command + does not have the property, return `DEFAULT'. See also *note + evil-get-command-properties: 1a. + + -- Emacs Lisp Autofunction: (evil-define-command COMMAND (ARGS...) DOC + [[KEY VALUE]...] BODY...) + + Define a command `COMMAND'. + +For setting repeat properties, use the following functions: + + -- Emacs Lisp Autofunction: (evil-declare-repeat COMMAND) + + Declare `COMMAND' to be repeatable. + + -- Emacs Lisp Autofunction: (evil-declare-not-repeat COMMAND) + + Declare `COMMAND' to be nonrepeatable. + + -- Emacs Lisp Autofunction: (evil-declare-change-repeat COMMAND) + + Declare `COMMAND' to be repeatable by buffer changes rather than + keystrokes. + + ---------- Footnotes ---------- + + (1) (1) In this context, a `command' may mean any Evil motion, text +object, operator or indeed other Emacs commands, which have not been +defined through the Evil machinery. + + +File: evil.info, Node: The GNU Free Documentation License, Next: Emacs lisp functions and variables, Prev: Internals, Up: Top + +8 The GNU Free Documentation License +************************************ + +Version 1.3, 3 November 2008 + + Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software + Foundation, Inc. ‘http://fsf.org/’ + + Everyone is permitted to copy and distribute verbatim copies of + this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document `free' in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of “copyleft”, which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + “Document”, below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as “you”. You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A “Modified Version” of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A “Secondary Section” is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document’s overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The “Invariant Sections” are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The “Cover Texts” are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A “Transparent” copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + “Transparent” is called “Opaque”. + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The “Title Page” means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, “Title + Page” means the text near the most prominent appearance of the + work’s title, preceding the beginning of the body of the text. + + The “publisher” means any person or entity that distributes copies + of the Document to the public. + + A section “Entitled XYZ” means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) + To “Preserve the Title” of such a section when you modify the + Document means that it remains a section “Entitled XYZ” according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document’s license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document’s + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled “History”, Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled “History” in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + “History” section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled “Acknowledgements” or “Dedications”, + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled “Endorsements”. Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + “Endorsements” or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version’s + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled “Endorsements”, provided it contains + nothing but endorsements of your Modified Version by various + parties—for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of + a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + “History” in the various original documents, forming one section + Entitled “History”; likewise combine any sections Entitled + “Acknowledgements”, and any sections Entitled “Dedications”. You + must delete all sections Entitled “Endorsements.” + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an “aggregate” if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation’s users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document’s Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled “Acknowledgements”, + “Dedications”, or “History”, the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + ‘http://www.gnu.org/copyleft’. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License “or any later version” applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy’s public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A “Massive Multiauthor Collaboration” (or “MMC”) contained in the + site means any set of copyrightable works thus published on the MMC + site. + + “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + “Incorporate” means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is “eligible for relicensing” if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + + +File: evil.info, Node: Emacs lisp functions and variables, Prev: The GNU Free Documentation License, Up: Top + +Emacs lisp functions and variables +********************************** + +* Menu: + +* evil-add-command-properties: 0. +* evil-auto-balance-windows: 1. +* evil-auto-indent: 2. +* evil-backspace-join-lines: 3. +* evil-bigword: 4. +* evil-buffer-regexps: 5. +* evil-complete-all-buffers: 6. +* evil-cross-lines: 7. +* evil-declare-change-repeat: 8. +* evil-declare-motion: 9. +* evil-declare-not-repeat: a. +* evil-declare-repeat: b. +* evil-default-cursor: c. +* evil-default-state: d. +* evil-define-command: e. +* evil-define-key: f. +* evil-define-motion: 10. +* evil-define-operator: 11. +* evil-define-state: 12. +* evil-define-text-object: 13. +* evil-define-type: 14. +* evil-disable-insert-state-bindings: 15. +* evil-echo-state: 16. +* evil-esc-delay: 17. +* evil-ex-hl-update-delay: 18. +* evil-flash-delay: 19. +* evil-get-command-properties: 1a. +* evil-get-command-property: 1b. +* evil-global-set-key: 1c. +* evil-highlight-closing-paren-at-point-states: 1d. +* evil-indent-convert-tabs: 1e. +* evil-intercept-esc: 1f. +* evil-kbd-macro-suppress-motion-error: 20. +* evil-kill-on-visual-paste: 21. +* evil-local-set-key: 22. +* evil-mode-line-format: 23. +* evil-mouse-word: 24. +* evil-move-beyond-eol: 25. +* evil-move-cursor-back: 26. +* evil-regexp-search: 27. +* evil-repeat-move-cursor: 28. +* evil-respect-visual-line-mode: 29. +* evil-search-module: 2a. +* evil-search-wrap: 2b. +* evil-select-an-object: 2c. +* evil-select-inner-object: 2d. +* evil-select-paren: 2e. +* evil-set-command-properties: 2f. +* evil-set-initial-state: 30. +* evil-set-leader: 31. +* evil-shift-round: 32. +* evil-shift-width: 33. +* evil-show-paren-range: 34. +* evil-split-window-below: 35. +* evil-start-of-line: 36. +* evil-toggle-key: 37. +* evil-track-eol: 38. +* evil-undo-system: 39. +* evil-vsplit-window-right: 3a. +* evil-want-C-d-scroll: 3b. +* evil-want-C-i-jump: 3c. +* evil-want-C-u-delete: 3d. +* evil-want-C-u-scroll: 3e. +* evil-want-C-w-delete: 3f. +* evil-want-C-w-in-emacs-state: 40. +* evil-want-empty-ex-last-command: 41. +* evil-want-fine-undo: 42. +* evil-want-Y-yank-to-eol: 43. + + + +Tag Table: +Node: Top364 +Ref: index doc611 +Ref: 44611 +Node: Overview1443 +Ref: overview doc1518 +Ref: 451518 +Ref: overview evil1518 +Ref: 461518 +Ref: overview overview1518 +Ref: 471518 +Ref: Overview-Footnote-11871 +Node: Installation via package el2123 +Ref: overview installation-via-package-el2221 +Ref: 482221 +Ref: Installation via package el-Footnote-13156 +Node: Manual installation3200 +Ref: overview manual-installation3323 +Ref: 493323 +Node: Modes and states3861 +Ref: overview modes-and-states3948 +Ref: 4a3948 +Node: Settings5699 +Ref: settings doc5778 +Ref: 4b5778 +Ref: settings settings5778 +Ref: 4c5778 +Ref: Settings-Footnote-16537 +Node: The initial state6678 +Ref: settings the-initial-state6778 +Ref: 4d6778 +Ref: settings elispobj-evil-set-initial-state7053 +Ref: 307053 +Ref: settings elispobj-evil-default-state7292 +Ref: d7292 +Ref: settings elispobj-evil-buffer-regexps7903 +Ref: 57903 +Node: Keybindings and other behaviour8396 +Ref: settings keybindings-and-other-behaviour8511 +Ref: 4e8511 +Ref: settings elispobj-evil-toggle-key8733 +Ref: 378733 +Ref: settings elispobj-evil-want-C-i-jump8933 +Ref: 3c8933 +Ref: settings elispobj-evil-want-C-u-delete9123 +Ref: 3d9123 +Ref: settings elispobj-evil-want-C-u-scroll9442 +Ref: 3e9442 +Ref: settings elispobj-evil-want-C-d-scroll9735 +Ref: 3b9735 +Ref: settings elispobj-evil-want-C-w-delete9858 +Ref: 3f9858 +Ref: settings elispobj-evil-want-C-w-in-emacs-state9988 +Ref: 409988 +Ref: settings elispobj-evil-want-Y-yank-to-eol10138 +Ref: 4310138 +Ref: settings elispobj-evil-disable-insert-state-bindings10333 +Ref: 1510333 +Node: Search10661 +Ref: settings search10770 +Ref: 5010770 +Ref: settings elispobj-evil-search-module10793 +Ref: 2a10793 +Ref: settings elispobj-evil-regexp-search11178 +Ref: 2711178 +Ref: settings elispobj-evil-search-wrap11329 +Ref: 2b11329 +Ref: settings elispobj-evil-flash-delay11535 +Ref: 1911535 +Ref: settings elispobj-evil-ex-hl-update-delay11678 +Ref: 1811678 +Node: Indentation11951 +Ref: settings indentation12044 +Ref: 5112044 +Ref: settings elispobj-evil-auto-indent12077 +Ref: 212077 +Ref: settings elispobj-evil-shift-width12235 +Ref: 3312235 +Ref: settings elispobj-evil-shift-round12441 +Ref: 3212441 +Ref: settings elispobj-evil-indent-convert-tabs12702 +Ref: 1e12702 +Node: Cursor movement12971 +Ref: settings cursor-movement13072 +Ref: 5213072 +Ref: settings elispobj-evil-repeat-move-cursor13651 +Ref: 2813651 +Ref: settings elispobj-evil-move-cursor-back13915 +Ref: 2613915 +Ref: settings elispobj-evil-move-beyond-eol14260 +Ref: 2514260 +Ref: settings elispobj-evil-cross-lines14502 +Ref: 714502 +Ref: settings elispobj-evil-respect-visual-line-mode14897 +Ref: 2914897 +Ref: settings elispobj-evil-track-eol15412 +Ref: 3815412 +Ref: settings elispobj-evil-start-of-line15780 +Ref: 3615780 +Node: Cursor display16034 +Ref: settings cursor-display16141 +Ref: 5316141 +Ref: settings elispobj-evil-default-cursor16485 +Ref: c16485 +Node: Window management16768 +Ref: settings window-management16884 +Ref: 5416884 +Ref: settings elispobj-evil-auto-balance-windows16929 +Ref: 116929 +Ref: settings elispobj-evil-split-window-below17075 +Ref: 3517075 +Ref: settings elispobj-evil-vsplit-window-right17204 +Ref: 3a17204 +Node: Parenthesis highlighting17357 +Ref: settings parenthesis-highlighting17472 +Ref: 5517472 +Ref: settings elispobj-evil-show-paren-range17661 +Ref: 3417661 +Ref: settings elispobj-evil-highlight-closing-paren-at-point-states17848 +Ref: 1d17848 +Node: Miscellaneous18434 +Ref: settings miscellaneous18523 +Ref: 5618523 +Ref: settings elispobj-evil-want-fine-undo18560 +Ref: 4218560 +Ref: settings elispobj-evil-undo-system19199 +Ref: 3919199 +Ref: settings elispobj-evil-backspace-join-lines19558 +Ref: 319558 +Ref: settings elispobj-evil-kbd-macro-suppress-motion-error19699 +Ref: 2019699 +Ref: settings elispobj-evil-mode-line-format20454 +Ref: 2320454 +Ref: settings elispobj-evil-mouse-word20986 +Ref: 2420986 +Ref: settings elispobj-evil-bigword21327 +Ref: 421327 +Ref: settings elispobj-evil-esc-delay21631 +Ref: 1721631 +Ref: settings elispobj-evil-intercept-esc22037 +Ref: 1f22037 +Ref: settings elispobj-evil-kill-on-visual-paste22663 +Ref: 2122663 +Ref: settings elispobj-evil-echo-state22924 +Ref: 1622924 +Ref: settings elispobj-evil-complete-all-buffers23053 +Ref: 623053 +Ref: settings elispobj-evil-want-empty-ex-last-command23254 +Ref: 4123254 +Node: Keymaps23412 +Ref: keymaps doc23488 +Ref: 5723488 +Ref: keymaps chapter-keymaps23488 +Ref: 4f23488 +Ref: keymaps keymaps23488 +Ref: 5823488 +Ref: keymaps elispobj-evil-global-set-key25140 +Ref: 1c25140 +Ref: keymaps elispobj-evil-local-set-key25244 +Ref: 2225244 +Node: evil-define-key25673 +Ref: keymaps evil-define-key25750 +Ref: 5925750 +Ref: keymaps elispobj-evil-define-key26004 +Ref: f26004 +Node: Leader keys29201 +Ref: keymaps leader-keys29278 +Ref: 5a29278 +Ref: keymaps elispobj-evil-set-leader29805 +Ref: 3129805 +Node: Hooks30258 +Ref: hooks doc30335 +Ref: 5b30335 +Ref: hooks hooks30335 +Ref: 5c30335 +Node: Extension30987 +Ref: extension doc31083 +Ref: 5d31083 +Ref: extension extension31083 +Ref: 5e31083 +Node: Motions31319 +Ref: extension motions31388 +Ref: 5f31388 +Ref: extension elispobj-evil-declare-motion31641 +Ref: 931641 +Ref: extension elispobj-evil-define-motion31814 +Ref: 1031814 +Node: Operators33205 +Ref: extension operators33295 +Ref: 6033295 +Ref: extension elispobj-evil-define-operator33543 +Ref: 1133543 +Node: Text objects35148 +Ref: extension text-objects35242 +Ref: 6135242 +Ref: extension elispobj-evil-define-text-object35782 +Ref: 1335782 +Ref: extension elispobj-evil-select-inner-object37286 +Ref: 2d37286 +Ref: extension elispobj-evil-select-an-object37856 +Ref: 2c37856 +Ref: extension elispobj-evil-select-paren38423 +Ref: 2e38423 +Ref: Text objects-Footnote-139345 +Node: Range types39511 +Ref: extension range-types39602 +Ref: 6239602 +Ref: extension elispobj-evil-define-type39905 +Ref: 1439905 +Node: States41074 +Ref: extension states41144 +Ref: 6341144 +Ref: extension elispobj-evil-define-state41444 +Ref: 1241444 +Node: Frequently Asked Questions42873 +Ref: faq doc42973 +Ref: 6442973 +Ref: faq frequently-asked-questions42973 +Ref: 6542973 +Node: Problems with the escape key in the terminal43130 +Ref: faq problems-with-the-escape-key-in-the-terminal43278 +Ref: 6643278 +Node: Underscore is not a word character45772 +Ref: faq underscore-is-not-a-word-character45920 +Ref: 6745920 +Ref: Underscore is not a word character-Footnote-148518 +Node: Internals48829 +Ref: internals doc48954 +Ref: 6848954 +Ref: internals internals48954 +Ref: 6948954 +Node: Command properties49012 +Ref: internals command-properties49074 +Ref: 6a49074 +Ref: internals elispobj-evil-add-command-properties49329 +Ref: 049329 +Ref: internals elispobj-evil-set-command-properties49589 +Ref: 2f49589 +Ref: internals elispobj-evil-get-command-properties49902 +Ref: 1a49902 +Ref: internals elispobj-evil-get-command-property50068 +Ref: 1b50068 +Ref: internals elispobj-evil-define-command50338 +Ref: e50338 +Ref: internals elispobj-evil-declare-repeat50542 +Ref: b50542 +Ref: internals elispobj-evil-declare-not-repeat50644 +Ref: a50644 +Ref: internals elispobj-evil-declare-change-repeat50753 +Ref: 850753 +Ref: Command properties-Footnote-150944 +Node: The GNU Free Documentation License51121 +Ref: license doc51254 +Ref: 6b51254 +Ref: license the-gnu-free-documentation-license51254 +Ref: 6c51254 +Node: Emacs lisp functions and variables75062 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/goto-chg-20220107.1733/goto-chg-autoloads.el b/elpa/goto-chg-20220107.1733/goto-chg-autoloads.el new file mode 100644 index 0000000..49b1b93 --- /dev/null +++ b/elpa/goto-chg-20220107.1733/goto-chg-autoloads.el @@ -0,0 +1,55 @@ +;;; goto-chg-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "goto-chg" "goto-chg.el" (0 0 0 0)) +;;; Generated autoloads from goto-chg.el + +(autoload 'goto-last-change "goto-chg" "\ +Go to the point where the last edit was made in the current buffer. +Repeat the command to go to the second last edit, etc. + +To go back to more recent edit, the reverse of this command, use \\[goto-last-change-reverse] +or precede this command with \\[universal-argument] - (minus). + +It does not go to the same point twice even if there has been many edits +there. I call the minimal distance between distinguishable edits \"span\". +Set variable `glc-default-span' to control how close is \"the same point\". +Default span is 8. +The span can be changed temporarily with \\[universal-argument] right before \\[goto-last-change]: +\\[universal-argument] <NUMBER> set current span to that number, +\\[universal-argument] (no number) multiplies span by 4, starting with default. +The so set span remains until it is changed again with \\[universal-argument], or the consecutive +repetition of this command is ended by any other command. + +When span is zero (i.e. \\[universal-argument] 0) subsequent \\[goto-last-change] visits each and +every point of edit and a message shows what change was made there. +In this case it may go to the same point twice. + +This command uses undo information. If undo is disabled, so is this command. +At times, when undo information becomes too large, the oldest information is +discarded. See variable `undo-limit'. + +\(fn ARG)" t nil) + +(autoload 'goto-last-change-reverse "goto-chg" "\ +Go back to more recent changes after \\[goto-last-change] have been used. +See `goto-last-change' for use of prefix argument. + +\(fn ARG)" t nil) + +(register-definition-prefixes "goto-chg" '("glc-")) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; goto-chg-autoloads.el ends here diff --git a/elpa/goto-chg-20220107.1733/goto-chg-pkg.el b/elpa/goto-chg-20220107.1733/goto-chg-pkg.el new file mode 100644 index 0000000..cd8628d --- /dev/null +++ b/elpa/goto-chg-20220107.1733/goto-chg-pkg.el @@ -0,0 +1,2 @@ +;;; Generated package description from goto-chg.el -*- no-byte-compile: t -*- +(define-package "goto-chg" "20220107.1733" "Go to last change" '((emacs "24.1")) :commit "278cd3e6d5107693aa2bb33189ca503f22f227d0" :authors '(("David Andersson <l.david.andersson(at)sverige.nu>")) :maintainer '("Vasilij Schneidermann" . "mail@vasilij.de") :keywords '("convenience" "matching") :url "https://github.com/emacs-evil/goto-chg") diff --git a/elpa/goto-chg-20220107.1733/goto-chg.el b/elpa/goto-chg-20220107.1733/goto-chg.el new file mode 100644 index 0000000..1aa6a4c --- /dev/null +++ b/elpa/goto-chg-20220107.1733/goto-chg.el @@ -0,0 +1,370 @@ +;;; goto-chg.el --- Go to last change +;;-------------------------------------------------------------------- +;; +;; Copyright (C) 2002-2008,2013 David Andersson +;; +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. +;; +;;------------------------------------------------------------------- +;; +;; Author: David Andersson <l.david.andersson(at)sverige.nu> +;; Maintainer: Vasilij Schneidermann <mail@vasilij.de> +;; Created: 16 May 2002 +;; Version: 1.7.5 +;; Package-Version: 20220107.1733 +;; Package-Commit: 278cd3e6d5107693aa2bb33189ca503f22f227d0 +;; Package-Requires: ((emacs "24.1")) +;; Keywords: convenience, matching +;; URL: https://github.com/emacs-evil/goto-chg +;; +;;; Commentary: +;; +;; Goto Last Change +;; +;; Goto the point of the most recent edit in the buffer. +;; When repeated, goto the second most recent edit, etc. +;; Negative argument, C-u -, for reverse direction. +;; Works by looking into buffer-undo-list to find points of edit. +;; +;; You would probably like to bind this command to a key. +;; For example in your ~/.emacs: +;; +;; (require 'goto-chg) +;; +;; (global-set-key [(control ?.)] 'goto-last-change) +;; (global-set-key [(control ?,)] 'goto-last-change-reverse) +;; +;; Works with emacs-19.29, 19.31, 20.3, 20.7, 21.1, 21.4, 22.1 and 23.1 +;; Works with XEmacs-20.4 and 21.4 (but see todo about `last-command' below) +;; +;;-------------------------------------------------------------------- +;; History +;; +;; Ver 1.7.5 2022-01-04 Axel Foesman, Stefan Kangas +;; Consider all entries in undo-tree changesets, bump license to GPL3+ +;; Ver 1.7.4 2020-10-08 Vasilij Schneidermann +;; Remove hard dependency on undo-tree +;; Ver 1.7.3 2019-01-07 Vasilij Schneidermann +;; Fix errors when used with persistent undo +;; Ver 1.7.2 2018-01-05 Vasilij Schneidermann +;; Fix byte-compiler warnings again +;; Ver 1.7.1 2017-12-31 Vasilij Schneidermann +;; Fix byte-compiler warnings +;; Ver 1.7 2017-09-17 Vasilij Schneidermann +;; Make it work with undo-tree-mode (see +;; <https://github.com/martinp26/goto-chg>) +;; Ver 1.6 2013-12-12 David Andersson +;; Add keywords; Cleanup comments +;; Ver 1.5 2013-12-11 David Andersson +;; Autoload and document `goto-last-change-reverse' +;; Ver 1.4 2008-09-20 David Andersson +;; Improved property change description; Update comments. +;; Ver 1.3 2007-03-14 David Andersson +;; Added `goto-last-change-reverse' +;; Ver 1.2 2003-04-06 David Andersson +;; Don't let repeating error depthen glc-probe-depth. +;; Ver 1.1 2003-04-06 David Andersson +;; Zero arg describe changes. Negative arg go back. +;; Autoload. Remove message using nil in stead of an empty string. +;; Ver 1.0 2002-05-18 David Andersson +;; Initial version +;; +;;-------------------------------------------------------------------- +;; +;;todo: Rename "goto-chg.el" -> "gotochange.el" or "goto-chgs" ? +;;todo: Rename function goto-last-change -> goto-last-edit ? +;;todo: Rename adjective "-last-" -> "-latest-" or "-most-recent-" ? +;;todo: There are some, maybe useful, funcs for region undo +;; in simple.el in emacs 20. Take a look. +;;todo: Add functionality to visit changed point in text order, not only in +;; chronological order. (Naa, highlight-changes-mode does that). +;;todo: Inverse indication that a change has been saved or not +;;todo: Highlight the range of text involved in the last change? +;;todo: See session-jump-to-last-change in session.el? +;;todo: Unhide invisible text (e.g. outline mode) like isearch do. +;;todo: XEmacs sets last-command to `t' after an error, so you cannot reverse +;; after "No furter change info". Should we bother? +;;todo: Try distinguish "No further change info" (end of truncated undo list) +;; and "No further changes" (end of a complete undo list). +;; +;;-------------------------------------------------------------------- + +;;; Code: + +(require 'undo-tree nil t) + +(defvar glc-default-span 8 "*goto-last-change don't visit the same point twice. +glc-default-span tells how far around a visited point not to visit again.") +(defvar glc-current-span 8 "Internal for goto-last-change.\nA copy of glc-default-span or the ARG passed to goto-last-change.") +(defvar glc-probe-depth 0 "Internal for goto-last-change.\nIt is non-zero between successive goto-last-change.") +(defvar glc-direction 1 "Direction goto-last-change moves towards.") + +;;todo: Find begin and end of line, then use it somewhere + +(defun glc-fixup-edit (e) + "Convert an Emacs 27.1-style combined change to a regular edit." + (when (and (consp e) + (eq (car e) 'apply) + (not (functionp (cadr e))) + (eq (nth 4 e) 'undo--wrap-and-run-primitive-undo)) + (let ((args (last e))) + (when (and (consp args) (= (length args) 1) + (consp (car args)) (= (length (car args)) 1) + (consp (caar args)) (numberp (car (caar args))) (numberp (cdr (caar args)))) + (setq e (caar args))))) + e) + +(defun glc-center-ellipsis (str maxlen &optional ellipsis) + "Truncate STRING in the middle to length MAXLEN. +If STRING is max MAXLEN just return the string. +Optional third argument is the replacement, which defaults to \"...\"." + (if (<= (length str) maxlen) + str + ;; else + (let* ((lipsis (or ellipsis "...")) + (i (/ (- maxlen (length lipsis)) 2))) + (concat (substring str 0 i) + lipsis + (substring str (- i)))))) + +(defun glc-adjust-pos2 (pos p1 p2 adj) + ;; Helper function to glc-adjust-pos + ;; p1, p2: interval where an edit occured + ;; adj: amount of text added (positive) or removed (negativ) by the edit + ;; Return pos if well before p1, or pos+adj if well after p2, or nil if too close + (cond ((<= pos (- p1 glc-current-span)) + pos) + ((> pos (+ p2 glc-current-span)) + (+ pos adj)) + ((zerop glc-current-span) + p1) + (t + nil))) + +(defun glc-adjust-pos (pos e) + "Given POS, a buffer position before the edit E, compute and return +the \"same\" buffer position after E happened. +Exception: return nil if POS is closer than `glc-current-span' to the edit E. +\nInsertion edits before POS returns a larger value. +Deletion edits before POS returns a smaller value. +\nThe edit E is an entry from the `buffer-undo-list'. See for details." + (setq e (glc-fixup-edit e)) + (cond ((atom e) ; nil==cmd boundary, or, num==changed pos + pos) + ((numberp (car e)) ; (beg . end)==insertion + (glc-adjust-pos2 pos (car e) (car e) (- (cdr e) (car e)))) + ((stringp (car e)) ; (string . pos)==deletion + (glc-adjust-pos2 pos (abs (cdr e)) (+ (abs (cdr e)) (length (car e))) (- (length (car e))))) + ((null (car e)) ; (nil prop val beg . end)==prop change + (glc-adjust-pos2 pos (nth 3 e) (nthcdr 4 e) 0)) + (t ; (marker . dist)==marker moved + pos))) + +;; If recursive in stead of iterative (while), it tends to fill the call stack. +;; (Isn't it tail optimized?) +(defun glc-adjust-list (r) + "R is list of edit entries in chronological order. +Pick the point of the first edit entry and update that point with +the second, third, etc, edit entries. Return the final updated point, +or nil if the point was closer than `glc-current-span' to some edit in R. +\nR is basically a reversed slice from the buffer-undo-list." + (if r + ;; Get pos + (let ((pos (glc-get-pos (car r)))) + (setq r (cdr r)) + ;; Walk back in reverse list + (while (and r pos) + (setq pos (glc-adjust-pos pos (car r)) + r (cdr r))) + pos) + ;; else + nil)) + +(defun glc-get-pos (e) + "If E represents an edit, return a position value in E, the position +where the edit took place. Return nil if E represents no real change. +\nE is an entry in the buffer-undo-list." + (setq e (glc-fixup-edit e)) + (cond ((numberp e) e) ; num==changed position + ((atom e) nil) ; nil==command boundary + ((numberp (car e)) (cdr e)) ; (beg . end)==insertion + ((stringp (car e)) (abs (cdr e))) ; (string . pos)==deletion + ((null (car e)) (nthcdr 4 e)) ; (nil ...)==text property change + ((atom (car e)) nil) ; (t ...)==file modification time + (t nil))) ; (marker ...)==marker moved + +(defun glc-get-descript (e &optional n) + "If E represents an edit, return a short string describing E. +Return nil if E represents no real change. +\nE is an entry in the buffer-undo-list." + (setq e (glc-fixup-edit e)) + (let ((nn (or (format "T-%d: " n) ""))) + (cond ((numberp e) "New position") ; num==changed position + ((atom e) nil) ; nil==command boundary + ((numberp (car e)) ; (beg . end)==insertion + (if (and n (< n 2)) + (format "%sInserted %d chars \"%s\"" nn (- (cdr e) (car e)) + (glc-center-ellipsis (buffer-substring (car e) (cdr e)) 60)) + ;; else + ;; An older insert. The inserted text cannot easily be computed. + ;; Just show the char count. + (format "%sInserted %d chars" nn (- (cdr e) (car e))))) + ((stringp (car e)) ; (string . pos)==deletion + (format "%sDeleted \"%s\"" nn (glc-center-ellipsis (car e) 60))) + ((null (car e)) ; (nil ...)==text property change + (format "%sProperty change" nn)) + ((atom (car e)) nil) ; (t ...)==file modification time + (t nil)))) ; (marker ...)==marker moved + +(defun glc-is-positionable (e) + "Return non-nil if E is an insertion, deletion or text property change. +\nE is an entry in the buffer-undo-list." + (and (not (numberp e)) (glc-get-pos e))) + +(defun glc-is-filetime (e) + "Return t if E indicates a buffer became \"modified\", +that is, it was previously saved or unchanged. Nil otherwise." + (and (listp e) (eq (car e) t))) + +(declare-function undo-tree-current "ext:undo-tree") +(declare-function undo-tree-node-previous "ext:undo-tree") +(declare-function undo-tree-node-undo "ext:undo-tree") +(declare-function undo-list-transfer-to-tree "ext:undo-tree") +(defvar buffer-undo-tree) + +;;;###autoload +(defun goto-last-change (arg) +"Go to the point where the last edit was made in the current buffer. +Repeat the command to go to the second last edit, etc. +\nTo go back to more recent edit, the reverse of this command, use \\[goto-last-change-reverse] +or precede this command with \\[universal-argument] - (minus). +\nIt does not go to the same point twice even if there has been many edits +there. I call the minimal distance between distinguishable edits \"span\". +Set variable `glc-default-span' to control how close is \"the same point\". +Default span is 8. +The span can be changed temporarily with \\[universal-argument] right before \\[goto-last-change]: +\\[universal-argument] <NUMBER> set current span to that number, +\\[universal-argument] (no number) multiplies span by 4, starting with default. +The so set span remains until it is changed again with \\[universal-argument], or the consecutive +repetition of this command is ended by any other command. +\nWhen span is zero (i.e. \\[universal-argument] 0) subsequent \\[goto-last-change] visits each and +every point of edit and a message shows what change was made there. +In this case it may go to the same point twice. +\nThis command uses undo information. If undo is disabled, so is this command. +At times, when undo information becomes too large, the oldest information is +discarded. See variable `undo-limit'." + (interactive "P") + (cond ((not (eq this-command last-command)) + ;; Start a glc sequence + ;; Don't go to current point if last command was an obvious edit + ;; (yank or self-insert, but not kill-region). Makes it easier to + ;; jump back and forth when copying seleced lines. + (setq glc-probe-depth (if (memq last-command '(yank self-insert-command)) 1 0) + glc-direction 1 + glc-current-span glc-default-span) + (if (< (prefix-numeric-value arg) 0) + (error "Negative arg: Cannot reverse as the first operation")))) + (cond ((and (null buffer-undo-list) + (or (not (boundp 'buffer-undo-tree)) + (null buffer-undo-tree))) + (error "Buffer has not been changed")) + ((eq buffer-undo-list t) + (error "No change info (undo is disabled)"))) + (cond ((numberp arg) ; Numeric arg sets span + (setq glc-current-span (abs arg))) + ((consp arg) ; C-u's multiply previous span by 4 + (setq glc-current-span (* (abs (car arg)) glc-default-span)) + (message "Current span is %d chars" glc-current-span))) ;todo: keep message with "waiting" and "is saved" + (setq glc-direction (if (< (prefix-numeric-value arg) 0) -1 1)) + (let* (rev ; Reversed (and filtered) undo list + pos ; The pos we look for, nil until found + (n 0) ; Steps in undo list (length of 'rev') + (undo-tree-p (bound-and-true-p undo-tree-mode)) + (orig-l (if (not undo-tree-p) + buffer-undo-list + (undo-list-transfer-to-tree) + ;; Each node has a list of undo entries: Need to flatten. + ;; Keep current entries and next node to consider in tuple. + (cons nil (undo-tree-current buffer-undo-tree)))) + (l orig-l) + (passed-save-entry (not (buffer-modified-p))) + (new-probe-depth glc-probe-depth)) + ;; Walk back and forth in the buffer-undo-list, each time one step deeper, + ;; until we can walk back the whole list with a 'pos' that is not coming + ;; too close to another edit. + (while (null pos) + (setq new-probe-depth (+ new-probe-depth glc-direction)) + (when (< glc-direction 0) + (setq rev () + n 0 + l orig-l + passed-save-entry (not (buffer-modified-p)))) + (when (< new-probe-depth 1) + (error "No later change info")) + (when (> n 150) + (message "working...")) + ;; Walk forward in buffer-undo-list, glc-probe-depth steps. + ;; Build reverse list along the way + (while (< n new-probe-depth) + (let ((entry (if (not undo-tree-p) + (if l + (pop l) + (error "No further change info")) + (when (null (car l)) + (setq l (cons (cons nil + (undo-tree-node-undo + (or (cdr l) + (error "No further change info")))) + (undo-tree-node-previous (cdr l))))) + (pop (car l))))) + (cond ((glc-is-positionable entry) + (setq n (1+ n) + rev (cons entry rev))) + ((or passed-save-entry (glc-is-filetime entry)) + (setq passed-save-entry t))))) + ;; Walk back in reverse list, from older to newer edits. + ;; Adjusting pos along the way. + (setq pos (glc-adjust-list rev))) + ;; Found a place not previously visited, in 'pos'. + ;; (An error have been issued if nothing (more) found.) + (if (> n 150) + (message nil)) ; remove message "working..." + (if (and (= glc-current-span 0) (glc-get-descript (car rev) n)) + (message "%s" (glc-get-descript (car rev) n)) + ;; else + (if passed-save-entry + (message "(This change is saved)"))) + (setq glc-probe-depth new-probe-depth) + (goto-char pos))) + +;;;###autoload +(defun goto-last-change-reverse (arg) + "Go back to more recent changes after \\[goto-last-change] have been used. +See `goto-last-change' for use of prefix argument." + (interactive "P") + ;; Negate arg, all kinds + (cond ((eq arg nil) (setq arg '-)) + ((eq arg '-) (setq arg nil)) + ((listp arg) (setq arg (list (- (car arg))))) + (t (setq arg (- arg)))) + ;; Make 'goto-last-change-reverse' look like 'goto-last-change' + (cond ((eq last-command this-command) + (setq last-command 'goto-last-change))) + (setq this-command 'goto-last-change) + ;; Call 'goto-last-change' to do the job + (goto-last-change arg)) + +(provide 'goto-chg) + +;;; goto-chg.el ends here diff --git a/elpa/goto-chg-20220107.1733/goto-chg.elc b/elpa/goto-chg-20220107.1733/goto-chg.elc Binary files differnew file mode 100644 index 0000000..93d85e6 --- /dev/null +++ b/elpa/goto-chg-20220107.1733/goto-chg.elc |